@spottoai/types-package 1.0.2-beta.354 → 1.0.2-beta.356

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 (154) hide show
  1. package/README.md +11 -0
  2. package/dist/aws/commitments-planning.d.ts +3 -0
  3. package/dist/aws/commitments-planning.d.ts.map +1 -0
  4. package/dist/aws/commitments-planning.js +6 -0
  5. package/dist/aws/commitments-planning.js.map +1 -0
  6. package/dist/aws/relationships.d.ts +4 -0
  7. package/dist/aws/relationships.d.ts.map +1 -0
  8. package/dist/aws/relationships.js +6 -0
  9. package/dist/aws/relationships.js.map +1 -0
  10. package/dist/esm/accounts/accounts.js +115 -0
  11. package/dist/esm/accounts/azureSpSetup.js +1 -0
  12. package/dist/esm/accounts/azureSpSetupDurable.js +1 -0
  13. package/dist/esm/accounts/index.js +5 -0
  14. package/dist/esm/accounts/readPermissions.js +198 -0
  15. package/dist/esm/accounts/validation.js +1 -0
  16. package/dist/esm/accounts/writePermissions.js +43 -0
  17. package/dist/esm/ai/index.js +2 -0
  18. package/dist/esm/assessments/artifact.js +1 -0
  19. package/dist/esm/assessments/catalogue.js +12 -0
  20. package/dist/esm/assessments/common.js +1 -0
  21. package/dist/esm/assessments/evidence.js +1 -0
  22. package/dist/esm/assessments/export.js +1 -0
  23. package/dist/esm/assessments/index.js +10 -0
  24. package/dist/esm/assessments/queue.js +2 -0
  25. package/dist/esm/assessments/review.js +1 -0
  26. package/dist/esm/assessments/run.js +1 -0
  27. package/dist/esm/assessments/sow.js +1 -0
  28. package/dist/esm/assessments/status.js +23 -0
  29. package/dist/esm/aws/commitments-planning.js +1 -0
  30. package/dist/esm/aws/commitmentsPlanningValidation.js +121 -0
  31. package/dist/esm/aws/estates.js +21 -0
  32. package/dist/esm/aws/index.js +18 -0
  33. package/dist/esm/aws/onboarding.js +1 -0
  34. package/dist/esm/aws/pluginPublicArtifactBodyValidation.js +217 -0
  35. package/dist/esm/aws/pluginPublicArtifactEvidence.js +1 -0
  36. package/dist/esm/aws/pluginPublicArtifactManifestValidation.js +255 -0
  37. package/dist/esm/aws/pluginPublicArtifactSectionValidation.js +464 -0
  38. package/dist/esm/aws/pluginPublicArtifactValidation.js +2 -0
  39. package/dist/esm/aws/pluginPublicArtifactValidationHelpers.js +216 -0
  40. package/dist/esm/aws/pluginPublicArtifacts.js +109 -0
  41. package/dist/esm/aws/portalCommitmentsPlanningPublicArtifactValidation.js +509 -0
  42. package/dist/esm/aws/portalCommitmentsPlanningPublicArtifacts.js +1 -0
  43. package/dist/esm/aws/portalPublicArtifactCurrentValidation.js +328 -0
  44. package/dist/esm/aws/portalPublicArtifactEvidenceValidation.js +294 -0
  45. package/dist/esm/aws/portalPublicArtifactHistoryAiValidation.js +368 -0
  46. package/dist/esm/aws/portalPublicArtifactHistoryTypes.js +40 -0
  47. package/dist/esm/aws/portalPublicArtifactNestedEvidence.js +1 -0
  48. package/dist/esm/aws/portalPublicArtifactNestedEvidenceValidation.js +397 -0
  49. package/dist/esm/aws/portalPublicArtifactValidation.js +2 -0
  50. package/dist/esm/aws/portalPublicArtifactValidationCommon.js +139 -0
  51. package/dist/esm/aws/portalPublicArtifacts.js +73 -0
  52. package/dist/esm/aws/portalRelationshipPublicArtifactValidation.js +334 -0
  53. package/dist/esm/aws/portalRelationshipPublicArtifacts.js +59 -0
  54. package/dist/esm/aws/portalRelationshipResourceNodeTypes.js +1 -0
  55. package/dist/esm/aws/portalRelationshipResourceNodeValidation.js +368 -0
  56. package/dist/esm/aws/publicArtifacts.js +13 -0
  57. package/dist/esm/aws/relationships.js +1 -0
  58. package/dist/esm/aws/requests.js +19 -0
  59. package/dist/esm/azure/activityLogs.js +2 -0
  60. package/dist/esm/azure/advisorScore.js +1 -0
  61. package/dist/esm/azure/benefits.js +1 -0
  62. package/dist/esm/azure/billingGeneration.js +1 -0
  63. package/dist/esm/azure/billingPlots.js +4 -0
  64. package/dist/esm/azure/budgets.js +1 -0
  65. package/dist/esm/azure/commitmentsPlanning.js +1 -0
  66. package/dist/esm/azure/common.js +1 -0
  67. package/dist/esm/azure/configs.js +1 -0
  68. package/dist/esm/azure/costComposition.js +1 -0
  69. package/dist/esm/azure/dataProtection.js +5 -0
  70. package/dist/esm/azure/governance.js +14 -0
  71. package/dist/esm/azure/licensing.js +1 -0
  72. package/dist/esm/azure/metrics.js +1 -0
  73. package/dist/esm/azure/payloads.js +1 -0
  74. package/dist/esm/azure/portalArtifacts.js +1 -0
  75. package/dist/esm/azure/prices.js +1 -0
  76. package/dist/esm/azure/publicIpAddresses.js +2 -0
  77. package/dist/esm/azure/recommendationAudit.js +16 -0
  78. package/dist/esm/azure/recommendationState.js +1 -0
  79. package/dist/esm/azure/recommendationTracks.js +40 -0
  80. package/dist/esm/azure/recommendationWorkflow.js +13 -0
  81. package/dist/esm/azure/recommendations.js +10 -0
  82. package/dist/esm/azure/regulatoryCompliance.js +6 -0
  83. package/dist/esm/azure/relationships.js +2 -0
  84. package/dist/esm/azure/reportingTemplates.js +1 -0
  85. package/dist/esm/azure/reports.js +12 -0
  86. package/dist/esm/azure/resourceHealth.js +12 -0
  87. package/dist/esm/azure/resourceOptimization.js +1 -0
  88. package/dist/esm/azure/resources.js +1 -0
  89. package/dist/esm/azure/reviewChecklist.js +1 -0
  90. package/dist/esm/azure/secureScore.js +1 -0
  91. package/dist/esm/azure/security.js +1 -0
  92. package/dist/esm/azure/serviceRetirement.js +1 -0
  93. package/dist/esm/azure/serviceRetirementState.js +1 -0
  94. package/dist/esm/azure/serviceRetirementWorkManagement.js +1 -0
  95. package/dist/esm/azure/storage-inventory.js +1 -0
  96. package/dist/esm/azure/subscriptions.js +1 -0
  97. package/dist/esm/azure/views.js +32 -0
  98. package/dist/esm/azure/workManagement.js +4 -0
  99. package/dist/esm/common/artifactGeneration.js +1 -0
  100. package/dist/esm/common/capabilityPassport.js +214 -0
  101. package/dist/esm/common/index.js +7 -0
  102. package/dist/esm/common/pagination.js +1 -0
  103. package/dist/esm/common/provider.js +11 -0
  104. package/dist/esm/common/providerSyncProgress.js +1 -0
  105. package/dist/esm/common/relationships.js +1 -0
  106. package/dist/esm/common/syncProgress.js +1 -0
  107. package/dist/esm/company/billingAccount.js +1 -0
  108. package/dist/esm/company/company.js +1 -0
  109. package/dist/esm/company/companyHierarchy.js +1 -0
  110. package/dist/esm/company/companyNotes.js +38 -0
  111. package/dist/esm/company/customProperties.js +1 -0
  112. package/dist/esm/company/index.js +6 -0
  113. package/dist/esm/company/notification.js +43 -0
  114. package/dist/esm/company/survey.js +1 -0
  115. package/dist/esm/customProperties/customProperties.js +1 -0
  116. package/dist/esm/customProperties/index.js +1 -0
  117. package/dist/esm/entries/aws.js +3 -0
  118. package/dist/esm/entries/commitments-planning.js +3 -0
  119. package/dist/esm/entries/provider.js +3 -0
  120. package/dist/esm/entries/recommendations.js +3 -0
  121. package/dist/esm/entries/relationships.js +3 -0
  122. package/dist/esm/entries/root.js +3 -0
  123. package/dist/esm/events/actionGroups.js +1 -0
  124. package/dist/esm/events/alertDefinitionRun.js +1 -0
  125. package/dist/esm/events/baseAlert.js +1 -0
  126. package/dist/esm/events/cost.js +1 -0
  127. package/dist/esm/events/costAnomalies.js +1 -0
  128. package/dist/esm/events/costViews.js +1 -0
  129. package/dist/esm/events/eventStatus.js +1 -0
  130. package/dist/esm/events/index.js +8 -0
  131. package/dist/esm/events/quickAlerts.js +2 -0
  132. package/dist/esm/features-and-permissions/access.js +1 -0
  133. package/dist/esm/features-and-permissions/index.js +1 -0
  134. package/dist/esm/feedbacks/feedback.js +1 -0
  135. package/dist/esm/identity/apikey.js +1 -0
  136. package/dist/esm/identity/index.js +1 -0
  137. package/dist/esm/index.js +54 -0
  138. package/dist/esm/index.vite.js +48 -0
  139. package/dist/esm/integrations/autotask.js +1 -0
  140. package/dist/esm/integrations/azureDevOps.js +1 -0
  141. package/dist/esm/integrations/github.js +1 -0
  142. package/dist/esm/integrations/halo.js +1 -0
  143. package/dist/esm/integrations/index.js +5 -0
  144. package/dist/esm/integrations/integrationTickets.js +1 -0
  145. package/dist/esm/package.json +3 -0
  146. package/dist/esm/scheduler/index.js +1 -0
  147. package/dist/esm/scheduler/scheduler.js +1 -0
  148. package/dist/esm/tags/index.js +1 -0
  149. package/dist/esm/tags/tags.js +6 -0
  150. package/dist/esm/unknown/services.js +1 -0
  151. package/dist/esm/users/companyUser.js +2 -0
  152. package/dist/esm/users/index.js +2 -0
  153. package/dist/esm/users/user.js +1 -0
  154. package/package.json +23 -6
