UNPKG

529 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../src/__package__.ts","../../../node_modules/tslib/tslib.es6.js","../src/connection.ts","../src/espConnection.ts","../src/services/wsAccount.ts","../src/services/wsDFU.ts","../src/services/wsEcl.ts","../../../node_modules/d3-array/src/ascending.js","../../../node_modules/d3-array/src/bisector.js","../../../node_modules/d3-array/src/bisect.js","../../../node_modules/d3-array/src/number.js","../../../node_modules/d3-array/src/max.js","../../../node_modules/d3-array/src/mean.js","../src/services/wsMachine.ts","../src/services/wsSMC.ts","../src/services/wsStore.ts","../src/services/wsTopology.ts","../src/services/wsWorkunits.ts","../../../node_modules/d3-time/src/interval.js","../../../node_modules/d3-time/src/millisecond.js","../../../node_modules/d3-time/src/duration.js","../../../node_modules/d3-time/src/second.js","../../../node_modules/d3-time/src/minute.js","../../../node_modules/d3-time/src/hour.js","../../../node_modules/d3-time/src/day.js","../../../node_modules/d3-time/src/week.js","../../../node_modules/d3-time/src/month.js","../../../node_modules/d3-time/src/year.js","../../../node_modules/d3-time/src/utcMinute.js","../../../node_modules/d3-time/src/utcHour.js","../../../node_modules/d3-time/src/utcDay.js","../../../node_modules/d3-time/src/utcWeek.js","../../../node_modules/d3-time/src/utcMonth.js","../../../node_modules/d3-time/src/utcYear.js","../../../node_modules/d3-time-format/src/locale.js","../../../node_modules/d3-time-format/src/defaultLocale.js","../../../node_modules/d3-time-format/src/isoFormat.js","../../../node_modules/d3-time-format/src/isoParse.js","../src/ecl/graph.ts","../src/ecl/resource.ts","../src/ecl/xsdParser.ts","../src/ecl/activity.ts","../src/ecl/result.ts","../src/ecl/scope.ts","../src/ecl/sourceFile.ts","../src/ecl/timer.ts","../src/ecl/workunit.ts","../src/ecl/logicalFile.ts","../src/ecl/machine.ts","../src/ecl/query.ts","../src/ecl/store.ts","../src/ecl/targetCluster.ts","../src/ecl/topology.ts","../src/clienttools/eclMeta.ts","../src/clienttools/eclcc.ts","../src/index.node.ts"],"names":["PKG_NAME","PKG_VERSION","BUILD_VERSION","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","v","op","TypeError","pop","push","__spreadArrays","il","r","k","a","j","jl","logger","scopedLogger","instanceOfIOptions","object","DefaultOptions","type","baseUrl","userID","password","rejectUnauthorized","timeoutSecs","instanceOfIConnection","opts","send","clone","encode","uriComponent","encodeRequest","undefined","encodeURIComponent","serializeRequest","obj","prefix","str","key","includeItemCount_1","forEach","row","join","deserializeResponse","JSON","parse","jsonp","action","request","responseType","header","console","warn","respondedTimeout","callbackName","Math","round","random","window","response","doCallback","script","document","createElement","url","indexOf","src","appendChild","progress","setInterval","clearInterval","error","Error","debug","removeChild","authHeader","Authorization","btoa","_omitMap","doFetch","requestInit","headersInit","handleResponse","ok","json","text","statusText","credentials","headers","fetch","promiseTimeout","catch","responseBody","post","method","Content-Type","get","retVal","hookedSend","hookSend","newSend","Connection","defineProperty","_opts","setTransportFactory","newFunc","createConnection","isArray","arg","toString","ESPExceptions","exceptions","_this","_super","Source","isESPExceptions","Exception","message","Code","Message","isConnection","optsConnection","ESPConnection","service","version","_connection","_service","_version","toESPStringArray","target","arrayName","_request","espResponseType","largeUpload","serviceAction","ver_","actionParts","split","Exceptions","Service","AccountService","connectionOptions","VerifyUser","DFUService","DFUQuery","DFUInfo","jsonToIField","id","item","Row","children","jsonToIFieldArr","Item","fieldType","fields","jsonToIFieldObj","EclService","requestJson","querySet","queryId","requestSchema","responseJson","responseSchema","Results","resultsJson","submit","ascending","NaN","bisector","compare","ascendingComparator","left","x","lo","hi","mid","right","ascendingBisect","number","d3Max","values","valueof","max","d3Mean","m","sum","isNaN","MachineService","GetTargetClusterInfo","GetTargetClusterUsage","targetClusters","bypassCachedResult","TargetClusters","BypassCachedResult","exists","TargetClusterUsages","TargetClusterUsage","GetTargetClusterUsageEx","filter","tcu","ComponentUsages","map","ComponentUsage","cu","MachineUsages","MachineUsage","mu","DiskUsages","DiskUsage","du","Total","InUse","Available","PercentUsed","PercentAvailable","Name","NetAddress","Description","mean","Type","MachineUsagesDescription","reduce","prev","ComponentUsagesDescription","SMCService","Activity","Running","ActiveWorkunit","StoreService","CreateStore","Delete","some","Success","DeleteNamespace","Fetch","Value","FetchAll","FetchKeyMD","ListKeys","ListNamespaces","Set","TopologyService","protocol","ip","TpLogicalClusterQuery","DefaultTpLogicalClusterQuery","default","TpLogicalClusters","TpLogicalCluster","idx","first","firstHThor","TpServiceQuery","TpTargetClusterQuery","TpListTargetClusters","isWUQueryECLWorkunit","TotalClusterTime","isWUInfoWorkunit","StateEx","WUStateID","WUUpdate","Action","WorkunitsService","connection","WUQuery","deepMixin","Workunits","ECLWorkunit","WUInfo","Wuid","TruncateEclTo64k","IncludeExceptions","IncludeGraphs","IncludeSourceFiles","IncludeResults","IncludeResultsViewNames","IncludeVariables","IncludeTimers","IncludeDebugValues","IncludeApplicationValues","IncludeWorkflows","IncludeXmlSchemas","IncludeResourceURLs","SuppressResultSchemas","WUCreate","WUSubmit","WUResubmit","WUQueryDetails","WUListQueries","WUPushEvent","WUAction","ActionType","WUActionType","WUGetZAPInfo","WUShowScheduled","WUQuerySetAliasAction","WUQuerySetQueryAction","WUPublishWorkunit","WUGetGraph","WUResult","WUQueryGetGraph","WUFile","WUGetStats","WUDetailsMeta","_WUDetailsMetaPromise","WUDetails","WUCDebug","xml2json","Result","t0","Date","t1","newInterval","floori","offseti","count","field","interval","date","floor","ceil","d0","d1","offset","range","start","stop","test","setTime","end","every","isFinite","millisecond","durationSecond","durationMinute","durationHour","durationDay","durationWeek","second","getUTCSeconds","minute","getMinutes","hour","getTimezoneOffset","getHours","day","setHours","setDate","getDate","weekday","getDay","sunday","monday","tuesday","wednesday","thursday","friday","saturday","month","setMonth","getMonth","getFullYear","year","setFullYear","utcMinute","setUTCSeconds","getUTCMinutes","utcHour","setUTCMinutes","getUTCHours","utcDay","setUTCHours","setUTCDate","getUTCDate","utcWeekday","getUTCDay","utcSunday","utcMonday","utcTuesday","utcWednesday","utcThursday","utcFriday","utcSaturday","utcMonth","setUTCMonth","getUTCMonth","getUTCFullYear","utcYear","setUTCFullYear","localDate","H","M","S","L","utcDate","UTC","newYear","formatLocale","locale","locale_dateTime","dateTime","locale_date","locale_time","time","locale_periods","periods","locale_weekdays","days","locale_shortWeekdays","shortDays","locale_months","months","locale_shortMonths","shortMonths","periodRe","formatRe","periodLookup","formatLookup","weekdayRe","weekdayLookup","shortWeekdayRe","shortWeekdayLookup","monthRe","monthLookup","shortMonthRe","shortMonthLookup","formats","A","B","c","formatDayOfMonth","formatMicroseconds","formatHour24","I","formatHour12","formatDayOfYear","formatMilliseconds","formatMonthNumber","formatMinutes","Q","formatUnixTimestamp","formatUnixTimestampSeconds","formatSeconds","u","formatWeekdayNumberMonday","U","formatWeekNumberSunday","V","formatWeekNumberISO","w","formatWeekdayNumberSunday","W","formatWeekNumberMonday","X","formatYear","Y","formatFullYear","Z","formatZone","%","formatLiteralPercent","utcFormats","formatUTCDayOfMonth","formatUTCMicroseconds","formatUTCHour24","formatUTCHour12","formatUTCDayOfYear","formatUTCMilliseconds","formatUTCMonthNumber","formatUTCMinutes","formatUTCSeconds","formatUTCWeekdayNumberMonday","formatUTCWeekNumberSunday","formatUTCWeekNumberISO","formatUTCWeekdayNumberSunday","formatUTCWeekNumberMonday","formatUTCYear","formatUTCFullYear","formatUTCZone","parses","string","exec","slice","toLowerCase","parseSpecifier","parseDayOfMonth","parseMicroseconds","parseHour24","parseDayOfYear","parseMilliseconds","parseMonthNumber","parseMinutes","parseUnixTimestamp","parseUnixTimestampSeconds","parseSeconds","parseWeekdayNumberMonday","parseWeekNumberSunday","parseWeekNumberISO","parseWeekdayNumberSunday","parseWeekNumberMonday","parseYear","parseFullYear","parseZone","parseLiteralPercent","newFormat","specifier","pad","format","charCodeAt","pads","charAt","newParse","newDate","week","timeMonday","timeDay","utcFormat","utcParse","timeFormat","timeParse","-","0","numberRe","percentRe","requoteRe","fill","width","sign","requote","replace","names","RegExp","timeYear","getMilliseconds","getSeconds","timeSunday","timeThursday","z","getUTCMilliseconds","dow","defaultLocale","definition","isoSpecifier","formatIsoNative","toISOString","formatIso","parseIsoNative","parseIso","ECLGraph","wu","eclGraph","eclTimers","duration","_i","eclTimers_1","eclTimer","GraphName","HasSubGraphId","Seconds","set","Time","fetchScopeGraph","subgraphID","fetchGraphDetails","scopes","createGraph","StateObject","GraphCache","Cache","hash","walkXmlJson","node","callback","stack","name","$","childNode","flattenAtt","nodes","XGMMLGraph","Graph","XGMMLSubgraph","Subgraph","XGMMLVertex","Vertex","XGMMLEdge","Edge","createXGMMLGraph","graphs","subgraphs","vertices","edges","graph","root","tag","attributes","childNodes","_stack","top","subgraph","createSubgraph","vertex","createVertex","edge","createEdge","ScopeGraph","ScopeSubgraph","ScopeVertex","ScopeEdge","scopes_1","scope","ScopeType","Id","ScopeName","scopeStack","parentScope","scopeParent1","parent1","log","scopeParent2","scopeParent3","parent3","source","attr","RawValue","Resource","cleanedURL","urlParts","matchStr","displayPath","displayName","substr","URL","DisplayName","DisplayPath","XSDNode","fix","XSDXMLNode","attrs","_children","append","child","_a","splice","charWidth","underbarPos","lastIndexOf","length_1","parseInt","substring","XSDSimpleType","_restricition","_maxLength","maxLength","XSDSchema","simpleTypes","XSDParser","schema","xsdStack","Stack","startXMLNode","xsdXMLNode","depth","simpleType","endXMLNode","xsdXMLNode2","SAXStackParser","parseXSD","xml","saxParser","XSDParser2","rootName","_rootName","parseXSD2","_activity","GlobalResultCache","BaseUrl","ResultName","_results","wuidOrLogicalFile","eclResultOrResultName","resultViews","LogicalFileName","ResultViews","ResultSequence","attach","wuid","resultName","state","isComplete","fetchXMLSchema","xsdSchema","XmlSchema","refresh","fetchRows","from","includeSchema","rootField","suppressXmlSchema","FilterBy","NamedValue","itemcount","Sequence","NodeGroup","LogicalName","Cluster","Start","Count","SuppressXmlSchema","ResultCache","FileName","Attribute","attribute","BaseScope","_attributeMap","update","Property","timeElapsed","Properties","scopeAttr","Measure","FormattedEnd","Formatted","CAttributes","properties","scopeParts","walk","visitor","formattedAttrs","rawAttrs","hasAttr","Creator","CreatorType","attrMeasure","calcTooltip","rows","Scope","SourceFile","eclSourceFile","Timer","secs","espTime2Seconds","SubGraphId","formatter","parser","WsWorkunits.WUStateID","WorkunitCache","_workunits","Workunit","_debugMode","_resultCache","_graphCache","WsWorkunits.WorkunitsService","topologyConnection","WsTopology.TopologyService","clearState","Unknown","StateID","ECLException","ECLResult","eclResult","CResults","ECLTimer","Timers","Graphs","CTimers","ResourceURLs","ApplicationValue","ECLHelpFile","ECLSourceFile","SourceFiles","existsLocal","has","server","ecl","QueryText","query","clear","StateOrig","State","JobnameOrig","Jobname","DescriptionOrig","ProtectedOrig","Protected","ClusterOrig","_cluster","resultLimit","clusterPromise","WsWorkunits.WUUpdate","Run","Debug","cluster","ResultLimit","DebugValues","DebugValue","_submitAction","Compiled","ActionEx","Compile","Completed","Failed","Aborted","NotFound","isFailed","isDeleted","isDebugging","DebugPaused","DebugRunning","isRunning","Aborting","Blocked","setToFailed","pause","pauseNow","resume","abort","delete","restore","deschedule","reschedule","resubmit","CloneWorkunit","ResetWorkflow","_monitor","WUs","WU","WUID","refreshState","refreshInfo","refreshDebug","debugStatus","full","all","eclExceptions","fetchArchive","fetchECLExceptions","fetchResults","fetchGraphs","CGraphs","fetchDetailsMeta","fetchDetailsRaw","Scopes","fetchDetailsNormalized","promises","meta","columns","data","props","scopeProperty","fetchDetails","rawScope","fetchDetailsHierarchy","scopeMap","parentScopeID","graphIDs","rootTypes","ScopeFilter","MaxDepth","Ids","ScopeTypes","NestedFilter","Depth","PropertiesToReturn","AllStatistics","AllAttributes","AllHints","AllProperties","AllScopes","ScopeOptions","IncludeId","IncludeScope","IncludeScopeType","PropertyOptions","IncludeName","IncludeRawValue","IncludeFormatted","IncludeMeasure","IncludeCreator","IncludeCreatorType","fetchScopeGraphs","fetchTimeElapsed","PropertyFilters","PropertyFilter","scopeInfo","elapsed","finish","endTime","setMilliseconds","sort","l","_monitorTickCount","_monitorTimeoutDuraction","on","eventID","propIDorCallback","isCallback","changeInfo","watchUntilComplete","watchHandle","watch","changes","release","watchUntilRunning","exception","warning","includeResults","deepMixinT","Wuids","IncludeMatchedScopesInResults","actionType","publish","JobName","AllowForeignFiles","Activate","Wait","command","optsStr","Command","XMLNode","debugState","DebugState","debugContinue","mode","debugStep","debugPause","debugQuit","debugDeleteAllBreakpoints","debugBreakpointResponseParser","rootNode","debugBreakpointAdd","debugBreakpointList","debugGraph","_debugAllGraph","debugBreakpointValid","path","breakpointLocations","debugPrint","edgeID","startRow","numRows","rowNode","cellNode","content","ATTR_DEFINITION","hasECLDefinition","getECLDefinition","match","_file","_row","_col","file","line","column","lazyRefresh","debounce","runningWorkunits","clusterName","awu","ClusterName","LogicalFileCache","_store","LogicalFile","fetchInfo","FileDetail","MachineCache","Address","_machines","Machine","address","QueryCache","QueryId","QuerySet","_queries","Query","queryID","queryDetails","fetchRequestSchema","_requestSchema","_b","fetchResponseSchema","_responseSchema","fetchSchema","results","requestFields","responseFields","resultNames","resultFields","StoreCache","UserSpecific","Namespace","ValueChangedMessage","oldValue","conflate","other","void","Store","_dispatch","Dispatch","_knownValues","broadcast","StoreName","Key","getAll","deletedValues","Pairs","Pair","pair","monitor","TargetClusterCache","_targetCluster","TargetCluster","machineConnection","MachineInfoEx","machineInfoEx","fetchMachines","TargetClusterInfoList","TargetClusterInfo","_c","Processes","CMachineInfoEx","machineStats","maxDisk","totalFree","total","Storage","StorageInfo","storageInfo","usage","meanDisk","fetchUsage","TpClusterNameType","_defaultTargetCluster","defaultTargetCluster","firstItem","defaultItem","hthorItem","IsDefault","defItem","Topology","tc","GetESPServiceBaseURL","rootProtocol","port","ServiceList","TpEspServers","TpEspServer","TpBindings","TpBinding","binding","Protocol","Port","fetchTargetClusters","TpTargetClusters","TpTargetCluster","CTargetClusters","xmlAttr","__attrs","Field","xmlField","ECLScope","sourcePath","xmlDefinitions","Number","MAX_VALUE","path.normalize","definitions","parseDefinitions","Definition","contains","charOffset","scopeStackAt","def","concat","_resolve","defs","qualifiedID","qualifiedIDParts","base","shift","find","suggestions","xmlDefinition","exported","shared","fullname","inherittype","parseAttrs","parseFields","Attr","xmlImport","ref","xmlSource","nameParts","fakeNode","appendAttribute","imports","Import","parseImports","imp","isHiddenDirectory","path.basename","isDirectory","fs.lstatSync","isEcl","path.extname","modAttrs","fs.readdirSync","path.join","File","Folder","folder","Workspace","workspacePath","eclccPath","_sourceByID","DictionaryNoCase","_sourceByPath","Dictionary","_test","_workspacePath","_eclccPath","primeWorkspace","primeClientTools","locateClientTools","clientTools","_clientTools","paths","knownFolder","fs.existsSync","walkChildFolders","visitFolder","folderPath","refPath","force","visitFile","filePath","filePathInfo","path.parse","pathNoExt","dir","path.relative","path.sep","buildStack","parentStack","removeDupID","nameStack","qid","walkECLScope","info","walkDefinition","walkField","walkSource","parseSources","sources","sources_1","_source","path.dirname","parseMetaXML","metaXML","metaParser","MetaParser","resolveQualifiedID","eclSource","realQID","resolvePartialID","partialID","partialIDParts","partialIDQualifier","workspaceCache","attachWorkspace","workspace","isQualifiedIDChar","lineText","charPos","reverse","testChar","qualifiedIDBoundary","exeExt","os.type","Version","build","major","minor","patch","postfix","parts","localeCompare","ERROR","WARN","Errors","checked","errWarn","errOther","_checked","errors","severity","hasError","warnings","hasWarning","hasOther","unknown","hasUnknown","EclccErrors","stdErr","os.EOL","errLine","col","msg","EnvchkErrors","fs.readFileSync","_lines","_path","_attr","locate","pathParts","lineIdx","testStr","allClientToolsCache","LocalWorkunit","jsonWU","bpGetValidLocations","id_1","W_LOCAL","ClientTools","cwd","includeFolders","legacyMode","args","_paths","binPath","envchkPath","_legacyMode","_args","fs.accessSync","additionalItems","includePath","execFile","stdout","versionSync","paths_1","loadXMLDoc","removeOnRead","_reject","fileData","fs.unlink","err","createWU","filename","tmpName","tmp.tmpNameSync","_response","xmlPath","createArchive","stderr","fetchMeta","metaWorkspace","execFileResponse","syntaxCheck","envCheck","cmd","_toolName","_notFoundError","cp.spawn","stdOut","_code","_signal","trim","locateClientToolsInFolder","rootFolder","hpccSystemsFolder_1","fs.statSync","versionFolder","name_1","locateAllClientTools","rootFolder86","process","env","ct","eclccPathMsg","logEclccPath","overridePath","allClientToolsCache2","latest","bestMajor","buildVersion","allClientToolsCache2_1","ctVersion","best","DOMParser","https","require","__agent","Agent","Buffer"],"mappings":"0YAAaA,SAAW,iBACXC,YAAc,SACdC,cAAgB,SCczBC,cAAgB,SAASC,EAAGC,GAI5B,OAHAF,cAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAGrB,SAASO,UAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,YAAcX,EADnCD,cAAcC,EAAGC,GAEjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,GAG5E,IAAIK,SAAW,WAQlB,OAPAA,SAAWZ,OAAOa,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIZ,KADTW,EAAIG,UAAUF,GACOhB,OAAOU,UAAUL,eAAee,KAAKL,EAAGX,KAAIU,EAAEV,GAAKW,EAAEX,IAE9E,OAAOU,IAEKO,MAAMb,KAAMU,YA8BzB,SAASI,UAAUC,EAASC,EAAYC,EAAGC,GAC9C,OAAO,IAAKD,IAAMA,EAAIE,UAAU,SAAUC,EAASC,GAC/C,SAASC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AA7tB,GACH8tB,EAAYT,EAAGvC,cAGrB,GAFK4C,IAAQA,EAASL,GACjBM,GAAaC,EAAavG,QAAUyG,EAAUzG,QAAOsG,EAAYN,GAClEO,EAAavG,QAAUyG,EAAUzG,OAASuG,EAAatG,QAAUwG,EAAUxG,MAAO,OAAO+F,EAAGluC,MAAM6qC,EAAKC,EAAgBC,GAE/H,IAAM6D,EAAoBJ,GAAaD,EAEvC,OADAH,aAAaQ,EAAK9K,WACX8K,EAAK5uC,MAAM6qC,EAAKC,EAAgBC,KC/f/C,GAJA1nB,KAAAA,KAAKwrB,UAAYA,OAAAA,eAIS,IAAfxrB,KAAAA,KAAKxf,MAAuB,CACnCwf,KAAAA,KAAKxf,MAAQA,QAGb,IAAMirC,MAAQC,QAAQ,SACtB1rB,KAAAA,KAAKxf,MAAMmrC,QAAU,IAAIF,MAAMG,MAAM,CACjCtvC,oBAAoB,SAMH,IAAd0jB,KAAAA,KAAKpgB,OACZogB,KAAAA,KAAKpgB,KAAO,SAAUxC,GAClB,OAAOyuC,WAAAA,OAAOvlB,KAAKlpB,GAAO,GAAI,QAAQwE,SAAS","sourcesContent":["export const PKG_NAME = \"@hpcc-js/comms\";\r\nexport const PKG_VERSION = \"2.20.0\";\r\nexport const BUILD_VERSION = \"2.28.0\";\r\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { join, promiseTimeout, scopedLogger } from \"@hpcc-js/util\";\n\nconst logger = scopedLogger(\"comms/connection.ts\");\n\nexport type RequestType = \"post\" | \"get\" | \"jsonp\";\nexport type ResponseType = \"json\" | \"text\";\n\nexport type IOptionsSend = (options: IOptions, action: string, request: any, responseType: ResponseType, defaultSend: SendFunc, header?: any) => Promise<any>;\nexport interface IOptions {\n baseUrl: string;\n type?: RequestType;\n userID?: string;\n password?: string;\n rejectUnauthorized?: boolean;\n timeoutSecs?: number;\n hookSend?: IOptionsSend;\n encodeRequest?: boolean; // defaults to true\n}\nexport function instanceOfIOptions(object: any): object is IOptions {\n return \"baseUrl\" in object;\n}\n\nconst DefaultOptions: IOptions = {\n type: \"post\",\n baseUrl: \"\",\n userID: \"\",\n password: \"\",\n rejectUnauthorized: true,\n timeoutSecs: 60\n};\n\nexport interface IConnection {\n opts(_: Partial<IOptions>): this;\n opts(): IOptions;\n baseUrl: string;\n\n send(action: string, request: any, responseType?: ResponseType): Promise<any>;\n clone(): IConnection;\n}\nexport function instanceOfIConnection(object: any): object is IConnection {\n return typeof object.opts === \"function\" &&\n typeof object.send === \"function\" &&\n typeof object.clone === \"function\";\n}\n\n// comms ---\n\nfunction encode(uriComponent: string | number | boolean, encodeRequest: boolean): string {\n return (encodeRequest === undefined || encodeRequest === true) ? encodeURIComponent(uriComponent) : \"\" + uriComponent;\n}\n\nexport function serializeRequest(obj: any, encodeRequest: boolean = true, prefix: string = \"\"): string {\n if (prefix) {\n prefix += \".\";\n }\n if (typeof obj !== \"object\") {\n return encode(obj, encodeRequest);\n }\n\n const str: string[] = [];\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (obj[key] instanceof Array) {\n // Specific to ESP - but no REST standard exists...\n let includeItemCount = false;\n obj[key].forEach((row: any, i: number) => {\n if (typeof row === \"object\") {\n includeItemCount = true;\n str.push(serializeRequest(row, encodeRequest, prefix + encode(`${key}.${i}`, encodeRequest)));\n } else {\n str.push(prefix + encode(`${key}_i${i}`, encodeRequest) + \"=\" + serializeRequest(row, encodeRequest));\n }\n });\n if (includeItemCount) {\n str.push(prefix + encode(`${key}.itemcount`, encodeRequest) + \"=\" + obj[key].length);\n }\n } else if (typeof obj[key] === \"object\") {\n if (obj[key] && obj[key][\"Item\"] instanceof Array) { // Specific to ws_machine.GetTargetClusterInfo?\n str.push(serializeRequest(obj[key][\"Item\"], encodeRequest, prefix + encode(key, encodeRequest)));\n str.push(prefix + encode(`${key}.itemcount`, encodeRequest) + \"=\" + obj[key][\"Item\"].length);\n } else {\n str.push(serializeRequest(obj[key], encodeRequest, prefix + encode(key, encodeRequest)));\n }\n } else if (obj[key] !== undefined) {\n str.push(prefix + encode(key, encodeRequest) + \"=\" + encode(obj[key], encodeRequest));\n } else {\n str.push(prefix + encode(key, encodeRequest));\n }\n }\n }\n return str.join(\"&\");\n}\n\nexport function deserializeResponse(body: string) {\n return JSON.parse(body);\n}\n\nexport function jsonp(opts: IOptions, action: string, request: any = {}, responseType: ResponseType = \"json\", header?: any): Promise<any> {\n if (header) {\n console.warn(\"Header attributes ignored for JSONP connections\");\n }\n return new Promise<any>((resolve, reject) => {\n let respondedTimeout = opts.timeoutSecs! * 1000;\n const respondedTick = 5000;\n const callbackName = \"jsonp_callback_\" + Math.round(Math.random() * 999999);\n (window as any)[callbackName] = function (response: any) {\n respondedTimeout = 0;\n doCallback();\n resolve(responseType === \"json\" && typeof response === \"string\" ? deserializeResponse(response) : response);\n };\n const script = document.createElement(\"script\");\n let url = join(opts.baseUrl, action);\n url += url.indexOf(\"?\") >= 0 ? \"&\" : \"?\";\n script.src = url + \"jsonp=\" + callbackName + \"&\" + serializeRequest(request, opts.encodeRequest);\n document.body.appendChild(script);\n const progress = setInterval(function () {\n if (respondedTimeout <= 0) {\n clearInterval(progress);\n } else {\n respondedTimeout -= respondedTick;\n if (respondedTimeout <= 0) {\n clearInterval(progress);\n logger.error(\"Request timeout: \" + script.src);\n doCallback();\n reject(Error(\"Request timeout: \" + script.src));\n } else {\n logger.debug(\"Request pending (\" + respondedTimeout / 1000 + \" sec): \" + script.src);\n }\n }\n }, respondedTick);\n\n function doCallback() {\n delete (window as any)[callbackName];\n document.body.removeChild(script);\n }\n });\n}\n\nfunction authHeader(opts: IOptions): object {\n return opts.userID ? { Authorization: `Basic ${btoa(`${opts.userID}:${opts.password}`)}` } : {};\n}\n\n// _omitMap is a workaround for older HPCC-Platform instances without credentials ---\nconst _omitMap: { [baseUrl: string]: boolean } = {};\nfunction doFetch(opts: IOptions, action: string, requestInit: RequestInit, headersInit: HeadersInit, responseType: string) {\n headersInit = {\n ...authHeader(opts),\n ...headersInit\n };\n\n requestInit = {\n credentials: _omitMap[opts.baseUrl] ? \"omit\" : \"include\",\n ...requestInit,\n headers: headersInit\n };\n\n if (opts.rejectUnauthorized === false && fetch[\"__agent\"] && opts.baseUrl.indexOf(\"https:\") === 0) {\n // NodeJS / node-fetch only ---\n requestInit[\"agent\"] = fetch[\"__agent\"];\n }\n\n function handleResponse(response: Response): Promise<any> {\n if (response.ok) {\n return responseType === \"json\" ? response.json() : response.text();\n }\n throw new Error(response.statusText);\n }\n\n return promiseTimeout(opts.timeoutSecs! * 1000, fetch(join(opts.baseUrl, action), requestInit)\n .then(handleResponse)\n .catch(e => {\n // Try again with the opposite credentials mode ---\n requestInit.credentials = !_omitMap[opts.baseUrl] ? \"omit\" : \"include\";\n return fetch(join(opts.baseUrl, action), requestInit)\n .then(handleResponse)\n .then(responseBody => {\n _omitMap[opts.baseUrl] = !_omitMap[opts.baseUrl]; // The \"opposite\" credentials mode is known to work ---\n return responseBody;\n });\n })\n );\n}\n\nexport function post(opts: IOptions, action: string, request: any, responseType: ResponseType = \"json\", header?: any): Promise<any> {\n return doFetch(opts, action, {\n method: \"post\",\n body: serializeRequest(request, opts.encodeRequest)\n }, {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n ...header\n } as any, responseType);\n}\n\nexport function get(opts: IOptions, action: string, request: any, responseType: ResponseType = \"json\", header?: any): Promise<any> {\n return doFetch(opts, `${action}?${serializeRequest(request, opts.encodeRequest)}`, {\n method: \"get\"\n }, {\n ...header\n } as any, responseType);\n}\n\nexport type SendFunc = (opts: IOptions, action: string, request: any, responseType: ResponseType, header?: any) => Promise<any>;\nexport function send(opts: IOptions, action: string, request: any, responseType: ResponseType = \"json\", header?: any): Promise<any> {\n let retVal: Promise<any>;\n switch (opts.type) {\n case \"jsonp\":\n retVal = jsonp(opts, action, request, responseType, header);\n break;\n case \"get\":\n retVal = get(opts, action, request, responseType, header);\n break;\n case \"post\":\n default:\n retVal = post(opts, action, request, responseType, header);\n break;\n }\n return retVal;\n}\n\nlet hookedSend: SendFunc = send;\nexport function hookSend(newSend?: SendFunc): SendFunc {\n const retVal = hookedSend;\n if (newSend) {\n hookedSend = newSend;\n }\n return retVal;\n}\n\nexport class Connection implements IConnection {\n protected _opts: IOptions;\n get baseUrl() { return this._opts.baseUrl; }\n\n constructor(opts: IOptions) {\n this.opts(opts);\n }\n\n // IConnection ---\n opts(_: Partial<IOptions>): this;\n opts(): IOptions;\n opts(_?: Partial<IOptions>): this | IOptions {\n if (arguments.length === 0) return this._opts;\n this._opts = { ...DefaultOptions, ..._ };\n return this;\n }\n\n send(action: string, request: any, responseType: ResponseType = \"json\", header?: any): Promise<any> {\n if (this._opts.hookSend) {\n return this._opts.hookSend(this._opts, action, request, responseType, hookedSend, header);\n }\n return hookedSend(this._opts, action, request, responseType, header);\n }\n\n clone() {\n return new Connection(this.opts());\n }\n}\n\nexport type IConnectionFactory = (opts: IOptions) => IConnection;\nexport let createConnection: IConnectionFactory = function (opts: IOptions): IConnection {\n return new Connection(opts);\n};\n\nexport function setTransportFactory(newFunc: IConnectionFactory): IConnectionFactory {\n const retVal = createConnection;\n createConnection = newFunc;\n return retVal;\n}\n","import { join } from \"@hpcc-js/util\";\nimport { createConnection, IConnection, IOptions, ResponseType } from \"./connection\";\n\nexport type ESPResponseType = ResponseType | \"json2\" | \"xsd\";\n\nexport function isArray(arg: any) {\n return Object.prototype.toString.call(arg) === \"[object Array]\";\n}\n\nexport interface Exception {\n Code: number;\n Message: string;\n}\n\nexport interface Exceptions {\n Source: string;\n Exception: Exception[];\n}\n\nexport class ESPExceptions extends Error implements Exceptions {\n isESPExceptions = true;\n action: string;\n request: string;\n Source: string;\n Exception: Exception[];\n\n constructor(action: string, request: any, exceptions: Exceptions) {\n super(\"ESPException: \" + exceptions.Source);\n this.action = action;\n this.request = request;\n this.Source = exceptions.Source;\n this.Exception = exceptions.Exception;\n if (exceptions.Exception.length) {\n this.message = `${exceptions.Exception[0].Code}: ${exceptions.Exception[0].Message}`;\n }\n }\n}\n\nfunction isConnection(optsConnection: IOptions | IConnection): optsConnection is IConnection {\n return (optsConnection as IConnection).send !== undefined;\n}\n\nexport class ESPConnection implements IConnection {\n private _connection: IConnection;\n get baseUrl() { return this._connection.opts().baseUrl; }\n private _service: string;\n private _version: string;\n\n constructor(optsConnection: IOptions | IConnection, service: string, version: string) {\n this._connection = isConnection(optsConnection) ? optsConnection : createConnection(optsConnection);\n this._service = service;\n this._version = version;\n }\n\n service(): string;\n service(_: string): ESPConnection;\n service(_?: string): string | ESPConnection {\n if (_ === void 0) return this._service;\n this._service = _;\n return this;\n }\n\n version(): string;\n version(_: string): ESPConnection;\n version(_?: string): string | ESPConnection {\n if (_ === void 0) return this._version;\n this._version = _;\n return this;\n }\n\n toESPStringArray(target: any, arrayName: string): any {\n if (isArray(target[arrayName])) {\n for (let i = 0; i < target[arrayName].length; ++i) {\n target[arrayName + \"_i\" + i] = target[arrayName][i];\n }\n delete target[arrayName];\n }\n return target;\n }\n\n // IConnection ---\n opts(_: Partial<IOptions>): this;\n opts(): IOptions;\n opts(_?: Partial<IOptions>): this | IOptions {\n if (_ === void 0) return this._connection.opts();\n this._connection.opts(_);\n return this;\n }\n\n send(action: string, _request: any = {}, espResponseType: ESPResponseType = \"json\", largeUpload: boolean = false): Promise<any> {\n const request = { ..._request, ...{ ver_: this._version } };\n if (largeUpload) {\n request[\"upload_\"] = true;\n }\n let serviceAction: string;\n let responseType: ResponseType = \"json\";\n switch (espResponseType) {\n case \"text\":\n serviceAction = join(this._service, action);\n responseType = \"text\";\n break;\n case \"xsd\":\n serviceAction = join(this._service, action + \".xsd\");\n responseType = \"text\";\n break;\n case \"json2\":\n serviceAction = join(this._service, action + \"/json\");\n espResponseType = \"json\";\n const actionParts = action.split(\"/\");\n action = actionParts.pop()!;\n break;\n default:\n serviceAction = join(this._service, action + \".json\");\n }\n return this._connection.send(serviceAction, request, responseType).then((response) => {\n if (espResponseType === \"json\") {\n let retVal;\n if (response && response.Exceptions) {\n throw new ESPExceptions(action, request, response.Exceptions);\n } else if (response) {\n retVal = response[`${action === \"WUCDebug\" ? \"WUDebug\" : action}Response`];\n }\n if (!retVal) {\n throw new ESPExceptions(action, request, {\n Source: \"ESPConnection.send\",\n Exception: [{ Code: 0, Message: \"Missing Response\" }]\n });\n }\n return retVal;\n }\n return response;\n }).catch(e => {\n if (e.isESPExceptions) {\n throw e;\n }\n throw new ESPExceptions(action, request, {\n Source: \"ESPConnection.send\",\n Exception: [{ Code: 0, Message: e.message }]\n });\n });\n }\n\n clone() {\n return new ESPConnection(this._connection.clone(), this._service, this._version);\n }\n}\n\nexport class Service {\n protected _connection: ESPConnection;\n get baseUrl() { return this._connection.opts().baseUrl; }\n\n constructor(optsConnection: IOptions | IConnection, service: string, version: string) {\n this._connection = new ESPConnection(optsConnection, service, version);\n }\n}\n","import { IConnection, IOptions } from \"../connection\";\nimport { ESPConnection } from \"../espConnection\";\n\n/*\n Response structures generated via:\n * http://192.168.3.22:8010/Ws_Account/VerifyUser?respjson_\n * http://json2ts.com/\n*/\nexport namespace VerifyUser {\n\n export interface Request {\n application: string;\n version: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n retcode: number;\n }\n}\n\nexport class AccountService {\n private _connection: ESPConnection;\n\n constructor(optsConnection: IOptions | IConnection) {\n this._connection = new ESPConnection(optsConnection, \"Ws_Account\", \"1.03\");\n }\n\n connectionOptions(): IOptions {\n return this._connection.opts();\n }\n\n VerifyUser(request: VerifyUser.Request): Promise<VerifyUser.Response> {\n return this._connection.send(\"VerifyUser\", request);\n }\n}\n","import { IConnection, IOptions } from \"../connection\";\nimport { Service } from \"../espConnection\";\n\n/*\n Response structures generated via:\n * http://localhost:8010/WsDfu/?ver_=1.5&reqjson_\n * http://localhost:8010/WsDfu/?ver_=1.5&respjson_\n * http://json2ts.com/\n*/\n\nexport namespace WsDfu {\n export interface AddRequest {\n dstname: string;\n xmlmap: string;\n }\n\n export interface AddRemoteRequest {\n dstname: string;\n srcname: string;\n srcdali: string;\n srcusername: string;\n srcpassword: string;\n }\n\n export interface Names {\n Item: string[];\n }\n\n export interface AddtoSuperfileRequest {\n Superfile: string;\n Subfiles: string;\n names: Names;\n ExistingFile: boolean;\n BackToPage: string;\n }\n\n export interface LogicalFiles {\n Item: string[];\n }\n\n export interface DFUArrayActionRequest {\n Type: string;\n NoDelete: boolean;\n BackToPage: string;\n LogicalFiles: LogicalFiles;\n removeFromSuperfiles: boolean;\n removeRecursively: boolean;\n }\n\n export interface DFUBrowseDataRequest {\n LogicalName: string;\n FilterBy: string;\n ShowColumns: string;\n SchemaOnly: boolean;\n StartForGoback: number;\n CountForGoback: number;\n ChooseFile: number;\n Cluster: string;\n ClusterType: string;\n ParentName: string;\n Start: number;\n Count: number;\n DisableUppercaseTranslation: boolean;\n }\n\n export interface DFUDefFileRequest {\n Name: string;\n Format: string;\n }\n\n export interface RequestBase {\n Name: string;\n Cluster: string;\n JobId: string;\n ExpirySeconds: number;\n AccessRole: string;\n AccessType: string;\n ReturnJsonTypeInfo: boolean;\n ReturnBinTypeInfo: boolean;\n }\n\n export interface DFUFileAccessRequest {\n RequestBase: RequestBase;\n }\n\n export interface DFUFileAccessV2Request {\n Name: string;\n Cluster: string;\n RequestId: string;\n ExpirySeconds: number;\n ReturnTextResponse: boolean;\n }\n\n export interface PartLocations {\n Item: string[];\n }\n\n export interface RequestBase2 {\n Name: string;\n Cluster: string;\n JobId: string;\n ExpirySeconds: number;\n AccessRole: string;\n AccessType: string;\n ReturnJsonTypeInfo: boolean;\n ReturnBinTypeInfo: boolean;\n }\n\n export interface DFUFileCreateRequest {\n ECLRecordDefinition: string;\n PartLocations: PartLocations;\n RequestBase: RequestBase2;\n }\n\n export interface DFUFileCreateV2Request {\n Name: string;\n Cluster: string;\n Type: string;\n ECLRecordDefinition: string;\n RequestId: string;\n ExpirySeconds: number;\n ReturnTextResponse: boolean;\n Compressed: boolean;\n }\n\n export interface DFUFilePublishRequest {\n FileId: string;\n Overwrite: boolean;\n FileDescriptorBlob: string;\n ECLRecordDefinition: string;\n RecordCount: number;\n FileSize: number;\n }\n\n export interface DFUFileViewRequest {\n Scope: string;\n IncludeSuperOwner: boolean;\n }\n\n export interface DFUGetDataColumnsRequest {\n OpenLogicalName: string;\n LogicalName: string;\n FilterBy: string;\n ShowColumns: string;\n ChooseFile: number;\n Cluster: string;\n ClusterType: string;\n StartIndex: number;\n EndIndex: number;\n }\n\n export interface DFUGetFileMetaDataRequest {\n LogicalFileName: string;\n ClusterName: string;\n IncludeXmlSchema: boolean;\n AddHeaderInXmlSchema: boolean;\n IncludeXmlXPathSchema: boolean;\n AddHeaderInXmlXPathSchema: boolean;\n }\n\n export interface DFUInfoRequest {\n Name: string;\n Cluster: string;\n UpdateDescription?: boolean;\n QuerySet?: string;\n Query?: string;\n FileDesc?: string;\n IncludeJsonTypeInfo?: boolean;\n IncludeBinTypeInfo?: boolean;\n Protect?: string;\n }\n\n export interface DFUQueryRequest {\n Prefix?: string;\n NodeGroup?: string;\n ContentType?: string;\n LogicalName?: string;\n Owner?: string;\n StartDate?: string;\n EndDate?: string;\n FileType?: string;\n FileSizeFrom?: number;\n FileSizeTo?: number;\n FirstN?: number;\n PageSize?: number;\n PageStartFrom?: number;\n Sortby?: string;\n Descending?: boolean;\n OneLevelDirFileReturn?: boolean;\n CacheHint?: number;\n MaxNumberOfFiles?: number;\n IncludeSuperOwner?: boolean;\n }\n\n export interface DFURecordTypeInfoRequest {\n Name: string;\n IncludeJsonTypeInfo: boolean;\n IncludeBinTypeInfo: boolean;\n }\n\n export interface DFUSearchRequest {\n ShowExample: string;\n }\n\n export interface DFUSearchDataRequest {\n Cluster: string;\n ClusterType: string;\n OpenLogicalName: string;\n FilterBy: string;\n ShowColumns: string;\n ChooseFile: number;\n StartIndex: number;\n EndIndex: number;\n LogicalName: string;\n ParentName: string;\n StartForGoback: number;\n CountForGoback: number;\n Start: number;\n Count: number;\n File: string;\n Key: string;\n SchemaOnly: boolean;\n RoxieSelections: boolean;\n DisableUppercaseTranslation: boolean;\n SelectedKey: string;\n }\n\n export interface DFUSpaceRequest {\n CountBy: string;\n ScopeUnder: string;\n OwnerUnder: string;\n Interval: string;\n StartDate: string;\n EndDate: string;\n }\n\n export interface EclRecordTypeInfoRequest {\n Ecl: string;\n IncludeJsonTypeInfo: boolean;\n IncludeBinTypeInfo: boolean;\n }\n\n export interface EraseHistoryRequest {\n Name: string;\n }\n\n export interface ListHistoryRequest {\n Name: string;\n }\n\n export interface WsDfuPingRequest {\n }\n\n export interface SavexmlRequest {\n name: string;\n }\n\n export interface Subfiles {\n Item: string[];\n }\n\n export interface SuperfileActionRequest {\n action: string;\n superfile: string;\n subfiles: Subfiles;\n before: string;\n delete: boolean;\n removeSuperfile: boolean;\n }\n\n export interface SuperfileListRequest {\n superfile: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface AddResponse {\n Exceptions: Exceptions;\n }\n\n export interface AddRemoteResponse {\n Exceptions: Exceptions;\n }\n\n export interface SubfileNames {\n SubfileName: string[];\n }\n\n export interface AddtoSuperfileResponse {\n Exceptions: Exceptions;\n Subfiles: string;\n BackToPage: string;\n SubfileNames: SubfileNames;\n }\n\n export interface DFUActionInfo {\n FileName: string;\n NodeGroup: string;\n ActionResult: string;\n Failed: boolean;\n }\n\n export interface ActionResults {\n DFUActionInfo: DFUActionInfo[];\n }\n\n export interface DFUArrayActionResponse {\n Exceptions: Exceptions;\n BackToPage: string;\n RedirectTo: string;\n ActionResults: ActionResults;\n }\n\n export interface DataColumns {\n DFUDataColumn: any[];\n }\n\n export interface ColumnHidden {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns;\n }\n\n export interface ColumnsHidden {\n ColumnHidden: ColumnHidden[];\n }\n\n export interface DFUBrowseDataResponse {\n Exceptions: Exceptions;\n Name: string;\n LogicalName: string;\n FilterBy: string;\n FilterForGoBack: string;\n ColumnsHidden: ColumnsHidden;\n ColumnCount: number;\n StartForGoback: number;\n CountForGoback: number;\n ChooseFile: number;\n SchemaOnly: boolean;\n Cluster: string;\n ClusterType: string;\n ParentName: string;\n Start: number;\n Count: number;\n PageSize: number;\n Total: number;\n Result: string;\n MsgToDisplay: string;\n DisableUppercaseTranslation: boolean;\n }\n\n export interface DFUDefFileResponse {\n Exceptions: Exceptions;\n defFile: string;\n }\n\n export interface DFUPartLocation {\n LocationIndex: number;\n Host: string;\n }\n\n export interface FileLocations {\n DFUPartLocation: DFUPartLocation[];\n }\n\n export interface DFUFileCopy {\n CopyIndex: number;\n LocationIndex: number;\n Path: string;\n }\n\n export interface Copies {\n DFUFileCopy: DFUFileCopy[];\n }\n\n export interface DFUFilePart {\n PartIndex: number;\n Copies: Copies;\n }\n\n export interface FileParts {\n DFUFilePart: DFUFilePart[];\n }\n\n export interface AccessInfo {\n MetaInfoBlob: string;\n ExpiryTime: string;\n NumParts: number;\n FileLocations: FileLocations;\n FileParts: FileParts;\n RecordTypeInfoJson: string;\n fileAccessPort: number;\n fileAccessSSL: boolean;\n }\n\n export interface DFUFileAccessResponse {\n Exceptions: Exceptions;\n AccessInfo: AccessInfo;\n }\n\n export interface DFUPartLocation2 {\n LocationIndex: number;\n Host: string;\n }\n\n export interface FileLocations2 {\n DFUPartLocation: DFUPartLocation2[];\n }\n\n export interface DFUFileCopy2 {\n CopyIndex: number;\n LocationIndex: number;\n Path: string;\n }\n\n export interface Copies2 {\n DFUFileCopy: DFUFileCopy2[];\n }\n\n export interface DFUFilePart2 {\n PartIndex: number;\n Copies: Copies2;\n }\n\n export interface FileParts2 {\n DFUFilePart: DFUFilePart2[];\n }\n\n export interface AccessInfo2 {\n MetaInfoBlob: string;\n ExpiryTime: string;\n NumParts: number;\n FileLocations: FileLocations2;\n FileParts: FileParts2;\n RecordTypeInfoJson: string;\n fileAccessPort: number;\n fileAccessSSL: boolean;\n }\n\n export interface DFUFileCreateResponse {\n Exceptions: Exceptions;\n FileId: string;\n Warning: string;\n AccessInfo: AccessInfo2;\n }\n\n export interface DFUFilePublishResponse {\n Exceptions: Exceptions;\n }\n\n export interface DFULogicalFile {\n Prefix: string;\n NodeGroup: string;\n Directory: string;\n Description: string;\n Parts: string;\n Name: string;\n Owner: string;\n Totalsize: string;\n RecordCount: string;\n Modified: string;\n LongSize: string;\n LongRecordCount: string;\n isSuperfile: boolean;\n isDirectory: boolean;\n Replicate: boolean;\n IntSize: number;\n IntRecordCount: number;\n FromRoxieCluster: boolean;\n BrowseData: boolean;\n IsCompressed: boolean;\n ContentType: string;\n CompressedFileSize: number;\n SuperOwners: string;\n Persistent: boolean;\n IsProtected: boolean;\n KeyType: string;\n }\n\n export interface DFULogicalFiles {\n DFULogicalFile: DFULogicalFile[];\n }\n\n export interface DFUFileViewResponse {\n Exceptions: Exceptions;\n Scope: string;\n NumFiles: number;\n DFULogicalFiles: DFULogicalFiles;\n }\n\n export interface DataColumns2 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns2;\n }\n\n export interface DFUDataKeyedColumns1 {\n DFUDataColumn: DFUDataColumn[];\n }\n\n export interface DataColumns3 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn2 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns3;\n }\n\n export interface DFUDataKeyedColumns2 {\n DFUDataColumn: DFUDataColumn2[];\n }\n\n export interface DataColumns4 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn3 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns4;\n }\n\n export interface DFUDataKeyedColumns3 {\n DFUDataColumn: DFUDataColumn3[];\n }\n\n export interface DataColumns5 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn4 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns5;\n }\n\n export interface DFUDataKeyedColumns4 {\n DFUDataColumn: DFUDataColumn4[];\n }\n\n export interface DataColumns6 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn5 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns6;\n }\n\n export interface DFUDataKeyedColumns5 {\n DFUDataColumn: DFUDataColumn5[];\n }\n\n export interface DataColumns7 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn6 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns7;\n }\n\n export interface DFUDataKeyedColumns6 {\n DFUDataColumn: DFUDataColumn6[];\n }\n\n export interface DataColumns8 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn7 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns8;\n }\n\n export interface DFUDataKeyedColumns7 {\n DFUDataColumn: DFUDataColumn7[];\n }\n\n export interface DataColumns9 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn8 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns9;\n }\n\n export interface DFUDataKeyedColumns8 {\n DFUDataColumn: DFUDataColumn8[];\n }\n\n export interface DataColumns10 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn9 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns10;\n }\n\n export interface DFUDataKeyedColumns9 {\n DFUDataColumn: DFUDataColumn9[];\n }\n\n export interface DataColumns11 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn10 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns11;\n }\n\n export interface DFUDataKeyedColumns10 {\n DFUDataColumn: DFUDataColumn10[];\n }\n\n export interface DataColumns12 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn11 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns12;\n }\n\n export interface DFUDataKeyedColumns11 {\n DFUDataColumn: DFUDataColumn11[];\n }\n\n export interface DataColumns13 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn12 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns13;\n }\n\n export interface DFUDataKeyedColumns12 {\n DFUDataColumn: DFUDataColumn12[];\n }\n\n export interface DataColumns14 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn13 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns14;\n }\n\n export interface DFUDataKeyedColumns13 {\n DFUDataColumn: DFUDataColumn13[];\n }\n\n export interface DataColumns15 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn14 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns15;\n }\n\n export interface DFUDataKeyedColumns14 {\n DFUDataColumn: DFUDataColumn14[];\n }\n\n export interface DataColumns16 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn15 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns16;\n }\n\n export interface DFUDataKeyedColumns15 {\n DFUDataColumn: DFUDataColumn15[];\n }\n\n export interface DataColumns17 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn16 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns17;\n }\n\n export interface DFUDataKeyedColumns16 {\n DFUDataColumn: DFUDataColumn16[];\n }\n\n export interface DataColumns18 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn17 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns18;\n }\n\n export interface DFUDataKeyedColumns17 {\n DFUDataColumn: DFUDataColumn17[];\n }\n\n export interface DataColumns19 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn18 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns19;\n }\n\n export interface DFUDataKeyedColumns18 {\n DFUDataColumn: DFUDataColumn18[];\n }\n\n export interface DataColumns20 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn19 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns20;\n }\n\n export interface DFUDataKeyedColumns19 {\n DFUDataColumn: DFUDataColumn19[];\n }\n\n export interface DataColumns21 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn20 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns21;\n }\n\n export interface DFUDataKeyedColumns20 {\n DFUDataColumn: DFUDataColumn20[];\n }\n\n export interface DataColumns22 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn21 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns22;\n }\n\n export interface DFUDataNonKeyedColumns1 {\n DFUDataColumn: DFUDataColumn21[];\n }\n\n export interface DataColumns23 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn22 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns23;\n }\n\n export interface DFUDataNonKeyedColumns2 {\n DFUDataColumn: DFUDataColumn22[];\n }\n\n export interface DataColumns24 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn23 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns24;\n }\n\n export interface DFUDataNonKeyedColumns3 {\n DFUDataColumn: DFUDataColumn23[];\n }\n\n export interface DataColumns25 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn24 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns25;\n }\n\n export interface DFUDataNonKeyedColumns4 {\n DFUDataColumn: DFUDataColumn24[];\n }\n\n export interface DataColumns26 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn25 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns26;\n }\n\n export interface DFUDataNonKeyedColumns5 {\n DFUDataColumn: DFUDataColumn25[];\n }\n\n export interface DataColumns27 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn26 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns27;\n }\n\n export interface DFUDataNonKeyedColumns6 {\n DFUDataColumn: DFUDataColumn26[];\n }\n\n export interface DataColumns28 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn27 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns28;\n }\n\n export interface DFUDataNonKeyedColumns7 {\n DFUDataColumn: DFUDataColumn27[];\n }\n\n export interface DataColumns29 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn28 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns29;\n }\n\n export interface DFUDataNonKeyedColumns8 {\n DFUDataColumn: DFUDataColumn28[];\n }\n\n export interface DataColumns30 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn29 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns30;\n }\n\n export interface DFUDataNonKeyedColumns9 {\n DFUDataColumn: DFUDataColumn29[];\n }\n\n export interface DataColumns31 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn30 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns31;\n }\n\n export interface DFUDataNonKeyedColumns10 {\n DFUDataColumn: DFUDataColumn30[];\n }\n\n export interface DataColumns32 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn31 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns32;\n }\n\n export interface DFUDataNonKeyedColumns11 {\n DFUDataColumn: DFUDataColumn31[];\n }\n\n export interface DataColumns33 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn32 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns33;\n }\n\n export interface DFUDataNonKeyedColumns12 {\n DFUDataColumn: DFUDataColumn32[];\n }\n\n export interface DataColumns34 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn33 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns34;\n }\n\n export interface DFUDataNonKeyedColumns13 {\n DFUDataColumn: DFUDataColumn33[];\n }\n\n export interface DataColumns35 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn34 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns35;\n }\n\n export interface DFUDataNonKeyedColumns14 {\n DFUDataColumn: DFUDataColumn34[];\n }\n\n export interface DataColumns36 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn35 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns36;\n }\n\n export interface DFUDataNonKeyedColumns15 {\n DFUDataColumn: DFUDataColumn35[];\n }\n\n export interface DataColumns37 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn36 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns37;\n }\n\n export interface DFUDataNonKeyedColumns16 {\n DFUDataColumn: DFUDataColumn36[];\n }\n\n export interface DataColumns38 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn37 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns38;\n }\n\n export interface DFUDataNonKeyedColumns17 {\n DFUDataColumn: DFUDataColumn37[];\n }\n\n export interface DataColumns39 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn38 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns39;\n }\n\n export interface DFUDataNonKeyedColumns18 {\n DFUDataColumn: DFUDataColumn38[];\n }\n\n export interface DataColumns40 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn39 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns40;\n }\n\n export interface DFUDataNonKeyedColumns19 {\n DFUDataColumn: DFUDataColumn39[];\n }\n\n export interface DataColumns41 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn40 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns41;\n }\n\n export interface DFUDataNonKeyedColumns20 {\n DFUDataColumn: DFUDataColumn40[];\n }\n\n export interface DFUGetDataColumnsResponse {\n Exceptions: Exceptions;\n LogicalName: string;\n StartIndex: number;\n EndIndex: number;\n DFUDataKeyedColumns1: DFUDataKeyedColumns1;\n DFUDataKeyedColumns2: DFUDataKeyedColumns2;\n DFUDataKeyedColumns3: DFUDataKeyedColumns3;\n DFUDataKeyedColumns4: DFUDataKeyedColumns4;\n DFUDataKeyedColumns5: DFUDataKeyedColumns5;\n DFUDataKeyedColumns6: DFUDataKeyedColumns6;\n DFUDataKeyedColumns7: DFUDataKeyedColumns7;\n DFUDataKeyedColumns8: DFUDataKeyedColumns8;\n DFUDataKeyedColumns9: DFUDataKeyedColumns9;\n DFUDataKeyedColumns10: DFUDataKeyedColumns10;\n DFUDataKeyedColumns11: DFUDataKeyedColumns11;\n DFUDataKeyedColumns12: DFUDataKeyedColumns12;\n DFUDataKeyedColumns13: DFUDataKeyedColumns13;\n DFUDataKeyedColumns14: DFUDataKeyedColumns14;\n DFUDataKeyedColumns15: DFUDataKeyedColumns15;\n DFUDataKeyedColumns16: DFUDataKeyedColumns16;\n DFUDataKeyedColumns17: DFUDataKeyedColumns17;\n DFUDataKeyedColumns18: DFUDataKeyedColumns18;\n DFUDataKeyedColumns19: DFUDataKeyedColumns19;\n DFUDataKeyedColumns20: DFUDataKeyedColumns20;\n DFUDataNonKeyedColumns1: DFUDataNonKeyedColumns1;\n DFUDataNonKeyedColumns2: DFUDataNonKeyedColumns2;\n DFUDataNonKeyedColumns3: DFUDataNonKeyedColumns3;\n DFUDataNonKeyedColumns4: DFUDataNonKeyedColumns4;\n DFUDataNonKeyedColumns5: DFUDataNonKeyedColumns5;\n DFUDataNonKeyedColumns6: DFUDataNonKeyedColumns6;\n DFUDataNonKeyedColumns7: DFUDataNonKeyedColumns7;\n DFUDataNonKeyedColumns8: DFUDataNonKeyedColumns8;\n DFUDataNonKeyedColumns9: DFUDataNonKeyedColumns9;\n DFUDataNonKeyedColumns10: DFUDataNonKeyedColumns10;\n DFUDataNonKeyedColumns11: DFUDataNonKeyedColumns11;\n DFUDataNonKeyedColumns12: DFUDataNonKeyedColumns12;\n DFUDataNonKeyedColumns13: DFUDataNonKeyedColumns13;\n DFUDataNonKeyedColumns14: DFUDataNonKeyedColumns14;\n DFUDataNonKeyedColumns15: DFUDataNonKeyedColumns15;\n DFUDataNonKeyedColumns16: DFUDataNonKeyedColumns16;\n DFUDataNonKeyedColumns17: DFUDataNonKeyedColumns17;\n DFUDataNonKeyedColumns18: DFUDataNonKeyedColumns18;\n DFUDataNonKeyedColumns19: DFUDataNonKeyedColumns19;\n DFUDataNonKeyedColumns20: DFUDataNonKeyedColumns20;\n RowCount: number;\n ShowColumns: string;\n ChooseFile: number;\n Cluster: string;\n ClusterType: string;\n }\n\n export interface DataColumns43 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn41 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns43;\n }\n\n export interface DataColumns42 {\n DFUDataColumn: DFUDataColumn41[];\n }\n\n export interface DFUGetFileMetaDataResponse {\n Exceptions: Exceptions;\n TotalColumnCount: number;\n KeyedColumnCount: number;\n DataColumns: DataColumns42;\n XmlSchema: string;\n XmlXPathSchema: string;\n TotalResultRows: number;\n }\n\n export interface Stat {\n MinSkew: string;\n MaxSkew: string;\n MinSkewInt64: number;\n MaxSkewInt64: number;\n }\n\n export interface DFUPart {\n Id: number;\n Copy: number;\n Ip: string;\n Partsize: string;\n PartSizeInt64: number;\n }\n\n export interface DFUFileParts {\n DFUPart: DFUPart[];\n }\n\n export interface DFUFilePartsOnCluster {\n Cluster: string;\n BaseDir: string;\n ReplicateDir: string;\n Replicate: boolean;\n CanReplicate: boolean;\n DFUFileParts: DFUFileParts;\n }\n\n export interface DFUFilePartsOnClusters {\n DFUFilePartsOnCluster: DFUFilePartsOnCluster[];\n }\n\n export interface Subfiles {\n Item: string[];\n }\n\n export interface DFULogicalFile2 {\n Prefix: string;\n NodeGroup: string;\n Directory: string;\n Description: string;\n Parts: string;\n Name: string;\n Owner: string;\n Totalsize: string;\n RecordCount: string;\n Modified: string;\n LongSize: string;\n LongRecordCount: string;\n isSuperfile: boolean;\n isDirectory: boolean;\n Replicate: boolean;\n IntSize: number;\n IntRecordCount: number;\n FromRoxieCluster: boolean;\n BrowseData: boolean;\n IsCompressed: boolean;\n ContentType: string;\n CompressedFileSize: number;\n SuperOwners: string;\n Persistent: boolean;\n IsProtected: boolean;\n KeyType: string;\n }\n\n export interface Superfiles {\n DFULogicalFile: DFULogicalFile2[];\n }\n\n export interface DFUFileProtect {\n Owner: string;\n Count: number;\n Modified: string;\n }\n\n export interface ProtectList {\n DFUFileProtect: DFUFileProtect[];\n }\n\n export interface Graphs {\n ECLGraph: string[];\n }\n\n export interface FieldNames {\n Item: string[];\n }\n\n export interface Partition {\n FieldMask: number;\n FieldNames: FieldNames;\n }\n\n export interface FieldNames2 {\n Item: string[];\n }\n\n export interface DFUFileBloom {\n FieldMask: number;\n FieldNames: FieldNames2;\n Limit: number;\n Probability: string;\n }\n\n export interface Blooms {\n DFUFileBloom: DFUFileBloom[];\n }\n\n export interface FileDetail {\n Name: string;\n Filename: string;\n Prefix: string;\n NodeGroup: string;\n NumParts: number;\n Description: string;\n Dir: string;\n PathMask: string;\n Filesize: string;\n FileSizeInt64: number;\n RecordSize: string;\n RecordCount: string;\n RecordSizeInt64: number;\n RecordCountInt64: number;\n Wuid: string;\n Owner: string;\n JobName: string;\n Persistent: string;\n Format: string;\n MaxRecordSize: string;\n CsvSeparate: string;\n CsvQuote: string;\n CsvTerminate: string;\n CsvEscape: string;\n Modified: string;\n Ecl: string;\n Stat: Stat;\n DFUFilePartsOnClusters: DFUFilePartsOnClusters;\n isSuperfile: boolean;\n ShowFileContent: boolean;\n subfiles: Subfiles;\n Superfiles: Superfiles;\n ProtectList: ProtectList;\n FromRoxieCluster: boolean;\n Graphs: Graphs;\n UserPermission: string;\n ContentType: string;\n CompressedFileSize: number;\n PercentCompressed: string;\n IsCompressed: boolean;\n BrowseData: boolean;\n jsonInfo: string;\n binInfo: string;\n PackageID: string;\n Partition: Partition;\n Blooms: Blooms;\n ExpireDays: number;\n KeyType: string;\n }\n\n export interface DFUInfoResponse {\n Exceptions: Exceptions;\n FileDetail: FileDetail;\n }\n\n export interface DFULogicalFile3 {\n Prefix: string;\n NodeGroup: string;\n Directory: string;\n Description: string;\n Parts: string;\n Name: string;\n Owner: string;\n Totalsize: string;\n RecordCount: string;\n Modified: string;\n LongSize: string;\n LongRecordCount: string;\n isSuperfile: boolean;\n isDirectory: boolean;\n Replicate: boolean;\n IntSize: number;\n IntRecordCount: number;\n FromRoxieCluster: boolean;\n BrowseData: boolean;\n IsCompressed: boolean;\n ContentType: string;\n CompressedFileSize: number;\n SuperOwners: string;\n Persistent: boolean;\n IsProtected: boolean;\n KeyType: string;\n }\n\n export interface DFULogicalFiles2 {\n DFULogicalFile: DFULogicalFile3[];\n }\n\n export interface DFUQueryResponse {\n Exceptions: Exceptions;\n DFULogicalFiles: DFULogicalFiles2;\n Prefix: string;\n NodeGroup: string;\n LogicalName: string;\n Description: string;\n Owner: string;\n StartDate: string;\n EndDate: string;\n FileType: string;\n FileSizeFrom: number;\n FileSizeTo: number;\n FirstN: number;\n PageSize: number;\n PageStartFrom: number;\n LastPageFrom: number;\n PageEndAt: number;\n PrevPageFrom: number;\n NextPageFrom: number;\n NumFiles: number;\n Sortby: string;\n Descending: boolean;\n BasicQuery: string;\n ParametersForPaging: string;\n Filters: string;\n CacheHint: number;\n IsSubsetOfFiles: boolean;\n Warning: string;\n }\n\n export interface DFURecordTypeInfoResponse {\n jsonInfo: string;\n binInfo: string;\n }\n\n export interface ClusterNames {\n ClusterName: string[];\n }\n\n export interface FileTypes {\n FileType: string[];\n }\n\n export interface DFUSearchResponse {\n Exceptions: Exceptions;\n ShowExample: string;\n ClusterNames: ClusterNames;\n FileTypes: FileTypes;\n }\n\n export interface DataColumns44 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn42 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns44;\n }\n\n export interface DFUDataKeyedColumns110 {\n DFUDataColumn: DFUDataColumn42[];\n }\n\n export interface DataColumns45 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn43 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns45;\n }\n\n export interface DFUDataKeyedColumns22 {\n DFUDataColumn: DFUDataColumn43[];\n }\n\n export interface DataColumns46 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn44 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns46;\n }\n\n export interface DFUDataKeyedColumns32 {\n DFUDataColumn: DFUDataColumn44[];\n }\n\n export interface DataColumns47 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn45 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns47;\n }\n\n export interface DFUDataKeyedColumns42 {\n DFUDataColumn: DFUDataColumn45[];\n }\n\n export interface DataColumns48 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn46 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns48;\n }\n\n export interface DFUDataKeyedColumns52 {\n DFUDataColumn: DFUDataColumn46[];\n }\n\n export interface DataColumns49 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn47 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns49;\n }\n\n export interface DFUDataKeyedColumns62 {\n DFUDataColumn: DFUDataColumn47[];\n }\n\n export interface DataColumns50 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn48 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns50;\n }\n\n export interface DFUDataKeyedColumns72 {\n DFUDataColumn: DFUDataColumn48[];\n }\n\n export interface DataColumns51 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn49 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns51;\n }\n\n export interface DFUDataKeyedColumns82 {\n DFUDataColumn: DFUDataColumn49[];\n }\n\n export interface DataColumns52 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn50 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns52;\n }\n\n export interface DFUDataKeyedColumns92 {\n DFUDataColumn: DFUDataColumn50[];\n }\n\n export interface DataColumns53 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn51 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns53;\n }\n\n export interface DFUDataKeyedColumns102 {\n DFUDataColumn: DFUDataColumn51[];\n }\n\n export interface DataColumns54 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn52 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns54;\n }\n\n export interface DFUDataKeyedColumns112 {\n DFUDataColumn: DFUDataColumn52[];\n }\n\n export interface DataColumns55 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn53 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns55;\n }\n\n export interface DFUDataKeyedColumns122 {\n DFUDataColumn: DFUDataColumn53[];\n }\n\n export interface DataColumns56 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn54 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns56;\n }\n\n export interface DFUDataKeyedColumns132 {\n DFUDataColumn: DFUDataColumn54[];\n }\n\n export interface DataColumns57 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn55 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns57;\n }\n\n export interface DFUDataKeyedColumns142 {\n DFUDataColumn: DFUDataColumn55[];\n }\n\n export interface DataColumns58 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn56 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns58;\n }\n\n export interface DFUDataKeyedColumns152 {\n DFUDataColumn: DFUDataColumn56[];\n }\n\n export interface DataColumns59 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn57 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns59;\n }\n\n export interface DFUDataKeyedColumns162 {\n DFUDataColumn: DFUDataColumn57[];\n }\n\n export interface DataColumns60 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn58 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns60;\n }\n\n export interface DFUDataKeyedColumns172 {\n DFUDataColumn: DFUDataColumn58[];\n }\n\n export interface DataColumns61 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn59 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns61;\n }\n\n export interface DFUDataKeyedColumns182 {\n DFUDataColumn: DFUDataColumn59[];\n }\n\n export interface DataColumns62 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn60 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns62;\n }\n\n export interface DFUDataKeyedColumns192 {\n DFUDataColumn: DFUDataColumn60[];\n }\n\n export interface DataColumns63 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn61 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns63;\n }\n\n export interface DFUDataKeyedColumns202 {\n DFUDataColumn: DFUDataColumn61[];\n }\n\n export interface DataColumns64 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn62 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns64;\n }\n\n export interface DFUDataNonKeyedColumns110 {\n DFUDataColumn: DFUDataColumn62[];\n }\n\n export interface DataColumns65 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn63 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns65;\n }\n\n export interface DFUDataNonKeyedColumns22 {\n DFUDataColumn: DFUDataColumn63[];\n }\n\n export interface DataColumns66 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn64 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns66;\n }\n\n export interface DFUDataNonKeyedColumns32 {\n DFUDataColumn: DFUDataColumn64[];\n }\n\n export interface DataColumns67 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn65 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns67;\n }\n\n export interface DFUDataNonKeyedColumns42 {\n DFUDataColumn: DFUDataColumn65[];\n }\n\n export interface DataColumns68 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn66 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns68;\n }\n\n export interface DFUDataNonKeyedColumns52 {\n DFUDataColumn: DFUDataColumn66[];\n }\n\n export interface DataColumns69 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn67 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns69;\n }\n\n export interface DFUDataNonKeyedColumns62 {\n DFUDataColumn: DFUDataColumn67[];\n }\n\n export interface DataColumns70 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn68 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns70;\n }\n\n export interface DFUDataNonKeyedColumns72 {\n DFUDataColumn: DFUDataColumn68[];\n }\n\n export interface DataColumns71 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn69 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns71;\n }\n\n export interface DFUDataNonKeyedColumns82 {\n DFUDataColumn: DFUDataColumn69[];\n }\n\n export interface DataColumns72 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn70 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns72;\n }\n\n export interface DFUDataNonKeyedColumns92 {\n DFUDataColumn: DFUDataColumn70[];\n }\n\n export interface DataColumns73 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn71 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns73;\n }\n\n export interface DFUDataNonKeyedColumns102 {\n DFUDataColumn: DFUDataColumn71[];\n }\n\n export interface DataColumns74 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn72 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns74;\n }\n\n export interface DFUDataNonKeyedColumns112 {\n DFUDataColumn: DFUDataColumn72[];\n }\n\n export interface DataColumns75 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn73 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns75;\n }\n\n export interface DFUDataNonKeyedColumns122 {\n DFUDataColumn: DFUDataColumn73[];\n }\n\n export interface DataColumns76 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn74 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns76;\n }\n\n export interface DFUDataNonKeyedColumns132 {\n DFUDataColumn: DFUDataColumn74[];\n }\n\n export interface DataColumns77 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn75 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns77;\n }\n\n export interface DFUDataNonKeyedColumns142 {\n DFUDataColumn: DFUDataColumn75[];\n }\n\n export interface DataColumns78 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn76 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns78;\n }\n\n export interface DFUDataNonKeyedColumns152 {\n DFUDataColumn: DFUDataColumn76[];\n }\n\n export interface DataColumns79 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn77 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns79;\n }\n\n export interface DFUDataNonKeyedColumns162 {\n DFUDataColumn: DFUDataColumn77[];\n }\n\n export interface DataColumns80 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn78 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns80;\n }\n\n export interface DFUDataNonKeyedColumns172 {\n DFUDataColumn: DFUDataColumn78[];\n }\n\n export interface DataColumns81 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn79 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns81;\n }\n\n export interface DFUDataNonKeyedColumns182 {\n DFUDataColumn: DFUDataColumn79[];\n }\n\n export interface DataColumns82 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn80 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns82;\n }\n\n export interface DFUDataNonKeyedColumns192 {\n DFUDataColumn: DFUDataColumn80[];\n }\n\n export interface DataColumns83 {\n DFUDataColumn: any[];\n }\n\n export interface DFUDataColumn81 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns83;\n }\n\n export interface DFUDataNonKeyedColumns202 {\n DFUDataColumn: DFUDataColumn81[];\n }\n\n export interface DataColumns84 {\n DFUDataColumn: any[];\n }\n\n export interface ColumnHidden2 {\n ColumnID: number;\n ColumnLabel: string;\n ColumnType: string;\n ColumnValue: string;\n ColumnSize: number;\n MaxSize: number;\n ColumnEclType: string;\n ColumnRawSize: number;\n IsNaturalColumn: boolean;\n IsKeyedColumn: boolean;\n DataColumns: DataColumns84;\n }\n\n export interface ColumnsHidden2 {\n ColumnHidden: ColumnHidden2[];\n }\n\n export interface DFUSearchDataResponse {\n Exceptions: Exceptions;\n OpenLogicalName: string;\n LogicalName: string;\n ParentName: string;\n StartIndex: number;\n EndIndex: number;\n DFUDataKeyedColumns1: DFUDataKeyedColumns110;\n DFUDataKeyedColumns2: DFUDataKeyedColumns22;\n DFUDataKeyedColumns3: DFUDataKeyedColumns32;\n DFUDataKeyedColumns4: DFUDataKeyedColumns42;\n DFUDataKeyedColumns5: DFUDataKeyedColumns52;\n DFUDataKeyedColumns6: DFUDataKeyedColumns62;\n DFUDataKeyedColumns7: DFUDataKeyedColumns72;\n DFUDataKeyedColumns8: DFUDataKeyedColumns82;\n DFUDataKeyedColumns9: DFUDataKeyedColumns92;\n DFUDataKeyedColumns10: DFUDataKeyedColumns102;\n DFUDataKeyedColumns11: DFUDataKeyedColumns112;\n DFUDataKeyedColumns12: DFUDataKeyedColumns122;\n DFUDataKeyedColumns13: DFUDataKeyedColumns132;\n DFUDataKeyedColumns14: DFUDataKeyedColumns142;\n DFUDataKeyedColumns15: DFUDataKeyedColumns152;\n DFUDataKeyedColumns16: DFUDataKeyedColumns162;\n DFUDataKeyedColumns17: DFUDataKeyedColumns172;\n DFUDataKeyedColumns18: DFUDataKeyedColumns182;\n DFUDataKeyedColumns19: DFUDataKeyedColumns192;\n DFUDataKeyedColumns20: DFUDataKeyedColumns202;\n DFUDataNonKeyedColumns1: DFUDataNonKeyedColumns110;\n DFUDataNonKeyedColumns2: DFUDataNonKeyedColumns22;\n DFUDataNonKeyedColumns3: DFUDataNonKeyedColumns32;\n DFUDataNonKeyedColumns4: DFUDataNonKeyedColumns42;\n DFUDataNonKeyedColumns5: DFUDataNonKeyedColumns52;\n DFUDataNonKeyedColumns6: DFUDataNonKeyedColumns62;\n DFUDataNonKeyedColumns7: DFUDataNonKeyedColumns72;\n DFUDataNonKeyedColumns8: DFUDataNonKeyedColumns82;\n DFUDataNonKeyedColumns9: DFUDataNonKeyedColumns92;\n DFUDataNonKeyedColumns10: DFUDataNonKeyedColumns102;\n DFUDataNonKeyedColumns11: DFUDataNonKeyedColumns112;\n DFUDataNonKeyedColumns12: DFUDataNonKeyedColumns122;\n DFUDataNonKeyedColumns13: DFUDataNonKeyedColumns132;\n DFUDataNonKeyedColumns14: DFUDataNonKeyedColumns142;\n DFUDataNonKeyedColumns15: DFUDataNonKeyedColumns152;\n DFUDataNonKeyedColumns16: DFUDataNonKeyedColumns162;\n DFUDataNonKeyedColumns17: DFUDataNonKeyedColumns172;\n DFUDataNonKeyedColumns18: DFUDataNonKeyedColumns182;\n DFUDataNonKeyedColumns19: DFUDataNonKeyedColumns192;\n DFUDataNonKeyedColumns20: DFUDataNonKeyedColumns202;\n RowCount: number;\n ShowColumns: string;\n ChooseFile: number;\n Name: string;\n FilterBy: string;\n FilterForGoBack: string;\n ColumnsHidden: ColumnsHidden2;\n ColumnCount: number;\n StartForGoback: number;\n CountForGoback: number;\n Start: number;\n Count: number;\n PageSize: number;\n Total: number;\n Result: string;\n MsgToDisplay: string;\n Cluster: string;\n ClusterType: string;\n File: string;\n Key: string;\n SchemaOnly: boolean;\n RoxieSelections: boolean;\n DisableUppercaseTranslation: boolean;\n AutoUppercaseTranslation: boolean;\n SelectedKey: string;\n }\n\n export interface DFUSpaceItem {\n Name: string;\n NumOfFiles: string;\n NumOfFilesUnknown: string;\n TotalSize: string;\n LargestFile: string;\n LargestSize: string;\n SmallestFile: string;\n SmallestSize: string;\n NumOfFilesInt64: number;\n NumOfFilesUnknownInt64: number;\n TotalSizeInt64: number;\n LargestSizeInt64: number;\n SmallestSizeInt64: number;\n }\n\n export interface DFUSpaceItems {\n DFUSpaceItem: DFUSpaceItem[];\n }\n\n export interface DFUSpaceResponse {\n Exceptions: Exceptions;\n CountBy: string;\n ScopeUnder: string;\n OwnerUnder: string;\n Interval: string;\n StartDate: string;\n EndDate: string;\n DFUSpaceItems: DFUSpaceItems;\n }\n\n export interface EclRecordTypeInfoResponse {\n jsonInfo: string;\n binInfo: string;\n }\n\n export interface Origin {\n Name: string;\n Operation: string;\n Timestamp: string;\n IP: string;\n Path: string;\n Owner: string;\n Workunit: string;\n }\n\n export interface History {\n Origin: Origin[];\n }\n\n export interface EraseHistoryResponse {\n Exceptions: Exceptions;\n History: History;\n }\n\n export interface Origin2 {\n Name: string;\n Operation: string;\n Timestamp: string;\n IP: string;\n Path: string;\n Owner: string;\n Workunit: string;\n }\n\n export interface History2 {\n Origin: Origin2[];\n }\n\n export interface ListHistoryResponse {\n Exceptions: Exceptions;\n History: History2;\n }\n\n export interface WsDfuPingResponse {\n }\n\n export interface SavexmlResponse {\n Exceptions: Exceptions;\n xmlmap: string;\n }\n\n export interface SuperfileActionResponse {\n Exceptions: Exceptions;\n superfile: string;\n retcode: number;\n }\n\n export interface Subfiles2 {\n Item: string[];\n }\n\n export interface SuperfileListResponse {\n Exceptions: Exceptions;\n superfile: string;\n subfiles: Subfiles2;\n }\n}\n\nexport class DFUService extends Service {\n\n constructor(optsConnection: IOptions | IConnection) {\n super(optsConnection, \"WsDfu\", \"1.5\");\n }\n\n DFUQuery(request: WsDfu.DFUQueryRequest): Promise<WsDfu.DFUQueryResponse> {\n return this._connection.send(\"DFUQuery\", request);\n }\n\n DFUInfo(request: WsDfu.DFUInfoRequest): Promise<WsDfu.DFUInfoResponse> {\n return this._connection.send(\"DFUInfo\", request);\n }\n}\n","import { DDL2 } from \"@hpcc-js/ddl-shim\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { ESPExceptions, Service } from \"../espConnection\";\n\nexport type IFieldType = DDL2.IFieldType;\nexport type IField = DDL2.IField;\n\nexport type IWsEclRequest = IField[];\nexport type IWsEclResult = IField[];\nexport type IWsEclResponse = { [id: string]: IField[] };\n\nfunction jsonToIField(id: string, item: any): IField {\n const type = typeof item;\n switch (type) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n return { id, type };\n case \"object\":\n if (item.Row instanceof Array) {\n item = item.Row;\n }\n if (item instanceof Array) {\n return {\n id,\n type: \"dataset\",\n children: jsonToIFieldArr(item[0])\n };\n } else if (item instanceof Object) {\n if (item.Item && item.Item instanceof Array && item.Item.length === 1) {\n const fieldType = typeof item.Item[0];\n if (fieldType === \"string\" || fieldType === \"number\") {\n return {\n id,\n type: \"set\",\n fieldType\n };\n }\n throw new Error(\"Unknown field type\");\n }\n return {\n id,\n type: \"object\",\n fields: jsonToIFieldObj(item)\n };\n }\n // Fall through ---\n default:\n throw new Error(\"Unknown field type\");\n }\n}\n\nfunction jsonToIFieldArr(json: any): IField[] {\n if (json.Row && json.Row instanceof Array) {\n json = json.Row[0];\n }\n const retVal: IField[] = [];\n for (const key in json) {\n retVal.push(jsonToIField(key, json[key]));\n }\n return retVal;\n}\n\nfunction jsonToIFieldObj(json: any): { [id: string]: IField } {\n const fields = {};\n for (const key in json) {\n fields[key] = jsonToIField(key, json[key]);\n }\n return fields;\n}\n\nexport class EclService extends Service {\n\n constructor(optsConnection: IOptions | IConnection) {\n super(optsConnection, \"WsEcl\", \"0\");\n }\n\n opts() {\n return this._connection.opts();\n }\n\n requestJson(querySet: string, queryId: string): Promise<IWsEclRequest> {\n // http://192.168.3.22:8002/WsEcl/example/request/query/roxie/peopleaccounts/json?display\n return this._connection.send(`example/request/query/${querySet}/${queryId}/json`, {}, \"text\").then(response => {\n const requestSchema = JSON.parse(response);\n for (const key in requestSchema) {\n return requestSchema[key];\n }\n return {};\n }).then(jsonToIFieldArr);\n }\n\n responseJson(querySet: string, queryId: string): Promise<IWsEclResponse> {\n // http://192.168.3.22:8002/WsEcl/example/response/query/roxie/peopleaccounts/json?display\n return this._connection.send(`example/response/query/${querySet}/${queryId}/json`, {}, \"text\").then(response => {\n const responseSchema = JSON.parse(response);\n for (const key in responseSchema) {\n return responseSchema[key].Results;\n }\n return {};\n }).then(resultsJson => {\n const retVal: IWsEclResponse = {};\n for (const key in resultsJson) {\n retVal[key] = jsonToIFieldArr(resultsJson[key]);\n }\n return retVal;\n });\n }\n\n submit(querySet: string, queryId: string, request: object) {\n // http://192.168.3.22:8002/WsEcl/submit/query/roxie/peopleaccounts.1/json\n const action = `submit/query/${querySet}/${queryId}`;\n return this._connection.send(action, request, \"json2\").then(response => {\n if (response.Results && response.Results.Exception) {\n throw new ESPExceptions(action, request, {\n Source: \"wsEcl.submit\",\n Exception: response.Results.Exception\n });\n }\n return response.Results;\n });\n }\n}\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending\";\n\nexport default function(compare) {\n if (compare.length === 1) compare = ascendingComparator(compare);\n return {\n left: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n },\n right: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n };\n}\n\nfunction ascendingComparator(f) {\n return function(d, x) {\n return ascending(f(d), x);\n };\n}\n","import ascending from \"./ascending\";\nimport bisector from \"./bisector\";\n\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n","export default function(values, valueof) {\n var n = values.length,\n i = -1,\n value,\n max;\n\n if (valueof == null) {\n while (++i < n) { // Find the first comparable value.\n if ((value = values[i]) != null && value >= value) {\n max = value;\n while (++i < n) { // Compare the remaining values.\n if ((value = values[i]) != null && value > max) {\n max = value;\n }\n }\n }\n }\n }\n\n else {\n while (++i < n) { // Find the first comparable value.\n if ((value = valueof(values[i], i, values)) != null && value >= value) {\n max = value;\n while (++i < n) { // Compare the remaining values.\n if ((value = valueof(values[i], i, values)) != null && value > max) {\n max = value;\n }\n }\n }\n }\n }\n\n return max;\n}\n","import number from \"./number\";\n\nexport default function(values, valueof) {\n var n = values.length,\n m = n,\n i = -1,\n value,\n sum = 0;\n\n if (valueof == null) {\n while (++i < n) {\n if (!isNaN(value = number(values[i]))) sum += value;\n else --m;\n }\n }\n\n else {\n while (++i < n) {\n if (!isNaN(value = number(valueof(values[i], i, values)))) sum += value;\n else --m;\n }\n }\n\n if (m) return sum / m;\n}\n","import { exists } from \"@hpcc-js/util\";\nimport { max as d3Max, mean as d3Mean } from \"d3-array\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { ESPConnection } from \"../espConnection\";\n\n/*\n Response structures generated via:\n * http://192.168.3.22:8010/ws_machine/GetTargetClusterInfo?respjson_\n * http://json2ts.com/\n*/\n\nexport namespace GetTargetClusterInfo {\n\n export interface TargetClusters {\n Item: string[];\n }\n\n export interface Request {\n TargetClusters?: TargetClusters;\n AddProcessesToFilter?: string;\n ApplyProcessFilter?: boolean;\n GetProcessorInfo?: boolean;\n GetStorageInfo?: boolean;\n LocalFileSystemsOnly?: boolean;\n GetSoftwareInfo?: boolean;\n MemThreshold?: number;\n DiskThreshold?: number;\n CpuThreshold?: number;\n AutoRefresh?: number;\n MemThresholdType?: string;\n DiskThresholdType?: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Columns {\n Item: string[];\n }\n\n export interface Addresses {\n Item: string[];\n }\n\n export interface RequestInfo {\n Addresses: Addresses;\n ClusterType: string;\n Cluster: string;\n OldIP: string;\n Path: string;\n AddProcessesToFilter: string;\n ApplyProcessFilter: boolean;\n GetProcessorInfo: boolean;\n GetStorageInfo: boolean;\n LocalFileSystemsOnly: boolean;\n GetSoftwareInfo: boolean;\n MemThreshold: number;\n DiskThreshold: number;\n CpuThreshold: number;\n AutoRefresh: number;\n MemThresholdType: string;\n DiskThresholdType: string;\n SecurityString: string;\n UserName: string;\n Password: string;\n EnableSNMP: boolean;\n }\n\n export interface ProcessorInfo {\n Type: string;\n Load: number;\n }\n\n export interface Processors {\n ProcessorInfo: ProcessorInfo[];\n }\n\n export interface StorageInfo {\n Description: string;\n Type: string;\n Available: number;\n PercentAvail: number;\n Total: number;\n Failures: number;\n }\n\n export interface Storage {\n StorageInfo: StorageInfo[];\n }\n\n export interface SWRunInfo {\n Name: string;\n Instances: number;\n State: number;\n }\n\n export interface Running {\n SWRunInfo: SWRunInfo[];\n }\n\n export interface PhysicalMemory {\n Description: string;\n Type: string;\n Available: number;\n PercentAvail: number;\n Total: number;\n Failures: number;\n }\n\n export interface VirtualMemory {\n Description: string;\n Type: string;\n Available: number;\n PercentAvail: number;\n Total: number;\n Failures: number;\n }\n\n export interface ComponentInfo {\n Condition: number;\n State: number;\n UpTime: string;\n }\n\n export interface MachineInfoEx {\n Address: string;\n ConfigAddress: string;\n Name: string;\n ProcessType: string;\n DisplayType: string;\n Description: string;\n AgentVersion: string;\n Contact: string;\n Location: string;\n UpTime: string;\n ComponentName: string;\n ComponentPath: string;\n RoxieState: string;\n RoxieStateDetails: string;\n OS: number;\n ProcessNumber: number;\n Processors: Processors;\n Storage: Storage;\n Running: Running;\n PhysicalMemory: PhysicalMemory;\n VirtualMemory: VirtualMemory;\n ComponentInfo: ComponentInfo;\n }\n\n export interface Processes {\n MachineInfoEx: MachineInfoEx[];\n }\n\n export interface TargetClusterInfo {\n Name: string;\n Type: string;\n Processes: Processes;\n }\n\n export interface TargetClusterInfoList {\n TargetClusterInfo: TargetClusterInfo[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Columns: Columns;\n RequestInfo: RequestInfo;\n TargetClusterInfoList: TargetClusterInfoList;\n TimeStamp: string;\n AcceptLanguage: string;\n }\n}\n\nexport namespace GetTargetClusterUsage {\n\n export interface TargetClusters {\n Item: string[];\n }\n\n export interface Request {\n TargetClusters?: TargetClusters;\n BypassCachedResult: boolean;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface DiskUsage {\n Name: string;\n Path: string;\n Description: string;\n InUse: number;\n Available: number;\n PercentAvailable: number;\n }\n\n export interface DiskUsages {\n DiskUsage: DiskUsage[];\n }\n\n export interface MachineUsage {\n Name: string;\n NetAddress: string;\n Description: string;\n DiskUsages: DiskUsages;\n }\n\n export interface MachineUsages {\n MachineUsage: MachineUsage[];\n }\n\n export interface ComponentUsage {\n Type: string;\n Name: string;\n Description: string;\n MachineUsages: MachineUsages;\n }\n\n export interface ComponentUsages {\n ComponentUsage: ComponentUsage[];\n }\n\n export interface TargetClusterUsage {\n Name: string;\n Description: string;\n ComponentUsages: ComponentUsages;\n }\n\n export interface TargetClusterUsages {\n TargetClusterUsage: TargetClusterUsage[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n TargetClusterUsages: TargetClusterUsages;\n }\n}\n\nexport namespace GetTargetClusterUsageEx {\n\n export interface DiskUsage {\n Name: string;\n Path: string;\n Description: string;\n InUse: number;\n Available: number;\n Total: number;\n PercentAvailable: number;\n PercentUsed: number;\n }\n\n export interface MachineUsage {\n Name: string;\n NetAddress: string;\n Description: string;\n DiskUsages: DiskUsage[];\n mean: number;\n max: number;\n }\n\n export interface ComponentUsage {\n Type: string;\n Name: string;\n Description: string;\n MachineUsages: MachineUsage[];\n MachineUsagesDescription: string;\n mean: number;\n max: number;\n }\n\n export interface TargetClusterUsage {\n Name: string;\n Description: string;\n ComponentUsages: ComponentUsage[];\n ComponentUsagesDescription: string;\n mean: number;\n max: number;\n }\n}\n\nexport class MachineService {\n private _connection: ESPConnection;\n\n constructor(optsConnection: IOptions | IConnection) {\n this._connection = new ESPConnection(optsConnection, \"ws_machine\", \"1.13\");\n }\n\n GetTargetClusterInfo(request: GetTargetClusterInfo.Request = {}): Promise<GetTargetClusterInfo.Response> {\n return this._connection.send(\"GetTargetClusterInfo\", request);\n }\n\n GetTargetClusterUsage(targetClusters?: string[], bypassCachedResult: boolean = false): Promise<GetTargetClusterUsage.TargetClusterUsage[]> {\n return this._connection.send(\"GetTargetClusterUsage\", {\n TargetClusters: targetClusters ? { Item: targetClusters } : {},\n BypassCachedResult: bypassCachedResult\n }).then(response => {\n return exists(\"TargetClusterUsages.TargetClusterUsage\", response) ? response.TargetClusterUsages.TargetClusterUsage : [];\n });\n }\n\n GetTargetClusterUsageEx(targetClusters?: string[], bypassCachedResult: boolean = false): Promise<GetTargetClusterUsageEx.TargetClusterUsage[]> {\n return this.GetTargetClusterUsage(targetClusters, bypassCachedResult).then(response => {\n return response.filter(tcu => !!tcu.ComponentUsages).map(tcu => {\n const ComponentUsages: GetTargetClusterUsageEx.ComponentUsage[] = tcu.ComponentUsages.ComponentUsage.map(cu => {\n const MachineUsages = (cu.MachineUsages && cu.MachineUsages.MachineUsage ? cu.MachineUsages.MachineUsage : []).map(mu => {\n const DiskUsages: GetTargetClusterUsageEx.DiskUsage[] = mu.DiskUsages && mu.DiskUsages.DiskUsage ? mu.DiskUsages.DiskUsage.map(du => {\n return {\n ...du,\n Total: du.InUse + du.Available,\n PercentUsed: 100 - du.PercentAvailable\n };\n }) : [];\n return {\n Name: mu.Name,\n NetAddress: mu.NetAddress,\n Description: mu.Description,\n DiskUsages,\n mean: d3Mean(DiskUsages.filter(du => !isNaN(du.PercentUsed)), du => du.PercentUsed),\n max: d3Max(DiskUsages.filter(du => !isNaN(du.PercentUsed)), du => du.PercentUsed)\n };\n });\n return {\n Type: cu.Type,\n Name: cu.Name,\n Description: cu.Description,\n MachineUsages,\n MachineUsagesDescription: MachineUsages.reduce((prev, mu) => prev + (mu.Description || \"\"), \"\"),\n mean: d3Mean(MachineUsages.filter(mu => !isNaN(mu.mean)), mu => mu.mean),\n max: d3Max(MachineUsages.filter(mu => !isNaN(mu.max)), mu => mu.max)\n };\n });\n return {\n Name: tcu.Name,\n Description: tcu.Description,\n ComponentUsages,\n ComponentUsagesDescription: ComponentUsages.reduce((prev, cu) => prev + (cu.MachineUsagesDescription || \"\"), \"\"),\n mean: d3Mean(ComponentUsages.filter(cu => !isNaN(cu.mean)), cu => cu.mean),\n max: d3Max(ComponentUsages.filter(cu => !isNaN(cu.max)), cu => cu.max)\n };\n });\n });\n }\n}\n","import { IConnection, IOptions } from \"../connection\";\nimport { ESPConnection } from \"../espConnection\";\n\n/*\n Response structures generated via:\n * http://192.168.3.22:8010/WsSMC/Activity?respjson_\n * http://json2ts.com/\n*/\n\nexport namespace SMCActivity {\n export interface Request {\n ChatURL?: string;\n BannerContent?: string;\n BannerColor?: string;\n BannerSize?: string;\n BannerScroll?: string;\n BannerAction?: string;\n EnableChatURL?: boolean;\n FromSubmitBtn?: boolean;\n SortBy?: string;\n Descending?: boolean;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface TargetCluster {\n ClusterName: string;\n QueueName: string;\n QueueStatus: string;\n StatusDetails: string;\n Warning: string;\n ClusterType: number;\n ClusterSize: number;\n ClusterStatus: number;\n }\n\n export interface ThorClusterList {\n TargetCluster: TargetCluster[];\n }\n\n export interface TargetCluster2 {\n ClusterName: string;\n QueueName: string;\n QueueStatus: string;\n StatusDetails: string;\n Warning: string;\n ClusterType: number;\n ClusterSize: number;\n ClusterStatus: number;\n }\n\n export interface RoxieClusterList {\n TargetCluster: TargetCluster2[];\n }\n\n export interface TargetCluster3 {\n ClusterName: string;\n QueueName: string;\n QueueStatus: string;\n StatusDetails: string;\n Warning: string;\n ClusterType: number;\n ClusterSize: number;\n ClusterStatus: number;\n }\n\n export interface HThorClusterList {\n TargetCluster: TargetCluster3[];\n }\n\n export interface DFUJob {\n TimeStarted: string;\n Done: number;\n Total: number;\n Command: string;\n }\n\n export interface DFUJobs {\n DFUJob: DFUJob[];\n }\n\n export interface ActiveWorkunit {\n Wuid: string;\n State: string;\n StateID: number;\n Owner: string;\n Jobname: string;\n Server: string;\n Instance: string;\n Priority: string;\n Extra: string;\n GraphName: string;\n Duration: string;\n GID: string;\n QueueName: string;\n MemoryBlocked: number;\n IsPausing: boolean;\n Warning: string;\n ClusterName: string;\n ClusterType: string;\n ClusterQueueName: string;\n TargetClusterName: string;\n }\n\n export interface Running {\n ActiveWorkunit: ActiveWorkunit[];\n }\n\n export interface ServerJobQueue {\n QueueName: string;\n ServerName: string;\n ServerType: string;\n QueueStatus: string;\n StatusDetails: string;\n NetworkAddress: string;\n Port: number;\n }\n\n export interface ServerJobQueues {\n ServerJobQueue: ServerJobQueue[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Build: string;\n ThorClusterList: ThorClusterList;\n RoxieClusterList: RoxieClusterList;\n HThorClusterList: HThorClusterList;\n DFUJobs: DFUJobs;\n Running: Running;\n BannerContent: string;\n BannerColor: string;\n BannerSize: string;\n BannerScroll: string;\n ChatURL: string;\n ShowBanner: number;\n ShowChatURL: number;\n SortBy: string;\n Descending: boolean;\n SuperUser: boolean;\n AccessRight: string;\n ServerJobQueues: ServerJobQueues;\n }\n}\n\nexport class SMCService {\n private _connection: ESPConnection;\n\n constructor(optsConnection: IOptions | IConnection) {\n this._connection = new ESPConnection(optsConnection, \"WsSMC\", \"1.19\");\n }\n\n connectionOptions(): IOptions {\n return this._connection.opts();\n }\n\n Activity(request: SMCActivity.Request): Promise<SMCActivity.Response> {\n return this._connection.send(\"Activity\", request).then(response => {\n return {\n Running: {\n ActiveWorkunit: []\n },\n ...response\n };\n });\n }\n}\n","import { IConnection, IOptions } from \"../connection\";\nimport { Service } from \"../espConnection\";\n\n/*\n Response structures generated via:\n * http://localhost:8010/wsstore/Fetch?reqjson_\n * http://localhost:8010/wsstore/Fetch?respjson_\n * http://json2ts.com/\n*/\n\nexport namespace WsStore {\n\n export interface CreateStoreRequest {\n Name: string;\n Type: string;\n Description: string;\n UserSpecific: boolean;\n }\n\n export interface DeleteRequest {\n StoreName: string;\n Namespace: string;\n Key: string;\n UserSpecific: boolean;\n TargetUser?: string;\n }\n\n export interface DeleteNamespaceRequest {\n StoreName: string;\n Namespace: string;\n UserSpecific: boolean;\n TargetUser: string;\n }\n\n export interface FetchRequest {\n StoreName: string;\n Namespace: string;\n Key: string;\n UserSpecific: boolean;\n }\n\n export interface FetchAllRequest {\n StoreName: string;\n Namespace: string;\n UserSpecific: boolean;\n }\n\n export interface FetchKeyMDRequest {\n StoreName: string;\n Namespace: string;\n Key: string;\n UserSpecific: boolean;\n }\n\n export interface ListKeysRequest {\n StoreName: string;\n Namespace: string;\n UserSpecific: boolean;\n }\n\n export interface ListNamespacesRequest {\n StoreName: string;\n UserSpecific: boolean;\n }\n\n export interface SetRequest {\n StoreName: string;\n Namespace: string;\n Key: string;\n Value: string;\n UserSpecific: boolean;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface CreateStoreResponse {\n Exceptions: Exceptions;\n Name: string;\n Type: string;\n Description: string;\n Owner: string;\n }\n\n export interface DeleteResponse {\n Exceptions: Exceptions;\n Success: boolean;\n }\n\n export interface DeleteNamespaceResponse {\n Exceptions: Exceptions;\n Success: boolean;\n }\n\n export interface FetchResponse {\n Exceptions: Exceptions;\n Value: string;\n }\n\n export interface Pair {\n Key: string;\n Value: string;\n }\n\n export interface Pairs {\n Pair: Pair[];\n }\n\n export interface FetchAllResponse {\n Exceptions: Exceptions;\n Namespace: string;\n Pairs: Pairs;\n }\n\n export interface Pair2 {\n Key: string;\n Value: string;\n }\n\n export interface Pairs2 {\n Pair: Pair2[];\n }\n\n export interface FetchKeyMDResponse {\n Exceptions: Exceptions;\n StoreName: string;\n Namespace: string;\n Key: string;\n Pairs: Pairs2;\n }\n\n export interface KeySet {\n Key: string[];\n }\n\n export interface ListKeysResponse {\n Exceptions: Exceptions;\n StoreName: string;\n Namespace: string;\n KeySet: KeySet;\n }\n\n export interface Namespaces {\n Namespace: string[];\n }\n\n export interface ListNamespacesResponse {\n Exceptions: Exceptions;\n StoreName: string;\n Namespaces: Namespaces;\n }\n\n export interface WsstorePingResponse {\n }\n\n export interface SetResponse {\n Exceptions: Exceptions;\n Success: boolean;\n }\n}\n\nexport class StoreService extends Service {\n\n constructor(optsConnection: IOptions | IConnection) {\n super(optsConnection, \"WsStore\", \"1\");\n }\n\n CreateStore(request: WsStore.CreateStoreRequest): Promise<WsStore.CreateStoreResponse> {\n return this._connection.send(\"Fetch\", request);\n }\n\n Delete(request: WsStore.DeleteRequest): Promise<WsStore.DeleteResponse> {\n return this._connection.send(\"Delete\", request).catch(e => {\n if (e.isESPExceptions && e.Exception.some(e => e.Code === -1)) {\n // \"Delete\" item does not exist ---\n return {\n Exceptions: undefined,\n Success: true\n } as WsStore.DeleteResponse;\n }\n throw e;\n });\n }\n\n DeleteNamespace(request: WsStore.DeleteNamespaceRequest): Promise<WsStore.DeleteNamespaceResponse> {\n return this._connection.send(\"DeleteNamespace\", request);\n }\n\n Fetch(request: WsStore.FetchRequest): Promise<WsStore.FetchResponse> {\n return this._connection.send(\"Fetch\", request).catch(e => {\n if (e.isESPExceptions && e.Exception.some(e => e.Code === -1)) {\n // \"Fetch\" item does not exist ---\n return {\n Exceptions: undefined,\n Value: undefined\n } as WsStore.FetchResponse;\n }\n throw e;\n });\n }\n\n FetchAll(request: WsStore.FetchAllRequest): Promise<WsStore.FetchAllResponse> {\n return this._connection.send(\"FetchAll\", request);\n }\n\n FetchKeyMD(request: WsStore.FetchKeyMDRequest): Promise<WsStore.FetchKeyMDResponse> {\n return this._connection.send(\"FetchKeyMD\", request);\n }\n\n ListKeys(request: WsStore.ListKeysRequest): Promise<WsStore.ListKeysResponse> {\n return this._connection.send(\"ListKeys\", request);\n }\n\n ListNamespaces(request: WsStore.ListNamespacesRequest): Promise<WsStore.ListNamespacesResponse> {\n return this._connection.send(\"ListNamespaces\", request);\n }\n\n Set(request: WsStore.SetRequest): Promise<WsStore.SetResponse> {\n return this._connection.send(\"Set\", request);\n }\n}\n","import { IConnection, IOptions } from \"../connection\";\nimport { Service } from \"../espConnection\";\n\n/*\n Response structures generated via:\n * http://192.168.3.22:8010/WsTopology/TpLogicalClusterQuery?respjson_\n * http://json2ts.com/\n*/\n\nexport namespace TpLogicalClusterQuery {\n export interface Request {\n EclServerQueue?: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface TpLogicalCluster {\n Name: string;\n Queue: string;\n LanguageVersion: string;\n Process: string;\n Type: string;\n }\n\n export interface TpLogicalClusters {\n TpLogicalCluster: TpLogicalCluster[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n TpLogicalClusters: TpLogicalClusters;\n }\n}\n\nexport namespace TpServiceQuery {\n export interface Request {\n Type?: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface TpMachine {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines {\n TpMachine: TpMachine[];\n }\n\n export interface TpDali {\n Name: string;\n Description: string;\n Build: string;\n BackupComputer: string;\n BackupDirectory: string;\n Type: string;\n Path: string;\n LogDirectory: string;\n TpMachines: TpMachines;\n }\n\n export interface TpDalis {\n TpDali: TpDali[];\n }\n\n export interface TpMachine2 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines2 {\n TpMachine: TpMachine2[];\n }\n\n export interface TpDfuServer {\n Name: string;\n Description: string;\n Build: string;\n Queue: string;\n Type: string;\n Path: string;\n LogDirectory: string;\n TpMachines: TpMachines2;\n }\n\n export interface TpDfuServers {\n TpDfuServer: TpDfuServer[];\n }\n\n export interface TpMachine3 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines3 {\n TpMachine: TpMachine3[];\n }\n\n export interface TpDkcSlave {\n Name: string;\n Description: string;\n Build: string;\n Path: string;\n TpMachines: TpMachines3;\n }\n\n export interface TpDkcSlaves {\n TpDkcSlave: TpDkcSlave[];\n }\n\n export interface TpMachine4 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines4 {\n TpMachine: TpMachine4[];\n }\n\n export interface TpDropZone {\n Name: string;\n Description: string;\n Build: string;\n Path: string;\n ECLWatchVisible: boolean;\n UMask: string;\n TpMachines: TpMachines4;\n }\n\n export interface TpDropZones {\n TpDropZone: TpDropZone[];\n }\n\n export interface TpMachine5 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines5 {\n TpMachine: TpMachine5[];\n }\n\n export interface TpEclAgent {\n Name: string;\n Description: string;\n Build: string;\n Type: string;\n Path: string;\n DaliServer: string;\n LogDir: string;\n TpMachines: TpMachines5;\n }\n\n export interface TpEclAgents {\n TpEclAgent: TpEclAgent[];\n }\n\n export interface TpMachine6 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines6 {\n TpMachine: TpMachine6[];\n }\n\n export interface TpEclServer {\n Name: string;\n Description: string;\n Build: string;\n LogDirectory: string;\n Type: string;\n Path: string;\n TpMachines: TpMachines6;\n }\n\n export interface TpEclServers {\n TpEclServer: TpEclServer[];\n }\n\n export interface TpMachine7 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines7 {\n TpMachine: TpMachine7[];\n }\n\n export interface TpEclServer2 {\n Name: string;\n Description: string;\n Build: string;\n LogDirectory: string;\n Type: string;\n Path: string;\n TpMachines: TpMachines7;\n }\n\n export interface TpEclCCServers {\n TpEclServer: TpEclServer2[];\n }\n\n export interface TpMachine8 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines8 {\n TpMachine: TpMachine8[];\n }\n\n export interface TpEclScheduler {\n Name: string;\n Description: string;\n Build: string;\n LogDirectory: string;\n Type: string;\n Path: string;\n TpMachines: TpMachines8;\n }\n\n export interface TpEclSchedulers {\n TpEclScheduler: TpEclScheduler[];\n }\n\n export interface TpMachine9 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines9 {\n TpMachine: TpMachine9[];\n }\n\n export interface TpBinding {\n Name: string;\n Service: string;\n ServiceType: string;\n BindingType: string;\n ServiceBuildSet: string;\n Port: string;\n Protocol: string;\n }\n\n export interface TpBindings {\n TpBinding: TpBinding[];\n }\n\n export interface TpEspServer {\n Name: string;\n Description: string;\n Build: string;\n Type: string;\n Path: string;\n LogDirectory: string;\n TpMachines: TpMachines9;\n TpBindings: TpBindings;\n }\n\n export interface TpEspServers {\n TpEspServer: TpEspServer[];\n }\n\n export interface TpMachine10 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines10 {\n TpMachine: TpMachine10[];\n }\n\n export interface TpFTSlave {\n Name: string;\n Description: string;\n Build: string;\n Path: string;\n TpMachines: TpMachines10;\n }\n\n export interface TpFTSlaves {\n TpFTSlave: TpFTSlave[];\n }\n\n export interface TpMachine11 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines11 {\n TpMachine: TpMachine11[];\n }\n\n export interface TpGenesisServer {\n Name: string;\n Description: string;\n Build: string;\n Path: string;\n TpMachines: TpMachines11;\n }\n\n export interface TpGenesisServers {\n TpGenesisServer: TpGenesisServer[];\n }\n\n export interface TpMachine12 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines12 {\n TpMachine: TpMachine12[];\n }\n\n export interface TpLdapServer {\n Name: string;\n Description: string;\n Build: string;\n Path: string;\n TpMachines: TpMachines12;\n }\n\n export interface TpLdapServers {\n TpLdapServer: TpLdapServer[];\n }\n\n export interface TpMachine13 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines13 {\n TpMachine: TpMachine13[];\n }\n\n export interface TpMySqlServer {\n Name: string;\n Description: string;\n Build: string;\n Path: string;\n TpMachines: TpMachines13;\n }\n\n export interface TpMySqlServers {\n TpMySqlServer: TpMySqlServer[];\n }\n\n export interface TpMachine14 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines14 {\n TpMachine: TpMachine14[];\n }\n\n export interface TpSashaServer {\n Name: string;\n Description: string;\n Build: string;\n Path: string;\n LogDirectory: string;\n TpMachines: TpMachines14;\n }\n\n export interface TpSashaServers {\n TpSashaServer: TpSashaServer[];\n }\n\n export interface ServiceList {\n TpDalis: TpDalis;\n TpDfuServers: TpDfuServers;\n TpDkcSlaves: TpDkcSlaves;\n TpDropZones: TpDropZones;\n TpEclAgents: TpEclAgents;\n TpEclServers: TpEclServers;\n TpEclCCServers: TpEclCCServers;\n TpEclSchedulers: TpEclSchedulers;\n TpEspServers: TpEspServers;\n TpFTSlaves: TpFTSlaves;\n TpGenesisServers: TpGenesisServers;\n TpLdapServers: TpLdapServers;\n TpMySqlServers: TpMySqlServers;\n TpSashaServers: TpSashaServers;\n }\n\n export interface Response {\n Exceptions: Exceptions;\n MemThreshold: number;\n DiskThreshold: number;\n CpuThreshold: number;\n EncapsulatedSystem: boolean;\n EnableSNMP: boolean;\n PreflightProcessFilter: string;\n AcceptLanguage: string;\n MemThresholdType: string;\n DiskThresholdType: string;\n ServiceList: ServiceList;\n }\n}\n\nexport namespace TpTargetClusterQuery {\n\n export interface Request {\n Type?: string;\n Name?: string;\n ShowDetails?: boolean;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface TpMachine {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines {\n TpMachine: TpMachine[];\n }\n\n export interface TpCluster {\n Type: string;\n Name: string;\n QueueName: string;\n Build: string;\n Directory: string;\n LogDirectory: string;\n Desc: string;\n Path: string;\n DataModel: string;\n OS: number;\n HasThorSpareProcess: boolean;\n TpMachines: TpMachines;\n }\n\n export interface TpClusters {\n TpCluster: TpCluster[];\n }\n\n export interface TpMachine2 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines2 {\n TpMachine: TpMachine2[];\n }\n\n export interface TpEclServer {\n Name: string;\n Description: string;\n Build: string;\n LogDirectory: string;\n Type: string;\n Path: string;\n TpMachines: TpMachines2;\n }\n\n export interface TpEclCCServers {\n TpEclServer: TpEclServer[];\n }\n\n export interface TpMachine3 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines3 {\n TpMachine: TpMachine3[];\n }\n\n export interface TpEclServer2 {\n Name: string;\n Description: string;\n Build: string;\n LogDirectory: string;\n Type: string;\n Path: string;\n TpMachines: TpMachines3;\n }\n\n export interface TpEclServers {\n TpEclServer: TpEclServer2[];\n }\n\n export interface TpMachine4 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines4 {\n TpMachine: TpMachine4[];\n }\n\n export interface TpEclAgent {\n Name: string;\n Description: string;\n Build: string;\n Type: string;\n Path: string;\n DaliServer: string;\n LogDir: string;\n TpMachines: TpMachines4;\n }\n\n export interface TpEclAgents {\n TpEclAgent: TpEclAgent[];\n }\n\n export interface TpMachine5 {\n Name: string;\n Netaddress: string;\n ConfigNetaddress: string;\n Domain: string;\n Directory: string;\n Type: string;\n Available: string;\n OS: number;\n Path: string;\n Port: number;\n ProcessNumber: number;\n }\n\n export interface TpMachines5 {\n TpMachine: TpMachine5[];\n }\n\n export interface TpEclScheduler {\n Name: string;\n Description: string;\n Build: string;\n LogDirectory: string;\n Type: string;\n Path: string;\n TpMachines: TpMachines5;\n }\n\n export interface TpEclSchedulers {\n TpEclScheduler: TpEclScheduler[];\n }\n\n export interface TpTargetCluster {\n Name: string;\n Prefix: string;\n Type: string;\n TpClusters: TpClusters;\n TpEclCCServers: TpEclCCServers;\n TpEclServers: TpEclServers;\n TpEclAgents: TpEclAgents;\n TpEclSchedulers: TpEclSchedulers;\n }\n\n export interface TpTargetClusters {\n TpTargetCluster: TpTargetCluster[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n ShowDetails: boolean;\n MemThreshold: number;\n DiskThreshold: number;\n CpuThreshold: number;\n MemThresholdType: string;\n DiskThresholdType: string;\n PreflightProcessFilter: string;\n AcceptLanguage: string;\n TpTargetClusters: TpTargetClusters;\n }\n}\n\nexport namespace TpListTargetClusters {\n\n export interface Request {\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface TpClusterNameType {\n Name: string;\n Type: string;\n IsDefault: boolean;\n }\n\n export interface TargetClusters {\n TpClusterNameType: TpClusterNameType[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n TargetClusters: TargetClusters;\n }\n\n}\n\nexport class TopologyService extends Service {\n\n constructor(optsConnection: IOptions | IConnection) {\n super(optsConnection, \"WsTopology\", \"1.25\");\n }\n\n connectionOptions(): IOptions {\n return this._connection.opts();\n }\n\n protocol(): string {\n const parts = this._connection.opts().baseUrl.split(\"//\");\n return parts[0];\n }\n\n ip(): string {\n const parts = this._connection.opts().baseUrl.split(\"//\");\n const parts2 = parts[1].split(\":\");\n return parts2[0];\n }\n\n TpLogicalClusterQuery(request: TpLogicalClusterQuery.Request = {}): Promise<TpLogicalClusterQuery.Response> {\n return this._connection.send(\"TpLogicalClusterQuery\", request);\n }\n\n DefaultTpLogicalClusterQuery(request: TpLogicalClusterQuery.Request = {}): Promise<TpLogicalClusterQuery.TpLogicalCluster> {\n return this.TpLogicalClusterQuery(request).then((response) => {\n if ((response as any).default) {\n return (response as any).default;\n }\n let firstHThor;\n let first;\n response.TpLogicalClusters.TpLogicalCluster.some((item, idx) => {\n if (idx === 0) {\n first = item;\n }\n if (item.Type === \"hthor\") {\n firstHThor = item;\n return true;\n }\n return false;\n });\n return firstHThor || first;\n });\n }\n\n TpServiceQuery(request: TpServiceQuery.Request): Promise<TpServiceQuery.Response> {\n return this._connection.send(\"TpServiceQuery\", request);\n }\n\n TpTargetClusterQuery(request: TpTargetClusterQuery.Request): Promise<TpTargetClusterQuery.Response> {\n return this._connection.send(\"TpTargetClusterQuery\", request);\n }\n\n TpListTargetClusters(request: TpListTargetClusters.Request): Promise<TpListTargetClusters.Response> {\n return this._connection.send(\"TpListTargetClusters\", request);\n }\n}\n","import { deepMixin, xml2json, XMLNode } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { ESPConnection, Service } from \"../espConnection\";\n\n/*\n Response structures generated via:\n * http://192.168.3.22:8010/WsWorkunits/WUQuery?respjson_\n * http://json2ts.com/\n*/\n\nexport enum WUStateID {\n Unknown = 0,\n Compiled,\n Running,\n Completed,\n Failed,\n Archived,\n Aborting,\n Aborted,\n Blocked,\n Submitted,\n Scheduled,\n Compiling,\n Wait,\n UploadingFiled,\n DebugPaused,\n DebugRunning,\n Paused,\n LAST,\n NotFound = 999\n}\n\nexport namespace WUInfo {\n export interface Request {\n Wuid: string;\n TruncateEclTo64k?: boolean;\n Type?: string;\n IncludeExceptions?: boolean;\n IncludeGraphs?: boolean;\n IncludeSourceFiles?: boolean;\n IncludeResults?: boolean;\n IncludeResultsViewNames?: boolean;\n IncludeVariables?: boolean;\n IncludeTimers?: boolean;\n IncludeDebugValues?: boolean;\n IncludeApplicationValues?: boolean;\n IncludeWorkflows?: boolean;\n IncludeXmlSchemas?: boolean;\n IncludeResourceURLs?: boolean;\n SuppressResultSchemas?: boolean;\n ThorSlaveIP?: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Query {\n Text: string;\n Cpp: string;\n ResTxt: string;\n Dll: string;\n ThorLog: string;\n QueryMainDefinition: string;\n }\n\n export interface ECLHelpFile {\n Name: string;\n Type: string;\n IPAddress: string;\n Description: string;\n FileSize: number;\n PID: number;\n minActivityId: number;\n maxActivityId: number;\n }\n\n export interface Helpers {\n ECLHelpFile: ECLHelpFile[];\n }\n\n export interface ECLException {\n Source: string;\n Severity: string;\n Code: number;\n Message: string;\n FileName: string;\n LineNo: number;\n Column: number;\n Activity: number;\n }\n\n export interface Exceptions2 {\n ECLException: ECLException[];\n }\n\n export interface ECLGraph {\n Name: string;\n Label: string;\n Type: string;\n Running: boolean;\n Complete: boolean;\n Failed: boolean;\n RunningId: number;\n WhenStarted: string;\n WhenFinished: string;\n }\n\n export interface Graphs {\n ECLGraph: ECLGraph[];\n }\n\n export interface ECLSourceFiles {\n ECLSourceFile: any[];\n }\n\n export interface ECLSourceFile {\n FileCluster: string;\n Name: string;\n IsSuperFile: boolean;\n Subs: number;\n Count: number;\n ECLSourceFiles: ECLSourceFiles;\n }\n\n export interface SourceFiles {\n ECLSourceFile: ECLSourceFile[];\n }\n\n export interface ECLSchemaItem {\n ColumnName: string;\n ColumnType: string;\n ColumnTypeCode: number;\n isConditional: boolean;\n }\n\n export interface ECLSchemas {\n ECLSchemaItem: ECLSchemaItem[];\n }\n\n export interface ECLResult {\n Name: string;\n Sequence: number;\n Value: string;\n Link: string;\n FileName: string;\n IsSupplied: boolean;\n ShowFileContent: boolean;\n Total: number;\n ECLSchemas: ECLSchemas;\n XmlSchema: string;\n }\n\n export interface Results {\n ECLResult: ECLResult[];\n }\n\n export interface ECLSchemaItem2 {\n ColumnName: string;\n ColumnType: string;\n ColumnTypeCode: number;\n isConditional: boolean;\n }\n\n export interface ECLSchemas2 {\n ECLSchemaItem: ECLSchemaItem2[];\n }\n\n export interface ECLResult2 {\n Name: string;\n Sequence: number;\n Value: string;\n Link: string;\n FileName: string;\n IsSupplied: boolean;\n ShowFileContent: boolean;\n Total: number;\n ECLSchemas: ECLSchemas2;\n XmlSchema: string;\n }\n\n export interface Variables {\n ECLResult: ECLResult2[];\n }\n\n export interface ECLTimer {\n Name: string;\n Value: string;\n count: number;\n GraphName: string;\n SubGraphId: number;\n }\n\n export interface Timers {\n ECLTimer: ECLTimer[];\n }\n\n export interface DebugValue {\n Name: string;\n Value: string;\n }\n\n export interface DebugValues {\n DebugValue: DebugValue[];\n }\n\n export interface ApplicationValue {\n Application: string;\n Name: string;\n Value: string;\n }\n\n export interface ApplicationValues {\n ApplicationValue: ApplicationValue[];\n }\n\n export interface ECLWorkflow {\n WFID: string;\n EventName: string;\n EventText: string;\n Count: number;\n CountRemaining: number;\n }\n\n export interface Workflows {\n ECLWorkflow: ECLWorkflow[];\n }\n\n export interface ECLTimingData {\n Name: string;\n GraphNum: number;\n SubGraphNum: number;\n GID: number;\n Min: number;\n MS: number;\n }\n\n export interface TimingData {\n ECLTimingData: ECLTimingData[];\n }\n\n export interface AllowedClusters {\n AllowedCluster: string[];\n }\n\n export interface ThorLogInfo {\n ProcessName: string;\n ClusterGroup: string;\n LogDate: string;\n NumberSlaves: number;\n }\n\n export interface ThorLogList {\n ThorLogInfo: ThorLogInfo[];\n }\n\n export interface ResourceURLs {\n URL: string[];\n }\n\n export interface Workunit {\n Wuid: string;\n Owner: string;\n Cluster: string;\n RoxieCluster: string;\n Jobname: string;\n Queue: string;\n StateID: number;\n State: string;\n StateEx: string;\n Description: string;\n Protected: boolean;\n Active: boolean;\n Action: number;\n ActionEx: string;\n DateTimeScheduled: string;\n PriorityClass: number;\n PriorityLevel: number;\n Scope: string;\n Snapshot: string;\n ResultLimit: number;\n Archived: boolean;\n IsPausing: boolean;\n ThorLCR: boolean;\n EventSchedule: number;\n HaveSubGraphTimings: boolean;\n TotalClusterTime: string;\n AbortBy: string;\n AbortTime: string;\n Query: Query;\n Helpers: Helpers;\n Exceptions: Exceptions2;\n Graphs: Graphs;\n SourceFiles: SourceFiles;\n Results: Results;\n Variables: Variables;\n Timers: Timers;\n DebugValues: DebugValues;\n ApplicationValues: ApplicationValues;\n Workflows: Workflows;\n TimingData: TimingData;\n AllowedClusters: AllowedClusters;\n ErrorCount: number;\n WarningCount: number;\n InfoCount: number;\n AlertCount: number;\n GraphCount: number;\n SourceFileCount: number;\n ResultCount: number;\n VariableCount: number;\n TimerCount: number;\n HasDebugValue: boolean;\n ApplicationValueCount: number;\n XmlParams: string;\n AccessFlag: number;\n ClusterFlag: number;\n HelpersDesc: string;\n GraphsDesc: string;\n SourceFilesDesc: string;\n ResultsDesc: string;\n VariablesDesc: string;\n TimersDesc: string;\n DebugValuesDesc: string;\n ApplicationValuesDesc: string;\n WorkflowsDesc: string;\n HasArchiveQuery: boolean;\n ThorLogList: ThorLogList;\n ResourceURLs: ResourceURLs;\n ResultViewCount: number;\n ResourceURLCount: number;\n DebugValueCount: number;\n WorkflowCount: number;\n HelpersCount: number;\n }\n\n export interface ResultViews {\n View: string[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Workunit: Workunit;\n AutoRefresh: number;\n CanCompile: boolean;\n ThorSlaveIP: string;\n ResultViews: ResultViews;\n SecMethod: string;\n }\n}\n\nexport namespace WUQuery {\n export interface ApplicationValue {\n Application: string;\n Name: string;\n Value: string;\n }\n\n export interface Request {\n Wuid?: string;\n Type?: string;\n Cluster?: string;\n RoxieCluster?: string;\n Owner?: string;\n State?: string;\n StartDate?: string;\n EndDate?: string;\n ECL?: string;\n Jobname?: string;\n LogicalFile?: string;\n LogicalFileSearchType?: string;\n ApplicationValues?: {\n ApplicationValue: ApplicationValue[]\n };\n After?: string;\n Before?: string;\n Count?: number;\n PageSize?: number;\n PageStartFrom?: number;\n PageEndAt?: number;\n LastNDays?: number;\n Sortby?: string;\n Descending?: boolean;\n CacheHint?: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Query {\n Text: string;\n Cpp: string;\n ResTxt: string;\n Dll: string;\n ThorLog: string;\n QueryMainDefinition: string;\n }\n\n export interface ECLHelpFile {\n Name: string;\n Type: string;\n IPAddress: string;\n Description: string;\n FileSize: number;\n PID: number;\n minActivityId: number;\n maxActivityId: number;\n }\n\n export interface Helpers {\n ECLHelpFile: ECLHelpFile[];\n }\n\n export interface ECLException {\n Source: string;\n Severity: string;\n Code: number;\n Message: string;\n FileName: string;\n LineNo: number;\n Column: number;\n Activity: number;\n }\n\n export interface Exceptions2 {\n ECLException: ECLException[];\n }\n\n export interface ECLGraph {\n Name: string;\n Label: string;\n Type: string;\n Running: boolean;\n Complete: boolean;\n Failed: boolean;\n RunningId: number;\n WhenStarted: string;\n WhenFinished: string;\n }\n\n export interface Graphs {\n ECLGraph: ECLGraph[];\n }\n\n export interface ECLSourceFiles {\n ECLSourceFile: any[];\n }\n\n export interface ECLSourceFile {\n FileCluster: string;\n Name: string;\n IsSuperFile: boolean;\n Subs: number;\n Count: number;\n ECLSourceFiles: ECLSourceFiles;\n }\n\n export interface SourceFiles {\n ECLSourceFile: ECLSourceFile[];\n }\n\n export interface ECLSchemaItem {\n ColumnName: string;\n ColumnType: string;\n ColumnTypeCode: number;\n isConditional: boolean;\n }\n\n export interface ECLSchemas {\n ECLSchemaItem: ECLSchemaItem[];\n }\n\n export interface ECLResult {\n Name: string;\n Sequence: number;\n Value: string;\n Link: string;\n FileName: string;\n IsSupplied: boolean;\n ShowFileContent: boolean;\n Total: number;\n ECLSchemas: ECLSchemas;\n XmlSchema: string;\n }\n\n export interface Results {\n ECLResult: ECLResult[];\n }\n\n export interface ECLSchemaItem2 {\n ColumnName: string;\n ColumnType: string;\n ColumnTypeCode: number;\n isConditional: boolean;\n }\n\n export interface ECLSchemas2 {\n ECLSchemaItem: ECLSchemaItem2[];\n }\n\n export interface ECLResult2 {\n Name: string;\n Sequence: number;\n Value: string;\n Link: string;\n FileName: string;\n IsSupplied: boolean;\n ShowFileContent: boolean;\n Total: number;\n ECLSchemas: ECLSchemas2;\n XmlSchema: string;\n }\n\n export interface Variables {\n ECLResult: ECLResult2[];\n }\n\n export interface ECLTimer {\n Name: string;\n Value: string;\n count: number;\n GraphName: string;\n SubGraphId: number;\n }\n\n export interface Timers {\n ECLTimer: ECLTimer[];\n }\n\n export interface DebugValue {\n Name: string;\n Value: string;\n }\n\n export interface DebugValues {\n DebugValue: DebugValue[];\n }\n\n export interface ApplicationValue {\n Application: string;\n Name: string;\n Value: string;\n }\n\n export interface ApplicationValues {\n ApplicationValue: ApplicationValue[];\n }\n\n export interface ECLWorkflow {\n WFID: string;\n EventName: string;\n EventText: string;\n Count: number;\n CountRemaining: number;\n }\n\n export interface Workflows {\n ECLWorkflow: ECLWorkflow[];\n }\n\n export interface ECLTimingData {\n Name: string;\n GraphNum: number;\n SubGraphNum: number;\n GID: number;\n Min: number;\n MS: number;\n }\n\n export interface TimingData {\n ECLTimingData: ECLTimingData[];\n }\n\n export interface AllowedClusters {\n AllowedCluster: string[];\n }\n\n export interface ThorLogInfo {\n ProcessName: string;\n ClusterGroup: string;\n LogDate: string;\n NumberSlaves: number;\n }\n\n export interface ThorLogList {\n ThorLogInfo: ThorLogInfo[];\n }\n\n export interface ResourceURLs {\n URL: string[];\n }\n\n export interface ECLWorkunit {\n Wuid: string;\n Owner: string;\n Cluster: string;\n RoxieCluster: string;\n Jobname: string;\n Queue: string;\n StateID: number;\n State: string;\n StateEx: string;\n Description: string;\n Protected: boolean;\n Active: boolean;\n Action: number;\n ActionEx: string;\n DateTimeScheduled: string;\n PriorityClass: number;\n PriorityLevel: number;\n Scope: string;\n Snapshot: string;\n ResultLimit: number;\n Archived: boolean;\n IsPausing: boolean;\n ThorLCR: boolean;\n EventSchedule: number;\n HaveSubGraphTimings: boolean;\n TotalClusterTime: string;\n AbortBy: string;\n AbortTime: string;\n Query: Query;\n Helpers: Helpers;\n Exceptions: Exceptions2;\n Graphs: Graphs;\n SourceFiles: SourceFiles;\n Results: Results;\n Variables: Variables;\n Timers: Timers;\n DebugValues: DebugValues;\n ApplicationValues: ApplicationValues;\n Workflows: Workflows;\n TimingData: TimingData;\n AllowedClusters: AllowedClusters;\n ErrorCount: number;\n WarningCount: number;\n InfoCount: number;\n AlertCount: number;\n GraphCount: number;\n SourceFileCount: number;\n ResultCount: number;\n VariableCount: number;\n TimerCount: number;\n HasDebugValue: boolean;\n ApplicationValueCount: number;\n XmlParams: string;\n AccessFlag: number;\n ClusterFlag: number;\n HelpersDesc: string;\n GraphsDesc: string;\n SourceFilesDesc: string;\n ResultsDesc: string;\n VariablesDesc: string;\n TimersDesc: string;\n DebugValuesDesc: string;\n ApplicationValuesDesc: string;\n WorkflowsDesc: string;\n HasArchiveQuery: boolean;\n ThorLogList: ThorLogList;\n ResourceURLs: ResourceURLs;\n ResultViewCount: number;\n ResourceURLCount: number;\n DebugValueCount: number;\n WorkflowCount: number;\n HelpersCount: number;\n }\n\n export interface Workunits {\n ECLWorkunit: ECLWorkunit[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Type: string;\n Cluster: string;\n RoxieCluster: string;\n Owner: string;\n State: string;\n StartDate: string;\n EndDate: string;\n ECL: string;\n Jobname: string;\n LogicalFile: string;\n LogicalFileSearchType: string;\n Current: string;\n Next: string;\n Count: number;\n PageSize: number;\n PrevPage: number;\n NextPage: number;\n LastPage: number;\n NumWUs: number;\n First: boolean;\n PageStartFrom: number;\n PageEndAt: number;\n LastNDays: number;\n Sortby: string;\n Descending: boolean;\n BasicQuery: string;\n Filters: string;\n CacheHint: number;\n Workunits: Workunits;\n }\n}\n\nexport namespace WUCreate {\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Query {\n Text: string;\n Cpp: string;\n ResTxt: string;\n Dll: string;\n ThorLog: string;\n QueryMainDefinition: string;\n }\n\n export interface ECLHelpFile {\n Name: string;\n Type: string;\n IPAddress: string;\n Description: string;\n FileSize: number;\n PID: number;\n minActivityId: number;\n maxActivityId: number;\n }\n\n export interface Helpers {\n ECLHelpFile: ECLHelpFile[];\n }\n\n export interface ECLException {\n Source: string;\n Severity: string;\n Code: number;\n Message: string;\n FileName: string;\n LineNo: number;\n Column: number;\n Activity: number;\n }\n\n export interface Exceptions2 {\n ECLException: ECLException[];\n }\n\n export interface ECLGraph {\n Name: string;\n Label: string;\n Type: string;\n Running: boolean;\n Complete: boolean;\n Failed: boolean;\n RunningId: number;\n WhenStarted: string;\n WhenFinished: string;\n }\n\n export interface Graphs {\n ECLGraph: ECLGraph[];\n }\n\n export interface ECLSourceFiles {\n ECLSourceFile: any[];\n }\n\n export interface ECLSourceFile {\n FileCluster: string;\n Name: string;\n IsSuperFile: boolean;\n Subs: number;\n Count: number;\n ECLSourceFiles: ECLSourceFiles;\n }\n\n export interface SourceFiles {\n ECLSourceFile: ECLSourceFile[];\n }\n\n export interface ECLSchemaItem {\n ColumnName: string;\n ColumnType: string;\n ColumnTypeCode: number;\n isConditional: boolean;\n }\n\n export interface ECLSchemas {\n ECLSchemaItem: ECLSchemaItem[];\n }\n\n export interface ECLResult {\n Name: string;\n Sequence: number;\n Value: string;\n Link: string;\n FileName: string;\n IsSupplied: boolean;\n ShowFileContent: boolean;\n Total: number;\n ECLSchemas: ECLSchemas;\n XmlSchema: string;\n }\n\n export interface Results {\n ECLResult: ECLResult[];\n }\n\n export interface ECLSchemaItem2 {\n ColumnName: string;\n ColumnType: string;\n ColumnTypeCode: number;\n isConditional: boolean;\n }\n\n export interface ECLSchemas2 {\n ECLSchemaItem: ECLSchemaItem2[];\n }\n\n export interface ECLResult2 {\n Name: string;\n Sequence: number;\n Value: string;\n Link: string;\n FileName: string;\n IsSupplied: boolean;\n ShowFileContent: boolean;\n Total: number;\n ECLSchemas: ECLSchemas2;\n XmlSchema: string;\n }\n\n export interface Variables {\n ECLResult: ECLResult2[];\n }\n\n export interface ECLTimer {\n Name: string;\n Value: string;\n count: number;\n GraphName: string;\n SubGraphId: number;\n }\n\n export interface Timers {\n ECLTimer: ECLTimer[];\n }\n\n export interface DebugValue {\n Name: string;\n Value: string;\n }\n\n export interface DebugValues {\n DebugValue: DebugValue[];\n }\n\n export interface ApplicationValue {\n Application: string;\n Name: string;\n Value: string;\n }\n\n export interface ApplicationValues {\n ApplicationValue: ApplicationValue[];\n }\n\n export interface ECLWorkflow {\n WFID: string;\n EventName: string;\n EventText: string;\n Count: number;\n CountRemaining: number;\n }\n\n export interface Workflows {\n ECLWorkflow: ECLWorkflow[];\n }\n\n export interface ECLTimingData {\n Name: string;\n GraphNum: number;\n SubGraphNum: number;\n GID: number;\n Min: number;\n MS: number;\n }\n\n export interface TimingData {\n ECLTimingData: ECLTimingData[];\n }\n\n export interface AllowedClusters {\n AllowedCluster: string[];\n }\n\n export interface ThorLogInfo {\n ProcessName: string;\n ClusterGroup: string;\n LogDate: string;\n NumberSlaves: number;\n }\n\n export interface ThorLogList {\n ThorLogInfo: ThorLogInfo[];\n }\n\n export interface ResourceURLs {\n URL: string[];\n }\n\n export interface Workunit {\n Wuid: string;\n Owner: string;\n Cluster: string;\n RoxieCluster: string;\n Jobname: string;\n Queue: string;\n StateID: number;\n State: string;\n StateEx: string;\n Description: string;\n Protected: boolean;\n Active: boolean;\n Action: number;\n ActionEx: string;\n DateTimeScheduled: string;\n PriorityClass: number;\n PriorityLevel: number;\n Scope: string;\n Snapshot: string;\n ResultLimit: number;\n Archived: boolean;\n IsPausing: boolean;\n ThorLCR: boolean;\n EventSchedule: number;\n HaveSubGraphTimings: boolean;\n TotalClusterTime: string;\n AbortBy: string;\n AbortTime: string;\n Query: Query;\n Helpers: Helpers;\n Exceptions: Exceptions2;\n Graphs: Graphs;\n SourceFiles: SourceFiles;\n Results: Results;\n Variables: Variables;\n Timers: Timers;\n DebugValues: DebugValues;\n ApplicationValues: ApplicationValues;\n Workflows: Workflows;\n TimingData: TimingData;\n AllowedClusters: AllowedClusters;\n ErrorCount: number;\n WarningCount: number;\n InfoCount: number;\n AlertCount: number;\n GraphCount: number;\n SourceFileCount: number;\n ResultCount: number;\n VariableCount: number;\n TimerCount: number;\n HasDebugValue: boolean;\n ApplicationValueCount: number;\n XmlParams: string;\n AccessFlag: number;\n ClusterFlag: number;\n HelpersDesc: string;\n GraphsDesc: string;\n SourceFilesDesc: string;\n ResultsDesc: string;\n VariablesDesc: string;\n TimersDesc: string;\n DebugValuesDesc: string;\n ApplicationValuesDesc: string;\n WorkflowsDesc: string;\n HasArchiveQuery: boolean;\n ThorLogList: ThorLogList;\n ResourceURLs: ResourceURLs;\n ResultViewCount: number;\n ResourceURLCount: number;\n DebugValueCount: number;\n WorkflowCount: number;\n HelpersCount: number;\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Workunit: Workunit;\n }\n}\n\nexport namespace WUListQueries {\n export interface Request {\n QueryID: string;\n QueryName: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface ClusterQueryState {\n Cluster: string;\n State: string;\n Errors: string;\n MixedNodeStates: boolean;\n }\n\n export interface Clusters {\n ClusterQueryState: ClusterQueryState[];\n }\n\n export interface QuerySetQuery {\n Id: string;\n Name: string;\n Wuid: string;\n Dll: string;\n Suspended: boolean;\n Clusters: Clusters;\n memoryLimit: string;\n timeLimit: number;\n warnTimeLimit: number;\n priority: string;\n Comment: string;\n QuerySetId: string;\n IsLibrary: boolean;\n Activated: boolean;\n PublishedBy: string;\n snapshot: string;\n }\n\n export interface QuerysetQueries {\n QuerySetQuery: QuerySetQuery[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n NumberOfQueries: number;\n CacheHint: number;\n QuerysetQueries: QuerysetQueries;\n }\n}\n\nexport namespace WUPushEvent {\n export interface Request {\n EventName: string;\n EventText: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n }\n}\n\nexport namespace WUUpdate {\n export enum Action {\n Unknown = 0,\n Compile,\n Check,\n Run,\n ExecuteExisting,\n Pause,\n PauseNow,\n Resume,\n Debug,\n __size\n }\n\n export interface Request {\n Wuid: string;\n State?: string;\n StateOrig?: string;\n Jobname?: string;\n JobnameOrig?: string;\n QueryText?: string;\n Action?: Action;\n Description?: string;\n DescriptionOrig?: string;\n AddDrilldownFields?: boolean;\n ResultLimit?: number;\n Protected?: boolean;\n ProtectedOrig?: boolean;\n PriorityClass?: string;\n PriorityLevel?: string;\n Scope?: string;\n ScopeOrig?: string;\n ClusterSelection?: string;\n ClusterOrig?: string;\n XmlParams?: string;\n ThorSlaveIP?: string;\n QueryMainDefinition?: string;\n DebugValues?: DebugValues;\n ApplicationValues?: ApplicationValues;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Query {\n Text: string;\n Cpp: string;\n ResTxt: string;\n Dll: string;\n ThorLog: string;\n QueryMainDefinition: string;\n }\n\n export interface ECLHelpFile {\n Name: string;\n Type: string;\n IPAddress: string;\n Description: string;\n FileSize: number;\n PID: number;\n minActivityId: number;\n maxActivityId: number;\n }\n\n export interface Helpers {\n ECLHelpFile: ECLHelpFile[];\n }\n\n export interface ECLException {\n Source: string;\n Severity: string;\n Code: number;\n Message: string;\n FileName: string;\n LineNo: number;\n Column: number;\n Activity: number;\n }\n\n export interface Exceptions2 {\n ECLException: ECLException[];\n }\n\n export interface ECLGraph {\n Name: string;\n Label: string;\n Type: string;\n Running: boolean;\n Complete: boolean;\n Failed: boolean;\n RunningId: number;\n WhenStarted: string;\n WhenFinished: string;\n }\n\n export interface Graphs {\n ECLGraph: ECLGraph[];\n }\n\n export interface ECLSourceFiles {\n ECLSourceFile: any[];\n }\n\n export interface ECLSourceFile {\n FileCluster: string;\n Name: string;\n IsSuperFile: boolean;\n Subs: number;\n Count: number;\n ECLSourceFiles: ECLSourceFiles;\n }\n\n export interface SourceFiles {\n ECLSourceFile: ECLSourceFile[];\n }\n\n export interface ECLSchemaItem {\n ColumnName: string;\n ColumnType: string;\n ColumnTypeCode: number;\n isConditional: boolean;\n }\n\n export interface ECLSchemas {\n ECLSchemaItem: ECLSchemaItem[];\n }\n\n export interface ECLResult {\n Name: string;\n Sequence: number;\n Value: string;\n Link: string;\n FileName: string;\n IsSupplied: boolean;\n ShowFileContent: boolean;\n Total: number;\n ECLSchemas: ECLSchemas;\n XmlSchema: string;\n }\n\n export interface Results {\n ECLResult: ECLResult[];\n }\n\n export interface ECLSchemaItem2 {\n ColumnName: string;\n ColumnType: string;\n ColumnTypeCode: number;\n isConditional: boolean;\n }\n\n export interface ECLSchemas2 {\n ECLSchemaItem: ECLSchemaItem2[];\n }\n\n export interface ECLResult2 {\n Name: string;\n Sequence: number;\n Value: string;\n Link: string;\n FileName: string;\n IsSupplied: boolean;\n ShowFileContent: boolean;\n Total: number;\n ECLSchemas: ECLSchemas2;\n XmlSchema: string;\n }\n\n export interface Variables {\n ECLResult: ECLResult2[];\n }\n\n export interface ECLTimer {\n Name: string;\n Value: string;\n count: number;\n GraphName: string;\n SubGraphId: number;\n }\n\n export interface Timers {\n ECLTimer: ECLTimer[];\n }\n\n export interface DebugValue {\n Name: string;\n Value: string;\n }\n\n export interface DebugValues {\n DebugValue: DebugValue[];\n }\n\n export interface ApplicationValue {\n Application: string;\n Name: string;\n Value: string;\n }\n\n export interface ApplicationValues {\n ApplicationValue: ApplicationValue[];\n }\n\n export interface ECLWorkflow {\n WFID: string;\n EventName: string;\n EventText: string;\n Count: number;\n CountRemaining: number;\n }\n\n export interface Workflows {\n ECLWorkflow: ECLWorkflow[];\n }\n\n export interface ECLTimingData {\n Name: string;\n GraphNum: number;\n SubGraphNum: number;\n GID: number;\n Min: number;\n MS: number;\n }\n\n export interface TimingData {\n ECLTimingData: ECLTimingData[];\n }\n\n export interface AllowedClusters {\n AllowedCluster: string[];\n }\n\n export interface ThorLogInfo {\n ProcessName: string;\n ClusterGroup: string;\n LogDate: string;\n NumberSlaves: number;\n }\n\n export interface ThorLogList {\n ThorLogInfo: ThorLogInfo[];\n }\n\n export interface ResourceURLs {\n URL: string[];\n }\n\n export interface Workunit {\n Wuid: string;\n Owner: string;\n Cluster: string;\n RoxieCluster: string;\n Jobname: string;\n Queue: string;\n StateID: number;\n State: string;\n StateEx: string;\n Description: string;\n Protected: boolean;\n Active: boolean;\n Action: number;\n ActionEx: string;\n DateTimeScheduled: string;\n PriorityClass: number;\n PriorityLevel: number;\n Scope: string;\n Snapshot: string;\n ResultLimit: number;\n Archived: boolean;\n IsPausing: boolean;\n ThorLCR: boolean;\n EventSchedule: number;\n HaveSubGraphTimings: boolean;\n TotalClusterTime: string;\n AbortBy: string;\n AbortTime: string;\n Query: Query;\n Helpers: Helpers;\n Exceptions: Exceptions2;\n Graphs: Graphs;\n SourceFiles: SourceFiles;\n Results: Results;\n Variables: Variables;\n Timers: Timers;\n DebugValues: DebugValues;\n ApplicationValues: ApplicationValues;\n Workflows: Workflows;\n TimingData: TimingData;\n AllowedClusters: AllowedClusters;\n ErrorCount: number;\n WarningCount: number;\n InfoCount: number;\n AlertCount: number;\n GraphCount: number;\n SourceFileCount: number;\n ResultCount: number;\n VariableCount: number;\n TimerCount: number;\n HasDebugValue: boolean;\n ApplicationValueCount: number;\n XmlParams: string;\n AccessFlag: number;\n ClusterFlag: number;\n HelpersDesc: string;\n GraphsDesc: string;\n SourceFilesDesc: string;\n ResultsDesc: string;\n VariablesDesc: string;\n TimersDesc: string;\n DebugValuesDesc: string;\n ApplicationValuesDesc: string;\n WorkflowsDesc: string;\n HasArchiveQuery: boolean;\n ThorLogList: ThorLogList;\n ResourceURLs: ResourceURLs;\n ResultViewCount: number;\n ResourceURLCount: number;\n DebugValueCount: number;\n WorkflowCount: number;\n HelpersCount: number;\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Workunit: Workunit;\n }\n}\n\nexport namespace WUSubmit {\n export interface Request {\n Wuid: string;\n Cluster: string;\n Queue?: string;\n Snapshot?: string;\n MaxRunTime?: number;\n BlockTillFinishTimer?: boolean;\n SyntaxCheck?: boolean;\n NotifyCluster?: boolean;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n }\n}\n\nexport namespace WUResubmit {\n export interface Request {\n Wuids: string[];\n ResetWorkflow: boolean;\n CloneWorkunit: boolean;\n BlockTillFinishTimer?: number;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface WU {\n WUID: string;\n ParentWUID: string;\n }\n\n export interface WUs {\n WU: WU[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n WUs: WUs;\n }\n}\n\nexport namespace WUQueryDetails {\n export interface Request {\n QueryId: string;\n QuerySet: string;\n IncludeStateOnClusters: boolean;\n IncludeSuperFiles: boolean;\n IncludeWsEclAddresses: boolean;\n CheckAllNodes: boolean;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface ClusterQueryState {\n Cluster: string;\n State: string;\n Errors: string;\n MixedNodeStates: boolean;\n }\n\n export interface Clusters {\n ClusterQueryState: ClusterQueryState[];\n }\n\n export interface LogicalFiles {\n Item: string[];\n }\n\n export interface SubFiles {\n File: string[];\n }\n\n export interface SuperFiles2 {\n SuperFile: any[];\n }\n\n export interface SuperFile {\n Name: string;\n SubFiles: SubFiles;\n SuperFiles: SuperFiles2;\n }\n\n export interface SuperFiles {\n SuperFile: SuperFile[];\n }\n\n export interface LibrariesUsed {\n Item: string[];\n }\n\n export interface WsEclAddresses {\n Address: string[];\n }\n\n export interface ECLGraph {\n Name: string;\n Label: string;\n Type: string;\n Running: boolean;\n Complete: boolean;\n Failed: boolean;\n RunningId: number;\n WhenStarted: string;\n WhenFinished: string;\n }\n\n export interface WUGraphs {\n ECLGraph: ECLGraph[];\n }\n\n export interface ECLTimer {\n Name: string;\n Value: string;\n count: number;\n GraphName: string;\n SubGraphId: number;\n }\n\n export interface WUTimers {\n ECLTimer: ECLTimer[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n QueryId: string;\n QuerySet: string;\n QueryName: string;\n Wuid: string;\n Dll: string;\n Suspended: boolean;\n Activated: boolean;\n SuspendedBy: string;\n Clusters: Clusters;\n PublishedBy: string;\n Comment: string;\n LogicalFiles: LogicalFiles;\n SuperFiles: SuperFiles;\n IsLibrary: boolean;\n Priority: string;\n WUSnapShot: string;\n CompileTime: string;\n LibrariesUsed: LibrariesUsed;\n CountGraphs: number;\n ResourceURLCount: number;\n WsEclAddresses: WsEclAddresses;\n WUGraphs: WUGraphs;\n WUTimers: WUTimers;\n }\n}\n\nexport namespace WUAction {\n export type Type = \"SetToFailed\" | \"Pause\" | \"PauseNow\" | \"Resume\" | \"Abort\" | \"Delete\" | \"Restore\" | \"Deschedule\" | \"Reschedule\";\n export interface Request {\n Wuids: string[];\n WUActionType: Type;\n Cluster?: string;\n Owner?: string;\n State?: string;\n StartDate?: string;\n EndDate?: string;\n ECL?: string;\n Jobname?: string;\n Test?: string;\n CurrentPage?: number;\n PageSize?: number;\n Sortby?: number;\n Descending?: boolean;\n EventServer?: string;\n EventName?: string;\n PageFrom?: number;\n BlockTillFinishTimer?: number;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface WUActionResult {\n Wuid: string;\n Action: string;\n Result: string;\n }\n\n export interface ActionResults {\n WUActionResult: WUActionResult[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n ActionResults: ActionResults;\n }\n}\n\nexport namespace WUGetZAPInfo {\n export interface Request {\n WUID: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n WUID: string;\n ESPIPAddress: string;\n ThorIPAddress: string;\n BuildVersion: string;\n Archive: string;\n }\n}\n\nexport namespace WUShowScheduled {\n export interface Request {\n Cluster: string;\n EventName: string;\n PushEventName: string;\n PushEventText: string;\n State: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface ServerInfo {\n Name: string;\n NetAddress: string;\n }\n\n export interface Clusters {\n ServerInfo: ServerInfo[];\n }\n\n export interface ScheduledWU {\n Wuid: string;\n Cluster: string;\n EventName: string;\n EventText: string;\n JobName: string;\n StateID: number;\n State: string;\n Owner: string;\n }\n\n export interface Workunits {\n ScheduledWU: ScheduledWU[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n ClusterSelected: number;\n EventName: string;\n PushEventName: string;\n PushEventText: string;\n Query: string;\n Clusters: Clusters;\n Workunits: Workunits;\n }\n}\n\nexport namespace WUQuerySetQueryAction {\n export interface Request {\n Action: string;\n QuerySetName: string;\n Queries: any[];\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Result {\n QueryId: string;\n Suspended: boolean;\n Success: boolean;\n Code: number;\n Message: string;\n }\n\n export interface Results {\n Result: Result[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Action: string;\n QuerySetName: string;\n Results: Results;\n }\n}\n\nexport namespace WUQuerySetAliasAction {\n export interface Request {\n Action: string;\n QuerySetName: string;\n Queries: any[];\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Result {\n Name: string;\n Success: boolean;\n Code: number;\n Message: string;\n }\n\n export interface Results {\n Result: Result[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Action: string;\n QuerySetName: string;\n Results: Results;\n }\n}\n\nexport namespace WUPublishWorkunit {\n export interface Request {\n Wuid: string;\n Cluster: string;\n JobName: string;\n Activate: boolean;\n NotifyCluster?: boolean;\n Wait?: number;\n NoReload?: boolean;\n UpdateWorkUnitName?: boolean;\n memoryLimit?: string;\n TimeLimit?: string;\n WarnTimeLimit?: string;\n Priority?: string;\n RemoteDali?: string;\n Comment?: string;\n DontCopyFiles?: boolean;\n SourceProcess?: string;\n AllowForeignFiles: boolean;\n UpdateDfs?: boolean;\n UpdateSuperFiles?: boolean;\n UpdateCloneFrom?: boolean;\n AppendCluster?: boolean;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Clusters {\n Item: string[];\n }\n\n export interface WULogicalFileCopyInfo {\n IsIndex: boolean;\n LogicalName: string;\n DfuCopyWuid: string;\n DfuCopyError: string;\n Clusters: Clusters;\n }\n\n export interface OnCluster {\n WULogicalFileCopyInfo: WULogicalFileCopyInfo[];\n }\n\n export interface Clusters2 {\n Item: string[];\n }\n\n export interface WULogicalFileCopyInfo2 {\n IsIndex: boolean;\n LogicalName: string;\n DfuCopyWuid: string;\n DfuCopyError: string;\n Clusters: Clusters2;\n }\n\n export interface NotOnCluster {\n WULogicalFileCopyInfo: WULogicalFileCopyInfo2[];\n }\n\n export interface Clusters3 {\n Item: string[];\n }\n\n export interface WULogicalFileCopyInfo3 {\n IsIndex: boolean;\n LogicalName: string;\n DfuCopyWuid: string;\n DfuCopyError: string;\n Clusters: Clusters3;\n }\n\n export interface Foreign {\n WULogicalFileCopyInfo: WULogicalFileCopyInfo3[];\n }\n\n export interface Clusters4 {\n Item: string[];\n }\n\n export interface WULogicalFileCopyInfo4 {\n IsIndex: boolean;\n LogicalName: string;\n DfuCopyWuid: string;\n DfuCopyError: string;\n Clusters: Clusters4;\n }\n\n export interface NotFound {\n WULogicalFileCopyInfo: WULogicalFileCopyInfo4[];\n }\n\n export interface Cluster {\n ClusterName: string;\n OnCluster: OnCluster;\n NotOnCluster: NotOnCluster;\n Foreign: Foreign;\n NotFound: NotFound;\n }\n\n export interface ClusterFiles {\n Cluster: Cluster[];\n }\n\n export interface File {\n Error: string;\n LogicalName: string;\n }\n\n export interface FileErrors {\n File: File[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Wuid: string;\n Result: string;\n QuerySet: string;\n QueryName: string;\n QueryId: string;\n ReloadFailed: boolean;\n Suspended: boolean;\n ErrorMessage: string;\n ClusterFiles: ClusterFiles;\n FileErrors: FileErrors;\n }\n}\n\nexport namespace WUGetGraph {\n\n export interface Request {\n Wuid: string;\n GraphName: string;\n SubGraphId: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface ECLGraphEx {\n Name: string;\n Label: string;\n Type: string;\n Graph: string;\n Running: boolean;\n RunningId: number;\n Complete: boolean;\n Failed: boolean;\n }\n\n export interface Graphs {\n ECLGraphEx: ECLGraphEx[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Graphs: Graphs;\n }\n}\n\nexport namespace WUResult {\n export interface Request {\n Wuid?: string;\n Sequence?: number;\n ResultName?: string;\n LogicalName?: string;\n Cluster?: string;\n SuppressXmlSchema?: boolean;\n BypassCachedResult?: boolean;\n FilterBy?: any;\n Start: number;\n Count: number;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface XmlSchema {\n \"@name\": string;\n xml: string;\n }\n\n export interface Result {\n XmlSchema: XmlSchema;\n \"@xmlSchema\": string;\n Row: any[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Wuid: string;\n Sequence: number;\n LogicalName: string;\n Cluster: string;\n Name: string;\n Start: number;\n Requested: number;\n Count: number;\n Total: number;\n Result: Result;\n }\n}\n\nexport namespace WUQueryGetGraph {\n export interface Request {\n Target: string;\n QueryId: string;\n GraphName: string;\n SubGraphId: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface ECLGraphEx {\n Name: string;\n Label: string;\n Type: string;\n Graph: string;\n Running: boolean;\n RunningId: number;\n Complete: boolean;\n Failed: boolean;\n }\n\n export interface Graphs {\n ECLGraphEx: ECLGraphEx[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Graphs: Graphs;\n }\n}\n\nexport interface WUFileRequest {\n Wuid: string;\n Type: string;\n Name?: string;\n Option?: string;\n SlaveIP?: string;\n IPAddress?: string;\n Description?: string;\n QuerySet?: string;\n Query?: string;\n Process?: string;\n ClusterGroup?: string;\n LogDate?: string;\n SlaveNumber?: number;\n SizeLimit?: number;\n PlainText?: string;\n}\n\nexport namespace WUGetStats {\n export interface Request {\n WUID: string;\n CreatorType: string;\n Creator: string;\n ScopeType: string;\n Scope: string;\n Kind: string;\n Measure: string;\n MinScopeDepth: number;\n MaxScopeDepth: number;\n IncludeGraphs: boolean;\n CreateDescriptions: boolean;\n MinValue: number;\n MaxValue: number;\n Filter: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface WUStatisticItem {\n Creator: string;\n CreatorType: string;\n Scope: string;\n ScopeType: string;\n Description: string;\n TimeStamp: string;\n Measure: string;\n Kind: string;\n Value: string;\n RawValue: number;\n Count: number;\n Max: number;\n Wuid: string;\n }\n\n export interface Statistics {\n WUStatisticItem: WUStatisticItem[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n WUID: string;\n Statistics: Statistics;\n }\n}\n\nexport namespace WUCDebug {\n export interface Request {\n Wuid: string;\n Command: string;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Result: string;\n }\n}\n\nexport namespace WUDetailsMeta {\n export interface Request {\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Attributes {\n Attribute: string[];\n }\n\n export interface ScopeTypes {\n ScopeType: string[];\n }\n\n export interface Measures {\n Measure: string[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n Attributes: Attributes;\n ScopeTypes: ScopeTypes;\n Measures: Measures;\n }\n}\n\nexport namespace WUDetails {\n export namespace RequestNS {\n\n export interface Scopes {\n Scope: string[];\n }\n\n export interface Ids {\n id: string[];\n }\n\n export interface ScopeTypes {\n ScopeType: string[];\n }\n\n export interface PropertyFilter {\n Name?: string;\n ExactValue?: string;\n MinValue?: string;\n MaxValue?: string;\n }\n\n export interface PropertyFilters {\n PropertyFilter: PropertyFilter[];\n }\n\n export interface ScopeFilter {\n MaxDepth?: number;\n Scopes?: Scopes;\n Ids?: string[];\n ScopeTypes?: string[];\n PropertyFilters?: PropertyFilters;\n }\n\n export interface ScopeTypes2 {\n ScopeType: string[];\n }\n\n export interface NestedFilter {\n Depth?: number;\n ScopeTypes: string[];\n }\n\n export interface Properties {\n Property: string[];\n }\n\n export interface Properties2 {\n Property: string[];\n }\n\n export interface Extra {\n scopeType: string;\n Properties: Properties2;\n }\n\n export interface ExtraProperties {\n Extra: Extra[];\n }\n\n export interface PropertiesToReturn {\n AllStatistics?: boolean;\n AllAttributes?: boolean;\n AllHints?: boolean;\n AllScopes?: boolean;\n AllProperties?: boolean;\n MinVersion?: string;\n Measure?: string;\n Properties?: string[];\n ExtraProperties?: ExtraProperties;\n }\n\n export interface ScopeOptions {\n IncludeMatchedScopesInResults?: boolean;\n IncludeScope?: boolean;\n IncludeId?: boolean;\n IncludeScopeType?: boolean;\n }\n\n export interface PropertyOptions {\n IncludeName?: boolean;\n IncludeRawValue?: boolean;\n IncludeFormatted?: boolean;\n IncludeMeasure?: boolean;\n IncludeCreator?: boolean;\n IncludeCreatorType?: boolean;\n }\n }\n\n export interface Request {\n WUID: string;\n ScopeFilter?: RequestNS.ScopeFilter;\n NestedFilter?: RequestNS.NestedFilter;\n PropertiesToReturn: RequestNS.PropertiesToReturn;\n Filter?: string;\n ScopeOptions: RequestNS.ScopeOptions;\n PropertyOptions: RequestNS.PropertyOptions;\n }\n\n export interface Exception {\n Code: string;\n Audience: string;\n Source: string;\n Message: string;\n }\n\n export interface Exceptions {\n Source: string;\n Exception: Exception[];\n }\n\n export interface Property {\n Name: string;\n RawValue: string;\n Formatted: string;\n Measure: string;\n Creator: string;\n CreatorType: string;\n }\n\n export interface Properties {\n Property: Property[];\n }\n\n export interface Scope {\n ScopeName: string;\n Id: string;\n ScopeType: string;\n Properties: Properties;\n }\n\n export interface Scopes {\n Scope: Scope[];\n }\n\n export interface Response {\n Exceptions: Exceptions;\n MaxVersion: string;\n WUID: string;\n Scopes: Scopes;\n }\n}\n\nexport function isWUQueryECLWorkunit(_: WUQuery.ECLWorkunit | WUInfo.Workunit): _ is WUQuery.ECLWorkunit {\n return (_ as WUQuery.ECLWorkunit).TotalClusterTime !== undefined;\n}\n\nexport function isWUInfoWorkunit(_: WUQuery.ECLWorkunit | WUInfo.Workunit): _ is WUInfo.Workunit {\n return (_ as WUInfo.Workunit).StateEx !== undefined;\n}\n\nexport class WorkunitsService extends Service {\n\n constructor(optsConnection: IOptions | IConnection) {\n super(optsConnection, \"WsWorkunits\", \"1.68\");\n }\n\n opts() {\n return this._connection.opts();\n }\n\n connection(): ESPConnection {\n return this._connection;\n }\n\n WUQuery(request: WUQuery.Request = {}): Promise<WUQuery.Response> {\n return this._connection.send(\"WUQuery\", request).then((response) => {\n return deepMixin({ Workunits: { ECLWorkunit: [] } }, response);\n });\n }\n\n WUInfo(_request: WUInfo.Request): Promise<WUInfo.Response> {\n const request: WUInfo.Request = {\n Wuid: \"\",\n TruncateEclTo64k: true,\n IncludeExceptions: false,\n IncludeGraphs: false,\n IncludeSourceFiles: false,\n IncludeResults: false,\n IncludeResultsViewNames: false,\n IncludeVariables: false,\n IncludeTimers: false,\n IncludeDebugValues: false,\n IncludeApplicationValues: false,\n IncludeWorkflows: false,\n IncludeXmlSchemas: false,\n IncludeResourceURLs: false,\n SuppressResultSchemas: true,\n ..._request\n };\n return this._connection.send(\"WUInfo\", request);\n }\n\n WUCreate(): Promise<WUCreate.Response> {\n return this._connection.send(\"WUCreate\");\n }\n\n WUUpdate(request: WUUpdate.Request): Promise<WUUpdate.Response> {\n return this._connection.send(\"WUUpdate\", request, \"json\", true);\n }\n\n WUSubmit(request: WUSubmit.Request): Promise<WUSubmit.Response> {\n return this._connection.send(\"WUSubmit\", request);\n }\n\n WUResubmit(request: WUResubmit.Request): Promise<WUResubmit.Response> {\n this._connection.toESPStringArray(request, \"Wuids\");\n return this._connection.send(\"WUResubmit\", request);\n }\n\n WUQueryDetails(request: WUQueryDetails.Request): Promise<WUQueryDetails.Response> {\n return this._connection.send(\"WUQueryDetails\", request);\n }\n\n WUListQueries(request: WUListQueries.Request): Promise<WUListQueries.Response> {\n return this._connection.send(\"WUListQueries\", request);\n }\n\n WUPushEvent(request: WUPushEvent.Request): Promise<WUPushEvent.Response> {\n return this._connection.send(\"WUPushEvent\", request);\n }\n\n WUAction(request: WUAction.Request): Promise<WUAction.Response> {\n (request as any).ActionType = request.WUActionType; // v5.x compatibility\n return this._connection.send(\"WUAction\", request);\n }\n\n WUGetZAPInfo(request: WUGetZAPInfo.Request): Promise<WUGetZAPInfo.Response> {\n return this._connection.send(\"WUGetZAPInfo\", request);\n }\n\n WUShowScheduled(request: WUShowScheduled.Request): Promise<WUShowScheduled.Response> {\n return this._connection.send(\"WUShowScheduled\", request);\n }\n\n WUQuerySetAliasAction(request: WUQuerySetAliasAction.Request): Promise<WUQuerySetAliasAction.Response> {\n return this._connection.send(\"WUQuerySetAliasAction\", request);\n }\n\n WUQuerySetQueryAction(request: WUQuerySetQueryAction.Request): Promise<WUQuerySetQueryAction.Response> {\n return this._connection.send(\"WUQuerySetQueryAction\", request);\n }\n\n WUPublishWorkunit(request: WUPublishWorkunit.Request): Promise<WUPublishWorkunit.Response> {\n return this._connection.send(\"WUPublishWorkunit\", request);\n }\n\n WUGetGraph(request: WUGetGraph.Request): Promise<WUGetGraph.Response> {\n return this._connection.send(\"WUGetGraph\", request);\n }\n\n WUResult(request: WUResult.Request): Promise<WUResult.Response> {\n return this._connection.send(\"WUResult\", request);\n }\n\n WUQueryGetGraph(request: WUQueryGetGraph.Request): Promise<WUQueryGetGraph.Response> {\n return this._connection.send(\"WUQueryGetGraph\", request);\n }\n\n WUFile(request: WUFileRequest): Promise<string> {\n return this._connection.send(\"WUFile\", request, \"text\");\n }\n\n WUGetStats(request: WUGetStats.Request): Promise<WUGetStats.Response> {\n return this._connection.send(\"WUGetStats\", request);\n }\n\n private _WUDetailsMetaPromise: Promise<WUDetailsMeta.Response>;\n WUDetailsMeta(request: WUDetailsMeta.Request): Promise<WUDetailsMeta.Response> {\n if (!this._WUDetailsMetaPromise) {\n this._WUDetailsMetaPromise = this._connection.send(\"WUDetailsMeta\", request);\n }\n return this._WUDetailsMetaPromise;\n }\n\n WUDetails(request: WUDetails.Request): Promise<WUDetails.Response> {\n return this._connection.send(\"WUDetails\", request);\n }\n\n WUCDebug(request: WUCDebug.Request): Promise<XMLNode | null> {\n return this._connection.send(\"WUCDebug\", request).then((response) => {\n const retVal = xml2json(response.Result);\n const children = retVal.children();\n if (children.length) {\n return children[0];\n }\n return null;\n });\n }\n}\n","var t0 = new Date,\n t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = new Date(+date)), date;\n }\n\n interval.floor = interval;\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function(date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n do range.push(new Date(+start)); while (offseti(start, step), floori(start), start < stop)\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n if (date >= date) while (--step >= 0) while (offseti(date, 1), !test(date)) {} // eslint-disable-line no-empty\n });\n };\n\n if (count) {\n interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function(step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? function(d) { return field(d) % step === 0; }\n : function(d) { return interval.count(0, d) % step === 0; });\n };\n }\n\n return interval;\n}\n","import interval from \"./interval\";\n\nvar millisecond = interval(function() {\n // noop\n}, function(date, step) {\n date.setTime(+date + step);\n}, function(start, end) {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return interval(function(date) {\n date.setTime(Math.floor(date / k) * k);\n }, function(date, step) {\n date.setTime(+date + step * k);\n }, function(start, end) {\n return (end - start) / k;\n });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;\n","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;\n","import interval from \"./interval\";\nimport {durationSecond} from \"./duration\";\n\nvar second = interval(function(date) {\n date.setTime(Math.floor(date / durationSecond) * durationSecond);\n}, function(date, step) {\n date.setTime(+date + step * durationSecond);\n}, function(start, end) {\n return (end - start) / durationSecond;\n}, function(date) {\n return date.getUTCSeconds();\n});\n\nexport default second;\nexport var seconds = second.range;\n","import interval from \"./interval\";\nimport {durationMinute} from \"./duration\";\n\nvar minute = interval(function(date) {\n date.setTime(Math.floor(date / durationMinute) * durationMinute);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getMinutes();\n});\n\nexport default minute;\nexport var minutes = minute.range;\n","import interval from \"./interval\";\nimport {durationHour, durationMinute} from \"./duration\";\n\nvar hour = interval(function(date) {\n var offset = date.getTimezoneOffset() * durationMinute % durationHour;\n if (offset < 0) offset += durationHour;\n date.setTime(Math.floor((+date - offset) / durationHour) * durationHour + offset);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getHours();\n});\n\nexport default hour;\nexport var hours = hour.range;\n","import interval from \"./interval\";\nimport {durationDay, durationMinute} from \"./duration\";\n\nvar day = interval(function(date) {\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setDate(date.getDate() + step);\n}, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function(date) {\n return date.getDate() - 1;\n});\n\nexport default day;\nexport var days = day.range;\n","import interval from \"./interval\";\nimport {durationMinute, durationWeek} from \"./duration\";\n\nfunction weekday(i) {\n return interval(function(date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n","import interval from \"./interval\";\n\nvar month = interval(function(date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n return date.getMonth();\n});\n\nexport default month;\nexport var months = month.range;\n","import interval from \"./interval\";\n\nvar year = interval(function(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function(date) {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;\n","import interval from \"./interval\";\nimport {durationMinute} from \"./duration\";\n\nvar utcMinute = interval(function(date) {\n date.setUTCSeconds(0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getUTCMinutes();\n});\n\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;\n","import interval from \"./interval\";\nimport {durationHour} from \"./duration\";\n\nvar utcHour = interval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getUTCHours();\n});\n\nexport default utcHour;\nexport var utcHours = utcHour.range;\n","import interval from \"./interval\";\nimport {durationDay} from \"./duration\";\n\nvar utcDay = interval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n return (end - start) / durationDay;\n}, function(date) {\n return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n","import interval from \"./interval\";\nimport {durationWeek} from \"./duration\";\n\nfunction utcWeekday(i) {\n return interval(function(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n","import interval from \"./interval\";\n\nvar utcMonth = interval(function(date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n return date.getUTCMonth();\n});\n\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;\n","import interval from \"./interval\";\n\nvar utcYear = interval(function(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newYear(y) {\n return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, newDate) {\n return function(string) {\n var d = newYear(1900),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newYear(d.y)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = newDate(newYear(d.y)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return newDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", localDate);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier, utcDate);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n var map = {}, i = -1, n = names.length;\n while (++i < n) map[names[i].toLowerCase()] = i;\n return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d), d), p, 2);\n}\n\nfunction formatWeekNumberISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d), d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d), d), p, 2);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d), d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import formatLocale from \"./locale\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","import {utcFormat} from \"./defaultLocale\";\n\nexport var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n ? formatIsoNative\n : utcFormat(isoSpecifier);\n\nexport default formatIso;\n","import {isoSpecifier} from \"./isoFormat\";\nimport {utcParse} from \"./defaultLocale\";\n\nfunction parseIsoNative(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n ? parseIsoNative\n : utcParse(isoSpecifier);\n\nexport default parseIso;\n","import { Cache, Edge, Graph, StateObject, StringAnyMap, Subgraph, Vertex, XMLNode } from \"@hpcc-js/util\";\nimport { WUInfo } from \"../services/wsWorkunits\";\nimport { BaseScope } from \"./scope\";\nimport { Timer } from \"./timer\";\nimport { Workunit } from \"./workunit\";\n\nexport interface ECLGraphEx extends WUInfo.ECLGraph {\n Time: number;\n}\n\nexport class ECLGraph extends StateObject<ECLGraphEx, ECLGraphEx> implements ECLGraphEx {\n protected wu: Workunit;\n\n get properties(): ECLGraphEx { return this.get(); }\n get Name(): string { return this.get(\"Name\"); }\n get Label(): string { return this.get(\"Label\"); }\n get Type(): string { return this.get(\"Type\"); }\n get Complete(): boolean { return this.get(\"Complete\"); }\n get WhenStarted(): string { return this.get(\"WhenStarted\"); }\n get WhenFinished(): string { return this.get(\"WhenFinished\"); }\n get Time(): number { return this.get(\"Time\"); }\n get Running(): boolean { return this.get(\"Running\"); }\n get RunningId(): number { return this.get(\"RunningId\"); }\n get Failed(): boolean { return this.get(\"Failed\"); }\n\n constructor(wu: Workunit, eclGraph: WUInfo.ECLGraph, eclTimers: Timer[]) {\n super();\n this.wu = wu;\n let duration = 0;\n for (const eclTimer of eclTimers) {\n if (eclTimer.GraphName === eclGraph.Name && !eclTimer.HasSubGraphId) {\n duration = Math.round(eclTimer.Seconds * 1000) / 1000;\n break;\n }\n }\n this.set({ Time: duration, ...eclGraph });\n }\n\n fetchScopeGraph(subgraphID?: string): Promise<ScopeGraph> {\n if (subgraphID) {\n return this.wu.fetchGraphDetails([subgraphID], [\"subgraph\"]).then((scopes) => {\n return createGraph(scopes);\n });\n }\n return this.wu.fetchGraphDetails([this.Name], [\"graph\"]).then((scopes) => {\n return createGraph(scopes);\n });\n }\n}\n\nexport class GraphCache extends Cache<WUInfo.ECLGraph, ECLGraph> {\n constructor() {\n super((obj) => {\n return Cache.hash([obj.Name]);\n });\n }\n}\n\ntype Callback = (tag: string, attributes: StringAnyMap, children: XMLNode[], _stack: XMLNode[]) => void;\nfunction walkXmlJson(node: XMLNode, callback: Callback, stack?: XMLNode[]) {\n stack = stack || [];\n stack.push(node);\n callback(node.name, node.$, node.children(), stack);\n node.children().forEach((childNode) => {\n walkXmlJson(childNode, callback, stack);\n });\n stack.pop();\n}\n\nfunction flattenAtt(nodes: XMLNode[]): StringAnyMap {\n const retVal: StringAnyMap = {};\n nodes.forEach((node: XMLNode) => {\n if (node.name === \"att\") {\n retVal[node.$[\"name\"]] = node.$[\"value\"];\n }\n });\n return retVal;\n}\n\nexport class XGMMLGraph extends Graph<StringAnyMap, StringAnyMap, StringAnyMap> { }\nexport class XGMMLSubgraph extends Subgraph<StringAnyMap, StringAnyMap, StringAnyMap> { }\nexport class XGMMLVertex extends Vertex<StringAnyMap, StringAnyMap, StringAnyMap> { }\nexport class XGMMLEdge extends Edge<StringAnyMap, StringAnyMap, StringAnyMap> { }\n\nexport function createXGMMLGraph(id: string, graphs: XMLNode): XGMMLGraph {\n const subgraphs: { [id: string]: XGMMLSubgraph } = {};\n const vertices: { [id: string]: XGMMLVertex } = {};\n const edges: { [id: string]: XGMMLEdge } = {};\n\n const graph = new XGMMLGraph((item) => {\n return item._![\"id\"];\n });\n\n const stack: XGMMLSubgraph[] = [graph.root];\n walkXmlJson(graphs, (tag: string, attributes: StringAnyMap, childNodes: XMLNode[], _stack) => {\n const top = stack[stack.length - 1];\n switch (tag) {\n case \"graph\":\n break;\n case \"node\":\n if (childNodes.length && childNodes[0].children().length && childNodes[0].children()[0].name === \"graph\") {\n const subgraph = top.createSubgraph(flattenAtt(childNodes));\n stack.push(subgraph);\n subgraphs[attributes[\"id\"]] = subgraph;\n } else {\n }\n // TODO: Is this really a node when its also a subgraph?\n const vertex = top.createVertex(flattenAtt(childNodes));\n vertices[attributes[\"id\"]] = vertex;\n break;\n case \"edge\":\n const edge = top.createEdge(vertices[attributes[\"source\"]], vertices[attributes[\"target\"]], flattenAtt(childNodes));\n edges[attributes[\"id\"]] = edge;\n break;\n default:\n }\n });\n return graph;\n}\n\nexport class ScopeGraph extends Graph<BaseScope, BaseScope, BaseScope> { }\nexport class ScopeSubgraph extends Subgraph<BaseScope, BaseScope, BaseScope> { }\nexport class ScopeVertex extends Vertex<BaseScope, BaseScope, BaseScope> { }\nexport class ScopeEdge extends Edge<BaseScope, BaseScope, BaseScope> { }\n\nexport function createGraph(scopes: BaseScope[]): ScopeGraph {\n const subgraphs: { [scopeName: string]: ScopeSubgraph } = {};\n const edges: { [scopeName: string]: BaseScope } = {};\n\n let graph: ScopeGraph | undefined;\n for (const scope of scopes) {\n switch (scope.ScopeType) {\n case \"graph\":\n graph = new ScopeGraph(item => item._!.Id, scope);\n subgraphs[scope.ScopeName] = graph.root;\n break;\n case \"subgraph\":\n if (!graph) {\n graph = new ScopeGraph(item => item._!.Id, scope);\n subgraphs[scope.ScopeName] = graph.root;\n }\n const scopeStack = scope.parentScope().split(\":\");\n let scopeParent1 = subgraphs[scope.parentScope()];\n while (scopeStack.length && !scopeParent1) {\n scopeParent1 = subgraphs[scopeStack.join(\":\")];\n scopeStack.pop();\n }\n if (!scopeParent1) {\n console.log(`Missing SG:Parent (${scope.Id}): ${scope.parentScope()}`);\n } else {\n const parent1: ScopeSubgraph = scopeParent1;\n subgraphs[scope.ScopeName] = parent1.createSubgraph(scope);\n }\n break;\n case \"activity\":\n const scopeParent2 = subgraphs[scope.parentScope()];\n if (!scopeParent2) {\n console.log(`Missing A:Parent (${scope.Id}): ${scope.parentScope()}`);\n } else {\n scopeParent2.createVertex(scope);\n }\n break;\n case \"edge\":\n edges[scope.ScopeName] = scope;\n break;\n }\n }\n for (const id in edges) {\n const scope = edges[id];\n const scopeParent3 = subgraphs[scope.parentScope()];\n if (!scopeParent3) {\n console.log(`Missing E:Parent (${scope.Id}): ${scope.parentScope()}`);\n } else {\n const parent3: ScopeSubgraph = scopeParent3;\n try {\n const source = graph!.vertex(scope.attr(\"IdSource\").RawValue);\n const target = graph!.vertex(scope.attr(\"IdTarget\").RawValue);\n parent3.createEdge(source, target, scope);\n } catch (e) {\n // const sourceIndex = scope.attr(\"SourceIndex\").RawValue;\n // const targetIndex = scope.attr(\"TargetIndex\").RawValue;\n console.log(`Invalid Edge: ${id}`);\n }\n }\n }\n return graph!;\n}\n","import { StateObject } from \"@hpcc-js/util\";\nimport { Workunit } from \"./workunit\";\n\nexport interface ResourceEx {\n URL: string;\n DisplayName: string;\n DisplayPath: string;\n}\n\nexport class Resource extends StateObject<ResourceEx, ResourceEx> implements ResourceEx {\n protected wu: Workunit;\n\n get properties(): ResourceEx { return this.get(); }\n get URL(): string { return this.get(\"URL\"); }\n get DisplayName(): string { return this.get(\"DisplayName\"); }\n get DisplayPath(): string { return this.get(\"DisplayPath\"); }\n\n constructor(wu: Workunit, url: string) {\n super();\n this.wu = wu;\n\n const cleanedURL = url.split(\"\\\\\").join(\"/\");\n const urlParts = cleanedURL.split(\"/\");\n const matchStr = \"res/\" + this.wu.Wuid + \"/\";\n let displayPath = \"\";\n let displayName = \"\";\n\n if (cleanedURL.indexOf(matchStr) === 0) {\n displayPath = cleanedURL.substr(matchStr.length);\n displayName = urlParts[urlParts.length - 1];\n }\n\n this.set({\n URL: url,\n DisplayName: displayName,\n DisplayPath: displayPath\n });\n }\n}\n","import { SAXStackParser, Stack, XMLNode } from \"@hpcc-js/util\";\n\nexport class XSDNode {\n protected e?: XMLNode;\n\n constructor(e: XMLNode) {\n this.e = e;\n }\n fix() {\n delete this.e;\n }\n}\n\nexport class XSDXMLNode extends XSDNode {\n name: string;\n type: string;\n attrs: { [key: string]: string } = {};\n private _children: XSDXMLNode[] = [];\n\n constructor(e: XMLNode) {\n super(e);\n }\n\n append(child: XSDXMLNode) {\n this._children.push(child);\n if (!this.type) {\n this.type = \"hpcc:childDataset\";\n }\n }\n\n fix() {\n this.name = this.e!.$[\"name\"];\n this.type = this.e!.$[\"type\"];\n for (let i = this._children.length - 1; i >= 0; --i) {\n const row = this._children[i];\n if (row.name === \"Row\" && row.type === undefined) {\n this._children.push(...row._children);\n this._children.splice(i, 1);\n }\n }\n super.fix();\n }\n\n children(): XSDXMLNode[] {\n return this._children;\n }\n\n charWidth() {\n let retVal: number = -1;\n\n switch (this.type) {\n case \"xs:boolean\":\n retVal = 5;\n break;\n case \"xs:integer\":\n retVal = 8;\n break;\n case \"xs:nonNegativeInteger\":\n retVal = 8;\n break;\n case \"xs:double\":\n retVal = 8;\n break;\n case \"xs:string\":\n retVal = 32;\n break;\n default:\n const numStr: string = \"0123456789\";\n const underbarPos: number = this.type.lastIndexOf(\"_\");\n const length: number = underbarPos > 0 ? underbarPos : this.type.length;\n let i: number = length - 1;\n for (; i >= 0; --i) {\n if (numStr.indexOf(this.type.charAt(i)) === -1)\n break;\n }\n if (i + 1 < length) {\n retVal = parseInt(this.type.substring(i + 1, length), 10);\n }\n if (this.type.indexOf(\"data\") === 0) {\n retVal *= 2;\n }\n break;\n }\n if (retVal < this.name.length)\n retVal = this.name.length;\n\n return retVal;\n }\n}\n\nexport class XSDSimpleType extends XSDNode {\n name: string;\n type: string;\n maxLength: number | undefined;\n\n protected _restricition?: XMLNode;\n protected _maxLength?: XMLNode;\n\n constructor(e: XMLNode) {\n super(e);\n }\n\n append(e: XMLNode) {\n switch (e.name) {\n case \"xs:restriction\":\n this._restricition = e;\n break;\n case \"xs:maxLength\":\n this._maxLength = e;\n break;\n default:\n }\n }\n\n fix() {\n this.name = this.e!.$[\"name\"];\n this.type = this._restricition!.$[\"base\"];\n this.maxLength = this._maxLength ? +this._maxLength!.$[\"value\"] : undefined;\n delete this._restricition;\n delete this._maxLength;\n super.fix();\n }\n}\n\nexport class XSDSchema {\n root: XSDXMLNode;\n simpleTypes: { [name: string]: XSDSimpleType } = {};\n\n fields(): XSDXMLNode[] {\n return this.root.children();\n }\n}\n\nclass XSDParser extends SAXStackParser {\n schema: XSDSchema = new XSDSchema();\n simpleType: XSDSimpleType;\n simpleTypes: { [name: string]: XSDSimpleType } = {};\n\n xsdStack: Stack<XSDXMLNode> = new Stack<XSDXMLNode>();\n\n startXMLNode(e: XMLNode) {\n super.startXMLNode(e);\n switch (e.name) {\n case \"xs:element\":\n const xsdXMLNode = new XSDXMLNode(e);\n if (!this.schema.root) {\n this.schema.root = xsdXMLNode;\n } else if (this.xsdStack.depth()) {\n this.xsdStack.top()!.append(xsdXMLNode);\n }\n this.xsdStack.push(xsdXMLNode);\n break;\n case \"xs:simpleType\":\n this.simpleType = new XSDSimpleType(e);\n break;\n default:\n break;\n }\n }\n\n endXMLNode(e: XMLNode) {\n switch (e!.name) {\n case \"xs:element\":\n const xsdXMLNode = this.xsdStack.pop();\n xsdXMLNode!.fix();\n break;\n case \"xs:simpleType\":\n this.simpleType.fix();\n this.simpleTypes[this.simpleType.name] = this.simpleType;\n delete this.simpleType;\n break;\n case \"xs:appinfo\":\n const xsdXMLNode2 = this.xsdStack.top();\n for (const key in e.$) {\n xsdXMLNode2!.attrs[key] = e.$[key];\n }\n break;\n default:\n if (this.simpleType) {\n this.simpleType.append(e);\n }\n }\n super.endXMLNode(e);\n }\n}\n\nexport function parseXSD(xml: string): XSDSchema {\n const saxParser = new XSDParser();\n saxParser.parse(xml);\n return saxParser.schema;\n}\n\nclass XSDParser2 extends XSDParser {\n _rootName: string;\n schema: XSDSchema = new XSDSchema();\n simpleType: XSDSimpleType;\n simpleTypes: { [name: string]: XSDSimpleType } = {};\n\n xsdStack: Stack<XSDXMLNode> = new Stack<XSDXMLNode>();\n\n constructor(rootName: string) {\n super();\n this._rootName = rootName;\n }\n\n startXMLNode(e: XMLNode) {\n super.startXMLNode(e);\n switch (e.name) {\n case \"xsd:element\":\n const xsdXMLNode = new XSDXMLNode(e);\n if (!this.schema.root && this._rootName === e.$.name) {\n this.schema.root = xsdXMLNode;\n }\n if (this.xsdStack.depth()) {\n this.xsdStack.top()!.append(xsdXMLNode);\n }\n this.xsdStack.push(xsdXMLNode);\n break;\n case \"xsd:simpleType\":\n this.simpleType = new XSDSimpleType(e);\n break;\n default:\n break;\n }\n }\n\n endXMLNode(e: XMLNode) {\n switch (e!.name) {\n case \"xsd:element\":\n const xsdXMLNode = this.xsdStack.pop()!;\n xsdXMLNode.fix();\n break;\n case \"xsd:simpleType\":\n break;\n default:\n break;\n }\n super.endXMLNode(e);\n }\n}\n\nexport function parseXSD2(xml: string, rootName): XSDSchema {\n const saxParser = new XSDParser2(rootName);\n saxParser.parse(xml);\n return saxParser.schema;\n}\n","import { debounce, StateObject } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { SMCActivity, SMCService } from \"../services/wsSMC\";\nimport { Workunit } from \"./workunit\";\n\nlet _activity: Activity;\n\nexport interface ActivityEx {\n}\n\nexport type UActivityState = SMCActivity.Response & ActivityEx;\nexport type IActivityState = SMCActivity.Response | ActivityEx;\nexport class Activity extends StateObject<UActivityState, IActivityState> implements UActivityState {\n protected connection: SMCService;\n\n get properties(): UActivityState { return this.get(); }\n get Exceptions(): SMCActivity.Exceptions { return this.get(\"Exceptions\"); }\n get Build(): string { return this.get(\"Build\"); }\n get ThorClusterList(): SMCActivity.ThorClusterList { return this.get(\"ThorClusterList\"); }\n get RoxieClusterList(): SMCActivity.RoxieClusterList { return this.get(\"RoxieClusterList\"); }\n get HThorClusterList(): SMCActivity.HThorClusterList { return this.get(\"HThorClusterList\"); }\n get DFUJobs(): SMCActivity.DFUJobs { return this.get(\"DFUJobs\"); }\n get Running(): SMCActivity.Running { return this.get(\"Running\", { ActiveWorkunit: [] }); }\n get BannerContent(): string { return this.get(\"BannerContent\"); }\n get BannerColor(): string { return this.get(\"BannerColor\"); }\n get BannerSize(): string { return this.get(\"BannerSize\"); }\n get BannerScroll(): string { return this.get(\"BannerScroll\"); }\n get ChatURL(): string { return this.get(\"ChatURL\"); }\n get ShowBanner(): number { return this.get(\"ShowBanner\"); }\n get ShowChatURL(): number { return this.get(\"ShowChatURL\"); }\n get SortBy(): string { return this.get(\"SortBy\"); }\n get Descending(): boolean { return this.get(\"Descending\"); }\n get SuperUser(): boolean { return this.get(\"SuperUser\"); }\n get AccessRight(): string { return this.get(\"AccessRight\"); }\n get ServerJobQueues(): SMCActivity.ServerJobQueues { return this.get(\"ServerJobQueues\"); }\n\n static attach(optsConnection: IOptions | IConnection | SMCService, state?: IActivityState): Activity {\n if (!_activity) {\n _activity = new Activity(optsConnection);\n }\n if (state) {\n _activity.set({\n ...state\n });\n }\n return _activity;\n }\n\n protected constructor(optsConnection: IOptions | IConnection | SMCService) {\n super();\n if (optsConnection instanceof SMCService) {\n this.connection = optsConnection;\n } else {\n this.connection = new SMCService(optsConnection);\n }\n this.clear({\n });\n }\n\n runningWorkunits(clusterName: string = \"\"): Workunit[] {\n return this.Running.ActiveWorkunit.filter(awu => clusterName === \"\" || awu.ClusterName === clusterName).map(awu => Workunit.attach(this.connection.connectionOptions(), awu.Wuid, awu));\n }\n\n lazyRefresh = debounce(async (): Promise<this> => {\n const response = await this.connection.Activity({});\n this.set(response);\n return this;\n });\n\n async refresh(): Promise<this> {\n return this.lazyRefresh();\n }\n}\n","import { Cache, exists, StateObject } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { WsDfu } from \"../services/wsDFU\";\nimport { WorkunitsService, WUInfo, WUResult } from \"../services/wsWorkunits\";\nimport { parseXSD, XSDSchema, XSDXMLNode } from \"./xsdParser\";\n\nexport class GlobalResultCache extends Cache<{ BaseUrl: string, Wuid: string, ResultName: string }, Result> {\n constructor() {\n super((obj) => {\n return `${obj.BaseUrl}-${obj.Wuid}-${obj.ResultName}`;\n });\n }\n}\nconst _results = new GlobalResultCache();\n\nexport interface ECLResultEx extends WUInfo.ECLResult {\n Wuid: string;\n ResultName?: string;\n ResultSequence?: number;\n LogicalFileName?: string;\n ResultViews: any[];\n}\n\nexport type UResulState = ECLResultEx & WsDfu.DFULogicalFile;\nexport type IResulState = ECLResultEx | WsDfu.DFULogicalFile;\nexport class Result extends StateObject<UResulState, IResulState> implements ECLResultEx {\n protected connection: WorkunitsService;\n get BaseUrl() { return this.connection.baseUrl; }\n protected xsdSchema: XSDSchema;\n\n get properties(): WUInfo.ECLResult { return this.get(); }\n get Wuid(): string { return this.get(\"Wuid\"); }\n get ResultName(): string | undefined { return this.get(\"ResultName\"); }\n get ResultSequence(): number | undefined { return this.get(\"ResultSequence\"); }\n get LogicalFileName(): string | undefined { return this.get(\"LogicalFileName\"); }\n get Name(): string { return this.get(\"Name\"); }\n get Sequence(): number { return this.get(\"Sequence\"); }\n get Value(): string { return this.get(\"Value\"); }\n get Link(): string { return this.get(\"Link\"); }\n get FileName(): string { return this.get(\"FileName\"); }\n get IsSupplied(): boolean { return this.get(\"IsSupplied\"); }\n get ShowFileContent() { return this.get(\"ShowFileContent\"); }\n get Total(): number { return this.get(\"Total\"); }\n get ECLSchemas(): WUInfo.ECLSchemas { return this.get(\"ECLSchemas\"); }\n get NodeGroup(): string { return this.get(\"NodeGroup\"); }\n get ResultViews(): any[] { return this.get(\"ResultViews\"); }\n get XmlSchema(): string { return this.get(\"XmlSchema\"); }\n\n static attach(optsConnection: IOptions | IConnection, wuid: string, resultName: string, state?: IResulState): Result {\n const retVal: Result = _results.get({ BaseUrl: optsConnection.baseUrl, Wuid: wuid, ResultName: resultName }, () => {\n return new Result(optsConnection, wuid, resultName);\n });\n if (state) {\n retVal.set(state);\n }\n return retVal;\n }\n\n // TODO: Make protected and add additional attach methodes.\n constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuidOrLogicalFile: string, resultName?: string | number);\n constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclResult: WUInfo.ECLResult, resultViews: any[]);\n constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuidOrLogicalFile: string, eclResultOrResultName?: WUInfo.ECLResult | string | number, resultViews: any[] = []) {\n super();\n if (optsConnection instanceof WorkunitsService) {\n this.connection = optsConnection;\n } else {\n this.connection = new WorkunitsService(optsConnection);\n }\n if (typeof eclResultOrResultName === \"undefined\") {\n this.set({\n LogicalFileName: wuidOrLogicalFile\n } as ECLResultEx);\n } else if (typeof eclResultOrResultName === \"string\") {\n this.set({\n Wuid: wuidOrLogicalFile,\n ResultName: eclResultOrResultName,\n ResultViews: resultViews\n } as ECLResultEx);\n } else if (typeof eclResultOrResultName === \"number\") {\n this.set({\n Wuid: wuidOrLogicalFile,\n ResultSequence: eclResultOrResultName,\n ResultViews: resultViews\n } as ECLResultEx);\n } else {\n this.set({\n Wuid: wuidOrLogicalFile,\n ResultName: eclResultOrResultName.Name,\n ResultViews: resultViews,\n ...eclResultOrResultName\n });\n }\n }\n\n isComplete() {\n return this.Total !== -1;\n }\n\n fetchXMLSchema(): Promise<XSDSchema | null> {\n if (this.xsdSchema) {\n return Promise.resolve(this.xsdSchema);\n }\n return this.WUResult().then((response) => {\n if (exists(\"Result.XmlSchema.xml\", response)) {\n this.xsdSchema = parseXSD(response.Result.XmlSchema.xml);\n return this.xsdSchema;\n }\n return null;\n });\n }\n\n async refresh(): Promise<this> {\n await this.fetchRows(0, 1, true);\n return this;\n }\n\n fetchRows(from: number = 0, count: number = -1, includeSchema: boolean = false, filter: { [key: string]: string | number } = {}): Promise<any[]> {\n return this.WUResult(from, count, !includeSchema, filter).then((response) => {\n const result = response.Result;\n delete response.Result; // Do not want it in \"set\"\n this.set({\n ...response\n } as any);\n if (exists(\"XmlSchema.xml\", result)) {\n this.xsdSchema = parseXSD(result.XmlSchema.xml);\n }\n if (exists(\"Row\", result)) {\n return result.Row;\n } else if (this.ResultName && exists(this.ResultName, result)) {\n return result[this.ResultName].Row;\n }\n return [];\n });\n }\n\n rootField(): XSDXMLNode | null {\n if (!this.xsdSchema) return null;\n return this.xsdSchema.root;\n }\n\n fields(): XSDXMLNode[] {\n if (!this.xsdSchema) return [];\n return this.xsdSchema.root.children();\n }\n\n protected WUResult(start: number = 0, count: number = 1, suppressXmlSchema: boolean = false, filter: { [key: string]: string | number } = {}): Promise<WUResult.Response> {\n const FilterBy = {\n NamedValue: {\n itemcount: 0\n }\n };\n for (const key in filter) {\n FilterBy.NamedValue[FilterBy.NamedValue.itemcount++] = {\n Name: key,\n Value: filter[key]\n };\n }\n const request: WUResult.Request = { FilterBy } as WUResult.Request;\n if (this.Wuid && this.ResultName !== undefined) {\n request.Wuid = this.Wuid;\n request.ResultName = this.ResultName;\n } else if (this.Wuid && this.ResultSequence !== undefined) {\n request.Wuid = this.Wuid;\n request.Sequence = this.ResultSequence;\n } else if (this.LogicalFileName && this.NodeGroup) {\n request.LogicalName = this.LogicalFileName;\n request.Cluster = this.NodeGroup;\n } else if (this.LogicalFileName) {\n request.LogicalName = this.LogicalFileName;\n }\n request.Start = start;\n request.Count = count;\n request.SuppressXmlSchema = suppressXmlSchema;\n return this.connection.WUResult(request).then((response) => {\n return response;\n });\n }\n}\n\nexport class ResultCache extends Cache<WUInfo.ECLResult, Result> {\n constructor() {\n super((obj) => {\n return Cache.hash([obj.Sequence, obj.Name, obj.FileName]);\n });\n }\n}\n","import { StateObject, StringAnyMap } from \"@hpcc-js/util\";\n// import { utcFormat, utcParse } from \"d3-time-format\";\nimport { WUDetails } from \"../services/wsWorkunits\";\nimport { Workunit } from \"./workunit\";\n\n// const formatter = utcFormat(\"%Y-%m-%dT%H:%M:%S.%LZ\");\n// const parser = utcParse(\"%Y-%m-%dT%H:%M:%S.%LZ\");\n\nexport interface AttributeEx extends WUDetails.Property {\n FormattedEnd?: string;\n}\n\nexport class Attribute extends StateObject<AttributeEx, AttributeEx> implements AttributeEx {\n readonly scope: BaseScope;\n\n get properties(): AttributeEx { return this.get(); }\n get Name(): string { return this.get(\"Name\"); }\n get RawValue(): string { return this.get(\"RawValue\"); }\n get Formatted(): string { return this.get(\"Formatted\"); }\n get FormattedEnd(): string | undefined { return this.get(\"FormattedEnd\"); }\n get Measure(): string { return this.get(\"Measure\"); }\n get Creator(): string { return this.get(\"Creator\"); }\n get CreatorType(): string { return this.get(\"CreatorType\"); }\n\n constructor(scope: BaseScope, attribute: WUDetails.Property) {\n super();\n this.scope = scope;\n this.set(attribute);\n }\n}\n\nexport interface ScopeEx extends WUDetails.Scope {\n}\n\nexport interface IScopeVisitor {\n start(scope: BaseScope): boolean;\n end(scope: BaseScope): boolean;\n}\n\nexport class BaseScope extends StateObject<ScopeEx, ScopeEx> implements ScopeEx {\n protected _attributeMap: { [key: string]: Attribute } = {};\n protected _children: BaseScope[] = [];\n\n get properties(): ScopeEx { return this.get(); }\n get ScopeName(): string { return this.get(\"ScopeName\"); }\n get Id(): string { return this.get(\"Id\"); }\n get ScopeType(): string { return this.get(\"ScopeType\"); }\n get Properties(): WUDetails.Properties { return this.get(\"Properties\", { Property: [] }); }\n get CAttributes(): Attribute[] {\n // Match \"started\" and time elapsed\n const retVal: Attribute[] = [];\n const timeElapsed: { start: AttributeEx | null, end: AttributeEx | null } = {\n start: null,\n end: null\n };\n this.Properties.Property.forEach((scopeAttr) => {\n if (scopeAttr.Measure === \"ts\" && scopeAttr.Name.indexOf(\"Started\") >= 0) {\n timeElapsed.start = scopeAttr;\n } else if (this.ScopeName && scopeAttr.Measure === \"ts\" && scopeAttr.Name.indexOf(\"Finished\") >= 0) {\n timeElapsed.end = scopeAttr;\n } else {\n retVal.push(new Attribute(this, scopeAttr));\n }\n });\n if (timeElapsed.start && timeElapsed.end) {\n // const endTime = parser(timeElapsed.start.Formatted);\n // endTime!.setMilliseconds(endTime!.getMilliseconds() + (+timeElapsed.elapsed.RawValue) / 1000000);\n // timeElapsed.start.FormattedEnd = formatter(endTime!);\n timeElapsed.start.FormattedEnd = timeElapsed.end.Formatted;\n retVal.push(new Attribute(this, timeElapsed.start));\n } else if (timeElapsed.start) {\n retVal.push(new Attribute(this, timeElapsed.start));\n } else if (timeElapsed.end) {\n retVal.push(new Attribute(this, timeElapsed.end)); // Should not happen?\n }\n return retVal;\n }\n\n constructor(scope: WUDetails.Scope) {\n super();\n this.update(scope);\n }\n\n update(scope: WUDetails.Scope) {\n this.set(scope);\n this.CAttributes.forEach((attr) => {\n this._attributeMap[attr.Name] = attr;\n });\n this.Properties.Property = [];\n for (const key in this._attributeMap) {\n if (this._attributeMap.hasOwnProperty(key)) {\n this.Properties.Property.push(this._attributeMap[key].properties);\n }\n }\n }\n\n parentScope(): string {\n const scopeParts = this.ScopeName.split(\":\");\n scopeParts.pop();\n return scopeParts.join(\":\");\n }\n\n children(): BaseScope[];\n children(_: BaseScope[]): BaseScope;\n children(_?: BaseScope[]): BaseScope[] | BaseScope {\n if (!arguments.length) return this._children;\n this._children = _!;\n return this;\n }\n\n walk(visitor: IScopeVisitor): boolean {\n if (visitor.start(this)) return true;\n for (const scope of this.children()) {\n if (scope.walk(visitor)) {\n return true;\n }\n }\n return visitor.end(this);\n }\n\n formattedAttrs(): StringAnyMap {\n const retVal: StringAnyMap = {};\n for (const attr in this._attributeMap) {\n retVal[attr] = this._attributeMap[attr].Formatted || this._attributeMap[attr].RawValue;\n }\n return retVal;\n }\n\n rawAttrs(): StringAnyMap {\n const retVal: StringAnyMap = {};\n for (const attr in this._attributeMap) {\n retVal[attr] = this._attributeMap[attr].RawValue;\n }\n return retVal;\n }\n\n hasAttr(name: string): boolean {\n return this._attributeMap[name] !== undefined;\n }\n\n attr(name: string): Attribute {\n return this._attributeMap[name] || new Attribute(this, {\n Creator: \"\",\n CreatorType: \"\",\n Formatted: \"\",\n Measure: \"\",\n Name: \"\",\n RawValue: \"\"\n });\n }\n\n attrMeasure(name: string): string {\n return this._attributeMap[name].Measure;\n }\n\n calcTooltip(parentScope?: BaseScope) {\n let label = \"\";\n const rows: string[] = [];\n label = this.Id;\n rows.push(`<tr><td class=\"key\">ID:</td><td class=\"value\">${this.Id}</td></tr>`);\n if (parentScope) {\n rows.push(`<tr><td class=\"key\">Parent ID:</td><td class=\"value\">${parentScope.Id}</td></tr>`);\n }\n rows.push(`<tr><td class=\"key\">Scope:</td><td class=\"value\">${this.ScopeName}</td></tr>`);\n const attrs = this.formattedAttrs();\n for (const key in attrs) {\n if (key === \"Label\") {\n label = attrs[key];\n } else {\n rows.push(`<tr><td class=\"key\">${key}</td><td class=\"value\">${attrs[key]}</td></tr>`);\n }\n }\n\n return `<div class=\"eclwatch_WUGraph_Tooltip\" style=\"max-width:480px\">\n <h4 align=\"center\">${label}</h4>\n <table>\n ${rows.join(\"\")}\n </table>\n </div>`;\n }\n}\n\nexport class Scope extends BaseScope {\n readonly wu: Workunit;\n\n constructor(wu: Workunit, scope: WUDetails.Scope) {\n super(scope);\n this.wu = wu;\n }\n}\n","import { StateObject } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { WorkunitsService, WUInfo } from \"../services/wsWorkunits\";\n\nexport interface ECLSourceFileEx extends WUInfo.ECLSourceFile {\n Wuid: string;\n}\n\nexport class SourceFile extends StateObject<ECLSourceFileEx, ECLSourceFileEx> implements ECLSourceFileEx {\n protected connection: WorkunitsService;\n\n get properties(): WUInfo.ECLSourceFile { return this.get(); }\n get Wuid(): string { return this.get(\"Wuid\"); }\n get FileCluster(): string { return this.get(\"FileCluster\"); }\n get Name(): string { return this.get(\"Name\"); }\n get IsSuperFile(): boolean { return this.get(\"IsSuperFile\"); }\n get Subs(): number { return this.get(\"Subs\"); }\n get Count(): number { return this.get(\"Count\"); }\n get ECLSourceFiles(): WUInfo.ECLSourceFiles { return this.get(\"ECLSourceFiles\"); }\n\n constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclSourceFile: WUInfo.ECLSourceFile) {\n super();\n if (optsConnection instanceof WorkunitsService) {\n this.connection = optsConnection;\n } else {\n this.connection = new WorkunitsService(optsConnection);\n }\n\n this.set({\n Wuid: wuid,\n ...eclSourceFile\n });\n }\n}\n","import { espTime2Seconds, StateObject } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { WorkunitsService, WUInfo } from \"../services/wsWorkunits\";\n\nexport interface ECLTimerEx extends WUInfo.ECLTimer {\n Wuid: string;\n Seconds: number;\n HasSubGraphId: boolean;\n}\n\nexport class Timer extends StateObject<ECLTimerEx, ECLTimerEx> implements ECLTimerEx {\n protected connection: WorkunitsService;\n\n get properties(): WUInfo.ECLTimer { return this.get(); }\n get Wuid(): string { return this.get(\"Wuid\"); }\n get Name(): string { return this.get(\"Name\"); }\n get Value(): string { return this.get(\"Value\"); }\n get Seconds(): number { return this.get(\"Seconds\"); }\n get GraphName(): string { return this.get(\"GraphName\"); }\n get SubGraphId(): number { return this.get(\"SubGraphId\"); }\n get HasSubGraphId(): boolean { return this.get(\"HasSubGraphId\"); }\n get count(): number { return this.get(\"count\"); }\n\n constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclTimer: WUInfo.ECLTimer) {\n super();\n if (optsConnection instanceof WorkunitsService) {\n this.connection = optsConnection;\n } else {\n this.connection = new WorkunitsService(optsConnection);\n }\n\n const secs = espTime2Seconds(eclTimer.Value);\n this.set({\n Wuid: wuid,\n Seconds: Math.round(secs * 1000) / 1000,\n HasSubGraphId: eclTimer.SubGraphId !== undefined,\n ...eclTimer\n });\n }\n}\n","import { Cache, deepMixinT, IEvent, scopedLogger, StateCallback, StateEvents, StateObject, StatePropCallback, StringAnyMap, XMLNode } from \"@hpcc-js/util\";\nimport { utcFormat, utcParse } from \"d3-time-format\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { ESPExceptions } from \"../espConnection\";\nimport { SMCActivity } from \"../services/wsSMC\";\nimport * as WsTopology from \"../services/wsTopology\";\nimport * as WsWorkunits from \"../services/wsWorkunits\";\nimport { createGraph, createXGMMLGraph, ECLGraph, GraphCache, ScopeGraph, XGMMLGraph, XGMMLVertex } from \"./graph\";\nimport { Resource } from \"./resource\";\nimport { Result, ResultCache } from \"./result\";\nimport { BaseScope, Scope } from \"./scope\";\nimport { SourceFile } from \"./sourceFile\";\nimport { Timer } from \"./timer\";\n\nconst formatter = utcFormat(\"%Y-%m-%dT%H:%M:%S.%LZ\");\nconst parser = utcParse(\"%Y-%m-%dT%H:%M:%S.%LZ\");\nconst logger = scopedLogger(\"workunit.ts\");\n\nconst WUStateID = WsWorkunits.WUStateID;\n\nexport class WorkunitCache extends Cache<{ BaseUrl: string, Wuid: string }, Workunit> {\n constructor() {\n super((obj) => {\n return `${obj.BaseUrl}-${obj.Wuid}`;\n });\n }\n}\nconst _workunits = new WorkunitCache();\n\nexport interface DebugState {\n sequence: number;\n state: string;\n [key: string]: any;\n}\n\nexport interface IWorkunit {\n ResultViews: any[];\n HelpersCount: number;\n}\n\nexport interface IDebugWorkunit {\n DebugState?: DebugState;\n}\n\nexport interface ITimeElapsed {\n scope: string;\n start: string;\n elapsed: number;\n finish: string;\n}\n\nexport type WorkunitEvents = \"completed\" | StateEvents;\nexport type UWorkunitState = WsWorkunits.WUQuery.ECLWorkunit & WsWorkunits.WUInfo.Workunit & SMCActivity.ActiveWorkunit & IWorkunit & IDebugWorkunit;\nexport type IWorkunitState = WsWorkunits.WUQuery.ECLWorkunit | WsWorkunits.WUInfo.Workunit | SMCActivity.ActiveWorkunit | IWorkunit | IDebugWorkunit;\nexport class Workunit extends StateObject<UWorkunitState, IWorkunitState> implements WsWorkunits.WUInfo.Workunit {\n connection: WsWorkunits.WorkunitsService;\n topologyConnection: WsTopology.TopologyService;\n get BaseUrl() { return this.connection.baseUrl; }\n\n private _debugMode: boolean = false;\n private _debugAllGraph: any;\n private _submitAction: WsWorkunits.WUUpdate.Action;\n\n // Accessors ---\n get properties(): WsWorkunits.WUQuery.ECLWorkunit & WsWorkunits.WUInfo.Workunit { return this.get(); }\n get Wuid(): string { return this.get(\"Wuid\"); }\n get Owner(): string { return this.get(\"Owner\", \"\"); }\n get Cluster(): string { return this.get(\"Cluster\", \"\"); }\n get Jobname(): string { return this.get(\"Jobname\", \"\"); }\n get Description(): string { return this.get(\"Description\", \"\"); }\n get ActionEx(): string { return this.get(\"ActionEx\", \"\"); }\n get StateID(): WsWorkunits.WUStateID { return this.get(\"StateID\", WsWorkunits.WUStateID.Unknown); }\n get State(): string { return this.get(\"State\") || WsWorkunits.WUStateID[this.StateID]; }\n get Protected(): boolean { return this.get(\"Protected\", false); }\n get Exceptions(): WsWorkunits.WUInfo.Exceptions2 { return this.get(\"Exceptions\", { ECLException: [] }); }\n get ResultViews(): any[] { return this.get(\"ResultViews\", []); }\n\n private _resultCache = new ResultCache();\n get ResultCount(): number { return this.get(\"ResultCount\", 0); }\n get Results(): WsWorkunits.WUInfo.Results { return this.get(\"Results\", { ECLResult: [] }); }\n get CResults(): Result[] {\n return this.Results.ECLResult.map((eclResult) => {\n return this._resultCache.get(eclResult, () => {\n return new Result(this.connection, this.Wuid, eclResult, this.ResultViews);\n });\n });\n }\n get SequenceResults(): { [key: number]: Result } {\n const retVal: { [key: number]: Result } = {};\n this.CResults.forEach((result) => {\n retVal[result.Sequence] = result;\n });\n return retVal;\n }\n get Timers(): WsWorkunits.WUInfo.Timers { return this.get(\"Timers\", { ECLTimer: [] }); }\n get CTimers(): Timer[] {\n return this.Timers.ECLTimer.map((eclTimer) => {\n return new Timer(this.connection, this.Wuid, eclTimer);\n });\n }\n\n private _graphCache = new GraphCache();\n get GraphCount(): number { return this.get(\"GraphCount\", 0); }\n get Graphs(): WsWorkunits.WUInfo.Graphs { return this.get(\"Graphs\", { ECLGraph: [] }); }\n get CGraphs(): ECLGraph[] {\n return this.Graphs.ECLGraph.map((eclGraph) => {\n return this._graphCache.get(eclGraph, () => {\n return new ECLGraph(this, eclGraph, this.CTimers);\n });\n });\n }\n get ThorLogList(): WsWorkunits.WUInfo.ThorLogList { return this.get(\"ThorLogList\"); }\n get ResourceURLCount(): number { return this.get(\"ResourceURLCount\", 0); }\n get ResourceURLs(): WsWorkunits.WUInfo.ResourceURLs { return this.get(\"ResourceURLs\", { URL: [] }); }\n get CResourceURLs(): Resource[] {\n return this.ResourceURLs.URL.map((url) => {\n return new Resource(this, url);\n });\n }\n get TotalClusterTime(): string { return this.get(\"TotalClusterTime\", \"\"); }\n get DateTimeScheduled(): string { return this.get(\"DateTimeScheduled\"); }\n get IsPausing(): boolean { return this.get(\"IsPausing\"); }\n get ThorLCR(): boolean { return this.get(\"ThorLCR\"); }\n get ApplicationValues(): WsWorkunits.WUInfo.ApplicationValues { return this.get(\"ApplicationValues\", { ApplicationValue: [] }); }\n get HasArchiveQuery(): boolean { return this.get(\"HasArchiveQuery\"); }\n get StateEx(): string { return this.get(\"StateEx\"); }\n get PriorityClass(): number { return this.get(\"PriorityClass\"); }\n get PriorityLevel(): number { return this.get(\"PriorityLevel\"); }\n get Snapshot(): string { return this.get(\"Snapshot\"); }\n get ResultLimit(): number { return this.get(\"ResultLimit\"); }\n get EventSchedule(): number { return this.get(\"EventSchedule\"); }\n get HaveSubGraphTimings(): boolean { return this.get(\"HaveSubGraphTimings\"); }\n get Query(): WsWorkunits.WUInfo.Query { return this.get(\"Query\"); }\n get HelpersCount(): number { return this.get(\"HelpersCount\", 0); }\n get Helpers(): WsWorkunits.WUInfo.Helpers { return this.get(\"Helpers\", { ECLHelpFile: [] }); }\n get DebugValues(): WsWorkunits.WUInfo.DebugValues { return this.get(\"DebugValues\"); }\n get AllowedClusters(): WsWorkunits.WUInfo.AllowedClusters { return this.get(\"AllowedClusters\"); }\n get ErrorCount(): number { return this.get(\"ErrorCount\", 0); }\n get WarningCount(): number { return this.get(\"WarningCount\", 0); }\n get InfoCount(): number { return this.get(\"InfoCount\", 0); }\n get AlertCount(): number { return this.get(\"AlertCount\", 0); }\n get SourceFileCount(): number { return this.get(\"SourceFileCount\", 0); }\n get SourceFiles(): WsWorkunits.WUInfo.SourceFiles { return this.get(\"SourceFiles\", { ECLSourceFile: [] }); }\n get CSourceFiles(): SourceFile[] {\n return this.SourceFiles.ECLSourceFile.map(eclSourceFile => new SourceFile(this.connection, this.Wuid, eclSourceFile));\n }\n get VariableCount(): number { return this.get(\"VariableCount\", 0); }\n get Variables(): WsWorkunits.WUInfo.Variables { return this.get(\"Variables\", { ECLResult: [] }); }\n get TimerCount(): number { return this.get(\"TimerCount\", 0); }\n get HasDebugValue(): boolean { return this.get(\"HasDebugValue\"); }\n get ApplicationValueCount(): number { return this.get(\"ApplicationValueCount\", 0); }\n get XmlParams(): string { return this.get(\"XmlParams\"); }\n get AccessFlag(): number { return this.get(\"AccessFlag\"); }\n get ClusterFlag(): number { return this.get(\"ClusterFlag\"); }\n get ResultViewCount(): number { return this.get(\"ResultViewCount\", 0); }\n get DebugValueCount(): number { return this.get(\"DebugValueCount\", 0); }\n get WorkflowCount(): number { return this.get(\"WorkflowCount\", 0); }\n get Archived(): boolean { return this.get(\"Archived\"); }\n get RoxieCluster(): string { return this.get(\"RoxieCluster\"); }\n get DebugState(): DebugState { return this.get(\"DebugState\", {} as DebugState)!; }\n get Queue(): string { return this.get(\"Queue\"); }\n get Active(): boolean { return this.get(\"Active\"); }\n get Action(): number { return this.get(\"Action\"); }\n get Scope(): string { return this.get(\"Scope\"); }\n get AbortBy(): string { return this.get(\"AbortBy\"); }\n get AbortTime(): string { return this.get(\"AbortTime\"); }\n get Workflows(): WsWorkunits.WUInfo.Workflows { return this.get(\"Workflows\"); }\n get TimingData(): WsWorkunits.WUInfo.TimingData { return this.get(\"TimingData\"); }\n get HelpersDesc(): string { return this.get(\"HelpersDesc\"); }\n get GraphsDesc(): string { return this.get(\"GraphsDesc\"); }\n get SourceFilesDesc(): string { return this.get(\"GraphsDesc\"); }\n get ResultsDesc(): string { return this.get(\"GraphsDesc\"); }\n get VariablesDesc(): string { return this.get(\"GraphsDesc\"); }\n get TimersDesc(): string { return this.get(\"GraphsDesc\"); }\n get DebugValuesDesc(): string { return this.get(\"GraphsDesc\"); }\n get ApplicationValuesDesc(): string { return this.get(\"GraphsDesc\"); }\n get WorkflowsDesc(): string { return this.get(\"GraphsDesc\"); }\n\n // Factories ---\n static create(optsConnection: IOptions | IConnection): Promise<Workunit> {\n const retVal: Workunit = new Workunit(optsConnection);\n return retVal.connection.WUCreate().then((response) => {\n _workunits.set(retVal);\n retVal.set(response.Workunit);\n return retVal;\n });\n }\n\n static attach(optsConnection: IOptions | IConnection, wuid: string, state?: IWorkunitState): Workunit {\n const retVal: Workunit = _workunits.get({ BaseUrl: optsConnection.baseUrl, Wuid: wuid }, () => {\n return new Workunit(optsConnection, wuid);\n });\n if (state) {\n retVal.set(state);\n }\n return retVal;\n }\n\n static existsLocal(baseUrl: string, wuid: string): boolean {\n return _workunits.has({ BaseUrl: baseUrl, Wuid: wuid });\n }\n\n static submit(server: IOptions | IConnection, target: string, ecl: string): Promise<Workunit> {\n return Workunit.create(server).then((wu) => {\n return wu.update({ QueryText: ecl });\n }).then((wu) => {\n return wu.submit(target);\n });\n }\n\n static query(server: IOptions | IConnection, opts: WsWorkunits.WUQuery.Request): Promise<Workunit[]> {\n const wsWorkunits = new WsWorkunits.WorkunitsService(server);\n return wsWorkunits.WUQuery(opts).then((response) => {\n return response.Workunits.ECLWorkunit.map(function (wu) {\n return Workunit.attach(server, wu.Wuid, wu);\n });\n });\n }\n\n // --- --- ---\n protected constructor(optsConnection: IOptions | IConnection, wuid?: string) {\n super();\n this.connection = new WsWorkunits.WorkunitsService(optsConnection);\n this.topologyConnection = new WsTopology.TopologyService(optsConnection);\n this.clearState(wuid);\n }\n\n clearState(wuid?: string) {\n this.clear({\n Wuid: wuid,\n StateID: WUStateID.Unknown\n });\n }\n\n update(request: Partial<WsWorkunits.WUUpdate.Request>): Promise<Workunit> {\n return this.connection.WUUpdate({\n ...request,\n ...{\n Wuid: this.Wuid,\n StateOrig: this.State,\n JobnameOrig: this.Jobname,\n DescriptionOrig: this.Description,\n ProtectedOrig: this.Protected,\n ClusterOrig: this.Cluster\n }\n }).then((response) => {\n this.set(response.Workunit);\n return this;\n });\n }\n\n submit(_cluster?: string, action: WsWorkunits.WUUpdate.Action = WsWorkunits.WUUpdate.Action.Run, resultLimit?: number): Promise<Workunit> {\n let clusterPromise;\n if (_cluster !== void 0) {\n clusterPromise = Promise.resolve(_cluster);\n } else {\n clusterPromise = this.topologyConnection.DefaultTpLogicalClusterQuery().then((response) => {\n return response.Name;\n });\n }\n\n this._debugMode = false;\n if (action === WsWorkunits.WUUpdate.Action.Debug) {\n action = WsWorkunits.WUUpdate.Action.Run;\n this._debugMode = true;\n }\n\n return clusterPromise.then((cluster) => {\n return this.connection.WUUpdate({\n Wuid: this.Wuid,\n Action: action,\n ResultLimit: resultLimit,\n DebugValues: {\n DebugValue: [\n {\n Name: \"Debug\",\n Value: this._debugMode ? \"1\" : \"\"\n }\n ]\n }\n }).then((response) => {\n this.set(response.Workunit);\n this._submitAction = action;\n return this.connection.WUSubmit({ Wuid: this.Wuid, Cluster: cluster });\n });\n }).then(() => {\n return this;\n });\n }\n\n isComplete(): boolean {\n switch (this.StateID) {\n case WUStateID.Compiled:\n return this.ActionEx === \"compile\" || this._submitAction === WsWorkunits.WUUpdate.Action.Compile;\n case WUStateID.Completed:\n case WUStateID.Failed:\n case WUStateID.Aborted:\n case WUStateID.NotFound:\n return true;\n default:\n }\n return false;\n }\n\n isFailed() {\n switch (this.StateID) {\n case WUStateID.Aborted:\n case WUStateID.Failed:\n return true;\n default:\n }\n return false;\n }\n\n isDeleted() {\n switch (this.StateID) {\n case WUStateID.NotFound:\n return true;\n default:\n }\n return false;\n }\n\n isDebugging() {\n switch (this.StateID) {\n case WUStateID.DebugPaused:\n case WUStateID.DebugRunning:\n return true;\n default:\n }\n return this._debugMode;\n }\n\n isRunning(): boolean {\n switch (this.StateID) {\n case WUStateID.Compiled:\n case WUStateID.Running:\n case WUStateID.Aborting:\n case WUStateID.Blocked:\n case WUStateID.DebugPaused:\n case WUStateID.DebugRunning:\n return true;\n default:\n }\n return false;\n }\n\n setToFailed() {\n return this.WUAction(\"SetToFailed\");\n }\n\n pause() {\n return this.WUAction(\"Pause\");\n }\n\n pauseNow() {\n return this.WUAction(\"PauseNow\");\n }\n\n resume() {\n return this.WUAction(\"Resume\");\n }\n\n abort() {\n return this.WUAction(\"Abort\");\n }\n\n delete() {\n return this.WUAction(\"Delete\");\n }\n\n restore() {\n return this.WUAction(\"Restore\");\n }\n\n deschedule() {\n return this.WUAction(\"Deschedule\");\n }\n\n reschedule() {\n return this.WUAction(\"Reschedule\");\n }\n\n resubmit(): Promise<Workunit> {\n return this.WUResubmit({\n CloneWorkunit: false,\n ResetWorkflow: false\n }).then(() => {\n this.clearState(this.Wuid);\n return this.refresh().then(() => {\n this._monitor();\n return this;\n });\n });\n }\n\n clone(): Promise<Workunit> {\n return this.WUResubmit({\n CloneWorkunit: true,\n ResetWorkflow: false\n }).then((response) => {\n return Workunit.attach(this.connection.connection(), response.WUs.WU[0].WUID)\n .refresh()\n ;\n });\n }\n\n async refreshState(): Promise<this> {\n await this.WUQuery();\n return this;\n }\n\n async refreshInfo(): Promise<this> {\n await this.WUInfo();\n return this;\n }\n\n async refreshDebug(): Promise<this> {\n await this.debugStatus();\n return this;\n }\n\n async refresh(full: boolean = false): Promise<this> {\n if (full) {\n await Promise.all([this.refreshInfo(), this.refreshDebug()]);\n } else {\n await this.refreshState();\n }\n return this;\n }\n\n eclExceptions(): WsWorkunits.WUInfo.ECLException[] {\n return this.Exceptions.ECLException;\n }\n\n fetchArchive(): Promise<string> {\n return this.connection.WUFile({\n Wuid: this.Wuid,\n Type: \"ArchiveQuery\"\n });\n }\n\n fetchECLExceptions(): Promise<WsWorkunits.WUInfo.ECLException[]> {\n return this.WUInfo({ IncludeExceptions: true }).then(() => {\n return this.eclExceptions();\n });\n }\n\n fetchResults(): Promise<Result[]> {\n return this.WUInfo({ IncludeResults: true }).then(() => {\n return this.CResults;\n });\n }\n\n fetchGraphs(): Promise<ECLGraph[]> {\n return this.WUInfo({ IncludeGraphs: true }).then(() => {\n return this.CGraphs;\n });\n }\n\n fetchDetailsMeta(request: Partial<WsWorkunits.WUDetailsMeta.Request> = {}): Promise<WsWorkunits.WUDetailsMeta.Response> {\n return this.WUDetailsMeta(request);\n }\n\n fetchDetailsRaw(request: Partial<WsWorkunits.WUDetails.Request> = {}): Promise<WsWorkunits.WUDetails.Scope[]> {\n return this.WUDetails(request).then(response => response.Scopes.Scope);\n }\n\n fetchDetailsNormalized(request: Partial<WsWorkunits.WUDetails.Request> = {}): Promise<{ meta: WsWorkunits.WUDetailsMeta.Response, columns: { [id: string]: any }, data: object[] }> {\n return Promise.all([this.fetchDetailsMeta(), this.fetchDetailsRaw(request)]).then(promises => {\n const meta = promises[0];\n const scopes = promises[1];\n const columns: { [id: string]: any } = {\n id: {\n Measure: \"label\"\n },\n name: {\n Measure: \"label\"\n },\n type: {\n Measure: \"label\"\n }\n };\n const data: object[] = [];\n for (const scope of scopes) {\n const props = {};\n if (scope && scope.Id && scope.Properties && scope.Properties.Property) {\n for (const key in scope.Properties.Property) {\n const scopeProperty = scope.Properties.Property[key];\n if (scopeProperty.Measure === \"ns\") {\n scopeProperty.Measure = \"s\";\n }\n columns[scopeProperty.Name] = { ...scopeProperty };\n delete columns[scopeProperty.Name].RawValue;\n delete columns[scopeProperty.Name].Formatted;\n switch (scopeProperty.Measure) {\n case \"bool\":\n props[scopeProperty.Name] = !!+scopeProperty.RawValue;\n break;\n case \"sz\":\n props[scopeProperty.Name] = +scopeProperty.RawValue;\n break;\n case \"s\":\n props[scopeProperty.Name] = +scopeProperty.RawValue / 1000000000;\n break;\n case \"ns\":\n props[scopeProperty.Name] = +scopeProperty.RawValue;\n break;\n case \"ts\":\n props[scopeProperty.Name] = new Date(+scopeProperty.RawValue / 1000).toISOString();\n break;\n case \"cnt\":\n props[scopeProperty.Name] = +scopeProperty.RawValue;\n break;\n case \"cpu\":\n case \"skw\":\n case \"node\":\n case \"ppm\":\n case \"ip\":\n case \"cy\":\n case \"en\":\n case \"txt\":\n case \"id\":\n case \"fname\":\n default:\n props[scopeProperty.Name] = scopeProperty.RawValue;\n }\n }\n data.push({\n id: scope.Id,\n name: scope.ScopeName,\n type: scope.ScopeType,\n ...props\n });\n }\n }\n return {\n meta,\n columns,\n data\n };\n });\n }\n\n fetchDetails(request: Partial<WsWorkunits.WUDetails.Request> = {}): Promise<Scope[]> {\n return this.WUDetails(request).then((response) => {\n return response.Scopes.Scope.map((rawScope) => {\n return new Scope(this, rawScope);\n });\n });\n }\n\n fetchDetailsHierarchy(request: Partial<WsWorkunits.WUDetails.Request> = {}): Promise<Scope[]> {\n return this.WUDetails(request).then((response) => {\n const retVal: Scope[] = [];\n\n // Recreate Scope Hierarchy and dedup ---\n const scopeMap: { [key: string]: Scope } = {};\n response.Scopes.Scope.forEach((rawScope) => {\n if (scopeMap[rawScope.ScopeName]) {\n scopeMap[rawScope.ScopeName].update(rawScope);\n return null;\n } else {\n const scope = new Scope(this, rawScope);\n scopeMap[scope.ScopeName] = scope;\n return scope;\n }\n });\n for (const key in scopeMap) {\n if (scopeMap.hasOwnProperty(key)) {\n const scope = scopeMap[key];\n const parentScopeID = scope.parentScope();\n if (parentScopeID && scopeMap[parentScopeID]) {\n scopeMap[parentScopeID].children().push(scope);\n } else {\n retVal.push(scope);\n }\n }\n }\n\n return retVal;\n });\n }\n\n fetchGraphDetails(graphIDs: string[] = [], rootTypes: string[]): Promise<BaseScope[]> {\n return this.fetchDetails({\n ScopeFilter: {\n MaxDepth: 999999,\n Ids: graphIDs,\n ScopeTypes: rootTypes\n },\n NestedFilter: {\n Depth: 999999,\n ScopeTypes: [\"graph\", \"subgraph\", \"activity\", \"edge\"]\n },\n PropertiesToReturn: {\n AllStatistics: true,\n AllAttributes: true,\n AllHints: true,\n AllProperties: true,\n AllScopes: true\n },\n ScopeOptions: {\n IncludeId: true,\n IncludeScope: true,\n IncludeScopeType: true\n },\n PropertyOptions: {\n IncludeName: true,\n IncludeRawValue: true,\n IncludeFormatted: true,\n IncludeMeasure: true,\n IncludeCreator: false,\n IncludeCreatorType: false\n }\n });\n }\n\n fetchScopeGraphs(graphIDs: string[] = []): Promise<ScopeGraph> {\n return this.fetchGraphDetails(graphIDs, [\"graph\"]).then((scopes) => {\n return createGraph(scopes);\n });\n }\n\n fetchTimeElapsed(): Promise<ITimeElapsed[]> {\n return this.fetchDetails({\n ScopeFilter: {\n PropertyFilters: {\n PropertyFilter: [{ Name: \"TimeElapsed\" }]\n }\n }\n }).then((scopes) => {\n const scopeInfo: { [key: string]: ITimeElapsed } = {};\n scopes.forEach((scope) => {\n scopeInfo[scope.ScopeName] = scopeInfo[scope.ScopeName] || {\n scope: scope.ScopeName,\n start: null,\n elapsed: null,\n finish: null\n };\n scope.CAttributes.forEach((attr) => {\n if (attr.Name === \"TimeElapsed\") {\n scopeInfo[scope.ScopeName].elapsed = +attr.RawValue;\n } else if (attr.Measure === \"ts\" && attr.Name.indexOf(\"Started\") >= 0) {\n scopeInfo[scope.ScopeName].start = attr.Formatted;\n }\n });\n });\n // Workaround duplicate scope responses\n const retVal: ITimeElapsed[] = [];\n for (const key in scopeInfo) {\n const scope = scopeInfo[key];\n if (scope.start && scope.elapsed) {\n const endTime = parser(scope.start);\n endTime!.setMilliseconds(endTime!.getMilliseconds() + scope.elapsed / 1000000);\n scope.finish = formatter(endTime!);\n retVal.push(scope);\n }\n }\n retVal.sort((l, r) => {\n if (l.start < r.start) return -1;\n if (l.start > r.start) return 1;\n return 0;\n });\n return retVal;\n });\n }\n\n // Monitoring ---\n protected _monitor(): void {\n if (this.isComplete()) {\n this._monitorTickCount = 0;\n return;\n }\n super._monitor();\n }\n\n protected _monitorTimeoutDuraction(): number {\n const retVal = super._monitorTimeoutDuraction();\n if (this._monitorTickCount <= 1) { // Once\n return 1000;\n } else if (this._monitorTickCount <= 3) { // Twice\n return 3000;\n } else if (this._monitorTickCount <= 5) { // Twice\n return 5000;\n } else if (this._monitorTickCount <= 7) { // Twice\n return 10000;\n }\n return retVal;\n }\n\n // Events ---\n on(eventID: WorkunitEvents, propIDorCallback: StateCallback | keyof UWorkunitState, callback?: StatePropCallback): this {\n if (this.isCallback(propIDorCallback)) {\n switch (eventID) {\n case \"completed\":\n super.on(\"propChanged\", \"StateID\", (changeInfo: IEvent) => {\n if (this.isComplete()) {\n propIDorCallback([changeInfo]);\n }\n });\n break;\n case \"changed\":\n super.on(eventID, propIDorCallback);\n break;\n default:\n }\n } else {\n switch (eventID) {\n case \"changed\":\n super.on(eventID, propIDorCallback, callback!);\n break;\n default:\n }\n }\n this._monitor();\n return this;\n }\n\n watchUntilComplete(callback?: StateCallback): Promise<this> {\n return new Promise((resolve, _) => {\n const watchHandle = this.watch((changes) => {\n if (callback) {\n callback(changes);\n }\n if (this.isComplete()) {\n watchHandle.release();\n resolve(this);\n }\n });\n });\n }\n\n watchUntilRunning(callback?: StateCallback): Promise<this> {\n return new Promise((resolve, _) => {\n const watchHandle = this.watch((changes) => {\n if (callback) {\n callback(changes);\n }\n if (this.isComplete() || this.isRunning()) {\n watchHandle.release();\n resolve(this);\n }\n });\n });\n }\n\n // WsWorkunits passthroughs ---\n protected WUQuery(_request: Partial<WsWorkunits.WUQuery.Request> = {}): Promise<WsWorkunits.WUQuery.Response> {\n return this.connection.WUQuery({ ..._request, Wuid: this.Wuid }).then((response) => {\n this.set(response.Workunits.ECLWorkunit[0]);\n return response;\n }).catch((e: ESPExceptions) => {\n // deleted ---\n const wuMissing = e.Exception.some((exception) => {\n if (exception.Code === 20081) {\n this.clearState(this.Wuid);\n this.set(\"StateID\", WUStateID.NotFound);\n return true;\n }\n return false;\n });\n if (!wuMissing) {\n logger.warning(\"Unexpected exception: \");\n throw e;\n }\n return {} as WsWorkunits.WUQuery.Response;\n });\n }\n\n protected WUCreate() {\n return this.connection.WUCreate().then((response) => {\n this.set(response.Workunit);\n _workunits.set(this);\n return response;\n });\n }\n\n protected WUInfo(_request: Partial<WsWorkunits.WUInfo.Request> = {}): Promise<WsWorkunits.WUInfo.Response> {\n const includeResults = _request.IncludeResults || _request.IncludeResultsViewNames;\n return this.connection.WUInfo({\n ..._request, Wuid: this.Wuid,\n IncludeResults: includeResults,\n IncludeResultsViewNames: includeResults,\n SuppressResultSchemas: false\n }).then((response) => {\n this.set(response.Workunit);\n if (includeResults) {\n this.set({\n ResultViews: response.ResultViews\n } as IWorkunitState);\n }\n return response;\n }).catch((e: ESPExceptions) => {\n // deleted ---\n const wuMissing = e.Exception.some((exception) => {\n if (exception.Code === 20080) {\n this.clearState(this.Wuid);\n this.set(\"StateID\", WUStateID.NotFound);\n return true;\n }\n return false;\n });\n if (!wuMissing) {\n logger.warning(\"Unexpected exception: \");\n throw e;\n }\n return {} as WsWorkunits.WUInfo.Response;\n });\n }\n\n protected WUResubmit(request: Partial<WsWorkunits.WUResubmit.Request>): Promise<WsWorkunits.WUResubmit.Response> {\n return this.connection.WUResubmit(deepMixinT<WsWorkunits.WUResubmit.Request>({}, request, {\n Wuids: [this.Wuid]\n }));\n }\n\n protected WUDetailsMeta(request: Partial<WsWorkunits.WUDetailsMeta.Request>): Promise<WsWorkunits.WUDetailsMeta.Response> {\n return this.connection.WUDetailsMeta(request);\n }\n\n protected WUDetails(request: Partial<WsWorkunits.WUDetails.Request>): Promise<WsWorkunits.WUDetails.Response> {\n return this.connection.WUDetails(deepMixinT<WsWorkunits.WUDetails.Request>({\n ScopeFilter: {\n MaxDepth: 9999\n },\n ScopeOptions: {\n IncludeMatchedScopesInResults: true,\n IncludeScope: true,\n IncludeId: false,\n IncludeScopeType: false\n },\n PropertyOptions: {\n IncludeName: true,\n IncludeRawValue: false,\n IncludeFormatted: true,\n IncludeMeasure: true,\n IncludeCreator: false,\n IncludeCreatorType: false\n }\n }, request, { WUID: this.Wuid })).then((response) => {\n return deepMixinT<WsWorkunits.WUDetails.Response>({\n Scopes: {\n Scope: []\n }\n }, response);\n });\n }\n\n protected WUAction(actionType: WsWorkunits.WUAction.Type): Promise<WsWorkunits.WUAction.Response> {\n return this.connection.WUAction({\n Wuids: [this.Wuid],\n WUActionType: actionType\n }).then((response) => {\n return this.refresh().then(() => {\n this._monitor();\n return response;\n });\n });\n }\n\n publish(name?: string) {\n return this.connection.WUPublishWorkunit({\n Wuid: this.Wuid,\n Cluster: this.Cluster,\n JobName: name || this.Jobname,\n AllowForeignFiles: true,\n Activate: true,\n Wait: 5000\n });\n }\n\n protected WUCDebug(command: string, opts: any = {}): Promise<XMLNode | null> {\n let optsStr = \"\";\n for (const key in opts) {\n if (opts.hasOwnProperty(key)) {\n optsStr += ` ${key}='${opts[key]}'`;\n }\n }\n return this.connection.WUCDebug({\n Wuid: this.Wuid,\n Command: `<debug:${command} uid='${this.Wuid}'${optsStr}/>`\n }).then((response) => {\n return response;\n });\n }\n\n debug(command: string, opts?: object): Promise<XMLNode> {\n if (!this.isDebugging()) {\n return Promise.resolve(new XMLNode(command));\n }\n return this.WUCDebug(command, opts).then((response: XMLNode) => {\n const retVal: XMLNode[] = response.children(command);\n if (retVal.length) {\n return retVal[0];\n }\n return new XMLNode(command);\n }).catch((_) => {\n logger.error(_);\n return Promise.resolve(new XMLNode(command));\n });\n }\n\n debugStatus(): Promise<XMLNode> {\n if (!this.isDebugging()) {\n return Promise.resolve<any>({\n DebugState: { state: \"unknown\" }\n });\n }\n return this.debug(\"status\").then((response) => {\n const debugState = { ...this.DebugState, ...response.$ };\n this.set({\n DebugState: debugState\n });\n return response;\n });\n }\n\n debugContinue(mode = \"\"): Promise<XMLNode> {\n return this.debug(\"continue\", {\n mode\n });\n }\n\n debugStep(mode: string): Promise<XMLNode> {\n return this.debug(\"step\", {\n mode\n });\n }\n\n debugPause(): Promise<XMLNode> {\n return this.debug(\"interrupt\");\n }\n\n debugQuit(): Promise<XMLNode> {\n return this.debug(\"quit\");\n }\n\n debugDeleteAllBreakpoints(): Promise<XMLNode> {\n return this.debug(\"delete\", {\n idx: 0\n });\n }\n\n protected debugBreakpointResponseParser(rootNode: StringAnyMap) {\n return rootNode.children().map((childNode: XMLNode) => {\n if (childNode.name === \"break\") {\n return childNode.$;\n }\n });\n }\n\n debugBreakpointAdd(id: string, mode: string, action: string): Promise<XMLNode> {\n return this.debug(\"breakpoint\", {\n id,\n mode,\n action\n }).then((rootNode) => {\n return this.debugBreakpointResponseParser(rootNode);\n });\n }\n\n debugBreakpointList(): Promise<any[]> {\n return this.debug(\"list\").then((rootNode) => {\n return this.debugBreakpointResponseParser(rootNode);\n });\n }\n\n debugGraph(): Promise<XGMMLGraph> {\n if (this._debugAllGraph && this.DebugState[\"_prevGraphSequenceNum\"] === this.DebugState[\"graphSequenceNum\"]) {\n return Promise.resolve(this._debugAllGraph);\n }\n return this.debug(\"graph\", { name: \"all\" }).then((response) => {\n this.DebugState[\"_prevGraphSequenceNum\"] = this.DebugState[\"graphSequenceNum\"];\n this._debugAllGraph = createXGMMLGraph(this.Wuid, response);\n return this._debugAllGraph;\n });\n }\n\n debugBreakpointValid(path: string): Promise<IECLDefintion[]> {\n return this.debugGraph().then((graph) => {\n return breakpointLocations(graph, path);\n });\n }\n\n debugPrint(edgeID: string, startRow: number = 0, numRows: number = 10): Promise<StringAnyMap[]> {\n return this.debug(\"print\", {\n edgeID,\n startRow,\n numRows\n }).then((response: XMLNode) => {\n return response.children().map((rowNode) => {\n const retVal: StringAnyMap = {};\n rowNode.children().forEach((cellNode) => {\n retVal[cellNode.name] = cellNode.content;\n });\n return retVal;\n });\n });\n }\n}\n\nexport interface IECLDefintion {\n id: string;\n file: string;\n line: number;\n column: number;\n}\n\nconst ATTR_DEFINITION = \"definition\";\n\nfunction hasECLDefinition(vertex: XGMMLVertex): boolean {\n return vertex._![ATTR_DEFINITION] !== undefined;\n}\n\nfunction getECLDefinition(vertex: XGMMLVertex): IECLDefintion {\n const match = /([a-z]:\\\\(?:[-\\w\\.\\d]+\\\\)*(?:[-\\w\\.\\d]+)?|(?:\\/[\\w\\.\\-]+)+)\\((\\d*),(\\d*)\\)/.exec(vertex._![ATTR_DEFINITION]);\n if (match) {\n const [, _file, _row, _col] = match;\n _file.replace(\"/./\", \"/\");\n return {\n id: vertex._![\"id\"],\n file: _file,\n line: +_row,\n column: +_col\n };\n }\n throw new Error(`Bad definition: ${vertex._![ATTR_DEFINITION]}`);\n}\n\nfunction breakpointLocations(graph: XGMMLGraph, path?: string): IECLDefintion[] {\n const retVal: IECLDefintion[] = [];\n for (const vertex of graph.vertices) {\n if (hasECLDefinition(vertex)) {\n const definition = getECLDefinition(vertex);\n if (definition && !path || path === definition.file) {\n retVal.push(definition);\n }\n }\n }\n return retVal.sort((l, r) => {\n return l.line - r.line;\n });\n}\n","import { Cache, StateObject } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { DFUService, WsDfu } from \"../services/wsDFU\";\n\nexport class LogicalFileCache extends Cache<{ BaseUrl: string, Cluster: string, Name: string }, LogicalFile> {\n constructor() {\n super((obj) => {\n return `${obj.BaseUrl}-${obj.Cluster}-${obj.Name}`;\n });\n }\n}\nconst _store = new LogicalFileCache();\n\nexport interface FileDetailEx extends WsDfu.FileDetail {\n Cluster: string;\n}\n\nexport class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> implements FileDetailEx {\n protected connection: DFUService;\n get BaseUrl() { return this.connection.baseUrl; }\n\n get Cluster(): string { return this.get(\"Cluster\"); }\n get Name(): string { return this.get(\"Name\"); }\n\n get Filename(): string { return this.get(\"Filename\"); }\n get Prefix(): string { return this.get(\"Prefix\"); }\n get NodeGroup(): string { return this.get(\"NodeGroup\"); }\n get NumParts(): number { return this.get(\"NumParts\"); }\n get Description(): string { return this.get(\"Description\"); }\n get Dir(): string { return this.get(\"Dir\"); }\n get PathMask(): string { return this.get(\"PathMask\"); }\n get Filesize(): string { return this.get(\"Filesize\"); }\n get FileSizeInt64(): number { return this.get(\"FileSizeInt64\"); }\n get RecordSize(): string { return this.get(\"RecordSize\"); }\n get RecordCount(): string { return this.get(\"RecordCount\"); }\n get RecordSizeInt64(): number { return this.get(\"RecordSizeInt64\"); }\n get RecordCountInt64(): number { return this.get(\"RecordCountInt64\"); }\n get Wuid(): string { return this.get(\"Wuid\"); }\n get Owner(): string { return this.get(\"Owner\"); }\n get JobName(): string { return this.get(\"JobName\"); }\n get Persistent(): string { return this.get(\"Persistent\"); }\n get Format(): string { return this.get(\"Format\"); }\n get MaxRecordSize(): string { return this.get(\"MaxRecordSize\"); }\n get CsvSeparate(): string { return this.get(\"CsvSeparate\"); }\n get CsvQuote(): string { return this.get(\"CsvQuote\"); }\n get CsvTerminate(): string { return this.get(\"CsvTerminate\"); }\n get CsvEscape(): string { return this.get(\"CsvEscape\"); }\n get Modified(): string { return this.get(\"Modified\"); }\n get Ecl(): string { return this.get(\"Ecl\"); }\n get Stat(): WsDfu.Stat { return this.get(\"Stat\"); }\n get DFUFilePartsOnClusters(): WsDfu.DFUFilePartsOnClusters { return this.get(\"DFUFilePartsOnClusters\"); }\n get isSuperfile(): boolean { return this.get(\"isSuperfile\"); }\n get ShowFileContent(): boolean { return this.get(\"ShowFileContent\"); }\n get subfiles(): WsDfu.Subfiles { return this.get(\"subfiles\"); }\n get Superfiles(): WsDfu.Superfiles { return this.get(\"Superfiles\"); }\n get ProtectList(): WsDfu.ProtectList { return this.get(\"ProtectList\"); }\n get FromRoxieCluster(): boolean { return this.get(\"FromRoxieCluster\"); }\n get Graphs(): WsDfu.Graphs { return this.get(\"Graphs\"); }\n get UserPermission(): string { return this.get(\"UserPermission\"); }\n get ContentType(): string { return this.get(\"ContentType\"); }\n get CompressedFileSize(): number { return this.get(\"CompressedFileSize\"); }\n get PercentCompressed(): string { return this.get(\"PercentCompressed\"); }\n get IsCompressed(): boolean { return this.get(\"IsCompressed\"); }\n get BrowseData(): boolean { return this.get(\"BrowseData\"); }\n get jsonInfo(): string { return this.get(\"jsonInfo\"); }\n get binInfo(): string { return this.get(\"binInfo\"); }\n get PackageID(): string { return this.get(\"PackageID\"); }\n get Partition(): WsDfu.Partition { return this.get(\"Partition\"); }\n get Blooms(): WsDfu.Blooms { return this.get(\"Blooms\"); }\n get ExpireDays(): number { return this.get(\"ExpireDays\"); }\n get KeyType(): string { return this.get(\"KeyType\"); }\n\n get properties(): FileDetailEx { return this.get(); }\n\n static attach(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string): LogicalFile {\n const retVal: LogicalFile = _store.get({ BaseUrl: optsConnection.baseUrl, Cluster, Name }, () => {\n return new LogicalFile(optsConnection, Cluster, Name);\n });\n return retVal;\n }\n\n protected constructor(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string) {\n super();\n if (optsConnection instanceof DFUService) {\n this.connection = optsConnection;\n } else {\n this.connection = new DFUService(optsConnection);\n }\n\n this.clear({\n Cluster,\n Name\n });\n }\n\n fetchInfo(): Promise<WsDfu.FileDetail> {\n return this.connection.DFUInfo({ Cluster: this.Cluster, Name: this.Name }).then(response => {\n this.set({\n Cluster: this.Cluster,\n ...response.FileDetail\n });\n return response.FileDetail;\n });\n }\n}\n","import { Cache, StateObject } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { GetTargetClusterInfo, MachineService } from \"../services/wsMachine\";\n\nexport class MachineCache extends Cache<{ Address: string }, Machine> {\n constructor() {\n super((obj) => {\n return obj.Address;\n });\n }\n}\nconst _machines = new MachineCache();\n\nexport interface MachineInfoEx extends GetTargetClusterInfo.MachineInfoEx {\n}\n\nexport class Machine extends StateObject<MachineInfoEx, MachineInfoEx> implements MachineInfoEx {\n protected connection: MachineService;\n\n get Address(): string { return this.get(\"Address\"); }\n get ConfigAddress(): string { return this.get(\"ConfigAddress\"); }\n get Name(): string { return this.get(\"Name\"); }\n get ProcessType(): string { return this.get(\"ProcessType\"); }\n get DisplayType(): string { return this.get(\"DisplayType\"); }\n get Description(): string { return this.get(\"Description\"); }\n get AgentVersion(): string { return this.get(\"AgentVersion\"); }\n get Contact(): string { return this.get(\"Contact\"); }\n get Location(): string { return this.get(\"Location\"); }\n get UpTime(): string { return this.get(\"UpTime\"); }\n get ComponentName(): string { return this.get(\"ComponentName\"); }\n get ComponentPath(): string { return this.get(\"ComponentPath\"); }\n get RoxieState(): string { return this.get(\"RoxieState\"); }\n get RoxieStateDetails(): string { return this.get(\"RoxieStateDetails\"); }\n get OS(): number { return this.get(\"OS\"); }\n get ProcessNumber(): number { return this.get(\"ProcessNumber\"); }\n get Processors(): GetTargetClusterInfo.Processors { return this.get(\"Processors\"); }\n get Storage(): GetTargetClusterInfo.Storage { return this.get(\"Storage\"); }\n get Running(): GetTargetClusterInfo.Running { return this.get(\"Running\"); }\n get PhysicalMemory(): GetTargetClusterInfo.PhysicalMemory { return this.get(\"PhysicalMemory\"); }\n get VirtualMemory(): GetTargetClusterInfo.VirtualMemory { return this.get(\"VirtualMemory\"); }\n get ComponentInfo(): GetTargetClusterInfo.ComponentInfo { return this.get(\"ComponentInfo\"); }\n\n static attach(optsConnection: IOptions | IConnection | MachineService, address: string, state?: GetTargetClusterInfo.MachineInfoEx): Machine {\n const retVal: Machine = _machines.get({ Address: address }, () => {\n return new Machine(optsConnection);\n });\n if (state) {\n retVal.set(state);\n }\n return retVal;\n }\n\n private constructor(optsConnection: IOptions | IConnection | MachineService) {\n super();\n if (optsConnection instanceof MachineService) {\n this.connection = optsConnection;\n } else {\n this.connection = new MachineService(optsConnection);\n }\n }\n}\n","import { Cache, StateObject } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { EclService, IWsEclRequest, IWsEclResponse, IWsEclResult } from \"../services/wsEcl\";\nimport { WorkunitsService, WUQueryDetails } from \"../services/wsWorkunits\";\n\nexport interface QueryEx extends WUQueryDetails.Response {\n BaseUrl: string;\n}\n\nclass QueryCache extends Cache<QueryEx, Query> {\n constructor() {\n super((obj) => {\n return Cache.hash([obj.QueryId, obj.QuerySet]);\n });\n }\n}\nconst _queries = new QueryCache();\n\nexport class Query extends StateObject<QueryEx, QueryEx> implements QueryEx {\n protected connection: EclService;\n get BaseUrl() { return this.connection.baseUrl; }\n // protected _topology: Topology;\n protected _wsWorkunits: WorkunitsService;\n // protected _wu: Workunit;\n protected _requestSchema: IWsEclRequest;\n protected _responseSchema: IWsEclResponse;\n\n get properties(): WUQueryDetails.Response { return this.get(); }\n get Exceptions(): WUQueryDetails.Exceptions { return this.get(\"Exceptions\"); }\n get QueryId(): string { return this.get(\"QueryId\"); }\n get QuerySet(): string { return this.get(\"QuerySet\"); }\n get QueryName(): string { return this.get(\"QueryName\"); }\n get Wuid(): string { return this.get(\"Wuid\"); }\n get Dll(): string { return this.get(\"Dll\"); }\n get Suspended(): boolean { return this.get(\"Suspended\"); }\n get Activated(): boolean { return this.get(\"Activated\"); }\n get SuspendedBy(): string { return this.get(\"SuspendedBy\"); }\n get Clusters(): WUQueryDetails.Clusters { return this.get(\"Clusters\"); }\n get PublishedBy(): string { return this.get(\"PublishedBy\"); }\n get Comment() { return this.get(\"Comment\"); }\n get LogicalFiles(): WUQueryDetails.LogicalFiles { return this.get(\"LogicalFiles\"); }\n get SuperFiles(): WUQueryDetails.SuperFiles { return this.get(\"SuperFiles\"); }\n get IsLibrary(): boolean { return this.get(\"IsLibrary\"); }\n get Priority(): string { return this.get(\"Priority\"); }\n get WUSnapShot(): string { return this.get(\"WUSnapShot\"); }\n get CompileTime(): string { return this.get(\"CompileTime\"); }\n get LibrariesUsed(): WUQueryDetails.LibrariesUsed { return this.get(\"LibrariesUsed\"); }\n get CountGraphs(): number { return this.get(\"CountGraphs\"); }\n get ResourceURLCount(): number { return this.get(\"ResourceURLCount\"); }\n get WsEclAddresses(): WUQueryDetails.WsEclAddresses { return this.get(\"WsEclAddresses\"); }\n get WUGraphs(): WUQueryDetails.WUGraphs { return this.get(\"WUGraphs\"); }\n get WUTimers(): WUQueryDetails.WUTimers { return this.get(\"WUTimers\"); }\n\n private constructor(optsConnection: IOptions | IConnection | EclService, querySet: string, queryID: string, queryDetails?: WUQueryDetails.Response) {\n super();\n if (optsConnection instanceof EclService) {\n this.connection = optsConnection;\n // this._topology = new Topology(this.connection.opts());\n } else {\n this.connection = new EclService(optsConnection);\n // this._topology = new Topology(optsConnection);\n }\n this.set({\n QuerySet: querySet,\n QueryId: queryID,\n ...queryDetails\n } as QueryEx);\n }\n\n static attach(optsConnection: IOptions | IConnection, querySet: string, queryId: string): Query {\n const retVal: Query = _queries.get({ BaseUrl: optsConnection.baseUrl, QuerySet: querySet, QueryId: queryId } as QueryEx, () => {\n return new Query(optsConnection, querySet, queryId);\n });\n return retVal;\n }\n\n private async fetchRequestSchema(): Promise<void> {\n this._requestSchema = await this.connection.requestJson(this.QuerySet, this.QueryId);\n }\n\n private async fetchResponseSchema(): Promise<void> {\n this._responseSchema = await this.connection.responseJson(this.QuerySet, this.QueryId);\n }\n\n private async fetchSchema(): Promise<void> {\n await Promise.all([this.fetchRequestSchema(), this.fetchResponseSchema()]);\n }\n\n submit(request: object): Promise<Array<{ [key: string]: object[] }>> {\n return this.connection.submit(this.QuerySet, this.QueryId, request).then(results => {\n for (const key in results) {\n results[key] = results[key].Row;\n }\n return results;\n });\n }\n\n async refresh(): Promise<this> {\n return this.fetchSchema().then(schema => this);\n }\n\n requestFields(): IWsEclRequest {\n if (!this._requestSchema) return [];\n return this._requestSchema;\n }\n\n responseFields(): IWsEclResponse {\n if (!this._responseSchema) return {};\n return this._responseSchema;\n }\n\n resultNames(): string[] {\n const retVal: string[] = [];\n for (const key in this.responseFields()) {\n retVal.push(key);\n }\n return retVal;\n }\n\n resultFields(resultName: string): IWsEclResult {\n if (!this._responseSchema[resultName]) return [];\n return this._responseSchema[resultName];\n }\n\n /*\n protected WUQueryDetails(): Promise<WUQueryDetails.Response> {\n const request: WUQueryDetails.Request = {} as WUQueryDetails.Request;\n request.QueryId = this.QueryId;\n request.QuerySet = this.QuerySet;\n request.IncludeSuperFiles = true;\n request.IncludeStateOnClusters = true;\n return this.connection.WUQueryDetails(request).then((response) => {\n this.set(response);\n return response;\n });\n }\n */\n}\n","import { Cache, Dispatch, IObserverHandle, Message } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { StoreService } from \"../services/wsStore\";\n\nexport class StoreCache extends Cache<{ BaseUrl: string, Name: string, UserSpecific: boolean, Namespace: string }, Store> {\n constructor() {\n super((obj) => {\n return `${obj.BaseUrl}-${obj.Name}:${obj.UserSpecific}-${obj.Namespace}`;\n });\n }\n}\nconst _store = new StoreCache();\n\nexport class ValueChangedMessage extends Message {\n\n constructor(readonly key: string, public value: any, public oldValue?: any) {\n super();\n }\n\n get canConflate(): boolean { return true; }\n conflate(other: ValueChangedMessage): boolean {\n if (this.key === other.key) {\n this.value = other.value;\n return true;\n }\n return false;\n }\n\n void(): boolean {\n return this.value === this.oldValue;\n }\n}\n\nexport class Store {\n protected connection: StoreService;\n get BaseUrl() { return this.connection.baseUrl; }\n readonly Name: string;\n readonly UserSpecific: boolean;\n readonly Namespace: string;\n\n protected _dispatch = new Dispatch();\n\n static attach(optsConnection: IOptions | IConnection | StoreService, Name: string = \"HPCCApps\", Namespace: string, UserSpecific: boolean = true): Store {\n const retVal: Store = _store.get({ BaseUrl: optsConnection.baseUrl, Name, UserSpecific, Namespace }, () => {\n return new Store(optsConnection, Name, Namespace, UserSpecific);\n });\n return retVal;\n }\n\n protected constructor(optsConnection: IOptions | IConnection | StoreService, Name: string, Namespace: string, UserSpecific: boolean) {\n if (optsConnection instanceof StoreService) {\n this.connection = optsConnection;\n } else {\n this.connection = new StoreService(optsConnection);\n }\n this.Name = Name;\n this.UserSpecific = UserSpecific;\n this.Namespace = Namespace;\n }\n\n private _knownValues: { [key: string]: any } = {};\n\n protected create() {\n this.connection.CreateStore({ Name: this.Name, UserSpecific: this.UserSpecific, Type: \"\", Description: \"\" });\n }\n\n set(key: string, value: string, broadcast = true): Promise<void> {\n return this.connection.Set({\n StoreName: this.Name,\n UserSpecific: this.UserSpecific,\n Namespace: this.Namespace,\n Key: key,\n Value: value\n }).then(response => {\n const oldValue = this._knownValues[key];\n this._knownValues[key] = value;\n if (broadcast) {\n this._dispatch.post(new ValueChangedMessage(key, value, oldValue));\n }\n }).catch(e => {\n console.error(`Store.set(\"${key}\", \"${value}\") failed:`, e);\n });\n }\n\n get(key: string, broadcast = true): Promise<string | undefined> {\n return this.connection.Fetch({\n StoreName: this.Name,\n UserSpecific: this.UserSpecific,\n Namespace: this.Namespace,\n Key: key\n }).then(response => {\n const oldValue = this._knownValues[key];\n this._knownValues[key] = response.Value;\n if (broadcast) {\n this._dispatch.post(new ValueChangedMessage(key, response.Value, oldValue));\n }\n return response.Value;\n }).catch(e => {\n console.error(`Store.get(${key}) failed:`, e);\n return undefined;\n });\n }\n\n getAll(broadcast = true): Promise<{ [key: string]: string }> {\n return this.connection.FetchAll({\n StoreName: this.Name,\n UserSpecific: this.UserSpecific,\n Namespace: this.Namespace\n }).then(response => {\n const retVal: { [key: string]: string } = {};\n const deletedValues = this._knownValues;\n this._knownValues = {};\n response.Pairs.Pair.forEach(pair => {\n const oldValue = this._knownValues[pair.Key];\n this._knownValues[pair.Key] = pair.Value;\n delete deletedValues[pair.Key];\n retVal[pair.Key] = pair.Value;\n if (broadcast) {\n this._dispatch.post(new ValueChangedMessage(pair.Key, pair.Value, oldValue));\n }\n });\n if (broadcast) {\n for (const key in deletedValues) {\n this._dispatch.post(new ValueChangedMessage(key, undefined, deletedValues[key]));\n }\n }\n return retVal;\n }).catch(e => {\n console.error(\"Store.getAll failed:\", e);\n return {};\n });\n }\n\n delete(key: string, broadcast = true): Promise<void> {\n return this.connection.Delete({\n StoreName: this.Name,\n UserSpecific: this.UserSpecific,\n Namespace: this.Namespace,\n Key: key\n }).then(response => {\n const oldValue = this._knownValues[key];\n delete this._knownValues[key];\n if (broadcast) {\n this._dispatch.post(new ValueChangedMessage(key, undefined, oldValue));\n }\n }).catch(e => {\n console.error(`Store.delete(${key}) failed:`, e);\n });\n }\n\n monitor(callback: (messages: ValueChangedMessage[]) => void): IObserverHandle {\n return this._dispatch.attach(callback);\n }\n}\n","import { Cache, StateObject } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { GetTargetClusterInfo, GetTargetClusterUsageEx, MachineService } from \"../services/wsMachine\";\nimport { TopologyService, TpListTargetClusters, TpTargetClusterQuery } from \"../services/wsTopology\";\nimport { Machine } from \"./machine\";\n\nexport class TargetClusterCache extends Cache<{ BaseUrl: string, Name: string }, TargetCluster> {\n constructor() {\n super((obj) => {\n return `${obj.BaseUrl}-${obj.Name}`;\n });\n }\n}\nconst _targetCluster = new TargetClusterCache();\n\nexport interface TpTargetClusterEx {\n MachineInfoEx: GetTargetClusterInfo.MachineInfoEx[];\n}\n\nexport type UTargetClusterState = TpTargetClusterQuery.TpTargetCluster & TpListTargetClusters.TpClusterNameType & TpTargetClusterEx;\nexport type ITargetClusterState = TpTargetClusterQuery.TpTargetCluster | TpListTargetClusters.TpClusterNameType | TpTargetClusterEx;\nexport class TargetCluster extends StateObject<UTargetClusterState, ITargetClusterState> implements UTargetClusterState {\n protected connection: TopologyService;\n protected machineConnection: MachineService;\n get BaseUrl() { return this.connection.baseUrl; }\n\n get Name(): string { return this.get(\"Name\"); }\n get Prefix(): string { return this.get(\"Prefix\"); }\n get Type(): string { return this.get(\"Type\"); }\n get IsDefault(): boolean { return this.get(\"IsDefault\"); }\n get TpClusters(): TpTargetClusterQuery.TpClusters { return this.get(\"TpClusters\"); }\n get TpEclCCServers(): TpTargetClusterQuery.TpEclCCServers { return this.get(\"TpEclCCServers\"); }\n get TpEclServers(): TpTargetClusterQuery.TpEclServers { return this.get(\"TpEclServers\"); }\n get TpEclAgents(): TpTargetClusterQuery.TpEclAgents { return this.get(\"TpEclAgents\"); }\n get TpEclSchedulers(): TpTargetClusterQuery.TpEclSchedulers { return this.get(\"TpEclSchedulers\"); }\n get MachineInfoEx(): GetTargetClusterInfo.MachineInfoEx[] { return this.get(\"MachineInfoEx\", []); }\n get CMachineInfoEx(): Machine[] {\n return this.MachineInfoEx.map(machineInfoEx => Machine.attach(this.machineConnection, machineInfoEx.Address, machineInfoEx));\n }\n\n static attach(optsConnection: IOptions | IConnection | TopologyService, name: string, state?: ITargetClusterState): TargetCluster {\n const retVal: TargetCluster = _targetCluster.get({ BaseUrl: optsConnection.baseUrl, Name: name }, () => {\n return new TargetCluster(optsConnection, name);\n });\n if (state) {\n retVal.set({\n ...state\n });\n }\n return retVal;\n }\n\n protected constructor(optsConnection: IOptions | IConnection | TopologyService, name: string) {\n super();\n if (optsConnection instanceof TopologyService) {\n this.connection = optsConnection;\n this.machineConnection = new MachineService(optsConnection.connectionOptions());\n } else {\n this.connection = new TopologyService(optsConnection);\n this.machineConnection = new MachineService(optsConnection);\n }\n this.clear({\n Name: name\n });\n }\n\n fetchMachines(request: GetTargetClusterInfo.Request = {}): Promise<Machine[]> {\n return this.machineConnection.GetTargetClusterInfo({\n TargetClusters: {\n Item: [`${this.Type}:${this.Name}`]\n },\n ...request\n }).then(response => {\n const retVal: GetTargetClusterInfo.MachineInfoEx[] = [];\n for (const machineInfo of response.TargetClusterInfoList.TargetClusterInfo) {\n for (const machineInfoEx of machineInfo.Processes.MachineInfoEx) {\n retVal.push(machineInfoEx);\n }\n }\n this.set(\"MachineInfoEx\", retVal);\n return this.CMachineInfoEx;\n });\n }\n\n machineStats(): { maxDisk: number; meanDisk: number } {\n let maxDisk = 0;\n let totalFree = 0;\n let total = 0;\n for (const machine of this.CMachineInfoEx) {\n for (const storageInfo of machine.Storage.StorageInfo) {\n totalFree += storageInfo.Available;\n total += storageInfo.Total;\n const usage = 1 - storageInfo.Available / storageInfo.Total;\n if (usage > maxDisk) {\n maxDisk = usage;\n }\n }\n }\n return {\n maxDisk,\n meanDisk: 1 - (total ? totalFree / total : 1)\n };\n }\n\n fetchUsage(): Promise<GetTargetClusterUsageEx.TargetClusterUsage[]> {\n return this.machineConnection.GetTargetClusterUsageEx([this.Name]);\n }\n}\n\nexport function targetClusters(optsConnection: IOptions | IConnection | TopologyService): Promise<TargetCluster[]> {\n let connection: TopologyService;\n if (optsConnection instanceof TopologyService) {\n connection = optsConnection;\n } else {\n connection = new TopologyService(optsConnection);\n }\n return connection.TpListTargetClusters({}).then(response => {\n return response.TargetClusters.TpClusterNameType.map(item => TargetCluster.attach(optsConnection, item.Name, item));\n });\n}\n\nconst _defaultTargetCluster: { [baseUrl: string]: Promise<TargetCluster> } = {};\nexport function defaultTargetCluster(optsConnection: IOptions | IConnection | TopologyService): Promise<TargetCluster> {\n if (!_defaultTargetCluster[optsConnection.baseUrl]) {\n let connection: TopologyService;\n if (optsConnection instanceof TopologyService) {\n connection = optsConnection;\n } else {\n connection = new TopologyService(optsConnection);\n }\n _defaultTargetCluster[optsConnection.baseUrl] = connection.TpListTargetClusters({}).then(response => {\n let firstItem: TpListTargetClusters.TpClusterNameType;\n let defaultItem: TpListTargetClusters.TpClusterNameType;\n let hthorItem: TpListTargetClusters.TpClusterNameType;\n response.TargetClusters.TpClusterNameType.forEach(item => {\n if (!firstItem) {\n firstItem = item;\n }\n if (!defaultItem && item.IsDefault === true) {\n defaultItem = item;\n }\n if (!hthorItem && item.Type === \"hthor\") {\n hthorItem = item;\n }\n });\n const defItem = defaultItem || hthorItem || firstItem;\n return TargetCluster.attach(optsConnection, defItem.Name, defItem);\n });\n }\n return _defaultTargetCluster[optsConnection.baseUrl];\n}\n","import { exists, StateCallback, StateEvents, StateObject, StatePropCallback } from \"@hpcc-js/util\";\nimport { IConnection, IOptions } from \"../connection\";\nimport { TopologyService, TpTargetClusterQuery } from \"../services/wsTopology\";\nimport { TargetCluster } from \"./targetCluster\";\n\nexport interface TopologyStateEx {\n TargetClusters: TpTargetClusterQuery.TpTargetCluster[];\n}\nexport class Topology extends StateObject<TopologyStateEx, TopologyStateEx> implements TopologyStateEx {\n protected connection: TopologyService;\n\n // Accessors ---\n get properties(): TopologyStateEx { return this.get(); }\n get TargetClusters(): TpTargetClusterQuery.TpTargetCluster[] { return this.get(\"TargetClusters\"); }\n get CTargetClusters(): TargetCluster[] {\n return this.TargetClusters.map(tc => TargetCluster.attach(this.connection, tc.Name, tc));\n }\n\n constructor(optsConnection: IOptions | IConnection | TopologyService) {\n super();\n if (optsConnection instanceof TopologyService) {\n this.connection = optsConnection;\n } else {\n this.connection = new TopologyService(optsConnection);\n }\n }\n\n GetESPServiceBaseURL(type: string = \"\"): Promise<string> {\n return this.connection.TpServiceQuery({}).then(response => {\n const rootProtocol = this.connection.protocol();\n const ip = this.connection.ip();\n let port = rootProtocol === \"https:\" ? \"18002\" : \"8002\";\n if (exists(\"ServiceList.TpEspServers.TpEspServer\", response)) {\n for (const item of response.ServiceList.TpEspServers.TpEspServer) {\n if (exists(\"TpBindings.TpBinding\", item)) {\n for (const binding of item.TpBindings.TpBinding) {\n if (binding.Service === type && binding.Protocol + \":\" === rootProtocol) {\n port = binding.Port;\n }\n }\n }\n }\n }\n return `${rootProtocol}//${ip}:${port}/`;\n });\n }\n\n fetchTargetClusters(): Promise<TargetCluster[]> {\n return this.connection.TpTargetClusterQuery({ Type: \"ROOT\" }).then(response => {\n this.set({\n TargetClusters: response.TpTargetClusters.TpTargetCluster\n });\n return this.CTargetClusters;\n });\n }\n\n async refresh(): Promise<this> {\n await this.fetchTargetClusters();\n return this;\n }\n\n // Monitoring ---\n\n // Events ---\n on(eventID: StateEvents, propIDorCallback: StateCallback | keyof TopologyStateEx, callback?: StatePropCallback): this {\n if (this.isCallback(propIDorCallback)) {\n switch (eventID) {\n case \"changed\":\n super.on(eventID, propIDorCallback);\n break;\n default:\n }\n } else {\n switch (eventID) {\n case \"changed\":\n super.on(eventID, propIDorCallback, callback!);\n break;\n default:\n }\n }\n this._monitor();\n return this;\n }\n}\n","import * as fs from \"fs\";\nimport * as path from \"path\";\n\nimport { Dictionary, DictionaryNoCase, find, SAXStackParser, scopedLogger, XMLNode } from \"@hpcc-js/util\";\nimport { ClientTools, locateClientTools } from \"./eclcc\";\n\nconst logger = scopedLogger(\"clienttools/eclmeta\");\n\nexport interface IFilePath {\n scope: ECLScope;\n}\n\nconst _inspect = false;\nfunction inspect(obj: any, _id: string, known: any) {\n if (_inspect) {\n for (const key in obj) {\n const id = `${_id}.${key}`;\n if (key !== \"$\" && known[key] === undefined && known[key.toLowerCase() + \"s\"] === undefined) {\n logger.debug(id);\n }\n }\n if (obj.$) {\n inspect(obj.$, _id + \".$\", known);\n }\n }\n}\n\nexport class Attr {\n __attrs: { [id: string]: string };\n name: string;\n\n constructor(xmlAttr: XMLNode) {\n this.__attrs = xmlAttr.$;\n this.name = xmlAttr.$.name;\n }\n}\n\nexport class Field {\n __attrs: { [id: string]: string };\n definition: Definition;\n get scope(): ECLScope {\n return this.definition;\n }\n name: string;\n type: string;\n\n constructor(definition: Definition, xmlField: XMLNode) {\n this.__attrs = xmlField.$;\n this.definition = definition;\n this.name = xmlField.$.name;\n this.type = xmlField.$.type;\n }\n}\n\nexport interface ECLDefinitionLocation {\n filePath: string;\n line: number;\n charPos: number;\n definition?: Definition;\n source?: Source;\n}\n\nexport interface ISuggestion {\n name: string;\n type: string;\n}\n\nexport class ECLScope implements IFilePath {\n get scope(): ECLScope {\n return this;\n }\n name: string;\n type: string;\n sourcePath: string;\n line: number;\n start: number;\n body: number;\n end: number;\n definitions: Definition[];\n\n constructor(name: string, type: string, sourcePath: string, xmlDefinitions: XMLNode[], line: number = 1, start: number = 0, body: number = 0, end: number = Number.MAX_VALUE) {\n this.name = name;\n this.type = type;\n this.sourcePath = path.normalize(sourcePath);\n this.line = +line - 1;\n this.start = +start;\n this.body = +body;\n this.end = +end;\n this.definitions = this.parseDefinitions(xmlDefinitions);\n }\n\n private parseDefinitions(definitions: XMLNode[] = []): Definition[] {\n return definitions.map(definition => {\n const retVal = new Definition(this.sourcePath, definition);\n inspect(definition, \"definition\", retVal);\n return retVal;\n });\n }\n\n contains(charOffset: number) {\n return charOffset >= this.start && charOffset <= this.end;\n }\n\n scopeStackAt(charOffset: number): ECLScope[] {\n let retVal: ECLScope[] = [];\n if (this.contains(charOffset)) {\n retVal.push(this);\n this.definitions.forEach(def => {\n retVal = def.scopeStackAt(charOffset).concat(retVal);\n });\n }\n return retVal;\n }\n\n private _resolve(defs: Definition[] = [], qualifiedID: string): Definition | undefined {\n const qualifiedIDParts = qualifiedID.split(\".\");\n const base = qualifiedIDParts.shift();\n const retVal = find(defs, def => {\n if (typeof def.name === \"string\" && typeof base === \"string\" && def.name.toLowerCase() === base.toLowerCase()) {\n return true;\n }\n return false;\n });\n if (retVal && retVal.definitions.length && qualifiedIDParts.length) {\n return this._resolve(retVal.definitions, qualifiedIDParts.join(\".\"));\n }\n return retVal;\n }\n\n resolve(qualifiedID: string): Definition | undefined {\n return this._resolve(this.definitions, qualifiedID);\n }\n\n suggestions(): ISuggestion[] {\n return this.definitions.map(def => {\n return {\n name: def.name,\n type: this.type\n };\n });\n }\n}\n\nexport class Definition extends ECLScope {\n __attrs: { [id: string]: string };\n exported: boolean;\n shared: boolean;\n fullname: string;\n inherittype: string;\n attrs: Attr[];\n fields: Field[];\n\n constructor(sourcePath: string, xmlDefinition: XMLNode) {\n super(xmlDefinition.$.name, xmlDefinition.$.type, sourcePath, xmlDefinition.children(\"Definition\"), xmlDefinition.$.line, xmlDefinition.$.start, xmlDefinition.$.body, xmlDefinition.$.end);\n this.__attrs = xmlDefinition.$;\n this.exported = !!xmlDefinition.$.exported;\n this.shared = !!xmlDefinition.$.shared;\n this.fullname = xmlDefinition.$.fullname;\n this.inherittype = xmlDefinition.$.inherittype;\n this.attrs = this.parseAttrs(xmlDefinition.children(\"Attr\"));\n this.fields = this.parseFields(xmlDefinition.children(\"Field\"));\n }\n\n private parseAttrs(attrs: XMLNode[] = []): Attr[] {\n return attrs.map(attr => {\n const retVal = new Attr(attr);\n inspect(attr, \"attr\", retVal);\n return retVal;\n });\n }\n\n private parseFields(fields: XMLNode[] = []): Field[] {\n return fields.map(field => {\n const retVal = new Field(this, field);\n inspect(field, \"field\", retVal);\n return retVal;\n });\n }\n\n suggestions() {\n return super.suggestions().concat(this.fields.map(field => {\n return {\n name: field.name,\n type: field.type\n };\n }));\n }\n}\n\nexport class Import {\n __attrs: { [id: string]: string };\n name: string;\n ref: string;\n start: number;\n end: number;\n line: number;\n\n constructor(xmlImport: XMLNode) {\n this.__attrs = xmlImport.$;\n this.name = xmlImport.$.name;\n this.ref = xmlImport.$.ref;\n this.start = xmlImport.$.start;\n this.end = xmlImport.$.end;\n this.line = xmlImport.$.line;\n }\n}\n\nexport class Source extends ECLScope {\n imports: Import[];\n __attrs: { [id: string]: string };\n\n constructor(xmlSource: XMLNode) {\n super(xmlSource.$.name, \"source\", xmlSource.$.sourcePath, xmlSource.children(\"Definition\"));\n this.__attrs = xmlSource.$;\n const nameParts = xmlSource.$.name.split(\".\");\n nameParts.pop();\n const fakeNode = new XMLNode(\"\");\n fakeNode.appendAttribute(\"name\", \"$\");\n fakeNode.appendAttribute(\"ref\", nameParts.join(\".\"));\n this.imports = [\n new Import(fakeNode),\n ...this.parseImports(xmlSource.children(\"Import\"))\n ];\n }\n\n private parseImports(imports: XMLNode[] = []): Import[] {\n return imports.map(imp => {\n const retVal = new Import(imp);\n inspect(imp, \"import\", retVal);\n return retVal;\n });\n }\n\n resolve(qualifiedID: string, charOffset?: number): Definition | undefined {\n let retVal;\n\n // Check Inner Scopes ---\n if (!retVal && charOffset !== undefined) {\n const scopes = this.scopeStackAt(charOffset);\n scopes.some(scope => {\n retVal = scope.resolve(qualifiedID);\n return !!retVal;\n });\n }\n\n // Check Definitions ---\n if (!retVal) {\n retVal = super.resolve(qualifiedID);\n }\n return retVal;\n }\n}\n\nconst isHiddenDirectory = source => path.basename(source).indexOf(\".\") === 0;\nconst isDirectory = source => fs.lstatSync(source).isDirectory() && !isHiddenDirectory(source);\nconst isEcl = source => [\".ecl\", \".ecllib\"].indexOf(path.extname(source).toLowerCase()) >= 0;\nconst modAttrs = source => fs.readdirSync(source).map(name => path.join(source, name)).filter(path => isDirectory(path) || isEcl(path));\n\nexport class File extends ECLScope {\n\n constructor(name: string, sourcePath: string) {\n super(name, \"file\", sourcePath, []);\n }\n\n suggestions(): ISuggestion[] {\n return [];\n }\n}\n\nexport class Folder extends ECLScope {\n\n constructor(name: string, sourcePath: string) {\n super(name, \"folder\", sourcePath, []);\n }\n\n suggestions(): ISuggestion[] {\n return modAttrs(this.sourcePath).map(folder => {\n return {\n name: path.basename(folder, \".ecl\"),\n type: \"folder\"\n };\n });\n }\n}\n\nexport class Workspace {\n _workspacePath: string;\n _eclccPath?: string;\n _clientTools: ClientTools;\n _sourceByID: DictionaryNoCase<Source> = new DictionaryNoCase<Source>();\n _sourceByPath: Dictionary<Source> = new Dictionary<Source>();\n private _test: DictionaryNoCase<IFilePath> = new DictionaryNoCase<IFilePath>();\n\n constructor(workspacePath: string, eclccPath?: string) {\n this._workspacePath = workspacePath;\n this._eclccPath = eclccPath;\n }\n\n refresh() {\n this.primeWorkspace();\n this.primeClientTools();\n }\n\n primeClientTools(): Promise<this> {\n return locateClientTools(this._eclccPath, \"\", this._workspacePath).then(clientTools => {\n this._clientTools = clientTools;\n return clientTools.paths();\n }).then(paths => {\n for (const knownFolder of [\"ECLCC_ECLLIBRARY_PATH\", \"ECLCC_PLUGIN_PATH\"]) {\n if (paths[knownFolder] && fs.existsSync(paths[knownFolder])) {\n this.walkChildFolders(paths[knownFolder], paths[knownFolder]);\n }\n }\n return this;\n });\n }\n\n primeWorkspace() {\n if (fs.existsSync(this._workspacePath)) {\n this.visitFolder(this._workspacePath, this._workspacePath);\n }\n }\n\n walkChildFolders(folderPath: string, refPath: string, force: boolean = false) {\n for (const child of modAttrs(folderPath)) {\n if (!isDirectory(child)) {\n this.visitFile(child, refPath, force);\n } else {\n this.visitFolder(child, refPath, force);\n }\n }\n }\n\n visitFile(filePath: string, refPath: string, force: boolean = false) {\n const filePathInfo = path.parse(filePath);\n const pathNoExt = path.join(filePathInfo.dir, filePathInfo.name);\n const name = path.relative(refPath, pathNoExt).split(path.sep).join(\".\");\n if (force || !this._test.has(name)) {\n this._test.set(name, new File(\"\", filePath));\n }\n }\n\n visitFolder(folderPath: string, refPath: string, force: boolean = false) {\n const name = path.relative(refPath, folderPath).split(path.sep).join(\".\");\n if (force || !this._test.has(name)) {\n this._test.set(name, new Folder(name, folderPath));\n this.walkChildFolders(folderPath, refPath, force);\n }\n }\n\n buildStack(parentStack: string[], name: string, removeDupID: boolean): { stack: string[], qid: string } {\n const nameStack = name.split(\".\");\n if (removeDupID && parentStack[parentStack.length - 1] === nameStack[0]) {\n nameStack.shift();\n }\n const stack = [...parentStack, ...nameStack];\n const qid: string = stack.join(\".\");\n return {\n stack,\n qid\n };\n }\n\n walkECLScope(parentStack: string[], scope: ECLScope) {\n const info = this.buildStack(parentStack, scope.name, true);\n this._test.set(info.qid, scope);\n for (const def of scope.definitions) {\n this.walkDefinition(info.stack, def);\n }\n }\n\n walkField(parentStack: string[], field: Field) {\n const info = this.buildStack(parentStack, field.name, false);\n this._test.set(info.qid, field);\n }\n\n walkDefinition(parentStack: string[], definition: Definition) {\n const info = this.buildStack(parentStack, definition.name, true);\n this.walkECLScope(parentStack, definition);\n for (const field of definition.fields) {\n this.walkField(info.stack, field);\n }\n }\n\n walkSource(source: Source) {\n // const dirName = path.dirname(source.sourcePath);\n // const relName = path.relative(this._workspacePath, dirName).split(path.sep).join(\".\");\n // const folder = new Folder(relName, dirName);\n // this._test.set(folder.name, folder);\n this.walkECLScope([], source);\n }\n\n parseSources(sources: XMLNode[] = []): void {\n for (const _source of sources) {\n if (_source.$.name) { // Plugins have no name...\n const source = new Source(_source);\n inspect(_source, \"source\", source);\n this._sourceByID.set(source.name, source);\n this._sourceByPath.set(source.sourcePath, source);\n\n // If external source like \"std.system.ThorLib\" then need to backup to \"std\" and add its folder\n if (source.name) {\n const sourceNameParts = source.name.split(\".\");\n let depth = sourceNameParts.length;\n if (depth > 1) {\n let sourcePath = source.sourcePath;\n while (depth > 1) {\n sourcePath = path.dirname(sourcePath);\n --depth;\n }\n this.visitFolder(sourcePath, path.dirname(sourcePath));\n }\n }\n this.walkSource(source);\n }\n }\n }\n\n parseMetaXML(metaXML: string): string[] {\n const metaParser = new MetaParser();\n metaParser.parse(metaXML);\n this.parseSources(metaParser.sources);\n return metaParser.sources.map(source => path.normalize(source.$.sourcePath));\n }\n\n resolveQualifiedID(filePath: string, qualifiedID: string, charOffset?: number): ECLScope | undefined {\n let retVal: ECLScope | undefined;\n if (!retVal && this._test.has(qualifiedID)) {\n retVal = this._test.get(qualifiedID).scope;\n }\n if (!retVal && this._sourceByPath.has(filePath)) {\n const eclSource = this._sourceByPath.get(filePath);\n\n // Resolve Imports ---\n const qualifiedIDParts = qualifiedID.split(\".\");\n for (const imp of eclSource.imports) {\n if (imp.name.toLowerCase() === qualifiedIDParts[0].toLowerCase()) {\n if (imp.ref) {\n qualifiedIDParts[0] = imp.ref;\n } else {\n qualifiedIDParts.shift();\n }\n break;\n }\n }\n let realQID = qualifiedIDParts.join(\".\");\n if (!retVal && this._test.has(realQID)) {\n retVal = this._test.get(realQID).scope;\n }\n if (!retVal) {\n realQID = [...eclSource.name.split(\".\"), ...qualifiedIDParts].join(\".\");\n if (this._test.has(realQID)) {\n retVal = this._test.get(realQID).scope;\n }\n }\n }\n return retVal;\n }\n\n resolvePartialID(filePath: string, partialID: string, charOffset: number): ECLScope | undefined {\n partialID = partialID.toLowerCase();\n const partialIDParts = partialID.split(\".\");\n partialIDParts.pop();\n const partialIDQualifier = partialIDParts.length === 1 ? partialIDParts[0] : partialIDParts.join(\".\");\n return this.resolveQualifiedID(filePath, partialIDQualifier, charOffset);\n }\n}\n\nconst workspaceCache = new Dictionary<Workspace>();\nexport function attachWorkspace(_workspacePath: string, eclccPath?: string): Workspace {\n const workspacePath = path.normalize(_workspacePath);\n if (!workspaceCache.has(workspacePath)) {\n const workspace = new Workspace(workspacePath, eclccPath);\n workspaceCache.set(workspacePath, workspace);\n workspace.refresh();\n }\n return workspaceCache.get(workspacePath);\n}\n\nfunction isQualifiedIDChar(lineText: string, charPos: number, reverse: boolean) {\n if (charPos < 0) return false;\n const testChar = lineText.charAt(charPos);\n return (reverse ? /[a-zA-Z\\d_\\.$]/ : /[a-zA-Z\\d_]/).test(testChar);\n}\n\nexport function qualifiedIDBoundary(lineText: string, charPos: number, reverse: boolean) {\n while (isQualifiedIDChar(lineText, charPos, reverse)) {\n charPos += reverse ? -1 : 1;\n }\n return charPos + (reverse ? 1 : -1);\n}\n\nclass MetaParser extends SAXStackParser {\n sources: XMLNode[] = [];\n\n endXMLNode(e: XMLNode) {\n switch (e.name) {\n case \"Source\":\n this.sources.push(e);\n break;\n default:\n break;\n }\n super.endXMLNode(e);\n }\n}\n","import * as cp from \"child_process\";\nimport * as fs from \"fs\";\nimport * as os from \"os\";\nimport * as path from \"path\";\nimport * as tmp from \"tmp\";\n\nimport { exists, scopedLogger, xml2json, XMLNode } from \"@hpcc-js/util\";\nimport { attachWorkspace, Workspace } from \"./eclMeta\";\n\nconst logger = scopedLogger(\"clienttools/eclcc\");\nconst exeExt = os.type() === \"Windows_NT\" ? \".exe\" : \"\";\n\nexport class Version {\n readonly prefix: string = \"\";\n readonly major: number = 0;\n readonly minor: number = 0;\n readonly patch: number = 0;\n readonly postfix: string = \"\";\n\n constructor(build: string) {\n const parts = build.split(\" \");\n if (parts.length) {\n const match = /(?:(\\w+)_)?(\\d+)\\.(\\d+)\\.(\\d+)(?:-(.*))?/.exec(parts[parts.length - 1]);\n if (match) {\n this.prefix = match[1] || \"\";\n this.major = +match[2] || 0;\n this.minor = +match[3] || 0;\n this.patch = +match[4] || 0;\n this.postfix = match[5] || \"\";\n }\n }\n }\n\n parse(build: string) {\n }\n\n exists(): boolean {\n return this.major !== 0 || this.minor !== 0 || this.patch !== 0 || this.postfix !== \"\";\n }\n\n compare(other: Version): number {\n if (this.major > other.major) return 1;\n if (this.major < other.major) return -1;\n if (this.minor > other.minor) return 1;\n if (this.minor < other.minor) return -1;\n if (this.patch > other.patch) return 1;\n if (this.patch < other.patch) return -1;\n if (this.postfix === \"\" && other.postfix !== \"\") return 1;\n return this.postfix.localeCompare(other.postfix);\n }\n\n toString(): string {\n return `${this.prefix}_${this.major}.${this.minor}.${this.patch}-${this.postfix}`;\n }\n}\n\ninterface IExecFile {\n stderr: string;\n stdout: string;\n}\n\nexport interface IECLErrorWarning {\n filePath: string;\n line: number;\n col: number;\n msg: string;\n severity: string;\n}\n\nconst ERROR = \"error\";\nconst WARN = \"warning\";\n\nexport class Errors {\n protected _checked: string[];\n protected errWarn: IECLErrorWarning[] = [];\n protected errOther: string[] = [];\n\n constructor(checked: string[]) {\n this._checked = checked;\n }\n\n checked(): string[] {\n return this._checked;\n }\n\n all(): IECLErrorWarning[] {\n return this.errWarn;\n }\n\n errors(): IECLErrorWarning[] {\n return this.errWarn.filter(e => e.severity === ERROR);\n }\n\n hasError(): boolean {\n return this.errors().length > 0;\n }\n\n warnings(): IECLErrorWarning[] {\n return this.errWarn.filter(e => e.severity === WARN);\n }\n\n hasWarning(): boolean {\n return this.warnings().length > 0;\n }\n\n info(): IECLErrorWarning[] {\n return this.errWarn.filter(e => [ERROR, WARN].indexOf(e.severity) < 0);\n }\n\n hasOther(): boolean {\n return this.info().length > 0;\n }\n\n unknown(): string[] {\n return this.errOther;\n }\n\n hasUnknown(): boolean {\n return this.unknown().length > 0;\n }\n}\n\nexport class EclccErrors extends Errors {\n\n constructor(stdErr: string, checked: string[]) {\n super(checked);\n if (stdErr && stdErr.length) {\n for (const errLine of stdErr.split(os.EOL)) {\n let match = /([a-zA-Z]:\\\\(?:[- \\w\\.\\d]+\\\\)*(?:[- \\w\\.\\d]+)?|(?:\\/[\\w\\.\\-]+)+)\\((\\d*),(\\d*)\\) ?: ?(error|warning|info) C(\\d*) ?: ?(.*)/.exec(errLine);\n if (match) {\n const [, filePath, row, _col, severity, code, _msg] = match;\n const line: number = +row;\n const col: number = +_col;\n const msg = code + \": \" + _msg;\n this.errWarn.push({ filePath, line, col, msg, severity });\n continue;\n }\n match = /(error|warning|info): (.*)/i.exec(errLine);\n if (match) {\n const [, severity, msg] = match;\n this.errWarn.push({ filePath: \"\", line: 0, col: 0, msg, severity });\n continue;\n }\n match = /\\d error(s?), \\d warning(s?)/.exec(errLine);\n if (match) {\n continue;\n }\n logger.warning(`parseECLErrors: Unable to parse \"${errLine}\"`);\n this.errOther.push(errLine);\n }\n }\n this._checked = checked;\n }\n}\n\nexport class EnvchkErrors extends Errors {\n\n private _lines: string[];\n\n constructor(filePath: string, stdErr: string, checked: string[]) {\n super(checked);\n let content: string = fs.readFileSync(filePath, \"utf8\");\n content = content.replace(\"\\r\\n\", \"\\n\");\n this._lines = content.split(\"\\n\");\n if (stdErr && stdErr.length) {\n for (const errLine of stdErr.split(os.EOL)) {\n const match = /(Warning|Error) : Path\\=(\\S*?)(\\[\\S*\\])? Message\\=(.*)/.exec(errLine);\n if (match) {\n const [, severity, _path, _attr, _msg] = match;\n const msg = `${_path} ${_attr ? _attr : \"\"}: ${_msg}`;\n const [line, col] = this.locate(_path);\n this.errWarn.push({ filePath, line, col, msg, severity });\n continue;\n }\n if (match) {\n continue;\n }\n logger.warning(`parseECLErrors: Unable to parse \"${errLine}\"`);\n this.errOther.push(errLine);\n }\n }\n this._checked = checked;\n }\n\n locate(path: string): [number, number] {\n const pathParts = path.split(\"/\");\n if (pathParts.length && pathParts[0] === \"\") {\n pathParts.shift();\n }\n if (pathParts.length > 0) {\n let lineIdx = 0;\n for (const line of this._lines) {\n const testStr = \"<\" + pathParts[0];\n if (line.indexOf(testStr + \" \") >= 0 || line.indexOf(testStr + \">\") >= 0) {\n console.log(lineIdx, testStr);\n pathParts.shift();\n if (pathParts.length === 0) {\n return [lineIdx + 1, line.indexOf(testStr) + 1];\n }\n }\n ++lineIdx;\n }\n }\n return [0, 0];\n }\n}\n\nexport function walkXmlJson(node: any, callback: (key: string, childNode: any, stack: any[]) => void, stack?: any[]) {\n stack = stack || [];\n stack.push(node);\n for (const key in node) {\n if (node.hasOwnProperty(key)) {\n const childNode = node[key];\n callback(key, childNode, stack);\n if (childNode instanceof Array) {\n childNode.forEach(child => {\n walkXmlJson(child, callback, stack);\n });\n } else if (typeof childNode === \"object\") {\n walkXmlJson(childNode, callback, stack);\n }\n }\n }\n stack.pop();\n}\n\nexport class LocalWorkunit {\n jsonWU: any;\n\n constructor(jsonWU: any) {\n this.jsonWU = jsonWU;\n }\n\n bpGetValidLocations(filePath: any) {\n const retVal: any[] = [];\n if (exists(\"W_LOCAL.Graphs\", this.jsonWU)) {\n let id = \"\";\n walkXmlJson(this.jsonWU.W_LOCAL.Graphs, (key: string, item: any, _stack: any[]) => {\n if (key === \"$\" && item.id) {\n id = item.id;\n }\n if (key === \"$\" && item.name === \"definition\") {\n const match = /([a-z,A-Z]:\\\\(?:[-\\w\\.\\d]+\\\\)*(?:[-\\w\\.\\d]+)?|(?:\\/[\\w\\.\\-]+)+)\\((\\d*),(\\d*)\\)/.exec(item.value);\n if (match) {\n const [, file, row, _col] = match;\n const line: number = +row;\n const col: number = +_col;\n if (filePath === file) {\n retVal.push({ file, line, col, id });\n }\n }\n }\n // console.log(`${key}: ` + JSON.stringify(item));\n });\n }\n return retVal;\n }\n}\n\nexport interface IArchive {\n content: string;\n err: EclccErrors;\n}\n\nexport class ClientTools {\n readonly eclccPath: string;\n readonly envchkPath: string;\n readonly binPath: string;\n protected cwd: string;\n protected includeFolders: string[];\n protected _legacyMode: boolean;\n protected _args: string[];\n protected _version: Version;\n\n constructor(eclccPath: string, cwd?: string, includeFolders: string[] = [], legacyMode: boolean = false, args: string[] = [], version?: Version) {\n this.eclccPath = eclccPath;\n this.binPath = path.dirname(this.eclccPath);\n this.envchkPath = path.join(this.binPath, \"envchk\" + exeExt);\n this.cwd = path.normalize(cwd || this.binPath);\n this.includeFolders = includeFolders;\n this._legacyMode = legacyMode;\n this._args = args;\n this._version = version!;\n }\n\n clone(cwd?: string, includeFolders?: string[], legacyMode: boolean = false, args: string[] = []) {\n return new ClientTools(this.eclccPath, cwd, includeFolders, legacyMode, args, this._version);\n }\n\n exists(filePath: string) {\n try {\n fs.accessSync(filePath);\n return true;\n } catch (e) { }\n return false;\n }\n\n args(additionalItems: string[] = []): string[] {\n const retVal: string[] = [...this._args];\n if (this._legacyMode) {\n retVal.push(\"-legacy\");\n }\n return retVal.concat(this.includeFolders.map(includePath => {\n return \"-I\" + path.normalize(includePath);\n })).concat(additionalItems);\n }\n\n version(): Promise<Version> {\n if (this._version) {\n return Promise.resolve(this._version);\n }\n return this.execFile(this.eclccPath, this.binPath, this.args([\"--version\"]), \"eclcc\", `Cannot find ${this.eclccPath}`).then((response: IExecFile): Version => {\n this._version = new Version(response.stdout);\n return this._version;\n });\n }\n\n versionSync(): Version {\n return this._version;\n }\n\n _paths = {};\n paths() {\n return this.execFile(this.eclccPath, this.cwd, this.args([\"-showpaths\"]), \"eclcc\", `Cannot find ${this.eclccPath}`).then((response: IExecFile) => {\n if (response && response.stdout && response.stdout.length) {\n const paths = response.stdout.split(/\\r?\\n/);\n for (const path of paths) {\n const parts = path.split(\"=\");\n if (parts.length === 2) {\n this._paths[parts[0]] = parts[1];\n }\n }\n }\n return this._paths;\n });\n }\n\n private loadXMLDoc(filePath: any, removeOnRead?: boolean): Promise<XMLNode> {\n return new Promise((resolve, _reject) => {\n const fileData = fs.readFileSync(filePath, \"ascii\");\n const retVal = xml2json(fileData as any);\n if (removeOnRead) {\n fs.unlink(filePath, (err) => { });\n }\n resolve(retVal);\n });\n }\n\n createWU(filename: string): Promise<LocalWorkunit> {\n const tmpName = tmp.tmpNameSync({ prefix: \"eclcc-wu-tmp\", postfix: \"\" });\n const args = [\"-o\" + tmpName, \"-wu\"].concat([filename]);\n return this.execFile(this.eclccPath, this.cwd, this.args(args), \"eclcc\", `Cannot find ${this.eclccPath}`).then((_response: IExecFile) => {\n const xmlPath = path.normalize(tmpName + \".xml\");\n const contentPromise = this.exists(xmlPath) ? this.loadXMLDoc(xmlPath, true) : Promise.resolve({});\n return contentPromise.then((content) => {\n return new LocalWorkunit(content);\n });\n });\n }\n\n createArchive(filename: string): Promise<IArchive> {\n const args = [\"-E\"].concat([filename]);\n return this.execFile(this.eclccPath, this.cwd, this.args(args), \"eclcc\", `Cannot find ${this.eclccPath}`).then((response: IExecFile): IArchive => {\n return {\n content: response.stdout,\n err: new EclccErrors(response.stderr, [])\n };\n });\n }\n\n attachWorkspace(): Workspace {\n return attachWorkspace(this.cwd);\n }\n\n fetchMeta(filePath: string): Promise<Workspace> {\n return Promise.all([\n attachWorkspace(this.cwd),\n this.execFile(this.eclccPath, this.cwd, this.args([\"-M\", filePath]), \"eclcc\", `Cannot find ${this.eclccPath}`)\n ]).then(([metaWorkspace, execFileResponse]: [Workspace, IExecFile]) => {\n if (execFileResponse && execFileResponse.stdout && execFileResponse.stdout.length) {\n metaWorkspace.parseMetaXML(execFileResponse.stdout);\n }\n return metaWorkspace;\n });\n }\n\n syntaxCheck(filePath: string, args: string[] = [\"-syntax\"]): Promise<Errors> {\n return Promise.all([\n attachWorkspace(this.cwd),\n this.execFile(this.eclccPath, this.cwd, this.args([...args, \"-M\", filePath]), \"eclcc\", `Cannot find ${this.eclccPath}`)\n ]).then(([metaWorkspace, execFileResponse]: [Workspace, IExecFile]) => {\n let checked: string[] = [];\n if (execFileResponse && execFileResponse.stdout && execFileResponse.stdout.length) {\n checked = metaWorkspace.parseMetaXML(execFileResponse.stdout);\n }\n return new EclccErrors(execFileResponse ? execFileResponse.stderr : \"\", checked);\n });\n }\n\n envCheck(filePath: string, args: string[] = []): Promise<Errors> {\n return Promise.all([\n attachWorkspace(this.cwd),\n this.execFile(this.envchkPath, this.cwd, this.args([...args, filePath]), \"envchk\", `Cannot find ${this.envchkPath}`)\n ]).then(([metaWorkspace, execFileResponse]: [Workspace, IExecFile]) => {\n return new EnvchkErrors(filePath, execFileResponse ? execFileResponse.stderr : \"\", []);\n });\n }\n\n private execFile(cmd: string, cwd: string, args: string[], _toolName: string, _notFoundError?: string) {\n return new Promise((resolve, _reject) => {\n logger.debug(`${cmd} ${args.join(\" \")}`);\n const child = cp.spawn(cmd, args, { cwd });\n let stdOut = \"\";\n let stdErr = \"\";\n child.stdout.on(\"data\", (data) => {\n stdOut += data.toString();\n });\n child.stderr.on(\"data\", (data) => {\n stdErr += data.toString();\n });\n child.on(\"close\", (_code, _signal) => {\n resolve({\n stdout: stdOut.trim(),\n stderr: stdErr.trim()\n });\n });\n });\n }\n}\n\nfunction locateClientToolsInFolder(rootFolder: string, clientTools: ClientTools[]) {\n if (rootFolder) {\n const hpccSystemsFolder = path.join(rootFolder, \"HPCCSystems\");\n if (fs.existsSync(hpccSystemsFolder) && fs.statSync(hpccSystemsFolder).isDirectory()) {\n if (os.type() !== \"Windows_NT\") {\n const eclccPath = path.join(hpccSystemsFolder, \"bin\", \"eclcc\");\n if (fs.existsSync(eclccPath)) {\n clientTools.push(new ClientTools(eclccPath));\n }\n }\n fs.readdirSync(hpccSystemsFolder).forEach((versionFolder) => {\n const eclccPath = path.join(hpccSystemsFolder, versionFolder, \"clienttools\", \"bin\", \"eclcc\" + exeExt);\n if (fs.existsSync(eclccPath)) {\n const name = path.basename(versionFolder);\n const version = new Version(name);\n if (version.exists()) {\n clientTools.push(new ClientTools(eclccPath));\n }\n }\n });\n }\n }\n}\n\nlet allClientToolsCache: Promise<ClientTools[]>;\nexport function locateAllClientTools() {\n if (allClientToolsCache) return allClientToolsCache;\n const clientTools: ClientTools[] = [];\n switch (os.type()) {\n case \"Windows_NT\":\n const rootFolder86 = process.env[\"ProgramFiles(x86)\"] || \"\";\n if (rootFolder86) {\n locateClientToolsInFolder(rootFolder86, clientTools);\n }\n const rootFolder = process.env[\"ProgramFiles\"] || \"\";\n if (rootFolder) {\n locateClientToolsInFolder(rootFolder, clientTools);\n }\n if (!rootFolder86 && !rootFolder) {\n locateClientToolsInFolder(\"c:\\\\Program Files (x86)\", clientTools);\n }\n break;\n case \"Linux\":\n case \"Darwin\":\n locateClientToolsInFolder(\"/opt\", clientTools);\n break;\n default:\n break;\n }\n\n allClientToolsCache = Promise.all(clientTools.map(ct => ct.version())).then(() => {\n clientTools.sort((l: ClientTools, r: ClientTools) => {\n return r.versionSync().compare(l.versionSync());\n });\n return clientTools;\n });\n return allClientToolsCache;\n}\n\nlet eclccPathMsg = \"\";\nfunction logEclccPath(eclccPath: string) {\n const msg = `Using eclccPath setting: ${eclccPath}`;\n if (eclccPathMsg !== msg) {\n logger.info(msg);\n eclccPathMsg = msg;\n }\n}\n\nexport function locateClientTools(overridePath: string = \"\", build: string = \"\", cwd: string = \".\", includeFolders: string[] = [], legacyMode: boolean = false): Promise<ClientTools> {\n if (overridePath && fs.existsSync(overridePath)) {\n logEclccPath(overridePath);\n return Promise.resolve(new ClientTools(overridePath, cwd, includeFolders, legacyMode));\n }\n return locateAllClientTools().then((allClientToolsCache2) => {\n if (!allClientToolsCache2.length) {\n throw new Error(\"Unable to locate ECL Client Tools.\");\n }\n const buildVersion = new Version(build);\n let latest: ClientTools | undefined;\n let bestMajor: ClientTools | undefined;\n for (const ct of allClientToolsCache2) {\n const ctVersion = ct.versionSync();\n if (!latest) latest = ct;\n if (!bestMajor && buildVersion.major === ctVersion.major) bestMajor = ct;\n if (buildVersion.major === ctVersion.major && buildVersion.minor === ctVersion.minor) return ct.clone(cwd, includeFolders, legacyMode);\n }\n const best: ClientTools = bestMajor || latest!;\n logEclccPath(best.eclccPath);\n return best.clone(cwd, includeFolders, legacyMode);\n });\n}\n","// DOM Parser polyfill ---\nimport { root } from \"@hpcc-js/util\";\nimport { DOMParser } from \"xmldom\";\nroot.DOMParser = DOMParser;\n\n// fetch polyfill ---\nimport fetch from \"node-fetch\";\nif (typeof root.fetch === \"undefined\") {\n root.fetch = fetch;\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const https = require(\"https\");\n root.fetch.__agent = new https.Agent({\n rejectUnauthorized: false\n });\n}\n\n// btoa polyfill ---\nimport { Buffer } from \"safe-buffer\";\nif (typeof root.btoa === \"undefined\") {\n root.btoa = function (str: string) {\n return Buffer.from(str || \"\", \"utf8\").toString(\"base64\");\n };\n}\n\nexport * from \"./index-common\";\n\n// Client Tools ---\nexport * from \"./clienttools/eclcc\";\nexport * from \"./clienttools/eclMeta\";\n"]}
\No newline at end of file