diff --git a/src/libs/Browserbase/Generated/Browserbase.BrowserbaseClient.DownloadsDelete.g.cs b/src/libs/Browserbase/Generated/Browserbase.BrowserbaseClient.DownloadsDelete.g.cs new file mode 100644 index 0000000..410b9a8 --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.BrowserbaseClient.DownloadsDelete.g.cs @@ -0,0 +1,153 @@ + +#nullable enable + +namespace Browserbase +{ + public partial class BrowserbaseClient + { + partial void PrepareDownloadsDeleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id); + partial void PrepareDownloadsDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id); + partial void ProcessDownloadsDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Delete a Download
+ /// Delete a download file from storage and mark as deleted. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DownloadsDeleteAsync( + string id, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDownloadsDeleteArguments( + httpClient: HttpClient, + id: ref id); + + var __pathBuilder = new global::Browserbase.PathBuilder( + path: $"/v1/downloads/{id}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDownloadsDeleteRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + id: id); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDownloadsDeleteResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + } + catch (global::System.Exception __ex) + { + throw new global::Browserbase.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Browserbase.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/Browserbase/Generated/Browserbase.BrowserbaseClient.DownloadsGet.g.cs b/src/libs/Browserbase/Generated/Browserbase.BrowserbaseClient.DownloadsGet.g.cs new file mode 100644 index 0000000..b34af91 --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.BrowserbaseClient.DownloadsGet.g.cs @@ -0,0 +1,174 @@ + +#nullable enable + +namespace Browserbase +{ + public partial class BrowserbaseClient + { + partial void PrepareDownloadsGetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id); + partial void PrepareDownloadsGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id); + partial void ProcessDownloadsGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDownloadsGetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a Download
+ /// Get download metadata (Accept: application/json) or file content (Accept: application/octet-stream). + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DownloadsGetAsync( + string id, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDownloadsGetArguments( + httpClient: HttpClient, + id: ref id); + + var __pathBuilder = new global::Browserbase.PathBuilder( + path: $"/v1/downloads/{id}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDownloadsGetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + id: id); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDownloadsGetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDownloadsGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Browserbase.DownloadsGetResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Browserbase.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Browserbase.DownloadsGetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Browserbase.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/Browserbase/Generated/Browserbase.BrowserbaseClient.DownloadsList.g.cs b/src/libs/Browserbase/Generated/Browserbase.BrowserbaseClient.DownloadsList.g.cs new file mode 100644 index 0000000..ab0b8af --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.BrowserbaseClient.DownloadsList.g.cs @@ -0,0 +1,237 @@ + +#nullable enable + +namespace Browserbase +{ + public partial class BrowserbaseClient + { + partial void PrepareDownloadsListArguments( + global::System.Net.Http.HttpClient httpClient, + ref string sessionId, + ref string? filename, + ref string? mimeType, + ref double? minSize, + ref double? maxSize, + ref global::System.DateTime? createdAfter, + ref global::System.DateTime? createdBefore, + ref double? limit, + ref double? offset); + partial void PrepareDownloadsListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string sessionId, + string? filename, + string? mimeType, + double? minSize, + double? maxSize, + global::System.DateTime? createdAfter, + global::System.DateTime? createdBefore, + double? limit, + double? offset); + partial void ProcessDownloadsListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDownloadsListResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Downloads
+ /// List all downloads for a session with optional filtering and pagination. + ///
+ /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: 0 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DownloadsListAsync( + string sessionId, + string? filename = default, + string? mimeType = default, + double? minSize = default, + double? maxSize = default, + global::System.DateTime? createdAfter = default, + global::System.DateTime? createdBefore = default, + double? limit = default, + double? offset = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDownloadsListArguments( + httpClient: HttpClient, + sessionId: ref sessionId, + filename: ref filename, + mimeType: ref mimeType, + minSize: ref minSize, + maxSize: ref maxSize, + createdAfter: ref createdAfter, + createdBefore: ref createdBefore, + limit: ref limit, + offset: ref offset); + + var __pathBuilder = new global::Browserbase.PathBuilder( + path: "/v1/downloads", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("sessionId", sessionId) + .AddOptionalParameter("filename", filename) + .AddOptionalParameter("mimeType", mimeType) + .AddOptionalParameter("minSize", minSize?.ToString()) + .AddOptionalParameter("maxSize", maxSize?.ToString()) + .AddOptionalParameter("createdAfter", createdAfter?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("createdBefore", createdBefore?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("offset", offset?.ToString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDownloadsListRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + sessionId: sessionId, + filename: filename, + mimeType: mimeType, + minSize: minSize, + maxSize: maxSize, + createdAfter: createdAfter, + createdBefore: createdBefore, + limit: limit, + offset: offset); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDownloadsListResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDownloadsListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Browserbase.DownloadsListResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Browserbase.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Browserbase.DownloadsListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Browserbase.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/Browserbase/Generated/Browserbase.IBrowserbaseClient.DownloadsDelete.g.cs b/src/libs/Browserbase/Generated/Browserbase.IBrowserbaseClient.DownloadsDelete.g.cs new file mode 100644 index 0000000..0143274 --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.IBrowserbaseClient.DownloadsDelete.g.cs @@ -0,0 +1,18 @@ +#nullable enable + +namespace Browserbase +{ + public partial interface IBrowserbaseClient + { + /// + /// Delete a Download
+ /// Delete a download file from storage and mark as deleted. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DownloadsDeleteAsync( + string id, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Browserbase/Generated/Browserbase.IBrowserbaseClient.DownloadsGet.g.cs b/src/libs/Browserbase/Generated/Browserbase.IBrowserbaseClient.DownloadsGet.g.cs new file mode 100644 index 0000000..b7d2571 --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.IBrowserbaseClient.DownloadsGet.g.cs @@ -0,0 +1,18 @@ +#nullable enable + +namespace Browserbase +{ + public partial interface IBrowserbaseClient + { + /// + /// Get a Download
+ /// Get download metadata (Accept: application/json) or file content (Accept: application/octet-stream). + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DownloadsGetAsync( + string id, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Browserbase/Generated/Browserbase.IBrowserbaseClient.DownloadsList.g.cs b/src/libs/Browserbase/Generated/Browserbase.IBrowserbaseClient.DownloadsList.g.cs new file mode 100644 index 0000000..fe9c0ea --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.IBrowserbaseClient.DownloadsList.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace Browserbase +{ + public partial interface IBrowserbaseClient + { + /// + /// List Downloads
+ /// List all downloads for a session with optional filtering and pagination. + ///
+ /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: 0 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DownloadsListAsync( + string sessionId, + string? filename = default, + string? mimeType = default, + double? minSize = default, + double? maxSize = default, + global::System.DateTime? createdAfter = default, + global::System.DateTime? createdBefore = default, + double? limit = default, + double? offset = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Browserbase/Generated/Browserbase.JsonSerializerContext.g.cs b/src/libs/Browserbase/Generated/Browserbase.JsonSerializerContext.g.cs index 390a11e..f2afda8 100644 --- a/src/libs/Browserbase/Generated/Browserbase.JsonSerializerContext.g.cs +++ b/src/libs/Browserbase/Generated/Browserbase.JsonSerializerContext.g.cs @@ -172,6 +172,10 @@ namespace Browserbase [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Browserbase.ContextsCreateResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Browserbase.ContextsUpdateResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Browserbase.DownloadsListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Browserbase.DownloadsListResponseDownload))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Browserbase.DownloadsGetResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Browserbase.FetchCreateResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Browserbase.FetchCreateResponse2))] @@ -213,6 +217,7 @@ namespace Browserbase [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Browserbase.AnyOf>, bool?>))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] diff --git a/src/libs/Browserbase/Generated/Browserbase.JsonSerializerContextTypes.g.cs b/src/libs/Browserbase/Generated/Browserbase.JsonSerializerContextTypes.g.cs index c5239f0..eec1579 100644 --- a/src/libs/Browserbase/Generated/Browserbase.JsonSerializerContextTypes.g.cs +++ b/src/libs/Browserbase/Generated/Browserbase.JsonSerializerContextTypes.g.cs @@ -332,139 +332,155 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Browserbase.FetchCreateResponse? Type76 { get; set; } + public global::Browserbase.DownloadsListResponse? Type76 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type77 { get; set; } + public global::System.Collections.Generic.IList? Type77 { get; set; } /// /// /// - public global::Browserbase.FetchCreateResponse2? Type78 { get; set; } + public global::Browserbase.DownloadsListResponseDownload? Type78 { get; set; } /// /// /// - public global::Browserbase.FetchCreateResponse3? Type79 { get; set; } + public global::Browserbase.DownloadsGetResponse? Type79 { get; set; } /// /// /// - public global::Browserbase.FetchCreateResponse4? Type80 { get; set; } + public global::Browserbase.FetchCreateResponse? Type80 { get; set; } /// /// /// - public global::Browserbase.FetchCreateResponse5? Type81 { get; set; } + public global::System.Collections.Generic.Dictionary? Type81 { get; set; } /// /// /// - public global::Browserbase.FunctionsListResponse? Type82 { get; set; } + public global::Browserbase.FetchCreateResponse2? Type82 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type83 { get; set; } + public global::Browserbase.FetchCreateResponse3? Type83 { get; set; } /// /// /// - public global::Browserbase.FunctionBuildsListResponse? Type84 { get; set; } + public global::Browserbase.FetchCreateResponse4? Type84 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type85 { get; set; } + public global::Browserbase.FetchCreateResponse5? Type85 { get; set; } /// /// /// - public global::Browserbase.FunctionBuildsGetLogsResponse? Type86 { get; set; } + public global::Browserbase.FunctionsListResponse? Type86 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type87 { get; set; } + public global::System.Collections.Generic.IList? Type87 { get; set; } /// /// /// - public global::Browserbase.AllOf? Type88 { get; set; } + public global::Browserbase.FunctionBuildsListResponse? Type88 { get; set; } /// /// /// - public global::Browserbase.InvocationsGetResponse2? Type89 { get; set; } + public global::System.Collections.Generic.IList? Type89 { get; set; } /// /// /// - public global::Browserbase.InvocationsGetResponseCause? Type90 { get; set; } + public global::Browserbase.FunctionBuildsGetLogsResponse? Type90 { get; set; } /// /// /// - public global::Browserbase.InvocationsGetResponseCauseCode? Type91 { get; set; } + public global::System.Collections.Generic.IList? Type91 { get; set; } /// /// /// - public global::Browserbase.InvocationsGetLogsResponse? Type92 { get; set; } + public global::Browserbase.AllOf? Type92 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type93 { get; set; } + public global::Browserbase.InvocationsGetResponse2? Type93 { get; set; } /// /// /// - public global::Browserbase.FunctionVersionsListInvocationsResponse? Type94 { get; set; } + public global::Browserbase.InvocationsGetResponseCause? Type94 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type95 { get; set; } + public global::Browserbase.InvocationsGetResponseCauseCode? Type95 { get; set; } /// /// /// - public global::Browserbase.FunctionsListVersionsResponse? Type96 { get; set; } + public global::Browserbase.InvocationsGetLogsResponse? Type96 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type97 { get; set; } + public global::System.Collections.Generic.IList? Type97 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type98 { get; set; } + public global::Browserbase.FunctionVersionsListInvocationsResponse? Type98 { get; set; } /// /// /// - public global::Browserbase.SearchWebResponse? Type99 { get; set; } + public global::System.Collections.Generic.IList? Type99 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type100 { get; set; } + public global::Browserbase.FunctionsListVersionsResponse? Type100 { get; set; } /// /// /// - public global::Browserbase.SearchWebResponseResult? Type101 { get; set; } + public global::System.Collections.Generic.IList? Type101 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type102 { get; set; } + public global::System.Collections.Generic.IList? Type102 { get; set; } /// /// /// - public global::Browserbase.AllOf? Type103 { get; set; } + public global::Browserbase.SearchWebResponse? Type103 { get; set; } /// /// /// - public global::Browserbase.SessionsCreateResponse2? Type104 { get; set; } + public global::System.Collections.Generic.IList? Type104 { get; set; } /// /// /// - public global::Browserbase.AllOf? Type105 { get; set; } + public global::Browserbase.SearchWebResponseResult? Type105 { get; set; } /// /// /// - public global::Browserbase.SessionsGetResponse2? Type106 { get; set; } + public global::System.Collections.Generic.IList? Type106 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type107 { get; set; } + public global::Browserbase.AllOf? Type107 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type108 { get; set; } + public global::Browserbase.SessionsCreateResponse2? Type108 { get; set; } /// /// /// - public global::Browserbase.SessionsUploadFileResponse? Type109 { get; set; } + public global::Browserbase.AllOf? Type109 { get; set; } + /// + /// + /// + public global::Browserbase.SessionsGetResponse2? Type110 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type111 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type112 { get; set; } + /// + /// + /// + public global::Browserbase.SessionsUploadFileResponse? Type113 { get; set; } /// /// @@ -497,46 +513,50 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType7 { get; set; } + public global::System.Collections.Generic.List? ListType7 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType8 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType8 { get; set; } + public global::System.Collections.Generic.List? ListType9 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType9 { get; set; } + public global::System.Collections.Generic.List? ListType10 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType10 { get; set; } + public global::System.Collections.Generic.List? ListType11 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType11 { get; set; } + public global::System.Collections.Generic.List? ListType12 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType12 { get; set; } + public global::System.Collections.Generic.List? ListType13 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType13 { get; set; } + public global::System.Collections.Generic.List? ListType14 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType14 { get; set; } + public global::System.Collections.Generic.List? ListType15 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType15 { get; set; } + public global::System.Collections.Generic.List? ListType16 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType16 { get; set; } + public global::System.Collections.Generic.List? ListType17 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType17 { get; set; } + public global::System.Collections.Generic.List? ListType18 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsGetResponse.Json.g.cs b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsGetResponse.Json.g.cs new file mode 100644 index 0000000..6c29a34 --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsGetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Browserbase +{ + public sealed partial class DownloadsGetResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Browserbase.DownloadsGetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Browserbase.DownloadsGetResponse), + jsonSerializerContext) as global::Browserbase.DownloadsGetResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Browserbase.DownloadsGetResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Browserbase.DownloadsGetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Browserbase.DownloadsGetResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsGetResponse.g.cs b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsGetResponse.g.cs new file mode 100644 index 0000000..8d3a17f --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsGetResponse.g.cs @@ -0,0 +1,118 @@ + +#nullable enable + +namespace Browserbase +{ + /// + /// + /// + public sealed partial class DownloadsGetResponse + { + /// + /// Unique identifier for the download. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The Session ID this download belongs to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sessionId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SessionId { get; set; } + + /// + /// The filename of the downloaded file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } + + /// + /// The MIME type of the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("mimeType")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string MimeType { get; set; } + + /// + /// File size in bytes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Size { get; set; } + + /// + /// SHA256 checksum of the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("checksum")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Checksum { get; set; } + + /// + /// Timestamp when the file was downloaded. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("createdAt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique identifier for the download. + /// + /// + /// The Session ID this download belongs to. + /// + /// + /// The filename of the downloaded file. + /// + /// + /// The MIME type of the file. + /// + /// + /// File size in bytes. + /// + /// + /// SHA256 checksum of the file. + /// + /// + /// Timestamp when the file was downloaded. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DownloadsGetResponse( + string id, + string sessionId, + string filename, + string mimeType, + double size, + string checksum, + global::System.DateTime createdAt) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.SessionId = sessionId ?? throw new global::System.ArgumentNullException(nameof(sessionId)); + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); + this.MimeType = mimeType ?? throw new global::System.ArgumentNullException(nameof(mimeType)); + this.Size = size; + this.Checksum = checksum ?? throw new global::System.ArgumentNullException(nameof(checksum)); + this.CreatedAt = createdAt; + } + + /// + /// Initializes a new instance of the class. + /// + public DownloadsGetResponse() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponse.Json.g.cs b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponse.Json.g.cs new file mode 100644 index 0000000..06ad06a --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Browserbase +{ + public sealed partial class DownloadsListResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Browserbase.DownloadsListResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Browserbase.DownloadsListResponse), + jsonSerializerContext) as global::Browserbase.DownloadsListResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Browserbase.DownloadsListResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Browserbase.DownloadsListResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Browserbase.DownloadsListResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponse.g.cs b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponse.g.cs new file mode 100644 index 0000000..dc8962b --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponse.g.cs @@ -0,0 +1,76 @@ + +#nullable enable + +namespace Browserbase +{ + /// + /// + /// + public sealed partial class DownloadsListResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("downloads")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Downloads { get; set; } + + /// + /// Total count of matching downloads. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Total { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("limit")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Limit { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("offset")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Offset { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Total count of matching downloads. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DownloadsListResponse( + global::System.Collections.Generic.IList downloads, + double total, + double limit, + double offset) + { + this.Downloads = downloads ?? throw new global::System.ArgumentNullException(nameof(downloads)); + this.Total = total; + this.Limit = limit; + this.Offset = offset; + } + + /// + /// Initializes a new instance of the class. + /// + public DownloadsListResponse() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponseDownload.Json.g.cs b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponseDownload.Json.g.cs new file mode 100644 index 0000000..380a85b --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponseDownload.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Browserbase +{ + public sealed partial class DownloadsListResponseDownload + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Browserbase.DownloadsListResponseDownload? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Browserbase.DownloadsListResponseDownload), + jsonSerializerContext) as global::Browserbase.DownloadsListResponseDownload; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Browserbase.DownloadsListResponseDownload? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Browserbase.DownloadsListResponseDownload), + jsonSerializerContext).ConfigureAwait(false)) as global::Browserbase.DownloadsListResponseDownload; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponseDownload.g.cs b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponseDownload.g.cs new file mode 100644 index 0000000..f44426c --- /dev/null +++ b/src/libs/Browserbase/Generated/Browserbase.Models.DownloadsListResponseDownload.g.cs @@ -0,0 +1,118 @@ + +#nullable enable + +namespace Browserbase +{ + /// + /// + /// + public sealed partial class DownloadsListResponseDownload + { + /// + /// Unique identifier for the download. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The Session ID this download belongs to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sessionId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SessionId { get; set; } + + /// + /// The filename of the downloaded file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } + + /// + /// The MIME type of the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("mimeType")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string MimeType { get; set; } + + /// + /// File size in bytes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Size { get; set; } + + /// + /// SHA256 checksum of the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("checksum")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Checksum { get; set; } + + /// + /// Timestamp when the file was downloaded. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("createdAt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique identifier for the download. + /// + /// + /// The Session ID this download belongs to. + /// + /// + /// The filename of the downloaded file. + /// + /// + /// The MIME type of the file. + /// + /// + /// File size in bytes. + /// + /// + /// SHA256 checksum of the file. + /// + /// + /// Timestamp when the file was downloaded. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DownloadsListResponseDownload( + string id, + string sessionId, + string filename, + string mimeType, + double size, + string checksum, + global::System.DateTime createdAt) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.SessionId = sessionId ?? throw new global::System.ArgumentNullException(nameof(sessionId)); + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); + this.MimeType = mimeType ?? throw new global::System.ArgumentNullException(nameof(mimeType)); + this.Size = size; + this.Checksum = checksum ?? throw new global::System.ArgumentNullException(nameof(checksum)); + this.CreatedAt = createdAt; + } + + /// + /// Initializes a new instance of the class. + /// + public DownloadsListResponseDownload() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Browserbase/openapi.yaml b/src/libs/Browserbase/openapi.yaml index 969ccc9..e07b930 100644 --- a/src/libs/Browserbase/openapi.yaml +++ b/src/libs/Browserbase/openapi.yaml @@ -4,7 +4,7 @@ info: description: Browserbase API for 3rd party developers version: v1 servers: - - url: "https://api.browserbase.com" + - url: https://api.browserbase.com description: Public endpoint variables: {} paths: @@ -19,11 +19,17 @@ paths: type: object properties: projectId: - description: "The Project ID. Can be found in [Settings](https://www.browserbase.com/settings). Optional - if not provided, the project will be inferred from the API key." + description: >- + The Project ID. Can be found in + [Settings](https://www.browserbase.com/settings). Optional - + if not provided, the project will be inferred from the API + key. type: string responses: - "201": - description: The request has succeeded and a new resource has been created as a result. + '201': + description: >- + The request has succeeded and a new resource has been created as a + result. content: application/json: schema: @@ -39,10 +45,16 @@ paths: description: The public key to encrypt the user-data-directory. type: string cipherAlgorithm: - description: The cipher algorithm used to encrypt the user-data-directory. AES-256-CBC is currently the only supported algorithm. + description: >- + The cipher algorithm used to encrypt the + user-data-directory. AES-256-CBC is currently the only + supported algorithm. type: string initializationVectorSize: - description: "The initialization vector size used to encrypt the user-data-directory. [Read more about how to use it](/features/contexts)." + description: >- + The initialization vector size used to encrypt the + user-data-directory. [Read more about how to use + it](/features/contexts). type: integer format: uint8 required: @@ -51,7 +63,7 @@ paths: - publicKey - cipherAlgorithm - initializationVectorSize - "/v1/contexts/{id}": + /v1/contexts/{id}: get: operationId: Contexts_get summary: Get a Context @@ -62,12 +74,12 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/Context" + $ref: '#/components/schemas/Context' put: operationId: Contexts_update summary: Update a Context @@ -78,7 +90,7 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -95,10 +107,16 @@ paths: description: The public key to encrypt the user-data-directory. type: string cipherAlgorithm: - description: The cipher algorithm used to encrypt the user-data-directory. AES-256-CBC is currently the only supported algorithm. + description: >- + The cipher algorithm used to encrypt the + user-data-directory. AES-256-CBC is currently the only + supported algorithm. type: string initializationVectorSize: - description: "The initialization vector size used to encrypt the user-data-directory. [Read more about how to use it](/features/contexts)." + description: >- + The initialization vector size used to encrypt the + user-data-directory. [Read more about how to use + it](/features/contexts). type: integer format: uint8 required: @@ -117,8 +135,206 @@ paths: schema: type: string responses: - "204": - description: "There is no content to send for this request, but the headers may be useful." + '204': + description: >- + There is no content to send for this request, but the headers may be + useful. + /v1/downloads: + get: + operationId: Downloads_list + summary: List Downloads + description: List all downloads for a session with optional filtering and pagination. + parameters: + - name: sessionId + in: query + description: Filter downloads by session ID (required). + required: true + schema: + type: string + - name: filename + in: query + description: Filter by exact filename match. + required: false + schema: + type: string + maxLength: 255 + - name: mimeType + in: query + description: Filter by MIME type. + required: false + schema: + type: string + maxLength: 255 + - name: minSize + in: query + description: Minimum file size in bytes. + required: false + schema: + type: number + minimum: 0 + - name: maxSize + in: query + description: Maximum file size in bytes. + required: false + schema: + type: number + minimum: 0 + - name: createdAfter + in: query + description: Filter downloads created on or after this timestamp. + required: false + schema: + type: string + format: date-time + - name: createdBefore + in: query + description: Filter downloads created on or before this timestamp. + required: false + schema: + type: string + format: date-time + - name: limit + in: query + description: Maximum number of results to return. + required: false + schema: + type: number + default: 20 + maximum: 100 + minimum: 1 + - name: offset + in: query + description: Number of results to skip for pagination. + required: false + schema: + type: number + default: 0 + minimum: 0 + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + type: object + properties: + downloads: + type: array + items: + type: object + properties: + id: + description: Unique identifier for the download. + type: string + sessionId: + description: The Session ID this download belongs to. + type: string + filename: + description: The filename of the downloaded file. + type: string + mimeType: + description: The MIME type of the file. + type: string + size: + description: File size in bytes. + type: number + checksum: + description: SHA256 checksum of the file. + type: string + createdAt: + description: Timestamp when the file was downloaded. + type: string + format: date-time + required: + - id + - sessionId + - filename + - mimeType + - size + - checksum + - createdAt + total: + description: Total count of matching downloads. + type: number + limit: + type: number + offset: + type: number + required: + - downloads + - total + - limit + - offset + /v1/downloads/{id}: + get: + operationId: Downloads_get + summary: Get a Download + description: >- + Get download metadata (Accept: application/json) or file content + (Accept: application/octet-stream). + parameters: + - name: id + in: path + description: The download ID. + required: true + schema: + type: string + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + type: object + properties: + id: + description: Unique identifier for the download. + type: string + sessionId: + description: The Session ID this download belongs to. + type: string + filename: + description: The filename of the downloaded file. + type: string + mimeType: + description: The MIME type of the file. + type: string + size: + description: File size in bytes. + type: number + checksum: + description: SHA256 checksum of the file. + type: string + createdAt: + description: Timestamp when the file was downloaded. + type: string + format: date-time + required: + - id + - sessionId + - filename + - mimeType + - size + - checksum + - createdAt + application/octet-stream: + schema: + type: string + format: binary + delete: + operationId: Downloads_delete + summary: Delete a Download + description: Delete a download file from storage and mark as deleted. + parameters: + - name: id + in: path + description: The download ID to delete. + required: true + schema: + type: string + responses: + '204': + description: There is no content to send for this request. /v1/extensions: post: operationId: Extensions_upload @@ -136,13 +352,13 @@ paths: required: - file responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/Extension" - "/v1/extensions/{id}": + $ref: '#/components/schemas/Extension' + /v1/extensions/{id}: get: operationId: Extensions_get summary: Get an Extension @@ -153,12 +369,12 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/Extension" + $ref: '#/components/schemas/Extension' delete: operationId: Extensions_delete summary: Delete an Extension @@ -169,13 +385,15 @@ paths: schema: type: string responses: - "204": - description: "There is no content to send for this request, but the headers may be useful." + '204': + description: >- + There is no content to send for this request, but the headers may be + useful. /v1/fetch: post: operationId: Fetch_create summary: Fetch a Page - description: "Fetch a page and return its content, headers, and metadata." + description: Fetch a page and return its content, headers, and metadata. requestBody: required: true content: @@ -202,7 +420,7 @@ paths: required: - url responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -236,7 +454,7 @@ paths: - content - contentType - encoding - "400": + '400': description: Invalid request body. content: application/json: @@ -259,7 +477,7 @@ paths: - statusCode - error - message - "429": + '429': description: Concurrent fetch request limit exceeded. content: application/json: @@ -282,8 +500,10 @@ paths: - statusCode - error - message - "502": - description: The fetched response was too large or TLS certificate verification failed. + '502': + description: >- + The fetched response was too large or TLS certificate verification + failed. content: application/json: schema: @@ -306,7 +526,7 @@ paths: - error - message - id - "504": + '504': description: The fetch request timed out. content: application/json: @@ -351,7 +571,7 @@ paths: maximum: 100 minimum: 1 responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -361,7 +581,7 @@ paths: data: type: array items: - $ref: "#/components/schemas/Function" + $ref: '#/components/schemas/Function' total: type: integer minimum: 0 @@ -394,7 +614,7 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -404,14 +624,14 @@ paths: data: type: array items: - $ref: "#/components/schemas/FunctionBuild" + $ref: '#/components/schemas/FunctionBuild' total: type: integer minimum: 0 required: - data - total - "/v1/functions/builds/{id}": + /v1/functions/builds/{id}: get: operationId: FunctionBuilds_get summary: Get a Function Build @@ -423,13 +643,13 @@ paths: type: string format: uuid responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/FunctionBuild" - "/v1/functions/builds/{id}/logs": + $ref: '#/components/schemas/FunctionBuild' + /v1/functions/builds/{id}/logs: get: operationId: FunctionBuilds_getLogs summary: Get Function Build Logs @@ -441,7 +661,7 @@ paths: type: string format: uuid responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -451,13 +671,13 @@ paths: logs: type: array items: - $ref: "#/components/schemas/FunctionBuildLog" + $ref: '#/components/schemas/FunctionBuildLog' total: type: number required: - logs - total - "/v1/functions/invocations/{id}": + /v1/functions/invocations/{id}: get: operationId: Invocations_get summary: Get an Invocation @@ -469,13 +689,13 @@ paths: type: string format: uuid responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: allOf: - - $ref: "#/components/schemas/Invocation" + - $ref: '#/components/schemas/Invocation' - type: object properties: cause: @@ -492,7 +712,7 @@ paths: minLength: 1 required: - code - "/v1/functions/invocations/{id}/logs": + /v1/functions/invocations/{id}/logs: get: operationId: Invocations_getLogs summary: Get Invocation Logs @@ -504,7 +724,7 @@ paths: type: string format: uuid responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -514,13 +734,13 @@ paths: logs: type: array items: - $ref: "#/components/schemas/InvocationLog" + $ref: '#/components/schemas/InvocationLog' total: type: number required: - logs - total - "/v1/functions/versions/{id}": + /v1/functions/versions/{id}: get: operationId: FunctionVersions_get summary: Get a Function Version @@ -532,13 +752,13 @@ paths: type: string format: uuid responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/FunctionVersion" - "/v1/functions/versions/{id}/invocations": + $ref: '#/components/schemas/FunctionVersion' + /v1/functions/versions/{id}/invocations: get: operationId: FunctionVersions_listInvocations summary: List Invocations for a Function Version @@ -570,7 +790,7 @@ paths: type: string format: uuid responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -580,14 +800,14 @@ paths: results: type: array items: - $ref: "#/components/schemas/Invocation" + $ref: '#/components/schemas/Invocation' total: type: integer minimum: 0 required: - results - total - "/v1/functions/{id}": + /v1/functions/{id}: get: operationId: Functions_get summary: Get a Function @@ -599,13 +819,13 @@ paths: type: string format: uuid responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/Function" - "/v1/functions/{id}/invoke": + $ref: '#/components/schemas/Function' + /v1/functions/{id}/invoke: post: operationId: Functions_invoke summary: Invoke a Function @@ -631,7 +851,9 @@ paths: type: object properties: extensionId: - description: "The uploaded Extension ID. See [Upload Extension](/reference/api/upload-an-extension)." + description: >- + The uploaded Extension ID. See [Upload + Extension](/reference/api/upload-an-extension). type: string browserSettings: type: object @@ -643,12 +865,16 @@ paths: description: The Context ID. type: string persist: - description: Whether or not to persist the context after browsing. Defaults to `false`. + description: >- + Whether or not to persist the context after + browsing. Defaults to `false`. type: boolean required: - id extensionId: - description: "The uploaded Extension ID. See [Upload Extension](/reference/api/upload-an-extension)." + description: >- + The uploaded Extension ID. See [Upload + Extension](/reference/api/upload-an-extension). type: string viewport: type: object @@ -660,16 +886,24 @@ paths: description: The height of the browser. type: integer blockAds: - description: Enable or disable ad blocking in the browser. Defaults to `false`. + description: >- + Enable or disable ad blocking in the browser. + Defaults to `false`. type: boolean solveCaptchas: - description: Enable or disable captcha solving in the browser. Defaults to `true`. + description: >- + Enable or disable captcha solving in the browser. + Defaults to `true`. type: boolean recordSession: - description: Enable or disable session recording. Defaults to `true`. + description: >- + Enable or disable session recording. Defaults to + `true`. type: boolean logSession: - description: Enable or disable session logging. Defaults to `true`. + description: >- + Enable or disable session logging. Defaults to + `true`. type: boolean advancedStealth: description: Advanced Browser Stealth Mode @@ -678,13 +912,21 @@ paths: description: Verified Browser Mode type: boolean captchaImageSelector: - description: "Custom selector for captcha image. See [Custom Captcha Solving](/features/stealth-mode#custom-captcha-solving)" + description: >- + Custom selector for captcha image. See [Custom + Captcha + Solving](/features/stealth-mode#custom-captcha-solving) type: string captchaInputSelector: - description: "Custom selector for captcha input. See [Custom Captcha Solving](/features/stealth-mode#custom-captcha-solving)" + description: >- + Custom selector for captcha input. See [Custom + Captcha + Solving](/features/stealth-mode#custom-captcha-solving) type: string os: - description: "Operating system for stealth mode. Valid values: windows, mac, linux, mobile, tablet" + description: >- + Operating system for stealth mode. Valid values: + windows, mac, linux, mobile, tablet type: string enum: - windows @@ -693,7 +935,7 @@ paths: - mobile - tablet size: - description: "[NOT IN DOCS] Resource size of the browser." + description: '[NOT IN DOCS] Resource size of the browser.' type: string default: small enum: @@ -701,13 +943,21 @@ paths: - medium - large enableNativeSelectPolyfill: - description: "[NOT IN DOCS] Enable native select polyfill. This gives support a break-glass option to disable the polyfill." + description: >- + [NOT IN DOCS] Enable native select polyfill. This + gives support a break-glass option to disable the + polyfill. type: boolean enablePdfViewer: - description: "[NOT IN DOCS] Enable PDF viewer. This gives support a break-glass option to enable the viewer when users want to view PDFs in-browser." + description: >- + [NOT IN DOCS] Enable PDF viewer. This gives support + a break-glass option to enable the viewer when users + want to view PDFs in-browser. type: boolean extensions: - description: "[NOT IN DOCS] List of pre-installed extension names and custom extension ids to enable on the browser" + description: >- + [NOT IN DOCS] List of pre-installed extension names + and custom extension ids to enable on the browser type: array items: type: string @@ -716,53 +966,68 @@ paths: - browser-events default: [] allowedDomains: - description: "An optional list of allowed domains for the session. If provided, navigation will be restricted to these domains." + description: >- + An optional list of allowed domains for the session. + If provided, navigation will be restricted to these + domains. type: array items: type: string default: [] timeout: - description: Duration in seconds after which the session will automatically end. Defaults to the Project's `defaultTimeout`. + description: >- + Duration in seconds after which the session will + automatically end. Defaults to the Project's + `defaultTimeout`. type: integer maximum: 21600 minimum: 60 proxies: - description: "Proxy configuration. Can be true for default proxy, or an array of proxy configurations." + description: >- + Proxy configuration. Can be true for default proxy, or + an array of proxy configurations. anyOf: - type: array items: anyOf: - - $ref: "#/components/schemas/BrowserbaseProxyConfig" - - $ref: "#/components/schemas/ExternalProxyConfig" - - $ref: "#/components/schemas/NoneProxyConfig" + - $ref: '#/components/schemas/BrowserbaseProxyConfig' + - $ref: '#/components/schemas/ExternalProxyConfig' + - $ref: '#/components/schemas/NoneProxyConfig' - type: boolean proxySettings: - description: "[NOT IN DOCS] Supplementary proxy settings. Optional." + description: '[NOT IN DOCS] Supplementary proxy settings. Optional.' type: object properties: caCertificates: - description: "[NOT IN DOCS] The TLS certificate IDs to trust. Optional." + description: >- + [NOT IN DOCS] The TLS certificate IDs to trust. + Optional. type: array items: format: uuid - description: "[NOT IN DOCS] The TLS certificate ID to trust." + description: '[NOT IN DOCS] The TLS certificate ID to trust.' type: string default: [] required: - caCertificates userMetadata: - description: "Arbitrary user metadata to attach to the session. To learn more about user metadata, see [User Metadata](/platform/browser/core-features/session-metadata)." + description: >- + Arbitrary user metadata to attach to the session. To + learn more about user metadata, see [User + Metadata](/platform/browser/core-features/session-metadata). type: object additionalProperties: true properties: {} responses: - "202": - description: "The request has been accepted for processing, but processing has not yet completed." + '202': + description: >- + The request has been accepted for processing, but processing has not + yet completed. content: application/json: schema: - $ref: "#/components/schemas/Invocation" - "/v1/functions/{id}/versions": + $ref: '#/components/schemas/Invocation' + /v1/functions/{id}/versions: get: operationId: Functions_listVersions summary: List Function Versions @@ -789,7 +1054,7 @@ paths: type: string format: uuid responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -799,7 +1064,7 @@ paths: results: type: array items: - $ref: "#/components/schemas/FunctionVersion" + $ref: '#/components/schemas/FunctionVersion' total: type: integer minimum: 0 @@ -811,15 +1076,15 @@ paths: operationId: Projects_list summary: List Projects responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: type: array items: - $ref: "#/components/schemas/Project" - "/v1/projects/{id}": + $ref: '#/components/schemas/Project' + /v1/projects/{id}: get: operationId: Projects_get summary: Get a Project @@ -830,13 +1095,13 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/Project" - "/v1/projects/{id}/usage": + $ref: '#/components/schemas/Project' + /v1/projects/{id}/usage: get: operationId: Projects_usage summary: Get Project Usage @@ -847,12 +1112,12 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/ProjectUsage" + $ref: '#/components/schemas/ProjectUsage' /v1/search: post: operationId: Search_web @@ -879,7 +1144,7 @@ paths: required: - query responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -946,19 +1211,22 @@ paths: - COMPLETED - name: q in: query - description: "Query sessions by user metadata. See [Querying Sessions by User Metadata](/platform/browser/core-features/session-metadata#query-sessions-by-metadata) for the schema of this query." + description: >- + Query sessions by user metadata. See [Querying Sessions by User + Metadata](/platform/browser/core-features/session-metadata#query-sessions-by-metadata) + for the schema of this query. required: false schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: type: array items: - $ref: "#/components/schemas/Session" + $ref: '#/components/schemas/Session' post: operationId: Sessions_create summary: Create a Session @@ -969,10 +1237,16 @@ paths: type: object properties: projectId: - description: "The Project ID. Can be found in [Settings](https://www.browserbase.com/settings). Optional - if not provided, the project will be inferred from the API key." + description: >- + The Project ID. Can be found in + [Settings](https://www.browserbase.com/settings). Optional - + if not provided, the project will be inferred from the API + key. type: string extensionId: - description: "The uploaded Extension ID. See [Upload Extension](/reference/api/upload-an-extension)." + description: >- + The uploaded Extension ID. See [Upload + Extension](/reference/api/upload-an-extension). type: string browserSettings: type: object @@ -984,12 +1258,16 @@ paths: description: The Context ID. type: string persist: - description: Whether or not to persist the context after browsing. Defaults to `false`. + description: >- + Whether or not to persist the context after + browsing. Defaults to `false`. type: boolean required: - id extensionId: - description: "The uploaded Extension ID. See [Upload Extension](/reference/api/upload-an-extension)." + description: >- + The uploaded Extension ID. See [Upload + Extension](/reference/api/upload-an-extension). type: string viewport: type: object @@ -1001,10 +1279,14 @@ paths: description: The height of the browser. type: integer blockAds: - description: Enable or disable ad blocking in the browser. Defaults to `false`. + description: >- + Enable or disable ad blocking in the browser. Defaults + to `false`. type: boolean solveCaptchas: - description: Enable or disable captcha solving in the browser. Defaults to `true`. + description: >- + Enable or disable captcha solving in the browser. + Defaults to `true`. type: boolean recordSession: description: Enable or disable session recording. Defaults to `true`. @@ -1019,13 +1301,19 @@ paths: description: Verified Browser Mode type: boolean captchaImageSelector: - description: "Custom selector for captcha image. See [Custom Captcha Solving](/features/stealth-mode#custom-captcha-solving)" + description: >- + Custom selector for captcha image. See [Custom Captcha + Solving](/features/stealth-mode#custom-captcha-solving) type: string captchaInputSelector: - description: "Custom selector for captcha input. See [Custom Captcha Solving](/features/stealth-mode#custom-captcha-solving)" + description: >- + Custom selector for captcha input. See [Custom Captcha + Solving](/features/stealth-mode#custom-captcha-solving) type: string os: - description: "Operating system for stealth mode. Valid values: windows, mac, linux, mobile, tablet" + description: >- + Operating system for stealth mode. Valid values: + windows, mac, linux, mobile, tablet type: string enum: - windows @@ -1034,22 +1322,29 @@ paths: - mobile - tablet timeout: - description: Duration in seconds after which the session will automatically end. Defaults to the Project's `defaultTimeout`. + description: >- + Duration in seconds after which the session will + automatically end. Defaults to the Project's + `defaultTimeout`. type: integer maximum: 21600 minimum: 60 keepAlive: - description: Set to true to keep the session alive even after disconnections. Available on the Hobby Plan and above. + description: >- + Set to true to keep the session alive even after + disconnections. Available on the Hobby Plan and above. type: boolean proxies: - description: "Proxy configuration. Can be true for default proxy, or an array of proxy configurations." + description: >- + Proxy configuration. Can be true for default proxy, or an + array of proxy configurations. anyOf: - type: array items: anyOf: - - $ref: "#/components/schemas/BrowserbaseProxyConfig" - - $ref: "#/components/schemas/ExternalProxyConfig" - - $ref: "#/components/schemas/NoneProxyConfig" + - $ref: '#/components/schemas/BrowserbaseProxyConfig' + - $ref: '#/components/schemas/ExternalProxyConfig' + - $ref: '#/components/schemas/NoneProxyConfig' - type: boolean region: description: The region where the Session should run. @@ -1061,18 +1356,23 @@ paths: - eu-central-1 - ap-southeast-1 userMetadata: - description: "Arbitrary user metadata to attach to the session. To learn more about user metadata, see [User Metadata](/platform/browser/core-features/session-metadata)." + description: >- + Arbitrary user metadata to attach to the session. To learn + more about user metadata, see [User + Metadata](/platform/browser/core-features/session-metadata). type: object additionalProperties: true properties: {} responses: - "201": - description: The request has succeeded and a new resource has been created as a result. + '201': + description: >- + The request has succeeded and a new resource has been created as a + result. content: application/json: schema: allOf: - - $ref: "#/components/schemas/Session" + - $ref: '#/components/schemas/Session' - type: object properties: connectUrl: @@ -1084,7 +1384,9 @@ paths: type: string format: uri signingKey: - description: Signing key to use when connecting to the Session via HTTP. + description: >- + Signing key to use when connecting to the Session via + HTTP. type: string required: - connectUrl @@ -1109,15 +1411,21 @@ paths: body: JSON.stringify({}) }) - lang: Python - source: |- + source: >- import requests + url = "https://api.browserbase.com/v1/sessions" + payload = {} + headers = { "X-BB-API-Key": "", "Content-Type": "application/json" } - response = requests.request("POST", url, json=payload, headers=headers) + + response = requests.request("POST", url, json=payload, + headers=headers) + print(response.text) - lang: PHP source: |- @@ -1148,13 +1456,14 @@ paths: - lang: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browserbase.com/v1/sessions\"\n\n\tpayload := strings.NewReader(\"{}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"X-BB-API-Key\", \"\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}" - lang: Java - source: |- - HttpResponse response = Unirest.post("https://api.browserbase.com/v1/sessions") + source: >- + HttpResponse response = + Unirest.post("https://api.browserbase.com/v1/sessions") .header("X-BB-API-Key", "") .header("Content-Type", "application/json") .body("{}") .asString(); - "/v1/sessions/{id}": + /v1/sessions/{id}: get: operationId: Sessions_get summary: Get a Session @@ -1165,13 +1474,13 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: allOf: - - $ref: "#/components/schemas/Session" + - $ref: '#/components/schemas/Session' - type: object properties: connectUrl: @@ -1183,7 +1492,9 @@ paths: type: string format: uri signingKey: - description: Signing key to use when connecting to the Session via HTTP. + description: >- + Signing key to use when connecting to the Session via + HTTP. type: string post: operationId: Sessions_update @@ -1202,23 +1513,30 @@ paths: type: object properties: projectId: - description: "The Project ID. Can be found in [Settings](https://www.browserbase.com/settings). Optional - if not provided, the project will be inferred from the API key." + description: >- + The Project ID. Can be found in + [Settings](https://www.browserbase.com/settings). Optional - + if not provided, the project will be inferred from the API + key. type: string status: - description: Set to `REQUEST_RELEASE` to request that the session complete. Use before session's timeout to avoid additional charges. + description: >- + Set to `REQUEST_RELEASE` to request that the session + complete. Use before session's timeout to avoid additional + charges. type: string enum: - REQUEST_RELEASE required: - status responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/Session" - "/v1/sessions/{id}/debug": + $ref: '#/components/schemas/Session' + /v1/sessions/{id}/debug: get: operationId: Sessions_getDebug summary: Session Live URLs @@ -1229,13 +1547,13 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/SessionLiveUrls" - "/v1/sessions/{id}/downloads": + $ref: '#/components/schemas/SessionLiveUrls' + /v1/sessions/{id}/downloads: get: operationId: Sessions_getDownloads summary: Session Downloads @@ -1246,7 +1564,7 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/zip: @@ -1263,9 +1581,11 @@ paths: schema: type: string responses: - "204": - description: "There is no content to send for this request, but the headers may be useful." - "/v1/sessions/{id}/logs": + '204': + description: >- + There is no content to send for this request, but the headers may be + useful. + /v1/sessions/{id}/logs: get: operationId: Sessions_getLogs summary: Session Logs @@ -1276,15 +1596,15 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: type: array items: - $ref: "#/components/schemas/SessionLog" - "/v1/sessions/{id}/recording": + $ref: '#/components/schemas/SessionLog' + /v1/sessions/{id}/recording: get: operationId: Sessions_getRecording summary: Session Replay @@ -1305,15 +1625,15 @@ paths: schema: type: string responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: type: array items: - $ref: "#/components/schemas/SessionReplay" - "/v1/sessions/{id}/uploads": + $ref: '#/components/schemas/SessionReplay' + /v1/sessions/{id}/uploads: post: operationId: Sessions_uploadFile summary: Create Session Uploads @@ -1336,7 +1656,7 @@ paths: required: - file responses: - "200": + '200': description: The request has succeeded. content: application/json: @@ -1353,7 +1673,9 @@ components: type: object properties: type: - description: Type of proxy. Always use 'browserbase' for the Browserbase managed proxy network. + description: >- + Type of proxy. Always use 'browserbase' for the Browserbase managed + proxy network. type: string enum: - browserbase @@ -1362,10 +1684,14 @@ components: type: object properties: city: - description: Name of the city. Use spaces for multi-word city names. Optional. + description: >- + Name of the city. Use spaces for multi-word city names. + Optional. type: string state: - description: US state code (2 characters). Must also specify US as the country. Optional. + description: >- + US state code (2 characters). Must also specify US as the + country. Optional. type: string maxLength: 2 minLength: 2 @@ -1377,7 +1703,9 @@ components: required: - country domainPattern: - description: "Domain pattern for which this proxy should be used. If omitted, defaults to all domains. Optional." + description: >- + Domain pattern for which this proxy should be used. If omitted, + defaults to all domains. Optional. type: string required: - type @@ -1435,7 +1763,9 @@ components: description: Server URL for external proxy. Required. type: string domainPattern: - description: "Domain pattern for which this proxy should be used. If omitted, defaults to all domains. Optional." + description: >- + Domain pattern for which this proxy should be used. If omitted, + defaults to all domains. Optional. type: string username: description: Username for external proxy authentication. Optional. @@ -1518,11 +1848,11 @@ components: type: array items: allOf: - - $ref: "#/components/schemas/Function" + - $ref: '#/components/schemas/Function' - type: object properties: createdVersion: - $ref: "#/components/schemas/FunctionVersion" + $ref: '#/components/schemas/FunctionVersion' required: - createdVersion cause: @@ -1681,7 +2011,9 @@ components: enum: - none domainPattern: - description: "Domain pattern for which this proxy should be used. If omitted, defaults to all domains. Optional." + description: >- + Domain pattern for which this proxy should be used. If omitted, + defaults to all domains. Optional. type: string required: - type @@ -1706,7 +2038,9 @@ components: maximum: 21600 minimum: 60 concurrency: - description: The maximum number of sessions that this project can run concurrently. + description: >- + The maximum number of sessions that this project can run + concurrently. type: integer minimum: 1 required: @@ -1761,10 +2095,14 @@ components: - TIMED_OUT - COMPLETED proxyBytes: - description: "Bytes used via the [Proxy](/features/stealth-mode#proxies-and-residential-ips)" + description: >- + Bytes used via the + [Proxy](/features/stealth-mode#proxies-and-residential-ips) type: integer keepAlive: - description: Indicates if the Session was created to be kept alive upon disconnections + description: >- + Indicates if the Session was created to be kept alive upon + disconnections type: boolean contextId: description: Optional. The Context linked to the Session. @@ -1778,7 +2116,10 @@ components: - eu-central-1 - ap-southeast-1 userMetadata: - description: "Arbitrary user metadata to attach to the session. To learn more about user metadata, see [User Metadata](/platform/browser/core-features/session-metadata)." + description: >- + Arbitrary user metadata to attach to the session. To learn more + about user metadata, see [User + Metadata](/platform/browser/core-features/session-metadata). type: object additionalProperties: true properties: {} @@ -1890,10 +2231,14 @@ components: - sessionId SessionReplay: type: object - description: "Deprecated: rrweb-based session recording data. Contact support@browserbase.com if you need to use this." + description: >- + Deprecated: rrweb-based session recording data. Contact + support@browserbase.com if you need to use this. properties: data: - description: "Deprecated. See [rrweb documentation](https://github.com/rrweb-io/rrweb/blob/master/docs/recipes/dive-into-event.md)." + description: >- + Deprecated. See [rrweb + documentation](https://github.com/rrweb-io/rrweb/blob/master/docs/recipes/dive-into-event.md). type: object additionalProperties: true properties: {} @@ -1914,7 +2259,7 @@ components: type: apiKey in: header name: X-BB-API-Key - description: "Your [Browserbase API Key](https://www.browserbase.com/settings)." + description: Your [Browserbase API Key](https://www.browserbase.com/settings). tags: [] security: - BrowserbaseAuth: []