@@ -121,12 +121,12 @@ class Client {
121
121
122
122
/**
123
123
* Patches a resource.
124
- * @param {...any } args - The resources or parts of the resource path followed by the body.
124
+ * @param {...any } arguments_ - The resources or parts of the resource path followed by the body.
125
125
* @returns {Promise<void|object> } - Either void or response object
126
126
*/
127
- async patch ( ...args ) {
128
- const body = args . pop ( ) ;
129
- const resource = Array . isArray ( args [ 0 ] ) ? args [ 0 ] : args ;
127
+ async patch ( ...arguments_ ) {
128
+ const body = arguments_ . pop ( ) ;
129
+ const resource = Array . isArray ( arguments_ [ 0 ] ) ? arguments_ [ 0 ] : arguments_ ;
130
130
131
131
return this . request ( 'PATCH' , resource , body ) ;
132
132
}
@@ -141,24 +141,24 @@ class Client {
141
141
142
142
/**
143
143
* Deletes a resource.
144
- * @param {...any } args - The resources or parts of the resource path.
144
+ * @param {...any } arguments_ - The resources or parts of the resource path.
145
145
* @returns {Promise<void|object> } - Either void or response object
146
146
*/
147
- async delete ( ...args ) {
147
+ async delete ( ...arguments_ ) {
148
148
// Check if the first argument is an array
149
- const resource = Array . isArray ( args [ 0 ] ) ? args [ 0 ] : args ;
149
+ const resource = Array . isArray ( arguments_ [ 0 ] ) ? arguments_ [ 0 ] : arguments_ ;
150
150
return this . request ( 'DELETE' , resource ) ;
151
151
}
152
152
153
153
async getAll ( resource ) {
154
154
return this . requestAll ( 'GET' , resource ) ;
155
155
}
156
156
157
- async _rawRequest ( method , uri , ...args ) {
157
+ async _rawRequest ( method , uri , ...arguments_ ) {
158
158
const body =
159
- typeof args . at ( - 1 ) === 'object' &&
160
- ! Array . isArray ( args . at ( - 1 ) ) &&
161
- args . pop ( ) ;
159
+ typeof arguments_ . at ( - 1 ) === 'object' &&
160
+ ! Array . isArray ( arguments_ . at ( - 1 ) ) &&
161
+ arguments_ . pop ( ) ;
162
162
163
163
return this . transporter . request ( method , uri , body ) ;
164
164
}
@@ -175,12 +175,16 @@ class Client {
175
175
* @template T
176
176
* @param {string } method - HTTP method (e.g., 'GET', 'POST').
177
177
* @param {string } uri - The URI for the request.
178
- * @param {...any } args - Additional arguments for the request.
178
+ * @param {...any } arguments_ - Additional arguments for the request.
179
179
* @returns {Promise<module:client.ApiResponse<T>> } - The API response.
180
180
*/
181
- async request ( method , uri , ...args ) {
181
+ async request ( method , uri , ...arguments_ ) {
182
182
try {
183
- const { response, result} = await this . _rawRequest ( method , uri , ...args ) ;
183
+ const { response, result} = await this . _rawRequest (
184
+ method ,
185
+ uri ,
186
+ ...arguments_ ,
187
+ ) ;
184
188
const responseBody = processResponseBody (
185
189
checkRequestResponse ( response , result ) ,
186
190
this ,
@@ -209,7 +213,7 @@ class Client {
209
213
}
210
214
211
215
// Request method for fetching multiple pages of results
212
- async requestAll ( method , uri , ...args ) {
216
+ async requestAll ( method , uri , ...arguments_ ) {
213
217
const bodyList = [ ] ;
214
218
const throttle = this . options . get ( 'throttle' ) ;
215
219
let __request = this . _rawRequest ; // Use _rawRequest directly
@@ -238,7 +242,12 @@ class Client {
238
242
239
243
const fetchPagesRecursively = async ( pageUri ) => {
240
244
const isIncremental = pageUri . includes ( 'incremental' ) ;
241
- const responseData = await __request . call ( this , method , pageUri , ...args ) ;
245
+ const responseData = await __request . call (
246
+ this ,
247
+ method ,
248
+ pageUri ,
249
+ ...arguments_ ,
250
+ ) ;
242
251
const nextPage = processPage ( responseData ) ;
243
252
if (
244
253
nextPage &&
0 commit comments