from typing import Generator


def get_metadata(
    securityOrigin: str, databaseName: str, objectStoreName: str
) -> Generator[dict, dict, dict]:
    """Gets metadata of an object store

    Parameters
    ----------
    securityOrigin: str
            Security origin.
    databaseName: str
            Database name.
    objectStoreName: str
            Object store name.

    Returns
    -------
    entriesCount: float
            the entries count
    keyGeneratorValue: float
            the current value of key generator, to become the next inserted
            key into the object store. Valid if objectStore.autoIncrement
            is true.
    """
    response = yield {
        "method": "IndexedDB.getMetadata",
        "params": {
            "securityOrigin": securityOrigin,
            "databaseName": databaseName,
            "objectStoreName": objectStoreName,
        },
    }
    return {
        "entriesCount": response["entriesCount"],
        "keyGeneratorValue": response["keyGeneratorValue"],
    }