@northstake/northstakeapi 1.0.22 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/api/accountApiKeysApi.ts +346 -0
  4. package/api/apis.ts +5 -1
  5. package/api/managedUsersValidatorsApi.ts +116 -0
  6. package/api/validatorMarketplaceFacilitatorApi.ts +360 -0
  7. package/api/validatorsApi.ts +109 -0
  8. package/api.ts +18 -0
  9. package/dist/api/accountApiKeysApi.d.ts +77 -0
  10. package/dist/api/accountApiKeysApi.js +266 -0
  11. package/dist/api/apis.d.ts +5 -1
  12. package/dist/api/apis.js +5 -1
  13. package/dist/api/managedUsersValidatorsApi.d.ts +27 -0
  14. package/dist/api/managedUsersValidatorsApi.js +87 -0
  15. package/dist/api/validatorMarketplaceFacilitatorApi.d.ts +80 -0
  16. package/dist/api/validatorMarketplaceFacilitatorApi.js +280 -0
  17. package/dist/api/validatorsApi.d.ts +25 -0
  18. package/dist/api/validatorsApi.js +81 -0
  19. package/dist/api.d.ts +14 -0
  20. package/dist/api.js +16 -0
  21. package/dist/model/apiKey.d.ts +54 -0
  22. package/dist/model/apiKey.js +53 -0
  23. package/dist/model/generateApiKeyRequest.d.ts +43 -0
  24. package/dist/model/generateApiKeyRequest.js +43 -0
  25. package/dist/model/getMarketplaceMetadata200Response.d.ts +36 -0
  26. package/dist/model/getMarketplaceMetadata200Response.js +38 -0
  27. package/dist/model/getWithdrawalsResponse.d.ts +38 -0
  28. package/dist/model/getWithdrawalsResponse.js +43 -0
  29. package/dist/model/listAllRFQsForFacilitator200Response.d.ts +38 -0
  30. package/dist/model/listAllRFQsForFacilitator200Response.js +43 -0
  31. package/dist/model/models.d.ts +10 -0
  32. package/dist/model/models.js +32 -0
  33. package/dist/model/rFQBidFacilitator.d.ts +27 -0
  34. package/dist/model/rFQBidFacilitator.js +38 -0
  35. package/dist/model/rFQDocumentFacilitator.d.ts +38 -0
  36. package/dist/model/rFQDocumentFacilitator.js +53 -0
  37. package/dist/model/rFQDocumentFacilitatorStatusFilter.d.ts +12 -0
  38. package/dist/model/rFQDocumentFacilitatorStatusFilter.js +13 -0
  39. package/dist/model/rFQDocumentFacilitatorValidatorsInner.d.ts +27 -0
  40. package/dist/model/rFQDocumentFacilitatorValidatorsInner.js +38 -0
  41. package/dist/model/rFQDocumentSeller.d.ts +1 -0
  42. package/dist/model/rFQDocumentSeller.js +5 -0
  43. package/dist/model/validatorWithdrawal.d.ts +39 -0
  44. package/dist/model/validatorWithdrawal.js +68 -0
  45. package/model/apiKey.ts +88 -0
  46. package/model/generateApiKeyRequest.ts +66 -0
  47. package/model/getMarketplaceMetadata200Response.ts +52 -0
  48. package/model/getWithdrawalsResponse.ts +59 -0
  49. package/model/listAllRFQsForFacilitator200Response.ts +59 -0
  50. package/model/models.ts +53 -0
  51. package/model/rFQBidFacilitator.ts +43 -0
  52. package/model/rFQDocumentFacilitator.ts +74 -0
  53. package/model/rFQDocumentFacilitatorStatusFilter.ts +18 -0
  54. package/model/rFQDocumentFacilitatorValidatorsInner.ts +43 -0
  55. package/model/rFQDocumentSeller.ts +6 -0
  56. package/model/validatorWithdrawal.ts +86 -0
  57. package/package.json +3 -3
@@ -2,6 +2,7 @@
2
2
  .openapi-generator-ignore
3
3
  api.ts
4
4
  api/accountApi.ts
5
+ api/accountApiKeysApi.ts
5
6
  api/apis.ts
6
7
  api/depositAddressesApi.ts
7
8
  api/linkedWalletsApi.ts
@@ -16,6 +17,7 @@ api/ordersApi.ts
16
17
  api/portfolioApi.ts
17
18
  api/transactionsApi.ts
