# Copyright (c) 2024 Airbyte, Inc., all rights reserved.

BRANDS_METRICS_MAP_V3 = {
    "purchasedAsin": [
        "campaignBudgetCurrencyCode",
        "campaignName",
        "adGroupName",
        "attributionType",
        "purchasedAsin",
        "productName",
        "productCategory",
        "sales14d",
        "orders14d",
        "unitsSold14d",
        "newToBrandSales14d",
        "newToBrandPurchases14d",
        "newToBrandUnitsSold14d",
        "newToBrandSalesPercentage14d",
        "newToBrandPurchasesPercentage14d",
        "newToBrandUnitsSoldPercentage14d",
    ]
}

DISPLAY_REPORT_METRICS_MAP = {
    "campaigns": [
        "addToCart",
        "addToCartClicks",
        "addToCartRate",
        "addToCartViews",
        "addToList",
        "addToListFromClicks",
        "addToListFromViews",
        "qualifiedBorrows",
        "qualifiedBorrowsFromClicks",
        "qualifiedBorrowsFromViews",
        "royaltyQualifiedBorrows",
        "royaltyQualifiedBorrowsFromClicks",
        "royaltyQualifiedBorrowsFromViews",
        "brandedSearches",
        "brandedSearchesClicks",
        "brandedSearchesViews",
        "brandedSearchRate",
        "campaignBudgetCurrencyCode",
        "campaignId",
        "campaignName",
        "clicks",
        "cost",
        "detailPageViews",
        "detailPageViewsClicks",
        "eCPAddToCart",
        "eCPBrandSearch",
        "endDate",
        "impressions",
        "impressionsViews",
        "leadFormOpens",
        "leads",
        "linkOuts",
        "newToBrandPurchases",
        "newToBrandPurchasesClicks",
        "newToBrandSalesClicks",
        "newToBrandUnitsSold",
        "newToBrandUnitsSoldClicks",
        "purchases",
        "purchasesClicks",
        "purchasesPromotedClicks",
        "sales",
        "salesClicks",
        "salesPromotedClicks",
        "startDate",
        "unitsSold",
        "unitsSoldClicks",
        "videoCompleteViews",
        "videoFirstQuartileViews",
        "videoMidpointViews",
        "videoThirdQuartileViews",
        "videoUnmutes",
        "viewabilityRate",
        "viewClickThroughRate",
    ]
    + [  # Group-by metrics
        "campaignBudgetAmount",
        "campaignStatus",
        "costType",
        "cumulativeReach",
        "impressionsFrequencyAverage",
        "newToBrandDetailPageViewClicks",
        "newToBrandDetailPageViewRate",
        "newToBrandDetailPageViews",
        "newToBrandDetailPageViewViews",
        "newToBrandECPDetailPageView",
        "newToBrandSales",
    ],  # 'date',
    "adGroups": [
        "addToCart",
        "addToCartClicks",
        "addToCartRate",
        "addToCartViews",
        "adGroupId",
        "adGroupName",
        "addToList",
        "addToListFromClicks",
        "addToListFromViews",
        "qualifiedBorrows",
        "qualifiedBorrowsFromClicks",
        "qualifiedBorrowsFromViews",
        "royaltyQualifiedBorrows",
        "royaltyQualifiedBorrowsFromClicks",
        "royaltyQualifiedBorrowsFromViews",
        "bidOptimization",
        "brandedSearches",
        "brandedSearchesClicks",
        "brandedSearchesViews",
        "brandedSearchRate",
        "campaignBudgetCurrencyCode",
        "campaignId",
        "campaignName",
        "clicks",
        "cost",
        "detailPageViews",
        "detailPageViewsClicks",
        "eCPAddToCart",
        "eCPBrandSearch",
        "endDate",
        "impressions",
        "impressionsViews",
        "leadFormOpens",
        "leads",
        "linkOuts",
        "newToBrandPurchases",
        "newToBrandPurchasesClicks",
        "newToBrandSales",
        "newToBrandSalesClicks",
        "newToBrandUnitsSold",
        "newToBrandUnitsSoldClicks",
        "purchases",
        "purchasesClicks",
        "purchasesPromotedClicks",
        "sales",
        "salesClicks",
        "salesPromotedClicks",
        "startDate",
        "unitsSold",
        "unitsSoldClicks",
        "videoCompleteViews",
        "videoFirstQuartileViews",
        "videoMidpointViews",
        "videoThirdQuartileViews",
        "videoUnmutes",
        "viewabilityRate",
        "viewClickThroughRate",
    ]
    + [  # Group-by metrics
        "cumulativeReach",
        "impressionsFrequencyAverage",
        "newToBrandDetailPageViewClicks",
        "newToBrandDetailPageViewRate",
        "newToBrandDetailPageViews",
        "newToBrandDetailPageViewViews",
        "newToBrandECPDetailPageView",
    ],  # 'date',
    "productAds": [
        "addToCart",
        "addToCartRate",
        "addToCartViews",
        "addToCartClicks",
        "adGroupId",
        "adGroupName",
        "adId",
        "addToList",
        "addToListFromClicks",
        "qualifiedBorrows",
        "royaltyQualifiedBorrows",
        "addToListFromViews",
        "qualifiedBorrowsFromClicks",
        "qualifiedBorrowsFromViews",
        "royaltyQualifiedBorrowsFromClicks",
        "royaltyQualifiedBorrowsFromViews",
        "bidOptimization",
        "brandedSearches",
        "brandedSearchesClicks",
        "brandedSearchesViews",
        "brandedSearchRate",
        "campaignBudgetCurrencyCode",
        "campaignId",
        "campaignName",
        "clicks",
        "cost",
        "cumulativeReach",
        "detailPageViews",
        "detailPageViewsClicks",
        "eCPAddToCart",
        "eCPBrandSearch",
        "endDate",
        "impressions",
        "impressionsFrequencyAverage",
        "impressionsViews",
        "leadFormOpens",
        "leads",
        "linkOuts",
        "newToBrandDetailPageViewClicks",
        "newToBrandDetailPageViewRate",
        "newToBrandDetailPageViews",
        "newToBrandDetailPageViewViews",
        "newToBrandECPDetailPageView",
        "newToBrandPurchases",
        "newToBrandPurchasesClicks",
        "newToBrandSales",
        "newToBrandSalesClicks",
        "newToBrandUnitsSold",
        "newToBrandUnitsSoldClicks",
        "promotedAsin",
        "promotedSku",
        "purchases",
        "purchasesClicks",
        "purchasesPromotedClicks",
        "sales",
        "salesClicks",
        "salesPromotedClicks",
        "startDate",
        "unitsSold",
        "unitsSoldClicks",
        "videoCompleteViews",
        "videoFirstQuartileViews",
        "videoMidpointViews",
        "videoThirdQuartileViews",
        "videoUnmutes",
        "viewabilityRate",
        "viewClickThroughRate",
    ],  # 'date',
    "targets": [
        "addToCart",
        "addToCartClicks",
        "addToCartRate",
        "addToCartViews",
        "adGroupId",
        "adGroupName",
        "addToList",
        "addToListFromClicks",
        "addToListFromViews",
        "qualifiedBorrows",
        "qualifiedBorrowsFromClicks",
        "qualifiedBorrowsFromViews",
        "royaltyQualifiedBorrows",
        "royaltyQualifiedBorrowsFromClicks",
        "royaltyQualifiedBorrowsFromViews",
        "brandedSearches",
        "brandedSearchesClicks",
        "brandedSearchesViews",
        "brandedSearchRate",
        "campaignBudgetCurrencyCode",
        "campaignId",
        "campaignName",
        "clicks",
        "cost",
        "detailPageViews",
        "detailPageViewsClicks",
        "eCPAddToCart",
        "eCPBrandSearch",
        "endDate",
        "impressions",
        "impressionsViews",
        "leadFormOpens",
        "leads",
        "linkOuts",
        "newToBrandPurchases",
        "newToBrandPurchasesClicks",
        "newToBrandSales",
        "newToBrandSalesClicks",
        "newToBrandUnitsSold",
        "newToBrandUnitsSoldClicks",
        "purchases",
        "purchasesClicks",
        "purchasesPromotedClicks",
        "sales",
        "salesClicks",
        "salesPromotedClicks",
        "startDate",
        "targetingExpression",
        "targetingId",
        "targetingText",
        "unitsSold",
        "unitsSoldClicks",
        "videoCompleteViews",
        "videoFirstQuartileViews",
        "videoMidpointViews",
        "videoThirdQuartileViews",
        "videoUnmutes",
        "viewabilityRate",
        "viewClickThroughRate",
    ],  # 'date',
    "asins": [
        "adGroupId",
        "adGroupName",
        "asinBrandHalo",
        "addToList",
        "addToListFromClicks",
        "qualifiedBorrowsFromClicks",
        "royaltyQualifiedBorrowsFromClicks",
        "addToListFromViews",
        "qualifiedBorrows",
        "qualifiedBorrowsFromViews",
        "royaltyQualifiedBorrows",
        "royaltyQualifiedBorrowsFromViews",
        "campaignBudgetCurrencyCode",
        "campaignId",
        "campaignName",
        "conversionsBrandHalo",
        "conversionsBrandHaloClicks",
        "endDate",
        "promotedAsin",
        "promotedSku",
        "salesBrandHalo",
        "salesBrandHaloClicks",
        "startDate",
        "unitsSoldBrandHalo",
        "unitsSoldBrandHaloClicks",
    ],
}

