(response: Response, label: string)
| 99 | } |
| 100 | |
| 101 | export async function emailBisonRecordData(response: Response, label: string): Promise<unknown> { |
| 102 | const data = await emailBisonData<unknown>(response) |
| 103 | if (!isRecordLike(data)) { |
| 104 | throw new Error(`Email Bison response did not include a valid ${label} object`) |
| 105 | } |
| 106 | return data |
| 107 | } |
| 108 | |
| 109 | export function mapLead(value: unknown): EmailBisonLead { |
| 110 | const record = toRecord(value) |
no test coverage detected