@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.
Files changed (130) hide show
  1. package/.openapi-generator/FILES +6 -36
  2. package/.openapi-generator/VERSION +1 -1
  3. package/api/apis.ts +3 -23
  4. package/api/{managedUsersApi.ts → smartContractsApi.ts} +118 -53
  5. package/api.ts +9 -69
  6. package/dist/api/apis.d.ts +3 -23
  7. package/dist/api/apis.js +3 -23
  8. package/dist/api/smartContractsApi.d.ts +125 -0
  9. package/dist/api/{managedUsersApi.js → smartContractsApi.js} +90 -49
  10. package/dist/api.d.ts +7 -47
  11. package/dist/api.js +8 -58
  12. package/dist/model/{getTransactionsResponse.d.ts → getSmartContractInternalTransactions200Response.d.ts} +7 -7
  13. package/dist/model/{transactionsforUser.js → getSmartContractInternalTransactions200Response.js} +11 -11
  14. package/dist/model/{allManagedUsersResponse.d.ts → getSmartContractMinedBlocks200Response.d.ts} +4 -4
  15. package/dist/model/{allManagedUsersResponse.js → getSmartContractMinedBlocks200Response.js} +9 -9
  16. package/dist/model/{transactionsforUser.d.ts → getSmartContractTransactions200Response.d.ts} +5 -5
  17. package/dist/model/{getTransactionsResponse.js → getSmartContractTransactions200Response.js} +10 -10
  18. package/dist/model/{stakeStep.d.ts → internalTransaction.d.ts} +9 -7
  19. package/dist/model/internalTransaction.js +58 -0
  20. package/dist/model/{managedUser.d.ts → minedBlock.d.ts} +8 -6
  21. package/dist/model/minedBlock.js +43 -0
  22. package/dist/model/models.d.ts +5 -25
  23. package/dist/model/models.js +15 -67
  24. package/dist/model/transaction.d.ts +40 -17
  25. package/dist/model/transaction.js +74 -17
  26. package/dist/model/webhookPayloadData.d.ts +2 -10
  27. package/dist/model/webhookPayloadData.js +2 -12
  28. package/model/{transactionsforUser.ts → getSmartContractInternalTransactions200Response.ts} +13 -13
  29. package/model/{allManagedUsersResponse.ts → getSmartContractMinedBlocks200Response.ts} +8 -8
  30. package/model/{getTransactionsResponse.ts → getSmartContractTransactions200Response.ts} +10 -10
  31. package/model/internalTransaction.ts +70 -0
  32. package/model/{depositAddress.ts → minedBlock.ts} +19 -13
  33. package/model/models.ts +17 -114
  34. package/model/transaction.ts +114 -31
  35. package/model/webhookPayloadData.ts +4 -23
  36. package/package.json +1 -1
  37. package/api/depositAddressesApi.ts +0 -267
  38. package/api/managedUsersDepositAddressesApi.ts +0 -186
  39. package/api/managedUsersLinkedWalletsApi.ts +0 -369
  40. package/api/managedUsersOrdersApi.ts +0 -462
  41. package/api/managedUsersPortfolioApi.ts +0 -186
  42. package/api/managedUsersTransactionsApi.ts +0 -222
  43. package/api/managedUsersValidatorsApi.ts +0 -302
  44. package/api/ordersApi.ts +0 -432
  45. package/api/portfolioApi.ts +0 -180
  46. package/api/transactionsApi.ts +0 -215
  47. package/dist/api/depositAddressesApi.d.ts +0 -64
  48. package/dist/api/depositAddressesApi.js +0 -207
  49. package/dist/api/managedUsersApi.d.ts +0 -94
  50. package/dist/api/managedUsersDepositAddressesApi.d.ts +0 -51
  51. package/dist/api/managedUsersDepositAddressesApi.js +0 -146
  52. package/dist/api/managedUsersLinkedWalletsApi.d.ts +0 -80
  53. package/dist/api/managedUsersLinkedWalletsApi.js +0 -290
  54. package/dist/api/managedUsersOrdersApi.d.ts +0 -94
  55. package/dist/api/managedUsersOrdersApi.js +0 -364
  56. package/dist/api/managedUsersPortfolioApi.d.ts +0 -51
  57. package/dist/api/managedUsersPortfolioApi.js +0 -146
  58. package/dist/api/managedUsersTransactionsApi.d.ts +0 -68
  59. package/dist/api/managedUsersTransactionsApi.js +0 -170
  60. package/dist/api/managedUsersValidatorsApi.d.ts +0 -78
  61. package/dist/api/managedUsersValidatorsApi.js +0 -233
  62. package/dist/api/ordersApi.d.ts +0 -90
  63. package/dist/api/ordersApi.js +0 -333
  64. package/dist/api/portfolioApi.d.ts +0 -50
  65. package/dist/api/portfolioApi.js +0 -140
  66. package/dist/api/transactionsApi.d.ts +0 -66
  67. package/dist/api/transactionsApi.js +0 -164
  68. package/dist/model/addLinkedWalletForUserRequest.d.ts +0 -29
  69. package/dist/model/addLinkedWalletForUserRequest.js +0 -33
  70. package/dist/model/createManagedUserRequest.d.ts +0 -25
  71. package/dist/model/createManagedUserRequest.js +0 -28
  72. package/dist/model/depositAddress.d.ts +0 -35
  73. package/dist/model/depositAddress.js +0 -36
  74. package/dist/model/depositAddressesForUserResponse.d.ts +0 -27
  75. package/dist/model/depositAddressesForUserResponse.js +0 -33
  76. package/dist/model/managedUser.js +0 -36
  77. package/dist/model/managedUserDetails.d.ts +0 -31
  78. package/dist/model/managedUserDetails.js +0 -41
  79. package/dist/model/order.d.ts +0 -42
  80. package/dist/model/order.js +0 -48
  81. package/dist/model/orderDocument.d.ts +0 -50
  82. package/dist/model/orderDocument.js +0 -71
  83. package/dist/model/orderDocumentSteps.d.ts +0 -30
  84. package/dist/model/orderDocumentSteps.js +0 -33
  85. package/dist/model/orderType.d.ts +0 -15
  86. package/dist/model/orderType.js +0 -13
  87. package/dist/model/orderUpdatePayload.d.ts +0 -36
  88. package/dist/model/orderUpdatePayload.js +0 -38
  89. package/dist/model/portfolioEntity.d.ts +0 -33
  90. package/dist/model/portfolioEntity.js +0 -41
  91. package/dist/model/stakeStep.js +0 -33
  92. package/dist/model/stakeStepElement.d.ts +0 -30
  93. package/dist/model/stakeStepElement.js +0 -33
  94. package/dist/model/stepStatus.d.ts +0 -15
  95. package/dist/model/stepStatus.js +0 -13
  96. package/dist/model/transactionEventType.d.ts +0 -15
  97. package/dist/model/transactionEventType.js +0 -13
  98. package/dist/model/unstakeStep.d.ts +0 -32
  99. package/dist/model/unstakeStep.js +0 -33
  100. package/dist/model/unstakeStepElement.d.ts +0 -30
  101. package/dist/model/unstakeStepElement.js +0 -33
  102. package/dist/model/unstakeStepType.d.ts +0 -15
  103. package/dist/model/unstakeStepType.js +0 -13
  104. package/dist/model/withdrawalStep.d.ts +0 -32
  105. package/dist/model/withdrawalStep.js +0 -33
  106. package/dist/model/withdrawalStepElement.d.ts +0 -30
  107. package/dist/model/withdrawalStepElement.js +0 -33
  108. package/dist/model/withdrawalStepType.d.ts +0 -15
  109. package/dist/model/withdrawalStepType.js +0 -13
  110. package/model/addLinkedWalletForUserRequest.ts +0 -40
  111. package/model/createManagedUserRequest.ts +0 -31
  112. package/model/depositAddressesForUserResponse.ts +0 -38
  113. package/model/managedUser.ts +0 -40
  114. package/model/managedUserDetails.ts +0 -47
  115. package/model/order.ts +0 -68
  116. package/model/orderDocument.ts +0 -106
  117. package/model/orderDocumentSteps.ts +0 -44
  118. package/model/orderType.ts +0 -21
  119. package/model/orderUpdatePayload.ts +0 -52
  120. package/model/portfolioEntity.ts +0 -49
  121. package/model/stakeStep.ts +0 -43
  122. package/model/stakeStepElement.ts +0 -41
  123. package/model/stepStatus.ts +0 -21
  124. package/model/transactionEventType.ts +0 -23
  125. package/model/unstakeStep.ts +0 -43
  126. package/model/unstakeStepElement.ts +0 -41
  127. package/model/unstakeStepType.ts +0 -32
  128. package/model/withdrawalStep.ts +0 -43
  129. package/model/withdrawalStepElement.ts +0 -41
  130. package/model/withdrawalStepType.ts +0 -24
