@spottoai/types-package 1.0.2-beta.198 → 1.0.2-beta.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,17 +1,142 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Billing
|
|
2
|
+
* Billing cost analysis types for Azure cost visualization.
|
|
3
3
|
*/
|
|
4
|
-
/**
|
|
5
|
-
export type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
/** Named cost chart windows emitted by the Azure billing analyzer. */
|
|
5
|
+
export type BillingChartViewKey = '7_days' | '30_days' | '90_days' | '12_months' | 'forecast_90_days' | (string & {});
|
|
6
|
+
/** Supported billing chart aggregation categories. */
|
|
7
|
+
export type BillingChartAggregation = 'daily' | 'monthly' | (string & {});
|
|
8
|
+
/** Linear trend metadata used to render trend overlays. */
|
|
9
|
+
export interface BillingChartTrend {
|
|
10
|
+
method: 'linear' | (string & {});
|
|
11
|
+
slope: number;
|
|
12
|
+
intercept: number;
|
|
13
|
+
}
|
|
14
|
+
/** Full date range covered by the chart data payload. */
|
|
15
|
+
export interface BillingChartDataWindow {
|
|
16
|
+
/** Start date of the available chart data (Unix timestamp). */
|
|
17
|
+
startDate: number;
|
|
18
|
+
/** End date of the available chart data (Unix timestamp). */
|
|
19
|
+
endDate: number;
|
|
20
|
+
/** Number of source daily points included in the data window. */
|
|
21
|
+
pointCount: number;
|
|
22
|
+
}
|
|
23
|
+
/** Detector method metadata used to explain anomaly markers. */
|
|
24
|
+
export interface BillingChartDetectorMethod {
|
|
25
|
+
name: string;
|
|
26
|
+
status?: string;
|
|
27
|
+
error?: string | null;
|
|
28
|
+
/** Dates triggered by this detector (Unix timestamps). */
|
|
29
|
+
triggeredDates: number[];
|
|
30
|
+
}
|
|
31
|
+
/** Metadata for the anomaly detector ensemble behind the chart payload. */
|
|
32
|
+
export interface BillingChartDetectorMetadata {
|
|
33
|
+
threshold: number;
|
|
34
|
+
methods: BillingChartDetectorMethod[];
|
|
35
|
+
}
|
|
36
|
+
/** Daily cost point used by historical cost chart views. */
|
|
37
|
+
export interface BillingDailyChartPoint {
|
|
38
|
+
/** ISO date string for the point. */
|
|
39
|
+
date: string;
|
|
40
|
+
/** UTC date for the point (Unix timestamp). */
|
|
41
|
+
timestamp: number;
|
|
42
|
+
/** Cost for the point. */
|
|
43
|
+
cost: number;
|
|
44
|
+
/** Whether this point is considered an anomaly by quorum detection. */
|
|
45
|
+
isAnomaly: boolean;
|
|
46
|
+
/** Number of detector votes for this point. */
|
|
47
|
+
anomalyVotes: number;
|
|
48
|
+
/** Optional rendered trend value for this point. */
|
|
49
|
+
trendCost?: number;
|
|
50
|
+
/** Detector methods that triggered for anomalous points. */
|
|
51
|
+
anomalyMethods?: string[];
|
|
52
|
+
}
|
|
53
|
+
/** Monthly cost point used by the 12-month cost chart view. */
|
|
54
|
+
export interface BillingMonthlyChartPoint {
|
|
55
|
+
/** Month key in YYYY-MM format. */
|
|
56
|
+
month: string;
|
|
57
|
+
/** Start date of the monthly point window (Unix timestamp). */
|
|
12
58
|
startDate: number;
|
|
13
|
-
/** End date of the
|
|
59
|
+
/** End date of the monthly point window (Unix timestamp). */
|
|
14
60
|
endDate: number;
|
|
61
|
+
/** Total cost for the month. */
|
|
62
|
+
cost: number;
|
|
63
|
+
/** Average daily cost inside the month window. */
|
|
64
|
+
averageDailyCost: number;
|
|
65
|
+
/** Count of anomaly dates inside the month window. */
|
|
66
|
+
anomalyCount: number;
|
|
67
|
+
/** Optional rendered trend value for this point. */
|
|
68
|
+
trendCost?: number;
|
|
69
|
+
/** Anomaly dates inside the month window (Unix timestamps). */
|
|
70
|
+
anomalyDates?: number[];
|
|
71
|
+
}
|
|
72
|
+
/** Forecast or fitted cost point used by forecast chart overlays. */
|
|
73
|
+
export interface BillingForecastChartPoint {
|
|
74
|
+
/** ISO date string for the point. */
|
|
75
|
+
date: string;
|
|
76
|
+
/** UTC date for the point (Unix timestamp). */
|
|
77
|
+
timestamp: number;
|
|
78
|
+
/** Cost for the point. */
|
|
79
|
+
cost: number;
|
|
80
|
+
/** Optional rendered trend value for this point. */
|
|
81
|
+
trendCost?: number;
|
|
82
|
+
}
|
|
83
|
+
/** Historical daily chart view. */
|
|
84
|
+
export interface BillingDailyChartView {
|
|
85
|
+
aggregation: 'daily';
|
|
86
|
+
/** Start date of the view window (Unix timestamp). */
|
|
87
|
+
startDate: number;
|
|
88
|
+
/** End date of the view window (Unix timestamp). */
|
|
89
|
+
endDate: number;
|
|
90
|
+
averageDailyCost: number;
|
|
91
|
+
totalCost: number;
|
|
92
|
+
points: BillingDailyChartPoint[];
|
|
93
|
+
trend?: BillingChartTrend;
|
|
94
|
+
}
|
|
95
|
+
/** Monthly chart view. */
|
|
96
|
+
export interface BillingMonthlyChartView {
|
|
97
|
+
aggregation: 'monthly';
|
|
98
|
+
/** Start date of the view window (Unix timestamp). */
|
|
99
|
+
startDate: number;
|
|
100
|
+
/** End date of the view window (Unix timestamp). */
|
|
101
|
+
endDate: number;
|
|
102
|
+
averageDailyCost: number;
|
|
103
|
+
totalCost: number;
|
|
104
|
+
points: BillingMonthlyChartPoint[];
|
|
105
|
+
trend?: BillingChartTrend;
|
|
106
|
+
}
|
|
107
|
+
/** Forecast chart view containing actual, fitted, and future forecast series. */
|
|
108
|
+
export interface BillingForecastChartView {
|
|
109
|
+
aggregation: 'daily';
|
|
110
|
+
forecastMethod: string;
|
|
111
|
+
/** Start date of the forecast view window (Unix timestamp). */
|
|
112
|
+
startDate: number;
|
|
113
|
+
/** End date of the forecast view window (Unix timestamp). */
|
|
114
|
+
endDate: number;
|
|
115
|
+
actualTotalCost: number;
|
|
116
|
+
forecastRemaining: number;
|
|
117
|
+
forecastMonthTotal: number;
|
|
118
|
+
actualPoints: BillingDailyChartPoint[];
|
|
119
|
+
forecastPoints: BillingForecastChartPoint[];
|
|
120
|
+
fittedPoints: BillingForecastChartPoint[];
|
|
121
|
+
trend?: BillingChartTrend;
|
|
122
|
+
}
|
|
123
|
+
export type BillingChartView = BillingDailyChartView | BillingMonthlyChartView | BillingForecastChartView;
|
|
124
|
+
/** Named chart views emitted by the billing analyzer. */
|
|
125
|
+
export interface BillingChartViews {
|
|
126
|
+
'7_days'?: BillingDailyChartView;
|
|
127
|
+
'30_days'?: BillingDailyChartView;
|
|
128
|
+
'90_days'?: BillingDailyChartView;
|
|
129
|
+
'12_months'?: BillingMonthlyChartView;
|
|
130
|
+
forecast_90_days?: BillingForecastChartView;
|
|
131
|
+
[key: string]: BillingChartView | undefined;
|
|
132
|
+
}
|
|
133
|
+
/** Interactive chart data for cost analysis. */
|
|
134
|
+
export interface BillingChartData {
|
|
135
|
+
schemaVersion: number;
|
|
136
|
+
source: 'aggregated' | (string & {});
|
|
137
|
+
dataWindow: BillingChartDataWindow;
|
|
138
|
+
views: BillingChartViews;
|
|
139
|
+
detectors: BillingChartDetectorMetadata;
|
|
15
140
|
}
|
|
16
141
|
/** Impact metrics associated with a billing anomaly */
|
|
17
142
|
export interface BillingAnomalyImpact {
|
|
@@ -42,6 +167,12 @@ export interface BillingAnomalyImpact {
|
|
|
42
167
|
export interface BillingAnomalyDriverResource {
|
|
43
168
|
/** Resource identifier */
|
|
44
169
|
name: string;
|
|
170
|
+
/** Scope/category used by the analyzer for the resource row */
|
|
171
|
+
resourceScope?: string;
|
|
172
|
+
/** Full cloud resource ID when the anomaly can be tied to a resource */
|
|
173
|
+
resourceId?: string;
|
|
174
|
+
/** Whether the driver row represents subscription-level spend */
|
|
175
|
+
isSubscriptionLevel?: boolean;
|
|
45
176
|
/** Total cost attributed to the resource */
|
|
46
177
|
cost: number;
|
|
47
178
|
/** Baseline cost for the resource */
|
|
@@ -95,14 +226,24 @@ export interface BillingAnomaly {
|
|
|
95
226
|
/** Additional contextual notes for the anomaly */
|
|
96
227
|
notes: string[];
|
|
97
228
|
}
|
|
98
|
-
export interface
|
|
229
|
+
export interface BillingCostAnalysisMetadata {
|
|
99
230
|
/** Azure subscription ID */
|
|
100
231
|
subscriptionId: string;
|
|
101
|
-
/**
|
|
102
|
-
|
|
232
|
+
/** Interactive chart data for cost analysis. */
|
|
233
|
+
chartData: BillingChartData;
|
|
103
234
|
/** Detected anomalies for the subscription */
|
|
104
235
|
anomalies: BillingAnomaly[];
|
|
105
236
|
currencyCode: string;
|
|
106
237
|
currencySymbol: string;
|
|
238
|
+
/** Forecast method used for top-level forecast summaries. */
|
|
239
|
+
forecastMethod?: string;
|
|
240
|
+
/** Forecast month total used for top-level forecast summaries. */
|
|
241
|
+
forecastMonthTotal?: number;
|
|
242
|
+
/** Forecast amount remaining in the current period. */
|
|
243
|
+
forecastRemaining?: number;
|
|
244
|
+
/** Forecast amount at the end of the current period. */
|
|
245
|
+
forecastPeriodEnd?: number;
|
|
107
246
|
}
|
|
247
|
+
/** @deprecated Use BillingCostAnalysisMetadata. */
|
|
248
|
+
export type BillingPlotsMetadata = BillingCostAnalysisMetadata;
|
|
108
249
|
//# sourceMappingURL=billingPlots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billingPlots.d.ts","sourceRoot":"","sources":["../../src/azure/billingPlots.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"billingPlots.d.ts","sourceRoot":"","sources":["../../src/azure/billingPlots.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEtH,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE1E,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE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