@@ -47,7 +47,7 @@ export class ApiClient {
4747 private token ?: OAuthToken ;
4848 private saveToken ?: saveTokenFunction ;
4949 private client = createClient < paths > ( {
50- baseUrl : config . apiBaseURL ,
50+ baseUrl : config . apiBaseUrl ,
5151 headers : {
5252 "User-Agent" : config . userAgent ,
5353 Accept : `application/vnd.atlas.${ config . atlasApiVersion } +json` ,
@@ -93,7 +93,7 @@ export class ApiClient {
9393 async authenticate ( ) : Promise < OauthDeviceCode > {
9494 const endpoint = "api/private/unauth/account/device/authorize" ;
9595
96- const authUrl = new URL ( endpoint , config . apiBaseURL ) ;
96+ const authUrl = new URL ( endpoint , config . apiBaseUrl ) ;
9797
9898 const response = await fetch ( authUrl , {
9999 method : "POST" ,
@@ -102,7 +102,7 @@ export class ApiClient {
102102 Accept : "application/json" ,
103103 } ,
104104 body : new URLSearchParams ( {
105- client_id : config . clientID ,
105+ client_id : config . clientId ,
106106 scope : "openid profile offline_access" ,
107107 grant_type : "urn:ietf:params:oauth:grant-type:device_code" ,
108108 } ) . toString ( ) ,
@@ -117,14 +117,14 @@ export class ApiClient {
117117
118118 async retrieveToken ( device_code : string ) : Promise < OAuthToken > {
119119 const endpoint = "api/private/unauth/account/device/token" ;
120- const url = new URL ( endpoint , config . apiBaseURL ) ;
120+ const url = new URL ( endpoint , config . apiBaseUrl ) ;
121121 const response = await fetch ( url , {
122122 method : "POST" ,
123123 headers : {
124124 "Content-Type" : "application/x-www-form-urlencoded" ,
125125 } ,
126126 body : new URLSearchParams ( {
127- client_id : config . clientID ,
127+ client_id : config . clientId ,
128128 device_code : device_code ,
129129 grant_type : "urn:ietf:params:oauth:grant-type:device_code" ,
130130 } ) . toString ( ) ,
@@ -153,15 +153,15 @@ export class ApiClient {
153153
154154 async refreshToken ( token ?: OAuthToken ) : Promise < OAuthToken | null > {
155155 const endpoint = "api/private/unauth/account/device/token" ;
156- const url = new URL ( endpoint , config . apiBaseURL ) ;
156+ const url = new URL ( endpoint , config . apiBaseUrl ) ;
157157 const response = await fetch ( url , {
158158 method : "POST" ,
159159 headers : {
160160 "Content-Type" : "application/x-www-form-urlencoded" ,
161161 Accept : "application/json" ,
162162 } ,
163163 body : new URLSearchParams ( {
164- client_id : config . clientID ,
164+ client_id : config . clientId ,
165165 refresh_token : ( token || this . token ) ?. refresh_token || "" ,
166166 grant_type : "refresh_token" ,
167167 scope : "openid profile offline_access" ,
@@ -187,7 +187,7 @@ export class ApiClient {
187187
188188 async revokeToken ( token ?: OAuthToken ) : Promise < void > {
189189 const endpoint = "api/private/unauth/account/device/token" ;
190- const url = new URL ( endpoint , config . apiBaseURL ) ;
190+ const url = new URL ( endpoint , config . apiBaseUrl ) ;
191191 const response = await fetch ( url , {
192192 method : "POST" ,
193193 headers : {
@@ -196,7 +196,7 @@ export class ApiClient {
196196 "User-Agent" : config . userAgent ,
197197 } ,
198198 body : new URLSearchParams ( {
199- client_id : config . clientID ,
199+ client_id : config . clientId ,
200200 token : ( token || this . token ) ?. access_token || "" ,
201201 token_type_hint : "refresh_token" ,
202202 } ) . toString ( ) ,
0 commit comments