import { DeSerializers } from '../de-serializers' ; import { EntityBase , EntityApi } from '../entity-base' ; import { ODataUri } from '../uri-conversion' ; import { ODataRequestConfig } from './odata-request-config' ; import { WithKeys , WithETag } from './odata-request-traits' ; typeparam internal export class ODataUpdateRequestConfig < EntityT extends EntityBase , DeSerializersT extends DeSerializers > extends ODataRequestConfig implements WithKeys , WithETag { keys : Record < string , any > ; eTag : string ; versionIdentifierIgnored = false ; param entityApi param oDataUri constructor ( readonly entityApi , private oDataUri ) { super ( UpdateStrategy . MODIFY_WITH_PATCH , entityApi . entityConstructor . _defaultServicePath ) ; } resourcePath ( ) { return this . oDataUri . getResourcePathForKeys ( this . keys , this . entityApi ) ; } queryParameters ( ) { return this . prependDollarToQueryParameters ( { } ) ; } updateWithPut ( ) { this . method = UpdateStrategy . REPLACE_WITH_PUT ; } } enum UpdateStrategy { MODIFY_WITH_PATCH = 'patch' , REPLACE_WITH_PUT = 'put' }