@northstake/northstakeapi 1.0.23 → 1.0.25
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 +3 -37
- package/api/{managedUsersLinkedWalletsApi.ts → accountApiKeysApi.ts} +32 -55
- package/api/apis.ts +3 -23
- package/api.ts +6 -70
- package/dist/api/{depositAddressesApi.d.ts → accountApiKeysApi.d.ts} +25 -12
- package/dist/api/{managedUsersLinkedWalletsApi.js → accountApiKeysApi.js} +32 -56
- package/dist/api/apis.d.ts +3 -23
- package/dist/api/apis.js +3 -23
- package/dist/api.d.ts +4 -48
- package/dist/api.js +5 -59
- package/dist/model/apiKey.d.ts +54 -0
- package/dist/model/apiKey.js +53 -0
- package/dist/model/{transactionsforUser.d.ts → generateApiKeyRequest.d.ts} +14 -9
- package/dist/model/generateApiKeyRequest.js +43 -0
- package/dist/model/models.d.ts +2 -26
- package/dist/model/models.js +8 -70
- package/dist/model/validatorWithdrawal.d.ts +1 -0
- package/dist/model/validatorWithdrawal.js +5 -0
- package/dist/model/webhookPayloadData.d.ts +2 -10
- package/dist/model/webhookPayloadData.js +2 -12
- package/model/apiKey.ts +88 -0
- package/model/generateApiKeyRequest.ts +66 -0
- package/model/models.ts +9 -124
- package/model/validatorWithdrawal.ts +6 -0
- package/model/webhookPayloadData.ts +4 -23
- package/package.json +2 -2
- package/api/depositAddressesApi.ts +0 -267
- package/api/managedUsersApi.ts +0 -448
- package/api/managedUsersDepositAddressesApi.ts +0 -186
- 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.js +0 -207
- package/dist/api/managedUsersApi.d.ts +0 -94
- package/dist/api/managedUsersApi.js +0 -348
- 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/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/allManagedUsersResponse.d.ts +0 -38
- package/dist/model/allManagedUsersResponse.js +0 -43
- 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/getTransactionsResponse.d.ts +0 -38
- package/dist/model/getTransactionsResponse.js +0 -43
- package/dist/model/managedUser.d.ts +0 -29
- 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.d.ts +0 -32
- 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/transaction.d.ts +0 -49
- package/dist/model/transaction.js +0 -56
- package/dist/model/transactionEventType.d.ts +0 -15
- package/dist/model/transactionEventType.js +0 -13
- package/dist/model/transactionsforUser.js +0 -43
- 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/allManagedUsersResponse.ts +0 -59
- package/model/createManagedUserRequest.ts +0 -31
- package/model/depositAddress.ts +0 -46
- package/model/depositAddressesForUserResponse.ts +0 -38
- package/model/getTransactionsResponse.ts +0 -59
- 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/transaction.ts +0 -80
- package/model/transactionEventType.ts +0 -23
- package/model/transactionsforUser.ts +0 -59
- 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
package/.openapi-generator/FILES
CHANGED
|
@@ -2,19 +2,9 @@
|
|
|
2
2
|
.openapi-generator-ignore
|
|
3
3
|
api.ts
|
|
4
4
|
api/accountApi.ts
|
|
5
|
+
api/accountApiKeysApi.ts
|
|
5
6
|
api/apis.ts
|
|
6
|
-
api/depositAddressesApi.ts
|
|
7
7
|
api/linkedWalletsApi.ts
|
|
8
|
-
api/managedUsersApi.ts
|
|
9
|
-
api/managedUsersDepositAddressesApi.ts
|
|
10
|
-
api/managedUsersLinkedWalletsApi.ts
|
|
11
|
-
api/managedUsersOrdersApi.ts
|
|
12
|
-
api/managedUsersPortfolioApi.ts
|
|
13
|
-
api/managedUsersTransactionsApi.ts
|
|
14
|
-
api/managedUsersValidatorsApi.ts
|
|
15
|
-
api/ordersApi.ts
|
|
16
|
-
api/portfolioApi.ts
|
|
17
|
-
api/transactionsApi.ts
|
|
18
8
|
api/validatorMarketplaceBuyersApi.ts
|
|
19
9
|
api/validatorMarketplaceFacilitatorApi.ts
|
|
20
10
|
api/validatorMarketplaceSellersApi.ts
|
|
@@ -23,14 +13,10 @@ api/validatorsApi.ts
|
|
|
23
13
|
git_push.sh
|
|
24
14
|
model/acceptedQuote.ts
|
|
25
15
|
model/accountEntity.ts
|
|
26
|
-
model/addLinkedWalletForUserRequest.ts
|
|
27
16
|
model/addLinkedWalletRequest.ts
|
|
28
|
-
model/
|
|
17
|
+
model/apiKey.ts
|
|
29
18
|
model/asset.ts
|
|
30
|
-
model/createManagedUserRequest.ts
|
|
31
19
|
model/createRFQRequest.ts
|
|
32
|
-
model/depositAddress.ts
|
|
33
|
-
model/depositAddressesForUserResponse.ts
|
|
34
20
|
model/errorResponse.ts
|
|
35
21
|
model/escrowPayment.ts
|
|
36
22
|
model/escrowReleased.ts
|
|
@@ -45,19 +31,11 @@ model/ethereumValidatorKeyKeystoreCryptoKdfParams.ts
|
|
|
45
31
|
model/exitEstimateBase.ts
|
|
46
32
|
model/exitEstimateSeller.ts
|
|
47
33
|
model/exitProposal.ts
|
|
34
|
+
model/generateApiKeyRequest.ts
|
|
48
35
|
model/getMarketplaceMetadata200Response.ts
|
|
49
|
-
model/getTransactionsResponse.ts
|
|
50
36
|
model/getWithdrawalsResponse.ts
|
|
51
37
|
model/listAllRFQsForFacilitator200Response.ts
|
|
52
|
-
model/managedUser.ts
|
|
53
|
-
model/managedUserDetails.ts
|
|
54
38
|
model/models.ts
|
|
55
|
-
model/order.ts
|
|
56
|
-
model/orderDocument.ts
|
|
57
|
-
model/orderDocumentSteps.ts
|
|
58
|
-
model/orderType.ts
|
|
59
|
-
model/orderUpdatePayload.ts
|
|
60
|
-
model/portfolioEntity.ts
|
|
61
39
|
model/provideEscrowHashForRFQDocumentRequest.ts
|
|
62
40
|
model/quote.ts
|
|
63
41
|
model/rFQBidFacilitator.ts
|
|
@@ -80,16 +58,7 @@ model/rFQWebhookEventType.ts
|
|
|
80
58
|
model/registerWithdrawalRecipientSettlementRequest.ts
|
|
81
59
|
model/settlementSteps.ts
|
|
82
60
|
model/smartContract.ts
|
|
83
|
-
model/stakeStep.ts
|
|
84
|
-
model/stakeStepElement.ts
|
|
85
|
-
model/stepStatus.ts
|
|
86
61
|
model/submittedQuote.ts
|
|
87
|
-
model/transaction.ts
|
|
88
|
-
model/transactionEventType.ts
|
|
89
|
-
model/transactionsforUser.ts
|
|
90
|
-
model/unstakeStep.ts
|
|
91
|
-
model/unstakeStepElement.ts
|
|
92
|
-
model/unstakeStepType.ts
|
|
93
62
|
model/validatorInfo.ts
|
|
94
63
|
model/validatorKeyHolder.ts
|
|
95
64
|
model/validatorType.ts
|
|
@@ -118,6 +87,3 @@ model/webhookPayloadRFQWithdrawalClaimableDetails.ts
|
|
|
118
87
|
model/webhookRegistration.ts
|
|
119
88
|
model/webhookRegistrationDetails.ts
|
|
120
89
|
model/withdrawalRecipientSettlement.ts
|
|
121
|
-
model/withdrawalStep.ts
|
|
122
|
-
model/withdrawalStepElement.ts
|
|
123
|
-
model/withdrawalStepType.ts
|
|
@@ -15,9 +15,9 @@ import localVarRequest from 'request';
|
|
|
15
15
|
import http from 'http';
|
|
16
16
|
|
|
17
17
|
/* tslint:disable:no-unused-locals */
|
|
18
|
-
import {
|
|
18
|
+
import { ApiKey } from '../model/apiKey';
|
|
19
19
|
import { ErrorResponse } from '../model/errorResponse';
|
|
20
|
-
import {
|
|
20
|
+
import { GenerateApiKeyRequest } from '../model/generateApiKeyRequest';
|
|
21
21
|
|
|
22
22
|
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
23
23
|
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, JWTAuth } from '../model/models';
|
|
@@ -30,13 +30,13 @@ let defaultBasePath = 'https://api.northstake.dk/v1';
|
|
|
30
30
|
// This file is autogenerated - Please do not edit
|
|
31
31
|
// ===============================================
|
|
32
32
|
|
|
33
|
-
export enum
|
|
33
|
+
export enum AccountApiKeysApiApiKeys {
|
|
34
34
|
ApiKeyAuth,
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
export class
|
|
39
|
+
export class AccountApiKeysApi {
|
|
40
40
|
protected _basePath = defaultBasePath;
|
|
41
41
|
protected _defaultHeaders : any = {};
|
|
42
42
|
protected _useQuerystring : boolean = false;
|
|
@@ -86,8 +86,8 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
86
86
|
this.authentications.default = auth;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
public setApiKey(key:
|
|
90
|
-
(this.authentications as any)[
|
|
89
|
+
public setApiKey(key: AccountApiKeysApiApiKeys, value: string) {
|
|
90
|
+
(this.authentications as any)[AccountApiKeysApiApiKeys[key]].apiKey = value;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
set accessToken(accessToken: string | (() => string)) {
|
|
@@ -100,38 +100,27 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
*
|
|
103
|
-
* @summary
|
|
104
|
-
* @param
|
|
105
|
-
* @param addLinkedWalletForUserRequest
|
|
103
|
+
* @summary Delete an API key
|
|
104
|
+
* @param apiKeyId The ID of the API key to delete
|
|
106
105
|
*/
|
|
107
106
|
|
|
108
107
|
|
|
109
108
|
|
|
110
109
|
|
|
111
110
|
|
|
112
|
-
public async
|
|
111
|
+
public async deleteApiKey (apiKeyId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: any, status: number }> {
|
|
113
112
|
|
|
114
|
-
const localVarPath = this.basePath + '/
|
|
115
|
-
.replace('{' + '
|
|
113
|
+
const localVarPath = this.basePath + '/account/apiKeys/{apiKeyId}'
|
|
114
|
+
.replace('{' + 'apiKeyId' + '}', encodeURIComponent(String(apiKeyId)));
|
|
116
115
|
|
|
117
116
|
let localVarQueryParameters: any = {};
|
|
118
117
|
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
118
|
let localVarFormParams: any = {};
|
|
126
119
|
|
|
127
120
|
|
|
128
|
-
// Verify required parameter '
|
|
129
|
-
if (
|
|
130
|
-
throw new Error('Required parameter "
|
|
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.');
|
|
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.');
|
|
135
124
|
}
|
|
136
125
|
|
|
137
126
|
|
|
@@ -147,13 +136,12 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
147
136
|
|
|
148
137
|
|
|
149
138
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
150
|
-
method: '
|
|
139
|
+
method: 'DELETE',
|
|
151
140
|
qs: localVarQueryParameters,
|
|
152
141
|
headers: localVarHeaderParams,
|
|
153
142
|
uri: localVarPath,
|
|
154
143
|
useQuerystring: this._useQuerystring,
|
|
155
144
|
json: true,
|
|
156
|
-
body: ObjectSerializer.serialize(addLinkedWalletForUserRequest, "AddLinkedWalletForUserRequest")
|
|
157
145
|
};
|
|
158
146
|
|
|
159
147
|
let authenticationPromise = Promise.resolve();
|
|
@@ -190,21 +178,18 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
190
178
|
} )
|
|
191
179
|
}
|
|
192
180
|
/**
|
|
193
|
-
*
|
|
194
|
-
* @summary
|
|
195
|
-
* @param
|
|
196
|
-
* @param userId The unique identifier for the managed user
|
|
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
|
|
197
184
|
*/
|
|
198
185
|
|
|
199
186
|
|
|
200
187
|
|
|
201
188
|
|
|
202
189
|
|
|
203
|
-
public async
|
|
190
|
+
public async generateApiKey (generateApiKeyRequest: GenerateApiKeyRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: ApiKey, status: number }> {
|
|
204
191
|
|
|
205
|
-
const localVarPath = this.basePath + '/
|
|
206
|
-
.replace('{' + 'walletId' + '}', encodeURIComponent(String(walletId)))
|
|
207
|
-
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
192
|
+
const localVarPath = this.basePath + '/account/apiKeys';
|
|
208
193
|
|
|
209
194
|
let localVarQueryParameters: any = {};
|
|
210
195
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
@@ -217,13 +202,9 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
217
202
|
let localVarFormParams: any = {};
|
|
218
203
|
|
|
219
204
|
|
|
220
|
-
// Verify required parameter '
|
|
221
|
-
if (
|
|
222
|
-
throw new Error('Required parameter "
|
|
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.');
|
|
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.');
|
|
227
208
|
}
|
|
228
209
|
|
|
229
210
|
|
|
@@ -239,12 +220,13 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
239
220
|
|
|
240
221
|
|
|
241
222
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
242
|
-
method: '
|
|
223
|
+
method: 'POST',
|
|
243
224
|
qs: localVarQueryParameters,
|
|
244
225
|
headers: localVarHeaderParams,
|
|
245
226
|
uri: localVarPath,
|
|
246
227
|
useQuerystring: this._useQuerystring,
|
|
247
228
|
json: true,
|
|
229
|
+
body: ObjectSerializer.serialize(generateApiKeyRequest, "GenerateApiKeyRequest")
|
|
248
230
|
};
|
|
249
231
|
|
|
250
232
|
let authenticationPromise = Promise.resolve();
|
|
@@ -263,13 +245,14 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
263
245
|
localVarRequestOptions.form = localVarFormParams;
|
|
264
246
|
}
|
|
265
247
|
}
|
|
266
|
-
return new Promise<{ body:
|
|
248
|
+
return new Promise<{ body: ApiKey, status: number }>((resolve, reject) => {
|
|
267
249
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
268
250
|
if (error) {
|
|
269
251
|
console.error('API call error:', error);
|
|
270
252
|
reject(error);
|
|
271
253
|
} else {
|
|
272
254
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
255
|
+
body = ObjectSerializer.deserialize(body, "ApiKey");
|
|
273
256
|
resolve({ body: body, status: response.statusCode });
|
|
274
257
|
} else {
|
|
275
258
|
console.error('API response error:', response.statusCode);
|
|
@@ -282,18 +265,16 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
282
265
|
}
|
|
283
266
|
/**
|
|
284
267
|
*
|
|
285
|
-
* @summary List
|
|
286
|
-
* @param userId The unique identifier for the managed user
|
|
268
|
+
* @summary List all API keys
|
|
287
269
|
*/
|
|
288
270
|
|
|
289
271
|
|
|
290
272
|
|
|
291
273
|
|
|
292
274
|
|
|
293
|
-
public async
|
|
275
|
+
public async listApiKeys (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: Array<ApiKey>, status: number }> {
|
|
294
276
|
|
|
295
|
-
const localVarPath = this.basePath + '/
|
|
296
|
-
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
277
|
+
const localVarPath = this.basePath + '/account/apiKeys';
|
|
297
278
|
|
|
298
279
|
let localVarQueryParameters: any = {};
|
|
299
280
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
@@ -306,10 +287,6 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
306
287
|
let localVarFormParams: any = {};
|
|
307
288
|
|
|
308
289
|
|
|
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
290
|
|
|
314
291
|
|
|
315
292
|
|
|
@@ -348,14 +325,14 @@ export class ManagedUsersLinkedWalletsApi {
|
|
|
348
325
|
localVarRequestOptions.form = localVarFormParams;
|
|
349
326
|
}
|
|
350
327
|
}
|
|
351
|
-
return new Promise<{ body: Array<
|
|
328
|
+
return new Promise<{ body: Array<ApiKey>, status: number }>((resolve, reject) => {
|
|
352
329
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
353
330
|
if (error) {
|
|
354
331
|
console.error('API call error:', error);
|
|
355
332
|
reject(error);
|
|
356
333
|
} else {
|
|
357
334
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
358
|
-
body = ObjectSerializer.deserialize(body, "Array<
|
|
335
|
+
body = ObjectSerializer.deserialize(body, "Array<ApiKey>");
|
|
359
336
|
resolve({ body: body, status: response.statusCode });
|
|
360
337
|
} else {
|
|
361
338
|
console.error('API response error:', response.statusCode);
|
package/api/apis.ts
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
1
|
export * from './accountApi';
|
|
2
2
|
import { AccountApi } from './accountApi';
|
|
3
|
-
export * from './
|
|
4
|
-
import {
|
|
3
|
+
export * from './accountApiKeysApi';
|
|
4
|
+
import { AccountApiKeysApi } from './accountApiKeysApi';
|
|
5
5
|
export * from './linkedWalletsApi';
|
|
6
6
|
import { LinkedWalletsApi } from './linkedWalletsApi';
|
|
7
|
-
export * from './managedUsersApi';
|
|
8
|
-
import { ManagedUsersApi } from './managedUsersApi';
|
|
9
|
-
export * from './managedUsersDepositAddressesApi';
|
|
10
|
-
import { ManagedUsersDepositAddressesApi } from './managedUsersDepositAddressesApi';
|
|
11
|
-
export * from './managedUsersLinkedWalletsApi';
|
|
12
|
-
import { ManagedUsersLinkedWalletsApi } from './managedUsersLinkedWalletsApi';
|
|
13
|
-
export * from './managedUsersOrdersApi';
|
|
14
|
-
import { ManagedUsersOrdersApi } from './managedUsersOrdersApi';
|
|
15
|
-
export * from './managedUsersPortfolioApi';
|
|
16
|
-
import { ManagedUsersPortfolioApi } from './managedUsersPortfolioApi';
|
|
17
|
-
export * from './managedUsersTransactionsApi';
|
|
18
|
-
import { ManagedUsersTransactionsApi } from './managedUsersTransactionsApi';
|
|
19
|
-
export * from './managedUsersValidatorsApi';
|
|
20
|
-
import { ManagedUsersValidatorsApi } from './managedUsersValidatorsApi';
|
|
21
|
-
export * from './ordersApi';
|
|
22
|
-
import { OrdersApi } from './ordersApi';
|
|
23
|
-
export * from './portfolioApi';
|
|
24
|
-
import { PortfolioApi } from './portfolioApi';
|
|
25
|
-
export * from './transactionsApi';
|
|
26
|
-
import { TransactionsApi } from './transactionsApi';
|
|
27
7
|
export * from './validatorMarketplaceBuyersApi';
|
|
28
8
|
import { ValidatorMarketplaceBuyersApi } from './validatorMarketplaceBuyersApi';
|
|
29
9
|
export * from './validatorMarketplaceFacilitatorApi';
|
|
@@ -45,4 +25,4 @@ export class HttpError extends Error {
|
|
|
45
25
|
|
|
46
26
|
export { RequestFile } from '../model/models';
|
|
47
27
|
|
|
48
|
-
export const APIS = [AccountApi,
|
|
28
|
+
export const APIS = [AccountApi, AccountApiKeysApi, LinkedWalletsApi, ValidatorMarketplaceBuyersApi, ValidatorMarketplaceFacilitatorApi, ValidatorMarketplaceSellersApi, ValidatorMarketplaceWebhooksApi, ValidatorsApi];
|
package/api.ts
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
// masterApi.mustache
|
|
2
2
|
import { JWTAuth } from './model/models';
|
|
3
3
|
import { AccountApi } from './api/accountApi';
|
|
4
|
-
import {
|
|
4
|
+
import { AccountApiKeysApi } from './api/accountApiKeysApi';
|
|
5
5
|
import { LinkedWalletsApi } from './api/linkedWalletsApi';
|
|
6
|
-
import { ManagedUsersApi } from './api/managedUsersApi';
|
|
7
|
-
import { ManagedUsersDepositAddressesApi } from './api/managedUsersDepositAddressesApi';
|
|
8
|
-
import { ManagedUsersLinkedWalletsApi } from './api/managedUsersLinkedWalletsApi';
|
|
9
|
-
import { ManagedUsersOrdersApi } from './api/managedUsersOrdersApi';
|
|
10
|
-
import { ManagedUsersPortfolioApi } from './api/managedUsersPortfolioApi';
|
|
11
|
-
import { ManagedUsersTransactionsApi } from './api/managedUsersTransactionsApi';
|
|
12
|
-
import { ManagedUsersValidatorsApi } from './api/managedUsersValidatorsApi';
|
|
13
|
-
import { OrdersApi } from './api/ordersApi';
|
|
14
|
-
import { PortfolioApi } from './api/portfolioApi';
|
|
15
|
-
import { TransactionsApi } from './api/transactionsApi';
|
|
16
6
|
import { ValidatorMarketplaceBuyersApi } from './api/validatorMarketplaceBuyersApi';
|
|
17
7
|
import { ValidatorMarketplaceFacilitatorApi } from './api/validatorMarketplaceFacilitatorApi';
|
|
18
8
|
import { ValidatorMarketplaceSellersApi } from './api/validatorMarketplaceSellersApi';
|
|
@@ -20,14 +10,10 @@ import { ValidatorMarketplaceWebhooksApi } from './api/validatorMarketplaceWebho
|
|
|
20
10
|
import { ValidatorsApi } from './api/validatorsApi';
|
|
21
11
|
export * from './model/./acceptedQuote';
|
|
22
12
|
export * from './model/./accountEntity';
|
|
23
|
-
export * from './model/./addLinkedWalletForUserRequest';
|
|
24
13
|
export * from './model/./addLinkedWalletRequest';
|
|
25
|
-
export * from './model/./
|
|
14
|
+
export * from './model/./apiKey';
|
|
26
15
|
export * from './model/./asset';
|
|
27
|
-
export * from './model/./createManagedUserRequest';
|
|
28
16
|
export * from './model/./createRFQRequest';
|
|
29
|
-
export * from './model/./depositAddress';
|
|
30
|
-
export * from './model/./depositAddressesForUserResponse';
|
|
31
17
|
export * from './model/./errorResponse';
|
|
32
18
|
export * from './model/./escrowPayment';
|
|
33
19
|
export * from './model/./escrowReleased';
|
|
@@ -42,18 +28,10 @@ export * from './model/./ethereumValidatorKeyKeystoreCryptoKdfParams';
|
|
|
42
28
|
export * from './model/./exitEstimateBase';
|
|
43
29
|
export * from './model/./exitEstimateSeller';
|
|
44
30
|
export * from './model/./exitProposal';
|
|
31
|
+
export * from './model/./generateApiKeyRequest';
|
|
45
32
|
export * from './model/./getMarketplaceMetadata200Response';
|
|
46
|
-
export * from './model/./getTransactionsResponse';
|
|
47
33
|
export * from './model/./getWithdrawalsResponse';
|
|
48
34
|
export * from './model/./listAllRFQsForFacilitator200Response';
|
|
49
|
-
export * from './model/./managedUser';
|
|
50
|
-
export * from './model/./managedUserDetails';
|
|
51
|
-
export * from './model/./order';
|
|
52
|
-
export * from './model/./orderDocument';
|
|
53
|
-
export * from './model/./orderDocumentSteps';
|
|
54
|
-
export * from './model/./orderType';
|
|
55
|
-
export * from './model/./orderUpdatePayload';
|
|
56
|
-
export * from './model/./portfolioEntity';
|
|
57
35
|
export * from './model/./provideEscrowHashForRFQDocumentRequest';
|
|
58
36
|
export * from './model/./quote';
|
|
59
37
|
export * from './model/./rFQBidFacilitator';
|
|
@@ -76,16 +54,7 @@ export * from './model/./rFQWebhookEventType';
|
|
|
76
54
|
export * from './model/./registerWithdrawalRecipientSettlementRequest';
|
|
77
55
|
export * from './model/./settlementSteps';
|
|
78
56
|
export * from './model/./smartContract';
|
|
79
|
-
export * from './model/./stakeStep';
|
|
80
|
-
export * from './model/./stakeStepElement';
|
|
81
|
-
export * from './model/./stepStatus';
|
|
82
57
|
export * from './model/./submittedQuote';
|
|
83
|
-
export * from './model/./transaction';
|
|
84
|
-
export * from './model/./transactionEventType';
|
|
85
|
-
export * from './model/./transactionsforUser';
|
|
86
|
-
export * from './model/./unstakeStep';
|
|
87
|
-
export * from './model/./unstakeStepElement';
|
|
88
|
-
export * from './model/./unstakeStepType';
|
|
89
58
|
export * from './model/./validatorInfo';
|
|
90
59
|
export * from './model/./validatorKeyHolder';
|
|
91
60
|
export * from './model/./validatorType';
|
|
@@ -114,9 +83,6 @@ export * from './model/./webhookPayloadRFQWithdrawalClaimableDetails';
|
|
|
114
83
|
export * from './model/./webhookRegistration';
|
|
115
84
|
export * from './model/./webhookRegistrationDetails';
|
|
116
85
|
export * from './model/./withdrawalRecipientSettlement';
|
|
117
|
-
export * from './model/./withdrawalStep';
|
|
118
|
-
export * from './model/./withdrawalStepElement';
|
|
119
|
-
export * from './model/./withdrawalStepType';
|
|
120
86
|
|
|
121
87
|
export class NorthstakeApi {
|
|
122
88
|
constructor(apiKey: string, privateKey: string, basePath: string = "https://api.northstake.dk/v1") {
|
|
@@ -124,30 +90,10 @@ export class NorthstakeApi {
|
|
|
124
90
|
|
|
125
91
|
this.account = new AccountApi(basePath);
|
|
126
92
|
this.account.setDefaultAuthentication(jwtAuth);
|
|
127
|
-
this.
|
|
128
|
-
this.
|
|
93
|
+
this.accountApiKeys = new AccountApiKeysApi(basePath);
|
|
94
|
+
this.accountApiKeys.setDefaultAuthentication(jwtAuth);
|
|
129
95
|
this.linkedWallets = new LinkedWalletsApi(basePath);
|
|
130
96
|
this.linkedWallets.setDefaultAuthentication(jwtAuth);
|
|
131
|
-
this.managedUsers = new ManagedUsersApi(basePath);
|
|
132
|
-
this.managedUsers.setDefaultAuthentication(jwtAuth);
|
|
133
|
-
this.managedUsersDepositAddresses = new ManagedUsersDepositAddressesApi(basePath);
|
|
134
|
-
this.managedUsersDepositAddresses.setDefaultAuthentication(jwtAuth);
|
|
135
|
-
this.managedUsersLinkedWallets = new ManagedUsersLinkedWalletsApi(basePath);
|
|
136
|
-
this.managedUsersLinkedWallets.setDefaultAuthentication(jwtAuth);
|
|
137
|
-
this.managedUsersOrders = new ManagedUsersOrdersApi(basePath);
|
|
138
|
-
this.managedUsersOrders.setDefaultAuthentication(jwtAuth);
|
|
139
|
-
this.managedUsersPortfolio = new ManagedUsersPortfolioApi(basePath);
|
|
140
|
-
this.managedUsersPortfolio.setDefaultAuthentication(jwtAuth);
|
|
141
|
-
this.managedUsersTransactions = new ManagedUsersTransactionsApi(basePath);
|
|
142
|
-
this.managedUsersTransactions.setDefaultAuthentication(jwtAuth);
|
|
143
|
-
this.managedUsersValidators = new ManagedUsersValidatorsApi(basePath);
|
|
144
|
-
this.managedUsersValidators.setDefaultAuthentication(jwtAuth);
|
|
145
|
-
this.orders = new OrdersApi(basePath);
|
|
146
|
-
this.orders.setDefaultAuthentication(jwtAuth);
|
|
147
|
-
this.portfolio = new PortfolioApi(basePath);
|
|
148
|
-
this.portfolio.setDefaultAuthentication(jwtAuth);
|
|
149
|
-
this.transactions = new TransactionsApi(basePath);
|
|
150
|
-
this.transactions.setDefaultAuthentication(jwtAuth);
|
|
151
97
|
this.validatorMarketplaceBuyers = new ValidatorMarketplaceBuyersApi(basePath);
|
|
152
98
|
this.validatorMarketplaceBuyers.setDefaultAuthentication(jwtAuth);
|
|
153
99
|
this.validatorMarketplaceFacilitator = new ValidatorMarketplaceFacilitatorApi(basePath);
|
|
@@ -160,18 +106,8 @@ export class NorthstakeApi {
|
|
|
160
106
|
this.validators.setDefaultAuthentication(jwtAuth);
|
|
161
107
|
}
|
|
162
108
|
public account: AccountApi;
|
|
163
|
-
public
|
|
109
|
+
public accountApiKeys: AccountApiKeysApi;
|
|
164
110
|
public linkedWallets: LinkedWalletsApi;
|
|
165
|
-
public managedUsers: ManagedUsersApi;
|
|
166
|
-
public managedUsersDepositAddresses: ManagedUsersDepositAddressesApi;
|
|
167
|
-
public managedUsersLinkedWallets: ManagedUsersLinkedWalletsApi;
|
|
168
|
-
public managedUsersOrders: ManagedUsersOrdersApi;
|
|
169
|
-
public managedUsersPortfolio: ManagedUsersPortfolioApi;
|
|
170
|
-
public managedUsersTransactions: ManagedUsersTransactionsApi;
|
|
171
|
-
public managedUsersValidators: ManagedUsersValidatorsApi;
|
|
172
|
-
public orders: OrdersApi;
|
|
173
|
-
public portfolio: PortfolioApi;
|
|
174
|
-
public transactions: TransactionsApi;
|
|
175
111
|
public validatorMarketplaceBuyers: ValidatorMarketplaceBuyersApi;
|
|
176
112
|
public validatorMarketplaceFacilitator: ValidatorMarketplaceFacilitatorApi;
|
|
177
113
|
public validatorMarketplaceSellers: ValidatorMarketplaceSellersApi;
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { ApiKey } from '../model/apiKey';
|
|
13
|
+
import { GenerateApiKeyRequest } from '../model/generateApiKeyRequest';
|
|
14
14
|
import { Authentication, Interceptor } from '../model/models';
|
|
15
15
|
import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
|
|
16
|
-
export declare enum
|
|
16
|
+
export declare enum AccountApiKeysApiApiKeys {
|
|
17
17
|
ApiKeyAuth = 0
|
|
18
18
|
}
|
|
19
|
-
export declare class
|
|
19
|
+
export declare class AccountApiKeysApi {
|
|
20
20
|
protected _basePath: string;
|
|
21
21
|
protected _defaultHeaders: any;
|
|
22
22
|
protected _useQuerystring: boolean;
|
|
@@ -33,32 +33,45 @@ export declare class DepositAddressesApi {
|
|
|
33
33
|
get defaultHeaders(): any;
|
|
34
34
|
get basePath(): string;
|
|
35
35
|
setDefaultAuthentication(auth: Authentication): void;
|
|
36
|
-
setApiKey(key:
|
|
36
|
+
setApiKey(key: AccountApiKeysApiApiKeys, value: string): void;
|
|
37
37
|
set accessToken(accessToken: string | (() => string));
|
|
38
38
|
addInterceptor(interceptor: Interceptor): void;
|
|
39
39
|
/**
|
|
40
40
|
*
|
|
41
|
-
* @summary
|
|
42
|
-
* @param
|
|
41
|
+
* @summary Delete an API key
|
|
42
|
+
* @param apiKeyId The ID of the API key to delete
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
deleteApiKey(apiKeyId: string, options?: {
|
|
45
45
|
headers: {
|
|
46
46
|
[name: string]: string;
|
|
47
47
|
};
|
|
48
48
|
}): Promise<{
|
|
49
|
-
body:
|
|
49
|
+
body: any;
|
|
50
|
+
status: number;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Allows a user to generate a new API key with specific rights and restrictions.
|
|
54
|
+
* @summary Generate a new API key
|
|
55
|
+
* @param generateApiKeyRequest
|
|
56
|
+
*/
|
|
57
|
+
generateApiKey(generateApiKeyRequest: GenerateApiKeyRequest, options?: {
|
|
58
|
+
headers: {
|
|
59
|
+
[name: string]: string;
|
|
60
|
+
};
|
|
61
|
+
}): Promise<{
|
|
62
|
+
body: ApiKey;
|
|
50
63
|
status: number;
|
|
51
64
|
}>;
|
|
52
65
|
/**
|
|
53
66
|
*
|
|
54
|
-
* @summary List
|
|
67
|
+
* @summary List all API keys
|
|
55
68
|
*/
|
|
56
|
-
|
|
69
|
+
listApiKeys(options?: {
|
|
57
70
|
headers: {
|
|
58
71
|
[name: string]: string;
|
|
59
72
|
};
|
|
60
73
|
}): Promise<{
|
|
61
|
-
body: Array<
|
|
74
|
+
body: Array<ApiKey>;
|
|
62
75
|
status: number;
|
|
63
76
|
}>;
|
|
64
77
|
}
|