@@ -129,7 +129,7 @@ export class AtelierAPI {
129129
130130 private setConnection ( workspaceFolderName : string , namespace ?: string ) : void {
131131 let serverName ;
132- if ( config ( `intersystems.servers.${ workspaceFolderName } .webServer ` ) ) {
132+ if ( config ( `intersystems.servers.${ workspaceFolderName } ` ) ) {
133133 serverName = workspaceFolderName ;
134134 workspaceFolderName = currentWorkspaceFolder ( ) ;
135135 }
@@ -139,10 +139,11 @@ export class AtelierAPI {
139139 }
140140
141141 if ( serverName && serverName . length ) {
142- const { scheme, host, port, username, password, pathPrefix } = config (
143- `intersystems.servers.${ serverName } .webServer` ,
144- workspaceFolderName
145- ) ;
142+ const {
143+ webServer : { scheme, host, port, pathPrefix } ,
144+ username,
145+ password,
146+ } = config ( `intersystems.servers.${ serverName } ` , workspaceFolderName ) ;
146147 this . _config = {
147148 active : conn . active ,
148149 apiVersion : 1 ,
@@ -308,7 +309,7 @@ export class AtelierAPI {
308309 } ) ;
309310 }
310311
311- public serverInfo ( ) : Promise < Atelier . Response < Atelier . ServerInfo > > {
312+ public serverInfo ( ) : Promise < Atelier . Response < Atelier . Content < Atelier . ServerInfo > > > {
312313 return this . request ( 0 , "GET" ) . then ( ( info ) => {
313314 if ( info && info . result && info . result . content && info . result . content . api > 0 ) {
314315 const data = info . result . content ;
@@ -339,15 +340,15 @@ export class AtelierAPI {
339340 category ?: string ;
340341 type ?: string ;
341342 filter ?: string ;
342- } ) : Promise < any > {
343+ } ) : Promise < Atelier . Response > {
343344 return this . request ( 1 , "GET" , `${ this . ns } /docnames/${ category } /${ type } ` , null , {
344345 filter,
345346 generated,
346347 } ) ;
347348 }
348349
349350 // api v1+
350- public getDoc ( name : string , format ?: string ) : Promise < any > {
351+ public getDoc ( name : string , format ?: string ) : Promise < Atelier . Response > {
351352 let params = { } ;
352353 if ( format ) {
353354 params = {
@@ -359,12 +360,16 @@ export class AtelierAPI {
359360 }
360361
361362 // api v1+
362- public deleteDoc ( name : string ) : Promise < any > {
363+ public deleteDoc ( name : string ) : Promise < Atelier . Response < Atelier . Document > > {
363364 return this . request ( 1 , "DELETE" , `${ this . ns } /doc/${ name } ` ) ;
364365 }
365366
366367 // v1+
367- public putDoc ( name : string , data : { enc : boolean ; content : string [ ] } , ignoreConflict ?: boolean ) : Promise < any > {
368+ public putDoc (
369+ name : string ,
370+ data : { enc : boolean ; content : string [ ] } ,
371+ ignoreConflict ?: boolean
372+ ) : Promise < Atelier . Response > {
368373 const params = { ignoreConflict } ;
369374 name = this . transformNameIfCsp ( name ) ;
370375 return this . request ( 1 , "PUT" , `${ this . ns } /doc/${ name } ` , data , params ) ;
@@ -386,7 +391,7 @@ export class AtelierAPI {
386391 case ?: boolean ;
387392 wild ?: boolean ;
388393 word ?: boolean ;
389- } ) : Promise < any > {
394+ } ) : Promise < Atelier . Response < Atelier . SearchResult [ ] > > {
390395 params = {
391396 files : "*.cls,*.mac,*.int,*.inc" ,
392397 gen : false ,
@@ -419,12 +424,12 @@ export class AtelierAPI {
419424 } ) ;
420425 }
421426
422- public cvtXmlUdl ( source : string ) : Promise < any > {
427+ public cvtXmlUdl ( source : string ) : Promise < Atelier . Response > {
423428 return this . request ( 1 , "POST" , `${ this . ns } /` , source , { } , { "Content-Type" : "application/xml" } ) ;
424429 }
425430
426431 // v2+
427- public getmacrodefinition ( docname : string , macroname : string , includes : string [ ] ) : Promise < any > {
432+ public getmacrodefinition ( docname : string , macroname : string , includes : string [ ] ) : Promise < Atelier . Response > {
428433 return this . request ( 2 , "POST" , `${ this . ns } /action/getmacrodefinition` , {
429434 docname,
430435 includes,
0 commit comments