import type { ListProjectBranchLogFieldValuesData, ProjectBranchLogFieldValuesResponse, ProjectBranchLogRecord, ProjectBranchLogsQueryRequest } from "../../client/types.gen.js"; import type { CallOptions, RequestContext } from "../context.js"; import { type Paginated } from "../paginate.js"; import type { Outcome } from "../result.js"; /** * Filters for {@link Logs.query}. * * `cursor` is absent because {@link Paginated} owns paging: the endpoint requires * every filter and the time window to be repeated unchanged on each page, and * threading the cursor here is what guarantees that. */ export type LogQueryInput = Omit; /** Query parameters for {@link Logs.fieldValues}. */ export type LogFieldValuesQuery = NonNullable; export type LogsQueryParams = { projectId: string; branchId: string; } & LogQueryInput; export type LogsFieldsParams = { projectId: string; branchId: string; }; export type LogsFieldValuesParams = { projectId: string; branchId: string; fieldName: string; } & LogFieldValuesQuery; /** * Branch-scoped logs emitted by the services running on a branch — Neon Functions, * object storage, and Postgres computes. Grouped under `neon.logs.*` alongside the * other branch-scoped product surfaces. * * Private Beta. Telemetry is region-gated, so a branch outside an enabled region answers * `404` with `reason: "telemetry_not_enabled"` rather than an empty result — treat that * as an ordinary outcome. A branch that has telemetry but nothing recorded answers `200` * with an empty array, and one whose backend is down answers `503`, which the client * retries on by default. * * The spec is wider than the backend: of the three `source` values only `function` and * `storage` were observed emitting, and `minimum_severity` can be rejected as unsupported * by a branch's log backend, where `severity_text` still works. */ export declare class Logs { #private; constructor(ctx: RequestContext); /** * Query branch logs (cursor-paginated). Every supplied filter is combined with * `AND`. * * Give the window as either `since` or `start_time` — supplying both is rejected. * `logql` replaces the seven content filters rather than adding to them, while * `limit`, `sort_order`, and the time window still apply alongside it. With no * window the query covers the last hour, and seven days is the widest range served. * * @apiCall POST /projects/{project_id}/branches/{branch_id}/logs/query (cursor-paginated) */ query(params: LogsQueryParams): Paginated; query(params: LogsQueryParams, opts: CallOptions): Paginated; /** * List the log fields whose values {@link Logs.fieldValues} can enumerate on * this branch. Computed per branch and grows as fields are observed, so read it * rather than assuming a fixed set. * * @apiCall GET /projects/{project_id}/branches/{branch_id}/logs/fields */ fields(params: LogsFieldsParams): Promise>; fields(params: LogsFieldsParams, opts: CallOptions): Promise>; /** * List the distinct values observed for one log field, for use as a filter. * `fieldName` must be one of the names {@link Logs.fields} reports; anything else is * rejected with `unknown_field`. The enumerable set and the set {@link Logs.query} can * filter on overlap rather than nest: `source` is a filter but is not enumerable, and * `entity_type` is enumerable but is not a filter. * * The whole response is returned rather than the bare values because * `is_truncated` decides whether the list can be trusted: when it is `true` the * values are an arbitrary subset, and the window or `source` needs narrowing * before filtering on them. * * @apiCall GET /projects/{project_id}/branches/{branch_id}/logs/fields/{field_name}/values */ fieldValues(params: LogsFieldValuesParams): Promise>; fieldValues(params: LogsFieldValuesParams, opts: CallOptions): Promise>; } //# sourceMappingURL=logs.d.ts.map