# Copyright (c) 2023 CloudZero - ALL RIGHTS RESERVED - PROPRIETARY AND CONFIDENTIAL
# Unauthorized copying of this file and/or project, via any medium is strictly prohibited.
# Direct all questions to legal@cloudzero.com
import os
from typing import Iterable

from czc.aws_environment import core_account_id, environment
import czc.internal_api.client as client

from .types import AnyCostConnectionInfo, NewRelicRateInformation


def _iapi(api: str):
    return client.invoked(
        namespace=lambda _: os.environ['NAMESPACE'],
        feature='connections-anycost',
        account_id=lambda: core_account_id(environment(os.environ['NAMESPACE'])),
        api=api
    )


@_iapi('get-all-connections')
def get_all_connections() -> Iterable[AnyCostConnectionInfo]:
    pass


@_iapi('get-connection')
def get_connection(organization_id: str, connection_id: str) -> AnyCostConnectionInfo:
    pass


@_iapi('get_rate_information')
def get_rate_information(organization_id: str, connection_id: str) -> Iterable[NewRelicRateInformation]:
    pass
