Created
December 23, 2023 15:12
-
-
Save almazmusic/aafc91392a50f7ea185485e0935ed679 to your computer and use it in GitHub Desktop.
Linked keys and values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type StatisticMetricType = "money" | "count" | "pct" | |
export type StatisticMetricBasic = { | |
amount: number | |
prevAmount: number | null | |
prevComparePercents: number | null | |
type: StatisticMetricType | |
} | |
export type StatisticMetricPPCEntities = { | |
sponsored_brands: "Sponsored Brands" | |
sponsored_products: "Sponsored Products" | |
sponsored_display: "Sponsored Display" | |
total_acos: "Total ACoS" | |
} | |
export type StatisticMetricPPCSubmetricEntities = { | |
sponsored_brands_product_collection: "Product collection" | |
sponsored_brands_store_spotlight: "Store spotlight" | |
sponsored_brands_video: "Video" | |
} | |
export type StatisticMetricTransactionsEntities = { | |
ordered_product_sales: "Product Sales" | |
revenue: "Revenue" | |
estimated_profit: "Estimated profit" | |
expenses: "Expenses" | |
margin: "Margin" | |
roi: "ROI" | |
orders: "Orders" | |
units: "Units" | |
refunds: "Refunds" | |
promotion_amount: "Promotion Amount" | |
} | |
export type StatisticMetricPPC = { | |
[K in keyof StatisticMetricPPCEntities]: { | |
id: K | |
name: StatisticMetricPPCEntities[K] | |
} & { | |
subMetrics?: { | |
[K in keyof StatisticMetricPPCSubmetricEntities]: { | |
id: K | |
name: StatisticMetricPPCSubmetricEntities[K] | |
} | |
} | |
} | |
} | |
export type StatisticMetricTransactions = { | |
[K in keyof StatisticMetricTransactionsEntities]: { | |
id: K | |
name: StatisticMetricTransactionsEntities[K] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment