@spottoai/types-package 1.0.0

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.
Files changed (107) hide show
  1. package/LICENSE +43 -0
  2. package/README.md +120 -0
  3. package/dist/accounts/accounts.d.ts +33 -0
  4. package/dist/accounts/accounts.d.ts.map +1 -0
  5. package/dist/accounts/accounts.js +3 -0
  6. package/dist/accounts/accounts.js.map +1 -0
  7. package/dist/accounts/index.d.ts +2 -0
  8. package/dist/accounts/index.d.ts.map +1 -0
  9. package/dist/accounts/index.js +18 -0
  10. package/dist/accounts/index.js.map +1 -0
  11. package/dist/ai/index.d.ts +37 -0
  12. package/dist/ai/index.d.ts.map +1 -0
  13. package/dist/ai/index.js +4 -0
  14. package/dist/ai/index.js.map +1 -0
  15. package/dist/azure/budgets.d.ts +9 -0
  16. package/dist/azure/budgets.d.ts.map +1 -0
  17. package/dist/azure/budgets.js +3 -0
  18. package/dist/azure/budgets.js.map +1 -0
  19. package/dist/azure/common.d.ts +51 -0
  20. package/dist/azure/common.d.ts.map +1 -0
  21. package/dist/azure/common.js +3 -0
  22. package/dist/azure/common.js.map +1 -0
  23. package/dist/azure/configs.d.ts +47 -0
  24. package/dist/azure/configs.d.ts.map +1 -0
  25. package/dist/azure/configs.js +3 -0
  26. package/dist/azure/configs.js.map +1 -0
  27. package/dist/azure/metrics.d.ts +231 -0
  28. package/dist/azure/metrics.d.ts.map +1 -0
  29. package/dist/azure/metrics.js +3 -0
  30. package/dist/azure/metrics.js.map +1 -0
  31. package/dist/azure/payloads.d.ts +36 -0
  32. package/dist/azure/payloads.d.ts.map +1 -0
  33. package/dist/azure/payloads.js +3 -0
  34. package/dist/azure/payloads.js.map +1 -0
  35. package/dist/azure/prices.d.ts +151 -0
  36. package/dist/azure/prices.d.ts.map +1 -0
  37. package/dist/azure/prices.js +3 -0
  38. package/dist/azure/prices.js.map +1 -0
  39. package/dist/azure/recommendationState.d.ts +33 -0
  40. package/dist/azure/recommendationState.d.ts.map +1 -0
  41. package/dist/azure/recommendationState.js +3 -0
  42. package/dist/azure/recommendationState.js.map +1 -0
  43. package/dist/azure/recommendations.d.ts +113 -0
  44. package/dist/azure/recommendations.d.ts.map +1 -0
  45. package/dist/azure/recommendations.js +14 -0
  46. package/dist/azure/recommendations.js.map +1 -0
  47. package/dist/azure/reports.d.ts +38 -0
  48. package/dist/azure/reports.d.ts.map +1 -0
  49. package/dist/azure/reports.js +3 -0
  50. package/dist/azure/reports.js.map +1 -0
  51. package/dist/azure/resources.d.ts +42 -0
  52. package/dist/azure/resources.d.ts.map +1 -0
  53. package/dist/azure/resources.js +3 -0
  54. package/dist/azure/resources.js.map +1 -0
  55. package/dist/azure/subscriptions.d.ts +82 -0
  56. package/dist/azure/subscriptions.d.ts.map +1 -0
  57. package/dist/azure/subscriptions.js +3 -0
  58. package/dist/azure/subscriptions.js.map +1 -0
  59. package/dist/azure/views.d.ts +90 -0
  60. package/dist/azure/views.d.ts.map +1 -0
  61. package/dist/azure/views.js +3 -0
  62. package/dist/azure/views.js.map +1 -0
  63. package/dist/common/index.d.ts +2 -0
  64. package/dist/common/index.d.ts.map +1 -0
  65. package/dist/common/index.js +18 -0
  66. package/dist/common/index.js.map +1 -0
  67. package/dist/common/pagination.d.ts +12 -0
  68. package/dist/common/pagination.d.ts.map +1 -0
  69. package/dist/common/pagination.js +3 -0
  70. package/dist/common/pagination.js.map +1 -0
  71. package/dist/company/company.d.ts +33 -0
  72. package/dist/company/company.d.ts.map +1 -0
  73. package/dist/company/company.js +3 -0
  74. package/dist/company/company.js.map +1 -0
  75. package/dist/company/index.d.ts +4 -0
  76. package/dist/company/index.d.ts.map +1 -0
  77. package/dist/company/index.js +20 -0
  78. package/dist/company/index.js.map +1 -0
  79. package/dist/company/notification.d.ts +36 -0
  80. package/dist/company/notification.d.ts.map +1 -0
  81. package/dist/company/notification.js +39 -0
  82. package/dist/company/notification.js.map +1 -0
  83. package/dist/company/survey.d.ts +39 -0
  84. package/dist/company/survey.d.ts.map +1 -0
  85. package/dist/company/survey.js +3 -0
  86. package/dist/company/survey.js.map +1 -0
  87. package/dist/feedbacks/feedback.d.ts +13 -0
  88. package/dist/feedbacks/feedback.d.ts.map +1 -0
  89. package/dist/feedbacks/feedback.js +3 -0
  90. package/dist/feedbacks/feedback.js.map +1 -0
  91. package/dist/index.d.ts +18 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.js +35 -0
  94. package/dist/index.js.map +1 -0
  95. package/dist/users/companyUser.d.ts +14 -0
  96. package/dist/users/companyUser.d.ts.map +1 -0
  97. package/dist/users/companyUser.js +7 -0
  98. package/dist/users/companyUser.js.map +1 -0
  99. package/dist/users/index.d.ts +3 -0
  100. package/dist/users/index.d.ts.map +1 -0
  101. package/dist/users/index.js +19 -0
  102. package/dist/users/index.js.map +1 -0
  103. package/dist/users/user.d.ts +27 -0
  104. package/dist/users/user.d.ts.map +1 -0
  105. package/dist/users/user.js +3 -0
  106. package/dist/users/user.js.map +1 -0
  107. package/package.json +55 -0
