# 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 List

from voluptuous import Optional

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

from .types import CloudProvider, AnyCostConnection


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


@_iapi('get_all_connections')
def get_all_connections() -> List[AnyCostConnection]:
    pass


@_iapi('get_connection')
def get_connection(*, organization_id: str, connection_id: str) -> AnyCostConnection:
    pass
