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