package/LICENSE ADDED
@@ -0,0 +1,43 @@
1
+ PROPRIETARY LICENSE AGREEMENT
2
+
3
+ Copyright (c) 2024 Spotto AI (www.spotto.ai)
4
+
5
+ This software and associated documentation files (the "Software") are the proprietary
6
+ and confidential information of Spotto AI. The Software is made available publicly
7
+ solely for internal use by Spotto AI and its authorized projects.
8
+
9
+ RESTRICTIONS:
10
+
11
+ 1. NO PERMISSION TO USE: Except as expressly stated below, no person or entity is
12
+ granted any right, title, or interest in or to the Software.
13
+
14
+ 2. INTERNAL USE ONLY: The Software may only be used internally by Spotto AI and its
15
+ authorized projects for development, testing, and deployment purposes.
16
+
17
+ 3. NO REDISTRIBUTION: The Software may not be redistributed, sold, leased, or
18
+ otherwise made available to third parties.
19
+
20
+ 4. NO DERIVATIVE WORKS: No derivative works based on the Software may be created
21
+ without explicit written permission from Spotto AI.
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
package/README.md ADDED
@@ -0,0 +1,120 @@
1
+ # Types Package
2
+
3
+ A shared TypeScript interfaces package for private repositories. This package contains common interfaces that can be reused across your API, frontend, and backend projects.
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.
9
+
10
+ ## Features
11
+
12
+ - **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 for private repositories
14
+ - **TypeScript Declaration Files**: Built with declaration files for better IDE support
15
+ - **Modular Structure**: Organized by domain (API, Database, Frontend, Backend)
16
+
17
+ ## Installation
18
+
19
+ Since this is a private repository, you'll need to use Git dependencies instead of npm. Add this to your consuming project's `package.json`:
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`:
21
+
22
+ ```json
23
+ {
24
+ "dependencies": {
25
+ "@spotto/types-package": "git+https://github.com/spottoai/types-package.git#main"
26
+ }
27
+ }
28
+ ```
29
+
30
+ Or for a specific branch/tag:
31
+
32
+ ```json
33
+ {
34
+ "dependencies": {
35
+ "@spotto/types-package": "git+https://github.com/spottoai/types-package.git#v1.0.0"
36
+ }
37
+ }
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ ### Importing Interfaces
43
+
44
+ ```typescript
45
+ // Import all interfaces
46
+ import * as Types from '@spotto/types-package';
47
+
48
+ // Import specific interfaces
49
+ import { User } from '@spotto/types-package';
50
+ ```
51
+ ## Development
52
+
53
+ ### Setup
54
+
55
+ 1. Clone the repository
56
+ 2. Install dependencies:
57
+ ```bash
58
+ npm install
59
+ ```
60
+
61
+ ### Building
62
+
63
+ ```bash
64
+ # Build the package
65
+ npm run build
66
+
67
+ # Watch mode for development
68
+ npm run dev
69
+
70
+ # Clean build artifacts
71
+ npm run clean
72
+
73
+ # Code linting
74
+ npm run lint
75
+
76
+ # Code formatting
77
+ npm run format
78
+
79
+ # Build with checks
80
+ npm run build:check
81
+ ```
82
+
83
+ ### Adding New Interfaces
84
+
85
+ 1. Create new interface files in the appropriate `src/` subdirectory
86
+ 2. Export them from the corresponding index file
87
+ 3. Update the main `src/index.ts` if needed
88
+ 4. Build the package: `npm run build`
89
+
90
+ ### Directory Structure
91
+
92
+ ```
93
+ src/
94
+ ├── example/
95
+ │ └── common.ts # Common types
96
+ └── index.ts # Main export file
97
+ ```
98
+
99
+ ## Versioning
100
+
101
+ This package follows semantic versioning. When making changes:
102
+
103
+ 1. Update the version in `package.json`
104
+ 2. Create a Git tag for the new version
105
+ 3. Push the tag to the repository
106
+
107
+ ## Contributing
108
+
109
+ 1. Create a feature branch
110
+ 2. Add your new interfaces or modifications
111
+ 3. Update the main index file if needed
112
+ 4. Build and test the package
113
+ 5. Submit a pull request
114
+
115
+ ## License
116
+
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
@@ -0,0 +1,33 @@
1
+ import { SurveyResponse } from '../company';
2
+ export interface CloudAccount {
3
+ companyId: string;
4
+ id: string;
5
+ name: string;
6
+ companyName: string;
7
+ provider: string;
8
+ tenantId?: string;
9
+ secret?: string;
10
+ secretExpiresAt?: Date;
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ createdBy: string;
14
+ status: string;
15
+ objectives?: SurveyResponse[];
16
+ }
17
+ export interface SubscriptionAccount {
18
+ id: string;
19
+ companyId: string;
20
+ name: string;
21
+ cloudAccountId: string;
22
+ cloudAccountName: string;
23
+ status?: string;
24
+ error?: string;
25
+ lastUpdated?: string;
26
+ quotaId?: string;
27
+ duration?: string;
28
+ currency?: string;
29
+ currencySymbol?: string;
30
+ foundCurrency?: boolean;
31
+ ready?: boolean;
32
+ }
33
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +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,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/accounts/accounts.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './accounts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/accounts/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./accounts"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/accounts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B"}
@@ -0,0 +1,37 @@
1
+ export type AIResponseStatus = 'complete' | 'needs_clarification' | 'needs_more_metrics';
2
+ export type RecommendationPillar = 'Cost Optimization' | 'Performance Efficiency' | 'Security' | 'Reliability' | 'Operational Excellence';
3
+ export type RecommendationType = 'advisor' | 'custom' | 'ai_generated';
4
+ export interface RecommendationAction {
5
+ action: 'fix';
6
+ recommendation_id: string;
7
+ }
8
+ export interface AIRecommendation {
9
+ priority_rank: number;
10
+ pillar: RecommendationPillar;
11
+ description: string;
12
+ type: RecommendationType;
13
+ reference_ids: string[];
14
+ actions: RecommendationAction[];
15
+ }
16
+ export interface StructuredAIResponse {
17
+ status: AIResponseStatus;
18
+ clarification_request: string | null;
19
+ metrics_request: string[];
20
+ friendly_message: string;
21
+ recommendations: AIRecommendation[];
22
+ }
23
+ export interface PageContext {
24
+ pageType: 'resource-detail' | 'recommendation-detail' | 'dashboard' | string;
25
+ resourceId?: string;
26
+ recommendationId?: string;
27
+ subscriptionId?: string;
28
+ pageUrl?: string;
29
+ }
30
+ export interface AIMessage {
31
+ role: 'user' | 'assistant';
32
+ content: string;
33
+ timestamp: Date | string;
34
+ structuredResponse?: StructuredAIResponse;
35
+ responseId?: string;
36
+ }
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAEA,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;AAGD,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;AAGD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Common AI interfaces shared between frontend and backend
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":";AAAA,2DAA2D"}
@@ -0,0 +1,9 @@
1
+ export interface Budget {
2
+ name: string;
3
+ startDate: string;
4
+ endDate: string;
5
+ amount: number;
6
+ currentSpend: number;
7
+ forecastedSpend: number;
8
+ }
9
+ //# sourceMappingURL=budgets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"budgets.d.ts","sourceRoot":"","sources":["../../src/azure/budgets.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=budgets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"budgets.js","sourceRoot":"","sources":["../../src/azure/budgets.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ export interface AzureLocation {
2
+ name: string;
3
+ displayName: string;
4
+ }
5
+ export interface MonthSummaryEntry {
6
+ month: string;
7
+ cost?: number;
8
+ costAmortized?: number;
9
+ startDate?: string;
10
+ endDate?: string;
11
+ resourceTypes: ResourceCostType[];
12
+ }
13
+ export interface ResourceCostType {
14
+ name: string;
15
+ cost: number;
16
+ costAmortized?: number;
17
+ }
18
+ export interface MonthSummary {
19
+ entries: MonthSummaryEntry[];
20
+ lastUpdated: string;
21
+ }
22
+ export interface ActiveDates {
23
+ startDate: number;
24
+ endDate: number;
25
+ }
26
+ export interface SpecItem {
27
+ name: string;
28
+ value: string;
29
+ unit: string;
30
+ }
31
+ export interface Link {
32
+ name: string;
33
+ url: string;
34
+ }
35
+ export interface LogAnalyticsResponse {
36
+ tables: Array<LogAnalyticsTable>;
37
+ }
38
+ export interface LogAnalyticsTable {
39
+ name: string;
40
+ columns: Array<{
41
+ name: string;
42
+ type: string;
43
+ }>;
44
+ rows: unknown[][];
45
+ }
46
+ export interface ActivityLog {
47
+ caller: string;
48
+ change: string;
49
+ timestamp: string;
50
+ }
51
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +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;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,KAAK,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,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/azure/common.ts"],"names":[],"mappings":""}
@@ -0,0 +1,47 @@
1
+ import { MetricDescription, MetricsDisplay } from './metrics.js';
2
+ import { ResourceLink, ResourceTypeReference } from './resources.js';
3
+ import { AzureResourceMetric } from './metrics.js';
4
+ export interface ResourceConfig {
5
+ resourceGroups: ResourceConfigItem;
6
+ resourcesAll: ResourceConfigItem;
7
+ resources: ResourceConfigItem[];
8
+ }
9
+ export interface ResourceConfigItem {
10
+ url: string;
11
+ doc: string;
12
+ links?: ResourceLink[];
13
+ overrideParentProperty?: string;
14
+ overrideSourceProperty?: string;
15
+ isArray?: boolean;
16
+ mandatory?: boolean;
17
+ supporting?: boolean;
18
+ displayServiceName?: string;
19
+ displayServiceNameExpression?: string;
20
+ icon?: string;
21
+ iconExpression?: string;
22
+ description?: string;
23
+ descriptionExpression?: string;
24
+ product?: string;
25
+ productExpression?: string;
26
+ references: {
27
+ [key: string]: ResourceTypeReference;
28
+ };
29
+ metrics?: AzureResourceMetric[];
30
+ metricsDescription?: MetricDescription[];
31
+ metricsDisplay?: MetricsDisplay[];
32
+ name: string;
33
+ type: string;
34
+ parameters: object;
35
+ alias: AliasConfig;
36
+ resources: ResourceConfigItem[];
37
+ serviceName?: string;
38
+ label1?: string;
39
+ label2?: string;
40
+ label3?: string;
41
+ sku?: string;
42
+ }
43
+ export interface AliasConfig {
44
+ properties: string[];
45
+ referenceType: string;
46
+ }
47
+ //# sourceMappingURL=configs.d.ts.map
@@ -0,0 +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;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;IAGlC,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,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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=configs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configs.js","sourceRoot":"","sources":["../../src/azure/configs.ts"],"names":[],"mappings":""}
@@ -0,0 +1,231 @@
1
+ export interface DisplayMetric {
2
+ name: string;
3
+ value: string;
4
+ status?: 'good' | 'warning' | 'error';
5
+ children?: DisplayMetric[];
6
+ }
7
+ export interface DailyMetrics {
8
+ date: number;
9
+ spend: number;
10
+ costAmortized: number;
11
+ summary: MetricSummary[];
12
+ hourlyData?: HourlyMetrics[];
13
+ }
14
+ export interface MetricSummary {
15
+ name: string;
16
+ average: number;
17
+ peak: number;
18
+ percentile95: number;
19
+ unit?: string;
20
+ context?: MetricContext;
21
+ }
22
+ export interface MetricContext {
23
+ capacity?: number;
24
+ unit?: string;
25
+ threshold?: number;
26
+ }
27
+ export interface HourlyMetrics {
28
+ hours: number[];
29
+ metrics: HourlyMetricData[];
30
+ }
31
+ export interface HourlyMetricData {
32
+ name: string;
33
+ values: number[];
34
+ unit?: string;
35
+ }
36
+ export interface MetricUsageSummary {
37
+ runningHours: number;
38
+ longestInactiveStretch: number;
39
+ totalFullDayInactivities: number;
40
+ totalInactiveIntervals: number;
41
+ totalActiveIntervals: number;
42
+ totalActiveHours: number;
43
+ }
44
+ export interface ScaleProfile {
45
+ name: string;
46
+ capacity: {
47
+ minimum: string;
48
+ maximum: string;
49
+ default: string;
50
+ };
51
+ rules: ScaleRule[];
52
+ }
53
+ export interface ScaleRule {
54
+ metricTrigger: MetricTrigger;
55
+ scaleAction: ScaleAction;
56
+ }
57
+ export interface MetricTrigger {
58
+ metricName: string;
59
+ metricNamespace: string;
60
+ metricResourceUri: string;
61
+ metricResourceLocation: string;
62
+ timeGrain: string;
63
+ statistic: string;
64
+ timeWindow: string;
65
+ timeAggregation: string;
66
+ operator: string;
67
+ threshold: number;
68
+ dimensions: Array<{
69
+ name: string;
70
+ value: string;
71
+ }>;
72
+ dividePerInstance: boolean;
73
+ }
74
+ export interface ScaleAction {
75
+ direction: string;
76
+ type: string;
77
+ value: string;
78
+ cooldown: string;
79
+ }
80
+ export type WorkloadType = 'WebApp' | 'API' | 'BatchProcessing' | 'DatabaseWorkload' | 'General';
81
+ export interface MetricStats {
82
+ average: number;
83
+ median: number;
84
+ p50: number;
85
+ p75: number;
86
+ p90: number;
87
+ p95: number;
88
+ p99: number;
89
+ min: number;
90
+ max: number;
91
+ frequency: number;
92
+ trend: number;
93
+ variance: number;
94
+ count: number;
95
+ uptime?: number;
96
+ peakHours?: number;
97
+ offPeakHours?: number;
98
+ totalDataPoints: number;
99
+ runningDataPoints: number;
100
+ nonRunningDataPoints: number;
101
+ runningTimePercentage: number;
102
+ longestRunningStreak: number;
103
+ longestDowntimeStreak: number;
104
+ averageUptimeStreak: number;
105
+ averageDowntimeStreak: number;
106
+ }
107
+ export interface AlertCondition {
108
+ severity: 'info' | 'warning' | 'critical' | 'underutilized';
109
+ expression: string;
110
+ description: string;
111
+ }
112
+ export interface MetricPlot {
113
+ title: string;
114
+ name: string;
115
+ priority: number;
116
+ reasoning: string;
117
+ metrics: MetricPlotMetric[];
118
+ }
119
+ export interface MetricPlotMetric {
120
+ name: string;
121
+ description: string;
122
+ details: string;
123
+ alerts: MetricAlert[];
124
+ stats: MetricStats;
125
+ }
126
+ export interface MetricsDefinition {
127
+ name: string;
128
+ metricName: string;
129
+ description: string;
130
+ details: string;
131
+ stats: MetricStats;
132
+ display?: MetricsDisplay;
133
+ alerts?: MetricAlert[];
134
+ }
135
+ export interface MetricAlert {
136
+ severity: 'info' | 'warning' | 'critical' | 'underutilized';
137
+ description: string;
138
+ }
139
+ export interface MetricDescription {
140
+ metricName: string;
141
+ name: string;
142
+ description: string;
143
+ details: string;
144
+ thresholdValue: number;
145
+ thresholdUnit: string;
146
+ thresholdReasoning: string;
147
+ confidence?: number;
148
+ confidenceFactors?: {
149
+ metricExistence: number;
150
+ intervalCompatibility: number;
151
+ optimizationValue: number;
152
+ };
153
+ alertConditions: AlertCondition[];
154
+ }
155
+ export interface MetricsDisplay {
156
+ name: string;
157
+ metrics: string[];
158
+ title: string;
159
+ yAxisTitle: string;
160
+ yAxisSuffix: string;
161
+ priority: number;
162
+ maxAxis?: number;
163
+ chartType: 'line' | 'area' | 'bar' | 'scatter';
164
+ optimizationFocus: 'cost' | 'performance' | 'reliability' | 'efficiency';
165
+ reasoning: string;
166
+ }
167
+ export interface MonthlyMetricsFile {
168
+ metadata: {
169
+ resourceType: string;
170
+ month: string;
171
+ lastUpdated: string;
172
+ totalResources: number;
173
+ metricsCollected: string[];
174
+ };
175
+ metrics: AzureResourceMetrics[];
176
+ }
177
+ export interface AzureResourceMetrics {
178
+ id: string;
179
+ metrics: AzureMetricValue[];
180
+ childMetrics?: AzureResourceMetrics[];
181
+ }
182
+ export interface AzureMetricValue {
183
+ name: string;
184
+ label: string;
185
+ collection: string;
186
+ unit: string;
187
+ timeseries: AzureTimeSeries[];
188
+ }
189
+ export interface AzureTimeSeries {
190
+ metadata: AzureTimeSeriesMetadata[];
191
+ data: AzureTimeSeriesData[];
192
+ }
193
+ export interface AzureTimeSeriesMetadata {
194
+ name: string;
195
+ value: string;
196
+ }
197
+ export interface AzureTimeSeriesData {
198
+ v?: number;
199
+ t: number;
200
+ }
201
+ export interface AzureResourceMetric {
202
+ metricName: string;
203
+ displayName: string;
204
+ timeSpan: string;
205
+ suffix: string;
206
+ isTimeSeries: boolean;
207
+ isSummaryOnly: boolean;
208
+ isSummarized: boolean;
209
+ interval?: string;
210
+ aggregationType: string;
211
+ expression?: string;
212
+ filter?: string;
213
+ metricNamespace?: string;
214
+ }
215
+ export interface UtilizationSummary {
216
+ bucket: UtilizationBucket;
217
+ scores: Record<string, number>;
218
+ trends: TrendAnalysis;
219
+ }
220
+ export interface TrendAnalysis {
221
+ direction: TrendDirection;
222
+ averageChange: number;
223
+ volatility: number;
224
+ seasonality?: {
225
+ daily?: boolean;
226
+ weekly?: boolean;
227
+ };
228
+ }
229
+ export type UtilizationBucket = 'Highly Overutilized' | 'Overutilized' | 'Underutilized' | 'Optimally Utilized';
230
+ export type TrendDirection = 'Increasing' | 'Decreasing' | 'Stable' | 'Fluctuating';
231
+ //# sourceMappingURL=metrics.d.ts.map