@@ -187,8 +187,7 @@ export const watchBuildLogsByTemplateVersionId = (
187187
188188const proto = location . protocol === "https:" ?"wss:" :"ws:" ;
189189const socket = new WebSocket (
190- `${ proto } //${
191- location . host
190+ `${ proto } //${ location . host
192191} /api/v2/templateversions/${ versionId } /logs?${ searchParams . toString ( ) } `,
193192) ;
194193
@@ -270,8 +269,7 @@ export const watchBuildLogsByBuildId = (
270269}
271270const proto = location . protocol === "https:" ?"wss:" :"ws:" ;
272271const socket = new WebSocket (
273- `${ proto } //${
274- location . host
272+ `${ proto } //${ location . host
275273} /api/v2/workspacebuilds/${ buildId } /logs?${ searchParams . toString ( ) } `,
276274) ;
277275socket . binaryType = "blob" ;
@@ -382,7 +380,7 @@ export class MissingBuildParameters extends Error {
382380 * lexical scope.
383381 */
384382class ApiMethods {
385- constructor ( protected readonly axios :AxiosInstance ) { }
383+ constructor ( protected readonly axios :AxiosInstance ) { }
386384
387385login = async (
388386email :string ,
@@ -577,21 +575,10 @@ class ApiMethods {
577575} ;
578576
579577getTemplates = async (
580- options ?:TemplateOptions ,
578+ options ?:TypesGen . TemplateFilter ,
581579) :Promise < TypesGen . Template [ ] > => {
582- const params :Record < string , string > = { } ;
583- if ( options ?. deprecated !== undefined ) {
584- // Just want to check if it isn't undefined. If it has
585- // a boolean value, convert it to a string and include
586- // it as a param.
587- params [ "deprecated" ] = String ( options . deprecated ) ;
588- }
589-
590- const response = await this . axios . get < TypesGen . Template [ ] > (
591- `/api/v2/templates` ,
592- { params} ,
593- ) ;
594-
580+ const url = getURLWithSearchParams ( "/api/v2/templates" , options ) ;
581+ const response = await this . axios . get < TypesGen . Template [ ] > ( url ) ;
595582return response . data ;
596583} ;
597584