import { request , cleanUrl , appendCustomParams } from "@esri/arcgis-rest-request" ; import { IFeature } from "@esri/arcgis-rest-types" ; import { ISharedEditOptions , IEditFeatureResult } from "./helpers" ; /**
 * Add features request options. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
 *
 */ export interface IAddFeaturesOptions extends ISharedEditOptions { /**
     * Array of JSON features to add.
     */ features : IFeature [ ] ; } param requestOptions returns export function addFeatures ( requestOptions ) { const url = `${ cleanUrl ( requestOptions . url ) }/addFeatures` ; const options = appendCustomParams < IAddFeaturesOptions > ( requestOptions , [ "features" , "gdbVersion" , "returnEditMoment" , "rollbackOnFailure" ] , { params : { ... requestOptions . params } } ) ; return request ( url , options ) ; }