!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","../../Errors","../../Validation","./tools","./ArcGisApiVersion"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../../Errors"),a=e("../../Validation"),s=e("./tools"),c=e("./ArcGisApiVersion"),e=(i.prototype.execute=function(e,t){var i=a.validation.urlOrLayer(e,c.isArcGisApiVersion3x).trim(),n=a.validation.number("objectId",e.objectId,a.validation.never),o=a.validation.array("attachmentIds",e.attachmentIds,a.validation.never).join(","),e=a.validation.number("timeout",e.timeout,void 0),n=s.addToPath(i,n+"/deleteAttachments"),e=s.post(n,{attachmentIds:o},e,t.cancellationToken.signal);return s.schedulePromiseCancellation(t,e),s.inline(e,function(e){e=e.deleteAttachmentResults;if(!e)throw new r.GenericActivityError('Error running the "Delete Attachments" activity. The response did not include the required "deleteAttachmentResults" property.');return{results:e}})},i.action="gcx:wf:arcgis::DeleteAttachments",i.suite="gcx:wf:builtin",i);function i(){}t.DeleteAttachments=e});