fix(HubSpot Node): Require DueDate for task creation (#18799)

This commit is contained in:
yehorkardash
2025-08-27 11:43:22 +03:00
committed by GitHub
parent 4dcb22048d
commit e665cbf278
7 changed files with 201 additions and 23 deletions

View File

@@ -0,0 +1,12 @@
import moment from 'moment-timezone';
export function parseToTimestamp(dateString: unknown): number {
if (typeof dateString !== 'string') {
throw new Error('Invalid date string');
}
const timestamp = moment(dateString).valueOf();
if (isNaN(timestamp)) {
throw new Error('Invalid date string');
}
return timestamp;
}