import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { PageCursorURL, PagePromise } from "../../core/pagination.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; /** * Custom object datarows defined by the company */ export declare class Records extends APIResource { /** * A list of custom object records. * * - Requires: `API Tier 1` */ list(customObjectAPIName: string, options?: RequestOptions): PagePromise; /** * Create a new custom object record. */ create(customObjectAPIName: string, body?: RecordCreateParams | null | undefined, options?: RequestOptions): APIPromise; /** * A list of custom object records filtered by query. */ query(customObjectAPIName: string, body?: RecordQueryParams | null | undefined, options?: RequestOptions): APIPromise; /** * Retrieve a specific custom object record. */ retrieve(customObjectAPIName: string, codrID: string, options?: RequestOptions): APIPromise; /** * Update a specific custom object record. */ update(customObjectAPIName: string, codrID: string, body?: RecordUpdateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Delete a custom object record. */ delete(customObjectAPIName: string, codrID: string, options?: RequestOptions): APIPromise; /** * Retrieve a specific custom object record by its external_id. */ retrieveByExternalID(customObjectAPIName: string, externalID: string, options?: RequestOptions): APIPromise; /** * Bulk create new custom object records. */ bulkCreate(customObjectAPIName: string, body?: RecordBulkCreateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Bulk update custom object records. */ bulkUpdate(customObjectAPIName: string, body?: RecordBulkUpdateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Bulk delete custom object records. */ bulkDelete(customObjectAPIName: string, body?: RecordBulkDeleteParams | null | undefined, options?: RequestOptions): APIPromise; } export type CustomObjectDataRowsPageCursorURL = PageCursorURL; export interface CustomObjectDataRow { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * The name of the custom object datarow */ name: string; /** * Record update date */ updated_at: string; created_by?: CustomObjectDataRow.CreatedBy; /** * The external id of the custom object datarow */ external_id?: string; last_modified_by?: CustomObjectDataRow.LastModifiedBy; owner_role?: CustomObjectDataRow.OwnerRole; /** * The timestamp when the record was last updated by the system. */ system_updated_at?: string; [k: string]: unknown; } export declare namespace CustomObjectDataRow { interface CreatedBy { /** * The unique identifier of the role. */ id?: string; /** * The display name of the role. */ display_value?: string; /** * The URL of the role's profile image. */ image?: string; } interface LastModifiedBy { /** * The unique identifier of the role. */ id?: string; /** * The display name of the role. */ display_value?: string; /** * The URL of the role's profile image. */ image?: string; } interface OwnerRole { /** * The unique identifier of the role. */ id?: string; /** * The display name of the role. */ display_value?: string; /** * The URL of the role's profile image. */ image?: string; } } export interface RecordCreateResponse { data?: CustomObjectDataRow; } export interface RecordQueryResponse { cursor?: string; results?: Array; } export interface RecordUpdateResponse { data?: CustomObjectDataRow; } export interface RecordBulkCreateResponse { data?: Array; } export interface RecordBulkUpdateResponse { data?: Array; } export type RecordCreateParams = { [key: string]: unknown; }; export interface RecordQueryParams { /** * A cursor for pagination to fetch the next page of results. */ cursor?: string; /** * The maximum number of results to return. */ limit?: number; /** * The query string to filter results. */ query?: string; } export type RecordUpdateParams = { [key: string]: unknown; }; export interface RecordBulkCreateParams { /** * If true, the entire operation fails if any record fails. If false, partial * success is allowed. */ all_or_nothing?: boolean; /** * The list of records to create. */ rows_to_write?: Array<{ [key: string]: unknown; }>; } export interface RecordBulkUpdateParams { /** * If true, the entire operation fails if any record fails. If false, partial * success is allowed. */ all_or_nothing?: boolean; /** * The list of records to update. */ rows_to_update?: Array<{ [key: string]: unknown; }>; } export interface RecordBulkDeleteParams { /** * If true, the entire operation fails if any record fails. If false, partial * success is allowed. */ all_or_nothing?: boolean; /** * A list of record IDs to delete, e.g. [id_1, id_2]. */ rows_to_delete?: Array; } export declare namespace Records { export { type CustomObjectDataRow as CustomObjectDataRow, type RecordCreateResponse as RecordCreateResponse, type RecordQueryResponse as RecordQueryResponse, type RecordUpdateResponse as RecordUpdateResponse, type RecordBulkCreateResponse as RecordBulkCreateResponse, type RecordBulkUpdateResponse as RecordBulkUpdateResponse, type CustomObjectDataRowsPageCursorURL as CustomObjectDataRowsPageCursorURL, type RecordCreateParams as RecordCreateParams, type RecordQueryParams as RecordQueryParams, type RecordUpdateParams as RecordUpdateParams, type RecordBulkCreateParams as RecordBulkCreateParams, type RecordBulkUpdateParams as RecordBulkUpdateParams, type RecordBulkDeleteParams as RecordBulkDeleteParams, }; } //# sourceMappingURL=records.d.mts.map