package/README.md CHANGED
@@ -44,6 +44,11 @@ import { User } from '@spottoai/types-package';
44
44
 
45
45
  // Import AWS-only public artifact contracts
46
46
  import type { AwsPortalAccountSummaryArtifact, AwsPortalResourceCollectionArtifact } from '@spottoai/types-package/aws';
47
+
48
+ // Import AWS relationship or commitments validators without loading the
49
+ // compatibility-wide AWS barrel.
50
+ import { validateAwsPortalRelationshipArtifact } from '@spottoai/types-package/aws/relationships';
51
+ import { validateAwsCommitmentsPlanningViewIdentity } from '@spottoai/types-package/aws/commitments-planning';
47
52
  ```
48
53
 
49
54
  The root entry point also exports the provider-neutral artifact generation,
@@ -62,6 +67,12 @@ relationship, and dependency-free allowlist validator. The validator binds the
62
67
  envelope, provider scope, nested applied scopes, and account-bearing ARNs while
63
68
  rejecting internal metadata, Azure-only fields, and undeclared public fields.
64
69
 
70
+ The stable `/aws/relationships` and `/aws/commitments-planning` entry points
71
+ expose those runtime contracts independently for browser consumers. The root
72
+ and `/aws` barrels remain compatibility entry points and continue to export the
73
+ same symbols. Package `import` conditions use tree-shakable native ESM while
74
+ `require` conditions retain the CommonJS compatibility build.
75
+
65
76
  The root and `/aws` entry points export the secret-free `AwsEstatesManifest`,
66
77
  AWS estate/account/billing-source command union, and company trust-setup
67
78
  contracts. The API-owned desired-state document is stored as
@@ -0,0 +1,3 @@
1
+ export type { AwsCommitmentsPlanningView } from '../azure/commitmentsPlanning';
2
+ export { validateAwsCommitmentsPlanningViewIdentity } from './commitmentsPlanningValidation';
3
+ //# sourceMappingURL=commitments-planning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitments-planning.d.ts","sourceRoot":"","sources":["../../src/aws/commitments-planning.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,0CAA0C,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateAwsCommitmentsPlanningViewIdentity = void 0;
4
+ var commitmentsPlanningValidation_1 = require("./commitmentsPlanningValidation");
5
+ Object.defineProperty(exports, "validateAwsCommitmentsPlanningViewIdentity", { enumerable: true, get: function () { return commitmentsPlanningValidation_1.validateAwsCommitmentsPlanningViewIdentity; } });
6
+ //# sourceMappingURL=commitments-planning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitments-planning.js","sourceRoot":"","sources":["../../src/aws/commitments-planning.ts"],"names":[],"mappings":";;;AACA,iFAA6F;AAApF,2JAAA,0CAA0C,OAAA"}
@@ -0,0 +1,4 @@
1
+ export { validateAwsPortalRelationshipArtifact } from './portalRelationshipPublicArtifactValidation';
2
+ export type { AwsPortalRelationshipArtifact, AwsPortalRelationshipDiscoveryFamily, } from './portalRelationshipPublicArtifacts';
3
+ export type { AwsPortalRelationshipResourceNodeData } from './portalRelationshipResourceNodeTypes';
4
+ //# sourceMappingURL=relationships.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/aws/relationships.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,MAAM,8CAA8C,CAAC;AACrG,YAAY,EACV,6BAA6B,EAC7B,oCAAoC,GACrC,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateAwsPortalRelationshipArtifact = void 0;
4
+ var portalRelationshipPublicArtifactValidation_1 = require("./portalRelationshipPublicArtifactValidation");
5
+ Object.defineProperty(exports, "validateAwsPortalRelationshipArtifact", { enumerable: true, get: function () { return portalRelationshipPublicArtifactValidation_1.validateAwsPortalRelationshipArtifact; } });
6
+ //# sourceMappingURL=relationships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.js","sourceRoot":"","sources":["../../src/aws/relationships.ts"],"names":[],"mappings":";;;AAAA,2GAAqG;AAA5F,mKAAA,qCAAqC,OAAA"}
@@ -0,0 +1,115 @@
1
+ export const AZURE_SYNC_FEATURE_ORDER = [
2
+ 'activityMonitoring',
3
+ 'metrics',
4
+ 'billing',
5
+ 'pricing',
6
+ 'costEstimation',
7
+ 'commitments',
8
+ 'relationshipGraphs',
9
+ 'governance',
10
+ 'availabilityZones',
11
+ 'reliability',
12
+ 'perimeterInsights',
13
+ 'reportEvidencePack',
14
+ ];
15
+ export const AZURE_SYNC_FEATURE_METADATA = [
16
+ {
17
+ id: 'activityMonitoring',
18
+ displayName: 'Activity monitoring',
19
+ description: 'Collects Azure activity logs and activity-derived operational events.',
20
+ supportedScopes: ['cloudAccount', 'subscription'],
21
+ warning: 'Disabling activity monitoring prevents activity log collection and related detections.',
22
+ },
23
+ {
24
+ id: 'metrics',
25
+ displayName: 'Metrics',
26
+ description: 'Collects subscription resource metrics used for utilization and rightsizing insights.',
27
+ supportedScopes: ['cloudAccount', 'subscription'],
28
+ },
29
+ {
30
+ id: 'billing',
31
+ displayName: 'Billing',
32
+ description: 'Collects billing and cost usage data.',
33
+ supportedScopes: ['cloudAccount', 'subscription'],
34
+ },
35
+ {
36
+ id: 'pricing',
37
+ displayName: 'Pricing',
38
+ description: 'Collects Azure price data used for cost calculations.',
39
+ supportedScopes: ['cloudAccount', 'subscription'],
40
+ },
41
+ {
42
+ id: 'costEstimation',
43
+ displayName: 'Cost estimation',
44
+ description: 'Builds estimated costs when billing-backed usage is unavailable or incomplete.',
45
+ supportedScopes: ['cloudAccount', 'subscription'],
46
+ },
47
+ {
48
+ id: 'commitments',
49
+ displayName: 'Reservations and commitments',
50
+ description: 'Collects reserved instances, savings plans, and commitment utilization data.',
51
+ supportedScopes: ['cloudAccount', 'subscription'],
52
+ },
53
+ {
54
+ id: 'relationshipGraphs',
55
+ displayName: 'Relationship graphs',
56
+ description: 'Builds relationship graph artifacts from scanned Azure resources.',
57
+ supportedScopes: ['cloudAccount', 'subscription'],
58
+ },
59
+ {
60
+ id: 'governance',
61
+ displayName: 'Governance',
62
+ description: 'Builds tenant and subscription governance reports and graph artifacts.',
63
+ supportedScopes: ['cloudAccount', 'subscription'],
64
+ },
65
+ {
66
+ id: 'availabilityZones',
67
+ displayName: 'Availability zones',
68
+ description: 'Collects tenant-level availability zone mappings.',
69
+ supportedScopes: ['cloudAccount'],
70
+ },
71
+ {
72
+ id: 'reliability',
73
+ displayName: 'Reliability',
74
+ description: 'Collects reliability signals and recommendations for subscription resources.',
75
+ supportedScopes: ['cloudAccount', 'subscription'],
76
+ },
77
+ {
78
+ id: 'perimeterInsights',
79
+ displayName: 'Perimeter insights',
80
+ description: 'Builds public IP and perimeter exposure insights.',
81
+ supportedScopes: ['cloudAccount', 'subscription'],
82
+ },
83
+ {
84
+ id: 'reportEvidencePack',
85
+ displayName: 'Report evidence pack',
86
+ description: 'Builds evidence artifacts used by reports and review workflows.',
87
+ supportedScopes: ['cloudAccount', 'subscription'],
88
+ },
89
+ ];
90
+ const AZURE_SYNC_FEATURE_ORDER_INDEX = new Map(AZURE_SYNC_FEATURE_ORDER.map((featureId, index) => [featureId, index]));
91
+ const AZURE_SYNC_FEATURE_IDS = new Set(AZURE_SYNC_FEATURE_ORDER);
92
+ export const isAzureSyncFeatureId = (value) => AZURE_SYNC_FEATURE_IDS.has(value);
93
+ export const getAzureSyncFeatureMetadata = (featureId) => AZURE_SYNC_FEATURE_METADATA.find(feature => feature.id === featureId) ?? {
94
+ id: featureId,
95
+ displayName: featureId,
96
+ description: '',
97
+ supportedScopes: ['cloudAccount', 'subscription'],
98
+ };
99
+ export const isAzureSyncFeatureSupportedInScope = (featureId, scope) => getAzureSyncFeatureMetadata(featureId).supportedScopes.includes(scope);
100
+ export const sortAzureSyncFeatureIds = (featureIds) => [...featureIds].sort((left, right) => (AZURE_SYNC_FEATURE_ORDER_INDEX.get(left) ?? Number.MAX_SAFE_INTEGER) - (AZURE_SYNC_FEATURE_ORDER_INDEX.get(right) ?? Number.MAX_SAFE_INTEGER));
101
+ const supportsAzureSyncFeatureScope = (feature, scope) => feature.supportedScopes.includes(scope);
102
+ export const getAzureSyncFeatureOptions = (scope) => AZURE_SYNC_FEATURE_METADATA.filter(feature => supportsAzureSyncFeatureScope(feature, scope));
103
+ export const getAzureSyncFeatureIdsForScope = (scope) => getAzureSyncFeatureOptions(scope).map(feature => feature.id);
104
+ export const SUBSCRIPTION_SYNC_STEP_ORDER = [
105
+ 'metrics',
106
+ 'resourcegroups',
107
+ 'activities',
108
+ 'queries',
109
+ 'reliability',
110
+ 'billing',
111
+ 'costestimation',
112
+ 'pricing',
113
+ 'commitments',
114
+ 'views',
115
+ ];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './accounts.js';
2
+ export * from './azureSpSetup.js';
3
+ export * from './azureSpSetupDurable.js';
4
+ export * from './writePermissions.js';
5
+ export * from './readPermissions.js';
@@ -0,0 +1,198 @@
1
+ /**
2
+ * Subscription-scoped read capability bitmask enum.
3
+ * Each capability maps to a single bit.
4
+ */
5
+ export var SubscriptionReadPermission;
6
+ (function (SubscriptionReadPermission) {
7
+ /** Permission to read Azure Monitor metrics. */
8
+ SubscriptionReadPermission[SubscriptionReadPermission["MonitoringReader"] = 1] = "MonitoringReader";
9
+ /** Permission to run Log Analytics / App Insights data queries. */
10
+ SubscriptionReadPermission[SubscriptionReadPermission["LogAnalyticsDataReader"] = 2] = "LogAnalyticsDataReader";
11
+ /** Permission to read subscription resource groups. */
12
+ SubscriptionReadPermission[SubscriptionReadPermission["ResourceGroupsReader"] = 4] = "ResourceGroupsReader";
13
+ /** Permission to read subscription resource inventory. */
14
+ SubscriptionReadPermission[SubscriptionReadPermission["ResourceInventoryReader"] = 8] = "ResourceInventoryReader";
15
+ /** Permission to read Azure Activity Log events. */
16
+ SubscriptionReadPermission[SubscriptionReadPermission["ActivityLogReader"] = 16] = "ActivityLogReader";
17
+ /** Permission to run Azure Resource Graph queries. */
18
+ SubscriptionReadPermission[SubscriptionReadPermission["ResourceGraphReader"] = 32] = "ResourceGraphReader";
19
+ /** Permission to read Azure Cost Management query results. */
20
+ SubscriptionReadPermission[SubscriptionReadPermission["CostManagementReader"] = 64] = "CostManagementReader";
21
+ /** Permission to read Azure Consumption usage details. */
22
+ SubscriptionReadPermission[SubscriptionReadPermission["ConsumptionUsageReader"] = 128] = "ConsumptionUsageReader";
23
+ /** Permission to read Azure Advisor recommendations and Advisor score. */
24
+ SubscriptionReadPermission[SubscriptionReadPermission["AdvisorRecommendationsReader"] = 256] = "AdvisorRecommendationsReader";
25
+ /** Permission to read Defender for Cloud security posture data. */
26
+ SubscriptionReadPermission[SubscriptionReadPermission["SecurityReader"] = 512] = "SecurityReader";
27
+ })(SubscriptionReadPermission || (SubscriptionReadPermission = {}));
28
+ /**
29
+ * Cloud-account-scoped read capability bitmask enum.
30
+ * Each capability maps to a single bit.
31
+ */
32
+ export var CloudAccountReadPermission;
33
+ (function (CloudAccountReadPermission) {
34
+ /** Permission to read management group entities. */
35
+ CloudAccountReadPermission[CloudAccountReadPermission["ManagementGroupReader"] = 1] = "ManagementGroupReader";
36
+ /** Permission to read reservation resources and related consumption artifacts. */
37
+ CloudAccountReadPermission[CloudAccountReadPermission["ReservationsReader"] = 2] = "ReservationsReader";
38
+ /** Permission to read savings plan resources. */
39
+ CloudAccountReadPermission[CloudAccountReadPermission["SavingsPlanReader"] = 4] = "SavingsPlanReader";
40
+ /** Permission to read Microsoft Graph applications/service principals. */
41
+ CloudAccountReadPermission[CloudAccountReadPermission["GraphApplicationReadAll"] = 8] = "GraphApplicationReadAll";
42
+ /** Permission to read Microsoft Graph privileged role assignment schedules. */
43
+ CloudAccountReadPermission[CloudAccountReadPermission["GraphRoleAssignmentScheduleReadDirectory"] = 16] = "GraphRoleAssignmentScheduleReadDirectory";
44
+ /** Permission to read Microsoft Graph privileged role eligibility schedules. */
45
+ CloudAccountReadPermission[CloudAccountReadPermission["GraphRoleEligibilityScheduleReadDirectory"] = 32] = "GraphRoleEligibilityScheduleReadDirectory";
46
+ /** Permission to read Microsoft Graph role-management metadata. */
47
+ CloudAccountReadPermission[CloudAccountReadPermission["GraphRoleManagementReadDirectory"] = 64] = "GraphRoleManagementReadDirectory";
48
+ /** Permission to read Microsoft Graph group memberships. */
49
+ CloudAccountReadPermission[CloudAccountReadPermission["GraphGroupMemberReadAll"] = 128] = "GraphGroupMemberReadAll";
50
+ /** Permission to read Microsoft Graph user metadata. */
51
+ CloudAccountReadPermission[CloudAccountReadPermission["GraphUserReadAll"] = 256] = "GraphUserReadAll";
52
+ /** Permission to read Microsoft Graph audit logs. */
53
+ CloudAccountReadPermission[CloudAccountReadPermission["GraphAuditLogReadAll"] = 1024] = "GraphAuditLogReadAll";
54
+ })(CloudAccountReadPermission || (CloudAccountReadPermission = {}));
55
+ export const SUBSCRIPTION_READ_PERMISSIONS_METADATA = [
56
+ {
57
+ id: SubscriptionReadPermission.MonitoringReader,
58
+ displayName: 'Monitoring Reader',
59
+ description: 'Allows Spotto to read Azure Monitor metrics for subscription resources.',
60
+ requiredRoles: ['Monitoring Reader'],
61
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/azure-monitor/roles-permissions-security',
62
+ },
63
+ {
64
+ id: SubscriptionReadPermission.LogAnalyticsDataReader,
65
+ displayName: 'Log Analytics Data Reader',
66
+ description: 'Allows Spotto to run Log Analytics and App Insights data queries.',
67
+ requiredRoles: ['Log Analytics Reader'],
68
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/azure-monitor/logs/manage-access',
69
+ },
70
+ {
71
+ id: SubscriptionReadPermission.ResourceGroupsReader,
72
+ displayName: 'Resource Groups Reader',
73
+ description: 'Allows Spotto to read resource groups for subscription inventory and grouping.',
74
+ requiredRoles: ['Reader'],
75
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/general#reader',
76
+ },
77
+ {
78
+ id: SubscriptionReadPermission.ResourceInventoryReader,
79
+ displayName: 'Resource Inventory Reader',
80
+ description: 'Allows Spotto to read subscription resources for inventory, recommendations, relationship graph, and portal/plugin views.',
81
+ requiredRoles: ['Reader'],
82
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/general#reader',
83
+ },
84
+ {
85
+ id: SubscriptionReadPermission.ActivityLogReader,
86
+ displayName: 'Activity Log Reader',
87
+ description: 'Allows Spotto to read Azure Activity Log events for operational context and refresh decisions.',
88
+ requiredRoles: ['Reader'],
89
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log',
90
+ },
91
+ {
92
+ id: SubscriptionReadPermission.ResourceGraphReader,
93
+ displayName: 'Resource Graph Reader',
94
+ description: 'Allows Spotto to run Azure Resource Graph queries used by inventory, governance, reliability, and security checks.',
95
+ requiredRoles: ['Reader'],
96
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/governance/resource-graph/overview',
97
+ },
98
+ {
99
+ id: SubscriptionReadPermission.CostManagementReader,
100
+ displayName: 'Cost Management Reader',
101
+ description: 'Allows Spotto to read scoped Azure Cost Management data for costs, budgets, and savings calculations.',
102
+ requiredRoles: ['Cost Management Reader', 'Reader'],
103
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/assign-access-acm-data',
104
+ },
105
+ {
106
+ id: SubscriptionReadPermission.ConsumptionUsageReader,
107
+ displayName: 'Consumption Usage Reader',
108
+ description: 'Allows Spotto to read Azure usage detail rows for usage attribution and commitment analysis.',
109
+ requiredRoles: ['Cost Management Reader', 'Reader'],
110
+ documentationUrl: 'https://learn.microsoft.com/en-us/rest/api/consumption/usage-details/list',
111
+ },
112
+ {
113
+ id: SubscriptionReadPermission.AdvisorRecommendationsReader,
114
+ displayName: 'Advisor Reader',
115
+ description: 'Allows Spotto to read Azure Advisor recommendations and Advisor score for recommendation import and optimization workflows.',
116
+ requiredRoles: ['Reader'],
117
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/advisor/advisor-overview',
118
+ },
119
+ {
120
+ id: SubscriptionReadPermission.SecurityReader,
121
+ displayName: 'Security Reader',
122
+ description: 'Allows Spotto to read Defender for Cloud assessments, secure score, and security posture data.',
123
+ requiredRoles: ['Security Reader', 'Reader'],
124
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/defender-for-cloud/permissions',
125
+ },
126
+ ];
127
+ export const CLOUD_ACCOUNT_READ_PERMISSIONS_METADATA = [
128
+ {
129
+ id: CloudAccountReadPermission.ManagementGroupReader,
130
+ displayName: 'Management Group Reader',
131
+ description: 'Allows Spotto to read tenant management group entities.',
132
+ requiredRoles: ['Management Group Reader'],
133
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/governance/management-groups/how-to/protect-resource-hierarchy',
134
+ },
135
+ {
136
+ id: CloudAccountReadPermission.ReservationsReader,
137
+ displayName: 'Reservations Reader',
138
+ description: 'Allows Spotto to read reservation resources and reservation usage artifacts.',
139
+ requiredRoles: ['Reservations Reader'],
140
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/view-reservations',
141
+ },
142
+ {
143
+ id: CloudAccountReadPermission.SavingsPlanReader,
144
+ displayName: 'Savings Plan Reader',
145
+ description: 'Allows Spotto to read savings plan resources.',
146
+ requiredRoles: ['Savings plan Reader'],
147
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/view-utilization',
148
+ },
149
+ {
150
+ id: CloudAccountReadPermission.GraphApplicationReadAll,
151
+ displayName: 'Graph Application Read.All',
152
+ description: 'Allows Spotto to read Microsoft Graph applications and service principals.',
153
+ requiredRoles: ['Application.Read.All'],
154
+ documentationUrl: 'https://learn.microsoft.com/en-us/graph/permissions-reference#applicationreadall',
155
+ },
156
+ {
157
+ id: CloudAccountReadPermission.GraphRoleAssignmentScheduleReadDirectory,
158
+ displayName: 'Graph RoleAssignmentSchedule Read.Directory',
159
+ description: 'Allows Spotto to read active Microsoft Graph role assignment schedules.',
160
+ requiredRoles: ['RoleAssignmentSchedule.Read.Directory'],
161
+ documentationUrl: 'https://learn.microsoft.com/en-us/graph/permissions-reference#roleassignmentschedulereaddirectory',
162
+ },
163
+ {
164
+ id: CloudAccountReadPermission.GraphRoleEligibilityScheduleReadDirectory,
165
+ displayName: 'Graph RoleEligibilitySchedule Read.Directory',
166
+ description: 'Allows Spotto to read eligible Microsoft Graph role schedules.',
167
+ requiredRoles: ['RoleEligibilitySchedule.Read.Directory'],
168
+ documentationUrl: 'https://learn.microsoft.com/en-us/graph/permissions-reference#roleeligibilityschedulereaddirectory',
169
+ },
170
+ {
171
+ id: CloudAccountReadPermission.GraphRoleManagementReadDirectory,
172
+ displayName: 'Graph RoleManagement Read.Directory',
173
+ description: 'Allows Spotto to read Microsoft Graph role-management metadata.',
174
+ requiredRoles: ['RoleManagement.Read.Directory'],
175
+ documentationUrl: 'https://learn.microsoft.com/en-us/graph/permissions-reference#rolemanagementreaddirectory',
176
+ },
177
+ {
178
+ id: CloudAccountReadPermission.GraphGroupMemberReadAll,
179
+ displayName: 'Graph GroupMember Read.All',
180
+ description: 'Allows Spotto to read Microsoft Graph group memberships.',
181
+ requiredRoles: ['GroupMember.Read.All'],
182
+ documentationUrl: 'https://learn.microsoft.com/en-us/graph/permissions-reference#groupmemberreadall',
183
+ },
184
+ {
185
+ id: CloudAccountReadPermission.GraphUserReadAll,
186
+ displayName: 'Graph User Read.All',
187
+ description: 'Allows Spotto to read Microsoft Graph user metadata.',
188
+ requiredRoles: ['User.Read.All'],
189
+ documentationUrl: 'https://learn.microsoft.com/en-us/graph/permissions-reference#userreadall',
190
+ },
191
+ {
192
+ id: CloudAccountReadPermission.GraphAuditLogReadAll,
193
+ displayName: 'Graph AuditLog Read.All',
194
+ description: 'Allows Spotto to read Microsoft Graph audit logs.',
195
+ requiredRoles: ['AuditLog.Read.All'],
196
+ documentationUrl: 'https://learn.microsoft.com/en-us/graph/permissions-reference#auditlogreadall',
197
+ },
198
+ ];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Write Permission Bitmask Enum
3
+ * Each permission gets a unique bit position for efficient storage
4
+ */
5
+ export var WritePermission;
6
+ (function (WritePermission) {
7
+ /** Permission to dismiss Azure Advisor recommendations */
8
+ WritePermission[WritePermission["DismissRecommendations"] = 1] = "DismissRecommendations";
9
+ /** Permission to enable storage inventory reports on storage accounts */
10
+ WritePermission[WritePermission["StorageInventory"] = 2] = "StorageInventory";
11
+ /** Permission to create scoped Azure Policy exemptions */
12
+ WritePermission[WritePermission["PolicyExemptions"] = 4] = "PolicyExemptions";
13
+ })(WritePermission || (WritePermission = {}));
14
+ /**
15
+ * Permission metadata array
16
+ * Define all available write permissions with their metadata
17
+ */
18
+ export const WRITE_PERMISSIONS_METADATA = [
19
+ {
20
+ id: WritePermission.DismissRecommendations,
21
+ displayName: 'Dismiss Azure Advisor Recommendations',
22
+ description: 'Allows Spotto to dismiss recommendations in Azure when dismissed here.',
23
+ requiredRoles: ['Advisor Recommendations Contributor'],
24
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/advisor/permissions',
25
+ scriptGeneratorUrl: '/scripts/advisor-role',
26
+ },
27
+ {
28
+ id: WritePermission.StorageInventory,
29
+ displayName: 'Enable Storage Inventory Reports',
30
+ description: 'Allows Spotto to enable blob inventory on storage accounts you select.',
31
+ requiredRoles: ['Storage Account Contributor'],
32
+ documentationUrl: 'https://learn.microsoft.com/en-us/azure/storage/blobs/blob-inventory',
33
+ scriptGeneratorUrl: '/scripts/storage-role',
34
+ },
35
+ {
36
+ id: WritePermission.PolicyExemptions,
37
+ displayName: 'Create Azure Policy Exemptions',
38
+ description: 'Allows Spotto to create narrowly scoped exemptions for selected Azure Policy initiative controls.',
39
+ requiredRoles: ['Custom role with Azure Policy exemption actions at the target and assignment scopes'],
40
+ documentationUrl: 'https://docs.spotto.ai/docs/portal/write-permissions/policy-exemptions',
41
+ scriptGeneratorUrl: '/scripts/policy-exemptions-role',
42
+ },
43
+ ];
@@ -0,0 +1,2 @@
1
+ /** Common AI interfaces shared between frontend and backend */
2
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ export const ARCHITECTURE_ASSESSMENT_REQUIRED_CONTEXT_CATEGORIES = [
2
+ 'company-profile',
3
+ 'architecture',
4
+ 'operations',
5
+ 'reliability',
6
+ 'roadmap',
7
+ ];
8
+ export const ARCHITECTURE_ASSESSMENT_OPTIONAL_CONTEXT_CATEGORIES = [
9
+ 'security',
10
+ 'performance',
11
+ 'finops',
12
+ ];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export * from './status.js';
2
+ export * from './common.js';
3
+ export * from './catalogue.js';
4
+ export * from './run.js';
5
+ export * from './evidence.js';
6
+ export * from './artifact.js';
7
+ export * from './review.js';
8
+ export * from './queue.js';
9
+ export * from './export.js';
10
+ export * from './sow.js';
@@ -0,0 +1,2 @@
1
+ export const ASSESSMENT_QUEUE_ENTITY = 'assessment';
2
+ export const ASSESSMENT_GENERATE_ACTION = 'generate-assessment';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ export const ARCHITECTURE_ASSESSMENT_TYPE = 'architecture';
2
+ export const ASSESSMENT_TYPES = [ARCHITECTURE_ASSESSMENT_TYPE];
3
+ export const ASSESSMENT_PROVIDER_NAMES = ['azure'];
4
+ export const ASSESSMENT_RELEASE_STAGES = ['preview', 'ga'];
5
+ export const ASSESSMENT_RUN_STATUSES = ['draft', 'queued', 'running', 'needs_review', 'approved', 'published', 'failed'];
6
+ export const ASSESSMENT_EXPORT_FORMATS = ['docx'];
7
+ export const ASSESSMENT_EXPORT_STATUSES = ['requested', 'completed', 'failed'];
8
+ export const ASSESSMENT_EVIDENCE_SOURCE_TYPES = [
9
+ 'company_context_note',
10
+ 'subscription_report_evidence_pack',
11
+ 'portal_artifact',
12
+ 'raw_artifact',
13
+ 'conformed_artifact',
14
+ 'review_checklist',
15
+ 'derived_summary',
16
+ 'ai_inference',
17
+ 'evidence_gap',
18
+ ];
19
+ export const ASSESSMENT_EVIDENCE_CONFIDENCE_LEVELS = ['confirmed', 'customer_supplied', 'derived', 'inferred', 'gap'];
20
+ export const ASSESSMENT_PRIORITY_LEVELS = ['critical', 'high', 'medium', 'low', 'informational'];
21
+ export const ASSESSMENT_EFFORT_BANDS = ['low', 'medium', 'high', 'unknown'];
22
+ export const ASSESSMENT_IMPACT_LEVELS = ['low', 'medium', 'high', 'unknown'];
23
+ export const ASSESSMENT_PILLARS = ['architecture', 'security', 'reliability', 'performance', 'operations', 'finops', 'roadmap'];
@@ -0,0 +1 @@
1
+ export { validateAwsCommitmentsPlanningViewIdentity } from './commitmentsPlanningValidation.js';