import type { AxiosResponse, GenericAbortSignal } from 'axios'; import type { FetchOptions } from '../globals'; import type { Paging, Parameters, Query } from '../datapage/types'; export type DataPageOptions = { /** The flag that indicates whether the cache needs to invalidated for the current parameter set passed */ invalidateCache?: boolean; /** The flag that indicates whether the cache needs to invalidated for all the parameter sets of the datapage passed */ purgeDataPageCache?: boolean; additionalApiParams?: { useExtendedTimeout: boolean; includeTotalCount: boolean; }; }; export type Payload = { /** An object whose parameters are configured on the data view or data page. */ dataViewParameters?: Parameters; includeTotalCount?: boolean; /** Works only if the data view is sourced by a report definition. * When set to true, it increases the timeout to 45 seconds. Otherwise, the timeout is 10 seconds. * */ useExtendedTimeout?: boolean; /** An object that obtains a specific number of records from a page. * Note: This property is applicable only when the Allow querying any column (Pega connection only) checkbox is enabled in the data page rule form. * */ paging?: Paging; /** A command to obtain a set of fields satisfying specific conditions, such as, select, sortBy, filter, etc. * Note: This property is applicable only when the Allow querying any column (Pega connection only) checkbox is enabled in the data page rule form. * */ query?: Query; }; export type DataOptions = { skipClearErrorMessages?: boolean; doNotMergeMessagesForStatusCode?: FetchOptions; signal?: GenericAbortSignal; invalidateCache?: boolean; purgeDataPageCache?: boolean; }; export type DataResponse = AxiosResponse<{ data: { [key: string]: any; }[]; fetchDateTime?: string; pageNumber?: number; pageSize?: number; queryStats?: any; }>; export type MoveListRecordsPayload = { context: string; destinationID: string; listClass: string; sourceID: string; viewClassName: string; viewName?: string; }; export interface ChangeSet { [key: string]: { [fieldName: string]: string | number | boolean | Date; }; } export type DataAsyncResponse = DataResponse['data'] & { status?: DataResponse['status']; };