@spottoai/types-package 1.0.2-beta.20 → 1.0.2-beta.200
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 -11
- package/dist/accounts/accounts.d.ts +45 -3
- package/dist/accounts/accounts.d.ts.map +1 -1
- package/dist/accounts/index.d.ts +3 -0
- package/dist/accounts/index.d.ts.map +1 -1
- package/dist/accounts/index.js +3 -0
- package/dist/accounts/index.js.map +1 -1
- package/dist/accounts/readPermissions.d.ts +45 -0
- package/dist/accounts/readPermissions.d.ts.map +1 -0
- package/dist/accounts/readPermissions.js +70 -0
- package/dist/accounts/readPermissions.js.map +1 -0
- package/dist/accounts/validation.d.ts +24 -0
- package/dist/accounts/validation.d.ts.map +1 -0
- package/dist/accounts/validation.js +3 -0
- package/dist/accounts/validation.js.map +1 -0
- package/dist/accounts/writePermissions.d.ts +34 -0
- package/dist/accounts/writePermissions.d.ts.map +1 -0
- package/dist/accounts/writePermissions.js +37 -0
- package/dist/accounts/writePermissions.js.map +1 -0
- package/dist/ai/index.d.ts +975 -9
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/index.js.map +1 -1
- package/dist/azure/benefits.d.ts +137 -0
- package/dist/azure/benefits.d.ts.map +1 -0
- package/dist/azure/benefits.js +3 -0
- package/dist/azure/benefits.js.map +1 -0
- package/dist/azure/billingPlots.d.ts +249 -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/budgets.d.ts +4 -0
- package/dist/azure/budgets.d.ts.map +1 -1
- package/dist/azure/commitmentsPlanning.d.ts +159 -0
- package/dist/azure/commitmentsPlanning.d.ts.map +1 -0
- package/dist/azure/commitmentsPlanning.js +3 -0
- package/dist/azure/commitmentsPlanning.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 +75 -2
- 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/governance.d.ts +370 -0
- package/dist/azure/governance.d.ts.map +1 -0
- package/dist/azure/governance.js +8 -0
- package/dist/azure/governance.js.map +1 -0
- package/dist/azure/metrics.d.ts +75 -4
- package/dist/azure/metrics.d.ts.map +1 -1
- package/dist/azure/payloads.d.ts +20 -1
- package/dist/azure/payloads.d.ts.map +1 -1
- package/dist/azure/prices.d.ts +179 -1
- package/dist/azure/prices.d.ts.map +1 -1
- package/dist/azure/recommendationAudit.d.ts +113 -0
- package/dist/azure/recommendationAudit.d.ts.map +1 -0
- package/dist/azure/recommendationAudit.js +10 -0
- package/dist/azure/recommendationAudit.js.map +1 -0
- package/dist/azure/recommendationState.d.ts +91 -2
- package/dist/azure/recommendationState.d.ts.map +1 -1
- package/dist/azure/recommendations.d.ts +362 -5
- package/dist/azure/recommendations.d.ts.map +1 -1
- package/dist/azure/recommendations.js.map +1 -1
- package/dist/azure/relationships.d.ts +77 -0
- package/dist/azure/relationships.d.ts.map +1 -0
- package/dist/azure/relationships.js +3 -0
- package/dist/azure/relationships.js.map +1 -0
- package/dist/azure/reports.d.ts +248 -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 +39 -0
- package/dist/azure/resources.d.ts.map +1 -1
- package/dist/azure/reviewChecklist.d.ts +139 -0
- package/dist/azure/reviewChecklist.d.ts.map +1 -0
- package/dist/azure/reviewChecklist.js +3 -0
- package/dist/azure/reviewChecklist.js.map +1 -0
- package/dist/azure/security.d.ts +15 -1
- package/dist/azure/security.d.ts.map +1 -1
- package/dist/azure/serviceRetirement.d.ts +28 -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/serviceRetirementState.d.ts +22 -0
- package/dist/azure/serviceRetirementState.d.ts.map +1 -0
- package/dist/azure/serviceRetirementState.js +3 -0
- package/dist/azure/serviceRetirementState.js.map +1 -0
- package/dist/azure/storage-inventory.d.ts +241 -0
- package/dist/azure/storage-inventory.d.ts.map +1 -0
- package/dist/azure/storage-inventory.js +3 -0
- package/dist/azure/storage-inventory.js.map +1 -0
- package/dist/azure/subscriptions.d.ts +34 -13
- package/dist/azure/subscriptions.d.ts.map +1 -1
- package/dist/azure/views.d.ts +149 -3
- package/dist/azure/views.d.ts.map +1 -1
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +1 -0
- package/dist/common/index.js.map +1 -1
- package/dist/common/pagination.d.ts +3 -0
- package/dist/common/pagination.d.ts.map +1 -1
- package/dist/common/provider.d.ts +9 -0
- package/dist/common/provider.d.ts.map +1 -0
- package/dist/common/provider.js +9 -0
- package/dist/common/provider.js.map +1 -0
- package/dist/company/billingAccount.d.ts +30 -0
- package/dist/company/billingAccount.d.ts.map +1 -0
- package/dist/company/billingAccount.js +3 -0
- package/dist/company/billingAccount.js.map +1 -0
- package/dist/company/company.d.ts +28 -1
- package/dist/company/company.d.ts.map +1 -1
- package/dist/company/index.d.ts +1 -0
- package/dist/company/index.d.ts.map +1 -1
- package/dist/company/index.js +1 -0
- package/dist/company/index.js.map +1 -1
- package/dist/company/notification.d.ts +31 -1
- package/dist/company/notification.d.ts.map +1 -1
- package/dist/company/notification.js +24 -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/alertDefinitionRun.d.ts +23 -0
- package/dist/events/alertDefinitionRun.d.ts.map +1 -0
- package/dist/events/alertDefinitionRun.js +3 -0
- package/dist/events/alertDefinitionRun.js.map +1 -0
- package/dist/events/baseAlert.d.ts +130 -0
- package/dist/events/baseAlert.d.ts.map +1 -0
- package/dist/events/baseAlert.js +3 -0
- package/dist/events/baseAlert.js.map +1 -0
- package/dist/events/cost.d.ts +361 -0
- package/dist/events/cost.d.ts.map +1 -0
- package/dist/events/cost.js +3 -0
- package/dist/events/cost.js.map +1 -0
- package/dist/events/costAnomalies.d.ts +47 -0
- package/dist/events/costAnomalies.d.ts.map +1 -0
- package/dist/events/costAnomalies.js +3 -0
- package/dist/events/costAnomalies.js.map +1 -0
- package/dist/events/costViews.d.ts +23 -0
- package/dist/events/costViews.d.ts.map +1 -0
- package/dist/events/costViews.js +3 -0
- package/dist/events/costViews.js.map +1 -0
- package/dist/events/eventStatus.d.ts +67 -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 +7 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +23 -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 +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/halo.d.ts +76 -0
- package/dist/integrations/halo.d.ts.map +1 -0
- package/dist/integrations/halo.js +3 -0
- package/dist/integrations/halo.js.map +1 -0
- package/dist/integrations/index.d.ts +3 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +19 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/integrationTickets.d.ts +67 -0
- package/dist/integrations/integrationTickets.d.ts.map +1 -0
- package/dist/integrations/integrationTickets.js +3 -0
- package/dist/integrations/integrationTickets.js.map +1 -0
- package/dist/scheduler/index.d.ts +2 -0
- package/dist/scheduler/index.d.ts.map +1 -0
- package/dist/scheduler/index.js +18 -0
- package/dist/scheduler/index.js.map +1 -0
- package/dist/scheduler/scheduler.d.ts +110 -0
- package/dist/scheduler/scheduler.d.ts.map +1 -0
- package/dist/scheduler/scheduler.js +3 -0
- package/dist/scheduler/scheduler.js.map +1 -0
- package/dist/tags/index.d.ts +2 -0
- package/dist/tags/index.d.ts.map +1 -0
- package/dist/tags/index.js +18 -0
- package/dist/tags/index.js.map +1 -0
- package/dist/tags/tags.d.ts +26 -0
- package/dist/tags/tags.d.ts.map +1 -0
- package/dist/tags/tags.js +10 -0
- package/dist/tags/tags.js.map +1 -0
- package/dist/unknown/services.d.ts +12 -0
- package/dist/unknown/services.d.ts.map +1 -0
- package/dist/unknown/services.js +3 -0
- package/dist/unknown/services.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payloads.d.ts","sourceRoot":"","sources":["../../src/azure/payloads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"payloads.d.ts","sourceRoot":"","sources":["../../src/azure/payloads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAE5E,MAAM,WAAW,cAAc;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EA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CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
package/dist/azure/prices.d.ts
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import { ActiveDates, SpecItem } from './common.js';
|
|
2
2
|
import { DailyMetrics, DisplayMetric } from './metrics.js';
|
|
3
|
+
import type { SpendDataSource } from './subscriptions.js';
|
|
4
|
+
export type ResourceCostSource = SpendDataSource;
|
|
5
|
+
export type CostSourceConfidence = 'high' | 'unknown';
|
|
6
|
+
export interface CostDateRangeMetadata {
|
|
7
|
+
startDate: number;
|
|
8
|
+
endDate: number;
|
|
9
|
+
}
|
|
3
10
|
export interface CostDetails {
|
|
11
|
+
/** the amount spend on the resource over the last 30 days */
|
|
4
12
|
dailySpend?: ResourceSpend[];
|
|
13
|
+
/** the spend items aggregated for the last 30 days */
|
|
5
14
|
spendSummary?: ResourceSpend[];
|
|
15
|
+
/** the spend items aggregated for the previous 30 days */
|
|
6
16
|
spendSummaryPrevious?: ResourceSpend[];
|
|
17
|
+
/** the total amount spend on the resource over the last 30 days */
|
|
7
18
|
totalSpend30Days?: number;
|
|
19
|
+
/** the total amount spend on the resource over the previous 30 days */
|
|
8
20
|
totalSpend30DaysPrevious?: number;
|
|
21
|
+
/** the total amount spend on the resource over the last 30 days, taking into account reserved instances and savings plans */
|
|
9
22
|
totalSpend30DaysAmortized?: number;
|
|
23
|
+
/** the total amount spend on the resource over the previous 30 days, taking into account reserved instances and savings plans */
|
|
10
24
|
totalSpend30DaysAmortizedPrevious?: number;
|
|
11
25
|
retailPrices?: AzurePrice[];
|
|
12
26
|
}
|
|
@@ -18,6 +32,7 @@ export interface AzurePrice {
|
|
|
18
32
|
unitPrice: number;
|
|
19
33
|
armRegionName: string;
|
|
20
34
|
location: string;
|
|
35
|
+
/** ISO 8601 date string */
|
|
21
36
|
effectiveStartDate: string;
|
|
22
37
|
meterId: string;
|
|
23
38
|
meterName: string;
|
|
@@ -30,15 +45,22 @@ export interface AzurePrice {
|
|
|
30
45
|
serviceId: string;
|
|
31
46
|
serviceFamily: string;
|
|
32
47
|
unitOfMeasure: string;
|
|
48
|
+
/** Consumption, Reservation */
|
|
33
49
|
type: string;
|
|
34
50
|
isPrimaryMeterRegion: boolean;
|
|
35
51
|
armSkuName: string;
|
|
36
52
|
savingsPlan: SavingsPlan[];
|
|
37
53
|
monthlyPrice?: number;
|
|
54
|
+
/** Use this property to set alternative Azure pricing SKU */
|
|
38
55
|
targetAzurePrices?: AzurePrice[];
|
|
56
|
+
/** Reserved instances for this price level */
|
|
39
57
|
reservedInstances?: SavingsCostSummary[];
|
|
58
|
+
savingsPlanSummary?: SavingsCostSummary[];
|
|
59
|
+
/** Amount of money saved compared to the parent */
|
|
40
60
|
targetMonthlySavings?: number;
|
|
61
|
+
/** Percentage of money saved compared to the parent */
|
|
41
62
|
targetSavingsPercent?: number;
|
|
63
|
+
/** Show the display percent such as -10% */
|
|
42
64
|
targetSavingsPercentDisplay?: string;
|
|
43
65
|
targetSavings?: number;
|
|
44
66
|
targetSavingsDisplay?: string;
|
|
@@ -50,87 +72,239 @@ export interface AzurePrice {
|
|
|
50
72
|
displayUnitPrice?: string;
|
|
51
73
|
displayTotalPrice?: number;
|
|
52
74
|
displayQuantity?: number;
|
|
75
|
+
/** Reference to the recommendation that this target cost is associated with */
|
|
53
76
|
recommendationId?: string;
|
|
54
77
|
}
|
|
55
78
|
export interface SavingsPlan {
|
|
56
79
|
unitPrice: number;
|
|
57
80
|
retailPrice: number;
|
|
81
|
+
/** e.g., "1 Year", "3 Years" */
|
|
58
82
|
term: string;
|
|
59
83
|
}
|
|
60
84
|
export interface CostSummaryDetails {
|
|
85
|
+
/** Last 30 days */
|
|
61
86
|
total?: number;
|
|
87
|
+
/** Total cost in the previous 30 days */
|
|
62
88
|
totalPrevious?: number;
|
|
89
|
+
/** Last 30 days, taking into account reserved instances and savings plans */
|
|
63
90
|
amortizedTotal?: number;
|
|
91
|
+
/** Total cost in the previous 30 days, taking into account reserved instances and savings plans */
|
|
64
92
|
amortizedTotalPrevious?: number;
|
|
93
|
+
/** Optional active-day coverage for the 30-day spend window (e.g. 18 means 18/30 active days). */
|
|
94
|
+
coverageDays?: number;
|
|
65
95
|
items?: ResourceCostSummary[];
|
|
96
|
+
savingsRange?: SavingsRange;
|
|
66
97
|
}
|
|
67
98
|
export interface ResourceCostSummary {
|
|
99
|
+
/** e.g. "Basic Plan (B2 App)" */
|
|
68
100
|
label1: string;
|
|
101
|
+
/** e.g. "Azure App Service" */
|
|
69
102
|
label2: string;
|
|
70
103
|
label3?: string;
|
|
71
104
|
label4?: string;
|
|
105
|
+
/** e.g. "Bandwidth", "Defender for Cloud" */
|
|
72
106
|
category?: string;
|
|
107
|
+
/** e.g. Cores: 2 | RAM: 3.5GB | Storage: 10GB */
|
|
73
108
|
specs: SpecItem[];
|
|
109
|
+
/** name of the reservation if it's a reserved instance */
|
|
74
110
|
reservation?: string;
|
|
111
|
+
/** e.g. true means the resource is active, false means the resource was active (old SKU) */
|
|
75
112
|
active: boolean;
|
|
113
|
+
/** e.g. true means the resource is an addon such as Defender for Cloud, Backups, Disks, IP address, ASR */
|
|
76
114
|
addon: boolean;
|
|
115
|
+
/** e.g. 66.09 (rounded to 2 decimal places) - the amount of money spent on the resource based on the date range */
|
|
77
116
|
spend: number;
|
|
117
|
+
/** e.g. 66.09 (rounded to 2 decimal places) - the amount of money spent on the resource based on the date range, taking into account reserved instances and savings plans */
|
|
78
118
|
spendAmortized: number;
|
|
119
|
+
/** e.g. 217.21 (rounded to 2 decimal places) */
|
|
79
120
|
quantity: number;
|
|
121
|
+
/** e.g. [ { startDate: 20250601, endDate: 20250610 } ] */
|
|
80
122
|
dates?: ActiveDates[];
|
|
123
|
+
/** e.g. 0.304140 1/Hour */
|
|
81
124
|
unitPrice: string;
|
|
125
|
+
/** e.g. 0.304140 1/Hour */
|
|
82
126
|
unitPriceAmortized: string;
|
|
127
|
+
/** e.g. 730.00 (rounded to 2 decimal places) */
|
|
83
128
|
monthlyPrice?: number;
|
|
129
|
+
/** e.g. -4% */
|
|
84
130
|
retailDiscount: string;
|
|
85
131
|
retailCost?: RetailCostSummary;
|
|
86
132
|
dailyMetrics?: DailyMetrics[];
|
|
87
133
|
summaryMetrics?: DisplayMetric[];
|
|
134
|
+
/** Reference to the actual Azure resource */
|
|
88
135
|
resourceId?: string;
|
|
136
|
+
/** Human-readable resource name */
|
|
89
137
|
resourceName?: string;
|
|
138
|
+
/** Azure resource type */
|
|
90
139
|
resourceType?: string;
|
|
140
|
+
savingsRange?: SavingsRange;
|
|
141
|
+
/** Reference to the recommendation that this target cost is associated with */
|
|
142
|
+
recommendationId?: string;
|
|
143
|
+
/** Billing and estimated split metadata */
|
|
144
|
+
costSource?: ResourceCostSource;
|
|
145
|
+
costSourceConfidence?: CostSourceConfidence;
|
|
146
|
+
costSourceDetail?: string;
|
|
147
|
+
spendActual?: number;
|
|
148
|
+
spendEstimated?: number;
|
|
149
|
+
spendAmortizedActual?: number;
|
|
150
|
+
spendAmortizedEstimated?: number;
|
|
151
|
+
/** Explainability metadata for estimated/blended rows */
|
|
152
|
+
estimationMethod?: string;
|
|
153
|
+
estimatedDaysSource?: 'metrics' | 'ma7' | 'ma14' | 'ma' | string;
|
|
154
|
+
pricingSource?: 'billing' | 'retail' | 'manual' | string;
|
|
155
|
+
estimationFormula?: string;
|
|
156
|
+
estimationInputs?: Record<string, unknown>;
|
|
157
|
+
estimationRates?: Record<string, number>;
|
|
158
|
+
estimationDetails?: Record<string, unknown>;
|
|
159
|
+
/** Per-source date ranges derived from daily records */
|
|
160
|
+
billingDateRange?: CostDateRangeMetadata;
|
|
161
|
+
estimatedDateRange?: CostDateRangeMetadata;
|
|
162
|
+
/** Optional resource-level cutoff markers (when attached at item level) */
|
|
163
|
+
billingActualThroughDate?: number;
|
|
164
|
+
estimationCutoffStartDate?: number;
|
|
165
|
+
/** Unit normalization/debug metadata */
|
|
166
|
+
quantityRaw?: number;
|
|
167
|
+
unitOfMeasureRaw?: string;
|
|
168
|
+
unitPriceRaw?: string;
|
|
169
|
+
unitPriceAmortizedRaw?: string;
|
|
170
|
+
quantityNormalized?: number;
|
|
171
|
+
unitOfMeasureNormalized?: string;
|
|
172
|
+
unitNormalizationFactor?: number;
|
|
173
|
+
}
|
|
174
|
+
export interface SavingsRange {
|
|
175
|
+
min: SavingsDetail;
|
|
176
|
+
max: SavingsDetail;
|
|
177
|
+
currentMonthly: number;
|
|
178
|
+
lowestPossibleMonthly: number;
|
|
179
|
+
/** Optional breakdown of savings scenarios (e.g. SKU changes, reservations, savings plans). */
|
|
180
|
+
metadata?: SavingsRangeOption[];
|
|
181
|
+
}
|
|
182
|
+
export interface SavingsDetail {
|
|
183
|
+
monthly: number;
|
|
184
|
+
percent: number;
|
|
185
|
+
}
|
|
186
|
+
export interface SavingsRangeOption {
|
|
187
|
+
/** Unique key for the scenario, stable within the savings response. */
|
|
188
|
+
key: string;
|
|
189
|
+
/** Human-readable description of the savings option. */
|
|
190
|
+
label: string;
|
|
191
|
+
/** Category of the savings source (target-cost, reserved-instance, savings-plan). */
|
|
192
|
+
sourceType?: 'target-cost' | 'reserved-instance' | 'savings-plan';
|
|
193
|
+
/** Commitment term if applicable (e.g. "1 Year"). */
|
|
194
|
+
term?: string;
|
|
195
|
+
/** Indicates whether pricing/savings were normalized across recommended commitments. */
|
|
196
|
+
normalized?: boolean;
|
|
197
|
+
/** Total monthly price for this option after normalization. */
|
|
198
|
+
targetMonthlyPrice: number;
|
|
199
|
+
/** Monthly savings relative to the observed spend. */
|
|
200
|
+
monthlySavings: number;
|
|
201
|
+
/** Savings percent relative to the observed spend. */
|
|
202
|
+
savingsPercent: number;
|
|
203
|
+
/** Baseline commitments inferred from current usage (reserved instances or savings plans). */
|
|
204
|
+
baselineCommitmentCount?: number;
|
|
205
|
+
/** Total commitments recommended to cover the workload. */
|
|
206
|
+
recommendedCommitmentCount?: number;
|
|
207
|
+
/** Hours that remain on PAYG after applying commitments. */
|
|
208
|
+
paygRemainderHours?: number;
|
|
91
209
|
}
|
|
92
210
|
export interface RetailCostSummary {
|
|
211
|
+
/** e.g. 0.304140 1/Hour */
|
|
93
212
|
unitPrice: string;
|
|
213
|
+
/** e.g. 730.00 (rounded to 2 decimal places) */
|
|
94
214
|
monthlyPrice: number;
|
|
215
|
+
/** e.g. 66.09 (rounded to 2 decimal places) */
|
|
95
216
|
cost: number;
|
|
96
217
|
savingsPlans?: SavingsCostSummary[];
|
|
97
218
|
reservedInstances?: SavingsCostSummary[];
|
|
219
|
+
/** This is for a multi-level target (e.g. From Windows To Linux from P2 SKU to P1 SKU) */
|
|
98
220
|
targetCost?: TargetCostSummary[];
|
|
99
221
|
}
|
|
100
222
|
export interface SavingsCostSummary {
|
|
223
|
+
/** e.g. 0.304140 1/Hour */
|
|
101
224
|
unitPrice: string;
|
|
225
|
+
/** e.g. "1 Year", "3 Years" */
|
|
102
226
|
term: string;
|
|
227
|
+
/** e.g. 730.00 (rounded to 2 decimal places) */
|
|
103
228
|
monthlyPrice: number;
|
|
229
|
+
/** e.g. 10% */
|
|
104
230
|
savingsPercent: string;
|
|
231
|
+
/** e.g. 100.00 (rounded to 2 decimal places) */
|
|
105
232
|
monthlySavings: number;
|
|
233
|
+
/**
|
|
234
|
+
* Hours covered per commitment (for example 730 hours per month for hourly commitments).
|
|
235
|
+
* Provided so callers can scale savings for multiple concurrently running instances.
|
|
236
|
+
*/
|
|
237
|
+
commitmentHoursPerInstance?: number;
|
|
238
|
+
/**
|
|
239
|
+
* Recommended number of commitments to cover the observed usage (ceil(billedHours / commitmentHoursPerInstance)).
|
|
240
|
+
*/
|
|
241
|
+
recommendedCommitmentCount?: number;
|
|
242
|
+
/** Monthly price normalized for the recommended commitment count. */
|
|
243
|
+
normalizedMonthlyPrice?: number;
|
|
244
|
+
/** Monthly savings normalized for the recommended commitment count. */
|
|
245
|
+
normalizedMonthlySavings?: number;
|
|
246
|
+
/** Savings percent normalized for the recommended commitment count. */
|
|
247
|
+
normalizedSavingsPercent?: number;
|
|
248
|
+
/** Baseline commitments derived from observed usage (before new recommendations). */
|
|
249
|
+
baselineCommitmentCount?: number;
|
|
250
|
+
/** Number of hours left on PAYG after commitments are applied. */
|
|
251
|
+
paygRemainderHours?: number;
|
|
106
252
|
}
|
|
107
253
|
export interface TargetCostSummary {
|
|
254
|
+
/** e.g. Windows to Linux migration */
|
|
108
255
|
targetLabel?: string;
|
|
256
|
+
/** e.g. Windows to Linux migration */
|
|
109
257
|
targetLabel2?: string;
|
|
258
|
+
/** e.g. "Basic Plan (B2 App)" */
|
|
110
259
|
label1: string;
|
|
260
|
+
/** e.g. "Azure App Service" */
|
|
111
261
|
label2: string;
|
|
112
262
|
label3?: string;
|
|
113
263
|
label4?: string;
|
|
264
|
+
/** e.g. Cores: 2 | RAM: 3.5GB | Storage: 10GB */
|
|
114
265
|
specs: SpecItem[];
|
|
266
|
+
/** e.g. 66.09 (rounded to 2 decimal places) */
|
|
115
267
|
cost: number;
|
|
268
|
+
/** e.g. 100.00 (rounded to 2 decimal places) */
|
|
116
269
|
savings: number;
|
|
270
|
+
/** e.g. 0.304140 1/Hour */
|
|
117
271
|
unitPrice: string;
|
|
272
|
+
/** e.g. 730.00 (rounded to 2 decimal places) */
|
|
118
273
|
monthlyPrice: number;
|
|
274
|
+
/** e.g. 100.00 (rounded to 2 decimal places) */
|
|
119
275
|
monthlySavings: number;
|
|
276
|
+
/** e.g. 10% */
|
|
120
277
|
monthlySavingsPercent: string;
|
|
278
|
+
/** Retail unit price before tenant discounts are applied */
|
|
279
|
+
unitPriceRetail?: string;
|
|
280
|
+
/** Retail monthly price before tenant discounts are applied */
|
|
281
|
+
monthlyPriceRetail?: number;
|
|
282
|
+
/** Retail cost before tenant discounts are applied */
|
|
283
|
+
costRetail?: number;
|
|
284
|
+
/** This is for a multi-level target (e.g. From Windows To Linux from P2 SKU to P1 SKU) */
|
|
121
285
|
targetCost?: TargetCostSummary[];
|
|
286
|
+
/** This is for reserved intances if it's available */
|
|
122
287
|
reservedInstances?: SavingsCostSummary[];
|
|
123
|
-
|
|
288
|
+
/** This is for savings plans if it's available */
|
|
289
|
+
savingsPlans?: SavingsCostSummary[];
|
|
290
|
+
/** Reference to the recommendation that this target cost is associated with */
|
|
124
291
|
recommendationId?: string;
|
|
292
|
+
/** Resource Type */
|
|
293
|
+
resourceType?: string;
|
|
125
294
|
}
|
|
126
295
|
export interface ResourceSpend {
|
|
296
|
+
/** the actual cost spent on the resource. We can't rename this to spend because it comes from the cost API */
|
|
127
297
|
cost: number;
|
|
298
|
+
/** the amount spent on the resource based on the amortized cost (this takes reserved instances and savings plans into account) */
|
|
128
299
|
costAmortized?: number;
|
|
129
300
|
quantity: number;
|
|
130
301
|
date?: number;
|
|
131
302
|
activeDates?: ActiveDates[];
|
|
303
|
+
/** e.g. true means the resource is active, false means the resource was active (old SKU) */
|
|
132
304
|
active?: boolean;
|
|
305
|
+
/** e.g. true means the resource is an addon such as Defender for Cloud, Backups, Disks, IP address, ASR */
|
|
133
306
|
addon?: boolean;
|
|
307
|
+
/** e.g. Backup, Data Storage, Log Storage, Advanced Threat Protection, Vulnerability Assessment, Long-term Retention Backups */
|
|
134
308
|
referenceName?: string;
|
|
135
309
|
resourceId?: string;
|
|
136
310
|
meterCategory: string;
|
|
@@ -143,6 +317,7 @@ export interface ResourceSpend {
|
|
|
143
317
|
reservationName?: string;
|
|
144
318
|
label?: string;
|
|
145
319
|
label2?: string;
|
|
320
|
+
/** e.g. Cores: 2 | RAM: 3.5GB | Storage: 10GB | IOPS: 1000 | Throughput: 100MB/s */
|
|
146
321
|
specs?: SpecItem[];
|
|
147
322
|
displayCost?: number;
|
|
148
323
|
displayQuantity?: number;
|
|
@@ -152,6 +327,9 @@ export interface ResourceSpend {
|
|
|
152
327
|
retailDiscountPercentDisplay?: string;
|
|
153
328
|
dailyMetrics?: DailyMetrics[];
|
|
154
329
|
summaryMetrics?: DisplayMetric[];
|
|
330
|
+
benefitId?: string;
|
|
331
|
+
benefitName?: string;
|
|
332
|
+
reservationId?: string;
|
|
155
333
|
}
|
|
156
334
|
export interface PricingResponse {
|
|
157
335
|
Items: AzurePrice[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prices.d.ts","sourceRoot":"","sources":["../../src/azure/prices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"prices.d.ts","sourceRoot":"","sources":["../../src/azure/prices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,CAAC;AAEtD,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,6DAA6D;IAC7D,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;IAC7B,sDAAsD;IACtD,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,0DAA0D;IAC1D,oBAAoB,CAAC,EAAE,aAAa,EAAE,CAAC;IACvC,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,6HAA6H;IAC7H,yBAAyB,CAAC,EAAE,MAAM,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,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,QAAQ;IACvB,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { ProviderName, ProviderScope } from '../common/provider';
|
|
2
|
+
export declare const RecommendationAuditRowKinds: {
|
|
3
|
+
readonly resourceTarget: "resource-view:target";
|
|
4
|
+
readonly subscriptionTarget: "scope-view:target";
|
|
5
|
+
readonly resourceProviderScopeFeed: "resource-view:providerScope-feed";
|
|
6
|
+
readonly subscriptionProviderScopeFeed: "scope-view:providerScope-feed";
|
|
7
|
+
};
|
|
8
|
+
export type RecommendationAuditRowKind = (typeof RecommendationAuditRowKinds)[keyof typeof RecommendationAuditRowKinds];
|
|
9
|
+
export type RecommendationAuditScope = 'resource' | 'subscription';
|
|
10
|
+
export type RecommendationAuditView = 'target' | 'providerScope-feed';
|
|
11
|
+
export interface RecommendationAuditQueryBase extends ProviderScope {
|
|
12
|
+
/**
|
|
13
|
+
* ISO timestamp lower bound (inclusive).
|
|
14
|
+
* Omit to let consumers default to the contract-defined lookback window.
|
|
15
|
+
*/
|
|
16
|
+
from?: string;
|
|
17
|
+
/**
|
|
18
|
+
* ISO timestamp upper bound (exclusive).
|
|
19
|
+
* Omit to let consumers default to "now".
|
|
20
|
+
*/
|
|
21
|
+
to?: string;
|
|
22
|
+
/** Optional max rows to return (service-level cap still applies). */
|
|
23
|
+
limit?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Read-time request hint to append a `Viewed` audit event.
|
|
26
|
+
* Services must suppress `Viewed` persistence for global `reader` and `admin`
|
|
27
|
+
* actors, even when `trackView` is `true`.
|
|
28
|
+
*/
|
|
29
|
+
trackView?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export type ResourceTargetRecommendationAuditQuery = RecommendationAuditQueryBase & {
|
|
32
|
+
scope: 'resource';
|
|
33
|
+
view: 'target';
|
|
34
|
+
recommendationId: string;
|
|
35
|
+
resourceId: string;
|
|
36
|
+
};
|
|
37
|
+
export type SubscriptionTargetRecommendationAuditQuery = RecommendationAuditQueryBase & {
|
|
38
|
+
scope: 'subscription';
|
|
39
|
+
view: 'target';
|
|
40
|
+
recommendationId: string;
|
|
41
|
+
resourceId?: never;
|
|
42
|
+
};
|
|
43
|
+
export type ResourceProviderScopeFeedRecommendationAuditQuery = RecommendationAuditQueryBase & {
|
|
44
|
+
scope: 'resource';
|
|
45
|
+
view: 'providerScope-feed';
|
|
46
|
+
recommendationId: string;
|
|
47
|
+
resourceId?: never;
|
|
48
|
+
};
|
|
49
|
+
export type SubscriptionProviderScopeFeedRecommendationAuditQuery = RecommendationAuditQueryBase & {
|
|
50
|
+
scope: 'subscription';
|
|
51
|
+
view: 'providerScope-feed';
|
|
52
|
+
recommendationId: string;
|
|
53
|
+
resourceId?: never;
|
|
54
|
+
};
|
|
55
|
+
export type GetRecommendationAuditQueryCanonical = ResourceTargetRecommendationAuditQuery | SubscriptionTargetRecommendationAuditQuery | ResourceProviderScopeFeedRecommendationAuditQuery | SubscriptionProviderScopeFeedRecommendationAuditQuery;
|
|
56
|
+
export type GetRecommendationAuditQuery = GetRecommendationAuditQueryCanonical;
|
|
57
|
+
export type RecommendationAuditEventType = 'Viewed' | 'Added' | 'Archived' | 'CommentAdded' | 'CommentUpdated' | 'CommentDeleted' | 'CommentPinned' | 'CommentUnpinned' | 'Shared' | 'Dismissed' | 'Restored' | 'Prioritized' | 'Unprioritized' | 'Implemented';
|
|
58
|
+
/** Flat recommendation audit row columns as persisted in `recommendationsevents`. */
|
|
59
|
+
export interface RecommendationAuditEventRowColumns {
|
|
60
|
+
CompanyId: string;
|
|
61
|
+
ProviderName: ProviderName;
|
|
62
|
+
ProviderScopeId: string;
|
|
63
|
+
/** For Azure providers, mirrors `ProviderScopeId` (subscription id). */
|
|
64
|
+
SubscriptionId: string;
|
|
65
|
+
/** Storage row discriminator derived from query scope + view contract. */
|
|
66
|
+
RowKind: RecommendationAuditRowKind;
|
|
67
|
+
ResourceId?: string | null;
|
|
68
|
+
RecommendationId: string;
|
|
69
|
+
EventType: RecommendationAuditEventType;
|
|
70
|
+
/** Stringified compact action metadata payload. */
|
|
71
|
+
EventDetails?: string;
|
|
72
|
+
UserId: string;
|
|
73
|
+
/**
|
|
74
|
+
* Optional actor display name.
|
|
75
|
+
* May be missing/null for legacy rows or when identity enrichment is unavailable.
|
|
76
|
+
*/
|
|
77
|
+
UserDisplayName?: string | null;
|
|
78
|
+
Source: string;
|
|
79
|
+
/** ISO timestamp for event creation. */
|
|
80
|
+
Date: string;
|
|
81
|
+
EventId: string;
|
|
82
|
+
}
|
|
83
|
+
export interface RecommendationAuditEventRow extends RecommendationAuditEventRowColumns {
|
|
84
|
+
PartitionKey: string;
|
|
85
|
+
RowKey: string;
|
|
86
|
+
}
|
|
87
|
+
/** Timeline-friendly response event DTO. */
|
|
88
|
+
export interface RecommendationAuditTimelineEvent {
|
|
89
|
+
eventId: string;
|
|
90
|
+
eventType: RecommendationAuditEventType;
|
|
91
|
+
date: string;
|
|
92
|
+
companyId: string;
|
|
93
|
+
providerName: ProviderName;
|
|
94
|
+
providerScopeId: string;
|
|
95
|
+
subscriptionId: string;
|
|
96
|
+
resourceId?: string | null;
|
|
97
|
+
recommendationId: string;
|
|
98
|
+
eventDetails?: string;
|
|
99
|
+
userId: string;
|
|
100
|
+
/**
|
|
101
|
+
* Optional actor display name.
|
|
102
|
+
* API may omit this when upstream rows do not contain `UserDisplayName`.
|
|
103
|
+
*/
|
|
104
|
+
userDisplayName?: string | null;
|
|
105
|
+
source: string;
|
|
106
|
+
rowKind: RecommendationAuditRowKind;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Canonical API response contract for recommendation audit reads.
|
|
110
|
+
* The service returns a raw event array.
|
|
111
|
+
*/
|
|
112
|
+
export type RecommendationAuditQueryResponse = RecommendationAuditTimelineEvent[];
|
|
113
|
+
//# sourceMappingURL=recommendationAudit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationAudit.d.ts","sourceRoot":"","sources":["../../src/azure/recommendationAudit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEtE,eAAO,MAAM,2BAA2B;;;;;CAK9B,CAAC;AAEX,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC;AAExH,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,cAAc,CAAC;AAEnE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,oBAAoB,CAAC;AAEtE,MAAM,WAAW,4BAA6B,SAAQ,aAAa;IACjE;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,sCAAsC,GAAG,4BAA4B,GAAG;IAClF,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG,4BAA4B,GAAG;IACtF,KAAK,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,gBAAgB,EAAE,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C,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,2BAA4B,SAAQ,kCAAkC;IACrF,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4CAA4C;AAC5C,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,4BAA4B,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,0BAA0B,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GAAG,gCAAgC,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecommendationAuditRowKinds = void 0;
|
|
4
|
+
exports.RecommendationAuditRowKinds = {
|
|
5
|
+
resourceTarget: 'resource-view:target',
|
|
6
|
+
subscriptionTarget: 'scope-view:target',
|
|
7
|
+
resourceProviderScopeFeed: 'resource-view:providerScope-feed',
|
|
8
|
+
subscriptionProviderScopeFeed: 'scope-view:providerScope-feed',
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=recommendationAudit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationAudit.js","sourceRoot":"","sources":["../../src/azure/recommendationAudit.ts"],"names":[],"mappings":";;;AAEa,QAAA,2BAA2B,GAAG;IACzC,cAAc,EAAE,sBAAsB;IACtC,kBAAkB,EAAE,mBAAmB;IACvC,yBAAyB,EAAE,kCAAkC;IAC7D,6BAA6B,EAAE,+BAA+B;CACtD,CAAC"}
|
|
@@ -1,24 +1,113 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ProviderName, ProviderScope } from '../common/provider';
|
|
2
|
+
export type CommentScope = 'resource' | 'providerScope';
|
|
3
|
+
export type ResourceRecommendationStatesQuery = {
|
|
4
|
+
providerName: ProviderName;
|
|
5
|
+
scope: 'resource';
|
|
2
6
|
resourceId: string;
|
|
3
7
|
recommendationId: string;
|
|
4
|
-
|
|
8
|
+
providerScopeId?: never;
|
|
9
|
+
};
|
|
10
|
+
export type ProviderScopeRecommendationStatesQuery = {
|
|
11
|
+
providerName: ProviderName;
|
|
12
|
+
scope: 'providerScope';
|
|
13
|
+
providerScopeId: string;
|
|
14
|
+
recommendationId: string;
|
|
15
|
+
resourceId?: never;
|
|
16
|
+
};
|
|
17
|
+
/** @deprecated Use ProviderScopeRecommendationStatesQuery */
|
|
18
|
+
export type SubscriptionRecommendationStatesQuery = ProviderScopeRecommendationStatesQuery;
|
|
19
|
+
/** @deprecated Use GetRecommendationStatesQuery */
|
|
20
|
+
export type LegacyGetRecommendationStatesQuery = {
|
|
21
|
+
providerName: ProviderName;
|
|
22
|
+
resourceId: string;
|
|
23
|
+
recommendationId?: string;
|
|
24
|
+
providerScopeId?: string;
|
|
25
|
+
} | {
|
|
26
|
+
providerName: ProviderName;
|
|
27
|
+
recommendationId?: string;
|
|
28
|
+
resourceId?: string;
|
|
29
|
+
providerScopeId: string;
|
|
30
|
+
};
|
|
31
|
+
export type GetRecommendationStatesQuery = ResourceRecommendationStatesQuery | ProviderScopeRecommendationStatesQuery;
|
|
32
|
+
/** Shared recommendation-state properties across scope variants. */
|
|
33
|
+
export interface RecommendationStateBase extends ProviderScope {
|
|
34
|
+
/**
|
|
35
|
+
* Deprecated alias retained for compatibility with older UI consumers.
|
|
36
|
+
* Prefer `providerScopeId`.
|
|
37
|
+
*/
|
|
38
|
+
subscriptionId?: string;
|
|
39
|
+
/** Row Key */
|
|
40
|
+
recommendationId: string;
|
|
41
|
+
/** Company ID to which the resource belongs */
|
|
5
42
|
companyId: string;
|
|
6
43
|
category: 'Cost' | 'Performance' | 'Security' | 'Compliance' | 'Reliability' | 'Operational Excellence';
|
|
7
44
|
impact: 'High' | 'Medium' | 'Low';
|
|
8
45
|
effort: 'High' | 'Medium' | 'Low';
|
|
46
|
+
/** true if the user has read the recommendation */
|
|
9
47
|
read: boolean;
|
|
10
48
|
status: 'Active' | 'Prioritized' | 'Dismissed' | 'Archived';
|
|
49
|
+
/** Date the recommendation was scheduled for */
|
|
11
50
|
scheduledAt?: Date;
|
|
51
|
+
/** Date the recommendation state was created */
|
|
12
52
|
createdAt: Date;
|
|
53
|
+
/** Date the recommendation state was last updated */
|
|
13
54
|
updatedAt?: Date;
|
|
55
|
+
/** true if the recommendation is flagged */
|
|
14
56
|
flagged: boolean;
|
|
57
|
+
/** Latest successful share provider (normalized lowercase channel name). */
|
|
58
|
+
integrationProviderName?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Latest successful share reference.
|
|
61
|
+
* - `jira` | `halo` | `connectwise`: external ticket id
|
|
62
|
+
* - `email`: primary recipient email
|
|
63
|
+
* - `slack` | `teams`: unset
|
|
64
|
+
*/
|
|
65
|
+
integrationTicketId?: string;
|
|
15
66
|
comments: Comment[];
|
|
67
|
+
/** ID of the pinned comment */
|
|
68
|
+
pinnedCommentId?: string;
|
|
16
69
|
history: RecommendationHistory[];
|
|
17
70
|
custom: boolean;
|
|
71
|
+
/** Date when the status started */
|
|
72
|
+
statusStartAt?: string;
|
|
73
|
+
/** Date when the status is expected to change */
|
|
74
|
+
statusEndAt?: string;
|
|
18
75
|
}
|
|
76
|
+
export interface ResourceRecommendationState extends RecommendationStateBase {
|
|
77
|
+
/**
|
|
78
|
+
* Scope discriminator for recommendation commentary identity.
|
|
79
|
+
* Resource scope identity is keyed by `resourceId + recommendationId`.
|
|
80
|
+
*/
|
|
81
|
+
scope: 'resource';
|
|
82
|
+
/** Partition Key: resourceId (Hash) */
|
|
83
|
+
resourceId: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ProviderScopeRecommendationState extends RecommendationStateBase {
|
|
86
|
+
/**
|
|
87
|
+
* Scope discriminator for recommendation commentary identity.
|
|
88
|
+
* Provider scope identity is keyed by `providerScopeId + recommendationId`.
|
|
89
|
+
*/
|
|
90
|
+
scope: 'providerScope';
|
|
91
|
+
/** Provider-scope commentary must not rely on resource identity. */
|
|
92
|
+
resourceId?: never;
|
|
93
|
+
}
|
|
94
|
+
export type RecommendationState = ResourceRecommendationState | ProviderScopeRecommendationState;
|
|
95
|
+
/** @deprecated Use RecommendationState */
|
|
96
|
+
export type LegacyRecommendationState = RecommendationStateBase & {
|
|
97
|
+
scope?: CommentScope;
|
|
98
|
+
resourceId: string;
|
|
99
|
+
};
|
|
100
|
+
/** @deprecated Use RecommendationState */
|
|
101
|
+
export type RecommendationStateRecord = RecommendationState | LegacyRecommendationState;
|
|
102
|
+
export type ResourceRecommendationStateWriteRequest = ResourceRecommendationState;
|
|
103
|
+
export type ProviderScopeRecommendationStateWriteRequest = ProviderScopeRecommendationState;
|
|
104
|
+
/** @deprecated Use ProviderScopeRecommendationStateWriteRequest */
|
|
105
|
+
export type SubscriptionRecommendationStateWriteRequest = ProviderScopeRecommendationStateWriteRequest;
|
|
106
|
+
export type SaveRecommendationStateRequest = ResourceRecommendationStateWriteRequest | ProviderScopeRecommendationStateWriteRequest;
|
|
19
107
|
export interface RecommendationHistory {
|
|
20
108
|
userId: string;
|
|
21
109
|
createdAt: Date;
|
|
110
|
+
/** restore means back from dismissed state */
|
|
22
111
|
action: 'Dismiss' | 'Restore' | 'Prioritize' | 'Unprioritize' | 'Implement';
|
|
23
112
|
reason?: string;
|
|
24
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendationState.d.ts","sourceRoot":"","sources":["../../src/azure/recommendationState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recommendationState.d.ts","sourceRoot":"","sources":["../../src/azure/recommendationState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEtE,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,eAAe,CAAC;AAExD,MAAM,MAAM,iCAAiC,GAAG;IAC9C,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,sCAAsC,GAAG;IACnD,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAE,eAAe,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,qCAAqC,GAAG,sCAAsC,CAAC;AAE3F,mDAAmD;AACnD,MAAM,MAAM,kCAAkC,GAC1C;IACE,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GACD;IACE,YAAY,EAAE,YAAY,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEN,MAAM,MAAM,4B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