UNPKG

trigger.dev

Version:

A Command-Line Interface for Trigger.dev projects

27 lines (26 loc) • 816 B
import { type ProdUsageManagerOptions } from "@trigger.dev/core/v3/workers"; type UsageJwtUpdate = { runId: string; attemptNumber: number; token: string; }; export declare class UsageJwtRefresher { private readonly opts; private expiresAt; /** Set when the initial credential is not renewable here; the run keeps the legacy billing path. */ readonly fallbackReason?: string; constructor(opts: { runId: string; attemptNumber: number; usageOptions: ProdUsageManagerOptions; install: (update: UsageJwtUpdate) => Promise<boolean>; now?: () => number; }); get isDue(): boolean; report(): { expiresAt: number; attemptNumber: number; } | undefined; installReplacement(token: string): Promise<boolean>; } export {};