define(["require","exports","../../Validation","./tools","./ArcGisApiVersion"],function(e,t,o,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(n.prototype.execute=function(e,t){var i=o.validation.urlOrLayer(e,u.isArcGisApiVersion3x),i=a.addToPath(i,"applyEdits"),n=o.validation.string("gdbVersion",e.gdbVersion),s=o.validation.number("timeout",e.timeout),e=o.validation.array("features",e.features,o.validation.never),s=a.post(i,{adds:e,gdbVersion:n},s,t.cancellationToken.signal);a.schedulePromiseCancellation(t,s);var r=this;return a.inline(s,function(e){r.onApplyEditsComplete(e);var t=e.addResults&&e.addResults.every(function(e){return e.success});return{results:e.addResults,success:t}})},n.prototype.onApplyEditsComplete=function(e){},n.action="gcx:wf:arcgis::AddFeatures",n.suite="gcx:wf:builtin",n);function n(){}t.AddFeatures=i});