diff --git a/lib/Commands.ml b/lib/Commands.ml index fcef92c..50e54a5 100644 --- a/lib/Commands.ml +++ b/lib/Commands.ml @@ -13278,6 +13278,73 @@ if the content does not specify one. |desc}] {desc|Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the respective variables to be undefined, even if previously overridden. |desc}] + module SetVirtualKeyboardGeometryOverride = struct + module Response : sig + type result = Types.assoc + type error = { code : int; message : string } + + type t = { + id : int; + error : error option; + sessionId : Types.Target.SessionID.t option; + result : result option; + } + + val parse : string -> t + end = struct + type result = Types.assoc [@@deriving yojson] + type error = { code : int; message : string } [@@deriving yojson] + + type t = { + id : int; + error : error option; [@yojson.option] + sessionId : Types.Target.SessionID.t option; [@yojson.option] + result : result option; [@yojson.option] + } + [@@deriving yojson] + + let parse response = response |> Yojson.Safe.from_string |> t_of_yojson + end + + module Params = struct + type t = { + keyboardRect : Types.DOM.Rect.t option; + [@key "keyboardRect"] + [@yojson.option] + [@ocaml.doc "No description provided"] + } + [@@deriving yojson] + + let make ?keyboardRect () = { keyboardRect } + end + + module Request = struct + type t = { + id : int; + sessionId : Types.Target.SessionID.t option; [@yojson.option] + method_ : string; [@key "method"] + params : Params.t; + } + [@@deriving yojson] + + let make ?sessionId ~params id = + { + id; + method_ = "Emulation.setVirtualKeyboardGeometryOverride"; + sessionId; + params; + } + |> yojson_of_t |> Yojson.Safe.to_string + end + end + [@@ocaml.doc + {desc|Overrides virtual keyboard geometry in CSS pixels, relative to the top-level viewport. The +provided rect is used for navigator.virtualKeyboard.boundingRect, geometrychange events, and +env(keyboard-inset-*) values on the inspected frame. The override applies independently of +navigator.virtualKeyboard.overlaysContent so clients can preview overlay geometry without +mutating page state. Values are rounded to the nearest CSS pixel. Omitting the rect clears the +override. |desc}] + module SetDeviceMetricsOverride = struct module Response : sig type result = Types.assoc @@ -21551,106 +21618,6 @@ collected since browser process startup. |desc}] end module Network = struct - module SetAcceptedEncodings = struct - module Response : sig - type result = Types.assoc - type error = { code : int; message : string } - - type t = { - id : int; - error : error option; - sessionId : Types.Target.SessionID.t option; - result : result option; - } - - val parse : string -> t - end = struct - type result = Types.assoc [@@deriving yojson] - type error = { code : int; message : string } [@@deriving yojson] - - type t = { - id : int; - error : error option; [@yojson.option] - sessionId : Types.Target.SessionID.t option; [@yojson.option] - result : result option; [@yojson.option] - } - [@@deriving yojson] - - let parse response = response |> Yojson.Safe.from_string |> t_of_yojson - end - - module Params = struct - type t = { - encodings : Types.Network.ContentEncoding.t list; - [@key "encodings"] - [@ocaml.doc "List of accepted content encodings."] - } - [@@deriving yojson] - - let make ~encodings () = { encodings } - end - - module Request = struct - type t = { - id : int; - sessionId : Types.Target.SessionID.t option; [@yojson.option] - method_ : string; [@key "method"] - params : Params.t; - } - [@@deriving yojson] - - let make ?sessionId ~params id = - { id; method_ = "Network.setAcceptedEncodings"; sessionId; params } - |> yojson_of_t |> Yojson.Safe.to_string - end - end - [@@ocaml.doc - {desc|Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted. |desc}] - - module ClearAcceptedEncodingsOverride = struct - module Response : sig - type result = Types.assoc - type error = { code : int; message : string } - - type t = { - id : int; - error : error option; - sessionId : Types.Target.SessionID.t option; - result : result option; - } - - val parse : string -> t - end = struct - type result = Types.assoc [@@deriving yojson] - type error = { code : int; message : string } [@@deriving yojson] - - type t = { - id : int; - error : error option; [@yojson.option] - sessionId : Types.Target.SessionID.t option; [@yojson.option] - result : result option; [@yojson.option] - } - [@@deriving yojson] - - let parse response = response |> Yojson.Safe.from_string |> t_of_yojson - end - - module Request = struct - type t = { - id : int; - sessionId : Types.Target.SessionID.t option; [@yojson.option] - method_ : string; [@key "method"] - } - [@@deriving yojson] - - let make ?sessionId id = - { id; method_ = "Network.clearAcceptedEncodingsOverride"; sessionId } - |> yojson_of_t |> Yojson.Safe.to_string - end - end - [@@ocaml.doc - {desc|Clears accepted encodings set by setAcceptedEncodings |desc}] - module CanClearBrowserCache = struct module Response : sig type result = { @@ -40060,13 +40027,7 @@ or caught exceptions, no exceptions. Initial pause on exceptions state is `none` end end [@@ocaml.doc - {desc|Edits JavaScript source live. - -In general, functions that are currently on the stack can not be edited with -a single exception: If the edited function is the top-most stack frame and -that is the only activation of that function on the stack. In this case -the live edit will be successful and a `Debugger.restartFrame` for the -top-most function is automatically triggered. |desc}] + {desc|Live edit is no longer supported and this command always fails with a "no longer available" error. |desc}] module SetSkipAllPauses = struct module Response : sig diff --git a/lib/Types.ml b/lib/Types.ml index 0cbaf78..3b2d219 100644 --- a/lib/Types.ml +++ b/lib/Types.ml @@ -2290,7 +2290,10 @@ and Audits : sig | `ItemNotInnerList | `InvalidAllowlistItemType | `ReportingEndpointNotToken - | `InvalidUrlPattern ] + | `InvalidUrlPattern + | `IFrameAttributeLoosensEmbeddingRequirement + | `InvalidAllowConnectionAllowlistFrom + | `EmbeddingRequirementNotSatisfied ] val _connectionallowlisterror_of_yojson : Yojson.Basic.t -> _connectionallowlisterror @@ -4733,7 +4736,10 @@ end = struct | `ItemNotInnerList | `InvalidAllowlistItemType | `ReportingEndpointNotToken - | `InvalidUrlPattern ] + | `InvalidUrlPattern + | `IFrameAttributeLoosensEmbeddingRequirement + | `InvalidAllowConnectionAllowlistFrom + | `EmbeddingRequirementNotSatisfied ] val _connectionallowlisterror_of_yojson : Yojson.Basic.t -> _connectionallowlisterror @@ -4750,7 +4756,10 @@ end = struct | `ItemNotInnerList | `InvalidAllowlistItemType | `ReportingEndpointNotToken - | `InvalidUrlPattern ] + | `InvalidUrlPattern + | `IFrameAttributeLoosensEmbeddingRequirement + | `InvalidAllowConnectionAllowlistFrom + | `EmbeddingRequirementNotSatisfied ] let _connectionallowlisterror_of_yojson = function | `String "InvalidHeader" -> `InvalidHeader @@ -4759,6 +4768,12 @@ end = struct | `String "InvalidAllowlistItemType" -> `InvalidAllowlistItemType | `String "ReportingEndpointNotToken" -> `ReportingEndpointNotToken | `String "InvalidUrlPattern" -> `InvalidUrlPattern + | `String "IFrameAttributeLoosensEmbeddingRequirement" -> + `IFrameAttributeLoosensEmbeddingRequirement + | `String "InvalidAllowConnectionAllowlistFrom" -> + `InvalidAllowConnectionAllowlistFrom + | `String "EmbeddingRequirementNotSatisfied" -> + `EmbeddingRequirementNotSatisfied | `String s -> failwith ("unknown enum: " ^ s) | _ -> failwith "unknown enum type" @@ -4769,6 +4784,12 @@ end = struct | `InvalidAllowlistItemType -> `String "InvalidAllowlistItemType" | `ReportingEndpointNotToken -> `String "ReportingEndpointNotToken" | `InvalidUrlPattern -> `String "InvalidUrlPattern" + | `IFrameAttributeLoosensEmbeddingRequirement -> + `String "IFrameAttributeLoosensEmbeddingRequirement" + | `InvalidAllowConnectionAllowlistFrom -> + `String "InvalidAllowConnectionAllowlistFrom" + | `EmbeddingRequirementNotSatisfied -> + `String "EmbeddingRequirementNotSatisfied" type t = _connectionallowlisterror [@@deriving yojson] [@@ocaml.doc "No description provided"] @@ -20717,17 +20738,6 @@ and Network : sig [@@ocaml.doc "Information about a signed exchange response."] end - and ContentEncoding : sig - type _contentencoding = [ `deflate | `gzip | `br | `zstd ] - - val _contentencoding_of_yojson : Yojson.Basic.t -> _contentencoding - val yojson_of__contentencoding : _contentencoding -> Yojson.Basic.t - - type t = _contentencoding - [@@deriving yojson] - [@@ocaml.doc "List of content encodings supported by the backend."] - end - and NetworkConditions : sig type t = { urlPattern : string; @@ -24698,37 +24708,6 @@ end = struct [@@ocaml.doc "Information about a signed exchange response."] end - and ContentEncoding : sig - type _contentencoding = [ `deflate | `gzip | `br | `zstd ] - - val _contentencoding_of_yojson : Yojson.Basic.t -> _contentencoding - val yojson_of__contentencoding : _contentencoding -> Yojson.Basic.t - - type t = _contentencoding - [@@deriving yojson] - [@@ocaml.doc "List of content encodings supported by the backend."] - end = struct - type _contentencoding = [ `deflate | `gzip | `br | `zstd ] - - let _contentencoding_of_yojson = function - | `String "deflate" -> `deflate - | `String "gzip" -> `gzip - | `String "br" -> `br - | `String "zstd" -> `zstd - | `String s -> failwith ("unknown enum: " ^ s) - | _ -> failwith "unknown enum type" - - let yojson_of__contentencoding = function - | `deflate -> `String "deflate" - | `gzip -> `String "gzip" - | `br -> `String "br" - | `zstd -> `String "zstd" - - type t = _contentencoding - [@@deriving yojson] - [@@ocaml.doc "List of content encodings supported by the backend."] - end - and NetworkConditions : sig type t = { urlPattern : string; @@ -29788,6 +29767,7 @@ and Page : sig | `EmbedderExtensionMessagingForOpenPort | `EmbedderExtensionSentMessageToCachedFrame | `EmbedderExtensionFrame + | `EmbedderPrivilegedWebContents | `RequestedByWebViewClient | `PostMessageByWebViewClient | `CacheControlNoStoreDeviceBoundSessionTerminated @@ -32399,6 +32379,7 @@ end = struct | `EmbedderExtensionMessagingForOpenPort | `EmbedderExtensionSentMessageToCachedFrame | `EmbedderExtensionFrame + | `EmbedderPrivilegedWebContents | `RequestedByWebViewClient | `PostMessageByWebViewClient | `CacheControlNoStoreDeviceBoundSessionTerminated @@ -32559,6 +32540,7 @@ end = struct | `EmbedderExtensionMessagingForOpenPort | `EmbedderExtensionSentMessageToCachedFrame | `EmbedderExtensionFrame + | `EmbedderPrivilegedWebContents | `RequestedByWebViewClient | `PostMessageByWebViewClient | `CacheControlNoStoreDeviceBoundSessionTerminated @@ -32753,6 +32735,8 @@ end = struct | `String "EmbedderExtensionSentMessageToCachedFrame" -> `EmbedderExtensionSentMessageToCachedFrame | `String "EmbedderExtensionFrame" -> `EmbedderExtensionFrame + | `String "EmbedderPrivilegedWebContents" -> + `EmbedderPrivilegedWebContents | `String "RequestedByWebViewClient" -> `RequestedByWebViewClient | `String "PostMessageByWebViewClient" -> `PostMessageByWebViewClient | `String "CacheControlNoStoreDeviceBoundSessionTerminated" -> @@ -32952,6 +32936,8 @@ end = struct | `EmbedderExtensionSentMessageToCachedFrame -> `String "EmbedderExtensionSentMessageToCachedFrame" | `EmbedderExtensionFrame -> `String "EmbedderExtensionFrame" + | `EmbedderPrivilegedWebContents -> + `String "EmbedderPrivilegedWebContents" | `RequestedByWebViewClient -> `String "RequestedByWebViewClient" | `PostMessageByWebViewClient -> `String "PostMessageByWebViewClient" | `CacheControlNoStoreDeviceBoundSessionTerminated -> diff --git a/package.json b/package.json index f301f93..b4780b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cdp", - "version": "0.0.1676914", + "version": "0.0.1677763", "description": "Chrome Devtools Protocol Types for OCaml", "license": "MIT", "repository": {