import { request , cleanUrl } from "@esri/arcgis-rest-request" ; import { IGetLayerOptions , IEditFeatureResult } from "./helpers" ; /**
 * Request options to for updating a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
 *
 */ export interface IUpdateAttachmentOptions extends IGetLayerOptions { /**
     * Unique identifier of feature to update related attachment.
     */ featureId : number ; /**
     * File to be updated.
     */ attachment : File ; /**
     * Unique identifier of the attachment.
     */ attachmentId : number ; } param requestOptions returns export function updateAttachment ( requestOptions ) { const options = { params : { } , ... requestOptions } ; options . params . attachment = requestOptions . attachment ; options . params . attachmentId = requestOptions . attachmentId ; return request ( `${ cleanUrl ( options . url ) }/${ options . featureId }/updateAttachment` , options ) ; }