import { ODataUri , FunctionImportParameter , FunctionImportParameters , RequestMethodType , ODataFunctionImportRequestConfig as ODataFunctionImportRequestConfigBase } from '@sap-cloud-sdk/odata-common/internal' ; import { DeSerializers } from '..' ; internal export class ODataFunctionImportRequestConfig < DeSerializersT extends DeSerializers , ParametersT > extends ODataFunctionImportRequestConfigBase < DeSerializersT , ParametersT > { param method param defaultServicePath param functionImportName param parameters param oDataUri constructor ( method , defaultServicePath , functionImportName , parameters , oDataUri ) { super ( method , defaultServicePath , functionImportName , parameters , oDataUri ) ; } resourcePath ( ) { return this . functionImportName ; } queryParameters ( ) { return { ... this . prependDollarToQueryParameters ( { format : 'json' } ) , ... ( Object . values ( this . parameters ) . filter ( ( parameter ) => typeof parameter . value !== 'undefined' ) . reduce ( ( queryParams , parameter ) => { queryParams [ parameter . originalName ] = this . oDataUri . convertToUriFormat ( parameter . value , parameter . edmType ) ; return queryParams ; } , { } ) as Record < string , any > ) } ; } }