import { ClsService } from "nestjs-cls"; import { JsonApiService } from "../../../core/jsonapi/services/jsonapi.service"; import { AbstractService } from "../../../core/neo4j/abstracts/abstract.service"; import { TokenUsageDimension } from "../common/tokenusage.target-labels"; import { TokenUsage, TokenUsageDescriptor } from "../entities/tokenusage"; import { TokenUsageAdminRepository } from "../repositories/tokenusage.admin.repository"; /** * Serialises the cross-tenant reporting rollups as JSON:API documents. * * Extends AbstractService with the same generics, descriptor and super() * argument order as its sibling TokenUsageService in this folder, so both * services in the tokenusage foundation are wired identically. The inherited * generic CRUD (find / findById / create / put / patch / delete) is not reachable * from any route on TokenUsageAdminController — the three reporting endpoints are * the whole surface — but is available to a consuming app that mounts its own * controller, exactly as the docblock on TokenUsageService already notes. * * `descriptor` and the inherited `model` are the TokenUsage entity: that is what * the repository reads and what the base class needs to be coherent. The three * methods below deliberately serialise with the AGGREGATE descriptors' models * instead, because their return shapes are rollups, not TokenUsage nodes. * * JSON:API documents are built exclusively by the framework — nothing here * hand-assembles a { data: { type, attributes } } object. */ export declare class TokenUsageAdminService extends AbstractService { protected readonly tokenUsageAdminRepository: TokenUsageAdminRepository; protected readonly descriptor: import("../../..").EntityDescriptor; constructor(jsonApiService: JsonApiService, tokenUsageAdminRepository: TokenUsageAdminRepository, clsService: ClsService); getSummary(params: { from: string; to: string; companyId?: string; }): Promise; getTimeline(params: { from: string; to: string; granularity: "day" | "week" | "month"; stackBy: "scope" | "type" | "company"; companyId?: string; }): Promise; getBreakdown(params: { from: string; to: string; dimension: TokenUsageDimension; targetLabel?: string; scope: "customer" | "platform"; companyId?: string; limit: number; }): Promise; } //# sourceMappingURL=tokenusage.admin.service.d.ts.map