import{GenericActivityError}from"../../Errors.js";import{validation}from"../../Validation.js";import{isArcGisApiVersion3x}from"./ArcGisApiVersion.js";import{addToPath,inline,schedulePromiseCancellation,fetch}from"./tools.js";class QueryAttachmentInfos{execute(t,e){var i=validation.urlOrLayer(t,isArcGisApiVersion3x).trim(),n=validation.number("objectId",t.objectId,validation.never),t=validation.number("timeout",t.timeout,void 0),n=addToPath(i,`${n}/attachments`),t=fetch(n,{},t,e.cancellationToken.signal);return schedulePromiseCancellation(e,t),inline(t,function(t){t=t.attachmentInfos;if(!t)throw new GenericActivityError('Error running the "Query Attachment Infos" activity. The response did not include the required "attachmentInfos" property.');return{infos:t}})}}QueryAttachmentInfos.action="gcx:wf:arcgis::QueryAttachmentInfos",QueryAttachmentInfos.suite="gcx:wf:builtin";export{QueryAttachmentInfos};