@northstake/northstakeapi 1.0.22 → 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.
Files changed (48) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/api/apis.ts +3 -1
  4. package/api/managedUsersValidatorsApi.ts +116 -0
  5. package/api/validatorMarketplaceFacilitatorApi.ts +360 -0
  6. package/api/validatorsApi.ts +109 -0
  7. package/api.ts +12 -0
  8. package/dist/api/apis.d.ts +3 -1
  9. package/dist/api/apis.js +3 -1
  10. package/dist/api/managedUsersValidatorsApi.d.ts +27 -0
  11. package/dist/api/managedUsersValidatorsApi.js +87 -0
  12. package/dist/api/validatorMarketplaceFacilitatorApi.d.ts +80 -0
  13. package/dist/api/validatorMarketplaceFacilitatorApi.js +280 -0
  14. package/dist/api/validatorsApi.d.ts +25 -0
  15. package/dist/api/validatorsApi.js +81 -0
  16. package/dist/api.d.ts +10 -0
  17. package/dist/api.js +11 -0
  18. package/dist/model/getMarketplaceMetadata200Response.d.ts +36 -0
  19. package/dist/model/getMarketplaceMetadata200Response.js +38 -0
  20. package/dist/model/getWithdrawalsResponse.d.ts +38 -0
  21. package/dist/model/getWithdrawalsResponse.js +43 -0
  22. package/dist/model/listAllRFQsForFacilitator200Response.d.ts +38 -0
  23. package/dist/model/listAllRFQsForFacilitator200Response.js +43 -0
  24. package/dist/model/models.d.ts +8 -0
  25. package/dist/model/models.js +24 -0
  26. package/dist/model/rFQBidFacilitator.d.ts +27 -0
  27. package/dist/model/rFQBidFacilitator.js +38 -0
  28. package/dist/model/rFQDocumentFacilitator.d.ts +38 -0
  29. package/dist/model/rFQDocumentFacilitator.js +53 -0
  30. package/dist/model/rFQDocumentFacilitatorStatusFilter.d.ts +12 -0
  31. package/dist/model/rFQDocumentFacilitatorStatusFilter.js +13 -0
  32. package/dist/model/rFQDocumentFacilitatorValidatorsInner.d.ts +27 -0
  33. package/dist/model/rFQDocumentFacilitatorValidatorsInner.js +38 -0
  34. package/dist/model/rFQDocumentSeller.d.ts +1 -0
  35. package/dist/model/rFQDocumentSeller.js +5 -0
  36. package/dist/model/validatorWithdrawal.d.ts +38 -0
  37. package/dist/model/validatorWithdrawal.js +63 -0
  38. package/model/getMarketplaceMetadata200Response.ts +52 -0
  39. package/model/getWithdrawalsResponse.ts +59 -0
  40. package/model/listAllRFQsForFacilitator200Response.ts +59 -0
  41. package/model/models.ts +41 -0
  42. package/model/rFQBidFacilitator.ts +43 -0
  43. package/model/rFQDocumentFacilitator.ts +74 -0
  44. package/model/rFQDocumentFacilitatorStatusFilter.ts +18 -0
  45. package/model/rFQDocumentFacilitatorValidatorsInner.ts +43 -0
  46. package/model/rFQDocumentSeller.ts +6 -0
  47. package/model/validatorWithdrawal.ts +80 -0
  48. package/package.json +3 -3
package/api.ts CHANGED
@@ -14,6 +14,7 @@ import { OrdersApi } from './api/ordersApi';
14
14
  import { PortfolioApi } from './api/portfolioApi';
15
15
  import { TransactionsApi } from './api/transactionsApi';
16
16
  import { ValidatorMarketplaceBuyersApi } from './api/validatorMarketplaceBuyersApi';
17
+ import { ValidatorMarketplaceFacilitatorApi } from './api/validatorMarketplaceFacilitatorApi';
17
18
  import { ValidatorMarketplaceSellersApi } from './api/validatorMarketplaceSellersApi';
