// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; /** * Report data for company */ export class AvailableFilters extends APIResource { /** * Returns the list of fields that can be used to filter a report run, along with * the operators each field supports. * * @example HTTP * Representative request and response shapes. * ``` * GET /reports/{report_id}/available-filters/ HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "data": [ * { * "field_id": "string", * "field_name": "string", * "type": "string", * "operators": [ * "string" * ] * } * ] * } * ``` */ retrieve(reportID: string, options?: RequestOptions): APIPromise { return this._client.get(path`/reports/${reportID}/available-filters/`, options); } } /** * Response for GET /reports/{report_id}/available-filters */ export interface AvailableFilterRetrieveResponse { /** * List of filterable fields with their supported operators */ data: Array; } export namespace AvailableFilterRetrieveResponse { /** * Describes a field the client can filter on when running a report */ export interface Data { /** * Stable field identifier used when applying filters */ field_id: string; /** * Human-readable display name of the field */ field_name: string; /** * Operators supported by this field */ operators: Array; /** * Data type of a filterable field */ type: 'string' | 'number' | 'date' | 'datetime' | 'enum' | 'boolean'; } } export declare namespace AvailableFilters { export { type AvailableFilterRetrieveResponse as AvailableFilterRetrieveResponse }; }