From 42041ea697fb3c465cd2f84a0e64f7a280953598 Mon Sep 17 00:00:00 2001 From: Lucas Giordano Date: Wed, 11 Feb 2026 16:16:01 +0100 Subject: [PATCH] add webbot auth --- internal/api/client.gen.go | 9 +++++++++ internal/cmd/sessionstart_flags.gen.go | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/internal/api/client.gen.go b/internal/api/client.gen.go index 3be4205..0a1922a 100644 --- a/internal/api/client.gen.go +++ b/internal/api/client.gen.go @@ -632,6 +632,9 @@ type ApiSessionStartRequest struct { // ViewportWidth The width of the viewport ViewportWidth *int `json:"viewport_width"` + + // WebBotAuth Whether to use web bot authentication. + WebBotAuth *bool `json:"web_bot_auth,omitempty"` } // ApiSessionStartRequestBrowserType The browser type to use. Can be chromium, chrome or firefox. @@ -1462,6 +1465,9 @@ type GlobalScrapeRequest struct { // ViewportWidth The width of the viewport ViewportWidth *int `json:"viewport_width"` + + // WebBotAuth Whether to use web bot authentication. + WebBotAuth *bool `json:"web_bot_auth,omitempty"` } // GlobalScrapeRequestBrowserType The browser type to use. Can be chromium, chrome or firefox. @@ -2264,6 +2270,9 @@ type SessionResponse struct { // ViewportWidth The width of the viewport ViewportWidth *int `json:"viewport_width"` + + // WebBotAuth Whether to use web bot authentication. + WebBotAuth *bool `json:"web_bot_auth,omitempty"` } // SessionResponseBrowserType defines model for SessionResponse.BrowserType. diff --git a/internal/cmd/sessionstart_flags.gen.go b/internal/cmd/sessionstart_flags.gen.go index fe54c18..258fd62 100644 --- a/internal/cmd/sessionstart_flags.gen.go +++ b/internal/cmd/sessionstart_flags.gen.go @@ -50,6 +50,9 @@ var ( // The width of the viewport SessionStartViewportWidth int + + // Whether to use web bot authentication. + SessionStartWebBotAuth bool ) // RegisterSessionStartFlags registers all flags for SessionStart command @@ -69,6 +72,7 @@ func RegisterSessionStartFlags(cmd *cobra.Command) { cmd.Flags().StringVar(&SessionStartUserAgent, "user-agent", "", "The user agent to use for the session") cmd.Flags().IntVar(&SessionStartViewportHeight, "viewport-height", 0, "The height of the viewport") cmd.Flags().IntVar(&SessionStartViewportWidth, "viewport-width", 0, "The width of the viewport") + cmd.Flags().BoolVar(&SessionStartWebBotAuth, "web-bot-auth", false, "Whether to use web bot authentication.") } // BuildSessionStartRequest builds the API request from CLI flags @@ -141,5 +145,9 @@ func BuildSessionStartRequest(cmd *cobra.Command) (*api.ApiSessionStartRequest, body.ViewportWidth = &SessionStartViewportWidth } + if cmd.Flags().Changed("web-bot-auth") { + body.WebBotAuth = &SessionStartWebBotAuth + } + return body, nil }