// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import * as AvailableFiltersAPI from './available-filters'; import { AvailableFilterRetrieveResponse, AvailableFilters } from './available-filters'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; /** * Report data for company */ export class Reports extends APIResource { availableFilters: AvailableFiltersAPI.AvailableFilters = new AvailableFiltersAPI.AvailableFilters( this._client, ); /** * Retrieve a specific report by its ID */ retrieve(id: string, options?: RequestOptions): APIPromise { return this._client.get(path`/reports/${id}/`, options); } } /** * A report definition including its output fields and saved filters */ export interface ReportRetrieveResponse { /** * Unique identifier of the report */ id: string; /** * Record creation date */ created_at: string; /** * Display name of the report */ name: string; /** * Attributes (columns) in the report output, with field_id and field_name */ output_fields: Array; /** * Filters currently saved on the report */ saved_filters: Array; /** * Record update date */ updated_at: string; } export namespace ReportRetrieveResponse { /** * An attribute (column) in the report output */ export interface OutputField { /** * Stable field identifier */ field_id: string; /** * Human-readable display name of the output field */ field_name: string; } /** * A filter currently saved on the report */ export interface SavedFilter { /** * Stable field identifier the filter applies to */ field_id: string; /** * Human-readable display name of the filtered field */ field_name: string; /** * Filter operator applied to the field */ operator: string; /** * Filter value; shape depends on the operator */ value?: unknown; } } Reports.AvailableFilters = AvailableFilters; export declare namespace Reports { export { type ReportRetrieveResponse as ReportRetrieveResponse }; export { AvailableFilters as AvailableFilters, type AvailableFilterRetrieveResponse as AvailableFilterRetrieveResponse, }; }