18
19
  api/validatorMarketplaceBuyersApi.ts
20
+ api/validatorMarketplaceFacilitatorApi.ts
19
21
  api/validatorMarketplaceSellersApi.ts
20
22
  api/validatorMarketplaceWebhooksApi.ts
21
23
  api/validatorsApi.ts
@@ -25,6 +27,7 @@ model/accountEntity.ts
25
27
  model/addLinkedWalletForUserRequest.ts
26
28
  model/addLinkedWalletRequest.ts
27
29
  model/allManagedUsersResponse.ts
30
+ model/apiKey.ts
28
31
  model/asset.ts
29
32
  model/createManagedUserRequest.ts
30
33
  model/createRFQRequest.ts
@@ -44,7 +47,11 @@ model/ethereumValidatorKeyKeystoreCryptoKdfParams.ts
44
47
  model/exitEstimateBase.ts
45
48
  model/exitEstimateSeller.ts
46
49
  model/exitProposal.ts
50
+ model/generateApiKeyRequest.ts
51
+ model/getMarketplaceMetadata200Response.ts
47
52
  model/getTransactionsResponse.ts
53
+ model/getWithdrawalsResponse.ts
54
+ model/listAllRFQsForFacilitator200Response.ts
48
55
  model/managedUser.ts
49
56
  model/managedUserDetails.ts
50
57
  model/models.ts
@@ -56,12 +63,16 @@ model/orderUpdatePayload.ts
56
63
  model/portfolioEntity.ts
57
64
  model/provideEscrowHashForRFQDocumentRequest.ts
58
65
  model/quote.ts
66
+ model/rFQBidFacilitator.ts
59
67
  model/rFQBids.ts
60
68
  model/rFQDocumentBase.ts
61
69
  model/rFQDocumentBaseUniqueEscrowVault.ts
62
70
  model/rFQDocumentBuyer.ts
63
71
  model/rFQDocumentBuyerAllOfValidators.ts
64
72
  model/rFQDocumentBuyerStatusFilter.ts
73
+ model/rFQDocumentFacilitator.ts
74
+ model/rFQDocumentFacilitatorStatusFilter.ts
75
+ model/rFQDocumentFacilitatorValidatorsInner.ts
65
76
  model/rFQDocumentSeller.ts
66
77
  model/rFQDocumentSellerAllOfValidators.ts
67
78
  model/rFQDocumentSellerStatusFilter.ts
@@ -85,6 +96,7 @@ model/unstakeStepType.ts
85
96
  model/validatorInfo.ts
86
97
  model/validatorKeyHolder.ts
87
98
  model/validatorType.ts
99
+ model/validatorWithdrawal.ts
88
100
  model/wallet.ts
89
101
  model/webHookLookupAnswer.ts
90
102
  model/webhookPayload.ts
