import { OrganizationModelUsage } from "@opengeni/contracts/organization-model-usage"; import { OrganizationUsageSummary, OrganizationUsageWorkspacePage, type OrganizationUsagePeriod } from "@opengeni/contracts"; import { type Database } from "./database.js"; /** Same UTC semantics as Insights: week is today and the previous six days. */ export declare function organizationUsageWindow(period: OrganizationUsagePeriod, now?: Date): { since: string; until: string; granularity: "day" | "hour"; }; type UsageInput = { accountId: string; period?: OrganizationUsagePeriod | undefined; }; /** One set-based, actor-visible aggregate. Must use the writable primary. */ export declare function getOrganizationUsageSummary(db: Database, input: UsageInput, now?: Date): Promise; /** Bounded page-only scan; never recomputes organization-wide totals/buckets. */ export declare function getOrganizationUsageWorkspacePage(db: Database, input: UsageInput & { until: string; afterWorkspaceId?: string | undefined; }): Promise; /** * Organization model-call breakdown from per-call facts: credit-paid versus * externally billed totals, top models, one page of shared workspaces, and one * aggregate for every Personal workspace. Must use the writable primary. */ export declare function getOrganizationModelUsage(db: Database, input: UsageInput & { afterWorkspaceId?: string | undefined; }, now?: Date): Promise; export {};