import type { BillingLog, BillingStats, ListBillingLogsQuery, Paginated } from '../../types'; import type { HttpClient } from '../../http'; /** * Conversation billing: what each conversation on a channel cost. * * The endpoint answers in two shapes off one route. Without `stat` it pages * through individual charges; with `stat` it returns aggregates instead, which * is why `list` and `stats` are separate methods here. * * Pass `'all'` as the channel id to read across every channel the caller owns. * `summary` then totals by currency; on a single channel it totals by message * category. */ export declare class Billing { private readonly http; constructor(http: HttpClient); /** * `GET /v1/channels/:channelId/conversations` -- offset paginated, one row * per billed conversation. * * `search` matches the recipient identifier and the provider detail in * `meta`: recipient, category, country and message id. `range` restricts to * a window in unix seconds, where `0` on either end means no bound. * `template`, `country` and `campaign` take arrays and are serialised to * JSON by the SDK. * * `channelId` may be `'all'`. * * Scope: `channels:read`. */ list(channelId: string, query?: Partial>): Promise>; /** * `GET /v1/channels/:channelId/conversations?stat=...` -- the same filters, * aggregated instead of paged. Returns `{ data, stat }`, where each row is * `{ group, totalRecords, totalDeductionAmount }`. * * `group` is what the totals are cut by: currency for `summary` across all * channels, message category for `summary` on one channel, and the calendar * date for `day_wise`. * * Pagination does not apply -- every group is returned. * * Scope: `channels:read`. */ stats(channelId: string, stat?: NonNullable, query?: Partial>): Promise; }