Skip to main content

Function: fetchHubstaffDailyEntries()

fetchHubstaffDailyEntries(orgId, startISO, stopISO): Promise<Result<NormalizedHubstaffEntry[], HubstaffError>>

Defined in: src/server/integrations/hubstaff/api.ts:330

Pull daily tracked time for an org over a date range and aggregate it per (member, day) into normalized entries ready for upsertSyncedEntries. Hubstaff returns one row per (user, project, day) in SECONDS — we sum seconds across projects per day and convert to hours at the edge (no per-project assignment mapping; matches the CSV import's contractor-active-assignment behaviour). Follows cursor pagination.

Parameters

orgId

string

startISO

string

stopISO

string

Returns

Promise<Result<NormalizedHubstaffEntry[], HubstaffError>>