from plaid.api import Accounts as Accounts, AssetReport as AssetReport, Auth as Auth, Categories as Categories, CreditDetails as CreditDetails, Holdings as Holdings, Identity as Identity, Income as Income, Institutions as Institutions, InvestmentTransactions as InvestmentTransactions, Item as Item, Liabilities as Liabilities, Processor as Processor, Sandbox as Sandbox, Transactions as Transactions
from plaid.requester import DEFAULT_TIMEOUT as DEFAULT_TIMEOUT, post_request as post_request
from plaid.utils import urljoin as urljoin
from typing import Optional, Any, Dict, Union

from typing_extensions import Literal


ENVIRONMENT = Literal['sandbox', 'development', 'production']
ResponseJSON = Dict[str, Any]
ResponseStr = str
Response = Union[ResponseStr, ResponseJSON]


class Client:
    client_id: str = ...
    secret: str = ...
    public_key: str = ...
    environment: ENVIRONMENT = ...
    suppress_warnings: bool = ...
    timeout: int = ...
    api_version: Optional[str] = ...
    client_app: Optional[str] = ...
    Accounts: Accounts = ...
    AssetReport: AssetReport = ...
    Auth: Auth = ...
    Categories: Categories = ...
    CreditDetails: CreditDetails = ...
    Holdings: Holdings = ...
    Identity: Identity = ...
    Income: Income = ...
    Institutions: Institutions = ...
    InvestmentTransactions: InvestmentTransactions = ...
    Item: Item = ...
    Liabilities: Liabilities = ...
    Processor: Processor = ...
    Sandbox: Sandbox = ...
    Transactions: Transactions = ...
    def __init__(
            self,
            client_id: str,
            secret: str,
            public_key: str,
            environment: ENVIRONMENT,
            suppress_warnings: bool = ...,
            timeout: int = ...,
            api_version: Optional[str] = ...,
            client_app: Optional[str] = ...,
    ) -> None: ...
    def post(self, path: str, data: dict, is_json: bool = ...) -> Response: ...
    def post_public(self, path: str, data: dict, is_json: bool = ...) -> Response: ...
    def post_public_key(self, path: str, data: dict, is_json: bool = ...) -> Response: ...
