import { EntityBase , EntityApi } from '../entity-base' ; import { Expandable } from '../expandable' ; import { Selectable } from '../selectable' ; import { ODataUri } from '../uri-conversion' ; import { DeSerializers } from '../de-serializers' ; import { WithKeys , WithSelection } from './odata-request-traits' ; import { ODataRequestConfig } from './odata-request-config' ; typeparam internal export class ODataGetByKeyRequestConfig < EntityT extends EntityBase , DeSerializersT extends DeSerializers > extends ODataRequestConfig implements WithKeys , WithSelection < EntityT , DeSerializersT > { keys : Record < string , any > ; selects : Selectable < EntityT , DeSerializersT > [ ] = [ ] ; expands : Expandable < EntityT , DeSerializersT > [ ] ; param entityApi param oDataUri constructor ( readonly entityApi , private oDataUri ) { super ( 'get' , entityApi . entityConstructor . _defaultServicePath ) ; } resourcePath ( ) { return this . oDataUri . getResourcePathForKeys ( this . keys , this . entityApi ) ; } queryParameters ( ) { return this . prependDollarToQueryParameters ( { format : 'json' , ... this . oDataUri . getSelect ( this . selects ) , ... this . oDataUri . getExpand ( this . selects , this . expands , this . entityApi ) } ) ; } }