@northstake/northstakeapi 1.0.24 → 1.0.26
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 +6 -36
- package/.openapi-generator/VERSION +1 -1
- package/api/apis.ts +3 -23
- package/api/{managedUsersApi.ts → smartContractsApi.ts} +118 -53
- package/api.ts +9 -69
- package/dist/api/apis.d.ts +3 -23
- package/dist/api/apis.js +3 -23
- package/dist/api/smartContractsApi.d.ts +125 -0
- package/dist/api/{managedUsersApi.js → smartContractsApi.js} +90 -49
- package/dist/api.d.ts +7 -47
- package/dist/api.js +8 -58
- package/dist/model/{getTransactionsResponse.d.ts → getSmartContractInternalTransactions200Response.d.ts} +7 -7
- package/dist/model/{transactionsforUser.js → getSmartContractInternalTransactions200Response.js} +11 -11
- package/dist/model/{allManagedUsersResponse.d.ts → getSmartContractMinedBlocks200Response.d.ts} +4 -4
- package/dist/model/{allManagedUsersResponse.js → getSmartContractMinedBlocks200Response.js} +9 -9
- package/dist/model/{transactionsforUser.d.ts → getSmartContractTransactions200Response.d.ts} +5 -5
- package/dist/model/{getTransactionsResponse.js → getSmartContractTransactions200Response.js} +10 -10
- package/dist/model/{stakeStep.d.ts → internalTransaction.d.ts} +9 -7
- package/dist/model/internalTransaction.js +58 -0
- package/dist/model/{managedUser.d.ts → minedBlock.d.ts} +8 -6
- package/dist/model/minedBlock.js +43 -0
- package/dist/model/models.d.ts +5 -25
- package/dist/model/models.js +15 -67
- package/dist/model/transaction.d.ts +40 -17
- package/dist/model/transaction.js +74 -17
- package/dist/model/webhookPayloadData.d.ts +2 -10
- package/dist/model/webhookPayloadData.js +2 -12
- package/model/{transactionsforUser.ts → getSmartContractInternalTransactions200Response.ts} +13 -13
- package/model/{allManagedUsersResponse.ts → getSmartContractMinedBlocks200Response.ts} +8 -8
- package/model/{getTransactionsResponse.ts → getSmartContractTransactions200Response.ts} +10 -10
- package/model/internalTransaction.ts +70 -0
- package/model/{depositAddress.ts → minedBlock.ts} +19 -13
- package/model/models.ts +17 -114
- package/model/transaction.ts +114 -31
- package/model/webhookPayloadData.ts +4 -23
- package/package.json +1 -1
- package/api/depositAddressesApi.ts +0 -267
- package/api/managedUsersDepositAddressesApi.ts +0 -186
- package/api/managedUsersLinkedWalletsApi.ts +0 -369
- package/api/managedUsersOrdersApi.ts +0 -462
- package/api/managedUsersPortfolioApi.ts +0 -186
- package/api/managedUsersTransactionsApi.ts +0 -222
- package/api/managedUsersValidatorsApi.ts +0 -302
- package/api/ordersApi.ts +0 -432
- package/api/portfolioApi.ts +0 -180
- package/api/transactionsApi.ts +0 -215
- package/dist/api/depositAddressesApi.d.ts +0 -64
- package/dist/api/depositAddressesApi.js +0 -207
- package/dist/api/managedUsersApi.d.ts +0 -94
- package/dist/api/managedUsersDepositAddressesApi.d.ts +0 -51
- package/dist/api/managedUsersDepositAddressesApi.js +0 -146
- package/dist/api/managedUsersLinkedWalletsApi.d.ts +0 -80
- package/dist/api/managedUsersLinkedWalletsApi.js +0 -290
- package/dist/api/managedUsersOrdersApi.d.ts +0 -94
- package/dist/api/managedUsersOrdersApi.js +0 -364
- package/dist/api/managedUsersPortfolioApi.d.ts +0 -51
- package/dist/api/managedUsersPortfolioApi.js +0 -146
- package/dist/api/managedUsersTransactionsApi.d.ts +0 -68
- package/dist/api/managedUsersTransactionsApi.js +0 -170
- package/dist/api/managedUsersValidatorsApi.d.ts +0 -78
- package/dist/api/managedUsersValidatorsApi.js +0 -233
- package/dist/api/ordersApi.d.ts +0 -90
- package/dist/api/ordersApi.js +0 -333
- package/dist/api/portfolioApi.d.ts +0 -50
- package/dist/api/portfolioApi.js +0 -140
- package/dist/api/transactionsApi.d.ts +0 -66
- package/dist/api/transactionsApi.js +0 -164
- package/dist/model/addLinkedWalletForUserRequest.d.ts +0 -29
- package/dist/model/addLinkedWalletForUserRequest.js +0 -33
- package/dist/model/createManagedUserRequest.d.ts +0 -25
- package/dist/model/createManagedUserRequest.js +0 -28
- package/dist/model/depositAddress.d.ts +0 -35
- package/dist/model/depositAddress.js +0 -36
- package/dist/model/depositAddressesForUserResponse.d.ts +0 -27
- package/dist/model/depositAddressesForUserResponse.js +0 -33
- package/dist/model/managedUser.js +0 -36
- package/dist/model/managedUserDetails.d.ts +0 -31
- package/dist/model/managedUserDetails.js +0 -41
- package/dist/model/order.d.ts +0 -42
- package/dist/model/order.js +0 -48
- package/dist/model/orderDocument.d.ts +0 -50
- package/dist/model/orderDocument.js +0 -71
- package/dist/model/orderDocumentSteps.d.ts +0 -30
- package/dist/model/orderDocumentSteps.js +0 -33
- package/dist/model/orderType.d.ts +0 -15
- package/dist/model/orderType.js +0 -13
- package/dist/model/orderUpdatePayload.d.ts +0 -36
- package/dist/model/orderUpdatePayload.js +0 -38
- package/dist/model/portfolioEntity.d.ts +0 -33
- package/dist/model/portfolioEntity.js +0 -41
- package/dist/model/stakeStep.js +0 -33
- package/dist/model/stakeStepElement.d.ts +0 -30
- package/dist/model/stakeStepElement.js +0 -33
- package/dist/model/stepStatus.d.ts +0 -15
- package/dist/model/stepStatus.js +0 -13
- package/dist/model/transactionEventType.d.ts +0 -15
- package/dist/model/transactionEventType.js +0 -13
- package/dist/model/unstakeStep.d.ts +0 -32
- package/dist/model/unstakeStep.js +0 -33
- package/dist/model/unstakeStepElement.d.ts +0 -30
- package/dist/model/unstakeStepElement.js +0 -33
- package/dist/model/unstakeStepType.d.ts +0 -15
- package/dist/model/unstakeStepType.js +0 -13
- package/dist/model/withdrawalStep.d.ts +0 -32
- package/dist/model/withdrawalStep.js +0 -33
- package/dist/model/withdrawalStepElement.d.ts +0 -30
- package/dist/model/withdrawalStepElement.js +0 -33
- package/dist/model/withdrawalStepType.d.ts +0 -15
- package/dist/model/withdrawalStepType.js +0 -13
- package/model/addLinkedWalletForUserRequest.ts +0 -40
- package/model/createManagedUserRequest.ts +0 -31
- package/model/depositAddressesForUserResponse.ts +0 -38
- package/model/managedUser.ts +0 -40
- package/model/managedUserDetails.ts +0 -47
- package/model/order.ts +0 -68
- package/model/orderDocument.ts +0 -106
- package/model/orderDocumentSteps.ts +0 -44
- package/model/orderType.ts +0 -21
- package/model/orderUpdatePayload.ts +0 -52
- package/model/portfolioEntity.ts +0 -49
- package/model/stakeStep.ts +0 -43
- package/model/stakeStepElement.ts +0 -41
- package/model/stepStatus.ts +0 -21
- package/model/transactionEventType.ts +0 -23
- package/model/unstakeStep.ts +0 -43
- package/model/unstakeStepElement.ts +0 -41
- package/model/unstakeStepType.ts +0 -32
- package/model/withdrawalStep.ts +0 -43
- package/model/withdrawalStepElement.ts +0 -41
- package/model/withdrawalStepType.ts +0 -24
|
@@ -1,369 +0,0 @@
|
|
|
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 { AddLinkedWalletForUserRequest } from '../model/addLinkedWalletForUserRequest';
|
|
19
|
-
import { ErrorResponse } from '../model/errorResponse';
|
|
20
|
-
import { Wallet } from '../model/wallet';
|
|
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 ManagedUsersLinkedWalletsApiApiKeys {
|
|
34
|
-
ApiKeyAuth,
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export class ManagedUsersLinkedWalletsApi {
|
|
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: ManagedUsersLinkedWalletsApiApiKeys, value: string) {
|
|
90
|
-
(this.authentications as any)[ManagedUsersLinkedWalletsApiApiKeys[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 Add a new linked wallet for a managed user
|
|
104
|
-
* @param userId The unique identifier for the managed user
|
|
105
|
-
* @param addLinkedWalletForUserRequest
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
public async addLinkedWalletForUser (userId: string, addLinkedWalletForUserRequest: AddLinkedWalletForUserRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: any, status: number }> {
|
|
113
|
-
|
|
114
|
-
const localVarPath = this.basePath + '/managedUsers/{userId}/linkedWallets'
|
|
115
|
-
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
116
|
-
|
|
117
|
-
let localVarQueryParameters: any = {};
|
|
118
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
119
|
-
const produces = ['application/json'];
|
|
120
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
121
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
122
|
-
} else {
|
|
123
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
124
|
-
}
|
|
125
|
-
let localVarFormParams: any = {};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
// Verify required parameter 'userId' is not null or undefined
|
|
129
|
-
if (userId === null || userId === undefined) {
|
|
130
|
-
throw new Error('Required parameter "userId" was null or undefined when calling addLinkedWalletForUser.');
|
|
131
|
-
}
|
|
132
|
-
// Verify required parameter 'addLinkedWalletForUserRequest' is not null or undefined
|
|
133
|
-
if (addLinkedWalletForUserRequest === null || addLinkedWalletForUserRequest === undefined) {
|
|
134
|
-
throw new Error('Required parameter "addLinkedWalletForUserRequest" was null or undefined when calling addLinkedWalletForUser.');
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
144
|
-
|
|
145
|
-
let localVarUseFormData = false;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
150
|
-
method: 'POST',
|
|
151
|
-
qs: localVarQueryParameters,
|
|
152
|
-
headers: localVarHeaderParams,
|
|
153
|
-
uri: localVarPath,
|
|
154
|
-
useQuerystring: this._useQuerystring,
|
|
155
|
-
json: true,
|
|
156
|
-
body: ObjectSerializer.serialize(addLinkedWalletForUserRequest, "AddLinkedWalletForUserRequest")
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
let authenticationPromise = Promise.resolve();
|
|
160
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
161
|
-
|
|
162
|
-
let interceptorPromise = authenticationPromise;
|
|
163
|
-
for (const interceptor of this.interceptors) {
|
|
164
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return interceptorPromise.then(() => {
|
|
168
|
-
if (Object.keys(localVarFormParams).length) {
|
|
169
|
-
if (localVarUseFormData) {
|
|
170
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
171
|
-
} else {
|
|
172
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return new Promise<{ body: any, status: number }>((resolve, reject) => {
|
|
176
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
177
|
-
if (error) {
|
|
178
|
-
console.error('API call error:', error);
|
|
179
|
-
reject(error);
|
|
180
|
-
} else {
|
|
181
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
182
|
-
resolve({ body: body, status: response.statusCode });
|
|
183
|
-
} else {
|
|
184
|
-
console.error('API response error:', response.statusCode);
|
|
185
|
-
resolve({ body: body, status: response.statusCode });
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
} )
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
*
|
|
194
|
-
* @summary Delete a linked wallet for a managed user
|
|
195
|
-
* @param walletId The id of the linked wallet to delete
|
|
196
|
-
* @param userId The unique identifier for the managed user
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
public async deleteLinkedWalletForUser (walletId: string, userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: any, status: number }> {
|
|
204
|
-
|
|
205
|
-
const localVarPath = this.basePath + '/managedUsers/{userId}/linkedWallets/{walletId}'
|
|
206
|
-
.replace('{' + 'walletId' + '}', encodeURIComponent(String(walletId)))
|
|
207
|
-
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
208
|
-
|
|
209
|
-
let localVarQueryParameters: any = {};
|
|
210
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
211
|
-
const produces = ['application/json'];
|
|
212
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
213
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
214
|
-
} else {
|
|
215
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
216
|
-
}
|
|
217
|
-
let localVarFormParams: any = {};
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
// Verify required parameter 'walletId' is not null or undefined
|
|
221
|
-
if (walletId === null || walletId === undefined) {
|
|
222
|
-
throw new Error('Required parameter "walletId" was null or undefined when calling deleteLinkedWalletForUser.');
|
|
223
|
-
}
|
|
224
|
-
// Verify required parameter 'userId' is not null or undefined
|
|
225
|
-
if (userId === null || userId === undefined) {
|
|
226
|
-
throw new Error('Required parameter "userId" was null or undefined when calling deleteLinkedWalletForUser.');
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
236
|
-
|
|
237
|
-
let localVarUseFormData = false;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
242
|
-
method: 'DELETE',
|
|
243
|
-
qs: localVarQueryParameters,
|
|
244
|
-
headers: localVarHeaderParams,
|
|
245
|
-
uri: localVarPath,
|
|
246
|
-
useQuerystring: this._useQuerystring,
|
|
247
|
-
json: true,
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
let authenticationPromise = Promise.resolve();
|
|
251
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
252
|
-
|
|
253
|
-
let interceptorPromise = authenticationPromise;
|
|
254
|
-
for (const interceptor of this.interceptors) {
|
|
255
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
return interceptorPromise.then(() => {
|
|
259
|
-
if (Object.keys(localVarFormParams).length) {
|
|
260
|
-
if (localVarUseFormData) {
|
|
261
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
262
|
-
} else {
|
|
263
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
return new Promise<{ body: any, status: number }>((resolve, reject) => {
|
|
267
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
268
|
-
if (error) {
|
|
269
|
-
console.error('API call error:', error);
|
|
270
|
-
reject(error);
|
|
271
|
-
} else {
|
|
272
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
273
|
-
resolve({ body: body, status: response.statusCode });
|
|
274
|
-
} else {
|
|
275
|
-
console.error('API response error:', response.statusCode);
|
|
276
|
-
resolve({ body: body, status: response.statusCode });
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
});
|
|
281
|
-
} )
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
*
|
|
285
|
-
* @summary List linked wallets for a managed user
|
|
286
|
-
* @param userId The unique identifier for the managed user
|
|
287
|
-
*/
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
public async listLinkedWalletsForUser (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: Array<Wallet>, status: number }> {
|
|
294
|
-
|
|
295
|
-
const localVarPath = this.basePath + '/managedUsers/{userId}/linkedWallets'
|
|
296
|
-
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
297
|
-
|
|
298
|
-
let localVarQueryParameters: any = {};
|
|
299
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
300
|
-
const produces = ['application/json'];
|
|
301
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
302
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
303
|
-
} else {
|
|
304
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
305
|
-
}
|
|
306
|
-
let localVarFormParams: any = {};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
// Verify required parameter 'userId' is not null or undefined
|
|
310
|
-
if (userId === null || userId === undefined) {
|
|
311
|
-
throw new Error('Required parameter "userId" was null or undefined when calling listLinkedWalletsForUser.');
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
321
|
-
|
|
322
|
-
let localVarUseFormData = false;
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
327
|
-
method: 'GET',
|
|
328
|
-
qs: localVarQueryParameters,
|
|
329
|
-
headers: localVarHeaderParams,
|
|
330
|
-
uri: localVarPath,
|
|
331
|
-
useQuerystring: this._useQuerystring,
|
|
332
|
-
json: true,
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
let authenticationPromise = Promise.resolve();
|
|
336
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
337
|
-
|
|
338
|
-
let interceptorPromise = authenticationPromise;
|
|
339
|
-
for (const interceptor of this.interceptors) {
|
|
340
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
return interceptorPromise.then(() => {
|
|
344
|
-
if (Object.keys(localVarFormParams).length) {
|
|
345
|
-
if (localVarUseFormData) {
|
|
346
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
347
|
-
} else {
|
|
348
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
return new Promise<{ body: Array<Wallet>, status: number }>((resolve, reject) => {
|
|
352
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
353
|
-
if (error) {
|
|
354
|
-
console.error('API call error:', error);
|
|
355
|
-
reject(error);
|
|
356
|
-
} else {
|
|
357
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
358
|
-
body = ObjectSerializer.deserialize(body, "Array<Wallet>");
|
|
359
|
-
resolve({ body: body, status: response.statusCode });
|
|
360
|
-
} else {
|
|
361
|
-
console.error('API response error:', response.statusCode);
|
|
362
|
-
resolve({ body: body, status: response.statusCode });
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
});
|
|
367
|
-
} )
|
|
368
|
-
}
|
|
369
|
-
}
|