import type { AxiosRequestConfig, CancelTokenSource } from 'axios'; import type { BuildRestAPIPayload } from '../router/types'; export type RestAPIPayload = { /** The request body to be sent with the API call. e.g. { message: 'Hello World!', context: 'DATA-PORTAL $SpaceTra' } */ body?: AxiosRequestConfig['data']; /** The query parameters to be sent with the API call e.g. { context: 'context', messageID: 'PEGASOCIAL M-56001' } */ queryPayload?: BuildRestAPIPayload; /** The source of the cancel token to cancel the request if needed */ cancelTokenSource?: CancelTokenSource; /** The headers to be sent with the API call (key value pairs) */ headers?: AxiosRequestConfig['headers']; /** The type of the response expected. */ responseType?: AxiosRequestConfig['responseType']; /** The request method GET, POST */ method?: AxiosRequestConfig['method']; /** read-only property of the AbortController interface returns an AbortSignal object instance, which can be used to communicate with/abort an asynchronous operation as desired */ signal?: AxiosRequestConfig['signal']; }; export type CaseOptions = { caseInfo?: any; /** startingFields for creating the case */ startingFields?: any; flowType?: string; viewType?: string; pageName: string; /** The current context where to render */ context?: string; debugInfo?: any; headers?: any; retrieveActionViewForNewObject?: boolean; };