UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 834 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import t from"../../request.js";import{parseUrl as s,encode as r,asValidOptions as o}from"../utils.js";import a from"./support/QueryNamedTraceConfigurationsResult.js";async function e(e,n,g){const i=s(e),l=n.toJSON();n.globalIds&&n.globalIds.length>0&&(l.globalIds=JSON.stringify(n.globalIds)),n.creators&&n.creators.length>0&&(l.creators=JSON.stringify(n.creators)),n.tags&&n.tags.length>0&&(l.tags=JSON.stringify(n.tags)),n.names&&n.names.length>0&&(l.names=JSON.stringify(n.names));const m={...l,f:"json"},f=r({...i.query,...m}),u=o(f,{...g,method:"post"}),c=`${i.path}/traceConfigurations/query`,{data:p}=await t(c,u);return a.fromJSON(p)}export{e as queryNamedTraceConfigurations};