module Selenium
  module WebDriver
    class DevTools
      class NetworkInterceptor
        @devtools: untyped

        @lock: untyped

        @pending_response_requests: untyped

        @cancelled_requests: untyped

        CANNOT_GET_BODY_ON_REDIRECT_ERROR_CODE: String

        INVALID_INTERCEPTION_ID_ERROR_CODE: String

        def initialize: (untyped devtools) -> void

        def intercept: () { () -> untyped } -> untyped

        private

        attr_accessor devtools: untyped

        attr_accessor lock: untyped

        def pending_response_requests: () -> untyped

        def cancelled_requests: () -> untyped

        def track_cancelled_request: (untyped data) -> untyped?

        def request_paused: (untyped data) { () -> untyped } -> untyped

        def response?: (untyped params) -> untyped

        def intercept_request: (untyped id, untyped params) { () -> untyped } -> untyped

        def intercept_response: (untyped id, untyped params) ?{ (untyped) -> untyped } -> untyped

        def continue_request: (untyped id) -> untyped

        alias continue_response continue_request

        def mutate_request: (untyped request) -> untyped

        def mutate_response: (untyped response) -> untyped

        def fetch_response_body: (untyped id) -> untyped

        def with_cancellable_request: (untyped network_id) { () -> untyped } -> untyped

        def cancelled?: (untyped network_id) -> untyped
      end
    end
  end
end
