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

Function normalizeVantaDocumentDetail

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

Source from the content-addressed store, hash-verified

493}
494
495export function normalizeVantaDocumentDetail(resource: JsonRecord): VantaDocumentDetail {
496 const deactivatedStatus = isRecordLike(resource.deactivatedStatus)
497 ? {
498 isDeactivated: getBoolean(resource.deactivatedStatus.isDeactivated),
499 reason: getString(resource.deactivatedStatus.reason),
500 creationDate: getString(resource.deactivatedStatus.creationDate),
501 expiration: getString(resource.deactivatedStatus.expiration),
502 }
503 : null
504
505 return {
506 ...normalizeVantaDocument(resource),
507 note: getString(resource.note),
508 nextRenewalDate: getString(resource.nextRenewalDate),
509 renewalCadence: getString(resource.renewalCadence),
510 reminderWindow: getString(resource.reminderWindow),
511 subscribers: getStringArray(resource.subscribers),
512 deactivatedStatus,
513 }
514}
515
516export function normalizeVantaUploadedFile(resource: JsonRecord): VantaUploadedFile {
517 const uploadedBy = isRecordLike(resource.uploadedBy)

Callers 1

buildVantaOutputFunction · 0.90

Calls 5

isRecordLikeFunction · 0.90
normalizeVantaDocumentFunction · 0.85
getBooleanFunction · 0.70
getStringFunction · 0.70
getStringArrayFunction · 0.70

Tested by

no test coverage detected