(record: HubSpotSearchResult, propertyName: string)
| 719 | } |
| 720 | |
| 721 | function extractPropertyTimestampMs(record: HubSpotSearchResult, propertyName: string): number { |
| 722 | const raw = record.properties?.[propertyName] |
| 723 | if (raw) { |
| 724 | const ms = Date.parse(raw) |
| 725 | if (Number.isFinite(ms)) return ms |
| 726 | } |
| 727 | const fallback = propertyName === 'createdate' ? record.createdAt : record.updatedAt |
| 728 | return fallback ? Date.parse(fallback) : Number.NaN |
| 729 | } |
| 730 | |
| 731 | async function processRecords( |
| 732 | records: HubSpotSearchResult[], |
no test coverage detected