MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeVantaPolicy

Function normalizeVantaPolicy

apps/sim/tools/vanta/utils.ts:587–608  ·  view source on GitHub ↗
(resource: JsonRecord)

Source from the content-addressed store, hash-verified

585}
586
587export function normalizeVantaPolicy(resource: JsonRecord): VantaPolicy {
588 const latestApprovedVersion = isRecordLike(resource.latestApprovedVersion)
589 ? {
590 versionId: getString(resource.latestApprovedVersion.versionId),
591 documents: getRecordArray(resource.latestApprovedVersion.documents).map(
592 normalizeVantaPolicyDocument
593 ),
594 }
595 : null
596
597 return {
598 id: getString(resource.id),
599 name: getString(resource.name),
600 description: getString(resource.description),
601 status: getString(resource.status),
602 approvedAtDate: getString(resource.approvedAtDate),
603 latestVersionStatus: isRecordLike(resource.latestVersion)
604 ? getString(resource.latestVersion.status)
605 : null,
606 latestApprovedVersion,
607 }
608}
609
610export function normalizeVantaVendor(resource: JsonRecord): VantaVendor {
611 const authDetails = isRecordLike(resource.authDetails)

Callers 1

buildVantaOutputFunction · 0.90

Calls 3

isRecordLikeFunction · 0.90
getStringFunction · 0.70
getRecordArrayFunction · 0.70

Tested by

no test coverage detected