# Copyright (c) 2022 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 Optional

import czc.internal_api.client as client

FEATURE_INSIGHTS_IAPI = {
    'namespace': lambda _: os.environ.get('INSIGHTS_NAMESPACE') or os.environ['NAMESPACE'],
    'feature': 'insights',
    'account_id': lambda: os.environ.get('CORE_ACCOUNT_ID')
}


@client.invoked(**FEATURE_INSIGHTS_IAPI, api='get-insight')
def get_insight(cz_organization_id: str, insight_id: str) -> dict:  # type: ignore
    pass


@client.invoked(**FEATURE_INSIGHTS_IAPI, api='create-insight')
def create_insight(cz_organization_id: str, insight: dict, resource_metadata_headers: Optional[list] = None, resources: Optional[list] = None) -> dict:  # type: ignore
    pass


@client.invoked(**FEATURE_INSIGHTS_IAPI, api='update-insight')
def update_insight(cz_organization_id: str, insight_id: str, insight: dict, resource_metadata_headers: Optional[list] = None, resources: Optional[list] = None) -> dict:  # type: ignore
    pass