PRODUCTS_REPORT_METRICS_MAP = {
    "campaigns": [
        "campaignName",
        "campaignId",
        "campaignStatus",
        "campaignBudgetAmount",
        "campaignRuleBasedBudgetAmount",
        "campaignApplicableBudgetRuleId",
        "campaignApplicableBudgetRuleName",
        "impressions",
        "clicks",
        "cost",
        "purchases1d",
        "purchases7d",
        "purchases14d",
        "purchases30d",
        "purchasesSameSku1d",
        "purchasesSameSku7d",
        "purchasesSameSku14d",
        "purchasesSameSku30d",
        "unitsSoldClicks1d",
        "unitsSoldClicks7d",
        "unitsSoldClicks14d",
        "unitsSoldClicks30d",
        "sales1d",
        "sales7d",
        "sales14d",
        "sales30d",
        "attributedSalesSameSku1d",
        "attributedSalesSameSku7d",
        "attributedSalesSameSku14d",
        "attributedSalesSameSku30d",
        "unitsSoldSameSku1d",
        "unitsSoldSameSku7d",
        "unitsSoldSameSku14d",
        "unitsSoldSameSku30d",
    ],
    "adGroups": [
        "campaignName",
        "campaignId",
        "adGroupName",
        "adGroupId",
        "impressions",
        "clicks",
        "cost",
        "purchases1d",
        "purchases7d",
        "purchases14d",
        "purchases30d",
        "purchasesSameSku1d",
        "purchasesSameSku7d",
        "purchasesSameSku14d",
        "purchasesSameSku30d",
        "unitsSoldClicks1d",
        "unitsSoldClicks7d",
        "unitsSoldClicks14d",
        "unitsSoldClicks30d",
        "sales1d",
        "sales7d",
        "sales14d",
        "sales30d",
        "attributedSalesSameSku1d",
        "attributedSalesSameSku7d",
        "attributedSalesSameSku14d",
        "attributedSalesSameSku30d",
        "unitsSoldSameSku1d",
        "unitsSoldSameSku7d",
        "unitsSoldSameSku14d",
        "unitsSoldSameSku30d",
    ],
    "keywords": [
        "campaignName",
        "campaignId",
        "adGroupName",
        "adGroupId",
        "keywordId",
        "keyword",
        "matchType",
        "impressions",
        "clicks",
        "cost",
        "purchases1d",
        "purchases7d",
        "purchases14d",
        "purchases30d",
        "purchasesSameSku1d",
        "purchasesSameSku7d",
        "purchasesSameSku14d",
        "purchasesSameSku30d",
        "unitsSoldClicks1d",
        "unitsSoldClicks7d",
        "unitsSoldClicks14d",
        "unitsSoldClicks30d",
        "sales1d",
        "sales7d",
        "sales14d",
        "sales30d",
        "attributedSalesSameSku1d",
        "attributedSalesSameSku7d",
        "attributedSalesSameSku14d",
        "attributedSalesSameSku30d",
        "unitsSoldSameSku1d",
        "unitsSoldSameSku7d",
        "unitsSoldSameSku14d",
        "unitsSoldSameSku30d",
    ],
    "targets": [
        "campaignName",
        "campaignId",
        "adGroupName",
        "adGroupId",
        "keywordId",
        "keyword",
        "targeting",
        "keywordType",
        "impressions",
        "clicks",
        "cost",
        "purchases1d",
        "purchases7d",
        "purchases14d",
        "purchases30d",
        "purchasesSameSku1d",
        "purchasesSameSku7d",
        "purchasesSameSku14d",
        "purchasesSameSku30d",
        "unitsSoldClicks1d",
        "unitsSoldClicks7d",
        "unitsSoldClicks14d",
        "unitsSoldClicks30d",
        "sales1d",
        "sales7d",
        "sales14d",
        "sales30d",
        "attributedSalesSameSku1d",
        "attributedSalesSameSku7d",
        "attributedSalesSameSku14d",
        "attributedSalesSameSku30d",
        "unitsSoldSameSku1d",
        "unitsSoldSameSku7d",
        "unitsSoldSameSku14d",
        "unitsSoldSameSku30d",
    ],
    "productAds": [
        "campaignName",
        "campaignId",
        "adGroupName",
        "adGroupId",
        "adId",
        "impressions",
        "clicks",
        "cost",
        "campaignBudgetCurrencyCode",
        "advertisedAsin",
        "purchases1d",
        "purchases7d",
        "purchases14d",
        "purchases30d",
        "purchasesSameSku1d",
        "purchasesSameSku7d",
        "purchasesSameSku14d",
        "purchasesSameSku30d",
        "unitsSoldClicks1d",
        "unitsSoldClicks7d",
        "unitsSoldClicks14d",
        "unitsSoldClicks30d",
        "sales1d",
        "sales7d",
        "sales14d",
        "sales30d",
        "attributedSalesSameSku1d",
        "attributedSalesSameSku7d",
        "attributedSalesSameSku14d",
        "attributedSalesSameSku30d",
        "unitsSoldSameSku1d",
        "unitsSoldSameSku7d",
        "unitsSoldSameSku14d",
        "unitsSoldSameSku30d",
    ],
    "asins_keywords": [
        "campaignName",
        "campaignId",
        "adGroupName",
        "adGroupId",
        "keywordId",
        "keyword",
        "advertisedAsin",
        "purchasedAsin",
        "advertisedSku",
        "campaignBudgetCurrencyCode",
        "matchType",
        "unitsSoldClicks1d",
        "unitsSoldClicks7d",
        "unitsSoldClicks14d",
        "unitsSoldClicks30d",
        "unitsSoldOtherSku1d",
        "unitsSoldOtherSku7d",
        "unitsSoldOtherSku14d",
        "unitsSoldOtherSku30d",
        "salesOtherSku1d",
        "salesOtherSku7d",
        "salesOtherSku14d",
        "salesOtherSku30d",
    ],
    "asins_targets": [
        "campaignName",
        "campaignId",
        "adGroupName",
        "adGroupId",
        "advertisedAsin",
        "purchasedAsin",
        "advertisedSku",
        "campaignBudgetCurrencyCode",
        "matchType",
        "unitsSoldClicks1d",
        "unitsSoldClicks7d",
        "unitsSoldClicks14d",
        "unitsSoldClicks30d",
        "unitsSoldOtherSku1d",
        "unitsSoldOtherSku7d",
        "unitsSoldOtherSku14d",
        "unitsSoldOtherSku30d",
        "salesOtherSku1d",
        "salesOtherSku7d",
        "salesOtherSku14d",
        "salesOtherSku30d",
        "keywordId",
        "targeting",
        "keywordType",
    ],
}
