@spottoai/types-package 1.0.2-beta.9 → 1.0.2-beta.90
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.
- package/LICENSE +18 -40
- package/README.md +4 -13
- package/dist/accounts/accounts.d.ts +18 -3
- package/dist/accounts/accounts.d.ts.map +1 -1
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +0 -1
- package/dist/ai/index.js.map +1 -1
- package/dist/azure/billingPlots.d.ts +108 -0
- package/dist/azure/billingPlots.d.ts.map +1 -0
- package/dist/azure/billingPlots.js +6 -0
- package/dist/azure/billingPlots.js.map +1 -0
- package/dist/azure/common.d.ts +34 -0
- package/dist/azure/common.d.ts.map +1 -1
- package/dist/azure/configs.d.ts +9 -0
- package/dist/azure/configs.d.ts.map +1 -1
- package/dist/azure/costEstimation.d.ts +78 -0
- package/dist/azure/costEstimation.d.ts.map +1 -0
- package/dist/azure/costEstimation.js +3 -0
- package/dist/azure/costEstimation.js.map +1 -0
- package/dist/azure/metrics.d.ts +27 -0
- package/dist/azure/metrics.d.ts.map +1 -1
- package/dist/azure/payloads.d.ts +8 -0
- package/dist/azure/payloads.d.ts.map +1 -1
- package/dist/azure/prices.d.ts +142 -0
- package/dist/azure/prices.d.ts.map +1 -1
- package/dist/azure/recommendationState.d.ts +14 -0
- package/dist/azure/recommendationState.d.ts.map +1 -1
- package/dist/azure/recommendations.d.ts +112 -5
- package/dist/azure/recommendations.d.ts.map +1 -1
- package/dist/azure/recommendations.js.map +1 -1
- package/dist/azure/reports.d.ts +109 -0
- package/dist/azure/reports.d.ts.map +1 -1
- package/dist/azure/reports.js +13 -0
- package/dist/azure/reports.js.map +1 -1
- package/dist/azure/resources.d.ts +14 -0
- package/dist/azure/resources.d.ts.map +1 -1
- package/dist/azure/security.d.ts +28 -0
- package/dist/azure/security.d.ts.map +1 -0
- package/dist/azure/security.js +3 -0
- package/dist/azure/security.js.map +1 -0
- package/dist/azure/serviceRetirement.d.ts +24 -0
- package/dist/azure/serviceRetirement.d.ts.map +1 -0
- package/dist/azure/serviceRetirement.js +3 -0
- package/dist/azure/serviceRetirement.js.map +1 -0
- package/dist/azure/subscriptions.d.ts +9 -13
- package/dist/azure/subscriptions.d.ts.map +1 -1
- package/dist/azure/views.d.ts +45 -1
- package/dist/azure/views.d.ts.map +1 -1
- package/dist/common/pagination.d.ts +3 -0
- package/dist/common/pagination.d.ts.map +1 -1
- package/dist/company/company.d.ts +9 -0
- package/dist/company/company.d.ts.map +1 -1
- package/dist/company/notification.d.ts +20 -0
- package/dist/company/notification.d.ts.map +1 -1
- package/dist/company/notification.js +20 -12
- package/dist/company/notification.js.map +1 -1
- package/dist/company/survey.d.ts +3 -0
- package/dist/company/survey.d.ts.map +1 -1
- package/dist/events/eventStatus.d.ts +59 -0
- package/dist/events/eventStatus.d.ts.map +1 -0
- package/dist/events/eventStatus.js +3 -0
- package/dist/events/eventStatus.js.map +1 -0
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +18 -0
- package/dist/events/index.js.map +1 -0
- package/dist/feedbacks/feedback.d.ts +9 -0
- package/dist/feedbacks/feedback.d.ts.map +1 -1
- package/dist/identity/apikey.d.ts +67 -0
- package/dist/identity/apikey.d.ts.map +1 -0
- package/dist/identity/apikey.js +3 -0
- package/dist/identity/apikey.js.map +1 -0
- package/dist/identity/index.d.ts +2 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +18 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,43 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2024 Spotto AI (www.spotto.ai)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
5. NO REVERSE ENGINEERING: Reverse engineering, disassembly, or decompilation of
|
|
24
|
-
the Software is strictly prohibited.
|
|
25
|
-
|
|
26
|
-
6. NO COMMERCIAL USE: Commercial use of the Software by any entity other than
|
|
27
|
-
Spotto AI is strictly prohibited.
|
|
28
|
-
|
|
29
|
-
DISCLAIMER:
|
|
30
|
-
|
|
31
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
32
|
-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
33
|
-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
34
|
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
35
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
36
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
37
|
-
|
|
38
|
-
VIOLATION:
|
|
39
|
-
|
|
40
|
-
Any unauthorized use, distribution, or modification of this Software constitutes
|
|
41
|
-
a violation of this license agreement and may result in legal action.
|
|
42
|
-
|
|
43
|
-
For licensing inquiries, contact: contact@spotto.ai
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
# Types Package
|
|
2
2
|
|
|
3
|
-
A shared TypeScript interfaces package
|
|
4
|
-
**⚠️ RESTRICTED USE - INTERNAL SPOTTO AI ONLY ⚠️**
|
|
5
|
-
|
|
6
|
-
This is a proprietary TypeScript interfaces package for internal use by Spotto AI (www.spotto.ai) only. This package contains common interfaces that can be reused across Spotto AI's API, frontend, and backend projects.
|
|
7
|
-
|
|
8
|
-
**IMPORTANT**: This repository is made public solely for internal sharing between Spotto AI projects. External use, distribution, or modification is strictly prohibited. See LICENSE file for full terms.
|
|
3
|
+
A shared TypeScript interfaces package. This package contains common interfaces that can be reused across your API, frontend, and backend projects.
|
|
9
4
|
|
|
10
5
|
## Features
|
|
11
6
|
|
|
12
7
|
- **Shared Interfaces**: Common TypeScript interfaces for API requests/responses, database models, frontend components, and backend services
|
|
13
|
-
- **Git Dependencies**: Designed to work with Git dependencies
|
|
8
|
+
- **Git Dependencies**: Designed to work with Git dependencies
|
|
14
9
|
- **TypeScript Declaration Files**: Built with declaration files for better IDE support
|
|
15
10
|
- **Modular Structure**: Organized by domain (API, Database, Frontend, Backend)
|
|
16
11
|
|
|
17
12
|
## Installation
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
Since this is an internal Spotto AI package, you'll need to use Git dependencies. Add this to your consuming project's `package.json`:
|
|
14
|
+
Add this to your consuming project's `package.json`:
|
|
21
15
|
|
|
22
16
|
```json
|
|
23
17
|
{
|
|
@@ -114,7 +108,4 @@ This package follows semantic versioning. When making changes:
|
|
|
114
108
|
|
|
115
109
|
## License
|
|
116
110
|
|
|
117
|
-
MIT License - see LICENSE file for details
|
|
118
|
-
**PROPRIETARY LICENSE** - This software is proprietary to Spotto AI and is made available publicly solely for internal use. External use, distribution, or modification is strictly prohibited. See LICENSE file for full terms and restrictions.
|
|
119
|
-
|
|
120
|
-
For licensing inquiries, contact: legal@spotto.ai
|
|
111
|
+
MIT License - see LICENSE file for details
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { SurveyResponse } from '../company';
|
|
2
2
|
export interface CloudAccount {
|
|
3
|
+
/** Partition Key */
|
|
3
4
|
companyId: string;
|
|
5
|
+
/** Row Key (Azure Client ID, AWS Access Key ID) */
|
|
4
6
|
id: string;
|
|
5
7
|
name: string;
|
|
6
8
|
companyName: string;
|
|
9
|
+
/** AWS, Azure, GCP, etc. */
|
|
7
10
|
provider: string;
|
|
11
|
+
/** Azure Tenant ID */
|
|
8
12
|
tenantId?: string;
|
|
9
13
|
secret?: string;
|
|
10
14
|
secretExpiresAt?: Date;
|
|
@@ -14,13 +18,12 @@ export interface CloudAccount {
|
|
|
14
18
|
status: string;
|
|
15
19
|
objectives?: SurveyResponse[];
|
|
16
20
|
}
|
|
17
|
-
export interface
|
|
18
|
-
id: string;
|
|
19
|
-
companyId: string;
|
|
21
|
+
export interface SubscriptionInfoBase {
|
|
20
22
|
name: string;
|
|
21
23
|
cloudAccountId: string;
|
|
22
24
|
cloudAccountName: string;
|
|
23
25
|
status?: string;
|
|
26
|
+
statusLabel?: string;
|
|
24
27
|
error?: string;
|
|
25
28
|
lastUpdated?: string;
|
|
26
29
|
quotaId?: string;
|
|
@@ -29,5 +32,17 @@ export interface SubscriptionAccount {
|
|
|
29
32
|
currencySymbol?: string;
|
|
30
33
|
foundCurrency?: boolean;
|
|
31
34
|
ready?: boolean;
|
|
35
|
+
secureScore?: number;
|
|
36
|
+
showAmortizedCosts?: boolean;
|
|
37
|
+
totalCost?: number;
|
|
38
|
+
billingItems?: number;
|
|
39
|
+
activityItems?: number;
|
|
40
|
+
eventId?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface SubscriptionAccount extends SubscriptionInfoBase {
|
|
43
|
+
/** Partition Key (Azure Subscription ID) */
|
|
44
|
+
id: string;
|
|
45
|
+
/** Row Key */
|
|
46
|
+
companyId: string;
|
|
32
47
|
}
|
|
33
48
|
//# sourceMappingURL=accounts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/accounts/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,
|
|
1
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,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,cAAc;IACd,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Common AI interfaces shared between frontend and backend */
|
|
1
2
|
export type AIResponseStatus = 'complete' | 'needs_clarification' | 'needs_more_metrics';
|
|
2
3
|
export type RecommendationPillar = 'Cost Optimization' | 'Performance Efficiency' | 'Security' | 'Reliability' | 'Operational Excellence';
|
|
3
4
|
export type RecommendationType = 'advisor' | 'custom' | 'ai_generated';
|
|
@@ -20,6 +21,7 @@ export interface StructuredAIResponse {
|
|
|
20
21
|
friendly_message: string;
|
|
21
22
|
recommendations: AIRecommendation[];
|
|
22
23
|
}
|
|
24
|
+
/** Common PageContext interface - unified version */
|
|
23
25
|
export interface PageContext {
|
|
24
26
|
pageType: 'resource-detail' | 'recommendation-detail' | 'dashboard' | string;
|
|
25
27
|
resourceId?: string;
|
|
@@ -27,11 +29,14 @@ export interface PageContext {
|
|
|
27
29
|
subscriptionId?: string;
|
|
28
30
|
pageUrl?: string;
|
|
29
31
|
}
|
|
32
|
+
/** Common message interface for AI conversations */
|
|
30
33
|
export interface AIMessage {
|
|
31
34
|
role: 'user' | 'assistant';
|
|
32
35
|
content: string;
|
|
36
|
+
/** Date for backend, string for frontend */
|
|
33
37
|
timestamp: Date | string;
|
|
34
38
|
structuredResponse?: StructuredAIResponse;
|
|
39
|
+
/** Response ID for continuity */
|
|
35
40
|
responseId?: string;
|
|
36
41
|
}
|
|
37
42
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ai/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,qBAAqB,GAAG,oBAAoB,CAAC;AAEzF,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG,wBAAwB,GAAG,UAAU,GAAG,aAAa,GAAG,wBAAwB,CAAC;AAE1I,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,KAAK,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,kBAAkB,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,gBAAgB,EAAE,CAAC;CACrC;AAED,qDAAqD;AACrD,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,iBAAiB,GAAG,uBAAuB,GAAG,WAAW,GAAG,MAAM,CAAC;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,oDAAoD;AACpD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
package/dist/ai/index.js
CHANGED
package/dist/ai/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Billing plot types for Azure cost visualization
|
|
3
|
+
*/
|
|
4
|
+
/** Supported billing plot categories */
|
|
5
|
+
export type BillingPlotType = 'daily' | 'forecast' | 'monthly' | 'yearly';
|
|
6
|
+
export interface BillingPlot {
|
|
7
|
+
/** File path to the plot image */
|
|
8
|
+
file: string;
|
|
9
|
+
/** Type of plot (e.g., 'daily', 'forecast') */
|
|
10
|
+
type: BillingPlotType;
|
|
11
|
+
/** Start date of the plot data (Unix timestamp) */
|
|
12
|
+
startDate: number;
|
|
13
|
+
/** End date of the plot data (Unix timestamp) */
|
|
14
|
+
endDate: number;
|
|
15
|
+
}
|
|
16
|
+
/** Impact metrics associated with a billing anomaly */
|
|
17
|
+
export interface BillingAnomalyImpact {
|
|
18
|
+
/** Total cost for the anomaly window */
|
|
19
|
+
cost: number;
|
|
20
|
+
/** Difference from baseline for the anomaly window */
|
|
21
|
+
delta: number;
|
|
22
|
+
/** 7-day baseline cost when available */
|
|
23
|
+
baseline7Day: number | null;
|
|
24
|
+
/** 30-day baseline cost when available */
|
|
25
|
+
baseline30Day: number | null;
|
|
26
|
+
/** Percent change against the baseline cost */
|
|
27
|
+
percentChange: number | null;
|
|
28
|
+
/** Cost recorded for the previous day */
|
|
29
|
+
previousDayCost: number | null;
|
|
30
|
+
/** Delta recorded for the previous day */
|
|
31
|
+
previousDayDelta: number | null;
|
|
32
|
+
/** Month-to-date cost at the anomaly occurrence */
|
|
33
|
+
monthToDateCost: number;
|
|
34
|
+
/** Month-to-date baseline cost */
|
|
35
|
+
monthToDateBaseline: number | null;
|
|
36
|
+
/** Month-to-date delta compared to baseline */
|
|
37
|
+
monthToDateDelta: number | null;
|
|
38
|
+
/** Month-to-date percent change compared to baseline */
|
|
39
|
+
monthToDatePercentChange: number | null;
|
|
40
|
+
}
|
|
41
|
+
/** Resource contributing to a billing anomaly driver */
|
|
42
|
+
export interface BillingAnomalyDriverResource {
|
|
43
|
+
/** Resource identifier */
|
|
44
|
+
name: string;
|
|
45
|
+
/** Total cost attributed to the resource */
|
|
46
|
+
cost: number;
|
|
47
|
+
/** Baseline cost for the resource */
|
|
48
|
+
baseline: number | null;
|
|
49
|
+
/** Delta between current cost and baseline */
|
|
50
|
+
delta: number;
|
|
51
|
+
/** Percent change from baseline */
|
|
52
|
+
percentChange: number | null;
|
|
53
|
+
/** Whether the resource is new or previously idle */
|
|
54
|
+
isNew: boolean;
|
|
55
|
+
/** Human-readable summary for the resource impact */
|
|
56
|
+
summary: string;
|
|
57
|
+
}
|
|
58
|
+
/** Driver contributing to a billing anomaly */
|
|
59
|
+
export interface BillingAnomalyDriver {
|
|
60
|
+
/** Classification for the driver (e.g., service) */
|
|
61
|
+
type: 'service' | (string & {});
|
|
62
|
+
/** Name of the driver */
|
|
63
|
+
name: string;
|
|
64
|
+
/** Summary of the driver's impact */
|
|
65
|
+
summary: string;
|
|
66
|
+
/** Total cost attributed to the driver */
|
|
67
|
+
cost: number;
|
|
68
|
+
/** Delta between current cost and baseline */
|
|
69
|
+
delta: number;
|
|
70
|
+
/** Baseline cost for the driver */
|
|
71
|
+
baseline: number | null;
|
|
72
|
+
/** Percent change from baseline */
|
|
73
|
+
percentChange: number | null;
|
|
74
|
+
/** Percentage contribution of the driver to the anomaly */
|
|
75
|
+
shareOfImpactPercent: number;
|
|
76
|
+
/** Whether the driver represents new or returning spend */
|
|
77
|
+
isNew: boolean;
|
|
78
|
+
/** Resources that contributed to the driver's anomaly */
|
|
79
|
+
resources: BillingAnomalyDriverResource[];
|
|
80
|
+
}
|
|
81
|
+
/** Confidence level classifications for anomalies */
|
|
82
|
+
export type BillingAnomalyConfidence = 'Low' | 'Medium' | 'High' | (string & {});
|
|
83
|
+
/** Representation of a detected billing anomaly */
|
|
84
|
+
export interface BillingAnomaly {
|
|
85
|
+
/** Unix timestamp for the anomaly date */
|
|
86
|
+
date: number;
|
|
87
|
+
/** Summary describing the anomaly */
|
|
88
|
+
summary: string;
|
|
89
|
+
/** Impact metrics captured for the anomaly */
|
|
90
|
+
impact: BillingAnomalyImpact;
|
|
91
|
+
/** Drivers that explain the anomaly */
|
|
92
|
+
drivers: BillingAnomalyDriver[];
|
|
93
|
+
/** Heuristic confidence of the anomaly classification */
|
|
94
|
+
confidence: BillingAnomalyConfidence;
|
|
95
|
+
/** Additional contextual notes for the anomaly */
|
|
96
|
+
notes: string[];
|
|
97
|
+
}
|
|
98
|
+
export interface BillingPlotsMetadata {
|
|
99
|
+
/** Azure subscription ID */
|
|
100
|
+
subscriptionId: string;
|
|
101
|
+
/** Array of billing plots */
|
|
102
|
+
plots: BillingPlot[];
|
|
103
|
+
/** Detected anomalies for the subscription */
|
|
104
|
+
anomalies: BillingAnomaly[];
|
|
105
|
+
currencyCode: string;
|
|
106
|
+
currencySymbol: string;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=billingPlots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billingPlots.d.ts","sourceRoot":"","sources":["../../src/azure/billingPlots.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wCAAwC;AACxC,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GA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YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billingPlots.js","sourceRoot":"","sources":["../../src/azure/billingPlots.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/dist/azure/common.d.ts
CHANGED
|
@@ -1,22 +1,50 @@
|
|
|
1
1
|
export interface AzureLocation {
|
|
2
|
+
/** e.g. "eastus" */
|
|
2
3
|
name: string;
|
|
4
|
+
/** e.g. "East US" */
|
|
3
5
|
displayName: string;
|
|
4
6
|
}
|
|
5
7
|
export interface MonthSummaryEntry {
|
|
8
|
+
/** YYYY-MM format */
|
|
6
9
|
month: string;
|
|
10
|
+
/** sum of actual cost for the month */
|
|
7
11
|
cost?: number;
|
|
12
|
+
/** sum of costAmortized for the month */
|
|
8
13
|
costAmortized?: number;
|
|
14
|
+
/** YYYY-MM format - start date of billing period */
|
|
9
15
|
startDate?: string;
|
|
16
|
+
/** YYYY-MM format - end date of billing period */
|
|
10
17
|
endDate?: string;
|
|
18
|
+
/** Top resources by cost */
|
|
11
19
|
resourceTypes: ResourceCostType[];
|
|
12
20
|
}
|
|
13
21
|
export interface ResourceCostType {
|
|
22
|
+
/** e.g. "Virtual Machines" */
|
|
14
23
|
name: string;
|
|
24
|
+
/** e.g. 100 */
|
|
15
25
|
cost: number;
|
|
26
|
+
/** e.g. 100 */
|
|
16
27
|
costAmortized?: number;
|
|
17
28
|
}
|
|
18
29
|
export interface MonthSummary {
|
|
19
30
|
entries: MonthSummaryEntry[];
|
|
31
|
+
/** ISO date string */
|
|
32
|
+
lastUpdated: string;
|
|
33
|
+
}
|
|
34
|
+
export interface DailySummaryEntry {
|
|
35
|
+
/** YYYY-MM-DD format */
|
|
36
|
+
date: string;
|
|
37
|
+
/** sum of actual cost for the day */
|
|
38
|
+
cost?: number;
|
|
39
|
+
/** sum of costAmortized for the day */
|
|
40
|
+
costAmortized?: number;
|
|
41
|
+
/** Top resources by cost */
|
|
42
|
+
resourceTypes: ResourceCostType[];
|
|
43
|
+
}
|
|
44
|
+
export interface DailySummary {
|
|
45
|
+
/** rolling last 30 days */
|
|
46
|
+
entries: DailySummaryEntry[];
|
|
47
|
+
/** ISO date string */
|
|
20
48
|
lastUpdated: string;
|
|
21
49
|
}
|
|
22
50
|
export interface ActiveDates {
|
|
@@ -24,8 +52,11 @@ export interface ActiveDates {
|
|
|
24
52
|
endDate: number;
|
|
25
53
|
}
|
|
26
54
|
export interface SpecItem {
|
|
55
|
+
/** e.g. RAM */
|
|
27
56
|
name: string;
|
|
57
|
+
/** e.g. 3.5 */
|
|
28
58
|
value: string;
|
|
59
|
+
/** e.g. GB */
|
|
29
60
|
unit: string;
|
|
30
61
|
}
|
|
31
62
|
export interface Link {
|
|
@@ -44,8 +75,11 @@ export interface LogAnalyticsTable {
|
|
|
44
75
|
rows: unknown[][];
|
|
45
76
|
}
|
|
46
77
|
export interface ActivityLog {
|
|
78
|
+
/** e.g. "user@contoso.com" */
|
|
47
79
|
caller: string;
|
|
80
|
+
/** e.g. Update hosting plan */
|
|
48
81
|
change: string;
|
|
82
|
+
/** e.g. Use the submissionTimestamp */
|
|
49
83
|
timestamp: string;
|
|
50
84
|
}
|
|
51
85
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/azure/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,gBAAgB,EAAE,CAAC;CAC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AAK,CAAC,iBAAiB,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/azure/configs.d.ts
CHANGED
|
@@ -14,14 +14,21 @@ export interface ResourceConfigItem {
|
|
|
14
14
|
overrideSourceProperty?: string;
|
|
15
15
|
isArray?: boolean;
|
|
16
16
|
mandatory?: boolean;
|
|
17
|
+
/** if true, then the resource is supported by the platform (e.g. activity logs, scaling plans, billing) */
|
|
17
18
|
supporting?: boolean;
|
|
18
19
|
displayServiceName?: string;
|
|
20
|
+
/** an expression to determine the display service name */
|
|
19
21
|
displayServiceNameExpression?: string;
|
|
20
22
|
icon?: string;
|
|
23
|
+
/** an expression to determine the icon */
|
|
21
24
|
iconExpression?: string;
|
|
25
|
+
/** a description of the service */
|
|
22
26
|
description?: string;
|
|
27
|
+
/** an expression to determine the description */
|
|
23
28
|
descriptionExpression?: string;
|
|
29
|
+
/** a link to the product page */
|
|
24
30
|
product?: string;
|
|
31
|
+
/** an expression to determine the product */
|
|
25
32
|
productExpression?: string;
|
|
26
33
|
references: {
|
|
27
34
|
[key: string]: ResourceTypeReference;
|
|
@@ -29,11 +36,13 @@ export interface ResourceConfigItem {
|
|
|
29
36
|
metrics?: AzureResourceMetric[];
|
|
30
37
|
metricsDescription?: MetricDescription[];
|
|
31
38
|
metricsDisplay?: MetricsDisplay[];
|
|
39
|
+
/** Loaded during processing */
|
|
32
40
|
name: string;
|
|
33
41
|
type: string;
|
|
34
42
|
parameters: object;
|
|
35
43
|
alias: AliasConfig;
|
|
36
44
|
resources: ResourceConfigItem[];
|
|
45
|
+
/** e.g. "Virtual Network" used for bill / price matching */
|
|
37
46
|
serviceName?: string;
|
|
38
47
|
label1?: string;
|
|
39
48
|
label2?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../src/azure/configs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,kBAAkB,CAAC;IACnC,YAAY,EAAE,kBAAkB,CAAC;IACjC,SAAS,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,UAAU,EAAE;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AAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAA;KAAE,CAAC;IACrD,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAChC,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACzC,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;IAElC,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export interface ResourceCostEstimationSegmentMeter {
|
|
2
|
+
meterName: string;
|
|
3
|
+
productName: string;
|
|
4
|
+
skuName: string;
|
|
5
|
+
meterId?: string | null;
|
|
6
|
+
quantity: number;
|
|
7
|
+
unitListPrice: number | null;
|
|
8
|
+
discount: number | null;
|
|
9
|
+
unitEffectivePrice: number | null;
|
|
10
|
+
cost: number | null;
|
|
11
|
+
unitOfMeasure?: string;
|
|
12
|
+
notes?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ResourceCostEstimationSegment {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string | null;
|
|
17
|
+
usage: Record<string, number>;
|
|
18
|
+
usageMetadata?: Record<string, {
|
|
19
|
+
label: string;
|
|
20
|
+
unit?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
}>;
|
|
23
|
+
meters: Record<string, ResourceCostEstimationSegmentMeter>;
|
|
24
|
+
subtotal: number;
|
|
25
|
+
}
|
|
26
|
+
export interface ResourceCostEstimationPlan {
|
|
27
|
+
tierKey: string;
|
|
28
|
+
label: string;
|
|
29
|
+
recommendationIds: string[];
|
|
30
|
+
parameters: Record<string, number>;
|
|
31
|
+
segments: ResourceCostEstimationSegment[];
|
|
32
|
+
summaryTotals: Record<string, number>;
|
|
33
|
+
projectedMonthlyCost: number;
|
|
34
|
+
savingsAmount: number;
|
|
35
|
+
savingsPercent: number;
|
|
36
|
+
}
|
|
37
|
+
export interface ResourceCostEstimationSummary {
|
|
38
|
+
sourceProfile?: string;
|
|
39
|
+
currency: string;
|
|
40
|
+
currentMonthlyCost: number;
|
|
41
|
+
currentObservedDiscounts?: Record<string, DiscountObservation>;
|
|
42
|
+
plans: ResourceCostEstimationPlan[];
|
|
43
|
+
currentCost?: number;
|
|
44
|
+
sourceMeta?: CostEstimationSourceMeta;
|
|
45
|
+
}
|
|
46
|
+
export type CostEstimationSourceType = 'rolling-30-days' | 'calendar-month';
|
|
47
|
+
export interface CostEstimationSourceMeta {
|
|
48
|
+
type: CostEstimationSourceType;
|
|
49
|
+
startDate: string;
|
|
50
|
+
endDate: string;
|
|
51
|
+
excludedRecentDays?: number;
|
|
52
|
+
sourcePath?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ResourceSimpleCostEstimationPlan {
|
|
55
|
+
label: string;
|
|
56
|
+
recommendationIds: string[];
|
|
57
|
+
projectedMonthlyCost: number;
|
|
58
|
+
savingsAmount: number;
|
|
59
|
+
}
|
|
60
|
+
export interface ResourceSimpleCostEstimationSummary {
|
|
61
|
+
currency: string;
|
|
62
|
+
currentMonthlyCost: number;
|
|
63
|
+
currentObservedDiscounts?: Record<string, DiscountObservation>;
|
|
64
|
+
plans: ResourceSimpleCostEstimationPlan[];
|
|
65
|
+
savingsRange?: {
|
|
66
|
+
min: number;
|
|
67
|
+
max: number;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export interface DiscountObservation {
|
|
71
|
+
meter: string;
|
|
72
|
+
retailPrice: number;
|
|
73
|
+
unitActual: number;
|
|
74
|
+
discount: number;
|
|
75
|
+
quantity: number;
|
|
76
|
+
cost: number;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=costEstimation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"costEstimation.d.ts","sourceRoot":"","sources":["../../src/azure/costEstimation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kCAAkC;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvF,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kCAAkC,C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CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wBAAwB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC/D,KAAK,EAAE,gCAAgC,EAAE,CAAC;IAC1C,YAAY,CAAC,EAAE;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"costEstimation.js","sourceRoot":"","sources":["../../src/azure/costEstimation.ts"],"names":[],"mappings":""}
|
package/dist/azure/metrics.d.ts
CHANGED
|
@@ -5,10 +5,14 @@ export interface DisplayMetric {
|
|
|
5
5
|
children?: DisplayMetric[];
|
|
6
6
|
}
|
|
7
7
|
export interface DailyMetrics {
|
|
8
|
+
/** YYYYMMDD */
|
|
8
9
|
date: number;
|
|
10
|
+
/** number spend on the resource that day */
|
|
9
11
|
spend: number;
|
|
12
|
+
/** number amortized spend on the resource that day */
|
|
10
13
|
costAmortized: number;
|
|
11
14
|
summary: MetricSummary[];
|
|
15
|
+
/** optional for drill-down scenarios */
|
|
12
16
|
hourlyData?: HourlyMetrics[];
|
|
13
17
|
}
|
|
14
18
|
export interface MetricSummary {
|
|
@@ -16,21 +20,31 @@ export interface MetricSummary {
|
|
|
16
20
|
average: number;
|
|
17
21
|
peak: number;
|
|
18
22
|
percentile95: number;
|
|
23
|
+
percentile99: number;
|
|
24
|
+
/** e.g. percent, GB, request/sec etc */
|
|
19
25
|
unit?: string;
|
|
26
|
+
/** Additional context for the metric */
|
|
20
27
|
context?: MetricContext;
|
|
21
28
|
}
|
|
22
29
|
export interface MetricContext {
|
|
30
|
+
/** e.g., total RAM available for memory metrics */
|
|
23
31
|
capacity?: number;
|
|
32
|
+
/** e.g., "GB" for capacity */
|
|
24
33
|
unit?: string;
|
|
34
|
+
/** e.g., warning threshold */
|
|
25
35
|
threshold?: number;
|
|
26
36
|
}
|
|
27
37
|
export interface HourlyMetrics {
|
|
38
|
+
/** [0, 1, 2, 3, ..., 23] - define once */
|
|
28
39
|
hours: number[];
|
|
29
40
|
metrics: HourlyMetricData[];
|
|
30
41
|
}
|
|
31
42
|
export interface HourlyMetricData {
|
|
43
|
+
/** e.g. "CPU" */
|
|
32
44
|
name: string;
|
|
45
|
+
/** 24 values corresponding to hours array */
|
|
33
46
|
values: number[];
|
|
47
|
+
/** e.g. percent, GB, request/sec etc */
|
|
34
48
|
unit?: string;
|
|
35
49
|
}
|
|
36
50
|
export interface MetricUsageSummary {
|
|
@@ -92,6 +106,7 @@ export interface MetricStats {
|
|
|
92
106
|
trend: number;
|
|
93
107
|
variance: number;
|
|
94
108
|
count: number;
|
|
109
|
+
/** for availability metrics */
|
|
95
110
|
uptime?: number;
|
|
96
111
|
peakHours?: number;
|
|
97
112
|
offPeakHours?: number;
|
|
@@ -106,19 +121,27 @@ export interface MetricStats {
|
|
|
106
121
|
}
|
|
107
122
|
export interface AlertCondition {
|
|
108
123
|
severity: 'info' | 'warning' | 'critical' | 'underutilized';
|
|
124
|
+
/** JSONata expression */
|
|
109
125
|
expression: string;
|
|
110
126
|
description: string;
|
|
111
127
|
}
|
|
112
128
|
export interface MetricPlot {
|
|
129
|
+
/** e.g. "CPU and Memory Utilization" */
|
|
113
130
|
title: string;
|
|
131
|
+
/** name of the metric plot filename such as cpupercentage_memorypercentage */
|
|
114
132
|
name: string;
|
|
133
|
+
/** order of the metric plot */
|
|
115
134
|
priority: number;
|
|
135
|
+
/** reasoning of the metric plot */
|
|
116
136
|
reasoning: string;
|
|
117
137
|
metrics: MetricPlotMetric[];
|
|
118
138
|
}
|
|
119
139
|
export interface MetricPlotMetric {
|
|
140
|
+
/** e.g. CPU Utilization */
|
|
120
141
|
name: string;
|
|
142
|
+
/** e.g. "CPU Utilization is the percentage of CPU time used by the resource." */
|
|
121
143
|
description: string;
|
|
144
|
+
/** e.g. "CPU Utilization is the percentage of CPU time used by the resource." */
|
|
122
145
|
details: string;
|
|
123
146
|
alerts: MetricAlert[];
|
|
124
147
|
stats: MetricStats;
|
|
@@ -191,11 +214,15 @@ export interface AzureTimeSeries {
|
|
|
191
214
|
data: AzureTimeSeriesData[];
|
|
192
215
|
}
|
|
193
216
|
export interface AzureTimeSeriesMetadata {
|
|
217
|
+
/** name such "Instance" or "Model" or "API Name" or "Tier" */
|
|
194
218
|
name: string;
|
|
219
|
+
/** value such as "WN0SDWK00030D" or "gpt-5" or "GetBlobServiceProperties" or "Hot" */
|
|
195
220
|
value: string;
|
|
196
221
|
}
|
|
197
222
|
export interface AzureTimeSeriesData {
|
|
223
|
+
/** Value */
|
|
198
224
|
v?: number;
|
|
225
|
+
/** Timestamp */
|
|
199
226
|
t: number;
|
|
200
227
|
}
|
|
201
228
|
export interface AzureResourceMetric {
|