from _typeshed import Incomplete
from typing import Literal, TYPE_CHECKING
from odoorpc import error as error, rpc as rpc, session as session, tools as tools
from odoorpc.db import DB as DB
from odoorpc.env import Environment as Environment
from odoorpc.report import Report as Report

if TYPE_CHECKING:
    from odoorpc.models import Model

class ODOO:
    def __init__(
        self,
        host: str = "localhost",
        protocol: str = "jsonrpc",
        port: int = 8069,
        timeout: int = 120,
        version: Incomplete | None = None,
        opener: Incomplete | None = None,
    ) -> None: ...
    @property
    def config(self) -> dict: ...
    @property
    def version(self) -> str: ...
    @property
    def db(self) -> DB: ...
    @property
    def report(self) -> Report: ...
    host: str
    port: int
    protocol: Literal["jsonrpc", "jsonrpc+ssl"]
    @property
    def env(self) -> Environment: ...
    def json(self, url, params): ...
    def http(self, url, data: Incomplete | None = None, headers: Incomplete | None = None): ...
    def login(self, db, login: str = "admin", password: str = "admin") -> None: ...
    def logout(self): ...
    def close(self): ...
    def execute(self, model: str, method, *args): ...
    def execute_kw(self, model: str, method, args: Incomplete | None = None, kwargs: Incomplete | None = None): ...
    def exec_workflow(self, model: str, record_id, signal): ...
    def save(self, name, rc_file: str = "~/.odoorpcrc") -> None: ...
    @classmethod
    def load(cls, name, rc_file: str = "~/.odoorpcrc"): ...
    @classmethod
    def list(cls, rc_file: str = "~/.odoorpcrc"): ...
    @classmethod
    def remove(cls, name, rc_file: str = "~/.odoorpcrc"): ...
