(resource: JsonRecord)
| 493 | } |
| 494 | |
| 495 | export 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 | |
| 516 | export function normalizeVantaUploadedFile(resource: JsonRecord): VantaUploadedFile { |
| 517 | const uploadedBy = isRecordLike(resource.uploadedBy) |
no test coverage detected