(value: unknown)
| 70 | } |
| 71 | |
| 72 | export function mapLead(value: unknown): InstantlyLead { |
| 73 | const lead = asRecord(value) |
| 74 | |
| 75 | return { |
| 76 | id: asString(lead.id), |
| 77 | timestamp_created: asString(lead.timestamp_created), |
| 78 | timestamp_updated: asString(lead.timestamp_updated), |
| 79 | organization: asString(lead.organization), |
| 80 | campaign: asString(lead.campaign), |
| 81 | status: asNumber(lead.status), |
| 82 | email: asString(lead.email), |
| 83 | personalization: asString(lead.personalization), |
| 84 | website: asString(lead.website), |
| 85 | last_name: asString(lead.last_name), |
| 86 | first_name: asString(lead.first_name), |
| 87 | company_name: asString(lead.company_name), |
| 88 | job_title: asString(lead.job_title), |
| 89 | phone: asString(lead.phone), |
| 90 | email_open_count: asNumber(lead.email_open_count), |
| 91 | email_reply_count: asNumber(lead.email_reply_count), |
| 92 | email_click_count: asNumber(lead.email_click_count), |
| 93 | company_domain: asString(lead.company_domain), |
| 94 | payload: isRecordLike(lead.payload) ? lead.payload : null, |
| 95 | lt_interest_status: asNumber(lead.lt_interest_status), |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | export function mapCampaign(value: unknown): InstantlyCampaign { |
| 100 | const campaign = asRecord(value) |
no test coverage detected