18
19
  import { ValidatorMarketplaceWebhooksApi } from './api/validatorMarketplaceWebhooksApi';
19
20
  import { ValidatorsApi } from './api/validatorsApi';
@@ -41,7 +42,10 @@ export * from './model/./ethereumValidatorKeyKeystoreCryptoKdfParams';
41
42
  export * from './model/./exitEstimateBase';
42
43
  export * from './model/./exitEstimateSeller';
43
44
  export * from './model/./exitProposal';
45
+ export * from './model/./getMarketplaceMetadata200Response';
44
46
  export * from './model/./getTransactionsResponse';
47
+ export * from './model/./getWithdrawalsResponse';
48
+ export * from './model/./listAllRFQsForFacilitator200Response';
45
49
  export * from './model/./managedUser';
46
50
  export * from './model/./managedUserDetails';
47
51
  export * from './model/./order';
@@ -52,12 +56,16 @@ export * from './model/./orderUpdatePayload';
52
56
  export * from './model/./portfolioEntity';
53
57
  export * from './model/./provideEscrowHashForRFQDocumentRequest';
54
58
  export * from './model/./quote';
59
+ export * from './model/./rFQBidFacilitator';
55
60
  export * from './model/./rFQBids';
56
61
  export * from './model/./rFQDocumentBase';
57
62
  export * from './model/./rFQDocumentBaseUniqueEscrowVault';
58
63
  export * from './model/./rFQDocumentBuyer';
59
64
  export * from './model/./rFQDocumentBuyerAllOfValidators';
60
65
  export * from './model/./rFQDocumentBuyerStatusFilter';
66
+ export * from './model/./rFQDocumentFacilitator';
67
+ export * from './model/./rFQDocumentFacilitatorStatusFilter';
68
+ export * from './model/./rFQDocumentFacilitatorValidatorsInner';
61
69
  export * from './model/./rFQDocumentSeller';
62
70
  export * from './model/./rFQDocumentSellerAllOfValidators';
63
71
  export * from './model/./rFQDocumentSellerStatusFilter';
@@ -81,6 +89,7 @@ export * from './model/./unstakeStepType';
81
89
  export * from './model/./validatorInfo';
82
90
  export * from './model/./validatorKeyHolder';
83
91
  export * from './model/./validatorType';
92
+ export * from './model/./validatorWithdrawal';
84
93
  export * from './model/./wallet';
85
94
  export * from './model/./webHookLookupAnswer';
86
95
  export * from './model/./webhookPayload';
