@spottoai/types-package 1.0.2-beta.36 → 1.0.2-beta.360
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 +98 -18
- package/dist/accounts/accounts.d.ts +545 -3
- package/dist/accounts/accounts.d.ts.map +1 -1
- package/dist/accounts/accounts.js +122 -0
- package/dist/accounts/accounts.js.map +1 -1
- package/dist/accounts/azureSpSetup.d.ts +401 -0
- package/dist/accounts/azureSpSetup.d.ts.map +1 -0
- package/dist/accounts/azureSpSetup.js +3 -0
- package/dist/accounts/azureSpSetup.js.map +1 -0
- package/dist/accounts/azureSpSetupDurable.d.ts +118 -0
- package/dist/accounts/azureSpSetupDurable.d.ts.map +1 -0
- package/dist/accounts/azureSpSetupDurable.js +3 -0
- package/dist/accounts/azureSpSetupDurable.js.map +1 -0
- package/dist/accounts/index.d.ts +4 -0
- package/dist/accounts/index.d.ts.map +1 -1
- package/dist/accounts/index.js +4 -0
- package/dist/accounts/index.js.map +1 -1
- package/dist/accounts/readPermissions.d.ts +76 -0
- package/dist/accounts/readPermissions.d.ts.map +1 -0
- package/dist/accounts/readPermissions.js +202 -0
- package/dist/accounts/readPermissions.js.map +1 -0
- package/dist/accounts/validation.d.ts +91 -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 +36 -0
- package/dist/accounts/writePermissions.d.ts.map +1 -0
- package/dist/accounts/writePermissions.js +47 -0
- package/dist/accounts/writePermissions.js.map +1 -0
- package/dist/ai/index.d.ts +1019 -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/assessments/artifact.d.ts +84 -0
- package/dist/assessments/artifact.d.ts.map +1 -0
- package/dist/assessments/artifact.js +3 -0
- package/dist/assessments/artifact.js.map +1 -0
- package/dist/assessments/catalogue.d.ts +53 -0
- package/dist/assessments/catalogue.d.ts.map +1 -0
- package/dist/assessments/catalogue.js +16 -0
- package/dist/assessments/catalogue.js.map +1 -0
- package/dist/assessments/common.d.ts +27 -0
- package/dist/assessments/common.d.ts.map +1 -0
- package/dist/assessments/common.js +3 -0
- package/dist/assessments/common.js.map +1 -0
- package/dist/assessments/evidence.d.ts +78 -0
- package/dist/assessments/evidence.d.ts.map +1 -0
- package/dist/assessments/evidence.js +3 -0
- package/dist/assessments/evidence.js.map +1 -0
- package/dist/assessments/export.d.ts +27 -0
- package/dist/assessments/export.d.ts.map +1 -0
- package/dist/assessments/export.js +3 -0
- package/dist/assessments/export.js.map +1 -0
- package/dist/assessments/index.d.ts +11 -0
- package/dist/assessments/index.d.ts.map +1 -0
- package/dist/assessments/index.js +27 -0
- package/dist/assessments/index.js.map +1 -0
- package/dist/assessments/queue.d.ts +20 -0
- package/dist/assessments/queue.d.ts.map +1 -0
- package/dist/assessments/queue.js +6 -0
- package/dist/assessments/queue.js.map +1 -0
- package/dist/assessments/review.d.ts +36 -0
- package/dist/assessments/review.d.ts.map +1 -0
- package/dist/assessments/review.js +3 -0
- package/dist/assessments/review.js.map +1 -0
- package/dist/assessments/run.d.ts +62 -0
- package/dist/assessments/run.d.ts.map +1 -0
- package/dist/assessments/run.js +3 -0
- package/dist/assessments/run.js.map +1 -0
- package/dist/assessments/sow.d.ts +30 -0
- package/dist/assessments/sow.d.ts.map +1 -0
- package/dist/assessments/sow.js +3 -0
- package/dist/assessments/sow.js.map +1 -0
- package/dist/assessments/status.d.ts +27 -0
- package/dist/assessments/status.d.ts.map +1 -0
- package/dist/assessments/status.js +27 -0
- package/dist/assessments/status.js.map +1 -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 +7 -0
- package/dist/aws/commitmentsPlanningValidation.d.ts.map +1 -0
- package/dist/aws/commitmentsPlanningValidation.js +125 -0
- package/dist/aws/commitmentsPlanningValidation.js.map +1 -0
- package/dist/aws/estates.d.ts +153 -0
- package/dist/aws/estates.d.ts.map +1 -0
- package/dist/aws/estates.js +25 -0
- package/dist/aws/estates.js.map +1 -0
- package/dist/aws/index.d.ts +20 -0
- package/dist/aws/index.d.ts.map +1 -0
- package/dist/aws/index.js +35 -0
- package/dist/aws/index.js.map +1 -0
- package/dist/aws/onboarding.d.ts +54 -0
- package/dist/aws/onboarding.d.ts.map +1 -0
- package/dist/aws/onboarding.js +3 -0
- package/dist/aws/onboarding.js.map +1 -0
- package/dist/aws/pluginPublicArtifactBodyValidation.d.ts +10 -0
- package/dist/aws/pluginPublicArtifactBodyValidation.d.ts.map +1 -0
- package/dist/aws/pluginPublicArtifactBodyValidation.js +225 -0
- package/dist/aws/pluginPublicArtifactBodyValidation.js.map +1 -0
- package/dist/aws/pluginPublicArtifactEvidence.d.ts +161 -0
- package/dist/aws/pluginPublicArtifactEvidence.d.ts.map +1 -0
- package/dist/aws/pluginPublicArtifactEvidence.js +3 -0
- package/dist/aws/pluginPublicArtifactEvidence.js.map +1 -0
- package/dist/aws/pluginPublicArtifactManifestValidation.d.ts +4 -0
- package/dist/aws/pluginPublicArtifactManifestValidation.d.ts.map +1 -0
- package/dist/aws/pluginPublicArtifactManifestValidation.js +259 -0
- package/dist/aws/pluginPublicArtifactManifestValidation.js.map +1 -0
- package/dist/aws/pluginPublicArtifactSectionValidation.d.ts +6 -0
- package/dist/aws/pluginPublicArtifactSectionValidation.d.ts.map +1 -0
- package/dist/aws/pluginPublicArtifactSectionValidation.js +471 -0
- package/dist/aws/pluginPublicArtifactSectionValidation.js.map +1 -0
- package/dist/aws/pluginPublicArtifactValidation.d.ts +3 -0
- package/dist/aws/pluginPublicArtifactValidation.d.ts.map +1 -0
- package/dist/aws/pluginPublicArtifactValidation.js +9 -0
- package/dist/aws/pluginPublicArtifactValidation.js.map +1 -0
- package/dist/aws/pluginPublicArtifactValidationHelpers.d.ts +23 -0
- package/dist/aws/pluginPublicArtifactValidationHelpers.d.ts.map +1 -0
- package/dist/aws/pluginPublicArtifactValidationHelpers.js +240 -0
- package/dist/aws/pluginPublicArtifactValidationHelpers.js.map +1 -0
- package/dist/aws/pluginPublicArtifacts.d.ts +253 -0
- package/dist/aws/pluginPublicArtifacts.d.ts.map +1 -0
- package/dist/aws/pluginPublicArtifacts.js +116 -0
- package/dist/aws/pluginPublicArtifacts.js.map +1 -0
- 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/portalPublicArtifactCurrentValidation.d.ts +4 -0
- package/dist/aws/portalPublicArtifactCurrentValidation.d.ts.map +1 -0
- package/dist/aws/portalPublicArtifactCurrentValidation.js +333 -0
- package/dist/aws/portalPublicArtifactCurrentValidation.js.map +1 -0
- package/dist/aws/portalPublicArtifactEvidenceValidation.d.ts +6 -0
- package/dist/aws/portalPublicArtifactEvidenceValidation.d.ts.map +1 -0
- package/dist/aws/portalPublicArtifactEvidenceValidation.js +301 -0
- package/dist/aws/portalPublicArtifactEvidenceValidation.js.map +1 -0
- package/dist/aws/portalPublicArtifactHistoryAiValidation.d.ts +8 -0
- package/dist/aws/portalPublicArtifactHistoryAiValidation.d.ts.map +1 -0
- package/dist/aws/portalPublicArtifactHistoryAiValidation.js +377 -0
- package/dist/aws/portalPublicArtifactHistoryAiValidation.js.map +1 -0
- package/dist/aws/portalPublicArtifactHistoryTypes.d.ts +178 -0
- package/dist/aws/portalPublicArtifactHistoryTypes.d.ts.map +1 -0
- package/dist/aws/portalPublicArtifactHistoryTypes.js +44 -0
- package/dist/aws/portalPublicArtifactHistoryTypes.js.map +1 -0
- package/dist/aws/portalPublicArtifactNestedEvidence.d.ts +127 -0
- package/dist/aws/portalPublicArtifactNestedEvidence.d.ts.map +1 -0
- package/dist/aws/portalPublicArtifactNestedEvidence.js +3 -0
- package/dist/aws/portalPublicArtifactNestedEvidence.js.map +1 -0
- package/dist/aws/portalPublicArtifactNestedEvidenceValidation.d.ts +6 -0
- package/dist/aws/portalPublicArtifactNestedEvidenceValidation.d.ts.map +1 -0
- package/dist/aws/portalPublicArtifactNestedEvidenceValidation.js +405 -0
- package/dist/aws/portalPublicArtifactNestedEvidenceValidation.js.map +1 -0
- package/dist/aws/portalPublicArtifactValidation.d.ts +3 -0
- package/dist/aws/portalPublicArtifactValidation.d.ts.map +1 -0
- package/dist/aws/portalPublicArtifactValidation.js +14 -0
- package/dist/aws/portalPublicArtifactValidation.js.map +1 -0
- package/dist/aws/portalPublicArtifactValidationCommon.d.ts +30 -0
- package/dist/aws/portalPublicArtifactValidationCommon.d.ts.map +1 -0
- package/dist/aws/portalPublicArtifactValidationCommon.js +167 -0
- package/dist/aws/portalPublicArtifactValidationCommon.js.map +1 -0
- package/dist/aws/portalPublicArtifacts.d.ts +400 -0
- package/dist/aws/portalPublicArtifacts.d.ts.map +1 -0
- package/dist/aws/portalPublicArtifacts.js +85 -0
- package/dist/aws/portalPublicArtifacts.js.map +1 -0
- package/dist/aws/portalRelationshipPublicArtifactValidation.d.ts +4 -0
- package/dist/aws/portalRelationshipPublicArtifactValidation.d.ts.map +1 -0
- package/dist/aws/portalRelationshipPublicArtifactValidation.js +338 -0
- package/dist/aws/portalRelationshipPublicArtifactValidation.js.map +1 -0
- package/dist/aws/portalRelationshipPublicArtifacts.d.ts +196 -0
- package/dist/aws/portalRelationshipPublicArtifacts.d.ts.map +1 -0
- package/dist/aws/portalRelationshipPublicArtifacts.js +63 -0
- package/dist/aws/portalRelationshipPublicArtifacts.js.map +1 -0
- package/dist/aws/portalRelationshipResourceNodeTypes.d.ts +269 -0
- package/dist/aws/portalRelationshipResourceNodeTypes.d.ts.map +1 -0
- package/dist/aws/portalRelationshipResourceNodeTypes.js +3 -0
- package/dist/aws/portalRelationshipResourceNodeTypes.js.map +1 -0
- package/dist/aws/portalRelationshipResourceNodeValidation.d.ts +2 -0
- package/dist/aws/portalRelationshipResourceNodeValidation.d.ts.map +1 -0
- package/dist/aws/portalRelationshipResourceNodeValidation.js +372 -0
- package/dist/aws/portalRelationshipResourceNodeValidation.js.map +1 -0
- package/dist/aws/publicArtifacts.d.ts +76 -0
- package/dist/aws/publicArtifacts.d.ts.map +1 -0
- package/dist/aws/publicArtifacts.js +17 -0
- package/dist/aws/publicArtifacts.js.map +1 -0
- 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/aws/requests.d.ts +84 -0
- package/dist/aws/requests.d.ts.map +1 -0
- package/dist/aws/requests.js +23 -0
- package/dist/aws/requests.js.map +1 -0
- package/dist/azure/activityLogs.d.ts +71 -0
- package/dist/azure/activityLogs.d.ts.map +1 -0
- package/dist/azure/activityLogs.js +6 -0
- package/dist/azure/activityLogs.js.map +1 -0
- package/dist/azure/advisorScore.d.ts +39 -0
- package/dist/azure/advisorScore.d.ts.map +1 -0
- package/dist/azure/advisorScore.js +3 -0
- package/dist/azure/advisorScore.js.map +1 -0
- package/dist/azure/benefits.d.ts +161 -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/billingArtifactCanonicalization.d.ts +28 -0
- package/dist/azure/billingArtifactCanonicalization.d.ts.map +1 -0
- package/dist/azure/billingArtifactCanonicalization.js +291 -0
- package/dist/azure/billingArtifactCanonicalization.js.map +1 -0
- package/dist/azure/billingArtifactEvidence.d.ts +39 -0
- package/dist/azure/billingArtifactEvidence.d.ts.map +1 -0
- package/dist/azure/billingArtifactEvidence.js +29 -0
- package/dist/azure/billingArtifactEvidence.js.map +1 -0
- package/dist/azure/billingArtifactGeneration.d.ts +114 -0
- package/dist/azure/billingArtifactGeneration.d.ts.map +1 -0
- package/dist/azure/billingArtifactGeneration.js +238 -0
- package/dist/azure/billingArtifactGeneration.js.map +1 -0
- package/dist/azure/billingGeneration.d.ts +50 -0
- package/dist/azure/billingGeneration.d.ts.map +1 -0
- package/dist/azure/billingGeneration.js +3 -0
- package/dist/azure/billingGeneration.js.map +1 -0
- package/dist/azure/billingPlots.d.ts +273 -0
- package/dist/azure/billingPlots.d.ts.map +1 -0
- package/dist/azure/billingPlots.js +192 -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 +731 -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 +48 -1
- 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/costComposition.d.ts +74 -0
- package/dist/azure/costComposition.d.ts.map +1 -0
- package/dist/azure/costComposition.js +3 -0
- package/dist/azure/costComposition.js.map +1 -0
- package/dist/azure/dataProtection.d.ts +229 -0
- package/dist/azure/dataProtection.d.ts.map +1 -0
- package/dist/azure/dataProtection.js +9 -0
- package/dist/azure/dataProtection.js.map +1 -0
- package/dist/azure/governance.d.ts +942 -0
- package/dist/azure/governance.d.ts.map +1 -0
- package/dist/azure/governance.js +18 -0
- package/dist/azure/governance.js.map +1 -0
- package/dist/azure/licensing.d.ts +386 -0
- package/dist/azure/licensing.d.ts.map +1 -0
- package/dist/azure/licensing.js +3 -0
- package/dist/azure/licensing.js.map +1 -0
- package/dist/azure/metrics.d.ts +99 -4
- package/dist/azure/metrics.d.ts.map +1 -1
- package/dist/azure/payloads.d.ts +376 -1
- package/dist/azure/payloads.d.ts.map +1 -1
- package/dist/azure/portalArtifacts.d.ts +14 -0
- package/dist/azure/portalArtifacts.d.ts.map +1 -0
- package/dist/azure/portalArtifacts.js +5 -0
- package/dist/azure/portalArtifacts.js.map +1 -0
- package/dist/azure/prices.d.ts +250 -0
- package/dist/azure/prices.d.ts.map +1 -1
- package/dist/azure/publicIpAddresses.d.ts +171 -0
- package/dist/azure/publicIpAddresses.d.ts.map +1 -0
- package/dist/azure/publicIpAddresses.js +6 -0
- package/dist/azure/publicIpAddresses.js.map +1 -0
- package/dist/azure/recommendationAudit.d.ts +167 -0
- package/dist/azure/recommendationAudit.d.ts.map +1 -0
- package/dist/azure/recommendationAudit.js +20 -0
- package/dist/azure/recommendationAudit.js.map +1 -0
- package/dist/azure/recommendationState.d.ts +93 -4
- package/dist/azure/recommendationState.d.ts.map +1 -1
- package/dist/azure/recommendationTracks.d.ts +214 -0
- package/dist/azure/recommendationTracks.d.ts.map +1 -0
- package/dist/azure/recommendationTracks.js +44 -0
- package/dist/azure/recommendationTracks.js.map +1 -0
- package/dist/azure/recommendationWorkflow.d.ts +304 -0
- package/dist/azure/recommendationWorkflow.d.ts.map +1 -0
- package/dist/azure/recommendationWorkflow.js +17 -0
- package/dist/azure/recommendationWorkflow.js.map +1 -0
- package/dist/azure/recommendations.d.ts +582 -12
- package/dist/azure/recommendations.d.ts.map +1 -1
- package/dist/azure/recommendations.js.map +1 -1
- package/dist/azure/regulatoryCompliance.d.ts +301 -0
- package/dist/azure/regulatoryCompliance.d.ts.map +1 -0
- package/dist/azure/regulatoryCompliance.js +10 -0
- package/dist/azure/regulatoryCompliance.js.map +1 -0
- package/dist/azure/relationships.d.ts +193 -0
- package/dist/azure/relationships.d.ts.map +1 -0
- package/dist/azure/relationships.js +6 -0
- package/dist/azure/relationships.js.map +1 -0
- package/dist/azure/reportingTemplates.d.ts +70 -0
- package/dist/azure/reportingTemplates.d.ts.map +1 -0
- package/dist/azure/reportingTemplates.js +5 -0
- package/dist/azure/reportingTemplates.js.map +1 -0
- package/dist/azure/reports.d.ts +260 -2
- package/dist/azure/reports.d.ts.map +1 -1
- package/dist/azure/reports.js +1 -1
- package/dist/azure/reports.js.map +1 -1
- package/dist/azure/resourceHealth.d.ts +264 -0
- package/dist/azure/resourceHealth.d.ts.map +1 -0
- package/dist/azure/resourceHealth.js +16 -0
- package/dist/azure/resourceHealth.js.map +1 -0
- package/dist/azure/resourceOptimization.d.ts +79 -0
- package/dist/azure/resourceOptimization.d.ts.map +1 -0
- package/dist/azure/resourceOptimization.js +3 -0
- package/dist/azure/resourceOptimization.js.map +1 -0
- package/dist/azure/resources.d.ts +80 -0
- package/dist/azure/resources.d.ts.map +1 -1
- package/dist/azure/reviewChecklist.d.ts +147 -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/secureScore.d.ts +23 -0
- package/dist/azure/secureScore.d.ts.map +1 -0
- package/dist/azure/secureScore.js +3 -0
- package/dist/azure/secureScore.js.map +1 -0
- package/dist/azure/security.d.ts +10 -0
- package/dist/azure/security.d.ts.map +1 -1
- package/dist/azure/serviceRetirement.d.ts +59 -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/serviceRetirementWorkManagement.d.ts +7 -0
- package/dist/azure/serviceRetirementWorkManagement.d.ts.map +1 -0
- package/dist/azure/serviceRetirementWorkManagement.js +3 -0
- package/dist/azure/serviceRetirementWorkManagement.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 +89 -8
- package/dist/azure/subscriptions.d.ts.map +1 -1
- package/dist/azure/views.d.ts +815 -7
- package/dist/azure/views.d.ts.map +1 -1
- package/dist/azure/views.js +185 -0
- package/dist/azure/views.js.map +1 -1
- package/dist/azure/workManagement.d.ts +154 -0
- package/dist/azure/workManagement.d.ts.map +1 -0
- package/dist/azure/workManagement.js +8 -0
- package/dist/azure/workManagement.js.map +1 -0
- package/dist/common/artifactControlData.d.ts +12 -0
- package/dist/common/artifactControlData.d.ts.map +1 -0
- package/dist/common/artifactControlData.js +102 -0
- package/dist/common/artifactControlData.js.map +1 -0
- package/dist/common/artifactEvidence.d.ts +144 -0
- package/dist/common/artifactEvidence.d.ts.map +1 -0
- package/dist/common/artifactEvidence.js +181 -0
- package/dist/common/artifactEvidence.js.map +1 -0
- package/dist/common/artifactEvidenceValidation.d.ts +16 -0
- package/dist/common/artifactEvidenceValidation.d.ts.map +1 -0
- package/dist/common/artifactEvidenceValidation.js +31 -0
- package/dist/common/artifactEvidenceValidation.js.map +1 -0
- package/dist/common/artifactGeneration.d.ts +93 -0
- package/dist/common/artifactGeneration.d.ts.map +1 -0
- package/dist/common/artifactGeneration.js +5 -0
- package/dist/common/artifactGeneration.js.map +1 -0
- package/dist/common/capabilityPassport.d.ts +114 -0
- package/dist/common/capabilityPassport.d.ts.map +1 -0
- package/dist/common/capabilityPassport.js +211 -0
- package/dist/common/capabilityPassport.js.map +1 -0
- package/dist/common/index.d.ts +6 -0
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +6 -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 +33 -0
- package/dist/common/provider.d.ts.map +1 -0
- package/dist/common/provider.js +15 -0
- package/dist/common/provider.js.map +1 -0
- package/dist/common/providerSyncProgress.d.ts +91 -0
- package/dist/common/providerSyncProgress.d.ts.map +1 -0
- package/dist/common/providerSyncProgress.js +3 -0
- package/dist/common/providerSyncProgress.js.map +1 -0
- package/dist/common/relationships.d.ts +8 -0
- package/dist/common/relationships.d.ts.map +1 -0
- package/dist/common/relationships.js +3 -0
- package/dist/common/relationships.js.map +1 -0
- package/dist/common/syncProgress.d.ts +27 -0
- package/dist/common/syncProgress.d.ts.map +1 -0
- package/dist/common/syncProgress.js +3 -0
- package/dist/common/syncProgress.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 +91 -1
- package/dist/company/company.d.ts.map +1 -1
- package/dist/company/companyHierarchy.d.ts +53 -0
- package/dist/company/companyHierarchy.d.ts.map +1 -0
- package/dist/company/companyHierarchy.js +3 -0
- package/dist/company/companyHierarchy.js.map +1 -0
- package/dist/company/companyNotes.d.ts +288 -0
- package/dist/company/companyNotes.d.ts.map +1 -0
- package/dist/company/companyNotes.js +42 -0
- package/dist/company/companyNotes.js.map +1 -0
- package/dist/company/customProperties.d.ts +2 -0
- package/dist/company/customProperties.d.ts.map +1 -0
- package/dist/company/customProperties.js +18 -0
- package/dist/company/customProperties.js.map +1 -0
- package/dist/company/index.d.ts +3 -0
- package/dist/company/index.d.ts.map +1 -1
- package/dist/company/index.js +3 -0
- package/dist/company/index.js.map +1 -1
- package/dist/company/notification.d.ts +35 -1
- package/dist/company/notification.d.ts.map +1 -1
- package/dist/company/notification.js +27 -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/customProperties/customProperties.d.ts +87 -0
- package/dist/customProperties/customProperties.d.ts.map +1 -0
- package/dist/customProperties/customProperties.js +3 -0
- package/dist/customProperties/customProperties.js.map +1 -0
- package/dist/customProperties/index.d.ts +2 -0
- package/dist/customProperties/index.d.ts.map +1 -0
- package/dist/customProperties/index.js +18 -0
- package/dist/customProperties/index.js.map +1 -0
- 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/billingArtifactCanonicalization.js +281 -0
- package/dist/esm/azure/billingArtifactEvidence.js +23 -0
- package/dist/esm/azure/billingArtifactGeneration.js +229 -0
- package/dist/esm/azure/billingGeneration.js +1 -0
- package/dist/esm/azure/billingPlots.js +187 -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 +181 -0
- package/dist/esm/azure/workManagement.js +4 -0
- package/dist/esm/common/artifactControlData.js +95 -0
- package/dist/esm/common/artifactEvidence.js +173 -0
- package/dist/esm/common/artifactEvidenceValidation.js +24 -0
- package/dist/esm/common/artifactGeneration.js +1 -0
- package/dist/esm/common/capabilityPassport.js +206 -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 +58 -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/portfolio/index.js +2 -0
- package/dist/esm/portfolio/portfolioOperations.js +1 -0
- package/dist/esm/portfolio/portfolioProjections.js +17 -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/dist/events/actionGroups.d.ts +85 -0
- package/dist/events/actionGroups.d.ts.map +1 -0
- package/dist/events/actionGroups.js +3 -0
- package/dist/events/actionGroups.js.map +1 -0
- 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 +140 -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 +371 -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 +25 -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 +9 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +25 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/quickAlerts.d.ts +67 -0
- package/dist/events/quickAlerts.d.ts.map +1 -0
- package/dist/events/quickAlerts.js +7 -0
- package/dist/events/quickAlerts.js.map +1 -0
- package/dist/features-and-permissions/access.d.ts +139 -0
- package/dist/features-and-permissions/access.d.ts.map +1 -0
- package/dist/features-and-permissions/access.js +3 -0
- package/dist/features-and-permissions/access.js.map +1 -0
- package/dist/features-and-permissions/index.d.ts +2 -0
- package/dist/features-and-permissions/index.d.ts.map +1 -0
- package/dist/features-and-permissions/index.js +18 -0
- package/dist/features-and-permissions/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 +84 -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 +40 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -1
- package/dist/index.js.map +1 -1
- package/dist/index.vite.d.ts +49 -0
- package/dist/index.vite.d.ts.map +1 -0
- package/dist/index.vite.js +65 -0
- package/dist/index.vite.js.map +1 -0
- package/dist/integrations/autotask.d.ts +108 -0
- package/dist/integrations/autotask.d.ts.map +1 -0
- package/dist/integrations/autotask.js +3 -0
- package/dist/integrations/autotask.js.map +1 -0
- package/dist/integrations/azureDevOps.d.ts +130 -0
- package/dist/integrations/azureDevOps.d.ts.map +1 -0
- package/dist/integrations/azureDevOps.js +3 -0
- package/dist/integrations/azureDevOps.js.map +1 -0
- package/dist/integrations/github.d.ts +96 -0
- package/dist/integrations/github.d.ts.map +1 -0
- package/dist/integrations/github.js +3 -0
- package/dist/integrations/github.js.map +1 -0
- 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 +6 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +22 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/integrationTickets.d.ts +77 -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/portfolio/index.d.ts +3 -0
- package/dist/portfolio/index.d.ts.map +1 -0
- package/dist/portfolio/index.js +19 -0
- package/dist/portfolio/index.js.map +1 -0
- package/dist/portfolio/portfolioOperations.d.ts +174 -0
- package/dist/portfolio/portfolioOperations.d.ts.map +1 -0
- package/dist/portfolio/portfolioOperations.js +3 -0
- package/dist/portfolio/portfolioOperations.js.map +1 -0
- package/dist/portfolio/portfolioProjections.d.ts +460 -0
- package/dist/portfolio/portfolioProjections.d.ts.map +1 -0
- package/dist/portfolio/portfolioProjections.js +21 -0
- package/dist/portfolio/portfolioProjections.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 +263 -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 +37 -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/dist/users/companyUser.d.ts +14 -0
- package/dist/users/companyUser.d.ts.map +1 -1
- package/dist/users/companyUser.js.map +1 -1
- package/dist/users/user.d.ts +20 -1
- package/dist/users/user.d.ts.map +1 -1
- package/package.json +68 -5
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
const hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
2
|
+
const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
3
|
+
const requirePlainRecord = (value, name) => {
|
|
4
|
+
if (!isRecord(value))
|
|
5
|
+
throw new TypeError(`${name} must be an object.`);
|
|
6
|
+
const prototype = Object.getPrototypeOf(value);
|
|
7
|
+
if (prototype !== Object.prototype && prototype !== null)
|
|
8
|
+
throw new TypeError(`${name} must be a plain JSON object.`);
|
|
9
|
+
if (Object.getOwnPropertySymbols(value).length > 0)
|
|
10
|
+
throw new TypeError(`${name} cannot contain symbol properties.`);
|
|
11
|
+
return value;
|
|
12
|
+
};
|
|
13
|
+
const hasUnpairedSurrogate = (value) => {
|
|
14
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
15
|
+
const code = value.charCodeAt(index);
|
|
16
|
+
if (code >= 0xd800 && code <= 0xdbff) {
|
|
17
|
+
const next = value.charCodeAt(index + 1);
|
|
18
|
+
if (!(next >= 0xdc00 && next <= 0xdfff))
|
|
19
|
+
return true;
|
|
20
|
+
index += 1;
|
|
21
|
+
}
|
|
22
|
+
else if (code >= 0xdc00 && code <= 0xdfff) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
};
|
|
28
|
+
const readDataProperty = (value, key, optional = false) => {
|
|
29
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
30
|
+
if (descriptor === undefined) {
|
|
31
|
+
if (optional)
|
|
32
|
+
return undefined;
|
|
33
|
+
throw new TypeError(`Missing canonical billing field: ${key}`);
|
|
34
|
+
}
|
|
35
|
+
if (!('value' in descriptor) || !descriptor.enumerable || descriptor.value === undefined) {
|
|
36
|
+
throw new TypeError(`Canonical billing field must be an enumerable JSON value: ${key}`);
|
|
37
|
+
}
|
|
38
|
+
return descriptor.value;
|
|
39
|
+
};
|
|
40
|
+
const selectOptional = (source, target, key) => {
|
|
41
|
+
if (hasOwn(source, key))
|
|
42
|
+
target[key] = readDataProperty(source, key, true);
|
|
43
|
+
};
|
|
44
|
+
const readArrayEntries = (value, name) => {
|
|
45
|
+
if (!Array.isArray(value) || Object.getPrototypeOf(value) !== Array.prototype) {
|
|
46
|
+
throw new TypeError(`${name} must be a plain JSON array.`);
|
|
47
|
+
}
|
|
48
|
+
const ownKeys = Reflect.ownKeys(value);
|
|
49
|
+
if (ownKeys.some(key => typeof key === 'symbol') ||
|
|
50
|
+
ownKeys.some(key => typeof key === 'string' && key !== 'length' && !/^(0|[1-9]\d*)$/.test(key))) {
|
|
51
|
+
throw new TypeError(`${name} cannot contain custom properties.`);
|
|
52
|
+
}
|
|
53
|
+
const entries = [];
|
|
54
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
55
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, String(index));
|
|
56
|
+
if (descriptor === undefined || !('value' in descriptor) || !descriptor.enumerable || descriptor.value === undefined) {
|
|
57
|
+
throw new TypeError(`${name} entries must be enumerable JSON values.`);
|
|
58
|
+
}
|
|
59
|
+
entries.push(descriptor.value);
|
|
60
|
+
}
|
|
61
|
+
return entries;
|
|
62
|
+
};
|
|
63
|
+
const projectOwnership = (value) => {
|
|
64
|
+
const source = requirePlainRecord(value, 'Billing output ownership');
|
|
65
|
+
const projected = {
|
|
66
|
+
provider: readDataProperty(source, 'provider'),
|
|
67
|
+
tenantId: readDataProperty(source, 'tenantId'),
|
|
68
|
+
companyId: readDataProperty(source, 'companyId'),
|
|
69
|
+
cloudAccountId: readDataProperty(source, 'cloudAccountId'),
|
|
70
|
+
accountId: readDataProperty(source, 'accountId'),
|
|
71
|
+
};
|
|
72
|
+
selectOptional(source, projected, 'ownershipEpochRevision');
|
|
73
|
+
return projected;
|
|
74
|
+
};
|
|
75
|
+
const projectRevision = (value) => {
|
|
76
|
+
const source = requirePlainRecord(value, 'Billing output revision');
|
|
77
|
+
const projected = {
|
|
78
|
+
sourceRevision: readDataProperty(source, 'sourceRevision'),
|
|
79
|
+
policyRevision: readDataProperty(source, 'policyRevision'),
|
|
80
|
+
};
|
|
81
|
+
selectOptional(source, projected, 'ownershipEpochRevision');
|
|
82
|
+
return projected;
|
|
83
|
+
};
|
|
84
|
+
const projectIssue = (value) => {
|
|
85
|
+
const source = requirePlainRecord(value, 'Billing publication issue');
|
|
86
|
+
const projected = {
|
|
87
|
+
code: readDataProperty(source, 'code'),
|
|
88
|
+
blocking: readDataProperty(source, 'blocking'),
|
|
89
|
+
};
|
|
90
|
+
selectOptional(source, projected, 'dependency');
|
|
91
|
+
return projected;
|
|
92
|
+
};
|
|
93
|
+
const projectObservedRange = (value) => {
|
|
94
|
+
const source = requirePlainRecord(value, 'Billing observed range');
|
|
95
|
+
const projected = {
|
|
96
|
+
fromInclusive: readDataProperty(source, 'fromInclusive'),
|
|
97
|
+
throughExclusive: readDataProperty(source, 'throughExclusive'),
|
|
98
|
+
dateBasis: readDataProperty(source, 'dateBasis'),
|
|
99
|
+
};
|
|
100
|
+
selectOptional(source, projected, 'timeZone');
|
|
101
|
+
return projected;
|
|
102
|
+
};
|
|
103
|
+
const projectDependency = (value) => {
|
|
104
|
+
const source = requirePlainRecord(value, 'Billing publication dependency');
|
|
105
|
+
const projected = {
|
|
106
|
+
name: readDataProperty(source, 'name'),
|
|
107
|
+
required: readDataProperty(source, 'required'),
|
|
108
|
+
support: readDataProperty(source, 'support'),
|
|
109
|
+
applicability: readDataProperty(source, 'applicability'),
|
|
110
|
+
attempt: readDataProperty(source, 'attempt'),
|
|
111
|
+
coverage: readDataProperty(source, 'coverage'),
|
|
112
|
+
emptyEvidence: readDataProperty(source, 'emptyEvidence'),
|
|
113
|
+
freshness: readDataProperty(source, 'freshness'),
|
|
114
|
+
evidence: readDataProperty(source, 'evidence'),
|
|
115
|
+
publication: readDataProperty(source, 'publication'),
|
|
116
|
+
};
|
|
117
|
+
for (const key of [
|
|
118
|
+
'generationId',
|
|
119
|
+
'digest',
|
|
120
|
+
'sourceRevision',
|
|
121
|
+
'policyRevision',
|
|
122
|
+
'completeThrough',
|
|
123
|
+
'emptyProofRef',
|
|
124
|
+
'reasonCode',
|
|
125
|
+
'acceptedRowCount',
|
|
126
|
+
]) {
|
|
127
|
+
selectOptional(source, projected, key);
|
|
128
|
+
}
|
|
129
|
+
if (hasOwn(source, 'observedRange'))
|
|
130
|
+
projected.observedRange = projectObservedRange(readDataProperty(source, 'observedRange', true));
|
|
131
|
+
return projected;
|
|
132
|
+
};
|
|
133
|
+
const projectClaim = (value) => {
|
|
134
|
+
const source = requirePlainRecord(value, 'Billing publication claim');
|
|
135
|
+
const sectionPaths = readArrayEntries(readDataProperty(source, 'sectionPaths'), 'Billing claim section paths');
|
|
136
|
+
const requiredDependencies = readArrayEntries(readDataProperty(source, 'requiredDependencies'), 'Billing claim dependencies');
|
|
137
|
+
const issues = readArrayEntries(readDataProperty(source, 'issues'), 'Billing claim issues');
|
|
138
|
+
return {
|
|
139
|
+
claimId: readDataProperty(source, 'claimId'),
|
|
140
|
+
sectionPaths: [...sectionPaths],
|
|
141
|
+
requiredDependencies: [...requiredDependencies],
|
|
142
|
+
evidence: readDataProperty(source, 'evidence'),
|
|
143
|
+
publication: readDataProperty(source, 'publication'),
|
|
144
|
+
issues: issues.map(projectIssue),
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
const projectPublicationDecision = (value) => {
|
|
148
|
+
const source = requirePlainRecord(value, 'Billing publication decision');
|
|
149
|
+
const dependencies = readArrayEntries(readDataProperty(source, 'dependencies'), 'Billing publication dependencies');
|
|
150
|
+
const claims = readArrayEntries(readDataProperty(source, 'claims'), 'Billing publication claims');
|
|
151
|
+
const issues = readArrayEntries(readDataProperty(source, 'issues'), 'Billing publication issues');
|
|
152
|
+
return {
|
|
153
|
+
processing: readDataProperty(source, 'processing'),
|
|
154
|
+
evidence: readDataProperty(source, 'evidence'),
|
|
155
|
+
publication: readDataProperty(source, 'publication'),
|
|
156
|
+
dependencies: dependencies.map(projectDependency),
|
|
157
|
+
claims: claims.map(projectClaim),
|
|
158
|
+
issues: issues.map(projectIssue),
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
const projectBinding = (subscriptionId, generationId, ownership, revision, inputManifestDigest, publicationDecision) => ({
|
|
162
|
+
kind: 'billing-analysis-output',
|
|
163
|
+
schemaVersion: 1,
|
|
164
|
+
subscriptionId: subscriptionId,
|
|
165
|
+
generationId: generationId,
|
|
166
|
+
ownership: projectOwnership(ownership),
|
|
167
|
+
revision: projectRevision(revision),
|
|
168
|
+
inputManifestDigest: inputManifestDigest,
|
|
169
|
+
publicationDecision: projectPublicationDecision(publicationDecision),
|
|
170
|
+
});
|
|
171
|
+
/** Selects the exact binding-v1 identity/evidence fields from an output manifest. */
|
|
172
|
+
export const projectBillingOutputBindingV1FromManifest = (manifest) => {
|
|
173
|
+
const value = requirePlainRecord(manifest, 'Billing output manifest');
|
|
174
|
+
return projectBinding(readDataProperty(value, 'subscriptionId'), readDataProperty(value, 'generationId'), readDataProperty(value, 'ownership'), readDataProperty(value, 'revision'), readDataProperty(value, 'inputManifestDigest'), readDataProperty(value, 'publicationDecision'));
|
|
175
|
+
};
|
|
176
|
+
/** Selects the exact binding-v1 identity/evidence fields from billing metadata. */
|
|
177
|
+
export const projectBillingOutputBindingV1FromMetadata = (metadata) => {
|
|
178
|
+
const value = requirePlainRecord(metadata, 'Billing cost metadata');
|
|
179
|
+
return projectBinding(readDataProperty(value, 'subscriptionId'), readDataProperty(value, 'billingGenerationId'), readDataProperty(value, 'ownership'), readDataProperty(value, 'revision'), readDataProperty(value, 'inputManifestDigest'), readDataProperty(value, 'artifactEvidence'));
|
|
180
|
+
};
|
|
181
|
+
const canonicalizeJson = (value) => {
|
|
182
|
+
const active = new Set();
|
|
183
|
+
const serialize = (candidate) => {
|
|
184
|
+
if (candidate === null || typeof candidate === 'boolean')
|
|
185
|
+
return JSON.stringify(candidate);
|
|
186
|
+
if (typeof candidate === 'string') {
|
|
187
|
+
if (hasUnpairedSurrogate(candidate))
|
|
188
|
+
throw new TypeError('Canonical JSON rejects invalid Unicode surrogate data.');
|
|
189
|
+
return JSON.stringify(candidate);
|
|
190
|
+
}
|
|
191
|
+
if (typeof candidate === 'number') {
|
|
192
|
+
if (!Number.isFinite(candidate) || Object.is(candidate, -0) || (Number.isInteger(candidate) && !Number.isSafeInteger(candidate))) {
|
|
193
|
+
throw new TypeError('Canonical JSON requires finite, safe, non-negative-zero numbers.');
|
|
194
|
+
}
|
|
195
|
+
return JSON.stringify(candidate);
|
|
196
|
+
}
|
|
197
|
+
if (typeof candidate !== 'object' || candidate === undefined)
|
|
198
|
+
throw new TypeError('Canonical JSON rejects non-JSON values.');
|
|
199
|
+
if (active.has(candidate))
|
|
200
|
+
throw new TypeError('Canonical JSON rejects cyclic values.');
|
|
201
|
+
active.add(candidate);
|
|
202
|
+
try {
|
|
203
|
+
if (Array.isArray(candidate)) {
|
|
204
|
+
if (Object.getPrototypeOf(candidate) !== Array.prototype)
|
|
205
|
+
throw new TypeError('Canonical JSON requires plain arrays.');
|
|
206
|
+
const ownKeys = Reflect.ownKeys(candidate);
|
|
207
|
+
if (ownKeys.some(key => typeof key === 'symbol') ||
|
|
208
|
+
ownKeys.some(key => typeof key === 'string' && key !== 'length' && !/^(0|[1-9]\d*)$/.test(key))) {
|
|
209
|
+
throw new TypeError('Canonical JSON arrays cannot contain custom properties.');
|
|
210
|
+
}
|
|
211
|
+
const values = [];
|
|
212
|
+
for (let index = 0; index < candidate.length; index += 1) {
|
|
213
|
+
if (!hasOwn(candidate, index))
|
|
214
|
+
throw new TypeError('Canonical JSON rejects sparse arrays.');
|
|
215
|
+
const descriptor = Object.getOwnPropertyDescriptor(candidate, String(index));
|
|
216
|
+
if (descriptor === undefined || !('value' in descriptor) || !descriptor.enumerable || descriptor.value === undefined) {
|
|
217
|
+
throw new TypeError('Canonical JSON array entries must be enumerable JSON values.');
|
|
218
|
+
}
|
|
219
|
+
values.push(serialize(descriptor.value));
|
|
220
|
+
}
|
|
221
|
+
return `[${values.join(',')}]`;
|
|
222
|
+
}
|
|
223
|
+
const prototype = Object.getPrototypeOf(candidate);
|
|
224
|
+
if (prototype !== Object.prototype && prototype !== null)
|
|
225
|
+
throw new TypeError('Canonical JSON requires plain objects.');
|
|
226
|
+
if (Object.getOwnPropertySymbols(candidate).length > 0)
|
|
227
|
+
throw new TypeError('Canonical JSON rejects symbol properties.');
|
|
228
|
+
const entries = [];
|
|
229
|
+
for (const key of Object.getOwnPropertyNames(candidate).sort()) {
|
|
230
|
+
if (hasUnpairedSurrogate(key))
|
|
231
|
+
throw new TypeError('Canonical JSON rejects invalid Unicode property names.');
|
|
232
|
+
const descriptor = Object.getOwnPropertyDescriptor(candidate, key);
|
|
233
|
+
if (descriptor === undefined || !('value' in descriptor) || !descriptor.enumerable || descriptor.value === undefined) {
|
|
234
|
+
throw new TypeError('Canonical JSON object fields must be enumerable JSON values.');
|
|
235
|
+
}
|
|
236
|
+
entries.push(`${JSON.stringify(key)}:${serialize(descriptor.value)}`);
|
|
237
|
+
}
|
|
238
|
+
return `{${entries.join(',')}}`;
|
|
239
|
+
}
|
|
240
|
+
finally {
|
|
241
|
+
active.delete(candidate);
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
return serialize(value);
|
|
245
|
+
};
|
|
246
|
+
const withoutManifestDigest = (manifest) => {
|
|
247
|
+
const prototype = Object.getPrototypeOf(manifest);
|
|
248
|
+
if (prototype !== Object.prototype && prototype !== null)
|
|
249
|
+
throw new TypeError('Canonical manifests must be plain objects.');
|
|
250
|
+
const digestDescriptor = Object.getOwnPropertyDescriptor(manifest, 'manifestDigest');
|
|
251
|
+
if (digestDescriptor === undefined || !('value' in digestDescriptor) || typeof digestDescriptor.value !== 'string') {
|
|
252
|
+
throw new TypeError('Canonical manifests require a top-level manifestDigest string.');
|
|
253
|
+
}
|
|
254
|
+
const preimage = {};
|
|
255
|
+
for (const key of Reflect.ownKeys(manifest)) {
|
|
256
|
+
if (typeof key !== 'string')
|
|
257
|
+
throw new TypeError('Canonical manifests reject symbol properties.');
|
|
258
|
+
if (key === 'manifestDigest')
|
|
259
|
+
continue;
|
|
260
|
+
const descriptor = Object.getOwnPropertyDescriptor(manifest, key);
|
|
261
|
+
if (descriptor === undefined || !('value' in descriptor) || !descriptor.enumerable || descriptor.value === undefined) {
|
|
262
|
+
throw new TypeError('Canonical manifest fields must be enumerable JSON values.');
|
|
263
|
+
}
|
|
264
|
+
preimage[key] = descriptor.value;
|
|
265
|
+
}
|
|
266
|
+
return preimage;
|
|
267
|
+
};
|
|
268
|
+
/** Returns the RFC 8785/JCS-compatible UTF-8 preimage for billing output binding SHA-256 B. */
|
|
269
|
+
export const canonicalizeBillingOutputBindingV1 = (binding) => {
|
|
270
|
+
const value = requirePlainRecord(binding, 'Billing output binding');
|
|
271
|
+
if (readDataProperty(value, 'kind') !== 'billing-analysis-output' || readDataProperty(value, 'schemaVersion') !== 1) {
|
|
272
|
+
throw new TypeError('Billing output binding requires its version-1 domain separator.');
|
|
273
|
+
}
|
|
274
|
+
return canonicalizeJson(projectBinding(readDataProperty(value, 'subscriptionId'), readDataProperty(value, 'generationId'), readDataProperty(value, 'ownership'), readDataProperty(value, 'revision'), readDataProperty(value, 'inputManifestDigest'), readDataProperty(value, 'publicationDecision')));
|
|
275
|
+
};
|
|
276
|
+
/** Returns the canonical input-manifest digest preimage, excluding only top-level manifestDigest. */
|
|
277
|
+
export const canonicalizeBillingAnalyzerInputManifestV2ForDigest = (manifest) => canonicalizeJson(withoutManifestDigest(manifest));
|
|
278
|
+
/** Returns the canonical output-manifest digest preimage, excluding only top-level manifestDigest. */
|
|
279
|
+
export const canonicalizeBillingAnalyzerOutputManifestV2ForDigest = (manifest) => canonicalizeJson(withoutManifestDigest(manifest));
|
|
280
|
+
/** Returns the RFC 8785/JCS-compatible canonical JSON string for a validated JSON value. */
|
|
281
|
+
export const canonicalizeBillingArtifactJson = (value) => canonicalizeJson(value);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { isArtifactPublicationDecision, } from '../common/artifactEvidence.js';
|
|
2
|
+
const hasBillingArtifactAuthority = (value, generationId, inputManifestDigest) => {
|
|
3
|
+
const billingHistory = value.dependencies[0];
|
|
4
|
+
const costAnalysis = value.claims[0];
|
|
5
|
+
return (billingHistory?.name === 'billing-history' &&
|
|
6
|
+
billingHistory.required === true &&
|
|
7
|
+
billingHistory.publication === 'completed' &&
|
|
8
|
+
billingHistory.generationId === generationId &&
|
|
9
|
+
billingHistory.digest === inputManifestDigest &&
|
|
10
|
+
costAnalysis?.claimId === 'cost-analysis' &&
|
|
11
|
+
costAnalysis.requiredDependencies[0] === 'billing-history');
|
|
12
|
+
};
|
|
13
|
+
/** Validates the exact completed billing dependency and claim bound to one input generation. */
|
|
14
|
+
export const isBillingCompletedArtifactPublicationDecision = (value, generationId, inputManifestDigest) => {
|
|
15
|
+
if (!isArtifactPublicationDecision(value) || value.publication !== 'completed')
|
|
16
|
+
return false;
|
|
17
|
+
return value.claims[0]?.publication === 'completed' && hasBillingArtifactAuthority(value, generationId, inputManifestDigest);
|
|
18
|
+
};
|
|
19
|
+
/** Validates partial billing evidence bound to one authoritative input generation. */
|
|
20
|
+
export const isBillingPartialArtifactPublicationDecision = (value, generationId, inputManifestDigest) => isArtifactPublicationDecision(value) &&
|
|
21
|
+
value.evidence === 'partial' &&
|
|
22
|
+
(value.publication === 'completed' || value.publication === 'partial') &&
|
|
23
|
+
hasBillingArtifactAuthority(value, generationId, inputManifestDigest);
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { isArtifactOwnershipBinding, isEnforceableArtifactOwnershipBinding, } from '../common/artifactEvidence.js';
|
|
2
|
+
import { isArtifactRevisionVector, isStrictLogicalArtifactReference } from '../common/artifactEvidenceValidation.js';
|
|
3
|
+
import { allowedArtifactIdentityField, allowedArtifactReferenceField, containsForbiddenArtifactControlData, } from '../common/artifactControlData.js';
|
|
4
|
+
import { isBillingCompletedArtifactPublicationDecision } from './billingArtifactEvidence.js';
|
|
5
|
+
const BILLING_BASES = new Set(['actual', 'amortized']);
|
|
6
|
+
const COVERAGE_VERDICTS = new Set(['complete', 'partial', 'none', 'unknown']);
|
|
7
|
+
const DATE_BASES = new Set(['utc', 'billing-calendar', 'company-local']);
|
|
8
|
+
const CONTENT_ENCODINGS = new Set(['identity', 'gzip']);
|
|
9
|
+
const SHA256_PATTERN = /^[a-f0-9]{64}$/;
|
|
10
|
+
const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
11
|
+
const isNonEmptyString = (value) => typeof value === 'string' && value.trim() === value && value.length > 0;
|
|
12
|
+
const isPositiveInteger = (value) => Number.isSafeInteger(value) && Number(value) > 0;
|
|
13
|
+
const isNonNegativeInteger = (value) => Number.isSafeInteger(value) && Number(value) >= 0;
|
|
14
|
+
const isFiniteNumber = (value) => typeof value === 'number' && Number.isFinite(value);
|
|
15
|
+
const isStringIn = (value, values) => typeof value === 'string' && values.has(value);
|
|
16
|
+
const hasUniqueValues = (values) => new Set(values).size === values.length;
|
|
17
|
+
const publicationDecisionReferencesDigest = (value, digests) => isRecord(value) &&
|
|
18
|
+
Array.isArray(value.dependencies) &&
|
|
19
|
+
value.dependencies.some(dependency => isRecord(dependency) && typeof dependency.digest === 'string' && digests.has(dependency.digest));
|
|
20
|
+
const isCanonicalIsoTimestamp = (value) => {
|
|
21
|
+
if (!isNonEmptyString(value))
|
|
22
|
+
return false;
|
|
23
|
+
const timestamp = Date.parse(value);
|
|
24
|
+
return Number.isFinite(timestamp) && new Date(timestamp).toISOString() === value;
|
|
25
|
+
};
|
|
26
|
+
const hasControlCharacters = (value) => Array.from(value).some(character => character.charCodeAt(0) < 32 || character.charCodeAt(0) === 127);
|
|
27
|
+
const allowedDescriptorPaths = (descriptors) => Array.isArray(descriptors) ? descriptors.flatMap(descriptor => allowedArtifactReferenceField(descriptor, 'path')) : [];
|
|
28
|
+
const isPathSegment = (value) => isNonEmptyString(value) && !/[\\/?#%]/.test(value) && !hasControlCharacters(value) && value !== '.' && value !== '..';
|
|
29
|
+
const inputGenerationPrefix = (subscriptionId, generationId) => `subscriptions/${subscriptionId}/history/billing/analyzer-inputs/generations/${generationId}/`;
|
|
30
|
+
const inputManifestPath = (subscriptionId, generationId) => `${inputGenerationPrefix(subscriptionId, generationId)}manifest.json`;
|
|
31
|
+
const outputGenerationPrefix = (subscriptionId, generationId) => `subscriptions/${subscriptionId}/billing/generations/${generationId}/`;
|
|
32
|
+
const outputManifestPath = (subscriptionId, generationId) => `${outputGenerationPrefix(subscriptionId, generationId)}manifest.json`;
|
|
33
|
+
const isGenerationPath = (value, prefix, forbiddenExactPath) => isStrictLogicalArtifactReference(value) && value.startsWith(prefix) && value.length > prefix.length && value !== forbiddenExactPath;
|
|
34
|
+
const hasMatchingIdentity = (subscriptionId, generationId, ownership, revision, enforceable) => {
|
|
35
|
+
if (!isPathSegment(subscriptionId) ||
|
|
36
|
+
!isPathSegment(generationId) ||
|
|
37
|
+
!isArtifactOwnershipBinding(ownership) ||
|
|
38
|
+
!isArtifactRevisionVector(revision)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
if (ownership.provider !== 'azure' || ownership.accountId !== subscriptionId)
|
|
42
|
+
return false;
|
|
43
|
+
if (ownership.ownershipEpochRevision !== revision.ownershipEpochRevision)
|
|
44
|
+
return false;
|
|
45
|
+
return !enforceable || isEnforceableArtifactOwnershipBinding(ownership);
|
|
46
|
+
};
|
|
47
|
+
const isSha256 = (value) => typeof value === 'string' && SHA256_PATTERN.test(value);
|
|
48
|
+
const isRequestedPeriod = (value) => {
|
|
49
|
+
if (!isRecord(value) ||
|
|
50
|
+
!isCanonicalIsoTimestamp(value.fromInclusive) ||
|
|
51
|
+
!isCanonicalIsoTimestamp(value.throughExclusive) ||
|
|
52
|
+
Date.parse(value.throughExclusive) <= Date.parse(value.fromInclusive) ||
|
|
53
|
+
!isStringIn(value.dateBasis, DATE_BASES) ||
|
|
54
|
+
!isStringIn(value.basis, BILLING_BASES)) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
return value.timeZone === undefined || isNonEmptyString(value.timeZone);
|
|
58
|
+
};
|
|
59
|
+
const isInputObjectDescriptor = (value, subscriptionId, generationId) => {
|
|
60
|
+
if (!isRecord(value))
|
|
61
|
+
return false;
|
|
62
|
+
const prefix = inputGenerationPrefix(subscriptionId, generationId);
|
|
63
|
+
return (isGenerationPath(value.path, prefix, inputManifestPath(subscriptionId, generationId)) &&
|
|
64
|
+
(value.versionId === undefined || isNonEmptyString(value.versionId)) &&
|
|
65
|
+
isNonEmptyString(value.etag) &&
|
|
66
|
+
isSha256(value.sha256) &&
|
|
67
|
+
isPositiveInteger(value.byteCount) &&
|
|
68
|
+
isNonNegativeInteger(value.rowCount) &&
|
|
69
|
+
isStringIn(value.basis, BILLING_BASES) &&
|
|
70
|
+
(value.currencyCode === undefined || isNonEmptyString(value.currencyCode)) &&
|
|
71
|
+
isStringIn(value.coverage, COVERAGE_VERDICTS));
|
|
72
|
+
};
|
|
73
|
+
const isOutputArtifactDescriptor = (value, subscriptionId, generationId) => {
|
|
74
|
+
if (!isRecord(value))
|
|
75
|
+
return false;
|
|
76
|
+
const prefix = outputGenerationPrefix(subscriptionId, generationId);
|
|
77
|
+
return (isGenerationPath(value.path, prefix, outputManifestPath(subscriptionId, generationId)) &&
|
|
78
|
+
isNonEmptyString(value.name) &&
|
|
79
|
+
value.mediaType === 'application/json' &&
|
|
80
|
+
isStringIn(value.contentEncoding, CONTENT_ENCODINGS) &&
|
|
81
|
+
isNonNegativeInteger(value.byteLength) &&
|
|
82
|
+
isSha256(value.sha256));
|
|
83
|
+
};
|
|
84
|
+
const isJsonMetadata = (value) => {
|
|
85
|
+
if (!isRecord(value))
|
|
86
|
+
return false;
|
|
87
|
+
const visit = (candidate) => {
|
|
88
|
+
if (candidate === null || typeof candidate === 'string' || typeof candidate === 'boolean')
|
|
89
|
+
return true;
|
|
90
|
+
if (isFiniteNumber(candidate))
|
|
91
|
+
return true;
|
|
92
|
+
if (Array.isArray(candidate))
|
|
93
|
+
return candidate.every(visit);
|
|
94
|
+
return isRecord(candidate) && Object.getPrototypeOf(candidate) === Object.prototype && Object.values(candidate).every(visit);
|
|
95
|
+
};
|
|
96
|
+
return visit(value);
|
|
97
|
+
};
|
|
98
|
+
/** Validates one immutable billing analyzer input manifest without performing I/O. */
|
|
99
|
+
export const isBillingAnalyzerInputManifestV2 = (value) => {
|
|
100
|
+
if (!isRecord(value) ||
|
|
101
|
+
containsForbiddenArtifactControlData(value, [...allowedArtifactIdentityField(value, 'publicationKey'), ...allowedDescriptorPaths(value.inputs)])) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
if (value.schemaVersion !== 2 || value.status !== 'completed')
|
|
105
|
+
return false;
|
|
106
|
+
if (!hasMatchingIdentity(value.subscriptionId, value.generationId, value.ownership, value.revision, false))
|
|
107
|
+
return false;
|
|
108
|
+
if (!isNonEmptyString(value.publicationKey) || !isSha256(value.coveragePlanDigest) || !isSha256(value.manifestDigest))
|
|
109
|
+
return false;
|
|
110
|
+
if (!isCanonicalIsoTimestamp(value.asOfUtc) || !isCanonicalIsoTimestamp(value.stableCutoffUtc) || !isCanonicalIsoTimestamp(value.completedAt)) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
if (Date.parse(value.stableCutoffUtc) > Date.parse(value.asOfUtc) || Date.parse(value.completedAt) < Date.parse(value.asOfUtc))
|
|
114
|
+
return false;
|
|
115
|
+
if (!Array.isArray(value.requestedPeriods) || value.requestedPeriods.length === 0 || !value.requestedPeriods.every(isRequestedPeriod))
|
|
116
|
+
return false;
|
|
117
|
+
const periodKeys = value.requestedPeriods.map(period => `${period.fromInclusive}\n${period.throughExclusive}\n${period.dateBasis}\n${period.timeZone ?? ''}\n${period.basis}`);
|
|
118
|
+
if (!hasUniqueValues(periodKeys))
|
|
119
|
+
return false;
|
|
120
|
+
if (!Array.isArray(value.inputs) || value.inputs.length === 0)
|
|
121
|
+
return false;
|
|
122
|
+
if (!value.inputs.every(input => isInputObjectDescriptor(input, value.subscriptionId, value.generationId)))
|
|
123
|
+
return false;
|
|
124
|
+
return hasUniqueValues(value.inputs.map(input => input.path));
|
|
125
|
+
};
|
|
126
|
+
/** Validates the enforceable current pointer for one published analyzer input generation. */
|
|
127
|
+
export const isBillingAnalyzerInputCurrentPointerV1 = (value) => {
|
|
128
|
+
if (!isRecord(value) || containsForbiddenArtifactControlData(value, allowedArtifactReferenceField(value, 'manifestPath')))
|
|
129
|
+
return false;
|
|
130
|
+
if (value.schemaVersion !== 1 || value.status !== 'completed')
|
|
131
|
+
return false;
|
|
132
|
+
if (!hasMatchingIdentity(value.subscriptionId, value.generationId, value.ownership, value.revision, true))
|
|
133
|
+
return false;
|
|
134
|
+
return (isStrictLogicalArtifactReference(value.manifestPath) &&
|
|
135
|
+
value.manifestPath === inputManifestPath(value.subscriptionId, value.generationId) &&
|
|
136
|
+
isSha256(value.manifestDigest) &&
|
|
137
|
+
isCanonicalIsoTimestamp(value.completedAt));
|
|
138
|
+
};
|
|
139
|
+
/** Validates the V2 queue envelope and its immutable input-manifest binding. */
|
|
140
|
+
export const isBillingAnalyzerRequestV2 = (value) => {
|
|
141
|
+
if (!isRecord(value) || containsForbiddenArtifactControlData(value, allowedArtifactReferenceField(value, 'inputManifestPath')))
|
|
142
|
+
return false;
|
|
143
|
+
if (value.schemaVersion !== 2 || (value.publicationMode !== 'observe' && value.publicationMode !== 'enforce'))
|
|
144
|
+
return false;
|
|
145
|
+
const enforceable = value.publicationMode === 'enforce';
|
|
146
|
+
if (!hasMatchingIdentity(value.subscriptionId, value.generationId, value.ownership, value.revision, enforceable))
|
|
147
|
+
return false;
|
|
148
|
+
if (![value.eventId, value.correlationId].every(isNonEmptyString) || !isSha256(value.messageId) || !isSha256(value.idempotencyKey))
|
|
149
|
+
return false;
|
|
150
|
+
if (value.idempotencyKey !== value.messageId || !isCanonicalIsoTimestamp(value.occurredAt))
|
|
151
|
+
return false;
|
|
152
|
+
if (!isStrictLogicalArtifactReference(value.inputManifestPath) ||
|
|
153
|
+
value.inputManifestPath !== inputManifestPath(value.subscriptionId, value.generationId)) {
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
if (!isSha256(value.inputManifestDigest))
|
|
157
|
+
return false;
|
|
158
|
+
return value.displayMetadata === undefined || isJsonMetadata(value.displayMetadata);
|
|
159
|
+
};
|
|
160
|
+
/** Validates an immutable analyzer output manifest and its exact input binding. */
|
|
161
|
+
export const isBillingAnalyzerOutputManifestV2 = (value) => {
|
|
162
|
+
if (!isRecord(value) ||
|
|
163
|
+
containsForbiddenArtifactControlData(value, [
|
|
164
|
+
...allowedArtifactReferenceField(value, 'inputManifestPath'),
|
|
165
|
+
...allowedDescriptorPaths(value.artifacts),
|
|
166
|
+
])) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
if (value.schemaVersion !== 2 || value.status !== 'completed')
|
|
170
|
+
return false;
|
|
171
|
+
if (!hasMatchingIdentity(value.subscriptionId, value.generationId, value.ownership, value.revision, false))
|
|
172
|
+
return false;
|
|
173
|
+
if (!isStrictLogicalArtifactReference(value.inputManifestPath) ||
|
|
174
|
+
value.inputManifestPath !== inputManifestPath(value.subscriptionId, value.generationId)) {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
if (!isSha256(value.inputManifestDigest) || !isSha256(value.outputBindingDigest) || !isSha256(value.manifestDigest))
|
|
178
|
+
return false;
|
|
179
|
+
if (!Array.isArray(value.artifacts) || value.artifacts.length === 0)
|
|
180
|
+
return false;
|
|
181
|
+
if (!value.artifacts.every(artifact => isOutputArtifactDescriptor(artifact, value.subscriptionId, value.generationId))) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
if (!hasUniqueValues(value.artifacts.map(artifact => artifact.path)) || !hasUniqueValues(value.artifacts.map(artifact => artifact.name)))
|
|
185
|
+
return false;
|
|
186
|
+
const outputDerivedDigests = new Set([
|
|
187
|
+
value.inputManifestDigest,
|
|
188
|
+
value.outputBindingDigest,
|
|
189
|
+
value.manifestDigest,
|
|
190
|
+
...value.artifacts.map(artifact => artifact.sha256),
|
|
191
|
+
]);
|
|
192
|
+
if (value.outputBindingDigest === value.inputManifestDigest ||
|
|
193
|
+
value.outputBindingDigest === value.manifestDigest ||
|
|
194
|
+
value.artifacts.some(artifact => artifact.sha256 === value.outputBindingDigest || artifact.sha256 === value.manifestDigest) ||
|
|
195
|
+
publicationDecisionReferencesDigest(value.publicationDecision, new Set([...outputDerivedDigests].filter(digest => digest !== value.inputManifestDigest)))) {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
if (!value.artifacts.some(artifact => artifact.path === `${outputGenerationPrefix(value.subscriptionId, value.generationId)}metadata.json`)) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
return (isBillingCompletedArtifactPublicationDecision(value.publicationDecision, value.generationId, value.inputManifestDigest) &&
|
|
202
|
+
isCanonicalIsoTimestamp(value.completedAt));
|
|
203
|
+
};
|
|
204
|
+
/** Validates the sole promoted authority pointer for completed billing analysis. */
|
|
205
|
+
export const isBillingAnalysisCurrentPointerV1 = (value) => {
|
|
206
|
+
if (!isRecord(value) ||
|
|
207
|
+
containsForbiddenArtifactControlData(value, [
|
|
208
|
+
...allowedArtifactReferenceField(value, 'inputManifestPath'),
|
|
209
|
+
...allowedArtifactReferenceField(value, 'outputManifestPath'),
|
|
210
|
+
])) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
if (value.schemaVersion !== 1 || value.status !== 'completed')
|
|
214
|
+
return false;
|
|
215
|
+
if (!hasMatchingIdentity(value.subscriptionId, value.generationId, value.ownership, value.revision, true))
|
|
216
|
+
return false;
|
|
217
|
+
if (!isStrictLogicalArtifactReference(value.inputManifestPath) ||
|
|
218
|
+
value.inputManifestPath !== inputManifestPath(value.subscriptionId, value.generationId)) {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
if (!isStrictLogicalArtifactReference(value.outputManifestPath) ||
|
|
222
|
+
value.outputManifestPath !== outputManifestPath(value.subscriptionId, value.generationId)) {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
if (!isSha256(value.inputManifestDigest) || !isSha256(value.outputManifestDigest))
|
|
226
|
+
return false;
|
|
227
|
+
return (isBillingCompletedArtifactPublicationDecision(value.publicationDecision, value.generationId, value.inputManifestDigest) &&
|
|
228
|
+
isCanonicalIsoTimestamp(value.completedAt));
|
|
229
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|