import { Resource } from './resource'; import { ListResponse, PaginatedListResponse } from './lists'; /** * @export * @class ResourceUtils */ export declare class ResourceUtils { /** * @static * @template TResponse * @param {Resource} resource * @param {any} params * @returns {Promise} * * @memberOf ResourceUtils */ static CallGet(resource: Resource, params: any): Promise; /** * @static * @template TResponse * @param {Resource} resource * @param {string} pathSuffix * @param {any} params * @returns {Promise} * * @memberOf ResourceUtils */ static CallGetWithSuffix(resource: Resource, pathSuffix: string, params: any): Promise; /** * @static * @template TRequest * @template TResponse * @param {Resource} resource * @param {TRequest=} payload * @returns {Promise} * * @memberOf ResourceUtils */ static CallCreate(resource: Resource, payload?: TRequest): Promise; /** * @static * @template TRequest * @template TResponse * @param {Resource} resource * @param {string} pathSuffix * @param {TRequest=} payload * @returns {Promise} * * @memberOf ResourceUtils */ static CallCreateWithSuffix(resource: Resource, pathSuffix: string, payload?: TRequest): Promise; /** * @static * @template TRequest * @template TResponse * @param {Resource} resource * @param {TRequest=} payload * @returns {Promise} * * @memberOf ResourceUtils */ static CallUpdate(resource: Resource, payload?: TRequest): Promise; /** * @static * @template TRequest * @template TResponse * @param {Resource} resource * @param {string} pathSuffix * @param {TRequest=} payload * @returns {Promise} * * @memberOf ResourceUtils */ static CallUpdateWithSuffix(resource: Resource, pathSuffix: string, payload?: TRequest): Promise; /** * @static * @template TResponse * @param {Resource} resource * @param {any} params * @returns {Promise} * * @memberOf ResourceUtils */ static CallDelete(resource: Resource, params: any): Promise; /** * @static * @template TResponse * @param {Resource} resource * @param {string} pathSuffix * @param {any} params * @returns {Promise} * * @memberOf ResourceUtils */ static CallDeleteWithSuffix(resource: Resource, pathSuffix: string, params: any): Promise; /** * @template TResponse * @param {Resource} resource * @param {string} pathSuffix * @param {string} method * @param {any=} params * @param {Uint8Array} data * @param {any=} headers * @returns {Promise} * * @memberOf ResourceUtils */ UploadDataWithSuffix(resource: Resource, pathSuffix: string, method: string, params: any, data: Uint8Array, headers?: any): Promise; /** * @static * @template TData * @template TResponse * @param {Resource} resource * @param {string} pathSuffix * @param {string} method * @param {any=} params * @param {TData=} data * @param {any=} headers * @returns {Promise} * * @memberOf ResourceUtils */ static CallDownload(resource: Resource, pathSuffix: string, method: string, params?: any, data?: TData, headers?: any): Promise; /** * @static * @template TData * @template TResponse * @param {Resource} resource * @param {string} pathSuffix * @param {string} method * @param {any=} params * @param {TData=} data * @param {any=} headers * @param {string=} responseType * @returns {Promise} * * @memberOf ResourceUtils */ static CallApiWithSuffix(resource: Resource, pathSuffix: string, method: string, params?: any, data?: TData, headers?: any, responseType?: string): Promise; /** * @static * @template TItem * @param {Resource} resource * @param {string} pathSuffix * @param {string=} itemsKey * @param {any=} params * @param {function=} responseTransform * @returns {Promise>} * * @memberOf ResourceUtils */ static CallPaginatedListWithSuffix(resource: Resource, pathSuffix: string, itemsKey?: string, params?: any, responseTransform?: (response: PaginatedListResponse) => PaginatedListResponse): Promise>; /** * @static * @template TItem * @param {Resource} resource * @param {string} pathSuffix * @param {string=} itemsKey * @param {any=} params * @returns {Promise>} * * @memberOf ResourceUtils */ static CallListWithSuffix(resource: Resource, pathSuffix: string, itemsKey?: string, params?: any): Promise>; }