@@ -141,6 +150,8 @@ export class NorthstakeApi {
141
150
  this.transactions.setDefaultAuthentication(jwtAuth);
142
151
  this.validatorMarketplaceBuyers = new ValidatorMarketplaceBuyersApi(basePath);
143
152
  this.validatorMarketplaceBuyers.setDefaultAuthentication(jwtAuth);
153
+ this.validatorMarketplaceFacilitator = new ValidatorMarketplaceFacilitatorApi(basePath);
154
+ this.validatorMarketplaceFacilitator.setDefaultAuthentication(jwtAuth);
144
155
  this.validatorMarketplaceSellers = new ValidatorMarketplaceSellersApi(basePath);
145
156
  this.validatorMarketplaceSellers.setDefaultAuthentication(jwtAuth);
146
157
  this.validatorMarketplaceWebhooks = new ValidatorMarketplaceWebhooksApi(basePath);
@@ -162,6 +173,7 @@ export class NorthstakeApi {
162
173
  public portfolio: PortfolioApi;
163
174
  public transactions: TransactionsApi;
164
175
  public validatorMarketplaceBuyers: ValidatorMarketplaceBuyersApi;
176
+ public validatorMarketplaceFacilitator: ValidatorMarketplaceFacilitatorApi;
165
177
  public validatorMarketplaceSellers: ValidatorMarketplaceSellersApi;
166
178
  public validatorMarketplaceWebhooks: ValidatorMarketplaceWebhooksApi;
167
179
  public validators: ValidatorsApi;
@@ -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';
@@ -40,4 +42,4 @@ export declare class HttpError extends Error {
40
42
  constructor(response: http.IncomingMessage, body: any, statusCode?: number | undefined);
41
43
  }
42
44
  export { RequestFile } from '../model/models';
43
- export declare const APIS: (typeof DepositAddressesApi | typeof LinkedWalletsApi | typeof ManagedUsersApi | typeof ManagedUsersDepositAddressesApi | typeof ManagedUsersLinkedWalletsApi | typeof ManagedUsersOrdersApi | typeof ManagedUsersPortfolioApi | typeof ManagedUsersTransactionsApi | typeof ManagedUsersValidatorsApi | typeof OrdersApi | typeof PortfolioApi | typeof TransactionsApi | typeof ValidatorMarketplaceBuyersApi | typeof ValidatorMarketplaceSellersApi | typeof ValidatorMarketplaceWebhooksApi | typeof ValidatorsApi | typeof AccountApi)[];
45
+ export declare const APIS: (typeof DepositAddressesApi | typeof LinkedWalletsApi | typeof ManagedUsersApi | typeof ManagedUsersDepositAddressesApi | typeof ManagedUsersLinkedWalletsApi | typeof ManagedUsersOrdersApi | typeof ManagedUsersPortfolioApi | typeof ManagedUsersTransactionsApi | typeof ManagedUsersValidatorsApi | typeof OrdersApi | typeof PortfolioApi | typeof TransactionsApi | typeof ValidatorMarketplaceBuyersApi | typeof ValidatorMarketplaceFacilitatorApi | typeof ValidatorMarketplaceSellersApi | typeof ValidatorMarketplaceWebhooksApi | typeof ValidatorsApi | typeof AccountApi)[];
package/dist/api/apis.js CHANGED
@@ -43,6 +43,8 @@ __exportStar(require("./transactionsApi"), exports);
43
43
  const transactionsApi_1 = require("./transactionsApi");
44
44
  __exportStar(require("./validatorMarketplaceBuyersApi"), exports);
45
45
  const validatorMarketplaceBuyersApi_1 = require("./validatorMarketplaceBuyersApi");
46
+ __exportStar(require("./validatorMarketplaceFacilitatorApi"), exports);
47
+ const validatorMarketplaceFacilitatorApi_1 = require("./validatorMarketplaceFacilitatorApi");
46
48
  __exportStar(require("./validatorMarketplaceSellersApi"), exports);
47
49
  const validatorMarketplaceSellersApi_1 = require("./validatorMarketplaceSellersApi");
48
50
  __exportStar(require("./validatorMarketplaceWebhooksApi"), exports);
@@ -59,4 +61,4 @@ class HttpError extends Error {
59
61
  }
60
62
  }
61
63
  exports.HttpError = HttpError;
62
- exports.APIS = [accountApi_1.AccountApi, depositAddressesApi_1.DepositAddressesApi, linkedWalletsApi_1.LinkedWalletsApi, managedUsersApi_1.ManagedUsersApi, managedUsersDepositAddressesApi_1.ManagedUsersDepositAddressesApi, managedUsersLinkedWalletsApi_1.ManagedUsersLinkedWalletsApi, managedUsersOrdersApi_1.ManagedUsersOrdersApi, managedUsersPortfolioApi_1.ManagedUsersPortfolioApi, managedUsersTransactionsApi_1.ManagedUsersTransactionsApi, managedUsersValidatorsApi_1.ManagedUsersValidatorsApi, ordersApi_1.OrdersApi, portfolioApi_1.PortfolioApi, transactionsApi_1.TransactionsApi, validatorMarketplaceBuyersApi_1.ValidatorMarketplaceBuyersApi, validatorMarketplaceSellersApi_1.ValidatorMarketplaceSellersApi, validatorMarketplaceWebhooksApi_1.ValidatorMarketplaceWebhooksApi, validatorsApi_1.ValidatorsApi];
64
+ exports.APIS = [accountApi_1.AccountApi, depositAddressesApi_1.DepositAddressesApi, linkedWalletsApi_1.LinkedWalletsApi, managedUsersApi_1.ManagedUsersApi, managedUsersDepositAddressesApi_1.ManagedUsersDepositAddressesApi, managedUsersLinkedWalletsApi_1.ManagedUsersLinkedWalletsApi, managedUsersOrdersApi_1.ManagedUsersOrdersApi, managedUsersPortfolioApi_1.ManagedUsersPortfolioApi, managedUsersTransactionsApi_1.ManagedUsersTransactionsApi, managedUsersValidatorsApi_1.ManagedUsersValidatorsApi, ordersApi_1.OrdersApi, portfolioApi_1.PortfolioApi, transactionsApi_1.TransactionsApi, validatorMarketplaceBuyersApi_1.ValidatorMarketplaceBuyersApi, validatorMarketplaceFacilitatorApi_1.ValidatorMarketplaceFacilitatorApi, validatorMarketplaceSellersApi_1.ValidatorMarketplaceSellersApi, validatorMarketplaceWebhooksApi_1.ValidatorMarketplaceWebhooksApi, validatorsApi_1.ValidatorsApi];
@@ -9,12 +9,21 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { GetWithdrawalsResponse } from '../model/getWithdrawalsResponse';
12
13
  import { ValidatorInfo } from '../model/validatorInfo';
13
14
  import { Authentication, Interceptor } from '../model/models';
14
15
  import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
15
16
  export declare enum ManagedUsersValidatorsApiApiKeys {
16
17
  ApiKeyAuth = 0
17
18
  }
19
+ export interface ManagedUsersValidatorsApiParams {
20
+ userId: string;
21
+ startDate?: string;
22
+ endDate?: string;
23
+ page?: number;
24
+ limit?: number;
25
+ validatorIndices?: string;
26
+ }
18
27
  export declare class ManagedUsersValidatorsApi {
19
28
  protected _basePath: string;
20
29
  protected _defaultHeaders: any;
@@ -35,6 +44,24 @@ export declare class ManagedUsersValidatorsApi {
35
44
  setApiKey(key: ManagedUsersValidatorsApiApiKeys, value: string): void;
36
45
  set accessToken(accessToken: string | (() => string));
37
46
  addInterceptor(interceptor: Interceptor): void;
47
+ /**
48
+ * 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.
49
+ * @summary Get a list of validator withdrawals for a managed user
50
+ * @param userId
51
+ * @param startDate Start date for filtering withdrawal statistics
52
+ * @param endDate End date for filtering withdrawal statistics
53
+ * @param page Withdrawal list page number
54
+ * @param limit Number of withdrawals to return per page
55
+ * @param validatorIndices Comma-separated list of validator indices to filter withdrawals (e.g., \"123,456,789\")
56
+ */
57
+ getValidatorWithdrawalsForUser(params?: ManagedUsersValidatorsApiParams, options?: {
58
+ headers: {
59
+ [name: string]: string;
60
+ };
61
+ }): Promise<{
62
+ body: GetWithdrawalsResponse;
63
+ status: number;
64
+ }>;
38
65
  /**
39
66
  *
40
67
  * @summary Get all validators associated with the managed user
@@ -75,6 +75,93 @@ class ManagedUsersValidatorsApi {
75
75
  addInterceptor(interceptor) {
76
76
  this.interceptors.push(interceptor);
77
77
  }
78
+ /**
79
+ * 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.
80
+ * @summary Get a list of validator withdrawals for a managed user
81
+ * @param userId
82
+ * @param startDate Start date for filtering withdrawal statistics
83
+ * @param endDate End date for filtering withdrawal statistics
84
+ * @param page Withdrawal list page number
85
+ * @param limit Number of withdrawals to return per page
86
+ * @param validatorIndices Comma-separated list of validator indices to filter withdrawals (e.g., \&quot;123,456,789\&quot;)
87
+ */
88
+ async getValidatorWithdrawalsForUser(params, options = { headers: {} }) {
89
+ const localVarPath = this.basePath + '/managedUsers/{userId}/validators/withdrawals'
90
+ .replace('{' + 'userId' + '}', encodeURIComponent(String(params === null || params === void 0 ? void 0 : params.userId)));
91
+ let localVarQueryParameters = {};
92
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
93
+ const produces = ['application/json'];
94
+ if (produces.indexOf('application/json') >= 0) {
95
+ localVarHeaderParams.Accept = 'application/json';
96
+ }
97
+ else {
98
+ localVarHeaderParams.Accept = produces.join(',');
99
+ }
100
+ let localVarFormParams = {};
101
+ // Verify required parameter 'userId' is not null or undefined
102
+ if ((params === null || params === void 0 ? void 0 : params.userId) === null || (params === null || params === void 0 ? void 0 : params.userId) === undefined) {
103
+ throw new Error('Required parameter "userId" was null or undefined when calling getValidatorWithdrawalsForUser.');
104
+ }
105
+ if ((params === null || params === void 0 ? void 0 : params.startDate) !== undefined) {
106
+ localVarQueryParameters['start_date'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.startDate, "string");
107
+ }
108
+ if ((params === null || params === void 0 ? void 0 : params.endDate) !== undefined) {
109
+ localVarQueryParameters['end_date'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.endDate, "string");
110
+ }
111
+ if ((params === null || params === void 0 ? void 0 : params.page) !== undefined) {
112
+ localVarQueryParameters['page'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.page, "number");
113
+ }
114
+ if ((params === null || params === void 0 ? void 0 : params.limit) !== undefined) {
115
+ localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.limit, "number");
116
+ }
117
+ if ((params === null || params === void 0 ? void 0 : params.validatorIndices) !== undefined) {
118
+ localVarQueryParameters['validator_indices'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.validatorIndices, "string");
119
+ }
120
+ Object.assign(localVarHeaderParams, options.headers);
121
+ let localVarUseFormData = false;
122
+ let localVarRequestOptions = {
123
+ method: 'GET',
124
+ qs: localVarQueryParameters,
125
+ headers: localVarHeaderParams,
126
+ uri: localVarPath,
127
+ useQuerystring: this._useQuerystring,
128
+ json: true,
129
+ };
130
+ let authenticationPromise = Promise.resolve();
131
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
132
+ let interceptorPromise = authenticationPromise;
133
+ for (const interceptor of this.interceptors) {
134
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
135
+ }
136
+ return interceptorPromise.then(() => {
137
+ if (Object.keys(localVarFormParams).length) {
138
+ if (localVarUseFormData) {
139
+ localVarRequestOptions.formData = localVarFormParams;
140
+ }
141
+ else {
142
+ localVarRequestOptions.form = localVarFormParams;
143
+ }
144
+ }
145
+ return new Promise((resolve, reject) => {
146
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
147
+ if (error) {
148
+ console.error('API call error:', error);
149
+ reject(error);
150
+ }
151
+ else {
152
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
153
+ body = models_1.ObjectSerializer.deserialize(body, "GetWithdrawalsResponse");
154
+ resolve({ body: body, status: response.statusCode });
155
+ }
156
+ else {
157
+ console.error('API response error:', response.statusCode);
158
+ resolve({ body: body, status: response.statusCode });
159
+ }
160
+ }
161
+ });
162
+ });
163
+ });
164
+ }
78
165
  /**
79
166
  *
80
167
  * @summary Get all validators associated with the managed user
@@ -0,0 +1,80 @@
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 { GetMarketplaceMetadata200Response } from '../model/getMarketplaceMetadata200Response';
13
+ import { ListAllRFQsForFacilitator200Response } from '../model/listAllRFQsForFacilitator200Response';
14
+ import { RFQDocumentFacilitator } from '../model/rFQDocumentFacilitator';
15
+ import { Authentication, Interceptor } from '../model/models';
16
+ import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
17
+ export declare enum ValidatorMarketplaceFacilitatorApiApiKeys {
18
+ ApiKeyAuth = 0
19
+ }
20
+ export declare class ValidatorMarketplaceFacilitatorApi {
21
+ protected _basePath: string;
22
+ protected _defaultHeaders: any;
23
+ protected _useQuerystring: boolean;
24
+ protected authentications: {
25
+ default: Authentication;
26
+ bearerTokenAuth: HttpBearerAuth;
27
+ ApiKeyAuth: ApiKeyAuth;
28
+ };
29
+ protected interceptors: Interceptor[];
30
+ constructor(basePath?: string);
31
+ set useQuerystring(value: boolean);
32
+ set basePath(basePath: string);
33
+ set defaultHeaders(defaultHeaders: any);
34
+ get defaultHeaders(): any;
35
+ get basePath(): string;
36
+ setDefaultAuthentication(auth: Authentication): void;
37
+ setApiKey(key: ValidatorMarketplaceFacilitatorApiApiKeys, value: string): void;
38
+ set accessToken(accessToken: string | (() => string));
39
+ addInterceptor(interceptor: Interceptor): void;
40
+ /**
41
+ * Retrieves metadata information for the entire marketplace.
42
+ * @summary Get metadata for the entire marketplace
43
+ */
44
+ getMarketplaceMetadata(options?: {
45
+ headers: {
46
+ [name: string]: string;
47
+ };
48
+ }): Promise<{
49
+ body: GetMarketplaceMetadata200Response;
50
+ status: number;
51
+ }>;
52
+ /**
53
+ * Retrieves detailed information about an RFQ by its ID.
54
+ * @summary Get detailed information about a specific RFQ
55
+ * @param rfqId The unique identifier of the RFQ
56
+ */
57
+ getRFQDetailsForFacilitator(rfqId: string, options?: {
58
+ headers: {
59
+ [name: string]: string;
60
+ };
61
+ }): Promise<{
62
+ body: RFQDocumentFacilitator;
63
+ status: number;
64
+ }>;
65
+ /**
66
+ * Retrieves a list of all RFQs available in the Northstake marketplace.
67
+ * @summary List all RFQs in the marketplace
68
+ * @param status
69
+ * @param page
70
+ * @param limit
71
+ */
72
+ listAllRFQsForFacilitator(status?: 'active' | 'expired' | 'finished', page?: number, limit?: number, options?: {
73
+ headers: {
74
+ [name: string]: string;
75
+ };
76
+ }): Promise<{
77
+ body: ListAllRFQsForFacilitator200Response;
78
+ status: number;
79
+ }>;
80
+ }
@@ -0,0 +1,280 @@
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.ValidatorMarketplaceFacilitatorApi = exports.ValidatorMarketplaceFacilitatorApiApiKeys = 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 ValidatorMarketplaceFacilitatorApiApiKeys;
26
+ (function (ValidatorMarketplaceFacilitatorApiApiKeys) {
27
+ ValidatorMarketplaceFacilitatorApiApiKeys[ValidatorMarketplaceFacilitatorApiApiKeys["ApiKeyAuth"] = 0] = "ApiKeyAuth";
28
+ })(ValidatorMarketplaceFacilitatorApiApiKeys || (exports.ValidatorMarketplaceFacilitatorApiApiKeys = ValidatorMarketplaceFacilitatorApiApiKeys = {}));
29
+ class ValidatorMarketplaceFacilitatorApi {
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[ValidatorMarketplaceFacilitatorApiApiKeys[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
+ * Retrieves metadata information for the entire marketplace.
80
+ * @summary Get metadata for the entire marketplace
81
+ */
82
+ async getMarketplaceMetadata(options = { headers: {} }) {
83
+ const localVarPath = this.basePath + '/validatorMarketplace/facilitator/metadata';
84
+ let localVarQueryParameters = {};
85
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
86
+ const produces = ['application/json'];
87
+ if (produces.indexOf('application/json') >= 0) {
88
+ localVarHeaderParams.Accept = 'application/json';
89
+ }
90
+ else {
91
+ localVarHeaderParams.Accept = produces.join(',');
92
+ }
93
+ let localVarFormParams = {};
94
+ Object.assign(localVarHeaderParams, options.headers);
95
+ let localVarUseFormData = false;
96
+ let localVarRequestOptions = {
97
+ method: 'GET',
98
+ qs: localVarQueryParameters,
99
+ headers: localVarHeaderParams,
100
+ uri: localVarPath,
101
+ useQuerystring: this._useQuerystring,
102
+ json: true,
103
+ };
104
+ let authenticationPromise = Promise.resolve();
105
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
106
+ let interceptorPromise = authenticationPromise;
107
+ for (const interceptor of this.interceptors) {
108
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
109
+ }
110
+ return interceptorPromise.then(() => {
111
+ if (Object.keys(localVarFormParams).length) {
112
+ if (localVarUseFormData) {
113
+ localVarRequestOptions.formData = localVarFormParams;
114
+ }
115
+ else {
116
+ localVarRequestOptions.form = localVarFormParams;
117
+ }
118
+ }
119
+ return new Promise((resolve, reject) => {
120
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
121
+ if (error) {
122
+ console.error('API call error:', error);
123
+ reject(error);
124
+ }
125
+ else {
126
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
127
+ body = models_1.ObjectSerializer.deserialize(body, "GetMarketplaceMetadata200Response");
128
+ resolve({ body: body, status: response.statusCode });
129
+ }
130
+ else {
131
+ console.error('API response error:', response.statusCode);
132
+ resolve({ body: body, status: response.statusCode });
133
+ }
134
+ }
135
+ });
136
+ });
137
+ });
138
+ }
139
+ /**
140
+ * Retrieves detailed information about an RFQ by its ID.
141
+ * @summary Get detailed information about a specific RFQ
142
+ * @param rfqId The unique identifier of the RFQ
143
+ */
144
+ async getRFQDetailsForFacilitator(rfqId, options = { headers: {} }) {
145
+ const localVarPath = this.basePath + '/validatorMarketplace/facilitator/{rfqId}'
146
+ .replace('{' + 'rfqId' + '}', encodeURIComponent(String(rfqId)));
147
+ let localVarQueryParameters = {};
148
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
149
+ const produces = ['application/json'];
150
+ if (produces.indexOf('application/json') >= 0) {
151
+ localVarHeaderParams.Accept = 'application/json';
152
+ }
153
+ else {
154
+ localVarHeaderParams.Accept = produces.join(',');
155
+ }
156
+ let localVarFormParams = {};
157
+ // Verify required parameter 'rfqId' is not null or undefined
158
+ if (rfqId === null || rfqId === undefined) {
159
+ throw new Error('Required parameter "rfqId" was null or undefined when calling getRFQDetailsForFacilitator.');
160
+ }
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, "RFQDocumentFacilitator");
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
+ * Retrieves a list of all RFQs available in the Northstake marketplace.
208
+ * @summary List all RFQs in the marketplace
209
+ * @param status
210
+ * @param page
211
+ * @param limit
212
+ */
213
+ async listAllRFQsForFacilitator(status, page, limit, options = { headers: {} }) {
214
+ const localVarPath = this.basePath + '/validatorMarketplace/facilitator';
215
+ let localVarQueryParameters = {};
216
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
217
+ const produces = ['application/json'];
218
+ if (produces.indexOf('application/json') >= 0) {
219
+ localVarHeaderParams.Accept = 'application/json';
220
+ }
221
+ else {
222
+ localVarHeaderParams.Accept = produces.join(',');
223
+ }
224
+ let localVarFormParams = {};
225
+ if (status !== undefined) {
226
+ localVarQueryParameters['status'] = models_1.ObjectSerializer.serialize(status, "'active' | 'expired' | 'finished'");
227
+ }
228
+ if (page !== undefined) {
229
+ localVarQueryParameters['page'] = models_1.ObjectSerializer.serialize(page, "number");
230
+ }
231
+ if (limit !== undefined) {
232
+ localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
233
+ }
234
+ Object.assign(localVarHeaderParams, options.headers);
235
+ let localVarUseFormData = false;
236
+ let localVarRequestOptions = {
237
+ method: 'GET',
238
+ qs: localVarQueryParameters,
239
+ headers: localVarHeaderParams,
240
+ uri: localVarPath,
241
+ useQuerystring: this._useQuerystring,
242
+ json: true,
243
+ };
244
+ let authenticationPromise = Promise.resolve();
245
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
246
+ let interceptorPromise = authenticationPromise;
247
+ for (const interceptor of this.interceptors) {
248
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
249
+ }
250
+ return interceptorPromise.then(() => {
251
+ if (Object.keys(localVarFormParams).length) {
252
+ if (localVarUseFormData) {
253
+ localVarRequestOptions.formData = localVarFormParams;
254
+ }
255
+ else {
256
+ localVarRequestOptions.form = localVarFormParams;
257
+ }
258
+ }
259
+ return new Promise((resolve, reject) => {
260
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
261
+ if (error) {
262
+ console.error('API call error:', error);
263
+ reject(error);
264
+ }
265
+ else {
266
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
267
+ body = models_1.ObjectSerializer.deserialize(body, "ListAllRFQsForFacilitator200Response");
268
+ resolve({ body: body, status: response.statusCode });
269
+ }
270
+ else {
271
+ console.error('API response error:', response.statusCode);
272
+ resolve({ body: body, status: response.statusCode });
273
+ }
274
+ }
275
+ });
276
+ });
277
+ });
278
+ }
279
+ }
280
+ exports.ValidatorMarketplaceFacilitatorApi = ValidatorMarketplaceFacilitatorApi;
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { GetWithdrawalsResponse } from '../model/getWithdrawalsResponse';
12
13
  import { ValidatorInfo } from '../model/validatorInfo';
