import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; export declare class Analytics extends ClientSDK { /** * Get user activity grouped by endpoint * * @remarks * Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: an omitted `workspace_id` defaults to it, a `workspace_id` naming any other workspace returns 403, `api_key_hash` and `user_id` resolve only keys and members of that workspace, and legacy activity with no workspace is excluded (including for the default workspace). For Custom keys, `api_key_hash` also requires `api_keys:view_all` and does not resolve deleted keys. `user_id` also requires `workspace_members:view` on an explicit non-default workspace; organization and default-workspace member filtering requires `org_members:view`, which is not available as a Custom grant. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ getUserActivity(request?: operations.GetUserActivityRequest | undefined, options?: RequestOptions): Promise; /** * Get available analytics metrics and dimensions * * @remarks * Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Custom access requires an organization-scoped key with `analytics:view`. Workspace-scoped keys with base Read Only or Read Write access are also accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ getAnalyticsMeta(request?: operations.GetAnalyticsMetaRequest | undefined, options?: RequestOptions): Promise; /** * Query analytics data * * @remarks * Execute an analytics query with specified metrics, dimensions, filters, and time range. Custom access requires an organization-scoped key with `analytics:view`; grouping or filtering by `api_key_id` or `api_key_tag` also requires `api_keys:view_all`, and by `user` requires `org_members:view`. Key hash filters resolve only non-deleted ordinary keys. Workspace-scoped keys with base Read Only or Read Write access can query only their own workspace: a `workspace` filter naming another workspace is refused, legacy rows with no workspace are excluded (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ queryAnalytics(request: operations.QueryAnalyticsRequest, options?: RequestOptions): Promise; } //# sourceMappingURL=analytics.d.ts.map