import { APIResource } from "../core/resource.js"; import { PageCursorURL, PagePromise } from "../core/pagination.js"; import { RequestOptions } from "../internal/request-options.js"; /** * Custom object datarows defined by the company */ export declare class RecordDetailReferenceOptions extends APIResource { /** * Lists eligible choices for a Create or Edit reference field. * * Omit record_id, or pass an empty value, for Create. Pass a nonempty saved record * ID for Edit. Requires custom-object-records.read-write or * custom-objects.read-write.owner and source-object create/update authorization. * Edit also requires an editable field on an editable, unlocked record. Read-only * source consent returns 403. Employee references additionally require * workers.read or workers.read-write; Custom Object targets require record read * access and inclusion in the token's object restrictions. Configured lookup * filters and target permissions apply even to exact-ID searches. Only Employee * and Custom Object targets are supported. Each result contains a selected record * identifier and optional permitted presentation. Retrieve full resources through * the target collection's GET endpoint, subject to its own scopes and access * checks. Continue through next_link even if a page contains no eligible results. * * @example HTTP * Representative request and response shapes. * ``` * GET /record-detail-reference-options/?object_api_name=object_api_name&record_id=record_id&field_api_name=field_api_name&search=search&cursor=cursor 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 * * { * "results": [ * { * "value": "string", * "display": {} * } * ], * "next_link": "string" * } * ``` */ list(query: RecordDetailReferenceOptionListParams, options?: RequestOptions): PagePromise; } export type RecordDetailReferenceOptionListResponsesPageCursorURL = PageCursorURL; /** * An eligible reference selection with optional permitted presentation. */ export interface RecordDetailReferenceOptionListResponse { /** * Candidate record identifier for the reference field. Submitted identifiers are * still validated when written. */ value: string; /** * Permitted presentation of this choice, or null when unavailable. */ display?: RecordDetailReferenceOptionListResponse.ReferenceDisplay | null; } export declare namespace RecordDetailReferenceOptionListResponse { /** * Optional presentation of a readable reference, independent of its identifier. */ interface ReferenceDisplay { /** * Permitted display label; never synthesized from the identifier. */ label: string; /** * Permitted image URL, or null when unavailable. */ image_url?: string | null; /** * Permitted secondary text, or null when unavailable. */ secondary_label?: string | null; } } export interface RecordDetailReferenceOptionListParams { /** * Reference field API name from the record detail response's fields map. The field * must be editable and reference a supported target. */ field_api_name: string; /** * Custom Object API name, such as equipment\_\_c. Obtain it from the Custom Object * definition or the grid's configured object. */ object_api_name: string; /** * Opaque search cursor. Keep the same field and search term. */ cursor?: string; /** * Omit or pass an empty value for Create. For Edit, pass the saved record * identifier returned by the Custom Object record list or query endpoint. */ record_id?: string; /** * Reference search term. An omitted or blank term uses the native lookup defaults. */ search?: string; } export declare namespace RecordDetailReferenceOptions { export { type RecordDetailReferenceOptionListResponse as RecordDetailReferenceOptionListResponse, type RecordDetailReferenceOptionListResponsesPageCursorURL as RecordDetailReferenceOptionListResponsesPageCursorURL, type RecordDetailReferenceOptionListParams as RecordDetailReferenceOptionListParams, }; } //# sourceMappingURL=record-detail-reference-options.d.ts.map