13
14
  import { ValidatorKeyHolder } from '../model/validatorKeyHolder';
14
15
  import { ValidatorType } from '../model/validatorType';
@@ -17,6 +18,13 @@ import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
17
18
  export declare enum ValidatorsApiApiKeys {
18
19
  ApiKeyAuth = 0
19
20
  }
21
+ export interface ValidatorsApiParams {
22
+ startDate?: string;
23
+ endDate?: string;
24
+ page?: number;
25
+ limit?: number;
26
+ validatorIndices?: string;
27
+ }
20
28
  export declare class ValidatorsApi {
21
29
  protected _basePath: string;
22
30
  protected _defaultHeaders: any;
@@ -37,6 +45,23 @@ export declare class ValidatorsApi {
37
45
  setApiKey(key: ValidatorsApiApiKeys, value: string): void;
38
46
  set accessToken(accessToken: string | (() => string));
39
47
  addInterceptor(interceptor: Interceptor): void;
48
+ /**
49
+ * 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.
50
+ * @summary Get a list of validator withdrawals
51
+ * @param startDate Start date for filtering withdrawal statistics
52
+ * @param endDate End date for filtering withdrawal statistics
53
+ * @param page Withdrawal list page number
54
+ * @param limit Number of withdrawals to return per page
55
+ * @param validatorIndices Comma-separated list of validator indices to filter withdrawals (e.g., \&quot;123,456,789\&quot;)
56
+ */
57
+ getValidatorWithdrawals(params?: ValidatorsApiParams, options?: {
58
+ headers: {
59
+ [name: string]: string;
60
+ };
61
+ }): Promise<{
62
+ body: GetWithdrawalsResponse;
63
+ status: number;
64
+ }>;
40
65
  /**
41
66
  *
42
67
  * @summary Get a list of validators, optionally filtering by key_holder and contract_type