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