@@ -1 +1 @@
1
- 7.9.0-SNAPSHOT
1
+ 7.10.0-SNAPSHOT
@@ -0,0 +1,346 @@
1
+ /**
2
+ * Northstake
3
+ * Northstake api
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ import localVarRequest from 'request';
15
+ import http from 'http';
16
+
17
+ /* tslint:disable:no-unused-locals */
18
+ import { ApiKey } from '../model/apiKey';
19
+ import { ErrorResponse } from '../model/errorResponse';
20
+ import { GenerateApiKeyRequest } from '../model/generateApiKeyRequest';
21
+
22
+ import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
23
+ import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, JWTAuth } from '../model/models';
24
+
25
+ import { HttpError, RequestFile } from './apis';
26
+
27
+ let defaultBasePath = 'https://api.northstake.dk/v1';
28
+
29
+ // ===============================================
30
+ // This file is autogenerated - Please do not edit
31
+ // ===============================================
32
+
33
+ export enum AccountApiKeysApiApiKeys {
34
+ ApiKeyAuth,
35
+ }
36
+
37
+
38
+
39
+ export class AccountApiKeysApi {
40
+ protected _basePath = defaultBasePath;
41
+ protected _defaultHeaders : any = {};
42
+ protected _useQuerystring : boolean = false;
43
+
44
+ protected authentications = {
45
+ 'default': <Authentication>new JWTAuth('your_api_key', 'your_private_key'),
46
+ 'bearerTokenAuth': new HttpBearerAuth(),
47
+ 'ApiKeyAuth': new ApiKeyAuth('header', 'x-api-key'),
48
+ }
49
+
50
+ protected interceptors: Interceptor[] = [];
51
+
52
+ constructor(basePath?: string);
53
+ constructor(basePathOrUsername: string, password?: string, basePath?: string) {
54
+ if (password) {
55
+ if (basePath) {
56
+ this.basePath = basePath;
57
+ }
58
+ } else {
59
+ if (basePathOrUsername) {
60
+ this.basePath = basePathOrUsername
61
+ }
62
+ }
63
+ }
64
+
65
+ set useQuerystring(value: boolean) {
66
+ this._useQuerystring = value;
67
+ }
68
+
69
+ set basePath(basePath: string) {
70
+ this._basePath = basePath;
71
+ }
72
+
73
+ set defaultHeaders(defaultHeaders: any) {
74
+ this._defaultHeaders = defaultHeaders;
75
+ }
76
+
77
+ get defaultHeaders() {
78
+ return this._defaultHeaders;
79
+ }
80
+
81
+ get basePath() {
82
+ return this._basePath;
83
+ }
84
+
85
+ public setDefaultAuthentication(auth: Authentication) {
86
+ this.authentications.default = auth;
87
+ }
88
+
89
+ public setApiKey(key: AccountApiKeysApiApiKeys, value: string) {
90
+ (this.authentications as any)[AccountApiKeysApiApiKeys[key]].apiKey = value;
91
+ }
92
+
93
+ set accessToken(accessToken: string | (() => string)) {
94
+ this.authentications.bearerTokenAuth.accessToken = accessToken;
95
+ }
96
+
97
+ public addInterceptor(interceptor: Interceptor) {
98
+ this.interceptors.push(interceptor);
99
+ }
100
+
101
+ /**
102
+ *
103
+ * @summary Delete an API key
104
+ * @param apiKeyId The ID of the API key to delete
105
+ */
106
+
107
+
108
+
109
+
110
+
111
+ public async deleteApiKey (apiKeyId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: any, status: number }> {
112
+
113
+ const localVarPath = this.basePath + '/account/apiKeys/{apiKeyId}'
114
+ .replace('{' + 'apiKeyId' + '}', encodeURIComponent(String(apiKeyId)));
115
+
116
+ let localVarQueryParameters: any = {};
117
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
118
+ let localVarFormParams: any = {};
119
+
120
+
121
+ // Verify required parameter 'apiKeyId' is not null or undefined
122
+ if (apiKeyId === null || apiKeyId === undefined) {
123
+ throw new Error('Required parameter "apiKeyId" was null or undefined when calling deleteApiKey.');
124
+ }
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ (<any>Object).assign(localVarHeaderParams, options.headers);
133
+
134
+ let localVarUseFormData = false;
135
+
136
+
137
+
138
+ let localVarRequestOptions: localVarRequest.Options = {
139
+ method: 'DELETE',
140
+ qs: localVarQueryParameters,
141
+ headers: localVarHeaderParams,
142
+ uri: localVarPath,
143
+ useQuerystring: this._useQuerystring,
144
+ json: true,
145
+ };
146
+
147
+ let authenticationPromise = Promise.resolve();
148
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
149
+
150
+ let interceptorPromise = authenticationPromise;
151
+ for (const interceptor of this.interceptors) {
152
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
153
+ }
154
+
155
+ return interceptorPromise.then(() => {
156
+ if (Object.keys(localVarFormParams).length) {
157
+ if (localVarUseFormData) {
158
+ (<any>localVarRequestOptions).formData = localVarFormParams;
159
+ } else {
160
+ localVarRequestOptions.form = localVarFormParams;
161
+ }
162
+ }
163
+ return new Promise<{ body: any, status: number }>((resolve, reject) => {
164
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
165
+ if (error) {
166
+ console.error('API call error:', error);
167
+ reject(error);
168
+ } else {
169
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
170
+ resolve({ body: body, status: response.statusCode });
171
+ } else {
172
+ console.error('API response error:', response.statusCode);
173
+ resolve({ body: body, status: response.statusCode });
174
+ }
175
+ }
176
+ });
177
+ });
178
+ } )
179
+ }
180
+ /**
181
+ * Allows a user to generate a new API key with specific rights and restrictions.
182
+ * @summary Generate a new API key
183
+ * @param generateApiKeyRequest
184
+ */
185
+
186
+
187
+
188
+
189
+
190
+ public async generateApiKey (generateApiKeyRequest: GenerateApiKeyRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: ApiKey, status: number }> {
191
+
192
+ const localVarPath = this.basePath + '/account/apiKeys';
193
+
194
+ let localVarQueryParameters: any = {};
195
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
196
+ const produces = ['application/json'];
197
+ if (produces.indexOf('application/json') >= 0) {
198
+ localVarHeaderParams.Accept = 'application/json';
199
+ } else {
200
+ localVarHeaderParams.Accept = produces.join(',');
201
+ }
202
+ let localVarFormParams: any = {};
203
+
204
+
205
+ // Verify required parameter 'generateApiKeyRequest' is not null or undefined
206
+ if (generateApiKeyRequest === null || generateApiKeyRequest === undefined) {
207
+ throw new Error('Required parameter "generateApiKeyRequest" was null or undefined when calling generateApiKey.');
208
+ }
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ (<any>Object).assign(localVarHeaderParams, options.headers);
217
+
218
+ let localVarUseFormData = false;
219
+
220
+
221
+
222
+ let localVarRequestOptions: localVarRequest.Options = {
223
+ method: 'POST',
224
+ qs: localVarQueryParameters,
225
+ headers: localVarHeaderParams,
226
+ uri: localVarPath,
227
+ useQuerystring: this._useQuerystring,
228
+ json: true,
229
+ body: ObjectSerializer.serialize(generateApiKeyRequest, "GenerateApiKeyRequest")
230
+ };
231
+
232
+ let authenticationPromise = Promise.resolve();
233
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
234
+
235
+ let interceptorPromise = authenticationPromise;
236
+ for (const interceptor of this.interceptors) {
237
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
238
+ }
239
+
240
+ return interceptorPromise.then(() => {
241
+ if (Object.keys(localVarFormParams).length) {
242
+ if (localVarUseFormData) {
243
+ (<any>localVarRequestOptions).formData = localVarFormParams;
244
+ } else {
245
+ localVarRequestOptions.form = localVarFormParams;
246
+ }
247
+ }
248
+ return new Promise<{ body: ApiKey, status: number }>((resolve, reject) => {
249
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
250
+ if (error) {
251
+ console.error('API call error:', error);
252
+ reject(error);
253
+ } else {
254
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
255
+ body = ObjectSerializer.deserialize(body, "ApiKey");
256
+ resolve({ body: body, status: response.statusCode });
257
+ } else {
258
+ console.error('API response error:', response.statusCode);
259
+ resolve({ body: body, status: response.statusCode });
260
+ }
261
+ }
262
+ });
263
+ });
264
+ } )
265
+ }
266
+ /**
267
+ *
268
+ * @summary List all API keys
269
+ */
270
+
271
+
272
+
273
+
274
+
275
+ public async listApiKeys (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: Array<ApiKey>, status: number }> {
276
+
277
+ const localVarPath = this.basePath + '/account/apiKeys';
278
+
279
+ let localVarQueryParameters: any = {};
280
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
281
+ const produces = ['application/json'];
282
+ if (produces.indexOf('application/json') >= 0) {
283
+ localVarHeaderParams.Accept = 'application/json';
284
+ } else {
285
+ localVarHeaderParams.Accept = produces.join(',');
286
+ }
287
+ let localVarFormParams: any = {};
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ (<any>Object).assign(localVarHeaderParams, options.headers);
298
+
299
+ let localVarUseFormData = false;
300
+
301
+
302
+
303
+ let localVarRequestOptions: localVarRequest.Options = {
304
+ method: 'GET',
305
+ qs: localVarQueryParameters,
306
+ headers: localVarHeaderParams,
307
+ uri: localVarPath,
308
+ useQuerystring: this._useQuerystring,
309
+ json: true,
310
+ };
311
+
312
+ let authenticationPromise = Promise.resolve();
313
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
314
+
315
+ let interceptorPromise = authenticationPromise;
316
+ for (const interceptor of this.interceptors) {
317
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
318
+ }
319
+
320
+ return interceptorPromise.then(() => {
321
+ if (Object.keys(localVarFormParams).length) {
322
+ if (localVarUseFormData) {
323
+ (<any>localVarRequestOptions).formData = localVarFormParams;
324
+ } else {
325
+ localVarRequestOptions.form = localVarFormParams;
326
+ }
327
+ }
328
+ return new Promise<{ body: Array<ApiKey>, status: number }>((resolve, reject) => {
329
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
330
+ if (error) {
331
+ console.error('API call error:', error);
332
+ reject(error);
333
+ } else {
334
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
335
+ body = ObjectSerializer.deserialize(body, "Array<ApiKey>");
336
+ resolve({ body: body, status: response.statusCode });
337
+ } else {
338
+ console.error('API response error:', response.statusCode);
339
+ resolve({ body: body, status: response.statusCode });
340
+ }
341
+ }
342
+ });
343
+ });
344
+ } )
345
+ }
346
+ }
package/api/apis.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from './accountApi';
2
2
  import { AccountApi } from './accountApi';
