import { request , cleanUrl } from "@esri/arcgis-rest-request" ; import { IGetLayerOptions } from "./helpers" ; /**
 * Request options to fetch `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
 *
 */ export interface IGetAttachmentsOptions extends IGetLayerOptions { /**
     * Unique identifier of feature to request related `attachmentInfos`.
     */ featureId : number ; } /**
 * Attachment, a.k.a. `attachmentInfo`. See [Attachment](https://developers.arcgis.com/rest/services-reference/attachment-feature-service-.htm) for more information.
 */ export interface IAttachmentInfo { id : number ; contentType : string ; size : number ; name : string ; } param requestOptions returns export function getAttachments ( requestOptions ) { const options = { httpMethod : "GET" , ... requestOptions } ; return request ( `${ cleanUrl ( options . url ) }/${ options . featureId }/attachments` , options ) ; }