butterbidi/definition

Types

pub type Command {
  Command(
    id: Int,
    command_data: CommandData,
    extensible: List(#(String, json.Json)),
  )
}

Constructors

pub type CommandData {
  SessionCommand(session_command: definition.SessionCommand)
  BrowserCommand(browser_command: definition.BrowserCommand)
  BrowsingContextCommand(
    browsing_context_command: definition.BrowsingContextCommand,
  )
  ScriptCommand(script_command: definition.ScriptCommand)
  InputCommand(input_command: definition.InputCommand)
}

Constructors

pub type CommandResponse {
  CommandResponse(
    command_type: String,
    id: Int,
    result: ResultData,
    extensible: List(#(String, json.Json)),
  )
}

Constructors

  • CommandResponse(
      command_type: String,
      id: Int,
      result: ResultData,
      extensible: List(#(String, json.Json)),
    )
pub type EmptyParams {
  EmptyParams(extensible: List(#(String, json.Json)))
}

Constructors

  • EmptyParams(extensible: List(#(String, json.Json)))
pub type ErrorResponse {
  ErrorResponse(
    error_type: String,
    id: Int,
    error: errors.ErrorCode,
    message: String,
    stacktrace: option.Option(String),
    extensible: List(#(String, json.Json)),
  )
}

Constructors

pub type Message {
  Success
  Error
}

Constructors

  • Success
  • Error
pub type ResultData {
  SessionResult(session_result: definition.SessionResult)
  BrowsingContextResult(
    browsing_context_result: definition.BrowsingContextResult,
  )
  ScriptResult(script_result: definition.ScriptResult)
  EmptyResult
}

Constructors

Values

pub fn command_data_to_json(
  command_data: CommandData,
) -> json.Json
pub fn command_response_decoder(
  command: CommandData,
) -> decode.Decoder(CommandResponse)
pub fn command_to_json(command: Command) -> json.Json
pub fn empty_params_to_json(
  empty_params: EmptyParams,
) -> json.Json
pub fn extensible_command_response_decoder() -> decode.Decoder(
  dict.Dict(String, dynamic.Dynamic),
)
pub fn extensible_error_response_decoder() -> decode.Decoder(
  dict.Dict(String, dynamic.Dynamic),
)
pub fn message_decoder() -> decode.Decoder(Message)
pub fn new_error_response(
  error_type: String,
  message: String,
) -> ErrorResponse
Search Document