3
+ export * from './accountApiKeysApi';
4
+ import { AccountApiKeysApi } from './accountApiKeysApi';
3
5
  export * from './depositAddressesApi';
4
6
  import { DepositAddressesApi } from './depositAddressesApi';
5
7
  export * from './linkedWalletsApi';
@@ -26,6 +28,8 @@ export * from './transactionsApi';
26
28
  import { TransactionsApi } from './transactionsApi';
27
29
  export * from './validatorMarketplaceBuyersApi';
28
30
  import { ValidatorMarketplaceBuyersApi } from './validatorMarketplaceBuyersApi';
31
+ export * from './validatorMarketplaceFacilitatorApi';
32
+ import { ValidatorMarketplaceFacilitatorApi } from './validatorMarketplaceFacilitatorApi';
29
33
  export * from './validatorMarketplaceSellersApi';
30
34
  import { ValidatorMarketplaceSellersApi } from './validatorMarketplaceSellersApi';
31
35
  export * from './validatorMarketplaceWebhooksApi';
@@ -43,4 +47,4 @@ export class HttpError extends Error {
43
47
 
44
48
  export { RequestFile } from '../model/models';
45
49
 
46
- export const APIS = [AccountApi, DepositAddressesApi, LinkedWalletsApi, ManagedUsersApi, ManagedUsersDepositAddressesApi, ManagedUsersLinkedWalletsApi, ManagedUsersOrdersApi, ManagedUsersPortfolioApi, ManagedUsersTransactionsApi, ManagedUsersValidatorsApi, OrdersApi, PortfolioApi, TransactionsApi, ValidatorMarketplaceBuyersApi, ValidatorMarketplaceSellersApi, ValidatorMarketplaceWebhooksApi, ValidatorsApi];
50
+ export const APIS = [AccountApi, AccountApiKeysApi, DepositAddressesApi, LinkedWalletsApi, ManagedUsersApi, ManagedUsersDepositAddressesApi, ManagedUsersLinkedWalletsApi, ManagedUsersOrdersApi, ManagedUsersPortfolioApi, ManagedUsersTransactionsApi, ManagedUsersValidatorsApi, OrdersApi, PortfolioApi, TransactionsApi, ValidatorMarketplaceBuyersApi, ValidatorMarketplaceFacilitatorApi, ValidatorMarketplaceSellersApi, ValidatorMarketplaceWebhooksApi, ValidatorsApi];
@@ -16,6 +16,7 @@ import http from 'http';
16
16
 
17
17
  /* tslint:disable:no-unused-locals */
18
18
  import { ErrorResponse } from '../model/errorResponse';
19
+ import { GetWithdrawalsResponse } from '../model/getWithdrawalsResponse';
19
20
  import { ValidatorInfo } from '../model/validatorInfo';
20
21
 
21
22
  import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
@@ -34,6 +35,15 @@ export enum ManagedUsersValidatorsApiApiKeys {
34
35
  }
35
36
 
36
37
 
38
+ // If vendorExtensions.x-packageParams is true, use a single object to pass parameters
39
+ export interface ManagedUsersValidatorsApiParams {
40
+ userId: string;
41
+ startDate?: string;
42
+ endDate?: string;
43
+ page?: number;
44
+ limit?: number;
45
+ validatorIndices?: string;
46
+ }
37
47
 
38
48
  export class ManagedUsersValidatorsApi {
39
49
  protected _basePath = defaultBasePath;
@@ -97,6 +107,112 @@ export class ManagedUsersValidatorsApi {
97
107
  this.interceptors.push(interceptor);
98
108
  }
99
109
 
110
+ /**
111
+ * Retrieves a paginated list of validator withdrawals for a specific managed user. The endpoint supports filtering by start and end date, page number, and limit. Additionally, it allows filtering by validator indices.
112
+ * @summary Get a list of validator withdrawals for a managed user
113
+ * @param userId
114
+ * @param startDate Start date for filtering withdrawal statistics
115
+ * @param endDate End date for filtering withdrawal statistics
116
+ * @param page Withdrawal list page number
117
+ * @param limit Number of withdrawals to return per page
118
+ * @param validatorIndices Comma-separated list of validator indices to filter withdrawals (e.g., \&quot;123,456,789\&quot;)
119
+ */
120
+
121
+
122
+
123
+
124
+
125
+ public async getValidatorWithdrawalsForUser(params?: ManagedUsersValidatorsApiParams, options: { headers: { [name: string]: string } } = { headers: {} }): Promise<{ body: GetWithdrawalsResponse, status: number }> {
126
+
127
+ const localVarPath = this.basePath + '/managedUsers/{userId}/validators/withdrawals'
128
+ .replace('{' + 'userId' + '}', encodeURIComponent(String(params?.userId)));
129
+
130
+ let localVarQueryParameters: any = {};
131
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
132
+ const produces = ['application/json'];
133
+ if (produces.indexOf('application/json') >= 0) {
134
+ localVarHeaderParams.Accept = 'application/json';
135
+ } else {
136
+ localVarHeaderParams.Accept = produces.join(',');
137
+ }
138
+ let localVarFormParams: any = {};
139
+
140
+
141
+ // Verify required parameter 'userId' is not null or undefined
142
+ if (params?.userId === null || params?.userId === undefined) {
143
+ throw new Error('Required parameter "userId" was null or undefined when calling getValidatorWithdrawalsForUser.');
144
+ }
145
+
146
+
147
+
148
+ if (params?.startDate !== undefined) {
149
+ localVarQueryParameters['start_date'] = ObjectSerializer.serialize(params?.startDate, "string");
150
+ }
151
+ if (params?.endDate !== undefined) {
152
+ localVarQueryParameters['end_date'] = ObjectSerializer.serialize(params?.endDate, "string");
153
+ }
154
+ if (params?.page !== undefined) {
155
+ localVarQueryParameters['page'] = ObjectSerializer.serialize(params?.page, "number");
156
+ }
157
+ if (params?.limit !== undefined) {
158
+ localVarQueryParameters['limit'] = ObjectSerializer.serialize(params?.limit, "number");
159
+ }
160
+ if (params?.validatorIndices !== undefined) {
161
+ localVarQueryParameters['validator_indices'] = ObjectSerializer.serialize(params?.validatorIndices, "string");
162
+ }
163
+
164
+
165
+
166
+
167
+ (<any>Object).assign(localVarHeaderParams, options.headers);
168
+
169
+ let localVarUseFormData = false;
170
+
171
+
172
+
173
+ let localVarRequestOptions: localVarRequest.Options = {
174
+ method: 'GET',
175
+ qs: localVarQueryParameters,
176
+ headers: localVarHeaderParams,
177
+ uri: localVarPath,
178
+ useQuerystring: this._useQuerystring,
179
+ json: true,
180
+ };
181
+
182
+ let authenticationPromise = Promise.resolve();
183
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
184
+
185
+ let interceptorPromise = authenticationPromise;
186
+ for (const interceptor of this.interceptors) {
187
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
188
+ }
189
+
190
+ return interceptorPromise.then(() => {
191
+ if (Object.keys(localVarFormParams).length) {
192
+ if (localVarUseFormData) {
193
+ (<any>localVarRequestOptions).formData = localVarFormParams;
194
+ } else {
195
+ localVarRequestOptions.form = localVarFormParams;
196
+ }
197
+ }
198
+ return new Promise<{ body: GetWithdrawalsResponse, status: number }>((resolve, reject) => {
199
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
200
+ if (error) {
201
+ console.error('API call error:', error);
202
+ reject(error);
203
+ } else {
204
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
205
+ body = ObjectSerializer.deserialize(body, "GetWithdrawalsResponse");
206
+ resolve({ body: body, status: response.statusCode });
207
+ } else {
208
+ console.error('API response error:', response.statusCode);
209
+ resolve({ body: body, status: response.statusCode });
210
+ }
211
+ }
212
+ });
213
+ });
214
+ } )
215
+ }
100
216
  /**
101
217
  *
102
218
  * @summary Get all validators associated with the managed user