// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import { PageCursorURL, PagePromise } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; /** * Custom fields defined by the company */ export class CustomFields extends APIResource { /** * A list of custom fields. * * - Requires: `API Tier 1` * - Sortable fields: `id`, `created_at`, `updated_at` */ list( query: CustomFieldListParams | null | undefined = {}, options?: RequestOptions, ): PagePromise { return this._client.getAPIList('/custom-fields/', PageCursorURL, { query, ...options, }); } } export type CustomFieldListResponsesPageCursorURL = PageCursorURL; export interface CustomFieldListResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * The name of the custom field. */ name: string; /** * The data type of the custom field. */ type: | 'TEXT' | 'DATE' | 'NUMBER' | 'CURRENCY' | 'PERCENTAGE' | 'SELECT' | 'FILE' | 'ID' | 'RADIO' | 'TEXTAREA' | 'RANGE' | 'REFERENCE_ID' | 'BOOLEAN' | 'ADDRESS' | 'OG_REFERENCE_FIELD' | 'NATIVE_EDGE' | 'DATETIME' | 'EMAIL' | 'URL'; /** * Record update date */ updated_at: string; /** * The description of the custom field. */ description?: string; /** * Whether the custom field is required. */ required?: boolean; } export interface CustomFieldListParams { cursor?: string; order_by?: string; } export declare namespace CustomFields { export { type CustomFieldListResponse as CustomFieldListResponse, type CustomFieldListResponsesPageCursorURL as CustomFieldListResponsesPageCursorURL, type CustomFieldListParams as CustomFieldListParams, }; }