update cost-insights api docs
Signed-off-by: Andrew Thauer <athauer@wealthsimple.com>
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
```ts
|
||||
// @public (undocumented)
|
||||
export interface ChangeStatistic {
|
||||
// (undocumented)
|
||||
amount: number;
|
||||
// (undocumented)
|
||||
ratio?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,10 +18,15 @@
|
||||
* @public
|
||||
*/
|
||||
export interface ChangeStatistic {
|
||||
// The ratio of change from one duration to another, expressed as: (newSum - oldSum) / oldSum
|
||||
// If a ratio cannot be calculated - such as when a new or old sum is zero,
|
||||
// the ratio can be omitted and where applicable, ∞ or -∞ will display based on amount.
|
||||
/**
|
||||
* The ratio of change from one duration to another, expressed as: (newSum - oldSum) / oldSum
|
||||
* If a ratio cannot be calculated - such as when a new or old sum is zero,
|
||||
* the ratio can be omitted and where applicable, ∞ or -∞ will display based on amount.
|
||||
*/
|
||||
ratio?: number;
|
||||
// The actual USD change between time periods (can be negative if costs decreased)
|
||||
|
||||
/**
|
||||
* The actual USD change between time periods (can be negative if costs decreased)
|
||||
*/
|
||||
amount: number;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
* @public
|
||||
*/
|
||||
export type DateAggregation = {
|
||||
date: string; // YYYY-MM-DD
|
||||
/**
|
||||
* The date aggregation as string.
|
||||
* @example YYYY-MM-DD
|
||||
*/
|
||||
date: string;
|
||||
|
||||
amount: number;
|
||||
};
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* 'last completed quarter', and P30D/P90D to be '[month|quarter] relative to today'. So if
|
||||
* it's September 15, P3M represents costs for Q2 and P30D represents August 16 -
|
||||
* September 15.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export enum Duration {
|
||||
|
||||
Reference in New Issue
Block a user