Type Alias: HubstaffError
HubstaffError =
object
Defined in: src/server/integrations/hubstaff/api.ts:18
Hubstaff API adapter (read-only pull for the payroll "Sync from Hubstaff API" option).
Auth: HUBSTAFF_API_KEY is a Personal Access Token — an OAuth refresh token that must be EXCHANGED
for a short-lived access token (it is NOT a bearer token itself). Hubstaff ROTATES the refresh
token on each exchange and invalidates the previous one, so the env PAT only bootstraps the first
exchange; thereafter the rotated refresh token + access token live in integration_oauth_tokens
(service-role only) so the pull survives serverless cold starts. A freshly-set env PAT also acts
as a recovery seed if the stored token is ever rejected. Missing/expired tokens return a typed error.
Properties
code
code:
"hubstaff_not_configured"|"hubstaff_auth_failed"|"hubstaff_request_failed"
Defined in: src/server/integrations/hubstaff/api.ts:19
message
message:
string
Defined in: src/server/integrations/hubstaff/api.ts:20