@spottoai/types-package 1.0.2-beta.353 → 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.
- package/README.md +17 -0
- package/dist/aws/commitments-planning.d.ts +3 -0
- package/dist/aws/commitments-planning.d.ts.map +1 -0
- package/dist/aws/commitments-planning.js +6 -0
- package/dist/aws/commitments-planning.js.map +1 -0
- package/dist/aws/commitmentsPlanningValidation.d.ts.map +1 -1
- package/dist/aws/commitmentsPlanningValidation.js +2 -0
- package/dist/aws/commitmentsPlanningValidation.js.map +1 -1
- package/dist/aws/index.d.ts +2 -0
- package/dist/aws/index.d.ts.map +1 -1
- package/dist/aws/index.js +2 -0
- package/dist/aws/index.js.map +1 -1
- package/dist/aws/portalCommitmentsPlanningPublicArtifactValidation.d.ts +4 -0
- package/dist/aws/portalCommitmentsPlanningPublicArtifactValidation.d.ts.map +1 -0
- package/dist/aws/portalCommitmentsPlanningPublicArtifactValidation.js +513 -0
- package/dist/aws/portalCommitmentsPlanningPublicArtifactValidation.js.map +1 -0
- package/dist/aws/portalCommitmentsPlanningPublicArtifacts.d.ts +13 -0
- package/dist/aws/portalCommitmentsPlanningPublicArtifacts.d.ts.map +1 -0
- package/dist/aws/portalCommitmentsPlanningPublicArtifacts.js +5 -0
- package/dist/aws/portalCommitmentsPlanningPublicArtifacts.js.map +1 -0
- package/dist/aws/portalPublicArtifactHistoryTypes.d.ts +5 -0
- package/dist/aws/portalPublicArtifactHistoryTypes.d.ts.map +1 -1
- package/dist/aws/portalPublicArtifactHistoryTypes.js +6 -0
- package/dist/aws/portalPublicArtifactHistoryTypes.js.map +1 -1
- package/dist/aws/portalPublicArtifacts.d.ts +2 -1
- package/dist/aws/portalPublicArtifacts.d.ts.map +1 -1
- package/dist/aws/portalPublicArtifacts.js.map +1 -1
- package/dist/aws/publicArtifacts.d.ts +1 -1
- package/dist/aws/publicArtifacts.d.ts.map +1 -1
- package/dist/aws/publicArtifacts.js +1 -0
- package/dist/aws/publicArtifacts.js.map +1 -1
- package/dist/aws/relationships.d.ts +4 -0
- package/dist/aws/relationships.d.ts.map +1 -0
- package/dist/aws/relationships.js +6 -0
- package/dist/aws/relationships.js.map +1 -0
- package/dist/azure/commitmentsPlanning.d.ts +3 -1
- package/dist/azure/commitmentsPlanning.d.ts.map +1 -1
- package/dist/esm/accounts/accounts.js +115 -0
- package/dist/esm/accounts/azureSpSetup.js +1 -0
- package/dist/esm/accounts/azureSpSetupDurable.js +1 -0
- package/dist/esm/accounts/index.js +5 -0
- package/dist/esm/accounts/readPermissions.js +198 -0
- package/dist/esm/accounts/validation.js +1 -0
- package/dist/esm/accounts/writePermissions.js +43 -0
- package/dist/esm/ai/index.js +2 -0
- package/dist/esm/assessments/artifact.js +1 -0
- package/dist/esm/assessments/catalogue.js +12 -0
- package/dist/esm/assessments/common.js +1 -0
- package/dist/esm/assessments/evidence.js +1 -0
- package/dist/esm/assessments/export.js +1 -0
- package/dist/esm/assessments/index.js +10 -0
- package/dist/esm/assessments/queue.js +2 -0
- package/dist/esm/assessments/review.js +1 -0
- package/dist/esm/assessments/run.js +1 -0
- package/dist/esm/assessments/sow.js +1 -0
- package/dist/esm/assessments/status.js +23 -0
- package/dist/esm/aws/commitments-planning.js +1 -0
- package/dist/esm/aws/commitmentsPlanningValidation.js +121 -0
- package/dist/esm/aws/estates.js +21 -0
- package/dist/esm/aws/index.js +18 -0
- package/dist/esm/aws/onboarding.js +1 -0
- package/dist/esm/aws/pluginPublicArtifactBodyValidation.js +217 -0
- package/dist/esm/aws/pluginPublicArtifactEvidence.js +1 -0
- package/dist/esm/aws/pluginPublicArtifactManifestValidation.js +255 -0
- package/dist/esm/aws/pluginPublicArtifactSectionValidation.js +464 -0
- package/dist/esm/aws/pluginPublicArtifactValidation.js +2 -0
- package/dist/esm/aws/pluginPublicArtifactValidationHelpers.js +216 -0
- package/dist/esm/aws/pluginPublicArtifacts.js +109 -0
- package/dist/esm/aws/portalCommitmentsPlanningPublicArtifactValidation.js +509 -0
- package/dist/esm/aws/portalCommitmentsPlanningPublicArtifacts.js +1 -0
- package/dist/esm/aws/portalPublicArtifactCurrentValidation.js +328 -0
- package/dist/esm/aws/portalPublicArtifactEvidenceValidation.js +294 -0
- package/dist/esm/aws/portalPublicArtifactHistoryAiValidation.js +368 -0
- package/dist/esm/aws/portalPublicArtifactHistoryTypes.js +40 -0
- package/dist/esm/aws/portalPublicArtifactNestedEvidence.js +1 -0
- package/dist/esm/aws/portalPublicArtifactNestedEvidenceValidation.js +397 -0
- package/dist/esm/aws/portalPublicArtifactValidation.js +2 -0
- package/dist/esm/aws/portalPublicArtifactValidationCommon.js +139 -0
- package/dist/esm/aws/portalPublicArtifacts.js +73 -0
- package/dist/esm/aws/portalRelationshipPublicArtifactValidation.js +334 -0
- package/dist/esm/aws/portalRelationshipPublicArtifacts.js +59 -0
- package/dist/esm/aws/portalRelationshipResourceNodeTypes.js +1 -0
- package/dist/esm/aws/portalRelationshipResourceNodeValidation.js +368 -0
- package/dist/esm/aws/publicArtifacts.js +13 -0
- package/dist/esm/aws/relationships.js +1 -0
- package/dist/esm/aws/requests.js +19 -0
- package/dist/esm/azure/activityLogs.js +2 -0
- package/dist/esm/azure/advisorScore.js +1 -0
- package/dist/esm/azure/benefits.js +1 -0
- package/dist/esm/azure/billingGeneration.js +1 -0
- package/dist/esm/azure/billingPlots.js +4 -0
- package/dist/esm/azure/budgets.js +1 -0
- package/dist/esm/azure/commitmentsPlanning.js +1 -0
- package/dist/esm/azure/common.js +1 -0
- package/dist/esm/azure/configs.js +1 -0
- package/dist/esm/azure/costComposition.js +1 -0
- package/dist/esm/azure/dataProtection.js +5 -0
- package/dist/esm/azure/governance.js +14 -0
- package/dist/esm/azure/licensing.js +1 -0
- package/dist/esm/azure/metrics.js +1 -0
- package/dist/esm/azure/payloads.js +1 -0
- package/dist/esm/azure/portalArtifacts.js +1 -0
- package/dist/esm/azure/prices.js +1 -0
- package/dist/esm/azure/publicIpAddresses.js +2 -0
- package/dist/esm/azure/recommendationAudit.js +16 -0
- package/dist/esm/azure/recommendationState.js +1 -0
- package/dist/esm/azure/recommendationTracks.js +40 -0
- package/dist/esm/azure/recommendationWorkflow.js +13 -0
- package/dist/esm/azure/recommendations.js +10 -0
- package/dist/esm/azure/regulatoryCompliance.js +6 -0
- package/dist/esm/azure/relationships.js +2 -0
- package/dist/esm/azure/reportingTemplates.js +1 -0
- package/dist/esm/azure/reports.js +12 -0
- package/dist/esm/azure/resourceHealth.js +12 -0
- package/dist/esm/azure/resourceOptimization.js +1 -0
- package/dist/esm/azure/resources.js +1 -0
- package/dist/esm/azure/reviewChecklist.js +1 -0
- package/dist/esm/azure/secureScore.js +1 -0
- package/dist/esm/azure/security.js +1 -0
- package/dist/esm/azure/serviceRetirement.js +1 -0
- package/dist/esm/azure/serviceRetirementState.js +1 -0
- package/dist/esm/azure/serviceRetirementWorkManagement.js +1 -0
- package/dist/esm/azure/storage-inventory.js +1 -0
- package/dist/esm/azure/subscriptions.js +1 -0
- package/dist/esm/azure/views.js +32 -0
- package/dist/esm/azure/workManagement.js +4 -0
- package/dist/esm/common/artifactGeneration.js +1 -0
- package/dist/esm/common/capabilityPassport.js +214 -0
- package/dist/esm/common/index.js +7 -0
- package/dist/esm/common/pagination.js +1 -0
- package/dist/esm/common/provider.js +11 -0
- package/dist/esm/common/providerSyncProgress.js +1 -0
- package/dist/esm/common/relationships.js +1 -0
- package/dist/esm/common/syncProgress.js +1 -0
- package/dist/esm/company/billingAccount.js +1 -0
- package/dist/esm/company/company.js +1 -0
- package/dist/esm/company/companyHierarchy.js +1 -0
- package/dist/esm/company/companyNotes.js +38 -0
- package/dist/esm/company/customProperties.js +1 -0
- package/dist/esm/company/index.js +6 -0
- package/dist/esm/company/notification.js +43 -0
- package/dist/esm/company/survey.js +1 -0
- package/dist/esm/customProperties/customProperties.js +1 -0
- package/dist/esm/customProperties/index.js +1 -0
- package/dist/esm/entries/aws.js +3 -0
- package/dist/esm/entries/commitments-planning.js +3 -0
- package/dist/esm/entries/provider.js +3 -0
- package/dist/esm/entries/recommendations.js +3 -0
- package/dist/esm/entries/relationships.js +3 -0
- package/dist/esm/entries/root.js +3 -0
- package/dist/esm/events/actionGroups.js +1 -0
- package/dist/esm/events/alertDefinitionRun.js +1 -0
- package/dist/esm/events/baseAlert.js +1 -0
- package/dist/esm/events/cost.js +1 -0
- package/dist/esm/events/costAnomalies.js +1 -0
- package/dist/esm/events/costViews.js +1 -0
- package/dist/esm/events/eventStatus.js +1 -0
- package/dist/esm/events/index.js +8 -0
- package/dist/esm/events/quickAlerts.js +2 -0
- package/dist/esm/features-and-permissions/access.js +1 -0
- package/dist/esm/features-and-permissions/index.js +1 -0
- package/dist/esm/feedbacks/feedback.js +1 -0
- package/dist/esm/identity/apikey.js +1 -0
- package/dist/esm/identity/index.js +1 -0
- package/dist/esm/index.js +54 -0
- package/dist/esm/index.vite.js +48 -0
- package/dist/esm/integrations/autotask.js +1 -0
- package/dist/esm/integrations/azureDevOps.js +1 -0
- package/dist/esm/integrations/github.js +1 -0
- package/dist/esm/integrations/halo.js +1 -0
- package/dist/esm/integrations/index.js +5 -0
- package/dist/esm/integrations/integrationTickets.js +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/scheduler/index.js +1 -0
- package/dist/esm/scheduler/scheduler.js +1 -0
- package/dist/esm/tags/index.js +1 -0
- package/dist/esm/tags/tags.js +6 -0
- package/dist/esm/unknown/services.js +1 -0
- package/dist/esm/users/companyUser.js +2 -0
- package/dist/esm/users/index.js +2 -0
- package/dist/esm/users/user.js +1 -0
- package/package.json +23 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const isNonEmptyString = (value) => typeof value === 'string' && value.trim().length > 0;
|
|
2
|
+
const isCanonicalIsoTimestamp = (value) => {
|
|
3
|
+
if (!isNonEmptyString(value))
|
|
4
|
+
return false;
|
|
5
|
+
const timestamp = Date.parse(value);
|
|
6
|
+
return Number.isFinite(timestamp) && new Date(timestamp).toISOString() === value;
|
|
7
|
+
};
|
|
8
|
+
const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
9
|
+
const isLogicalManifestPath = (value) => {
|
|
10
|
+
if (!isNonEmptyString(value))
|
|
11
|
+
return false;
|
|
12
|
+
if (value.startsWith('/') || value.includes('://') || value.includes('?') || value.includes('#') || value.includes('\\'))
|
|
13
|
+
return false;
|
|
14
|
+
const segments = value.split('/');
|
|
15
|
+
return segments.length >= 2 && segments.every(segment => segment.length > 0 && segment !== '.' && segment !== '..');
|
|
16
|
+
};
|
|
17
|
+
const isViewSetSurfaceReference = (value) => isRecord(value) && isNonEmptyString(value.runId) && isLogicalManifestPath(value.manifestPath) && isCanonicalIsoTimestamp(value.completedAt);
|
|
18
|
+
/** Dependency-free rejection boundary for customer-readable cross-surface pointers. */
|
|
19
|
+
export const isCompletedAzureViewSetV1 = (value) => {
|
|
20
|
+
if (!isRecord(value))
|
|
21
|
+
return false;
|
|
22
|
+
if (value.schemaVersion !== 1 || value.status !== 'completed')
|
|
23
|
+
return false;
|
|
24
|
+
if (!isNonEmptyString(value.subscriptionId) || !isNonEmptyString(value.publicationId) || !isCanonicalIsoTimestamp(value.completedAt)) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
if (!isViewSetSurfaceReference(value.portal) || !isViewSetSurfaceReference(value.plugin))
|
|
28
|
+
return false;
|
|
29
|
+
if (!isRecord(value.economics))
|
|
30
|
+
return false;
|
|
31
|
+
return isNonEmptyString(value.economics.generationId) && isNonEmptyString(value.economics.fingerprint);
|
|
32
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export const WORK_ITEM_LANES = ['prioritized', 'todo', 'in-progress', 'completed'];
|
|
2
|
+
export const DEFAULT_WORK_BOARD_ID = 'kanban';
|
|
3
|
+
export const WORK_ITEM_EXTERNAL_TICKET_PROVIDERS = ['jira', 'halo', 'connectwise', 'autotask', 'azuredevops', 'github'];
|
|
4
|
+
export const WORK_ITEM_SHARE_CHANNELS = ['email', ...WORK_ITEM_EXTERNAL_TICKET_PROVIDERS];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ARTIFACT_GENERATION_SCHEMA_VERSION = 1;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
export const CAPABILITY_PASSPORT_SCHEMA_VERSION = 1;
|
|
2
|
+
export const CAPABILITY_REASON_CODES = [
|
|
3
|
+
'not-requested',
|
|
4
|
+
'permission-denied',
|
|
5
|
+
'not-found',
|
|
6
|
+
'throttled',
|
|
7
|
+
'timeout',
|
|
8
|
+
'pagination-incomplete',
|
|
9
|
+
'source-partial',
|
|
10
|
+
'source-empty',
|
|
11
|
+
'source-unsupported',
|
|
12
|
+
'retained-last-known-good',
|
|
13
|
+
'currency-unresolved',
|
|
14
|
+
'unknown',
|
|
15
|
+
];
|
|
16
|
+
const REASON_CODES = new Set(CAPABILITY_REASON_CODES);
|
|
17
|
+
const PROVIDERS = new Set(['azure', 'aws']);
|
|
18
|
+
const AGREEMENT_TYPES = new Set(['EA', 'MCA', 'CSP', 'PAYG-MOSP', 'sponsored-trial', 'unknown']);
|
|
19
|
+
const AGREEMENT_SOURCES = new Set(['observed', 'configured', 'unknown']);
|
|
20
|
+
const AVAILABILITY_VALUES = new Set(['available', 'partial', 'missing', 'unavailable', 'unknown']);
|
|
21
|
+
const EMPTY_EVIDENCE_VALUES = new Set(['populated', 'complete-empty', 'not-observed', 'unknown']);
|
|
22
|
+
const PROVIDER_OUTCOMES = new Set(['accepted', 'authoritatively-unsupported', 'unknown']);
|
|
23
|
+
const ATTEMPT_OUTCOMES = new Set(['succeeded', 'failed', 'partial']);
|
|
24
|
+
const SHA256_PATTERN = /^[a-f0-9]{64}$/;
|
|
25
|
+
const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
26
|
+
const isNonEmptyString = (value) => typeof value === 'string' && value.trim().length > 0;
|
|
27
|
+
const isNonNegativeInteger = (value) => Number.isInteger(value) && value >= 0;
|
|
28
|
+
const isPositiveInteger = (value) => Number.isInteger(value) && value > 0;
|
|
29
|
+
const isCanonicalIsoTimestamp = (value) => {
|
|
30
|
+
if (!isNonEmptyString(value))
|
|
31
|
+
return false;
|
|
32
|
+
const timestamp = Date.parse(value);
|
|
33
|
+
return Number.isFinite(timestamp) && new Date(timestamp).toISOString() === value;
|
|
34
|
+
};
|
|
35
|
+
const isLogicalArtifactRef = (value) => {
|
|
36
|
+
if (!isNonEmptyString(value) || value.startsWith('/') || value.includes('://') || value.includes('?') || value.includes('#'))
|
|
37
|
+
return false;
|
|
38
|
+
if (value.includes('\\'))
|
|
39
|
+
return false;
|
|
40
|
+
const segments = value.split('/');
|
|
41
|
+
return segments.length >= 2 && segments.every(segment => segment.length > 0 && segment !== '.' && segment !== '..');
|
|
42
|
+
};
|
|
43
|
+
const isSubscriptionBoundResourceId = (value, subscriptionId) => {
|
|
44
|
+
if (!isNonEmptyString(value))
|
|
45
|
+
return false;
|
|
46
|
+
const segments = value.split('/');
|
|
47
|
+
return (segments.length >= 4 &&
|
|
48
|
+
segments[0] === '' &&
|
|
49
|
+
segments[1]?.toLowerCase() === 'subscriptions' &&
|
|
50
|
+
segments[2]?.toLowerCase() === subscriptionId.toLowerCase());
|
|
51
|
+
};
|
|
52
|
+
const isReasonCode = (value) => typeof value === 'string' && REASON_CODES.has(value);
|
|
53
|
+
const isImmutableSourceGeneration = (value) => {
|
|
54
|
+
if (!isRecord(value))
|
|
55
|
+
return false;
|
|
56
|
+
if (!isLogicalArtifactRef(value.artifactRef) ||
|
|
57
|
+
!isNonEmptyString(value.generationId) ||
|
|
58
|
+
typeof value.sha256 !== 'string' ||
|
|
59
|
+
!SHA256_PATTERN.test(value.sha256) ||
|
|
60
|
+
!isPositiveInteger(value.schemaVersion) ||
|
|
61
|
+
!isCanonicalIsoTimestamp(value.producedAt)) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
return value.completeThrough === undefined || isCanonicalIsoTimestamp(value.completeThrough);
|
|
65
|
+
};
|
|
66
|
+
const isScopeBinding = (value, ownership) => {
|
|
67
|
+
if (!isRecord(value) || value.provider !== ownership.provider || value.tenantId !== ownership.tenantId)
|
|
68
|
+
return false;
|
|
69
|
+
if (value.kind === 'tenant')
|
|
70
|
+
return true;
|
|
71
|
+
if (value.kind === 'billing-account')
|
|
72
|
+
return isNonEmptyString(value.billingAccountId);
|
|
73
|
+
if (value.kind === 'customer')
|
|
74
|
+
return isNonEmptyString(value.customerId);
|
|
75
|
+
if (value.kind === 'subscription')
|
|
76
|
+
return value.subscriptionId === ownership.subscriptionId;
|
|
77
|
+
return (value.kind === 'resource' &&
|
|
78
|
+
value.subscriptionId === ownership.subscriptionId &&
|
|
79
|
+
isSubscriptionBoundResourceId(value.normalizedResourceId, ownership.subscriptionId));
|
|
80
|
+
};
|
|
81
|
+
const isAttempt = (value) => {
|
|
82
|
+
if (!isRecord(value))
|
|
83
|
+
return false;
|
|
84
|
+
if (value.status === 'not-attempted')
|
|
85
|
+
return isReasonCode(value.reasonCode);
|
|
86
|
+
if (value.status !== 'attempted' || !isCanonicalIsoTimestamp(value.startedAt) || !isCanonicalIsoTimestamp(value.completedAt))
|
|
87
|
+
return false;
|
|
88
|
+
if (Date.parse(value.completedAt) < Date.parse(value.startedAt) || typeof value.outcome !== 'string' || !ATTEMPT_OUTCOMES.has(value.outcome)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
return Array.isArray(value.reasonCodes) && value.reasonCodes.every(isReasonCode);
|
|
92
|
+
};
|
|
93
|
+
const isFreshness = (value) => {
|
|
94
|
+
if (!isRecord(value))
|
|
95
|
+
return false;
|
|
96
|
+
if (value.status === 'unknown')
|
|
97
|
+
return true;
|
|
98
|
+
if ((value.status !== 'current' && value.status !== 'stale') || !isCanonicalIsoTimestamp(value.observedAt))
|
|
99
|
+
return false;
|
|
100
|
+
if (value.completeThrough !== undefined && !isCanonicalIsoTimestamp(value.completeThrough))
|
|
101
|
+
return false;
|
|
102
|
+
return value.status !== 'stale' || isNonEmptyString(value.maximumAge);
|
|
103
|
+
};
|
|
104
|
+
const isObservation = (value, ownership) => {
|
|
105
|
+
if (!isRecord(value))
|
|
106
|
+
return false;
|
|
107
|
+
if (!isNonEmptyString(value.observationId) || !isNonEmptyString(value.capability) || !isScopeBinding(value.scope, ownership))
|
|
108
|
+
return false;
|
|
109
|
+
if (!isAttempt(value.attempt) || typeof value.providerSurfaceOutcome !== 'string' || !PROVIDER_OUTCOMES.has(value.providerSurfaceOutcome)) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
if (typeof value.availability !== 'string' || !AVAILABILITY_VALUES.has(value.availability))
|
|
113
|
+
return false;
|
|
114
|
+
if (typeof value.emptyEvidence !== 'string' || !EMPTY_EVIDENCE_VALUES.has(value.emptyEvidence) || !isFreshness(value.freshness))
|
|
115
|
+
return false;
|
|
116
|
+
if (value.sourceGeneration !== undefined && !isImmutableSourceGeneration(value.sourceGeneration))
|
|
117
|
+
return false;
|
|
118
|
+
if (value.coverageRef !== undefined && !isLogicalArtifactRef(value.coverageRef))
|
|
119
|
+
return false;
|
|
120
|
+
if (value.emptyEvidence === 'complete-empty') {
|
|
121
|
+
if (value.availability !== 'available' || value.attempt.status !== 'attempted' || value.attempt.outcome !== 'succeeded')
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
if (value.limits !== undefined) {
|
|
125
|
+
if (!isRecord(value.limits))
|
|
126
|
+
return false;
|
|
127
|
+
if (value.limits.expectedPages !== undefined && !isNonNegativeInteger(value.limits.expectedPages))
|
|
128
|
+
return false;
|
|
129
|
+
if (value.limits.receivedPages !== undefined && !isNonNegativeInteger(value.limits.receivedPages))
|
|
130
|
+
return false;
|
|
131
|
+
if (value.limits.throttled !== undefined && typeof value.limits.throttled !== 'boolean')
|
|
132
|
+
return false;
|
|
133
|
+
if (value.limits.retainedLastKnownGood !== undefined && typeof value.limits.retainedLastKnownGood !== 'boolean')
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
return true;
|
|
137
|
+
};
|
|
138
|
+
const isOwnership = (value) => isRecord(value) &&
|
|
139
|
+
typeof value.provider === 'string' &&
|
|
140
|
+
PROVIDERS.has(value.provider) &&
|
|
141
|
+
isNonEmptyString(value.tenantId) &&
|
|
142
|
+
isNonEmptyString(value.companyId) &&
|
|
143
|
+
isNonEmptyString(value.cloudAccountId) &&
|
|
144
|
+
isNonEmptyString(value.accountId) &&
|
|
145
|
+
isNonEmptyString(value.subscriptionId) &&
|
|
146
|
+
(value.ownershipEpochRevision === undefined || isPositiveInteger(value.ownershipEpochRevision));
|
|
147
|
+
const isObservationSet = (value, ownership) => {
|
|
148
|
+
if (!isRecord(value) || !isNonNegativeInteger(value.totalCount))
|
|
149
|
+
return false;
|
|
150
|
+
if (value.mode === 'inline') {
|
|
151
|
+
if (!Array.isArray(value.items) || value.items.length !== value.totalCount || !value.items.every(item => isObservation(item, ownership))) {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
const observationIds = value.items.map(item => item.observationId);
|
|
155
|
+
return new Set(observationIds).size === observationIds.length;
|
|
156
|
+
}
|
|
157
|
+
if (value.mode !== 'sharded' ||
|
|
158
|
+
!isNonNegativeInteger(value.shardCount) ||
|
|
159
|
+
!isLogicalArtifactRef(value.indexRef) ||
|
|
160
|
+
!Array.isArray(value.shards) ||
|
|
161
|
+
value.shards.length !== value.shardCount) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
let total = 0;
|
|
165
|
+
const refs = new Set();
|
|
166
|
+
for (const shard of value.shards) {
|
|
167
|
+
if (!isRecord(shard) ||
|
|
168
|
+
!isLogicalArtifactRef(shard.artifactRef) ||
|
|
169
|
+
typeof shard.sha256 !== 'string' ||
|
|
170
|
+
!SHA256_PATTERN.test(shard.sha256) ||
|
|
171
|
+
!isPositiveInteger(shard.itemCount) ||
|
|
172
|
+
refs.has(shard.artifactRef)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
refs.add(shard.artifactRef);
|
|
176
|
+
total += shard.itemCount;
|
|
177
|
+
}
|
|
178
|
+
return total === value.totalCount;
|
|
179
|
+
};
|
|
180
|
+
/** Dependency-free runtime rejection boundary for Capability Passport schema v1. */
|
|
181
|
+
export const isCapabilityPassport = (value) => {
|
|
182
|
+
if (!isRecord(value) || value.schemaVersion !== CAPABILITY_PASSPORT_SCHEMA_VERSION)
|
|
183
|
+
return false;
|
|
184
|
+
if (!isNonEmptyString(value.passportId) || !isNonEmptyString(value.runId) || !isCanonicalIsoTimestamp(value.generatedAt))
|
|
185
|
+
return false;
|
|
186
|
+
if (!isOwnership(value.ownership))
|
|
187
|
+
return false;
|
|
188
|
+
if (!isRecord(value.agreementObservation))
|
|
189
|
+
return false;
|
|
190
|
+
if (typeof value.agreementObservation.type !== 'string' ||
|
|
191
|
+
!AGREEMENT_TYPES.has(value.agreementObservation.type) ||
|
|
192
|
+
typeof value.agreementObservation.source !== 'string' ||
|
|
193
|
+
!AGREEMENT_SOURCES.has(value.agreementObservation.source) ||
|
|
194
|
+
(value.agreementObservation.sourceGeneration !== undefined && !isImmutableSourceGeneration(value.agreementObservation.sourceGeneration))) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
if (!isObservationSet(value.observations, value.ownership))
|
|
198
|
+
return false;
|
|
199
|
+
if (!isRecord(value.producerVersions) || Object.keys(value.producerVersions).length === 0)
|
|
200
|
+
return false;
|
|
201
|
+
if (!Object.entries(value.producerVersions).every(([name, version]) => isNonEmptyString(name) && isNonEmptyString(version)))
|
|
202
|
+
return false;
|
|
203
|
+
if (!Array.isArray(value.issues) ||
|
|
204
|
+
!value.issues.every(issue => isRecord(issue) && isReasonCode(issue.reasonCode) && (issue.observationId === undefined || isNonEmptyString(issue.observationId)))) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
if (value.observations.mode === 'inline') {
|
|
208
|
+
const observationIds = new Set(value.observations.items.map(item => item.observationId));
|
|
209
|
+
if (!value.issues.every(issue => issue.observationId === undefined || (isNonEmptyString(issue.observationId) && observationIds.has(issue.observationId)))) {
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return true;
|
|
214
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './artifactGeneration.js';
|
|
2
|
+
export * from './capabilityPassport.js';
|
|
3
|
+
export * from './pagination.js';
|
|
4
|
+
export * from './provider.js';
|
|
5
|
+
export * from './providerSyncProgress.js';
|
|
6
|
+
export * from './relationships.js';
|
|
7
|
+
export * from './syncProgress.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var ProviderName;
|
|
2
|
+
(function (ProviderName) {
|
|
3
|
+
ProviderName["Azure"] = "azure";
|
|
4
|
+
ProviderName["Aws"] = "aws";
|
|
5
|
+
})(ProviderName || (ProviderName = {}));
|
|
6
|
+
/** Provider-owned resource boundary kind used by indexed scope records. */
|
|
7
|
+
export var ProviderScopeType;
|
|
8
|
+
(function (ProviderScopeType) {
|
|
9
|
+
ProviderScopeType["Subscription"] = "subscription";
|
|
10
|
+
ProviderScopeType["Account"] = "account";
|
|
11
|
+
})(ProviderScopeType || (ProviderScopeType = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const COMPANY_NOTE_SCHEMA_VERSION = 1;
|
|
2
|
+
export const COMPANY_NOTES_FEATURE_KEY = 'company_notes';
|
|
3
|
+
export const COMPANY_NOTES_VIEW_PERMISSION_KEY = 'company_notes.view';
|
|
4
|
+
export const COMPANY_NOTES_MANAGE_PERMISSION_KEY = 'company_notes.manage';
|
|
5
|
+
export const COMPANY_NOTES_PERMISSION_KEYS = [COMPANY_NOTES_VIEW_PERMISSION_KEY, COMPANY_NOTES_MANAGE_PERMISSION_KEY];
|
|
6
|
+
export const COMPANY_NOTE_ORDINARY_CATEGORIES = ['general', 'meeting'];
|
|
7
|
+
export const COMPANY_NOTE_CONTEXT_CATEGORIES = [
|
|
8
|
+
'company-profile',
|
|
9
|
+
'security',
|
|
10
|
+
'architecture',
|
|
11
|
+
'operations',
|
|
12
|
+
'finops',
|
|
13
|
+
'performance',
|
|
14
|
+
'reliability',
|
|
15
|
+
'roadmap',
|
|
16
|
+
];
|
|
17
|
+
export const COMPANY_NOTE_CONTEXT_CATEGORY_ORDER = COMPANY_NOTE_CONTEXT_CATEGORIES;
|
|
18
|
+
export const COMPANY_NOTE_CATEGORIES = [...COMPANY_NOTE_ORDINARY_CATEGORIES, ...COMPANY_NOTE_CONTEXT_CATEGORIES];
|
|
19
|
+
export const COMPANY_NOTE_MEETING_TEMPLATE_KEY = 'meeting-v1';
|
|
20
|
+
export const COMPANY_NOTE_CONTEXT_TEMPLATE_KEYS = [
|
|
21
|
+
'company-profile-v1',
|
|
22
|
+
'security-v1',
|
|
23
|
+
'architecture-v1',
|
|
24
|
+
'operations-v1',
|
|
25
|
+
'finops-v1',
|
|
26
|
+
'performance-v1',
|
|
27
|
+
'reliability-v1',
|
|
28
|
+
'roadmap-v1',
|
|
29
|
+
];
|
|
30
|
+
export const COMPANY_NOTE_TEMPLATE_KEYS = [COMPANY_NOTE_MEETING_TEMPLATE_KEY, ...COMPANY_NOTE_CONTEXT_TEMPLATE_KEYS];
|
|
31
|
+
export const COMPANY_NOTES_AI_MODES = [
|
|
32
|
+
'general-note',
|
|
33
|
+
'template-draft',
|
|
34
|
+
'section-draft',
|
|
35
|
+
'coach-selection',
|
|
36
|
+
'company-research',
|
|
37
|
+
];
|
|
38
|
+
export const COMPANY_NOTES_AI_SOURCE_MODES = ['spotto-only', 'public-research'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../customProperties/index.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Bitmask constants for resources */
|
|
2
|
+
export const RECOMMENDATION_FLAGS = {
|
|
3
|
+
/** 001 */
|
|
4
|
+
PRIORITIZED: 1,
|
|
5
|
+
/** 010 */
|
|
6
|
+
DISMISSED: 2,
|
|
7
|
+
/** 100 */
|
|
8
|
+
NEW: 4,
|
|
9
|
+
/** 1000 */
|
|
10
|
+
IMPLEMENTED: 8,
|
|
11
|
+
};
|
|
12
|
+
/** Bitmask constants for users */
|
|
13
|
+
export const USER_FLAGS = {
|
|
14
|
+
/** 001 */
|
|
15
|
+
INVITE_ACCEPTED: 1,
|
|
16
|
+
};
|
|
17
|
+
/** Bitmask constants for cloud accounts */
|
|
18
|
+
export const CLOUD_ACCOUNT_FLAGS = {
|
|
19
|
+
/** 001 */
|
|
20
|
+
SYNC_COMPLETED: 1,
|
|
21
|
+
};
|
|
22
|
+
export const COST_ANOMALY_FLAGS = {
|
|
23
|
+
/** 001 */
|
|
24
|
+
DETECTED: 1,
|
|
25
|
+
};
|
|
26
|
+
export const SHARING_FLAGS = {
|
|
27
|
+
SHARE_CREATED: 1,
|
|
28
|
+
};
|
|
29
|
+
/** Helper functions for bitmask operations */
|
|
30
|
+
export const hasFlag = (value, flag) => (value & flag) !== 0;
|
|
31
|
+
export const addFlag = (value, flag) => value | flag;
|
|
32
|
+
export const removeFlag = (value, flag) => value & ~flag;
|
|
33
|
+
/** Array helper functions */
|
|
34
|
+
export const hasArrayFlag = (array, flag) => array.includes(flag);
|
|
35
|
+
export const addArrayFlag = (array, flag) => (array.includes(flag) ? array : [...array, flag]);
|
|
36
|
+
export const removeArrayFlag = (array, flag) => array.filter(f => f !== flag);
|
|
37
|
+
/** Get individual flags from resources array */
|
|
38
|
+
export const getRecommendationsFlags = (array) => ({
|
|
39
|
+
new: hasArrayFlag(array, RECOMMENDATION_FLAGS.NEW),
|
|
40
|
+
dismissed: hasArrayFlag(array, RECOMMENDATION_FLAGS.DISMISSED),
|
|
41
|
+
prioritized: hasArrayFlag(array, RECOMMENDATION_FLAGS.PRIORITIZED),
|
|
42
|
+
implemented: hasArrayFlag(array, RECOMMENDATION_FLAGS.IMPLEMENTED),
|
|
43
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './customProperties.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './eventStatus.js';
|
|
2
|
+
export * from './cost.js';
|
|
3
|
+
export * from './costViews.js';
|
|
4
|
+
export * from './costAnomalies.js';
|
|
5
|
+
export * from './baseAlert.js';
|
|
6
|
+
export * from './alertDefinitionRun.js';
|
|
7
|
+
export * from './quickAlerts.js';
|
|
8
|
+
export * from './actionGroups.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './access.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './apikey.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Main entry point - export all interfaces from this package */
|
|
2
|
+
export * from './azure/common.js';
|
|
3
|
+
export * from './azure/costComposition.js';
|
|
4
|
+
export * from './azure/activityLogs.js';
|
|
5
|
+
export * from './azure/budgets.js';
|
|
6
|
+
export * from './azure/billingGeneration.js';
|
|
7
|
+
export * from './azure/billingPlots.js';
|
|
8
|
+
export * from './azure/benefits.js';
|
|
9
|
+
export * from './azure/commitmentsPlanning.js';
|
|
10
|
+
export * from './azure/licensing.js';
|
|
11
|
+
export * from './azure/configs.js';
|
|
12
|
+
export * from './azure/metrics.js';
|
|
13
|
+
export * from './azure/payloads.js';
|
|
14
|
+
export * from './azure/portalArtifacts.js';
|
|
15
|
+
export * from './azure/dataProtection.js';
|
|
16
|
+
export * from './azure/prices.js';
|
|
17
|
+
export * from './azure/relationships.js';
|
|
18
|
+
export * from './azure/recommendations.js';
|
|
19
|
+
export * from './azure/recommendationTracks.js';
|
|
20
|
+
export * from './azure/recommendationAudit.js';
|
|
21
|
+
export * from './azure/recommendationWorkflow.js';
|
|
22
|
+
export * from './azure/recommendationState.js';
|
|
23
|
+
export * from './azure/regulatoryCompliance.js';
|
|
24
|
+
export * from './azure/resources.js';
|
|
25
|
+
export * from './azure/reports.js';
|
|
26
|
+
export * from './azure/reportingTemplates.js';
|
|
27
|
+
export * from './azure/reviewChecklist.js';
|
|
28
|
+
export * from './azure/advisorScore.js';
|
|
29
|
+
export * from './azure/resourceHealth.js';
|
|
30
|
+
export * from './azure/subscriptions.js';
|
|
31
|
+
export * from './azure/views.js';
|
|
32
|
+
export * from './azure/security.js';
|
|
33
|
+
export * from './azure/serviceRetirement.js';
|
|
34
|
+
export * from './azure/serviceRetirementState.js';
|
|
35
|
+
export * from './azure/serviceRetirementWorkManagement.js';
|
|
36
|
+
export * from './azure/resourceOptimization.js';
|
|
37
|
+
export * from './azure/storage-inventory.js';
|
|
38
|
+
export * from './azure/governance.js';
|
|
39
|
+
export * from './azure/publicIpAddresses.js';
|
|
40
|
+
export * from './azure/workManagement.js';
|
|
41
|
+
export * from './aws/index.js';
|
|
42
|
+
export * from './accounts/index.js';
|
|
43
|
+
export * from './assessments/index.js';
|
|
44
|
+
export * from './users/index.js';
|
|
45
|
+
export * from './common/index.js';
|
|
46
|
+
export * from './company/index.js';
|
|
47
|
+
export * from './customProperties/index.js';
|
|
48
|
+
export * from './scheduler/index.js';
|
|
49
|
+
export * from './ai/index.js';
|
|
50
|
+
export * from './events/index.js';
|
|
51
|
+
export * from './integrations/index.js';
|
|
52
|
+
export * from './identity/index.js';
|
|
53
|
+
export * from './features-and-permissions/index.js';
|
|
54
|
+
export * from './tags/index.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** Dev-only Vite entrypoint that avoids stale sibling .js files under src/. */
|
|
2
|
+
export * from './azure/common.js';
|
|
3
|
+
export * from './azure/activityLogs.js';
|
|
4
|
+
export * from './azure/budgets.js';
|
|
5
|
+
export * from './azure/billingPlots.js';
|
|
6
|
+
export * from './azure/benefits.js';
|
|
7
|
+
export * from './azure/commitmentsPlanning.js';
|
|
8
|
+
export * from './azure/licensing.js';
|
|
9
|
+
export * from './azure/configs.js';
|
|
10
|
+
export * from './azure/metrics.js';
|
|
11
|
+
export * from './azure/payloads.js';
|
|
12
|
+
export * from './azure/portalArtifacts.js';
|
|
13
|
+
export * from './azure/prices.js';
|
|
14
|
+
export * from './azure/relationships.js';
|
|
15
|
+
export * from './azure/recommendations.js';
|
|
16
|
+
export * from './azure/recommendationAudit.js';
|
|
17
|
+
export * from './azure/recommendationWorkflow.js';
|
|
18
|
+
export * from './azure/recommendationState.js';
|
|
19
|
+
export * from './azure/resources.js';
|
|
20
|
+
export * from './azure/reports.js';
|
|
21
|
+
export * from './azure/reportingTemplates.js';
|
|
22
|
+
export * from './azure/reviewChecklist.js';
|
|
23
|
+
export * from './azure/advisorScore.js';
|
|
24
|
+
export * from './azure/resourceHealth.js';
|
|
25
|
+
export * from './azure/subscriptions.js';
|
|
26
|
+
export * from './azure/views.js';
|
|
27
|
+
export * from './azure/security.js';
|
|
28
|
+
export * from './azure/serviceRetirement.js';
|
|
29
|
+
export * from './azure/serviceRetirementState.js';
|
|
30
|
+
export * from './azure/resourceOptimization.js';
|
|
31
|
+
export * from './azure/storage-inventory.js';
|
|
32
|
+
export * from './azure/governance.js';
|
|
33
|
+
export * from './azure/publicIpAddresses.js';
|
|
34
|
+
export * from './azure/dataProtection.js';
|
|
35
|
+
export * from './azure/workManagement.js';
|
|
36
|
+
export * from './accounts/index.js';
|
|
37
|
+
export * from './assessments/index.js';
|
|
38
|
+
export * from './users/index.js';
|
|
39
|
+
export * from './common/provider.js';
|
|
40
|
+
export * from './common/index.js';
|
|
41
|
+
export * from './company/index.js';
|
|
42
|
+
export * from './scheduler/index.js';
|
|
43
|
+
export * from './ai/index.js';
|
|
44
|
+
export * from './events/index.js';
|
|
45
|
+
export * from './integrations/index.js';
|
|
46
|
+
export * from './identity/index.js';
|
|
47
|
+
export * from './features-and-permissions/index.js';
|
|
48
|
+
export * from './tags/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scheduler.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tags.js';
|