pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
18 lines (17 loc) • 842 B
TypeScript
import type { SpringBootResponse } from 'src/api';
import type { QueryConfigProps } from '../types';
export declare const createQueryConfig: (startDate: string | undefined, endDate: string | undefined, options: Partial<QueryConfigProps>, filters?: {
[key: string]: string | string[] | null;
}) => QueryConfigProps;
/**
* Helper function to get nested object value by path
*/
export declare const getNestedValue: (obj: any, path: string) => any;
/**
* Converts a simple array to a SpringBoot response format
*
* @param {T[]} response - The array to convert into SpringBoot response format
* @returns {SpringBootResponse<T>} A SpringBoot paginated response object with the array as content
* @template T - The type of items in the array
*/
export declare function arrayToSpringBootResponse<T>(response: T[]): SpringBootResponse<T>;