@@ -1,215 +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 { Asset } from '../model/asset';
19
- import { ErrorResponse } from '../model/errorResponse';
20
- import { GetTransactionsResponse } from '../model/getTransactionsResponse';
21
- import { TransactionEventType } from '../model/transactionEventType';
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 TransactionsApiApiKeys {
35
- ApiKeyAuth,
36
- }
37
-
38
-
39
- // If vendorExtensions.x-packageParams is true, use a single object to pass parameters
40
- export interface TransactionsApiParams {
41
- startDate?: string;
42
- endDate?: string;
43
- type?: TransactionEventType;
44
- asset?: Asset;
45
- page?: number;
46
- limit?: number;
47
- }
48
-
49
- export class TransactionsApi {
50
- protected _basePath = defaultBasePath;
51
- protected _defaultHeaders : any = {};
52
- protected _useQuerystring : boolean = false;
53
-
54
- protected authentications = {
55
- 'default': <Authentication>new JWTAuth('your_api_key', 'your_private_key'),
56
- 'bearerTokenAuth': new HttpBearerAuth(),
57
- 'ApiKeyAuth': new ApiKeyAuth('header', 'x-api-key'),
58
- }
59
-
60
- protected interceptors: Interceptor[] = [];
61
-
62
- constructor(basePath?: string);
63
- constructor(basePathOrUsername: string, password?: string, basePath?: string) {
64
- if (password) {
65
- if (basePath) {
66
- this.basePath = basePath;
67
- }
68
- } else {
69
- if (basePathOrUsername) {
70
- this.basePath = basePathOrUsername
71
- }
72
- }
73
- }
74
-
75
- set useQuerystring(value: boolean) {
76
- this._useQuerystring = value;
77
- }
78
-
79
- set basePath(basePath: string) {
80
- this._basePath = basePath;
81
- }
82
-
83
- set defaultHeaders(defaultHeaders: any) {
84
- this._defaultHeaders = defaultHeaders;
85
- }
86
-
87
- get defaultHeaders() {
88
- return this._defaultHeaders;
89
- }
90
-
91
- get basePath() {
92
- return this._basePath;
93
- }
94
-
95
- public setDefaultAuthentication(auth: Authentication) {
96
- this.authentications.default = auth;
97
- }
98
-
99
- public setApiKey(key: TransactionsApiApiKeys, value: string) {
100
- (this.authentications as any)[TransactionsApiApiKeys[key]].apiKey = value;
101
- }
102
-
103
- set accessToken(accessToken: string | (() => string)) {
104
- this.authentications.bearerTokenAuth.accessToken = accessToken;
105
- }
106
-
107
- public addInterceptor(interceptor: Interceptor) {
108
- this.interceptors.push(interceptor);
109
- }
110
-
111
- /**
112
- *
113
- * @summary Get transactions
114
- * @param startDate Start date for filtering transaction statistics
115
- * @param endDate End date for filtering transaction statistics
116
- * @param type Type of transaction (e.g., deposit, withdrawal)
117
- * @param asset Asset type (e.g., ETH, SOL)
118
- * @param page Transaction list page number
119
- * @param limit Number of transactions to return per page
120
- */
121
-
122
-
123
-
124
-
125
-
126
- public async getTransactions(params?: TransactionsApiParams, options: { headers: { [name: string]: string } } = { headers: {} }): Promise<{ body: GetTransactionsResponse, status: number }> {
127
-
128
- const localVarPath = this.basePath + '/transactions';
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
-
142
-
143
-
144
- if (params?.startDate !== undefined) {
145
- localVarQueryParameters['startDate'] = ObjectSerializer.serialize(params?.startDate, "string");
146
- }
147
- if (params?.endDate !== undefined) {
148
- localVarQueryParameters['endDate'] = ObjectSerializer.serialize(params?.endDate, "string");
149
- }
150
- if (params?.type !== undefined) {
151
- localVarQueryParameters['type'] = ObjectSerializer.serialize(params?.type, "TransactionEventType");
152
- }
153
- if (params?.asset !== undefined) {
154
- localVarQueryParameters['asset'] = ObjectSerializer.serialize(params?.asset, "Asset");
155
- }
156
- if (params?.page !== undefined) {
157
- localVarQueryParameters['page'] = ObjectSerializer.serialize(params?.page, "number");
158
- }
159
- if (params?.limit !== undefined) {
160
- localVarQueryParameters['limit'] = ObjectSerializer.serialize(params?.limit, "number");
161
- }
162
-
163
-
164
-
165
-
166
- (<any>Object).assign(localVarHeaderParams, options.headers);
167
-
168
- let localVarUseFormData = false;
169
-
170
-
171
-
172
- let localVarRequestOptions: localVarRequest.Options = {
173
- method: 'GET',
174
- qs: localVarQueryParameters,
175
- headers: localVarHeaderParams,
176
- uri: localVarPath,
177
- useQuerystring: this._useQuerystring,
178
- json: true,
179
- };
180
-
181
- let authenticationPromise = Promise.resolve();
182
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
183
-
184
- let interceptorPromise = authenticationPromise;
185
- for (const interceptor of this.interceptors) {
186
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
187
- }
188
-
189
- return interceptorPromise.then(() => {
190
- if (Object.keys(localVarFormParams).length) {
191
- if (localVarUseFormData) {
192
- (<any>localVarRequestOptions).formData = localVarFormParams;
193
- } else {
194
- localVarRequestOptions.form = localVarFormParams;
195
- }
196
- }
197
- return new Promise<{ body: GetTransactionsResponse, status: number }>((resolve, reject) => {
198
- localVarRequest(localVarRequestOptions, (error, response, body) => {
199
- if (error) {
200
- console.error('API call error:', error);
201
- reject(error);
202
- } else {
203
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
204
- body = ObjectSerializer.deserialize(body, "GetTransactionsResponse");
205
- resolve({ body: body, status: response.statusCode });
206
- } else {
207
- console.error('API response error:', response.statusCode);
208
- resolve({ body: body, status: response.statusCode });
209
- }
210
- }
211
- });
212
- });
213
- } )
214
- }
215
- }
@@ -1,64 +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
- import { Asset } from '../model/asset';
13
- import { DepositAddress } from '../model/depositAddress';
14
- import { Authentication, Interceptor } from '../model/models';
15
- import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
16
- export declare enum DepositAddressesApiApiKeys {
17
- ApiKeyAuth = 0
18
- }
19
- export declare class DepositAddressesApi {
20
- protected _basePath: string;
21
- protected _defaultHeaders: any;
22
- protected _useQuerystring: boolean;
23
- protected authentications: {
24
- default: Authentication;
25
- bearerTokenAuth: HttpBearerAuth;
26
- ApiKeyAuth: ApiKeyAuth;
27
- };
28
- protected interceptors: Interceptor[];
29
- constructor(basePath?: string);
30
- set useQuerystring(value: boolean);
31
- set basePath(basePath: string);
32
- set defaultHeaders(defaultHeaders: any);
33
- get defaultHeaders(): any;
34
- get basePath(): string;
35
- setDefaultAuthentication(auth: Authentication): void;
36
- setApiKey(key: DepositAddressesApiApiKeys, value: string): void;
37
- set accessToken(accessToken: string | (() => string));
38
- addInterceptor(interceptor: Interceptor): void;
39
- /**
40
- *
41
- * @summary Get deposit address by asset
42
- * @param asset Asset to fetch the deposit address for
43
- */
44
- getDepositAddressByAsset(asset: Asset, options?: {
45
- headers: {
46
- [name: string]: string;
47
- };
48
- }): Promise<{
49
- body: DepositAddress;
50
- status: number;
51
- }>;
52
- /**
53
- *
54
- * @summary List deposit addresses assigned to the account
55
- */
56
- listDepositAddresses(options?: {
57
- headers: {
58
- [name: string]: string;
59
- };
60
- }): Promise<{
61
- body: Array<DepositAddress>;
62
- status: number;
63
- }>;
64
- }
@@ -1,207 +0,0 @@
1
- "use strict";
2
- /**
3
- * Northstake
4
- * Northstake api
5
- *
6
- * The version of the OpenAPI document: 1.0
7
- *
8
- *
9
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
- * https://openapi-generator.tech
11
- * Do not edit the class manually.
12
- */
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.DepositAddressesApi = exports.DepositAddressesApiApiKeys = void 0;
18
- const request_1 = __importDefault(require("request"));
19
- const models_1 = require("../model/models");
20
- const models_2 = require("../model/models");
21
- let defaultBasePath = 'https://api.northstake.dk/v1';
22
- // ===============================================
23
- // This file is autogenerated - Please do not edit
24
- // ===============================================
25
- var DepositAddressesApiApiKeys;
26
- (function (DepositAddressesApiApiKeys) {
27
- DepositAddressesApiApiKeys[DepositAddressesApiApiKeys["ApiKeyAuth"] = 0] = "ApiKeyAuth";
28
- })(DepositAddressesApiApiKeys || (exports.DepositAddressesApiApiKeys = DepositAddressesApiApiKeys = {}));
29
- class DepositAddressesApi {
30
- constructor(basePathOrUsername, password, basePath) {
31
- this._basePath = defaultBasePath;
32
- this._defaultHeaders = {};
33
- this._useQuerystring = false;
34
- this.authentications = {
35
- 'default': new models_2.JWTAuth('your_api_key', 'your_private_key'),
36
- 'bearerTokenAuth': new models_2.HttpBearerAuth(),
37
- 'ApiKeyAuth': new models_2.ApiKeyAuth('header', 'x-api-key'),
38
- };
39
- this.interceptors = [];
40
- if (password) {
41
- if (basePath) {
42
- this.basePath = basePath;
43
- }
44
- }
45
- else {
46
- if (basePathOrUsername) {
47
- this.basePath = basePathOrUsername;
48
- }
49
- }
50
- }
51
- set useQuerystring(value) {
52
- this._useQuerystring = value;
53
- }
54
- set basePath(basePath) {
55
- this._basePath = basePath;
56
- }
57
- set defaultHeaders(defaultHeaders) {
58
- this._defaultHeaders = defaultHeaders;
59
- }
60
- get defaultHeaders() {
61
- return this._defaultHeaders;
62
- }
63
- get basePath() {
64
- return this._basePath;
65
- }
66
- setDefaultAuthentication(auth) {
67
- this.authentications.default = auth;
68
- }
69
- setApiKey(key, value) {
70
- this.authentications[DepositAddressesApiApiKeys[key]].apiKey = value;
71
- }
72
- set accessToken(accessToken) {
73
- this.authentications.bearerTokenAuth.accessToken = accessToken;
74
- }
75
- addInterceptor(interceptor) {
76
- this.interceptors.push(interceptor);
77
- }
78
- /**
79
- *
80
- * @summary Get deposit address by asset
81
- * @param asset Asset to fetch the deposit address for
82
- */
83
- async getDepositAddressByAsset(asset, options = { headers: {} }) {
84
- const localVarPath = this.basePath + '/depositAddresses/{asset}'
85
- .replace('{' + 'asset' + '}', encodeURIComponent(String(asset)));
86
- let localVarQueryParameters = {};
87
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
88
- const produces = ['application/json'];
89
- if (produces.indexOf('application/json') >= 0) {
90
- localVarHeaderParams.Accept = 'application/json';
91
- }
92
- else {
93
- localVarHeaderParams.Accept = produces.join(',');
94
- }
95
- let localVarFormParams = {};
96
- // Verify required parameter 'asset' is not null or undefined
97
- if (asset === null || asset === undefined) {
98
- throw new Error('Required parameter "asset" was null or undefined when calling getDepositAddressByAsset.');
99
- }
100
- Object.assign(localVarHeaderParams, options.headers);
101
- let localVarUseFormData = false;
102
- let localVarRequestOptions = {
103
- method: 'GET',
104
- qs: localVarQueryParameters,
105
- headers: localVarHeaderParams,
106
- uri: localVarPath,
107
- useQuerystring: this._useQuerystring,
108
- json: true,
109
- };
110
- let authenticationPromise = Promise.resolve();
111
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
112
- let interceptorPromise = authenticationPromise;
113
- for (const interceptor of this.interceptors) {
114
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
115
- }
116
- return interceptorPromise.then(() => {
117
- if (Object.keys(localVarFormParams).length) {
118
- if (localVarUseFormData) {
119
- localVarRequestOptions.formData = localVarFormParams;
120
- }
121
- else {
122
- localVarRequestOptions.form = localVarFormParams;
123
- }
124
- }
125
- return new Promise((resolve, reject) => {
126
- (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
127
- if (error) {
128
- console.error('API call error:', error);
129
- reject(error);
130
- }
131
- else {
132
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
133
- body = models_1.ObjectSerializer.deserialize(body, "DepositAddress");
134
- resolve({ body: body, status: response.statusCode });
135
- }
136
- else {
137
- console.error('API response error:', response.statusCode);
138
- resolve({ body: body, status: response.statusCode });
139
- }
140
- }
141
- });
142
- });
143
- });
144
- }
145
- /**
146
- *
147
- * @summary List deposit addresses assigned to the account
148
- */
149
- async listDepositAddresses(options = { headers: {} }) {
150
- const localVarPath = this.basePath + '/depositAddresses';
151
- let localVarQueryParameters = {};
152
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
153
- const produces = ['application/json'];
154
- if (produces.indexOf('application/json') >= 0) {
155
- localVarHeaderParams.Accept = 'application/json';
156
- }
157
- else {
158
- localVarHeaderParams.Accept = produces.join(',');
159
- }
160
- let localVarFormParams = {};
161
- Object.assign(localVarHeaderParams, options.headers);
162
- let localVarUseFormData = false;
163
- let localVarRequestOptions = {
164
- method: 'GET',
165
- qs: localVarQueryParameters,
166
- headers: localVarHeaderParams,
167
- uri: localVarPath,
168
- useQuerystring: this._useQuerystring,
169
- json: true,
170
- };
171
- let authenticationPromise = Promise.resolve();
172
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
173
- let interceptorPromise = authenticationPromise;
174
- for (const interceptor of this.interceptors) {
175
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
176
- }
177
- return interceptorPromise.then(() => {
178
- if (Object.keys(localVarFormParams).length) {
179
- if (localVarUseFormData) {
180
- localVarRequestOptions.formData = localVarFormParams;
181
- }
182
- else {
183
- localVarRequestOptions.form = localVarFormParams;
184
- }
185
- }
186
- return new Promise((resolve, reject) => {
187
- (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
188
- if (error) {
189
- console.error('API call error:', error);
190
- reject(error);
191
- }
192
- else {
193
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
194
- body = models_1.ObjectSerializer.deserialize(body, "Array<DepositAddress>");
195
- resolve({ body: body, status: response.statusCode });
196
- }
197
- else {
198
- console.error('API response error:', response.statusCode);
199
- resolve({ body: body, status: response.statusCode });
200
- }
201
- }
202
- });
203
- });
204
- });
205
- }
206
- }
207
- exports.DepositAddressesApi = DepositAddressesApi;
@@ -1,94 +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
- import { AllManagedUsersResponse } from '../model/allManagedUsersResponse';
13
- import { CreateManagedUserRequest } from '../model/createManagedUserRequest';
14
- import { ManagedUser } from '../model/managedUser';
15
- import { ManagedUserDetails } from '../model/managedUserDetails';
16
- import { Authentication, Interceptor } from '../model/models';
17
- import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
18
- export declare enum ManagedUsersApiApiKeys {
19
- ApiKeyAuth = 0
20
- }
21
- export declare class ManagedUsersApi {
22
- protected _basePath: string;
23
- protected _defaultHeaders: any;
24
- protected _useQuerystring: boolean;
25
- protected authentications: {
26
- default: Authentication;
27
- bearerTokenAuth: HttpBearerAuth;
28
- ApiKeyAuth: ApiKeyAuth;
29
- };
30
- protected interceptors: Interceptor[];
31
- constructor(basePath?: string);
32
- set useQuerystring(value: boolean);
33
- set basePath(basePath: string);
34
- set defaultHeaders(defaultHeaders: any);
35
- get defaultHeaders(): any;
36
- get basePath(): string;
37
- setDefaultAuthentication(auth: Authentication): void;
38
- setApiKey(key: ManagedUsersApiApiKeys, value: string): void;
39
- set accessToken(accessToken: string | (() => string));
40
- addInterceptor(interceptor: Interceptor): void;
41
- /**
42
- * Create a new Northstake user managed by the account
43
- * @summary Create a managed user
44
- * @param createManagedUserRequest
45
- */
46
- createUser(createManagedUserRequest: CreateManagedUserRequest, options?: {
47
- headers: {
48
- [name: string]: string;
49
- };
50
- }): Promise<{
51
- body: ManagedUser;
52
- status: number;
53
- }>;
54
- /**
55
- *
56
- * @summary Delete a managed user
57
- * @param userId
58
- */
59
- deleteUser(userId: string, options?: {
60
- headers: {
61
- [name: string]: string;
62
- };
63
- }): Promise<{
64
- body: any;
65
- status: number;
66
- }>;
67
- /**
68
- *
69
- * @summary Get information for a specific user managed by the account
70
- * @param userId
71
- */
72
- getUser(userId: string, options?: {
73
- headers: {
74
- [name: string]: string;
75
- };
76
- }): Promise<{
77
- body: ManagedUserDetails;
78
- status: number;
79
- }>;
80
- /**
81
- *
82
- * @summary Get all users managed by the account
83
- * @param page Page number of the managed users list
84
- * @param limit Number of managed users to return per page
85
- */
86
- getUsers(page?: number, limit?: number, options?: {
87
- headers: {
88
- [name: string]: string;
89
- };
90
- }): Promise<{
91
- body: AllManagedUsersResponse;
92
- status: number;
93
- }>;
94
- }
@@ -1,51 +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
- import { DepositAddressesForUserResponse } from '../model/depositAddressesForUserResponse';
13
- import { Authentication, Interceptor } from '../model/models';
14
- import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
15
- export declare enum ManagedUsersDepositAddressesApiApiKeys {
16
- ApiKeyAuth = 0
17
- }
18
- export declare class ManagedUsersDepositAddressesApi {
19
- protected _basePath: string;
20
- protected _defaultHeaders: any;
21
- protected _useQuerystring: boolean;
22
- protected authentications: {
23
- default: Authentication;
24
- bearerTokenAuth: HttpBearerAuth;
25
- ApiKeyAuth: ApiKeyAuth;
26
- };
27
- protected interceptors: Interceptor[];
28
- constructor(basePath?: string);
29
- set useQuerystring(value: boolean);
30
- set basePath(basePath: string);
31
- set defaultHeaders(defaultHeaders: any);
32
- get defaultHeaders(): any;
33
- get basePath(): string;
34
- setDefaultAuthentication(auth: Authentication): void;
35
- setApiKey(key: ManagedUsersDepositAddressesApiApiKeys, value: string): void;
36
- set accessToken(accessToken: string | (() => string));
37
- addInterceptor(interceptor: Interceptor): void;
38
- /**
39
- *
40
- * @summary Get deposit addresses for a managed user
41
- * @param userId The unique identifier of the managed user
42
- */
43
- getDepositAddressesForUser(userId: string, options?: {
44
- headers: {
45
- [name: string]: string;
46
- };
47
- }): Promise<{
48
- body: DepositAddressesForUserResponse;
49
- status: number;
50
- }>;
51
- }