@bluefin-exchange/pro-sdk 1.11.1 → 2.0.0-beta.0
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/README.md +3 -2
- package/dist/esm/example.js +44 -43
- package/dist/esm/example.js.map +1 -1
- package/dist/esm/index.js +1 -17
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/api.js +1159 -568
- package/dist/esm/src/api.js.map +1 -1
- package/dist/esm/src/base.js +7 -15
- package/dist/esm/src/base.js.map +1 -1
- package/dist/esm/src/common.js +12 -24
- package/dist/esm/src/common.js.map +1 -1
- package/dist/esm/src/configuration.js +1 -5
- package/dist/esm/src/configuration.js.map +1 -1
- package/dist/esm/src/index.js +6 -22
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/request-signer.js +14 -19
- package/dist/esm/src/request-signer.js.map +1 -1
- package/dist/esm/src/sdk.js +42 -46
- package/dist/esm/src/sdk.js.map +1 -1
- package/dist/esm/src/utils.js +1 -4
- package/dist/esm/src/utils.js.map +1 -1
- package/dist/esm/src/websocket.js +5 -9
- package/dist/esm/src/websocket.js.map +1 -1
- package/dist/types/src/api.d.ts +645 -12
- package/dist/types/src/api.d.ts.map +1 -1
- package/dist/types/src/request-signer.d.ts +1 -1
- package/dist/types/src/sdk.d.ts +3 -2
- package/dist/types/src/sdk.d.ts.map +1 -1
- package/package.json +18 -13
- package/dist/cjs/example.js +0 -275
- package/dist/cjs/example.js.map +0 -1
- package/dist/cjs/index.js +0 -18
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/src/api.js +0 -5103
- package/dist/cjs/src/api.js.map +0 -1
- package/dist/cjs/src/base.js +0 -69
- package/dist/cjs/src/base.js.map +0 -1
- package/dist/cjs/src/common.js +0 -162
- package/dist/cjs/src/common.js.map +0 -1
- package/dist/cjs/src/configuration.js +0 -45
- package/dist/cjs/src/configuration.js.map +0 -1
- package/dist/cjs/src/index.js +0 -23
- package/dist/cjs/src/index.js.map +0 -1
- package/dist/cjs/src/request-signer.js +0 -234
- package/dist/cjs/src/request-signer.js.map +0 -1
- package/dist/cjs/src/sdk.js +0 -863
- package/dist/cjs/src/sdk.js.map +0 -1
- package/dist/cjs/src/utils.js +0 -10
- package/dist/cjs/src/utils.js.map +0 -1
- package/dist/cjs/src/websocket.js +0 -159
- package/dist/cjs/src/websocket.js.map +0 -1
package/dist/esm/src/api.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/* tslint:disable */
|
|
3
2
|
/* eslint-disable */
|
|
4
3
|
/**
|
|
@@ -21,24 +20,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
20
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
21
|
});
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.AccountDataApi = exports.AccountDataApiFactory = exports.AccountDataApiFp = exports.AccountDataApiAxiosParamCreator = exports.UserCampaignRewardsClaimStatusEnum = exports.UserCampaignRewardsStatusEnum = exports.TransactionType = exports.TradeType = exports.TradeSide = exports.SubscriptionType = exports.StatsInterval = exports.SortOrder = exports.SelfTradePreventionType = exports.PositionSide = exports.OrderbookPartialDepthUpdateDepthLevelEnum = exports.OrderType = exports.OrderTimeInForce = exports.OrderStatus = exports.OrderSide = exports.OrderCancellationFailureReason = exports.OrderCancelReason = exports.OraclePriceUpdateSourceEnum = exports.MarketStatus = exports.MarketPriceUpdateSourceEnum = exports.MarketEventType = exports.MarketDataStreamName = exports.MarkPriceUpdateSourceEnum = exports.MarkAsClaimedResponseStatusEnum = exports.MarkAsClaimedRequestCampaignNameEnum = exports.MarginType = exports.LeaderboardInterval = exports.KlineInterval = exports.IntervalRewardsStatusEnum = exports.IntervalMetadataStatusEnum = exports.GetAccountValueHistoryParamsInterval = exports.FailedCommandType = exports.EpochMetadataStatusEnum = exports.ContractsConfigNetworkEnum = exports.CommandFailureReasonCode = exports.ClaimSignatureItemRewardTypeEnum = exports.CandlePriceType = exports.CampaignMetadataStatusEnum = exports.AffiliateOnboardResponseStatusEnum = exports.AffiliateMetadataTierEnum = exports.AffiliateMetadataStatusEnum = exports.AffiliateIntervalOverviewStatusEnum = exports.AdjustMarginOperation = exports.AccountEventType = exports.AccountEventReason = exports.AccountDataStream = void 0;
|
|
29
|
-
exports.TradeApi = exports.TradeApiFactory = exports.TradeApiFp = exports.TradeApiAxiosParamCreator = exports.WebSocketMarketDataSecWebSocketVersionEnum = exports.WebSocketMarketDataUpgradeEnum = exports.WebSocketAccountDataSecWebSocketVersionEnum = exports.WebSocketAccountDataUpgradeEnum = exports.StreamsApi = exports.StreamsApiFactory = exports.StreamsApiFp = exports.StreamsApiAxiosParamCreator = exports.GetRewardsEpochMetadataEpochEnum = exports.GetRewardsCampaignMetadataStatusEnum = exports.GetAffiliateOverviewSortOrderEnum = exports.GetAffiliateOverviewSortByEnum = exports.GetAffiliateLeaderDashboardSortOrderEnum = exports.GetAffiliateLeaderDashboardSortByEnum = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.GetLeaderboardSortByEnum = exports.ExchangeApi = exports.ExchangeApiFactory = exports.ExchangeApiFp = exports.ExchangeApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = void 0;
|
|
30
|
-
const axios_1 = __importDefault(require("axios"));
|
|
23
|
+
import globalAxios from 'axios';
|
|
31
24
|
// Some imports not used depending on template conditions
|
|
32
25
|
// @ts-ignore
|
|
33
|
-
|
|
26
|
+
import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
34
27
|
// @ts-ignore
|
|
35
|
-
|
|
28
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from './base';
|
|
36
29
|
/**
|
|
37
30
|
* Represents the type of account data stream.
|
|
38
31
|
* @export
|
|
39
32
|
* @enum {string}
|
|
40
33
|
*/
|
|
41
|
-
|
|
34
|
+
export const AccountDataStream = {
|
|
42
35
|
AccountOrderUpdate: 'AccountOrderUpdate',
|
|
43
36
|
AccountTradeUpdate: 'AccountTradeUpdate',
|
|
44
37
|
AccountAggregatedTradeUpdate: 'AccountAggregatedTradeUpdate',
|
|
@@ -52,7 +45,7 @@ exports.AccountDataStream = {
|
|
|
52
45
|
* @export
|
|
53
46
|
* @enum {string}
|
|
54
47
|
*/
|
|
55
|
-
|
|
48
|
+
export const AccountEventReason = {
|
|
56
49
|
Deposit: 'Deposit',
|
|
57
50
|
Withdraw: 'Withdraw',
|
|
58
51
|
OrderCreated: 'OrderCreated',
|
|
@@ -70,7 +63,7 @@ exports.AccountEventReason = {
|
|
|
70
63
|
* @export
|
|
71
64
|
* @enum {string}
|
|
72
65
|
*/
|
|
73
|
-
|
|
66
|
+
export const AccountEventType = {
|
|
74
67
|
AccountUpdate: 'AccountUpdate',
|
|
75
68
|
AccountTradeUpdate: 'AccountTradeUpdate',
|
|
76
69
|
AccountAggregatedTradeUpdate: 'AccountAggregatedTradeUpdate',
|
|
@@ -84,33 +77,46 @@ exports.AccountEventType = {
|
|
|
84
77
|
* @export
|
|
85
78
|
* @enum {string}
|
|
86
79
|
*/
|
|
87
|
-
|
|
80
|
+
export const AdjustMarginOperation = {
|
|
88
81
|
Add: 'ADD',
|
|
89
82
|
Subtract: 'SUBTRACT'
|
|
90
83
|
};
|
|
91
|
-
|
|
84
|
+
export const AffiliateIntervalOverviewStatusEnum = {
|
|
92
85
|
Active: 'ACTIVE',
|
|
93
86
|
NotStarted: 'NOT_STARTED',
|
|
94
87
|
Finalized: 'FINALIZED',
|
|
95
88
|
Cooldown: 'COOLDOWN'
|
|
96
89
|
};
|
|
97
|
-
|
|
90
|
+
export const AffiliateMetadataStatusEnum = {
|
|
98
91
|
Pending: 'PENDING',
|
|
99
92
|
Approved: 'APPROVED',
|
|
100
93
|
Rejected: 'REJECTED'
|
|
101
94
|
};
|
|
102
|
-
|
|
95
|
+
export const AffiliateMetadataTierEnum = {
|
|
103
96
|
S: 'S',
|
|
104
97
|
A: 'A',
|
|
105
98
|
N: 'N',
|
|
106
99
|
U: 'U'
|
|
107
100
|
};
|
|
108
|
-
|
|
101
|
+
export const AffiliateOnboardResponseStatusEnum = {
|
|
109
102
|
Approved: 'APPROVED',
|
|
110
103
|
Rejected: 'REJECTED',
|
|
111
104
|
Pending: 'PENDING'
|
|
112
105
|
};
|
|
113
|
-
|
|
106
|
+
export const BalanceResponseCurrentTierEnum = {
|
|
107
|
+
None: 'NONE',
|
|
108
|
+
Silver: 'SILVER',
|
|
109
|
+
Gold: 'GOLD',
|
|
110
|
+
Platinum: 'PLATINUM',
|
|
111
|
+
Diamond: 'DIAMOND'
|
|
112
|
+
};
|
|
113
|
+
export const BalanceResponseNextTierEnum = {
|
|
114
|
+
Silver: 'SILVER',
|
|
115
|
+
Gold: 'GOLD',
|
|
116
|
+
Platinum: 'PLATINUM',
|
|
117
|
+
Diamond: 'DIAMOND'
|
|
118
|
+
};
|
|
119
|
+
export const CampaignMetadataStatusEnum = {
|
|
114
120
|
Active: 'ACTIVE',
|
|
115
121
|
Inactive: 'INACTIVE'
|
|
116
122
|
};
|
|
@@ -119,24 +125,37 @@ exports.CampaignMetadataStatusEnum = {
|
|
|
119
125
|
* @export
|
|
120
126
|
* @enum {string}
|
|
121
127
|
*/
|
|
122
|
-
|
|
128
|
+
export const CandlePriceType = {
|
|
123
129
|
Last: 'Last',
|
|
124
130
|
Market: 'Market',
|
|
125
131
|
Oracle: 'Oracle',
|
|
132
|
+
Mark: 'Mark',
|
|
126
133
|
Unspecified: 'UNSPECIFIED'
|
|
127
134
|
};
|
|
128
|
-
|
|
135
|
+
export const ClaimSignatureItemRewardTypeEnum = {
|
|
129
136
|
Blue: 'Blue',
|
|
130
137
|
Sui: 'Sui',
|
|
131
138
|
Wal: 'Wal',
|
|
132
139
|
Cash: 'Cash'
|
|
133
140
|
};
|
|
141
|
+
export const ClientCredentialsRequestGrantTypeEnum = {
|
|
142
|
+
ClientCredentials: 'client_credentials'
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* The client application that initiated the request.
|
|
146
|
+
* @export
|
|
147
|
+
* @enum {string}
|
|
148
|
+
*/
|
|
149
|
+
export const ClientType = {
|
|
150
|
+
Web: 'WEB',
|
|
151
|
+
Vera: 'VERA'
|
|
152
|
+
};
|
|
134
153
|
/**
|
|
135
154
|
*
|
|
136
155
|
* @export
|
|
137
156
|
* @enum {string}
|
|
138
157
|
*/
|
|
139
|
-
|
|
158
|
+
export const CommandFailureReasonCode = {
|
|
140
159
|
Unspecified: 'UNSPECIFIED',
|
|
141
160
|
UnknownAddress: 'UNKNOWN_ADDRESS',
|
|
142
161
|
UnknownSymbol: 'UNKNOWN_SYMBOL',
|
|
@@ -148,12 +167,12 @@ exports.CommandFailureReasonCode = {
|
|
|
148
167
|
WithdrawZero: 'WITHDRAW_ZERO',
|
|
149
168
|
Unexpected: 'UNEXPECTED'
|
|
150
169
|
};
|
|
151
|
-
|
|
170
|
+
export const ContractsConfigNetworkEnum = {
|
|
152
171
|
Mainnet: 'mainnet',
|
|
153
172
|
Testnet: 'testnet',
|
|
154
173
|
Devnet: 'devnet'
|
|
155
174
|
};
|
|
156
|
-
|
|
175
|
+
export const EpochMetadataStatusEnum = {
|
|
157
176
|
Active: 'ACTIVE',
|
|
158
177
|
NotStarted: 'NOT_STARTED',
|
|
159
178
|
Finalized: 'FINALIZED',
|
|
@@ -164,7 +183,7 @@ exports.EpochMetadataStatusEnum = {
|
|
|
164
183
|
* @export
|
|
165
184
|
* @enum {string}
|
|
166
185
|
*/
|
|
167
|
-
|
|
186
|
+
export const FailedCommandType = {
|
|
168
187
|
PositionIsolatedMarginUpdate: 'POSITION_ISOLATED_MARGIN_UPDATE',
|
|
169
188
|
PositionLeverageUpdate: 'POSITION_LEVERAGE_UPDATE',
|
|
170
189
|
Withdraw: 'WITHDRAW'
|
|
@@ -174,20 +193,20 @@ exports.FailedCommandType = {
|
|
|
174
193
|
* @export
|
|
175
194
|
* @enum {string}
|
|
176
195
|
*/
|
|
177
|
-
|
|
196
|
+
export const GetAccountValueHistoryParamsInterval = {
|
|
178
197
|
_24h: '24h',
|
|
179
198
|
_7d: '7d',
|
|
180
199
|
_30d: '30d',
|
|
181
200
|
_90d: '90d',
|
|
182
201
|
All: 'all'
|
|
183
202
|
};
|
|
184
|
-
|
|
203
|
+
export const IntervalMetadataStatusEnum = {
|
|
185
204
|
Active: 'ACTIVE',
|
|
186
205
|
NotStarted: 'NOT_STARTED',
|
|
187
206
|
Finalized: 'FINALIZED',
|
|
188
207
|
Cooldown: 'COOLDOWN'
|
|
189
208
|
};
|
|
190
|
-
|
|
209
|
+
export const IntervalRewardsStatusEnum = {
|
|
191
210
|
Active: 'ACTIVE',
|
|
192
211
|
NotStarted: 'NOT_STARTED',
|
|
193
212
|
Finalized: 'FINALIZED',
|
|
@@ -198,7 +217,7 @@ exports.IntervalRewardsStatusEnum = {
|
|
|
198
217
|
* @export
|
|
199
218
|
* @enum {string}
|
|
200
219
|
*/
|
|
201
|
-
|
|
220
|
+
export const KlineInterval = {
|
|
202
221
|
_1m: '1m',
|
|
203
222
|
_3m: '3m',
|
|
204
223
|
_5m: '5m',
|
|
@@ -215,12 +234,19 @@ exports.KlineInterval = {
|
|
|
215
234
|
_1Mo: '1Mo',
|
|
216
235
|
Unspecified: 'UNSPECIFIED'
|
|
217
236
|
};
|
|
237
|
+
export const LeaderboardEntry1CurrentTierEnum = {
|
|
238
|
+
None: 'NONE',
|
|
239
|
+
Silver: 'SILVER',
|
|
240
|
+
Gold: 'GOLD',
|
|
241
|
+
Platinum: 'PLATINUM',
|
|
242
|
+
Diamond: 'DIAMOND'
|
|
243
|
+
};
|
|
218
244
|
/**
|
|
219
245
|
*
|
|
220
246
|
* @export
|
|
221
247
|
* @enum {string}
|
|
222
248
|
*/
|
|
223
|
-
|
|
249
|
+
export const LeaderboardInterval = {
|
|
224
250
|
LeaderboardIntervalN1d: '1d',
|
|
225
251
|
LeaderboardIntervalN7d: '7d',
|
|
226
252
|
LeaderboardIntervalN30d: '30d',
|
|
@@ -232,21 +258,21 @@ exports.LeaderboardInterval = {
|
|
|
232
258
|
* @export
|
|
233
259
|
* @enum {string}
|
|
234
260
|
*/
|
|
235
|
-
|
|
261
|
+
export const MarginType = {
|
|
236
262
|
Cross: 'CROSS',
|
|
237
263
|
Isolated: 'ISOLATED',
|
|
238
264
|
Unspecified: 'UNSPECIFIED'
|
|
239
265
|
};
|
|
240
|
-
|
|
266
|
+
export const MarkAsClaimedRequestCampaignNameEnum = {
|
|
241
267
|
TradeAndEarn: 'TRADE_AND_EARN',
|
|
242
268
|
WalTradeAndEarn: 'WAL_TRADE_AND_EARN',
|
|
243
269
|
Affiliate: 'AFFILIATE'
|
|
244
270
|
};
|
|
245
|
-
|
|
271
|
+
export const MarkAsClaimedResponseStatusEnum = {
|
|
246
272
|
Claimed: 'CLAIMED',
|
|
247
273
|
Claimable: 'CLAIMABLE'
|
|
248
274
|
};
|
|
249
|
-
|
|
275
|
+
export const MarkPriceUpdateSourceEnum = {
|
|
250
276
|
Mark: 'Mark'
|
|
251
277
|
};
|
|
252
278
|
/**
|
|
@@ -254,7 +280,7 @@ exports.MarkPriceUpdateSourceEnum = {
|
|
|
254
280
|
* @export
|
|
255
281
|
* @enum {string}
|
|
256
282
|
*/
|
|
257
|
-
|
|
283
|
+
export const MarketDataStreamName = {
|
|
258
284
|
RecentTrade: 'Recent_Trade',
|
|
259
285
|
Ticker: 'Ticker',
|
|
260
286
|
TickerAll: 'Ticker_All',
|
|
@@ -329,7 +355,7 @@ exports.MarketDataStreamName = {
|
|
|
329
355
|
* @export
|
|
330
356
|
* @enum {string}
|
|
331
357
|
*/
|
|
332
|
-
|
|
358
|
+
export const MarketEventType = {
|
|
333
359
|
RecentTradesUpdates: 'RecentTradesUpdates',
|
|
334
360
|
TickerUpdate: 'TickerUpdate',
|
|
335
361
|
TickerAllUpdate: 'TickerAllUpdate',
|
|
@@ -340,7 +366,7 @@ exports.MarketEventType = {
|
|
|
340
366
|
OrderbookDiffDepthUpdate: 'OrderbookDiffDepthUpdate',
|
|
341
367
|
OrderbookPartialDepthUpdate: 'OrderbookPartialDepthUpdate'
|
|
342
368
|
};
|
|
343
|
-
|
|
369
|
+
export const MarketPriceUpdateSourceEnum = {
|
|
344
370
|
Market: 'Market'
|
|
345
371
|
};
|
|
346
372
|
/**
|
|
@@ -348,14 +374,14 @@ exports.MarketPriceUpdateSourceEnum = {
|
|
|
348
374
|
* @export
|
|
349
375
|
* @enum {string}
|
|
350
376
|
*/
|
|
351
|
-
|
|
377
|
+
export const MarketStatus = {
|
|
352
378
|
Active: 'ACTIVE',
|
|
353
379
|
Beta: 'BETA',
|
|
354
380
|
Maintenance: 'MAINTENANCE',
|
|
355
381
|
Delisted: 'DELISTED',
|
|
356
382
|
Unspecified: 'UNSPECIFIED'
|
|
357
383
|
};
|
|
358
|
-
|
|
384
|
+
export const OraclePriceUpdateSourceEnum = {
|
|
359
385
|
Oracle: 'Oracle'
|
|
360
386
|
};
|
|
361
387
|
/**
|
|
@@ -363,7 +389,7 @@ exports.OraclePriceUpdateSourceEnum = {
|
|
|
363
389
|
* @export
|
|
364
390
|
* @enum {string}
|
|
365
391
|
*/
|
|
366
|
-
|
|
392
|
+
export const OrderCancelReason = {
|
|
367
393
|
Unspecified: 'UNSPECIFIED',
|
|
368
394
|
InsufficientMargin: 'INSUFFICIENT_MARGIN',
|
|
369
395
|
DuplicateOrder: 'DUPLICATE_ORDER',
|
|
@@ -405,7 +431,7 @@ exports.OrderCancelReason = {
|
|
|
405
431
|
* @export
|
|
406
432
|
* @enum {string}
|
|
407
433
|
*/
|
|
408
|
-
|
|
434
|
+
export const OrderCancellationFailureReason = {
|
|
409
435
|
OrderNotFound: 'ORDER_NOT_FOUND',
|
|
410
436
|
MarketNotFound: 'MARKET_NOT_FOUND',
|
|
411
437
|
AccountNotFound: 'ACCOUNT_NOT_FOUND',
|
|
@@ -418,7 +444,7 @@ exports.OrderCancellationFailureReason = {
|
|
|
418
444
|
* @export
|
|
419
445
|
* @enum {string}
|
|
420
446
|
*/
|
|
421
|
-
|
|
447
|
+
export const OrderSide = {
|
|
422
448
|
Long: 'LONG',
|
|
423
449
|
Short: 'SHORT',
|
|
424
450
|
Unspecified: 'UNSPECIFIED'
|
|
@@ -428,7 +454,7 @@ exports.OrderSide = {
|
|
|
428
454
|
* @export
|
|
429
455
|
* @enum {string}
|
|
430
456
|
*/
|
|
431
|
-
|
|
457
|
+
export const OrderStatus = {
|
|
432
458
|
Standby: 'STANDBY',
|
|
433
459
|
Open: 'OPEN',
|
|
434
460
|
PartiallyFilledOpen: 'PARTIALLY_FILLED_OPEN',
|
|
@@ -444,7 +470,7 @@ exports.OrderStatus = {
|
|
|
444
470
|
* @export
|
|
445
471
|
* @enum {string}
|
|
446
472
|
*/
|
|
447
|
-
|
|
473
|
+
export const OrderTimeInForce = {
|
|
448
474
|
Gtt: 'GTT',
|
|
449
475
|
Ioc: 'IOC',
|
|
450
476
|
Fok: 'FOK',
|
|
@@ -455,7 +481,7 @@ exports.OrderTimeInForce = {
|
|
|
455
481
|
* @export
|
|
456
482
|
* @enum {string}
|
|
457
483
|
*/
|
|
458
|
-
|
|
484
|
+
export const OrderType = {
|
|
459
485
|
Limit: 'LIMIT',
|
|
460
486
|
Market: 'MARKET',
|
|
461
487
|
StopLimit: 'STOP_LIMIT',
|
|
@@ -470,7 +496,7 @@ exports.OrderType = {
|
|
|
470
496
|
Adl: 'ADL',
|
|
471
497
|
Unspecified: 'UNSPECIFIED'
|
|
472
498
|
};
|
|
473
|
-
|
|
499
|
+
export const OrderbookPartialDepthUpdateDepthLevelEnum = {
|
|
474
500
|
_5: '5',
|
|
475
501
|
_10: '10',
|
|
476
502
|
_20: '20'
|
|
@@ -480,7 +506,7 @@ exports.OrderbookPartialDepthUpdateDepthLevelEnum = {
|
|
|
480
506
|
* @export
|
|
481
507
|
* @enum {string}
|
|
482
508
|
*/
|
|
483
|
-
|
|
509
|
+
export const PositionSide = {
|
|
484
510
|
Long: 'LONG',
|
|
485
511
|
Short: 'SHORT',
|
|
486
512
|
Unspecified: 'UNSPECIFIED'
|
|
@@ -490,7 +516,7 @@ exports.PositionSide = {
|
|
|
490
516
|
* @export
|
|
491
517
|
* @enum {string}
|
|
492
518
|
*/
|
|
493
|
-
|
|
519
|
+
export const SelfTradePreventionType = {
|
|
494
520
|
Taker: 'TAKER',
|
|
495
521
|
Maker: 'MAKER',
|
|
496
522
|
Both: 'BOTH',
|
|
@@ -501,7 +527,7 @@ exports.SelfTradePreventionType = {
|
|
|
501
527
|
* @export
|
|
502
528
|
* @enum {string}
|
|
503
529
|
*/
|
|
504
|
-
|
|
530
|
+
export const SortOrder = {
|
|
505
531
|
Asc: 'ASC',
|
|
506
532
|
Desc: 'DESC',
|
|
507
533
|
Unspecified: 'UNSPECIFIED'
|
|
@@ -511,7 +537,7 @@ exports.SortOrder = {
|
|
|
511
537
|
* @export
|
|
512
538
|
* @enum {string}
|
|
513
539
|
*/
|
|
514
|
-
|
|
540
|
+
export const StatsInterval = {
|
|
515
541
|
_1d: '1d',
|
|
516
542
|
_1w: '1w',
|
|
517
543
|
_1Mo: '1Mo',
|
|
@@ -522,16 +548,19 @@ exports.StatsInterval = {
|
|
|
522
548
|
* @export
|
|
523
549
|
* @enum {string}
|
|
524
550
|
*/
|
|
525
|
-
|
|
551
|
+
export const SubscriptionType = {
|
|
526
552
|
Subscribe: 'Subscribe',
|
|
527
553
|
Unsubscribe: 'Unsubscribe'
|
|
528
554
|
};
|
|
555
|
+
export const SwapClaimResponseStatusEnum = {
|
|
556
|
+
Claimed: 'claimed'
|
|
557
|
+
};
|
|
529
558
|
/**
|
|
530
559
|
* Trade side based on the user order in this trade.
|
|
531
560
|
* @export
|
|
532
561
|
* @enum {string}
|
|
533
562
|
*/
|
|
534
|
-
|
|
563
|
+
export const TradeSide = {
|
|
535
564
|
Long: 'LONG',
|
|
536
565
|
Short: 'SHORT',
|
|
537
566
|
Unspecified: 'UNSPECIFIED'
|
|
@@ -541,7 +570,7 @@ exports.TradeSide = {
|
|
|
541
570
|
* @export
|
|
542
571
|
* @enum {string}
|
|
543
572
|
*/
|
|
544
|
-
|
|
573
|
+
export const TradeType = {
|
|
545
574
|
Order: 'ORDER',
|
|
546
575
|
Liquidation: 'LIQUIDATION',
|
|
547
576
|
Deleverage: 'DELEVERAGE',
|
|
@@ -552,7 +581,7 @@ exports.TradeType = {
|
|
|
552
581
|
* @export
|
|
553
582
|
* @enum {string}
|
|
554
583
|
*/
|
|
555
|
-
|
|
584
|
+
export const TransactionType = {
|
|
556
585
|
Transfer: 'TRANSFER',
|
|
557
586
|
Deposit: 'DEPOSIT',
|
|
558
587
|
Withdraw: 'WITHDRAW',
|
|
@@ -563,23 +592,26 @@ exports.TransactionType = {
|
|
|
563
592
|
Bonus: 'BONUS',
|
|
564
593
|
Unspecified: 'UNSPECIFIED'
|
|
565
594
|
};
|
|
566
|
-
|
|
595
|
+
export const UserCampaignRewardsStatusEnum = {
|
|
567
596
|
Active: 'ACTIVE',
|
|
568
597
|
NotStarted: 'NOT_STARTED',
|
|
569
598
|
Finalized: 'FINALIZED',
|
|
570
599
|
Cooldown: 'COOLDOWN'
|
|
571
600
|
};
|
|
572
|
-
|
|
601
|
+
export const UserCampaignRewardsClaimStatusEnum = {
|
|
573
602
|
Claimable: 'CLAIMABLE',
|
|
574
603
|
Claimed: 'CLAIMED',
|
|
575
604
|
NotYetClaimable: 'NOT_YET_CLAIMABLE',
|
|
576
605
|
ClaimEnded: 'CLAIM_ENDED'
|
|
577
606
|
};
|
|
607
|
+
export const VaultClaimResponseStatusEnum = {
|
|
608
|
+
Claimed: 'claimed'
|
|
609
|
+
};
|
|
578
610
|
/**
|
|
579
611
|
* AccountDataApi - axios parameter creator
|
|
580
612
|
* @export
|
|
581
613
|
*/
|
|
582
|
-
const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
614
|
+
export const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
583
615
|
return {
|
|
584
616
|
/**
|
|
585
617
|
* Retrieves the user\'s account details.
|
|
@@ -591,7 +623,7 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
591
623
|
getAccountDetails: (accountAddress_1, ...args_1) => __awaiter(this, [accountAddress_1, ...args_1], void 0, function* (accountAddress, options = {}) {
|
|
592
624
|
const localVarPath = `/api/v1/account`;
|
|
593
625
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
594
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
626
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
595
627
|
let baseOptions;
|
|
596
628
|
if (configuration) {
|
|
597
629
|
baseOptions = configuration.baseOptions;
|
|
@@ -602,11 +634,11 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
602
634
|
if (accountAddress !== undefined) {
|
|
603
635
|
localVarQueryParameter['accountAddress'] = accountAddress;
|
|
604
636
|
}
|
|
605
|
-
|
|
637
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
606
638
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
607
639
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
608
640
|
return {
|
|
609
|
-
url:
|
|
641
|
+
url: toPathString(localVarUrlObj),
|
|
610
642
|
options: localVarRequestOptions,
|
|
611
643
|
};
|
|
612
644
|
}),
|
|
@@ -624,7 +656,7 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
624
656
|
getAccountFundingRateHistory: (accountAddress_1, limit_1, page_1, startTimeAtMillis_1, endTimeAtMillis_1, ...args_1) => __awaiter(this, [accountAddress_1, limit_1, page_1, startTimeAtMillis_1, endTimeAtMillis_1, ...args_1], void 0, function* (accountAddress, limit, page, startTimeAtMillis, endTimeAtMillis, options = {}) {
|
|
625
657
|
const localVarPath = `/api/v1/account/fundingRateHistory`;
|
|
626
658
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
627
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
659
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
628
660
|
let baseOptions;
|
|
629
661
|
if (configuration) {
|
|
630
662
|
baseOptions = configuration.baseOptions;
|
|
@@ -634,7 +666,7 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
634
666
|
const localVarQueryParameter = {};
|
|
635
667
|
// authentication bearerAuth required
|
|
636
668
|
// http bearer authentication required
|
|
637
|
-
yield
|
|
669
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
638
670
|
if (accountAddress !== undefined) {
|
|
639
671
|
localVarQueryParameter['accountAddress'] = accountAddress;
|
|
640
672
|
}
|
|
@@ -650,11 +682,11 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
650
682
|
if (endTimeAtMillis !== undefined) {
|
|
651
683
|
localVarQueryParameter['endTimeAtMillis'] = endTimeAtMillis;
|
|
652
684
|
}
|
|
653
|
-
|
|
685
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
654
686
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
655
687
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
656
688
|
return {
|
|
657
|
-
url:
|
|
689
|
+
url: toPathString(localVarUrlObj),
|
|
658
690
|
options: localVarRequestOptions,
|
|
659
691
|
};
|
|
660
692
|
}),
|
|
@@ -667,7 +699,7 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
667
699
|
getAccountPreferences: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
668
700
|
const localVarPath = `/api/v1/account/preferences`;
|
|
669
701
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
670
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
702
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
671
703
|
let baseOptions;
|
|
672
704
|
if (configuration) {
|
|
673
705
|
baseOptions = configuration.baseOptions;
|
|
@@ -677,12 +709,12 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
677
709
|
const localVarQueryParameter = {};
|
|
678
710
|
// authentication bearerAuth required
|
|
679
711
|
// http bearer authentication required
|
|
680
|
-
yield
|
|
681
|
-
|
|
712
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
713
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
682
714
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
683
715
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
684
716
|
return {
|
|
685
|
-
url:
|
|
717
|
+
url: toPathString(localVarUrlObj),
|
|
686
718
|
options: localVarRequestOptions,
|
|
687
719
|
};
|
|
688
720
|
}),
|
|
@@ -701,7 +733,7 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
701
733
|
getAccountTrades: (symbol_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, tradeType_1, page_1, ...args_1) => __awaiter(this, [symbol_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, tradeType_1, page_1, ...args_1], void 0, function* (symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options = {}) {
|
|
702
734
|
const localVarPath = `/api/v1/account/trades`;
|
|
703
735
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
704
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
736
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
705
737
|
let baseOptions;
|
|
706
738
|
if (configuration) {
|
|
707
739
|
baseOptions = configuration.baseOptions;
|
|
@@ -711,7 +743,7 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
711
743
|
const localVarQueryParameter = {};
|
|
712
744
|
// authentication bearerAuth required
|
|
713
745
|
// http bearer authentication required
|
|
714
|
-
yield
|
|
746
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
715
747
|
if (symbol !== undefined) {
|
|
716
748
|
localVarQueryParameter['symbol'] = symbol;
|
|
717
749
|
}
|
|
@@ -730,11 +762,11 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
730
762
|
if (page !== undefined) {
|
|
731
763
|
localVarQueryParameter['page'] = page;
|
|
732
764
|
}
|
|
733
|
-
|
|
765
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
734
766
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
735
767
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
736
768
|
return {
|
|
737
|
-
url:
|
|
769
|
+
url: toPathString(localVarUrlObj),
|
|
738
770
|
options: localVarRequestOptions,
|
|
739
771
|
};
|
|
740
772
|
}),
|
|
@@ -753,7 +785,7 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
753
785
|
getAccountTransactionHistory: (types_1, assetSymbol_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1) => __awaiter(this, [types_1, assetSymbol_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1], void 0, function* (types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options = {}) {
|
|
754
786
|
const localVarPath = `/api/v1/account/transactions`;
|
|
755
787
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
756
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
788
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
757
789
|
let baseOptions;
|
|
758
790
|
if (configuration) {
|
|
759
791
|
baseOptions = configuration.baseOptions;
|
|
@@ -763,7 +795,7 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
763
795
|
const localVarQueryParameter = {};
|
|
764
796
|
// authentication bearerAuth required
|
|
765
797
|
// http bearer authentication required
|
|
766
|
-
yield
|
|
798
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
767
799
|
if (types) {
|
|
768
800
|
localVarQueryParameter['types'] = types;
|
|
769
801
|
}
|
|
@@ -782,11 +814,11 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
782
814
|
if (page !== undefined) {
|
|
783
815
|
localVarQueryParameter['page'] = page;
|
|
784
816
|
}
|
|
785
|
-
|
|
817
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
786
818
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
787
819
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
788
820
|
return {
|
|
789
|
-
url:
|
|
821
|
+
url: toPathString(localVarUrlObj),
|
|
790
822
|
options: localVarRequestOptions,
|
|
791
823
|
};
|
|
792
824
|
}),
|
|
@@ -799,10 +831,10 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
799
831
|
*/
|
|
800
832
|
getAccountValueHistory: (interval_1, ...args_1) => __awaiter(this, [interval_1, ...args_1], void 0, function* (interval, options = {}) {
|
|
801
833
|
// verify required parameter 'interval' is not null or undefined
|
|
802
|
-
|
|
834
|
+
assertParamExists('getAccountValueHistory', 'interval', interval);
|
|
803
835
|
const localVarPath = `/api/v1/account/valueHistory`;
|
|
804
836
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
805
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
837
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
806
838
|
let baseOptions;
|
|
807
839
|
if (configuration) {
|
|
808
840
|
baseOptions = configuration.baseOptions;
|
|
@@ -812,15 +844,44 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
812
844
|
const localVarQueryParameter = {};
|
|
813
845
|
// authentication bearerAuth required
|
|
814
846
|
// http bearer authentication required
|
|
815
|
-
yield
|
|
847
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
816
848
|
if (interval !== undefined) {
|
|
817
849
|
localVarQueryParameter['interval'] = interval;
|
|
818
850
|
}
|
|
819
|
-
|
|
851
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
820
852
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
821
853
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
822
854
|
return {
|
|
823
|
-
url:
|
|
855
|
+
url: toPathString(localVarUrlObj),
|
|
856
|
+
options: localVarRequestOptions,
|
|
857
|
+
};
|
|
858
|
+
}),
|
|
859
|
+
/**
|
|
860
|
+
* Retrieves the account value history for 24h.
|
|
861
|
+
* @summary /accounts/{accountAddress}/valueHistory
|
|
862
|
+
* @param {string} accountAddress Account address to fetch account value history for.
|
|
863
|
+
* @param {*} [options] Override http request option.
|
|
864
|
+
* @throws {RequiredError}
|
|
865
|
+
*/
|
|
866
|
+
getAccountValueHistoryByAccount: (accountAddress_1, ...args_1) => __awaiter(this, [accountAddress_1, ...args_1], void 0, function* (accountAddress, options = {}) {
|
|
867
|
+
// verify required parameter 'accountAddress' is not null or undefined
|
|
868
|
+
assertParamExists('getAccountValueHistoryByAccount', 'accountAddress', accountAddress);
|
|
869
|
+
const localVarPath = `/api/v1/accounts/{accountAddress}/valueHistory`
|
|
870
|
+
.replace(`{${"accountAddress"}}`, encodeURIComponent(String(accountAddress)));
|
|
871
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
872
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
873
|
+
let baseOptions;
|
|
874
|
+
if (configuration) {
|
|
875
|
+
baseOptions = configuration.baseOptions;
|
|
876
|
+
}
|
|
877
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
878
|
+
const localVarHeaderParameter = {};
|
|
879
|
+
const localVarQueryParameter = {};
|
|
880
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
881
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
882
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
883
|
+
return {
|
|
884
|
+
url: toPathString(localVarUrlObj),
|
|
824
885
|
options: localVarRequestOptions,
|
|
825
886
|
};
|
|
826
887
|
}),
|
|
@@ -833,10 +894,10 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
833
894
|
*/
|
|
834
895
|
patchAccountGroupID: (accountGroupIdPatch_1, ...args_1) => __awaiter(this, [accountGroupIdPatch_1, ...args_1], void 0, function* (accountGroupIdPatch, options = {}) {
|
|
835
896
|
// verify required parameter 'accountGroupIdPatch' is not null or undefined
|
|
836
|
-
|
|
897
|
+
assertParamExists('patchAccountGroupID', 'accountGroupIdPatch', accountGroupIdPatch);
|
|
837
898
|
const localVarPath = `/api/v1/account/groupId`;
|
|
838
899
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
839
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
900
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
840
901
|
let baseOptions;
|
|
841
902
|
if (configuration) {
|
|
842
903
|
baseOptions = configuration.baseOptions;
|
|
@@ -846,14 +907,14 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
846
907
|
const localVarQueryParameter = {};
|
|
847
908
|
// authentication bearerAuth required
|
|
848
909
|
// http bearer authentication required
|
|
849
|
-
yield
|
|
910
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
850
911
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
851
|
-
|
|
912
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
852
913
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
853
914
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
854
|
-
localVarRequestOptions.data =
|
|
915
|
+
localVarRequestOptions.data = serializeDataIfNeeded(accountGroupIdPatch, localVarRequestOptions, configuration);
|
|
855
916
|
return {
|
|
856
|
-
url:
|
|
917
|
+
url: toPathString(localVarUrlObj),
|
|
857
918
|
options: localVarRequestOptions,
|
|
858
919
|
};
|
|
859
920
|
}),
|
|
@@ -866,10 +927,10 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
866
927
|
*/
|
|
867
928
|
putAccountPreferences: (updateAccountPreferenceRequest_1, ...args_1) => __awaiter(this, [updateAccountPreferenceRequest_1, ...args_1], void 0, function* (updateAccountPreferenceRequest, options = {}) {
|
|
868
929
|
// verify required parameter 'updateAccountPreferenceRequest' is not null or undefined
|
|
869
|
-
|
|
930
|
+
assertParamExists('putAccountPreferences', 'updateAccountPreferenceRequest', updateAccountPreferenceRequest);
|
|
870
931
|
const localVarPath = `/api/v1/account/preferences`;
|
|
871
932
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
872
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
933
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
873
934
|
let baseOptions;
|
|
874
935
|
if (configuration) {
|
|
875
936
|
baseOptions = configuration.baseOptions;
|
|
@@ -879,14 +940,14 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
879
940
|
const localVarQueryParameter = {};
|
|
880
941
|
// authentication bearerAuth required
|
|
881
942
|
// http bearer authentication required
|
|
882
|
-
yield
|
|
943
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
883
944
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
884
|
-
|
|
945
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
885
946
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
886
947
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
887
|
-
localVarRequestOptions.data =
|
|
948
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateAccountPreferenceRequest, localVarRequestOptions, configuration);
|
|
888
949
|
return {
|
|
889
|
-
url:
|
|
950
|
+
url: toPathString(localVarUrlObj),
|
|
890
951
|
options: localVarRequestOptions,
|
|
891
952
|
};
|
|
892
953
|
}),
|
|
@@ -899,10 +960,10 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
899
960
|
*/
|
|
900
961
|
sponsorTx: (sponsorTxRequest_1, ...args_1) => __awaiter(this, [sponsorTxRequest_1, ...args_1], void 0, function* (sponsorTxRequest, options = {}) {
|
|
901
962
|
// verify required parameter 'sponsorTxRequest' is not null or undefined
|
|
902
|
-
|
|
963
|
+
assertParamExists('sponsorTx', 'sponsorTxRequest', sponsorTxRequest);
|
|
903
964
|
const localVarPath = `/api/v1/account/sponsorTx`;
|
|
904
965
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
905
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
966
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
906
967
|
let baseOptions;
|
|
907
968
|
if (configuration) {
|
|
908
969
|
baseOptions = configuration.baseOptions;
|
|
@@ -912,26 +973,25 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
912
973
|
const localVarQueryParameter = {};
|
|
913
974
|
// authentication bearerAuth required
|
|
914
975
|
// http bearer authentication required
|
|
915
|
-
yield
|
|
976
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
916
977
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
917
|
-
|
|
978
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
918
979
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
919
980
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
920
|
-
localVarRequestOptions.data =
|
|
981
|
+
localVarRequestOptions.data = serializeDataIfNeeded(sponsorTxRequest, localVarRequestOptions, configuration);
|
|
921
982
|
return {
|
|
922
|
-
url:
|
|
983
|
+
url: toPathString(localVarUrlObj),
|
|
923
984
|
options: localVarRequestOptions,
|
|
924
985
|
};
|
|
925
986
|
}),
|
|
926
987
|
};
|
|
927
988
|
};
|
|
928
|
-
exports.AccountDataApiAxiosParamCreator = AccountDataApiAxiosParamCreator;
|
|
929
989
|
/**
|
|
930
990
|
* AccountDataApi - functional programming interface
|
|
931
991
|
* @export
|
|
932
992
|
*/
|
|
933
|
-
const AccountDataApiFp = function (configuration) {
|
|
934
|
-
const localVarAxiosParamCreator =
|
|
993
|
+
export const AccountDataApiFp = function (configuration) {
|
|
994
|
+
const localVarAxiosParamCreator = AccountDataApiAxiosParamCreator(configuration);
|
|
935
995
|
return {
|
|
936
996
|
/**
|
|
937
997
|
* Retrieves the user\'s account details.
|
|
@@ -945,8 +1005,8 @@ const AccountDataApiFp = function (configuration) {
|
|
|
945
1005
|
var _a, _b, _c;
|
|
946
1006
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountDetails(accountAddress, options);
|
|
947
1007
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
948
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
949
|
-
return (axios, basePath) =>
|
|
1008
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.getAccountDetails']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1009
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
950
1010
|
});
|
|
951
1011
|
},
|
|
952
1012
|
/**
|
|
@@ -965,8 +1025,8 @@ const AccountDataApiFp = function (configuration) {
|
|
|
965
1025
|
var _a, _b, _c;
|
|
966
1026
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountFundingRateHistory(accountAddress, limit, page, startTimeAtMillis, endTimeAtMillis, options);
|
|
967
1027
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
968
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
969
|
-
return (axios, basePath) =>
|
|
1028
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.getAccountFundingRateHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1029
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
970
1030
|
});
|
|
971
1031
|
},
|
|
972
1032
|
/**
|
|
@@ -980,8 +1040,8 @@ const AccountDataApiFp = function (configuration) {
|
|
|
980
1040
|
var _a, _b, _c;
|
|
981
1041
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountPreferences(options);
|
|
982
1042
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
983
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
984
|
-
return (axios, basePath) =>
|
|
1043
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.getAccountPreferences']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1044
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
985
1045
|
});
|
|
986
1046
|
},
|
|
987
1047
|
/**
|
|
@@ -1001,8 +1061,8 @@ const AccountDataApiFp = function (configuration) {
|
|
|
1001
1061
|
var _a, _b, _c;
|
|
1002
1062
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountTrades(symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options);
|
|
1003
1063
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1004
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1005
|
-
return (axios, basePath) =>
|
|
1064
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.getAccountTrades']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1065
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1006
1066
|
});
|
|
1007
1067
|
},
|
|
1008
1068
|
/**
|
|
@@ -1022,8 +1082,8 @@ const AccountDataApiFp = function (configuration) {
|
|
|
1022
1082
|
var _a, _b, _c;
|
|
1023
1083
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountTransactionHistory(types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options);
|
|
1024
1084
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1025
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1026
|
-
return (axios, basePath) =>
|
|
1085
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.getAccountTransactionHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1086
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1027
1087
|
});
|
|
1028
1088
|
},
|
|
1029
1089
|
/**
|
|
@@ -1038,8 +1098,24 @@ const AccountDataApiFp = function (configuration) {
|
|
|
1038
1098
|
var _a, _b, _c;
|
|
1039
1099
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountValueHistory(interval, options);
|
|
1040
1100
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1041
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1042
|
-
return (axios, basePath) =>
|
|
1101
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.getAccountValueHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1102
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1103
|
+
});
|
|
1104
|
+
},
|
|
1105
|
+
/**
|
|
1106
|
+
* Retrieves the account value history for 24h.
|
|
1107
|
+
* @summary /accounts/{accountAddress}/valueHistory
|
|
1108
|
+
* @param {string} accountAddress Account address to fetch account value history for.
|
|
1109
|
+
* @param {*} [options] Override http request option.
|
|
1110
|
+
* @throws {RequiredError}
|
|
1111
|
+
*/
|
|
1112
|
+
getAccountValueHistoryByAccount(accountAddress, options) {
|
|
1113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1114
|
+
var _a, _b, _c;
|
|
1115
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountValueHistoryByAccount(accountAddress, options);
|
|
1116
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1117
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.getAccountValueHistoryByAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1118
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1043
1119
|
});
|
|
1044
1120
|
},
|
|
1045
1121
|
/**
|
|
@@ -1054,8 +1130,8 @@ const AccountDataApiFp = function (configuration) {
|
|
|
1054
1130
|
var _a, _b, _c;
|
|
1055
1131
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.patchAccountGroupID(accountGroupIdPatch, options);
|
|
1056
1132
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1057
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1058
|
-
return (axios, basePath) =>
|
|
1133
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.patchAccountGroupID']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1134
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1059
1135
|
});
|
|
1060
1136
|
},
|
|
1061
1137
|
/**
|
|
@@ -1070,8 +1146,8 @@ const AccountDataApiFp = function (configuration) {
|
|
|
1070
1146
|
var _a, _b, _c;
|
|
1071
1147
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.putAccountPreferences(updateAccountPreferenceRequest, options);
|
|
1072
1148
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1073
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1074
|
-
return (axios, basePath) =>
|
|
1149
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.putAccountPreferences']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1150
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1075
1151
|
});
|
|
1076
1152
|
},
|
|
1077
1153
|
/**
|
|
@@ -1086,19 +1162,18 @@ const AccountDataApiFp = function (configuration) {
|
|
|
1086
1162
|
var _a, _b, _c;
|
|
1087
1163
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.sponsorTx(sponsorTxRequest, options);
|
|
1088
1164
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1089
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1090
|
-
return (axios, basePath) =>
|
|
1165
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountDataApi.sponsorTx']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1166
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1091
1167
|
});
|
|
1092
1168
|
},
|
|
1093
1169
|
};
|
|
1094
1170
|
};
|
|
1095
|
-
exports.AccountDataApiFp = AccountDataApiFp;
|
|
1096
1171
|
/**
|
|
1097
1172
|
* AccountDataApi - factory interface
|
|
1098
1173
|
* @export
|
|
1099
1174
|
*/
|
|
1100
|
-
const AccountDataApiFactory = function (configuration, basePath, axios) {
|
|
1101
|
-
const localVarFp =
|
|
1175
|
+
export const AccountDataApiFactory = function (configuration, basePath, axios) {
|
|
1176
|
+
const localVarFp = AccountDataApiFp(configuration);
|
|
1102
1177
|
return {
|
|
1103
1178
|
/**
|
|
1104
1179
|
* Retrieves the user\'s account details.
|
|
@@ -1173,6 +1248,16 @@ const AccountDataApiFactory = function (configuration, basePath, axios) {
|
|
|
1173
1248
|
getAccountValueHistory(interval, options) {
|
|
1174
1249
|
return localVarFp.getAccountValueHistory(interval, options).then((request) => request(axios, basePath));
|
|
1175
1250
|
},
|
|
1251
|
+
/**
|
|
1252
|
+
* Retrieves the account value history for 24h.
|
|
1253
|
+
* @summary /accounts/{accountAddress}/valueHistory
|
|
1254
|
+
* @param {string} accountAddress Account address to fetch account value history for.
|
|
1255
|
+
* @param {*} [options] Override http request option.
|
|
1256
|
+
* @throws {RequiredError}
|
|
1257
|
+
*/
|
|
1258
|
+
getAccountValueHistoryByAccount(accountAddress, options) {
|
|
1259
|
+
return localVarFp.getAccountValueHistoryByAccount(accountAddress, options).then((request) => request(axios, basePath));
|
|
1260
|
+
},
|
|
1176
1261
|
/**
|
|
1177
1262
|
* Sets or updates the group ID for a specific account. Accounts belonging to the same group cannot trade against each other. If the groupId is not set, the account will be removed from its group. Only the first 6 characters of the groupID are guaranteed to be respected, longer group IDs may be rejected.
|
|
1178
1263
|
* @summary Set the group ID for an account.
|
|
@@ -1205,14 +1290,13 @@ const AccountDataApiFactory = function (configuration, basePath, axios) {
|
|
|
1205
1290
|
},
|
|
1206
1291
|
};
|
|
1207
1292
|
};
|
|
1208
|
-
exports.AccountDataApiFactory = AccountDataApiFactory;
|
|
1209
1293
|
/**
|
|
1210
1294
|
* AccountDataApi - object-oriented interface
|
|
1211
1295
|
* @export
|
|
1212
1296
|
* @class AccountDataApi
|
|
1213
1297
|
* @extends {BaseAPI}
|
|
1214
1298
|
*/
|
|
1215
|
-
class AccountDataApi extends
|
|
1299
|
+
export class AccountDataApi extends BaseAPI {
|
|
1216
1300
|
/**
|
|
1217
1301
|
* Retrieves the user\'s account details.
|
|
1218
1302
|
* @summary /account
|
|
@@ -1222,7 +1306,7 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1222
1306
|
* @memberof AccountDataApi
|
|
1223
1307
|
*/
|
|
1224
1308
|
getAccountDetails(accountAddress, options) {
|
|
1225
|
-
return
|
|
1309
|
+
return AccountDataApiFp(this.configuration).getAccountDetails(accountAddress, options).then((request) => request(this.axios, this.basePath));
|
|
1226
1310
|
}
|
|
1227
1311
|
/**
|
|
1228
1312
|
* Retrieves the funding rate history for a specific account.
|
|
@@ -1237,7 +1321,7 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1237
1321
|
* @memberof AccountDataApi
|
|
1238
1322
|
*/
|
|
1239
1323
|
getAccountFundingRateHistory(accountAddress, limit, page, startTimeAtMillis, endTimeAtMillis, options) {
|
|
1240
|
-
return
|
|
1324
|
+
return AccountDataApiFp(this.configuration).getAccountFundingRateHistory(accountAddress, limit, page, startTimeAtMillis, endTimeAtMillis, options).then((request) => request(this.axios, this.basePath));
|
|
1241
1325
|
}
|
|
1242
1326
|
/**
|
|
1243
1327
|
* Retrieves the user\'s account preferences.
|
|
@@ -1247,7 +1331,7 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1247
1331
|
* @memberof AccountDataApi
|
|
1248
1332
|
*/
|
|
1249
1333
|
getAccountPreferences(options) {
|
|
1250
|
-
return
|
|
1334
|
+
return AccountDataApiFp(this.configuration).getAccountPreferences(options).then((request) => request(this.axios, this.basePath));
|
|
1251
1335
|
}
|
|
1252
1336
|
/**
|
|
1253
1337
|
* Retrieves the user\'s trade history.
|
|
@@ -1263,7 +1347,7 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1263
1347
|
* @memberof AccountDataApi
|
|
1264
1348
|
*/
|
|
1265
1349
|
getAccountTrades(symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options) {
|
|
1266
|
-
return
|
|
1350
|
+
return AccountDataApiFp(this.configuration).getAccountTrades(symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options).then((request) => request(this.axios, this.basePath));
|
|
1267
1351
|
}
|
|
1268
1352
|
/**
|
|
1269
1353
|
* Retrieves the user\'s transaction history (any change in balance).
|
|
@@ -1279,7 +1363,7 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1279
1363
|
* @memberof AccountDataApi
|
|
1280
1364
|
*/
|
|
1281
1365
|
getAccountTransactionHistory(types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
1282
|
-
return
|
|
1366
|
+
return AccountDataApiFp(this.configuration).getAccountTransactionHistory(types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
1283
1367
|
}
|
|
1284
1368
|
/**
|
|
1285
1369
|
* Retrieves the account value history for a specific account over a given time interval.
|
|
@@ -1290,7 +1374,18 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1290
1374
|
* @memberof AccountDataApi
|
|
1291
1375
|
*/
|
|
1292
1376
|
getAccountValueHistory(interval, options) {
|
|
1293
|
-
return
|
|
1377
|
+
return AccountDataApiFp(this.configuration).getAccountValueHistory(interval, options).then((request) => request(this.axios, this.basePath));
|
|
1378
|
+
}
|
|
1379
|
+
/**
|
|
1380
|
+
* Retrieves the account value history for 24h.
|
|
1381
|
+
* @summary /accounts/{accountAddress}/valueHistory
|
|
1382
|
+
* @param {string} accountAddress Account address to fetch account value history for.
|
|
1383
|
+
* @param {*} [options] Override http request option.
|
|
1384
|
+
* @throws {RequiredError}
|
|
1385
|
+
* @memberof AccountDataApi
|
|
1386
|
+
*/
|
|
1387
|
+
getAccountValueHistoryByAccount(accountAddress, options) {
|
|
1388
|
+
return AccountDataApiFp(this.configuration).getAccountValueHistoryByAccount(accountAddress, options).then((request) => request(this.axios, this.basePath));
|
|
1294
1389
|
}
|
|
1295
1390
|
/**
|
|
1296
1391
|
* Sets or updates the group ID for a specific account. Accounts belonging to the same group cannot trade against each other. If the groupId is not set, the account will be removed from its group. Only the first 6 characters of the groupID are guaranteed to be respected, longer group IDs may be rejected.
|
|
@@ -1301,7 +1396,7 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1301
1396
|
* @memberof AccountDataApi
|
|
1302
1397
|
*/
|
|
1303
1398
|
patchAccountGroupID(accountGroupIdPatch, options) {
|
|
1304
|
-
return
|
|
1399
|
+
return AccountDataApiFp(this.configuration).patchAccountGroupID(accountGroupIdPatch, options).then((request) => request(this.axios, this.basePath));
|
|
1305
1400
|
}
|
|
1306
1401
|
/**
|
|
1307
1402
|
* Update user\'s account preferences. This will overwrite the preferences, so always send the full object.
|
|
@@ -1312,7 +1407,7 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1312
1407
|
* @memberof AccountDataApi
|
|
1313
1408
|
*/
|
|
1314
1409
|
putAccountPreferences(updateAccountPreferenceRequest, options) {
|
|
1315
|
-
return
|
|
1410
|
+
return AccountDataApiFp(this.configuration).putAccountPreferences(updateAccountPreferenceRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1316
1411
|
}
|
|
1317
1412
|
/**
|
|
1318
1413
|
* Sponsors a transaction if it\'s eligible for sponsorship based on allowlisted methods and kinds.
|
|
@@ -1323,15 +1418,14 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1323
1418
|
* @memberof AccountDataApi
|
|
1324
1419
|
*/
|
|
1325
1420
|
sponsorTx(sponsorTxRequest, options) {
|
|
1326
|
-
return
|
|
1421
|
+
return AccountDataApiFp(this.configuration).sponsorTx(sponsorTxRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1327
1422
|
}
|
|
1328
1423
|
}
|
|
1329
|
-
exports.AccountDataApi = AccountDataApi;
|
|
1330
1424
|
/**
|
|
1331
1425
|
* AuthApi - axios parameter creator
|
|
1332
1426
|
* @export
|
|
1333
1427
|
*/
|
|
1334
|
-
const AuthApiAxiosParamCreator = function (configuration) {
|
|
1428
|
+
export const AuthApiAxiosParamCreator = function (configuration) {
|
|
1335
1429
|
return {
|
|
1336
1430
|
/**
|
|
1337
1431
|
*
|
|
@@ -1341,7 +1435,7 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1341
1435
|
authJwksGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1342
1436
|
const localVarPath = `/auth/jwks`;
|
|
1343
1437
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1344
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
1438
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1345
1439
|
let baseOptions;
|
|
1346
1440
|
if (configuration) {
|
|
1347
1441
|
baseOptions = configuration.baseOptions;
|
|
@@ -1349,11 +1443,11 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1349
1443
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1350
1444
|
const localVarHeaderParameter = {};
|
|
1351
1445
|
const localVarQueryParameter = {};
|
|
1352
|
-
|
|
1446
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1353
1447
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1354
1448
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1355
1449
|
return {
|
|
1356
|
-
url:
|
|
1450
|
+
url: toPathString(localVarUrlObj),
|
|
1357
1451
|
options: localVarRequestOptions,
|
|
1358
1452
|
};
|
|
1359
1453
|
}),
|
|
@@ -1363,17 +1457,18 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1363
1457
|
* @param {LoginRequest} loginRequest
|
|
1364
1458
|
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1365
1459
|
* @param {boolean} [readOnly]
|
|
1460
|
+
* @param {ClientType} [client] The client application originating the request (WEB or VERA). Defaults to WEB if not supplied.
|
|
1366
1461
|
* @param {*} [options] Override http request option.
|
|
1367
1462
|
* @throws {RequiredError}
|
|
1368
1463
|
*/
|
|
1369
|
-
authTokenPost: (payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, ...args_1) => __awaiter(this, [payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, ...args_1], void 0, function* (payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options = {}) {
|
|
1464
|
+
authTokenPost: (payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, client_1, ...args_1) => __awaiter(this, [payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, client_1, ...args_1], void 0, function* (payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options = {}) {
|
|
1370
1465
|
// verify required parameter 'payloadSignature' is not null or undefined
|
|
1371
|
-
|
|
1466
|
+
assertParamExists('authTokenPost', 'payloadSignature', payloadSignature);
|
|
1372
1467
|
// verify required parameter 'loginRequest' is not null or undefined
|
|
1373
|
-
|
|
1468
|
+
assertParamExists('authTokenPost', 'loginRequest', loginRequest);
|
|
1374
1469
|
const localVarPath = `/auth/token`;
|
|
1375
1470
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1376
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
1471
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1377
1472
|
let baseOptions;
|
|
1378
1473
|
if (configuration) {
|
|
1379
1474
|
baseOptions = configuration.baseOptions;
|
|
@@ -1387,16 +1482,19 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1387
1482
|
if (readOnly !== undefined) {
|
|
1388
1483
|
localVarQueryParameter['readOnly'] = readOnly;
|
|
1389
1484
|
}
|
|
1485
|
+
if (client !== undefined) {
|
|
1486
|
+
localVarQueryParameter['client'] = client;
|
|
1487
|
+
}
|
|
1390
1488
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1391
1489
|
if (payloadSignature != null) {
|
|
1392
1490
|
localVarHeaderParameter['payloadSignature'] = String(payloadSignature);
|
|
1393
1491
|
}
|
|
1394
|
-
|
|
1492
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1395
1493
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1396
1494
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1397
|
-
localVarRequestOptions.data =
|
|
1495
|
+
localVarRequestOptions.data = serializeDataIfNeeded(loginRequest, localVarRequestOptions, configuration);
|
|
1398
1496
|
return {
|
|
1399
|
-
url:
|
|
1497
|
+
url: toPathString(localVarUrlObj),
|
|
1400
1498
|
options: localVarRequestOptions,
|
|
1401
1499
|
};
|
|
1402
1500
|
}),
|
|
@@ -1408,10 +1506,10 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1408
1506
|
*/
|
|
1409
1507
|
authTokenRefreshPut: (refreshTokenRequest_1, ...args_1) => __awaiter(this, [refreshTokenRequest_1, ...args_1], void 0, function* (refreshTokenRequest, options = {}) {
|
|
1410
1508
|
// verify required parameter 'refreshTokenRequest' is not null or undefined
|
|
1411
|
-
|
|
1509
|
+
assertParamExists('authTokenRefreshPut', 'refreshTokenRequest', refreshTokenRequest);
|
|
1412
1510
|
const localVarPath = `/auth/token/refresh`;
|
|
1413
1511
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1414
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
1512
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1415
1513
|
let baseOptions;
|
|
1416
1514
|
if (configuration) {
|
|
1417
1515
|
baseOptions = configuration.baseOptions;
|
|
@@ -1420,12 +1518,12 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1420
1518
|
const localVarHeaderParameter = {};
|
|
1421
1519
|
const localVarQueryParameter = {};
|
|
1422
1520
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1423
|
-
|
|
1521
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1424
1522
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1425
1523
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1426
|
-
localVarRequestOptions.data =
|
|
1524
|
+
localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenRequest, localVarRequestOptions, configuration);
|
|
1427
1525
|
return {
|
|
1428
|
-
url:
|
|
1526
|
+
url: toPathString(localVarUrlObj),
|
|
1429
1527
|
options: localVarRequestOptions,
|
|
1430
1528
|
};
|
|
1431
1529
|
}),
|
|
@@ -1435,17 +1533,18 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1435
1533
|
* @param {LoginRequest} loginRequest
|
|
1436
1534
|
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1437
1535
|
* @param {boolean} [readOnly]
|
|
1536
|
+
* @param {ClientType} [client] The client application originating the request (WEB or VERA). Defaults to WEB if not supplied.
|
|
1438
1537
|
* @param {*} [options] Override http request option.
|
|
1439
1538
|
* @throws {RequiredError}
|
|
1440
1539
|
*/
|
|
1441
|
-
authV2TokenPost: (payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, ...args_1) => __awaiter(this, [payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, ...args_1], void 0, function* (payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options = {}) {
|
|
1540
|
+
authV2TokenPost: (payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, client_1, ...args_1) => __awaiter(this, [payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, client_1, ...args_1], void 0, function* (payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options = {}) {
|
|
1442
1541
|
// verify required parameter 'payloadSignature' is not null or undefined
|
|
1443
|
-
|
|
1542
|
+
assertParamExists('authV2TokenPost', 'payloadSignature', payloadSignature);
|
|
1444
1543
|
// verify required parameter 'loginRequest' is not null or undefined
|
|
1445
|
-
|
|
1544
|
+
assertParamExists('authV2TokenPost', 'loginRequest', loginRequest);
|
|
1446
1545
|
const localVarPath = `/auth/v2/token`;
|
|
1447
1546
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1448
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
1547
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1449
1548
|
let baseOptions;
|
|
1450
1549
|
if (configuration) {
|
|
1451
1550
|
baseOptions = configuration.baseOptions;
|
|
@@ -1459,16 +1558,44 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1459
1558
|
if (readOnly !== undefined) {
|
|
1460
1559
|
localVarQueryParameter['readOnly'] = readOnly;
|
|
1461
1560
|
}
|
|
1561
|
+
if (client !== undefined) {
|
|
1562
|
+
localVarQueryParameter['client'] = client;
|
|
1563
|
+
}
|
|
1462
1564
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1463
1565
|
if (payloadSignature != null) {
|
|
1464
1566
|
localVarHeaderParameter['payloadSignature'] = String(payloadSignature);
|
|
1465
1567
|
}
|
|
1466
|
-
|
|
1568
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1569
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1570
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1571
|
+
localVarRequestOptions.data = serializeDataIfNeeded(loginRequest, localVarRequestOptions, configuration);
|
|
1572
|
+
return {
|
|
1573
|
+
url: toPathString(localVarUrlObj),
|
|
1574
|
+
options: localVarRequestOptions,
|
|
1575
|
+
};
|
|
1576
|
+
}),
|
|
1577
|
+
/**
|
|
1578
|
+
* OpenID Connect Discovery endpoint
|
|
1579
|
+
* @summary /.well-known/openid-configuration
|
|
1580
|
+
* @param {*} [options] Override http request option.
|
|
1581
|
+
* @throws {RequiredError}
|
|
1582
|
+
*/
|
|
1583
|
+
getWellKnownOpenidConfiguration: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1584
|
+
const localVarPath = `/.well-known/openid-configuration`;
|
|
1585
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1586
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1587
|
+
let baseOptions;
|
|
1588
|
+
if (configuration) {
|
|
1589
|
+
baseOptions = configuration.baseOptions;
|
|
1590
|
+
}
|
|
1591
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1592
|
+
const localVarHeaderParameter = {};
|
|
1593
|
+
const localVarQueryParameter = {};
|
|
1594
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1467
1595
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1468
1596
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1469
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginRequest, localVarRequestOptions, configuration);
|
|
1470
1597
|
return {
|
|
1471
|
-
url:
|
|
1598
|
+
url: toPathString(localVarUrlObj),
|
|
1472
1599
|
options: localVarRequestOptions,
|
|
1473
1600
|
};
|
|
1474
1601
|
}),
|
|
@@ -1481,10 +1608,10 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1481
1608
|
*/
|
|
1482
1609
|
getZkLoginUserDetails: (zkloginJwt_1, ...args_1) => __awaiter(this, [zkloginJwt_1, ...args_1], void 0, function* (zkloginJwt, options = {}) {
|
|
1483
1610
|
// verify required parameter 'zkloginJwt' is not null or undefined
|
|
1484
|
-
|
|
1611
|
+
assertParamExists('getZkLoginUserDetails', 'zkloginJwt', zkloginJwt);
|
|
1485
1612
|
const localVarPath = `/auth/zklogin`;
|
|
1486
1613
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1487
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
1614
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1488
1615
|
let baseOptions;
|
|
1489
1616
|
if (configuration) {
|
|
1490
1617
|
baseOptions = configuration.baseOptions;
|
|
@@ -1495,11 +1622,41 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1495
1622
|
if (zkloginJwt != null) {
|
|
1496
1623
|
localVarHeaderParameter['zklogin-jwt'] = String(zkloginJwt);
|
|
1497
1624
|
}
|
|
1498
|
-
|
|
1625
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1626
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1627
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1628
|
+
return {
|
|
1629
|
+
url: toPathString(localVarUrlObj),
|
|
1630
|
+
options: localVarRequestOptions,
|
|
1631
|
+
};
|
|
1632
|
+
}),
|
|
1633
|
+
/**
|
|
1634
|
+
* OAuth2 client_credentials grant for service accounts
|
|
1635
|
+
* @summary /auth/client-credentials
|
|
1636
|
+
* @param {ClientCredentialsRequest} clientCredentialsRequest
|
|
1637
|
+
* @param {*} [options] Override http request option.
|
|
1638
|
+
* @throws {RequiredError}
|
|
1639
|
+
*/
|
|
1640
|
+
postAuthClientCredentials: (clientCredentialsRequest_1, ...args_1) => __awaiter(this, [clientCredentialsRequest_1, ...args_1], void 0, function* (clientCredentialsRequest, options = {}) {
|
|
1641
|
+
// verify required parameter 'clientCredentialsRequest' is not null or undefined
|
|
1642
|
+
assertParamExists('postAuthClientCredentials', 'clientCredentialsRequest', clientCredentialsRequest);
|
|
1643
|
+
const localVarPath = `/auth/client-credentials`;
|
|
1644
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1645
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1646
|
+
let baseOptions;
|
|
1647
|
+
if (configuration) {
|
|
1648
|
+
baseOptions = configuration.baseOptions;
|
|
1649
|
+
}
|
|
1650
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1651
|
+
const localVarHeaderParameter = {};
|
|
1652
|
+
const localVarQueryParameter = {};
|
|
1653
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1654
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1499
1655
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1500
1656
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1657
|
+
localVarRequestOptions.data = serializeDataIfNeeded(clientCredentialsRequest, localVarRequestOptions, configuration);
|
|
1501
1658
|
return {
|
|
1502
|
-
url:
|
|
1659
|
+
url: toPathString(localVarUrlObj),
|
|
1503
1660
|
options: localVarRequestOptions,
|
|
1504
1661
|
};
|
|
1505
1662
|
}),
|
|
@@ -1513,12 +1670,12 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1513
1670
|
*/
|
|
1514
1671
|
postZkLoginZkp: (zkloginJwt_1, zKLoginZKPRequest_1, ...args_1) => __awaiter(this, [zkloginJwt_1, zKLoginZKPRequest_1, ...args_1], void 0, function* (zkloginJwt, zKLoginZKPRequest, options = {}) {
|
|
1515
1672
|
// verify required parameter 'zkloginJwt' is not null or undefined
|
|
1516
|
-
|
|
1673
|
+
assertParamExists('postZkLoginZkp', 'zkloginJwt', zkloginJwt);
|
|
1517
1674
|
// verify required parameter 'zKLoginZKPRequest' is not null or undefined
|
|
1518
|
-
|
|
1675
|
+
assertParamExists('postZkLoginZkp', 'zKLoginZKPRequest', zKLoginZKPRequest);
|
|
1519
1676
|
const localVarPath = `/auth/zklogin/zkp`;
|
|
1520
1677
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1521
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
1678
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1522
1679
|
let baseOptions;
|
|
1523
1680
|
if (configuration) {
|
|
1524
1681
|
baseOptions = configuration.baseOptions;
|
|
@@ -1530,24 +1687,23 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
1530
1687
|
if (zkloginJwt != null) {
|
|
1531
1688
|
localVarHeaderParameter['zklogin-jwt'] = String(zkloginJwt);
|
|
1532
1689
|
}
|
|
1533
|
-
|
|
1690
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1534
1691
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1535
1692
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1536
|
-
localVarRequestOptions.data =
|
|
1693
|
+
localVarRequestOptions.data = serializeDataIfNeeded(zKLoginZKPRequest, localVarRequestOptions, configuration);
|
|
1537
1694
|
return {
|
|
1538
|
-
url:
|
|
1695
|
+
url: toPathString(localVarUrlObj),
|
|
1539
1696
|
options: localVarRequestOptions,
|
|
1540
1697
|
};
|
|
1541
1698
|
}),
|
|
1542
1699
|
};
|
|
1543
1700
|
};
|
|
1544
|
-
exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
|
|
1545
1701
|
/**
|
|
1546
1702
|
* AuthApi - functional programming interface
|
|
1547
1703
|
* @export
|
|
1548
1704
|
*/
|
|
1549
|
-
const AuthApiFp = function (configuration) {
|
|
1550
|
-
const localVarAxiosParamCreator =
|
|
1705
|
+
export const AuthApiFp = function (configuration) {
|
|
1706
|
+
const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration);
|
|
1551
1707
|
return {
|
|
1552
1708
|
/**
|
|
1553
1709
|
*
|
|
@@ -1559,8 +1715,8 @@ const AuthApiFp = function (configuration) {
|
|
|
1559
1715
|
var _a, _b, _c;
|
|
1560
1716
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.authJwksGet(options);
|
|
1561
1717
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1562
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1563
|
-
return (axios, basePath) =>
|
|
1718
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.authJwksGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1719
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1564
1720
|
});
|
|
1565
1721
|
},
|
|
1566
1722
|
/**
|
|
@@ -1569,16 +1725,17 @@ const AuthApiFp = function (configuration) {
|
|
|
1569
1725
|
* @param {LoginRequest} loginRequest
|
|
1570
1726
|
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1571
1727
|
* @param {boolean} [readOnly]
|
|
1728
|
+
* @param {ClientType} [client] The client application originating the request (WEB or VERA). Defaults to WEB if not supplied.
|
|
1572
1729
|
* @param {*} [options] Override http request option.
|
|
1573
1730
|
* @throws {RequiredError}
|
|
1574
1731
|
*/
|
|
1575
|
-
authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1732
|
+
authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options) {
|
|
1576
1733
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1577
1734
|
var _a, _b, _c;
|
|
1578
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options);
|
|
1735
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options);
|
|
1579
1736
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1580
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1581
|
-
return (axios, basePath) =>
|
|
1737
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.authTokenPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1738
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1582
1739
|
});
|
|
1583
1740
|
},
|
|
1584
1741
|
/**
|
|
@@ -1592,8 +1749,8 @@ const AuthApiFp = function (configuration) {
|
|
|
1592
1749
|
var _a, _b, _c;
|
|
1593
1750
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.authTokenRefreshPut(refreshTokenRequest, options);
|
|
1594
1751
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1595
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1596
|
-
return (axios, basePath) =>
|
|
1752
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.authTokenRefreshPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1753
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1597
1754
|
});
|
|
1598
1755
|
},
|
|
1599
1756
|
/**
|
|
@@ -1602,16 +1759,32 @@ const AuthApiFp = function (configuration) {
|
|
|
1602
1759
|
* @param {LoginRequest} loginRequest
|
|
1603
1760
|
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1604
1761
|
* @param {boolean} [readOnly]
|
|
1762
|
+
* @param {ClientType} [client] The client application originating the request (WEB or VERA). Defaults to WEB if not supplied.
|
|
1605
1763
|
* @param {*} [options] Override http request option.
|
|
1606
1764
|
* @throws {RequiredError}
|
|
1607
1765
|
*/
|
|
1608
|
-
authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1766
|
+
authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options) {
|
|
1609
1767
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1610
1768
|
var _a, _b, _c;
|
|
1611
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options);
|
|
1769
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options);
|
|
1612
1770
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1613
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1614
|
-
return (axios, basePath) =>
|
|
1771
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.authV2TokenPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1772
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1773
|
+
});
|
|
1774
|
+
},
|
|
1775
|
+
/**
|
|
1776
|
+
* OpenID Connect Discovery endpoint
|
|
1777
|
+
* @summary /.well-known/openid-configuration
|
|
1778
|
+
* @param {*} [options] Override http request option.
|
|
1779
|
+
* @throws {RequiredError}
|
|
1780
|
+
*/
|
|
1781
|
+
getWellKnownOpenidConfiguration(options) {
|
|
1782
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1783
|
+
var _a, _b, _c;
|
|
1784
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getWellKnownOpenidConfiguration(options);
|
|
1785
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1786
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.getWellKnownOpenidConfiguration']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1787
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1615
1788
|
});
|
|
1616
1789
|
},
|
|
1617
1790
|
/**
|
|
@@ -1626,8 +1799,24 @@ const AuthApiFp = function (configuration) {
|
|
|
1626
1799
|
var _a, _b, _c;
|
|
1627
1800
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getZkLoginUserDetails(zkloginJwt, options);
|
|
1628
1801
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1629
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1630
|
-
return (axios, basePath) =>
|
|
1802
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.getZkLoginUserDetails']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1803
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1804
|
+
});
|
|
1805
|
+
},
|
|
1806
|
+
/**
|
|
1807
|
+
* OAuth2 client_credentials grant for service accounts
|
|
1808
|
+
* @summary /auth/client-credentials
|
|
1809
|
+
* @param {ClientCredentialsRequest} clientCredentialsRequest
|
|
1810
|
+
* @param {*} [options] Override http request option.
|
|
1811
|
+
* @throws {RequiredError}
|
|
1812
|
+
*/
|
|
1813
|
+
postAuthClientCredentials(clientCredentialsRequest, options) {
|
|
1814
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1815
|
+
var _a, _b, _c;
|
|
1816
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.postAuthClientCredentials(clientCredentialsRequest, options);
|
|
1817
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1818
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.postAuthClientCredentials']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1819
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1631
1820
|
});
|
|
1632
1821
|
},
|
|
1633
1822
|
/**
|
|
@@ -1643,19 +1832,18 @@ const AuthApiFp = function (configuration) {
|
|
|
1643
1832
|
var _a, _b, _c;
|
|
1644
1833
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.postZkLoginZkp(zkloginJwt, zKLoginZKPRequest, options);
|
|
1645
1834
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1646
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
1647
|
-
return (axios, basePath) =>
|
|
1835
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.postZkLoginZkp']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1836
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1648
1837
|
});
|
|
1649
1838
|
},
|
|
1650
1839
|
};
|
|
1651
1840
|
};
|
|
1652
|
-
exports.AuthApiFp = AuthApiFp;
|
|
1653
1841
|
/**
|
|
1654
1842
|
* AuthApi - factory interface
|
|
1655
1843
|
* @export
|
|
1656
1844
|
*/
|
|
1657
|
-
const AuthApiFactory = function (configuration, basePath, axios) {
|
|
1658
|
-
const localVarFp =
|
|
1845
|
+
export const AuthApiFactory = function (configuration, basePath, axios) {
|
|
1846
|
+
const localVarFp = AuthApiFp(configuration);
|
|
1659
1847
|
return {
|
|
1660
1848
|
/**
|
|
1661
1849
|
*
|
|
@@ -1671,11 +1859,12 @@ const AuthApiFactory = function (configuration, basePath, axios) {
|
|
|
1671
1859
|
* @param {LoginRequest} loginRequest
|
|
1672
1860
|
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1673
1861
|
* @param {boolean} [readOnly]
|
|
1862
|
+
* @param {ClientType} [client] The client application originating the request (WEB or VERA). Defaults to WEB if not supplied.
|
|
1674
1863
|
* @param {*} [options] Override http request option.
|
|
1675
1864
|
* @throws {RequiredError}
|
|
1676
1865
|
*/
|
|
1677
|
-
authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1678
|
-
return localVarFp.authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options).then((request) => request(axios, basePath));
|
|
1866
|
+
authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options) {
|
|
1867
|
+
return localVarFp.authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options).then((request) => request(axios, basePath));
|
|
1679
1868
|
},
|
|
1680
1869
|
/**
|
|
1681
1870
|
* Retrieves a new auth token for an account. Expiry is set to 5 min.
|
|
@@ -1692,11 +1881,21 @@ const AuthApiFactory = function (configuration, basePath, axios) {
|
|
|
1692
1881
|
* @param {LoginRequest} loginRequest
|
|
1693
1882
|
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1694
1883
|
* @param {boolean} [readOnly]
|
|
1884
|
+
* @param {ClientType} [client] The client application originating the request (WEB or VERA). Defaults to WEB if not supplied.
|
|
1885
|
+
* @param {*} [options] Override http request option.
|
|
1886
|
+
* @throws {RequiredError}
|
|
1887
|
+
*/
|
|
1888
|
+
authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options) {
|
|
1889
|
+
return localVarFp.authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options).then((request) => request(axios, basePath));
|
|
1890
|
+
},
|
|
1891
|
+
/**
|
|
1892
|
+
* OpenID Connect Discovery endpoint
|
|
1893
|
+
* @summary /.well-known/openid-configuration
|
|
1695
1894
|
* @param {*} [options] Override http request option.
|
|
1696
1895
|
* @throws {RequiredError}
|
|
1697
1896
|
*/
|
|
1698
|
-
|
|
1699
|
-
return localVarFp.
|
|
1897
|
+
getWellKnownOpenidConfiguration(options) {
|
|
1898
|
+
return localVarFp.getWellKnownOpenidConfiguration(options).then((request) => request(axios, basePath));
|
|
1700
1899
|
},
|
|
1701
1900
|
/**
|
|
1702
1901
|
* ZK Login User Details
|
|
@@ -1708,6 +1907,16 @@ const AuthApiFactory = function (configuration, basePath, axios) {
|
|
|
1708
1907
|
getZkLoginUserDetails(zkloginJwt, options) {
|
|
1709
1908
|
return localVarFp.getZkLoginUserDetails(zkloginJwt, options).then((request) => request(axios, basePath));
|
|
1710
1909
|
},
|
|
1910
|
+
/**
|
|
1911
|
+
* OAuth2 client_credentials grant for service accounts
|
|
1912
|
+
* @summary /auth/client-credentials
|
|
1913
|
+
* @param {ClientCredentialsRequest} clientCredentialsRequest
|
|
1914
|
+
* @param {*} [options] Override http request option.
|
|
1915
|
+
* @throws {RequiredError}
|
|
1916
|
+
*/
|
|
1917
|
+
postAuthClientCredentials(clientCredentialsRequest, options) {
|
|
1918
|
+
return localVarFp.postAuthClientCredentials(clientCredentialsRequest, options).then((request) => request(axios, basePath));
|
|
1919
|
+
},
|
|
1711
1920
|
/**
|
|
1712
1921
|
*
|
|
1713
1922
|
* @summary /auth/zklogin/zkp
|
|
@@ -1721,14 +1930,13 @@ const AuthApiFactory = function (configuration, basePath, axios) {
|
|
|
1721
1930
|
},
|
|
1722
1931
|
};
|
|
1723
1932
|
};
|
|
1724
|
-
exports.AuthApiFactory = AuthApiFactory;
|
|
1725
1933
|
/**
|
|
1726
1934
|
* AuthApi - object-oriented interface
|
|
1727
1935
|
* @export
|
|
1728
1936
|
* @class AuthApi
|
|
1729
1937
|
* @extends {BaseAPI}
|
|
1730
1938
|
*/
|
|
1731
|
-
class AuthApi extends
|
|
1939
|
+
export class AuthApi extends BaseAPI {
|
|
1732
1940
|
/**
|
|
1733
1941
|
*
|
|
1734
1942
|
* @param {*} [options] Override http request option.
|
|
@@ -1736,7 +1944,7 @@ class AuthApi extends base_1.BaseAPI {
|
|
|
1736
1944
|
* @memberof AuthApi
|
|
1737
1945
|
*/
|
|
1738
1946
|
authJwksGet(options) {
|
|
1739
|
-
return
|
|
1947
|
+
return AuthApiFp(this.configuration).authJwksGet(options).then((request) => request(this.axios, this.basePath));
|
|
1740
1948
|
}
|
|
1741
1949
|
/**
|
|
1742
1950
|
* login with token
|
|
@@ -1744,12 +1952,13 @@ class AuthApi extends base_1.BaseAPI {
|
|
|
1744
1952
|
* @param {LoginRequest} loginRequest
|
|
1745
1953
|
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1746
1954
|
* @param {boolean} [readOnly]
|
|
1955
|
+
* @param {ClientType} [client] The client application originating the request (WEB or VERA). Defaults to WEB if not supplied.
|
|
1747
1956
|
* @param {*} [options] Override http request option.
|
|
1748
1957
|
* @throws {RequiredError}
|
|
1749
1958
|
* @memberof AuthApi
|
|
1750
1959
|
*/
|
|
1751
|
-
authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1752
|
-
return
|
|
1960
|
+
authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options) {
|
|
1961
|
+
return AuthApiFp(this.configuration).authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options).then((request) => request(this.axios, this.basePath));
|
|
1753
1962
|
}
|
|
1754
1963
|
/**
|
|
1755
1964
|
* Retrieves a new auth token for an account. Expiry is set to 5 min.
|
|
@@ -1759,7 +1968,7 @@ class AuthApi extends base_1.BaseAPI {
|
|
|
1759
1968
|
* @memberof AuthApi
|
|
1760
1969
|
*/
|
|
1761
1970
|
authTokenRefreshPut(refreshTokenRequest, options) {
|
|
1762
|
-
return
|
|
1971
|
+
return AuthApiFp(this.configuration).authTokenRefreshPut(refreshTokenRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1763
1972
|
}
|
|
1764
1973
|
/**
|
|
1765
1974
|
* login compatible with BCS payload with intent bytes
|
|
@@ -1767,12 +1976,23 @@ class AuthApi extends base_1.BaseAPI {
|
|
|
1767
1976
|
* @param {LoginRequest} loginRequest
|
|
1768
1977
|
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1769
1978
|
* @param {boolean} [readOnly]
|
|
1979
|
+
* @param {ClientType} [client] The client application originating the request (WEB or VERA). Defaults to WEB if not supplied.
|
|
1980
|
+
* @param {*} [options] Override http request option.
|
|
1981
|
+
* @throws {RequiredError}
|
|
1982
|
+
* @memberof AuthApi
|
|
1983
|
+
*/
|
|
1984
|
+
authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options) {
|
|
1985
|
+
return AuthApiFp(this.configuration).authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, client, options).then((request) => request(this.axios, this.basePath));
|
|
1986
|
+
}
|
|
1987
|
+
/**
|
|
1988
|
+
* OpenID Connect Discovery endpoint
|
|
1989
|
+
* @summary /.well-known/openid-configuration
|
|
1770
1990
|
* @param {*} [options] Override http request option.
|
|
1771
1991
|
* @throws {RequiredError}
|
|
1772
1992
|
* @memberof AuthApi
|
|
1773
1993
|
*/
|
|
1774
|
-
|
|
1775
|
-
return
|
|
1994
|
+
getWellKnownOpenidConfiguration(options) {
|
|
1995
|
+
return AuthApiFp(this.configuration).getWellKnownOpenidConfiguration(options).then((request) => request(this.axios, this.basePath));
|
|
1776
1996
|
}
|
|
1777
1997
|
/**
|
|
1778
1998
|
* ZK Login User Details
|
|
@@ -1783,7 +2003,18 @@ class AuthApi extends base_1.BaseAPI {
|
|
|
1783
2003
|
* @memberof AuthApi
|
|
1784
2004
|
*/
|
|
1785
2005
|
getZkLoginUserDetails(zkloginJwt, options) {
|
|
1786
|
-
return
|
|
2006
|
+
return AuthApiFp(this.configuration).getZkLoginUserDetails(zkloginJwt, options).then((request) => request(this.axios, this.basePath));
|
|
2007
|
+
}
|
|
2008
|
+
/**
|
|
2009
|
+
* OAuth2 client_credentials grant for service accounts
|
|
2010
|
+
* @summary /auth/client-credentials
|
|
2011
|
+
* @param {ClientCredentialsRequest} clientCredentialsRequest
|
|
2012
|
+
* @param {*} [options] Override http request option.
|
|
2013
|
+
* @throws {RequiredError}
|
|
2014
|
+
* @memberof AuthApi
|
|
2015
|
+
*/
|
|
2016
|
+
postAuthClientCredentials(clientCredentialsRequest, options) {
|
|
2017
|
+
return AuthApiFp(this.configuration).postAuthClientCredentials(clientCredentialsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1787
2018
|
}
|
|
1788
2019
|
/**
|
|
1789
2020
|
*
|
|
@@ -1795,15 +2026,14 @@ class AuthApi extends base_1.BaseAPI {
|
|
|
1795
2026
|
* @memberof AuthApi
|
|
1796
2027
|
*/
|
|
1797
2028
|
postZkLoginZkp(zkloginJwt, zKLoginZKPRequest, options) {
|
|
1798
|
-
return
|
|
2029
|
+
return AuthApiFp(this.configuration).postZkLoginZkp(zkloginJwt, zKLoginZKPRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1799
2030
|
}
|
|
1800
2031
|
}
|
|
1801
|
-
exports.AuthApi = AuthApi;
|
|
1802
2032
|
/**
|
|
1803
2033
|
* ExchangeApi - axios parameter creator
|
|
1804
2034
|
* @export
|
|
1805
2035
|
*/
|
|
1806
|
-
const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
2036
|
+
export const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
1807
2037
|
return {
|
|
1808
2038
|
/**
|
|
1809
2039
|
* Retrieves all market ticker information.
|
|
@@ -1814,7 +2044,7 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1814
2044
|
getAllMarketTicker: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1815
2045
|
const localVarPath = `/v1/exchange/tickers`;
|
|
1816
2046
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1817
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2047
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1818
2048
|
let baseOptions;
|
|
1819
2049
|
if (configuration) {
|
|
1820
2050
|
baseOptions = configuration.baseOptions;
|
|
@@ -1822,11 +2052,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1822
2052
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1823
2053
|
const localVarHeaderParameter = {};
|
|
1824
2054
|
const localVarQueryParameter = {};
|
|
1825
|
-
|
|
2055
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1826
2056
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1827
2057
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1828
2058
|
return {
|
|
1829
|
-
url:
|
|
2059
|
+
url: toPathString(localVarUrlObj),
|
|
1830
2060
|
options: localVarRequestOptions,
|
|
1831
2061
|
};
|
|
1832
2062
|
}),
|
|
@@ -1835,7 +2065,7 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1835
2065
|
* @summary /exchange/candlesticks
|
|
1836
2066
|
* @param {string} symbol The market symbol to get the klines for.
|
|
1837
2067
|
* @param {KlineInterval} interval The interval to get the klines for.
|
|
1838
|
-
* @param {CandlePriceType} type Candle price type (last price, market price or
|
|
2068
|
+
* @param {CandlePriceType} type Candle price type (last price, market price, oracle or mark price).
|
|
1839
2069
|
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
1840
2070
|
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
1841
2071
|
* @param {number} [limit] Default 50; max 1000.
|
|
@@ -1845,14 +2075,14 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1845
2075
|
*/
|
|
1846
2076
|
getCandlestickData: (symbol_1, interval_1, type_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1) => __awaiter(this, [symbol_1, interval_1, type_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1], void 0, function* (symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options = {}) {
|
|
1847
2077
|
// verify required parameter 'symbol' is not null or undefined
|
|
1848
|
-
|
|
2078
|
+
assertParamExists('getCandlestickData', 'symbol', symbol);
|
|
1849
2079
|
// verify required parameter 'interval' is not null or undefined
|
|
1850
|
-
|
|
2080
|
+
assertParamExists('getCandlestickData', 'interval', interval);
|
|
1851
2081
|
// verify required parameter 'type' is not null or undefined
|
|
1852
|
-
|
|
2082
|
+
assertParamExists('getCandlestickData', 'type', type);
|
|
1853
2083
|
const localVarPath = `/v1/exchange/candlesticks`;
|
|
1854
2084
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1855
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2085
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1856
2086
|
let baseOptions;
|
|
1857
2087
|
if (configuration) {
|
|
1858
2088
|
baseOptions = configuration.baseOptions;
|
|
@@ -1881,11 +2111,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1881
2111
|
if (page !== undefined) {
|
|
1882
2112
|
localVarQueryParameter['page'] = page;
|
|
1883
2113
|
}
|
|
1884
|
-
|
|
2114
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1885
2115
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1886
2116
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1887
2117
|
return {
|
|
1888
|
-
url:
|
|
2118
|
+
url: toPathString(localVarUrlObj),
|
|
1889
2119
|
options: localVarRequestOptions,
|
|
1890
2120
|
};
|
|
1891
2121
|
}),
|
|
@@ -1898,7 +2128,7 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1898
2128
|
getCountry: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1899
2129
|
const localVarPath = `/v1/exchange/country`;
|
|
1900
2130
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1901
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2131
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1902
2132
|
let baseOptions;
|
|
1903
2133
|
if (configuration) {
|
|
1904
2134
|
baseOptions = configuration.baseOptions;
|
|
@@ -1906,11 +2136,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1906
2136
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1907
2137
|
const localVarHeaderParameter = {};
|
|
1908
2138
|
const localVarQueryParameter = {};
|
|
1909
|
-
|
|
2139
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1910
2140
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1911
2141
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1912
2142
|
return {
|
|
1913
|
-
url:
|
|
2143
|
+
url: toPathString(localVarUrlObj),
|
|
1914
2144
|
options: localVarRequestOptions,
|
|
1915
2145
|
};
|
|
1916
2146
|
}),
|
|
@@ -1923,7 +2153,7 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1923
2153
|
getExchangeInfo: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1924
2154
|
const localVarPath = `/v1/exchange/info`;
|
|
1925
2155
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1926
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2156
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1927
2157
|
let baseOptions;
|
|
1928
2158
|
if (configuration) {
|
|
1929
2159
|
baseOptions = configuration.baseOptions;
|
|
@@ -1931,11 +2161,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1931
2161
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1932
2162
|
const localVarHeaderParameter = {};
|
|
1933
2163
|
const localVarQueryParameter = {};
|
|
1934
|
-
|
|
2164
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1935
2165
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1936
2166
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1937
2167
|
return {
|
|
1938
|
-
url:
|
|
2168
|
+
url: toPathString(localVarUrlObj),
|
|
1939
2169
|
options: localVarRequestOptions,
|
|
1940
2170
|
};
|
|
1941
2171
|
}),
|
|
@@ -1953,7 +2183,7 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1953
2183
|
getExchangeStats: (interval_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1) => __awaiter(this, [interval_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1], void 0, function* (interval, startTimeAtMillis, endTimeAtMillis, limit, page, options = {}) {
|
|
1954
2184
|
const localVarPath = `/v1/exchange/stats`;
|
|
1955
2185
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1956
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2186
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1957
2187
|
let baseOptions;
|
|
1958
2188
|
if (configuration) {
|
|
1959
2189
|
baseOptions = configuration.baseOptions;
|
|
@@ -1976,11 +2206,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1976
2206
|
if (page !== undefined) {
|
|
1977
2207
|
localVarQueryParameter['page'] = page;
|
|
1978
2208
|
}
|
|
1979
|
-
|
|
2209
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1980
2210
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1981
2211
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1982
2212
|
return {
|
|
1983
|
-
url:
|
|
2213
|
+
url: toPathString(localVarUrlObj),
|
|
1984
2214
|
options: localVarRequestOptions,
|
|
1985
2215
|
};
|
|
1986
2216
|
}),
|
|
@@ -1993,7 +2223,7 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1993
2223
|
getExchangeStatsAllTime: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1994
2224
|
const localVarPath = `/v1/exchange/stats/allTime`;
|
|
1995
2225
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1996
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2226
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1997
2227
|
let baseOptions;
|
|
1998
2228
|
if (configuration) {
|
|
1999
2229
|
baseOptions = configuration.baseOptions;
|
|
@@ -2001,11 +2231,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2001
2231
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2002
2232
|
const localVarHeaderParameter = {};
|
|
2003
2233
|
const localVarQueryParameter = {};
|
|
2004
|
-
|
|
2234
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2005
2235
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2006
2236
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2007
2237
|
return {
|
|
2008
|
-
url:
|
|
2238
|
+
url: toPathString(localVarUrlObj),
|
|
2009
2239
|
options: localVarRequestOptions,
|
|
2010
2240
|
};
|
|
2011
2241
|
}),
|
|
@@ -2022,10 +2252,10 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2022
2252
|
*/
|
|
2023
2253
|
getFundingRateHistory: (symbol_1, limit_1, startTimeAtMillis_1, endTimeAtMillis_1, page_1, ...args_1) => __awaiter(this, [symbol_1, limit_1, startTimeAtMillis_1, endTimeAtMillis_1, page_1, ...args_1], void 0, function* (symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options = {}) {
|
|
2024
2254
|
// verify required parameter 'symbol' is not null or undefined
|
|
2025
|
-
|
|
2255
|
+
assertParamExists('getFundingRateHistory', 'symbol', symbol);
|
|
2026
2256
|
const localVarPath = `/v1/exchange/fundingRateHistory`;
|
|
2027
2257
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2028
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2258
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2029
2259
|
let baseOptions;
|
|
2030
2260
|
if (configuration) {
|
|
2031
2261
|
baseOptions = configuration.baseOptions;
|
|
@@ -2048,11 +2278,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2048
2278
|
if (page !== undefined) {
|
|
2049
2279
|
localVarQueryParameter['page'] = page;
|
|
2050
2280
|
}
|
|
2051
|
-
|
|
2281
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2052
2282
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2053
2283
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2054
2284
|
return {
|
|
2055
|
-
url:
|
|
2285
|
+
url: toPathString(localVarUrlObj),
|
|
2056
2286
|
options: localVarRequestOptions,
|
|
2057
2287
|
};
|
|
2058
2288
|
}),
|
|
@@ -2070,7 +2300,7 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2070
2300
|
getLeaderboard: (interval_1, sortBy_1, sortOrder_1, limit_1, page_1, ...args_1) => __awaiter(this, [interval_1, sortBy_1, sortOrder_1, limit_1, page_1, ...args_1], void 0, function* (interval, sortBy, sortOrder, limit, page, options = {}) {
|
|
2071
2301
|
const localVarPath = `/api/v1/accounts/leaderboard`;
|
|
2072
2302
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2073
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2303
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2074
2304
|
let baseOptions;
|
|
2075
2305
|
if (configuration) {
|
|
2076
2306
|
baseOptions = configuration.baseOptions;
|
|
@@ -2093,11 +2323,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2093
2323
|
if (page !== undefined) {
|
|
2094
2324
|
localVarQueryParameter['page'] = page;
|
|
2095
2325
|
}
|
|
2096
|
-
|
|
2326
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2097
2327
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2098
2328
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2099
2329
|
return {
|
|
2100
|
-
url:
|
|
2330
|
+
url: toPathString(localVarUrlObj),
|
|
2101
2331
|
options: localVarRequestOptions,
|
|
2102
2332
|
};
|
|
2103
2333
|
}),
|
|
@@ -2110,10 +2340,10 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2110
2340
|
*/
|
|
2111
2341
|
getMarketTicker: (symbol_1, ...args_1) => __awaiter(this, [symbol_1, ...args_1], void 0, function* (symbol, options = {}) {
|
|
2112
2342
|
// verify required parameter 'symbol' is not null or undefined
|
|
2113
|
-
|
|
2343
|
+
assertParamExists('getMarketTicker', 'symbol', symbol);
|
|
2114
2344
|
const localVarPath = `/v1/exchange/ticker`;
|
|
2115
2345
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2116
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2346
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2117
2347
|
let baseOptions;
|
|
2118
2348
|
if (configuration) {
|
|
2119
2349
|
baseOptions = configuration.baseOptions;
|
|
@@ -2124,11 +2354,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2124
2354
|
if (symbol !== undefined) {
|
|
2125
2355
|
localVarQueryParameter['symbol'] = symbol;
|
|
2126
2356
|
}
|
|
2127
|
-
|
|
2357
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2128
2358
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2129
2359
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2130
2360
|
return {
|
|
2131
|
-
url:
|
|
2361
|
+
url: toPathString(localVarUrlObj),
|
|
2132
2362
|
options: localVarRequestOptions,
|
|
2133
2363
|
};
|
|
2134
2364
|
}),
|
|
@@ -2142,10 +2372,10 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2142
2372
|
*/
|
|
2143
2373
|
getOrderbookDepth: (symbol_1, limit_1, ...args_1) => __awaiter(this, [symbol_1, limit_1, ...args_1], void 0, function* (symbol, limit, options = {}) {
|
|
2144
2374
|
// verify required parameter 'symbol' is not null or undefined
|
|
2145
|
-
|
|
2375
|
+
assertParamExists('getOrderbookDepth', 'symbol', symbol);
|
|
2146
2376
|
const localVarPath = `/v1/exchange/depth`;
|
|
2147
2377
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2148
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2378
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2149
2379
|
let baseOptions;
|
|
2150
2380
|
if (configuration) {
|
|
2151
2381
|
baseOptions = configuration.baseOptions;
|
|
@@ -2159,11 +2389,11 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2159
2389
|
if (limit !== undefined) {
|
|
2160
2390
|
localVarQueryParameter['limit'] = limit;
|
|
2161
2391
|
}
|
|
2162
|
-
|
|
2392
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2163
2393
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2164
2394
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2165
2395
|
return {
|
|
2166
|
-
url:
|
|
2396
|
+
url: toPathString(localVarUrlObj),
|
|
2167
2397
|
options: localVarRequestOptions,
|
|
2168
2398
|
};
|
|
2169
2399
|
}),
|
|
@@ -2181,10 +2411,10 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2181
2411
|
*/
|
|
2182
2412
|
getRecentTrades: (symbol_1, tradeType_1, limit_1, startTimeAtMillis_1, endTimeAtMillis_1, page_1, ...args_1) => __awaiter(this, [symbol_1, tradeType_1, limit_1, startTimeAtMillis_1, endTimeAtMillis_1, page_1, ...args_1], void 0, function* (symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options = {}) {
|
|
2183
2413
|
// verify required parameter 'symbol' is not null or undefined
|
|
2184
|
-
|
|
2414
|
+
assertParamExists('getRecentTrades', 'symbol', symbol);
|
|
2185
2415
|
const localVarPath = `/v1/exchange/trades`;
|
|
2186
2416
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2187
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2417
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2188
2418
|
let baseOptions;
|
|
2189
2419
|
if (configuration) {
|
|
2190
2420
|
baseOptions = configuration.baseOptions;
|
|
@@ -2210,23 +2440,22 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2210
2440
|
if (page !== undefined) {
|
|
2211
2441
|
localVarQueryParameter['page'] = page;
|
|
2212
2442
|
}
|
|
2213
|
-
|
|
2443
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2214
2444
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2215
2445
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2216
2446
|
return {
|
|
2217
|
-
url:
|
|
2447
|
+
url: toPathString(localVarUrlObj),
|
|
2218
2448
|
options: localVarRequestOptions,
|
|
2219
2449
|
};
|
|
2220
2450
|
}),
|
|
2221
2451
|
};
|
|
2222
2452
|
};
|
|
2223
|
-
exports.ExchangeApiAxiosParamCreator = ExchangeApiAxiosParamCreator;
|
|
2224
2453
|
/**
|
|
2225
2454
|
* ExchangeApi - functional programming interface
|
|
2226
2455
|
* @export
|
|
2227
2456
|
*/
|
|
2228
|
-
const ExchangeApiFp = function (configuration) {
|
|
2229
|
-
const localVarAxiosParamCreator =
|
|
2457
|
+
export const ExchangeApiFp = function (configuration) {
|
|
2458
|
+
const localVarAxiosParamCreator = ExchangeApiAxiosParamCreator(configuration);
|
|
2230
2459
|
return {
|
|
2231
2460
|
/**
|
|
2232
2461
|
* Retrieves all market ticker information.
|
|
@@ -2239,8 +2468,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2239
2468
|
var _a, _b, _c;
|
|
2240
2469
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllMarketTicker(options);
|
|
2241
2470
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2242
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2243
|
-
return (axios, basePath) =>
|
|
2471
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getAllMarketTicker']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2472
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2244
2473
|
});
|
|
2245
2474
|
},
|
|
2246
2475
|
/**
|
|
@@ -2248,7 +2477,7 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2248
2477
|
* @summary /exchange/candlesticks
|
|
2249
2478
|
* @param {string} symbol The market symbol to get the klines for.
|
|
2250
2479
|
* @param {KlineInterval} interval The interval to get the klines for.
|
|
2251
|
-
* @param {CandlePriceType} type Candle price type (last price, market price or
|
|
2480
|
+
* @param {CandlePriceType} type Candle price type (last price, market price, oracle or mark price).
|
|
2252
2481
|
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
2253
2482
|
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
2254
2483
|
* @param {number} [limit] Default 50; max 1000.
|
|
@@ -2261,8 +2490,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2261
2490
|
var _a, _b, _c;
|
|
2262
2491
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCandlestickData(symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options);
|
|
2263
2492
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2264
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2265
|
-
return (axios, basePath) =>
|
|
2493
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getCandlestickData']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2494
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2266
2495
|
});
|
|
2267
2496
|
},
|
|
2268
2497
|
/**
|
|
@@ -2276,8 +2505,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2276
2505
|
var _a, _b, _c;
|
|
2277
2506
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCountry(options);
|
|
2278
2507
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2279
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2280
|
-
return (axios, basePath) =>
|
|
2508
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getCountry']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2509
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2281
2510
|
});
|
|
2282
2511
|
},
|
|
2283
2512
|
/**
|
|
@@ -2291,8 +2520,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2291
2520
|
var _a, _b, _c;
|
|
2292
2521
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getExchangeInfo(options);
|
|
2293
2522
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2294
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2295
|
-
return (axios, basePath) =>
|
|
2523
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getExchangeInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2524
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2296
2525
|
});
|
|
2297
2526
|
},
|
|
2298
2527
|
/**
|
|
@@ -2311,8 +2540,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2311
2540
|
var _a, _b, _c;
|
|
2312
2541
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getExchangeStats(interval, startTimeAtMillis, endTimeAtMillis, limit, page, options);
|
|
2313
2542
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2314
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2315
|
-
return (axios, basePath) =>
|
|
2543
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getExchangeStats']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2544
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2316
2545
|
});
|
|
2317
2546
|
},
|
|
2318
2547
|
/**
|
|
@@ -2326,8 +2555,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2326
2555
|
var _a, _b, _c;
|
|
2327
2556
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getExchangeStatsAllTime(options);
|
|
2328
2557
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2329
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2330
|
-
return (axios, basePath) =>
|
|
2558
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getExchangeStatsAllTime']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2559
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2331
2560
|
});
|
|
2332
2561
|
},
|
|
2333
2562
|
/**
|
|
@@ -2346,8 +2575,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2346
2575
|
var _a, _b, _c;
|
|
2347
2576
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options);
|
|
2348
2577
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2349
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2350
|
-
return (axios, basePath) =>
|
|
2578
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getFundingRateHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2579
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2351
2580
|
});
|
|
2352
2581
|
},
|
|
2353
2582
|
/**
|
|
@@ -2366,8 +2595,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2366
2595
|
var _a, _b, _c;
|
|
2367
2596
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getLeaderboard(interval, sortBy, sortOrder, limit, page, options);
|
|
2368
2597
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2369
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2370
|
-
return (axios, basePath) =>
|
|
2598
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getLeaderboard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2599
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2371
2600
|
});
|
|
2372
2601
|
},
|
|
2373
2602
|
/**
|
|
@@ -2382,8 +2611,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2382
2611
|
var _a, _b, _c;
|
|
2383
2612
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getMarketTicker(symbol, options);
|
|
2384
2613
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2385
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2386
|
-
return (axios, basePath) =>
|
|
2614
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getMarketTicker']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2615
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2387
2616
|
});
|
|
2388
2617
|
},
|
|
2389
2618
|
/**
|
|
@@ -2399,8 +2628,8 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2399
2628
|
var _a, _b, _c;
|
|
2400
2629
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrderbookDepth(symbol, limit, options);
|
|
2401
2630
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2402
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2403
|
-
return (axios, basePath) =>
|
|
2631
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getOrderbookDepth']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2632
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2404
2633
|
});
|
|
2405
2634
|
},
|
|
2406
2635
|
/**
|
|
@@ -2420,19 +2649,18 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2420
2649
|
var _a, _b, _c;
|
|
2421
2650
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRecentTrades(symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options);
|
|
2422
2651
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2423
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
2424
|
-
return (axios, basePath) =>
|
|
2652
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExchangeApi.getRecentTrades']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2653
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2425
2654
|
});
|
|
2426
2655
|
},
|
|
2427
2656
|
};
|
|
2428
2657
|
};
|
|
2429
|
-
exports.ExchangeApiFp = ExchangeApiFp;
|
|
2430
2658
|
/**
|
|
2431
2659
|
* ExchangeApi - factory interface
|
|
2432
2660
|
* @export
|
|
2433
2661
|
*/
|
|
2434
|
-
const ExchangeApiFactory = function (configuration, basePath, axios) {
|
|
2435
|
-
const localVarFp =
|
|
2662
|
+
export const ExchangeApiFactory = function (configuration, basePath, axios) {
|
|
2663
|
+
const localVarFp = ExchangeApiFp(configuration);
|
|
2436
2664
|
return {
|
|
2437
2665
|
/**
|
|
2438
2666
|
* Retrieves all market ticker information.
|
|
@@ -2448,7 +2676,7 @@ const ExchangeApiFactory = function (configuration, basePath, axios) {
|
|
|
2448
2676
|
* @summary /exchange/candlesticks
|
|
2449
2677
|
* @param {string} symbol The market symbol to get the klines for.
|
|
2450
2678
|
* @param {KlineInterval} interval The interval to get the klines for.
|
|
2451
|
-
* @param {CandlePriceType} type Candle price type (last price, market price or
|
|
2679
|
+
* @param {CandlePriceType} type Candle price type (last price, market price, oracle or mark price).
|
|
2452
2680
|
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
2453
2681
|
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
2454
2682
|
* @param {number} [limit] Default 50; max 1000.
|
|
@@ -2566,14 +2794,13 @@ const ExchangeApiFactory = function (configuration, basePath, axios) {
|
|
|
2566
2794
|
},
|
|
2567
2795
|
};
|
|
2568
2796
|
};
|
|
2569
|
-
exports.ExchangeApiFactory = ExchangeApiFactory;
|
|
2570
2797
|
/**
|
|
2571
2798
|
* ExchangeApi - object-oriented interface
|
|
2572
2799
|
* @export
|
|
2573
2800
|
* @class ExchangeApi
|
|
2574
2801
|
* @extends {BaseAPI}
|
|
2575
2802
|
*/
|
|
2576
|
-
class ExchangeApi extends
|
|
2803
|
+
export class ExchangeApi extends BaseAPI {
|
|
2577
2804
|
/**
|
|
2578
2805
|
* Retrieves all market ticker information.
|
|
2579
2806
|
* @summary /exchange/tickers
|
|
@@ -2582,14 +2809,14 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2582
2809
|
* @memberof ExchangeApi
|
|
2583
2810
|
*/
|
|
2584
2811
|
getAllMarketTicker(options) {
|
|
2585
|
-
return
|
|
2812
|
+
return ExchangeApiFp(this.configuration).getAllMarketTicker(options).then((request) => request(this.axios, this.basePath));
|
|
2586
2813
|
}
|
|
2587
2814
|
/**
|
|
2588
2815
|
* Retrieves candle stick data for a market.
|
|
2589
2816
|
* @summary /exchange/candlesticks
|
|
2590
2817
|
* @param {string} symbol The market symbol to get the klines for.
|
|
2591
2818
|
* @param {KlineInterval} interval The interval to get the klines for.
|
|
2592
|
-
* @param {CandlePriceType} type Candle price type (last price, market price or
|
|
2819
|
+
* @param {CandlePriceType} type Candle price type (last price, market price, oracle or mark price).
|
|
2593
2820
|
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
2594
2821
|
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
2595
2822
|
* @param {number} [limit] Default 50; max 1000.
|
|
@@ -2599,7 +2826,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2599
2826
|
* @memberof ExchangeApi
|
|
2600
2827
|
*/
|
|
2601
2828
|
getCandlestickData(symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
2602
|
-
return
|
|
2829
|
+
return ExchangeApiFp(this.configuration).getCandlestickData(symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
2603
2830
|
}
|
|
2604
2831
|
/**
|
|
2605
2832
|
* Check if the country is geo restricted.
|
|
@@ -2609,7 +2836,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2609
2836
|
* @memberof ExchangeApi
|
|
2610
2837
|
*/
|
|
2611
2838
|
getCountry(options) {
|
|
2612
|
-
return
|
|
2839
|
+
return ExchangeApiFp(this.configuration).getCountry(options).then((request) => request(this.axios, this.basePath));
|
|
2613
2840
|
}
|
|
2614
2841
|
/**
|
|
2615
2842
|
* Returns the current exchange information including available margin assets, markets, and rules.
|
|
@@ -2619,7 +2846,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2619
2846
|
* @memberof ExchangeApi
|
|
2620
2847
|
*/
|
|
2621
2848
|
getExchangeInfo(options) {
|
|
2622
|
-
return
|
|
2849
|
+
return ExchangeApiFp(this.configuration).getExchangeInfo(options).then((request) => request(this.axios, this.basePath));
|
|
2623
2850
|
}
|
|
2624
2851
|
/**
|
|
2625
2852
|
* Retrieves exchange statistics.
|
|
@@ -2634,7 +2861,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2634
2861
|
* @memberof ExchangeApi
|
|
2635
2862
|
*/
|
|
2636
2863
|
getExchangeStats(interval, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
2637
|
-
return
|
|
2864
|
+
return ExchangeApiFp(this.configuration).getExchangeStats(interval, startTimeAtMillis, endTimeAtMillis, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
2638
2865
|
}
|
|
2639
2866
|
/**
|
|
2640
2867
|
* Retrieves all time exchange statistics.
|
|
@@ -2644,7 +2871,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2644
2871
|
* @memberof ExchangeApi
|
|
2645
2872
|
*/
|
|
2646
2873
|
getExchangeStatsAllTime(options) {
|
|
2647
|
-
return
|
|
2874
|
+
return ExchangeApiFp(this.configuration).getExchangeStatsAllTime(options).then((request) => request(this.axios, this.basePath));
|
|
2648
2875
|
}
|
|
2649
2876
|
/**
|
|
2650
2877
|
* Retrieve the funding rate history for a specific market address.
|
|
@@ -2659,7 +2886,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2659
2886
|
* @memberof ExchangeApi
|
|
2660
2887
|
*/
|
|
2661
2888
|
getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
2662
|
-
return
|
|
2889
|
+
return ExchangeApiFp(this.configuration).getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options).then((request) => request(this.axios, this.basePath));
|
|
2663
2890
|
}
|
|
2664
2891
|
/**
|
|
2665
2892
|
* Retrieves the leaderboard of traders based on their performance.
|
|
@@ -2674,7 +2901,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2674
2901
|
* @memberof ExchangeApi
|
|
2675
2902
|
*/
|
|
2676
2903
|
getLeaderboard(interval, sortBy, sortOrder, limit, page, options) {
|
|
2677
|
-
return
|
|
2904
|
+
return ExchangeApiFp(this.configuration).getLeaderboard(interval, sortBy, sortOrder, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
2678
2905
|
}
|
|
2679
2906
|
/**
|
|
2680
2907
|
* Retrieves aggregated ticker data for a market.
|
|
@@ -2685,7 +2912,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2685
2912
|
* @memberof ExchangeApi
|
|
2686
2913
|
*/
|
|
2687
2914
|
getMarketTicker(symbol, options) {
|
|
2688
|
-
return
|
|
2915
|
+
return ExchangeApiFp(this.configuration).getMarketTicker(symbol, options).then((request) => request(this.axios, this.basePath));
|
|
2689
2916
|
}
|
|
2690
2917
|
/**
|
|
2691
2918
|
* Returns the current state of the orderbook.
|
|
@@ -2697,7 +2924,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2697
2924
|
* @memberof ExchangeApi
|
|
2698
2925
|
*/
|
|
2699
2926
|
getOrderbookDepth(symbol, limit, options) {
|
|
2700
|
-
return
|
|
2927
|
+
return ExchangeApiFp(this.configuration).getOrderbookDepth(symbol, limit, options).then((request) => request(this.axios, this.basePath));
|
|
2701
2928
|
}
|
|
2702
2929
|
/**
|
|
2703
2930
|
* Retrieves recent trades executed on a market.
|
|
@@ -2713,14 +2940,13 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2713
2940
|
* @memberof ExchangeApi
|
|
2714
2941
|
*/
|
|
2715
2942
|
getRecentTrades(symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
2716
|
-
return
|
|
2943
|
+
return ExchangeApiFp(this.configuration).getRecentTrades(symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options).then((request) => request(this.axios, this.basePath));
|
|
2717
2944
|
}
|
|
2718
2945
|
}
|
|
2719
|
-
exports.ExchangeApi = ExchangeApi;
|
|
2720
2946
|
/**
|
|
2721
2947
|
* @export
|
|
2722
2948
|
*/
|
|
2723
|
-
|
|
2949
|
+
export const GetLeaderboardSortByEnum = {
|
|
2724
2950
|
GetLeaderboardSortByAccountValue: 'accountValue',
|
|
2725
2951
|
GetLeaderboardSortByPnL: 'pnl',
|
|
2726
2952
|
GetLeaderboardSortByVolume: 'volume',
|
|
@@ -2730,7 +2956,7 @@ exports.GetLeaderboardSortByEnum = {
|
|
|
2730
2956
|
* RewardsApi - axios parameter creator
|
|
2731
2957
|
* @export
|
|
2732
2958
|
*/
|
|
2733
|
-
const RewardsApiAxiosParamCreator = function (configuration) {
|
|
2959
|
+
export const RewardsApiAxiosParamCreator = function (configuration) {
|
|
2734
2960
|
return {
|
|
2735
2961
|
/**
|
|
2736
2962
|
* Returns detailed earnings breakdown for an affiliate by interval, ordered by interval number in descending order.
|
|
@@ -2743,10 +2969,10 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2743
2969
|
*/
|
|
2744
2970
|
getAffiliateIntervalOverview: (userAddress_1, page_1, limit_1, ...args_1) => __awaiter(this, [userAddress_1, page_1, limit_1, ...args_1], void 0, function* (userAddress, page, limit, options = {}) {
|
|
2745
2971
|
// verify required parameter 'userAddress' is not null or undefined
|
|
2746
|
-
|
|
2972
|
+
assertParamExists('getAffiliateIntervalOverview', 'userAddress', userAddress);
|
|
2747
2973
|
const localVarPath = `/v1/rewards/affiliate/intervalOverview`;
|
|
2748
2974
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2749
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
2975
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2750
2976
|
let baseOptions;
|
|
2751
2977
|
if (configuration) {
|
|
2752
2978
|
baseOptions = configuration.baseOptions;
|
|
@@ -2763,11 +2989,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2763
2989
|
if (limit !== undefined) {
|
|
2764
2990
|
localVarQueryParameter['limit'] = limit;
|
|
2765
2991
|
}
|
|
2766
|
-
|
|
2992
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2767
2993
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2768
2994
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2769
2995
|
return {
|
|
2770
|
-
url:
|
|
2996
|
+
url: toPathString(localVarUrlObj),
|
|
2771
2997
|
options: localVarRequestOptions,
|
|
2772
2998
|
};
|
|
2773
2999
|
}),
|
|
@@ -2785,7 +3011,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2785
3011
|
getAffiliateLeaderDashboard: (sortBy_1, sortOrder_1, page_1, limit_1, search_1, ...args_1) => __awaiter(this, [sortBy_1, sortOrder_1, page_1, limit_1, search_1, ...args_1], void 0, function* (sortBy, sortOrder, page, limit, search, options = {}) {
|
|
2786
3012
|
const localVarPath = `/v1/rewards/affiliate/leaderDashboard`;
|
|
2787
3013
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2788
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3014
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2789
3015
|
let baseOptions;
|
|
2790
3016
|
if (configuration) {
|
|
2791
3017
|
baseOptions = configuration.baseOptions;
|
|
@@ -2808,11 +3034,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2808
3034
|
if (search !== undefined) {
|
|
2809
3035
|
localVarQueryParameter['search'] = search;
|
|
2810
3036
|
}
|
|
2811
|
-
|
|
3037
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2812
3038
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2813
3039
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2814
3040
|
return {
|
|
2815
|
-
url:
|
|
3041
|
+
url: toPathString(localVarUrlObj),
|
|
2816
3042
|
options: localVarRequestOptions,
|
|
2817
3043
|
};
|
|
2818
3044
|
}),
|
|
@@ -2825,10 +3051,10 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2825
3051
|
*/
|
|
2826
3052
|
getAffiliateMetadata: (userAddress_1, ...args_1) => __awaiter(this, [userAddress_1, ...args_1], void 0, function* (userAddress, options = {}) {
|
|
2827
3053
|
// verify required parameter 'userAddress' is not null or undefined
|
|
2828
|
-
|
|
3054
|
+
assertParamExists('getAffiliateMetadata', 'userAddress', userAddress);
|
|
2829
3055
|
const localVarPath = `/v1/rewards/affiliate`;
|
|
2830
3056
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2831
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3057
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2832
3058
|
let baseOptions;
|
|
2833
3059
|
if (configuration) {
|
|
2834
3060
|
baseOptions = configuration.baseOptions;
|
|
@@ -2839,11 +3065,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2839
3065
|
if (userAddress !== undefined) {
|
|
2840
3066
|
localVarQueryParameter['userAddress'] = userAddress;
|
|
2841
3067
|
}
|
|
2842
|
-
|
|
3068
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2843
3069
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2844
3070
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2845
3071
|
return {
|
|
2846
|
-
url:
|
|
3072
|
+
url: toPathString(localVarUrlObj),
|
|
2847
3073
|
options: localVarRequestOptions,
|
|
2848
3074
|
};
|
|
2849
3075
|
}),
|
|
@@ -2862,10 +3088,10 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2862
3088
|
*/
|
|
2863
3089
|
getAffiliateOverview: (userAddress_1, page_1, limit_1, sortBy_1, sortOrder_1, search_1, minEarningsE9_1, ...args_1) => __awaiter(this, [userAddress_1, page_1, limit_1, sortBy_1, sortOrder_1, search_1, minEarningsE9_1, ...args_1], void 0, function* (userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options = {}) {
|
|
2864
3090
|
// verify required parameter 'userAddress' is not null or undefined
|
|
2865
|
-
|
|
3091
|
+
assertParamExists('getAffiliateOverview', 'userAddress', userAddress);
|
|
2866
3092
|
const localVarPath = `/v1/rewards/affiliate/overview`;
|
|
2867
3093
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2868
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3094
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2869
3095
|
let baseOptions;
|
|
2870
3096
|
if (configuration) {
|
|
2871
3097
|
baseOptions = configuration.baseOptions;
|
|
@@ -2894,11 +3120,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2894
3120
|
if (minEarningsE9 !== undefined) {
|
|
2895
3121
|
localVarQueryParameter['minEarningsE9'] = minEarningsE9;
|
|
2896
3122
|
}
|
|
2897
|
-
|
|
3123
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2898
3124
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2899
3125
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2900
3126
|
return {
|
|
2901
|
-
url:
|
|
3127
|
+
url: toPathString(localVarUrlObj),
|
|
2902
3128
|
options: localVarRequestOptions,
|
|
2903
3129
|
};
|
|
2904
3130
|
}),
|
|
@@ -2911,10 +3137,10 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2911
3137
|
*/
|
|
2912
3138
|
getAffiliateSummary: (userAddress_1, ...args_1) => __awaiter(this, [userAddress_1, ...args_1], void 0, function* (userAddress, options = {}) {
|
|
2913
3139
|
// verify required parameter 'userAddress' is not null or undefined
|
|
2914
|
-
|
|
3140
|
+
assertParamExists('getAffiliateSummary', 'userAddress', userAddress);
|
|
2915
3141
|
const localVarPath = `/v1/rewards/affiliate/summary`;
|
|
2916
3142
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2917
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3143
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2918
3144
|
let baseOptions;
|
|
2919
3145
|
if (configuration) {
|
|
2920
3146
|
baseOptions = configuration.baseOptions;
|
|
@@ -2925,11 +3151,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2925
3151
|
if (userAddress !== undefined) {
|
|
2926
3152
|
localVarQueryParameter['userAddress'] = userAddress;
|
|
2927
3153
|
}
|
|
2928
|
-
|
|
3154
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2929
3155
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2930
3156
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2931
3157
|
return {
|
|
2932
|
-
url:
|
|
3158
|
+
url: toPathString(localVarUrlObj),
|
|
2933
3159
|
options: localVarRequestOptions,
|
|
2934
3160
|
};
|
|
2935
3161
|
}),
|
|
@@ -2944,12 +3170,12 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2944
3170
|
*/
|
|
2945
3171
|
getCampaignRewards: (campaignName_1, userAddress_1, epochNumber_1, ...args_1) => __awaiter(this, [campaignName_1, userAddress_1, epochNumber_1, ...args_1], void 0, function* (campaignName, userAddress, epochNumber, options = {}) {
|
|
2946
3172
|
// verify required parameter 'campaignName' is not null or undefined
|
|
2947
|
-
|
|
3173
|
+
assertParamExists('getCampaignRewards', 'campaignName', campaignName);
|
|
2948
3174
|
// verify required parameter 'userAddress' is not null or undefined
|
|
2949
|
-
|
|
3175
|
+
assertParamExists('getCampaignRewards', 'userAddress', userAddress);
|
|
2950
3176
|
const localVarPath = `/v1/rewards/campaign`;
|
|
2951
3177
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2952
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3178
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2953
3179
|
let baseOptions;
|
|
2954
3180
|
if (configuration) {
|
|
2955
3181
|
baseOptions = configuration.baseOptions;
|
|
@@ -2966,11 +3192,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2966
3192
|
if (userAddress !== undefined) {
|
|
2967
3193
|
localVarQueryParameter['userAddress'] = userAddress;
|
|
2968
3194
|
}
|
|
2969
|
-
|
|
3195
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2970
3196
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2971
3197
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2972
3198
|
return {
|
|
2973
|
-
url:
|
|
3199
|
+
url: toPathString(localVarUrlObj),
|
|
2974
3200
|
options: localVarRequestOptions,
|
|
2975
3201
|
};
|
|
2976
3202
|
}),
|
|
@@ -2983,7 +3209,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2983
3209
|
getContractConfig: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2984
3210
|
const localVarPath = `/v1/rewards/contract/config`;
|
|
2985
3211
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2986
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3212
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2987
3213
|
let baseOptions;
|
|
2988
3214
|
if (configuration) {
|
|
2989
3215
|
baseOptions = configuration.baseOptions;
|
|
@@ -2991,11 +3217,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2991
3217
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2992
3218
|
const localVarHeaderParameter = {};
|
|
2993
3219
|
const localVarQueryParameter = {};
|
|
2994
|
-
|
|
3220
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2995
3221
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2996
3222
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2997
3223
|
return {
|
|
2998
|
-
url:
|
|
3224
|
+
url: toPathString(localVarUrlObj),
|
|
2999
3225
|
options: localVarRequestOptions,
|
|
3000
3226
|
};
|
|
3001
3227
|
}),
|
|
@@ -3009,7 +3235,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3009
3235
|
getRewards: (intervalNumber_1, ...args_1) => __awaiter(this, [intervalNumber_1, ...args_1], void 0, function* (intervalNumber, options = {}) {
|
|
3010
3236
|
const localVarPath = `/v1/rewards`;
|
|
3011
3237
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3012
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3238
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3013
3239
|
let baseOptions;
|
|
3014
3240
|
if (configuration) {
|
|
3015
3241
|
baseOptions = configuration.baseOptions;
|
|
@@ -3019,15 +3245,15 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3019
3245
|
const localVarQueryParameter = {};
|
|
3020
3246
|
// authentication bearerAuth required
|
|
3021
3247
|
// http bearer authentication required
|
|
3022
|
-
yield
|
|
3248
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3023
3249
|
if (intervalNumber !== undefined) {
|
|
3024
3250
|
localVarQueryParameter['intervalNumber'] = intervalNumber;
|
|
3025
3251
|
}
|
|
3026
|
-
|
|
3252
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3027
3253
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3028
3254
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3029
3255
|
return {
|
|
3030
|
-
url:
|
|
3256
|
+
url: toPathString(localVarUrlObj),
|
|
3031
3257
|
options: localVarRequestOptions,
|
|
3032
3258
|
};
|
|
3033
3259
|
}),
|
|
@@ -3042,7 +3268,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3042
3268
|
getRewardsCampaignMetadata: (campaignName_1, status_1, ...args_1) => __awaiter(this, [campaignName_1, status_1, ...args_1], void 0, function* (campaignName, status, options = {}) {
|
|
3043
3269
|
const localVarPath = `/v1/rewards/metadata/campaign`;
|
|
3044
3270
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3045
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3271
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3046
3272
|
let baseOptions;
|
|
3047
3273
|
if (configuration) {
|
|
3048
3274
|
baseOptions = configuration.baseOptions;
|
|
@@ -3056,11 +3282,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3056
3282
|
if (status !== undefined) {
|
|
3057
3283
|
localVarQueryParameter['Status'] = status;
|
|
3058
3284
|
}
|
|
3059
|
-
|
|
3285
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3060
3286
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3061
3287
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3062
3288
|
return {
|
|
3063
|
-
url:
|
|
3289
|
+
url: toPathString(localVarUrlObj),
|
|
3064
3290
|
options: localVarRequestOptions,
|
|
3065
3291
|
};
|
|
3066
3292
|
}),
|
|
@@ -3074,7 +3300,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3074
3300
|
getRewardsEpochConfigMetadata: (intervalNumber_1, ...args_1) => __awaiter(this, [intervalNumber_1, ...args_1], void 0, function* (intervalNumber, options = {}) {
|
|
3075
3301
|
const localVarPath = `/v1/rewards/metadata/epoch/configs`;
|
|
3076
3302
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3077
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3303
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3078
3304
|
let baseOptions;
|
|
3079
3305
|
if (configuration) {
|
|
3080
3306
|
baseOptions = configuration.baseOptions;
|
|
@@ -3085,11 +3311,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3085
3311
|
if (intervalNumber !== undefined) {
|
|
3086
3312
|
localVarQueryParameter['intervalNumber'] = intervalNumber;
|
|
3087
3313
|
}
|
|
3088
|
-
|
|
3314
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3089
3315
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3090
3316
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3091
3317
|
return {
|
|
3092
|
-
url:
|
|
3318
|
+
url: toPathString(localVarUrlObj),
|
|
3093
3319
|
options: localVarRequestOptions,
|
|
3094
3320
|
};
|
|
3095
3321
|
}),
|
|
@@ -3104,7 +3330,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3104
3330
|
getRewardsEpochMetadata: (campaignName_1, epoch_1, ...args_1) => __awaiter(this, [campaignName_1, epoch_1, ...args_1], void 0, function* (campaignName, epoch, options = {}) {
|
|
3105
3331
|
const localVarPath = `/v1/rewards/metadata/epoch`;
|
|
3106
3332
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3107
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3333
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3108
3334
|
let baseOptions;
|
|
3109
3335
|
if (configuration) {
|
|
3110
3336
|
baseOptions = configuration.baseOptions;
|
|
@@ -3118,11 +3344,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3118
3344
|
if (epoch !== undefined) {
|
|
3119
3345
|
localVarQueryParameter['epoch'] = epoch;
|
|
3120
3346
|
}
|
|
3121
|
-
|
|
3347
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3122
3348
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3123
3349
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3124
3350
|
return {
|
|
3125
|
-
url:
|
|
3351
|
+
url: toPathString(localVarUrlObj),
|
|
3126
3352
|
options: localVarRequestOptions,
|
|
3127
3353
|
};
|
|
3128
3354
|
}),
|
|
@@ -3136,7 +3362,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3136
3362
|
getRewardsIntervalMetadata: (interval_1, ...args_1) => __awaiter(this, [interval_1, ...args_1], void 0, function* (interval, options = {}) {
|
|
3137
3363
|
const localVarPath = `/v1/rewards/metadata/interval`;
|
|
3138
3364
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3139
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3365
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3140
3366
|
let baseOptions;
|
|
3141
3367
|
if (configuration) {
|
|
3142
3368
|
baseOptions = configuration.baseOptions;
|
|
@@ -3147,11 +3373,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3147
3373
|
if (interval !== undefined) {
|
|
3148
3374
|
localVarQueryParameter['interval'] = interval;
|
|
3149
3375
|
}
|
|
3150
|
-
|
|
3376
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3151
3377
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3152
3378
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3153
3379
|
return {
|
|
3154
|
-
url:
|
|
3380
|
+
url: toPathString(localVarUrlObj),
|
|
3155
3381
|
options: localVarRequestOptions,
|
|
3156
3382
|
};
|
|
3157
3383
|
}),
|
|
@@ -3164,7 +3390,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3164
3390
|
getRewardsSummary: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
3165
3391
|
const localVarPath = `/v1/rewards/summary`;
|
|
3166
3392
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3167
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3393
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3168
3394
|
let baseOptions;
|
|
3169
3395
|
if (configuration) {
|
|
3170
3396
|
baseOptions = configuration.baseOptions;
|
|
@@ -3174,12 +3400,12 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3174
3400
|
const localVarQueryParameter = {};
|
|
3175
3401
|
// authentication bearerAuth required
|
|
3176
3402
|
// http bearer authentication required
|
|
3177
|
-
yield
|
|
3178
|
-
|
|
3403
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3404
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3179
3405
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3180
3406
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3181
3407
|
return {
|
|
3182
|
-
url:
|
|
3408
|
+
url: toPathString(localVarUrlObj),
|
|
3183
3409
|
options: localVarRequestOptions,
|
|
3184
3410
|
};
|
|
3185
3411
|
}),
|
|
@@ -3192,10 +3418,10 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3192
3418
|
*/
|
|
3193
3419
|
markAsClaimed: (markAsClaimedRequest_1, ...args_1) => __awaiter(this, [markAsClaimedRequest_1, ...args_1], void 0, function* (markAsClaimedRequest, options = {}) {
|
|
3194
3420
|
// verify required parameter 'markAsClaimedRequest' is not null or undefined
|
|
3195
|
-
|
|
3421
|
+
assertParamExists('markAsClaimed', 'markAsClaimedRequest', markAsClaimedRequest);
|
|
3196
3422
|
const localVarPath = `/v1/rewards/claims/mark-claimed`;
|
|
3197
3423
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3198
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3424
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3199
3425
|
let baseOptions;
|
|
3200
3426
|
if (configuration) {
|
|
3201
3427
|
baseOptions = configuration.baseOptions;
|
|
@@ -3205,14 +3431,14 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3205
3431
|
const localVarQueryParameter = {};
|
|
3206
3432
|
// authentication bearerAuth required
|
|
3207
3433
|
// http bearer authentication required
|
|
3208
|
-
yield
|
|
3434
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3209
3435
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3210
|
-
|
|
3436
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3211
3437
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3212
3438
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3213
|
-
localVarRequestOptions.data =
|
|
3439
|
+
localVarRequestOptions.data = serializeDataIfNeeded(markAsClaimedRequest, localVarRequestOptions, configuration);
|
|
3214
3440
|
return {
|
|
3215
|
-
url:
|
|
3441
|
+
url: toPathString(localVarUrlObj),
|
|
3216
3442
|
options: localVarRequestOptions,
|
|
3217
3443
|
};
|
|
3218
3444
|
}),
|
|
@@ -3225,10 +3451,10 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3225
3451
|
*/
|
|
3226
3452
|
onboardAffiliate: (onboardAffiliateRequest_1, ...args_1) => __awaiter(this, [onboardAffiliateRequest_1, ...args_1], void 0, function* (onboardAffiliateRequest, options = {}) {
|
|
3227
3453
|
// verify required parameter 'onboardAffiliateRequest' is not null or undefined
|
|
3228
|
-
|
|
3454
|
+
assertParamExists('onboardAffiliate', 'onboardAffiliateRequest', onboardAffiliateRequest);
|
|
3229
3455
|
const localVarPath = `/v1/rewards/affiliate/onboard`;
|
|
3230
3456
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3231
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3457
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3232
3458
|
let baseOptions;
|
|
3233
3459
|
if (configuration) {
|
|
3234
3460
|
baseOptions = configuration.baseOptions;
|
|
@@ -3238,14 +3464,14 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3238
3464
|
const localVarQueryParameter = {};
|
|
3239
3465
|
// authentication bearerAuth required
|
|
3240
3466
|
// http bearer authentication required
|
|
3241
|
-
yield
|
|
3467
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3242
3468
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3243
|
-
|
|
3469
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3244
3470
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3245
3471
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3246
|
-
localVarRequestOptions.data =
|
|
3472
|
+
localVarRequestOptions.data = serializeDataIfNeeded(onboardAffiliateRequest, localVarRequestOptions, configuration);
|
|
3247
3473
|
return {
|
|
3248
|
-
url:
|
|
3474
|
+
url: toPathString(localVarUrlObj),
|
|
3249
3475
|
options: localVarRequestOptions,
|
|
3250
3476
|
};
|
|
3251
3477
|
}),
|
|
@@ -3258,10 +3484,10 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3258
3484
|
*/
|
|
3259
3485
|
onboardReferee: (onboardRefereeRequest_1, ...args_1) => __awaiter(this, [onboardRefereeRequest_1, ...args_1], void 0, function* (onboardRefereeRequest, options = {}) {
|
|
3260
3486
|
// verify required parameter 'onboardRefereeRequest' is not null or undefined
|
|
3261
|
-
|
|
3487
|
+
assertParamExists('onboardReferee', 'onboardRefereeRequest', onboardRefereeRequest);
|
|
3262
3488
|
const localVarPath = `/v1/rewards/affiliate/onboard/referee`;
|
|
3263
3489
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3264
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3490
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3265
3491
|
let baseOptions;
|
|
3266
3492
|
if (configuration) {
|
|
3267
3493
|
baseOptions = configuration.baseOptions;
|
|
@@ -3271,14 +3497,14 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3271
3497
|
const localVarQueryParameter = {};
|
|
3272
3498
|
// authentication bearerAuth required
|
|
3273
3499
|
// http bearer authentication required
|
|
3274
|
-
yield
|
|
3500
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3275
3501
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3276
|
-
|
|
3502
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3277
3503
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3278
3504
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3279
|
-
localVarRequestOptions.data =
|
|
3505
|
+
localVarRequestOptions.data = serializeDataIfNeeded(onboardRefereeRequest, localVarRequestOptions, configuration);
|
|
3280
3506
|
return {
|
|
3281
|
-
url:
|
|
3507
|
+
url: toPathString(localVarUrlObj),
|
|
3282
3508
|
options: localVarRequestOptions,
|
|
3283
3509
|
};
|
|
3284
3510
|
}),
|
|
@@ -3291,10 +3517,10 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3291
3517
|
*/
|
|
3292
3518
|
updateAffiliateEmberRefferalShare: (updateAffiliateEmberRefferalShareRequest_1, ...args_1) => __awaiter(this, [updateAffiliateEmberRefferalShareRequest_1, ...args_1], void 0, function* (updateAffiliateEmberRefferalShareRequest, options = {}) {
|
|
3293
3519
|
// verify required parameter 'updateAffiliateEmberRefferalShareRequest' is not null or undefined
|
|
3294
|
-
|
|
3520
|
+
assertParamExists('updateAffiliateEmberRefferalShare', 'updateAffiliateEmberRefferalShareRequest', updateAffiliateEmberRefferalShareRequest);
|
|
3295
3521
|
const localVarPath = `/v1/rewards/affiliate/emberRefferalShare`;
|
|
3296
3522
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3297
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3523
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3298
3524
|
let baseOptions;
|
|
3299
3525
|
if (configuration) {
|
|
3300
3526
|
baseOptions = configuration.baseOptions;
|
|
@@ -3304,14 +3530,14 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3304
3530
|
const localVarQueryParameter = {};
|
|
3305
3531
|
// authentication bearerAuth required
|
|
3306
3532
|
// http bearer authentication required
|
|
3307
|
-
yield
|
|
3533
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3308
3534
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3309
|
-
|
|
3535
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3310
3536
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3311
3537
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3312
|
-
localVarRequestOptions.data =
|
|
3538
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateAffiliateEmberRefferalShareRequest, localVarRequestOptions, configuration);
|
|
3313
3539
|
return {
|
|
3314
|
-
url:
|
|
3540
|
+
url: toPathString(localVarUrlObj),
|
|
3315
3541
|
options: localVarRequestOptions,
|
|
3316
3542
|
};
|
|
3317
3543
|
}),
|
|
@@ -3324,10 +3550,10 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3324
3550
|
*/
|
|
3325
3551
|
updateAffiliateFeeConfig: (updateAffiliateFeeConfigRequest_1, ...args_1) => __awaiter(this, [updateAffiliateFeeConfigRequest_1, ...args_1], void 0, function* (updateAffiliateFeeConfigRequest, options = {}) {
|
|
3326
3552
|
// verify required parameter 'updateAffiliateFeeConfigRequest' is not null or undefined
|
|
3327
|
-
|
|
3553
|
+
assertParamExists('updateAffiliateFeeConfig', 'updateAffiliateFeeConfigRequest', updateAffiliateFeeConfigRequest);
|
|
3328
3554
|
const localVarPath = `/v1/rewards/affiliate/feeConfig`;
|
|
3329
3555
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3330
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
3556
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3331
3557
|
let baseOptions;
|
|
3332
3558
|
if (configuration) {
|
|
3333
3559
|
baseOptions = configuration.baseOptions;
|
|
@@ -3337,26 +3563,25 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
3337
3563
|
const localVarQueryParameter = {};
|
|
3338
3564
|
// authentication bearerAuth required
|
|
3339
3565
|
// http bearer authentication required
|
|
3340
|
-
yield
|
|
3566
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3341
3567
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3342
|
-
|
|
3568
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3343
3569
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3344
3570
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3345
|
-
localVarRequestOptions.data =
|
|
3571
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateAffiliateFeeConfigRequest, localVarRequestOptions, configuration);
|
|
3346
3572
|
return {
|
|
3347
|
-
url:
|
|
3573
|
+
url: toPathString(localVarUrlObj),
|
|
3348
3574
|
options: localVarRequestOptions,
|
|
3349
3575
|
};
|
|
3350
3576
|
}),
|
|
3351
3577
|
};
|
|
3352
3578
|
};
|
|
3353
|
-
exports.RewardsApiAxiosParamCreator = RewardsApiAxiosParamCreator;
|
|
3354
3579
|
/**
|
|
3355
3580
|
* RewardsApi - functional programming interface
|
|
3356
3581
|
* @export
|
|
3357
3582
|
*/
|
|
3358
|
-
const RewardsApiFp = function (configuration) {
|
|
3359
|
-
const localVarAxiosParamCreator =
|
|
3583
|
+
export const RewardsApiFp = function (configuration) {
|
|
3584
|
+
const localVarAxiosParamCreator = RewardsApiAxiosParamCreator(configuration);
|
|
3360
3585
|
return {
|
|
3361
3586
|
/**
|
|
3362
3587
|
* Returns detailed earnings breakdown for an affiliate by interval, ordered by interval number in descending order.
|
|
@@ -3372,8 +3597,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3372
3597
|
var _a, _b, _c;
|
|
3373
3598
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateIntervalOverview(userAddress, page, limit, options);
|
|
3374
3599
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3375
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3376
|
-
return (axios, basePath) =>
|
|
3600
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getAffiliateIntervalOverview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3601
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3377
3602
|
});
|
|
3378
3603
|
},
|
|
3379
3604
|
/**
|
|
@@ -3392,8 +3617,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3392
3617
|
var _a, _b, _c;
|
|
3393
3618
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options);
|
|
3394
3619
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3395
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3396
|
-
return (axios, basePath) =>
|
|
3620
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getAffiliateLeaderDashboard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3621
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3397
3622
|
});
|
|
3398
3623
|
},
|
|
3399
3624
|
/**
|
|
@@ -3408,8 +3633,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3408
3633
|
var _a, _b, _c;
|
|
3409
3634
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateMetadata(userAddress, options);
|
|
3410
3635
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3411
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3412
|
-
return (axios, basePath) =>
|
|
3636
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getAffiliateMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3637
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3413
3638
|
});
|
|
3414
3639
|
},
|
|
3415
3640
|
/**
|
|
@@ -3430,8 +3655,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3430
3655
|
var _a, _b, _c;
|
|
3431
3656
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options);
|
|
3432
3657
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3433
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3434
|
-
return (axios, basePath) =>
|
|
3658
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getAffiliateOverview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3659
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3435
3660
|
});
|
|
3436
3661
|
},
|
|
3437
3662
|
/**
|
|
@@ -3446,8 +3671,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3446
3671
|
var _a, _b, _c;
|
|
3447
3672
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateSummary(userAddress, options);
|
|
3448
3673
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3449
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3450
|
-
return (axios, basePath) =>
|
|
3674
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getAffiliateSummary']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3675
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3451
3676
|
});
|
|
3452
3677
|
},
|
|
3453
3678
|
/**
|
|
@@ -3464,8 +3689,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3464
3689
|
var _a, _b, _c;
|
|
3465
3690
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCampaignRewards(campaignName, userAddress, epochNumber, options);
|
|
3466
3691
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3467
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3468
|
-
return (axios, basePath) =>
|
|
3692
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getCampaignRewards']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3693
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3469
3694
|
});
|
|
3470
3695
|
},
|
|
3471
3696
|
/**
|
|
@@ -3479,8 +3704,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3479
3704
|
var _a, _b, _c;
|
|
3480
3705
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getContractConfig(options);
|
|
3481
3706
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3482
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3483
|
-
return (axios, basePath) =>
|
|
3707
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getContractConfig']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3708
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3484
3709
|
});
|
|
3485
3710
|
},
|
|
3486
3711
|
/**
|
|
@@ -3495,8 +3720,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3495
3720
|
var _a, _b, _c;
|
|
3496
3721
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewards(intervalNumber, options);
|
|
3497
3722
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3498
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3499
|
-
return (axios, basePath) =>
|
|
3723
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getRewards']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3724
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3500
3725
|
});
|
|
3501
3726
|
},
|
|
3502
3727
|
/**
|
|
@@ -3512,8 +3737,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3512
3737
|
var _a, _b, _c;
|
|
3513
3738
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsCampaignMetadata(campaignName, status, options);
|
|
3514
3739
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3515
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3516
|
-
return (axios, basePath) =>
|
|
3740
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getRewardsCampaignMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3741
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3517
3742
|
});
|
|
3518
3743
|
},
|
|
3519
3744
|
/**
|
|
@@ -3528,8 +3753,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3528
3753
|
var _a, _b, _c;
|
|
3529
3754
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsEpochConfigMetadata(intervalNumber, options);
|
|
3530
3755
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3531
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3532
|
-
return (axios, basePath) =>
|
|
3756
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getRewardsEpochConfigMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3757
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3533
3758
|
});
|
|
3534
3759
|
},
|
|
3535
3760
|
/**
|
|
@@ -3545,8 +3770,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3545
3770
|
var _a, _b, _c;
|
|
3546
3771
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsEpochMetadata(campaignName, epoch, options);
|
|
3547
3772
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3548
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3549
|
-
return (axios, basePath) =>
|
|
3773
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getRewardsEpochMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3774
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3550
3775
|
});
|
|
3551
3776
|
},
|
|
3552
3777
|
/**
|
|
@@ -3561,8 +3786,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3561
3786
|
var _a, _b, _c;
|
|
3562
3787
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsIntervalMetadata(interval, options);
|
|
3563
3788
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3564
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3565
|
-
return (axios, basePath) =>
|
|
3789
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getRewardsIntervalMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3790
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3566
3791
|
});
|
|
3567
3792
|
},
|
|
3568
3793
|
/**
|
|
@@ -3576,8 +3801,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3576
3801
|
var _a, _b, _c;
|
|
3577
3802
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsSummary(options);
|
|
3578
3803
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3579
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3580
|
-
return (axios, basePath) =>
|
|
3804
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.getRewardsSummary']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3805
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3581
3806
|
});
|
|
3582
3807
|
},
|
|
3583
3808
|
/**
|
|
@@ -3592,8 +3817,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3592
3817
|
var _a, _b, _c;
|
|
3593
3818
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.markAsClaimed(markAsClaimedRequest, options);
|
|
3594
3819
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3595
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3596
|
-
return (axios, basePath) =>
|
|
3820
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.markAsClaimed']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3821
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3597
3822
|
});
|
|
3598
3823
|
},
|
|
3599
3824
|
/**
|
|
@@ -3608,8 +3833,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3608
3833
|
var _a, _b, _c;
|
|
3609
3834
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardAffiliate(onboardAffiliateRequest, options);
|
|
3610
3835
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3611
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3612
|
-
return (axios, basePath) =>
|
|
3836
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.onboardAffiliate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3837
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3613
3838
|
});
|
|
3614
3839
|
},
|
|
3615
3840
|
/**
|
|
@@ -3624,8 +3849,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3624
3849
|
var _a, _b, _c;
|
|
3625
3850
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardReferee(onboardRefereeRequest, options);
|
|
3626
3851
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3627
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3628
|
-
return (axios, basePath) =>
|
|
3852
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.onboardReferee']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3853
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3629
3854
|
});
|
|
3630
3855
|
},
|
|
3631
3856
|
/**
|
|
@@ -3640,8 +3865,8 @@ const RewardsApiFp = function (configuration) {
|
|
|
3640
3865
|
var _a, _b, _c;
|
|
3641
3866
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAffiliateEmberRefferalShare(updateAffiliateEmberRefferalShareRequest, options);
|
|
3642
3867
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3643
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3644
|
-
return (axios, basePath) =>
|
|
3868
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.updateAffiliateEmberRefferalShare']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3869
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3645
3870
|
});
|
|
3646
3871
|
},
|
|
3647
3872
|
/**
|
|
@@ -3656,19 +3881,18 @@ const RewardsApiFp = function (configuration) {
|
|
|
3656
3881
|
var _a, _b, _c;
|
|
3657
3882
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAffiliateFeeConfig(updateAffiliateFeeConfigRequest, options);
|
|
3658
3883
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3659
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
3660
|
-
return (axios, basePath) =>
|
|
3884
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['RewardsApi.updateAffiliateFeeConfig']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3885
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3661
3886
|
});
|
|
3662
3887
|
},
|
|
3663
3888
|
};
|
|
3664
3889
|
};
|
|
3665
|
-
exports.RewardsApiFp = RewardsApiFp;
|
|
3666
3890
|
/**
|
|
3667
3891
|
* RewardsApi - factory interface
|
|
3668
3892
|
* @export
|
|
3669
3893
|
*/
|
|
3670
|
-
const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
3671
|
-
const localVarFp =
|
|
3894
|
+
export const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
3895
|
+
const localVarFp = RewardsApiFp(configuration);
|
|
3672
3896
|
return {
|
|
3673
3897
|
/**
|
|
3674
3898
|
* Returns detailed earnings breakdown for an affiliate by interval, ordered by interval number in descending order.
|
|
@@ -3866,14 +4090,13 @@ const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
|
3866
4090
|
},
|
|
3867
4091
|
};
|
|
3868
4092
|
};
|
|
3869
|
-
exports.RewardsApiFactory = RewardsApiFactory;
|
|
3870
4093
|
/**
|
|
3871
4094
|
* RewardsApi - object-oriented interface
|
|
3872
4095
|
* @export
|
|
3873
4096
|
* @class RewardsApi
|
|
3874
4097
|
* @extends {BaseAPI}
|
|
3875
4098
|
*/
|
|
3876
|
-
class RewardsApi extends
|
|
4099
|
+
export class RewardsApi extends BaseAPI {
|
|
3877
4100
|
/**
|
|
3878
4101
|
* Returns detailed earnings breakdown for an affiliate by interval, ordered by interval number in descending order.
|
|
3879
4102
|
* @summary /rewards/affiliate/intervalOverview
|
|
@@ -3885,7 +4108,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3885
4108
|
* @memberof RewardsApi
|
|
3886
4109
|
*/
|
|
3887
4110
|
getAffiliateIntervalOverview(userAddress, page, limit, options) {
|
|
3888
|
-
return
|
|
4111
|
+
return RewardsApiFp(this.configuration).getAffiliateIntervalOverview(userAddress, page, limit, options).then((request) => request(this.axios, this.basePath));
|
|
3889
4112
|
}
|
|
3890
4113
|
/**
|
|
3891
4114
|
* Returns rankings and earnings for affiliates, sorted by the specified category.
|
|
@@ -3900,7 +4123,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3900
4123
|
* @memberof RewardsApi
|
|
3901
4124
|
*/
|
|
3902
4125
|
getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options) {
|
|
3903
|
-
return
|
|
4126
|
+
return RewardsApiFp(this.configuration).getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options).then((request) => request(this.axios, this.basePath));
|
|
3904
4127
|
}
|
|
3905
4128
|
/**
|
|
3906
4129
|
* Returns the affiliate metadata.
|
|
@@ -3911,7 +4134,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3911
4134
|
* @memberof RewardsApi
|
|
3912
4135
|
*/
|
|
3913
4136
|
getAffiliateMetadata(userAddress, options) {
|
|
3914
|
-
return
|
|
4137
|
+
return RewardsApiFp(this.configuration).getAffiliateMetadata(userAddress, options).then((request) => request(this.axios, this.basePath));
|
|
3915
4138
|
}
|
|
3916
4139
|
/**
|
|
3917
4140
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings.
|
|
@@ -3928,7 +4151,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3928
4151
|
* @memberof RewardsApi
|
|
3929
4152
|
*/
|
|
3930
4153
|
getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options) {
|
|
3931
|
-
return
|
|
4154
|
+
return RewardsApiFp(this.configuration).getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options).then((request) => request(this.axios, this.basePath));
|
|
3932
4155
|
}
|
|
3933
4156
|
/**
|
|
3934
4157
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings.
|
|
@@ -3939,7 +4162,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3939
4162
|
* @memberof RewardsApi
|
|
3940
4163
|
*/
|
|
3941
4164
|
getAffiliateSummary(userAddress, options) {
|
|
3942
|
-
return
|
|
4165
|
+
return RewardsApiFp(this.configuration).getAffiliateSummary(userAddress, options).then((request) => request(this.axios, this.basePath));
|
|
3943
4166
|
}
|
|
3944
4167
|
/**
|
|
3945
4168
|
* Returns the rewards earned by users for a specific campaign.
|
|
@@ -3952,7 +4175,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3952
4175
|
* @memberof RewardsApi
|
|
3953
4176
|
*/
|
|
3954
4177
|
getCampaignRewards(campaignName, userAddress, epochNumber, options) {
|
|
3955
|
-
return
|
|
4178
|
+
return RewardsApiFp(this.configuration).getCampaignRewards(campaignName, userAddress, epochNumber, options).then((request) => request(this.axios, this.basePath));
|
|
3956
4179
|
}
|
|
3957
4180
|
/**
|
|
3958
4181
|
* Returns the contract configuration metadata
|
|
@@ -3962,7 +4185,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3962
4185
|
* @memberof RewardsApi
|
|
3963
4186
|
*/
|
|
3964
4187
|
getContractConfig(options) {
|
|
3965
|
-
return
|
|
4188
|
+
return RewardsApiFp(this.configuration).getContractConfig(options).then((request) => request(this.axios, this.basePath));
|
|
3966
4189
|
}
|
|
3967
4190
|
/**
|
|
3968
4191
|
* Returns the rewards earned by users for the intervals.
|
|
@@ -3973,7 +4196,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3973
4196
|
* @memberof RewardsApi
|
|
3974
4197
|
*/
|
|
3975
4198
|
getRewards(intervalNumber, options) {
|
|
3976
|
-
return
|
|
4199
|
+
return RewardsApiFp(this.configuration).getRewards(intervalNumber, options).then((request) => request(this.axios, this.basePath));
|
|
3977
4200
|
}
|
|
3978
4201
|
/**
|
|
3979
4202
|
* Returns the metadata for the rewards campaigns.
|
|
@@ -3985,7 +4208,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3985
4208
|
* @memberof RewardsApi
|
|
3986
4209
|
*/
|
|
3987
4210
|
getRewardsCampaignMetadata(campaignName, status, options) {
|
|
3988
|
-
return
|
|
4211
|
+
return RewardsApiFp(this.configuration).getRewardsCampaignMetadata(campaignName, status, options).then((request) => request(this.axios, this.basePath));
|
|
3989
4212
|
}
|
|
3990
4213
|
/**
|
|
3991
4214
|
* Returns the latest epoch configs for the campaigns.
|
|
@@ -3996,7 +4219,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3996
4219
|
* @memberof RewardsApi
|
|
3997
4220
|
*/
|
|
3998
4221
|
getRewardsEpochConfigMetadata(intervalNumber, options) {
|
|
3999
|
-
return
|
|
4222
|
+
return RewardsApiFp(this.configuration).getRewardsEpochConfigMetadata(intervalNumber, options).then((request) => request(this.axios, this.basePath));
|
|
4000
4223
|
}
|
|
4001
4224
|
/**
|
|
4002
4225
|
* Returns the latest or next epoch epoch for campaign.
|
|
@@ -4008,7 +4231,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
4008
4231
|
* @memberof RewardsApi
|
|
4009
4232
|
*/
|
|
4010
4233
|
getRewardsEpochMetadata(campaignName, epoch, options) {
|
|
4011
|
-
return
|
|
4234
|
+
return RewardsApiFp(this.configuration).getRewardsEpochMetadata(campaignName, epoch, options).then((request) => request(this.axios, this.basePath));
|
|
4012
4235
|
}
|
|
4013
4236
|
/**
|
|
4014
4237
|
* Returns the interval metadata for provided parameters.
|
|
@@ -4019,7 +4242,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
4019
4242
|
* @memberof RewardsApi
|
|
4020
4243
|
*/
|
|
4021
4244
|
getRewardsIntervalMetadata(interval, options) {
|
|
4022
|
-
return
|
|
4245
|
+
return RewardsApiFp(this.configuration).getRewardsIntervalMetadata(interval, options).then((request) => request(this.axios, this.basePath));
|
|
4023
4246
|
}
|
|
4024
4247
|
/**
|
|
4025
4248
|
* Returns the all time rewards earned by users.
|
|
@@ -4029,7 +4252,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
4029
4252
|
* @memberof RewardsApi
|
|
4030
4253
|
*/
|
|
4031
4254
|
getRewardsSummary(options) {
|
|
4032
|
-
return
|
|
4255
|
+
return RewardsApiFp(this.configuration).getRewardsSummary(options).then((request) => request(this.axios, this.basePath));
|
|
4033
4256
|
}
|
|
4034
4257
|
/**
|
|
4035
4258
|
* Mark user claims as claimed for the specified campaign name and interval number
|
|
@@ -4040,7 +4263,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
4040
4263
|
* @memberof RewardsApi
|
|
4041
4264
|
*/
|
|
4042
4265
|
markAsClaimed(markAsClaimedRequest, options) {
|
|
4043
|
-
return
|
|
4266
|
+
return RewardsApiFp(this.configuration).markAsClaimed(markAsClaimedRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4044
4267
|
}
|
|
4045
4268
|
/**
|
|
4046
4269
|
* Submit an application to become an affiliate.
|
|
@@ -4051,7 +4274,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
4051
4274
|
* @memberof RewardsApi
|
|
4052
4275
|
*/
|
|
4053
4276
|
onboardAffiliate(onboardAffiliateRequest, options) {
|
|
4054
|
-
return
|
|
4277
|
+
return RewardsApiFp(this.configuration).onboardAffiliate(onboardAffiliateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4055
4278
|
}
|
|
4056
4279
|
/**
|
|
4057
4280
|
* Onboard a referee with a referral code.
|
|
@@ -4062,7 +4285,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
4062
4285
|
* @memberof RewardsApi
|
|
4063
4286
|
*/
|
|
4064
4287
|
onboardReferee(onboardRefereeRequest, options) {
|
|
4065
|
-
return
|
|
4288
|
+
return RewardsApiFp(this.configuration).onboardReferee(onboardRefereeRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4066
4289
|
}
|
|
4067
4290
|
/**
|
|
4068
4291
|
* Update the ember refferal share for an affiliate.
|
|
@@ -4073,7 +4296,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
4073
4296
|
* @memberof RewardsApi
|
|
4074
4297
|
*/
|
|
4075
4298
|
updateAffiliateEmberRefferalShare(updateAffiliateEmberRefferalShareRequest, options) {
|
|
4076
|
-
return
|
|
4299
|
+
return RewardsApiFp(this.configuration).updateAffiliateEmberRefferalShare(updateAffiliateEmberRefferalShareRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4077
4300
|
}
|
|
4078
4301
|
/**
|
|
4079
4302
|
* Update the fee config for an affiliate.
|
|
@@ -4084,14 +4307,13 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
4084
4307
|
* @memberof RewardsApi
|
|
4085
4308
|
*/
|
|
4086
4309
|
updateAffiliateFeeConfig(updateAffiliateFeeConfigRequest, options) {
|
|
4087
|
-
return
|
|
4310
|
+
return RewardsApiFp(this.configuration).updateAffiliateFeeConfig(updateAffiliateFeeConfigRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4088
4311
|
}
|
|
4089
4312
|
}
|
|
4090
|
-
exports.RewardsApi = RewardsApi;
|
|
4091
4313
|
/**
|
|
4092
4314
|
* @export
|
|
4093
4315
|
*/
|
|
4094
|
-
|
|
4316
|
+
export const GetAffiliateLeaderDashboardSortByEnum = {
|
|
4095
4317
|
PerpsRank: 'perpsRank',
|
|
4096
4318
|
LendingRank: 'lendingRank',
|
|
4097
4319
|
SpotRank: 'spotRank'
|
|
@@ -4099,14 +4321,14 @@ exports.GetAffiliateLeaderDashboardSortByEnum = {
|
|
|
4099
4321
|
/**
|
|
4100
4322
|
* @export
|
|
4101
4323
|
*/
|
|
4102
|
-
|
|
4324
|
+
export const GetAffiliateLeaderDashboardSortOrderEnum = {
|
|
4103
4325
|
Asc: 'asc',
|
|
4104
4326
|
Desc: 'desc'
|
|
4105
4327
|
};
|
|
4106
4328
|
/**
|
|
4107
4329
|
* @export
|
|
4108
4330
|
*/
|
|
4109
|
-
|
|
4331
|
+
export const GetAffiliateOverviewSortByEnum = {
|
|
4110
4332
|
RefreeEarnings: 'refreeEarnings',
|
|
4111
4333
|
ReferralEarnings: 'referralEarnings',
|
|
4112
4334
|
TotalEarnings: 'totalEarnings'
|
|
@@ -4114,21 +4336,21 @@ exports.GetAffiliateOverviewSortByEnum = {
|
|
|
4114
4336
|
/**
|
|
4115
4337
|
* @export
|
|
4116
4338
|
*/
|
|
4117
|
-
|
|
4339
|
+
export const GetAffiliateOverviewSortOrderEnum = {
|
|
4118
4340
|
Asc: 'asc',
|
|
4119
4341
|
Desc: 'desc'
|
|
4120
4342
|
};
|
|
4121
4343
|
/**
|
|
4122
4344
|
* @export
|
|
4123
4345
|
*/
|
|
4124
|
-
|
|
4346
|
+
export const GetRewardsCampaignMetadataStatusEnum = {
|
|
4125
4347
|
Active: 'ACTIVE',
|
|
4126
4348
|
Inactive: 'INACTIVE'
|
|
4127
4349
|
};
|
|
4128
4350
|
/**
|
|
4129
4351
|
* @export
|
|
4130
4352
|
*/
|
|
4131
|
-
|
|
4353
|
+
export const GetRewardsEpochMetadataEpochEnum = {
|
|
4132
4354
|
Next: 'next',
|
|
4133
4355
|
Latest: 'latest'
|
|
4134
4356
|
};
|
|
@@ -4136,7 +4358,7 @@ exports.GetRewardsEpochMetadataEpochEnum = {
|
|
|
4136
4358
|
* StreamsApi - axios parameter creator
|
|
4137
4359
|
* @export
|
|
4138
4360
|
*/
|
|
4139
|
-
const StreamsApiAxiosParamCreator = function (configuration) {
|
|
4361
|
+
export const StreamsApiAxiosParamCreator = function (configuration) {
|
|
4140
4362
|
return {
|
|
4141
4363
|
/**
|
|
4142
4364
|
* WebSocket Account Streams URL.
|
|
@@ -4149,16 +4371,16 @@ const StreamsApiAxiosParamCreator = function (configuration) {
|
|
|
4149
4371
|
*/
|
|
4150
4372
|
webSocketAccountData: (authorization_1, upgrade_1, secWebSocketKey_1, secWebSocketVersion_1, ...args_1) => __awaiter(this, [authorization_1, upgrade_1, secWebSocketKey_1, secWebSocketVersion_1, ...args_1], void 0, function* (authorization, upgrade, secWebSocketKey, secWebSocketVersion, options = {}) {
|
|
4151
4373
|
// verify required parameter 'authorization' is not null or undefined
|
|
4152
|
-
|
|
4374
|
+
assertParamExists('webSocketAccountData', 'authorization', authorization);
|
|
4153
4375
|
// verify required parameter 'upgrade' is not null or undefined
|
|
4154
|
-
|
|
4376
|
+
assertParamExists('webSocketAccountData', 'upgrade', upgrade);
|
|
4155
4377
|
// verify required parameter 'secWebSocketKey' is not null or undefined
|
|
4156
|
-
|
|
4378
|
+
assertParamExists('webSocketAccountData', 'secWebSocketKey', secWebSocketKey);
|
|
4157
4379
|
// verify required parameter 'secWebSocketVersion' is not null or undefined
|
|
4158
|
-
|
|
4380
|
+
assertParamExists('webSocketAccountData', 'secWebSocketVersion', secWebSocketVersion);
|
|
4159
4381
|
const localVarPath = `/ws/account`;
|
|
4160
4382
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4161
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4383
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4162
4384
|
let baseOptions;
|
|
4163
4385
|
if (configuration) {
|
|
4164
4386
|
baseOptions = configuration.baseOptions;
|
|
@@ -4168,7 +4390,7 @@ const StreamsApiAxiosParamCreator = function (configuration) {
|
|
|
4168
4390
|
const localVarQueryParameter = {};
|
|
4169
4391
|
// authentication bearerAuth required
|
|
4170
4392
|
// http bearer authentication required
|
|
4171
|
-
yield
|
|
4393
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4172
4394
|
if (authorization != null) {
|
|
4173
4395
|
localVarHeaderParameter['Authorization'] = String(authorization);
|
|
4174
4396
|
}
|
|
@@ -4181,11 +4403,11 @@ const StreamsApiAxiosParamCreator = function (configuration) {
|
|
|
4181
4403
|
if (secWebSocketVersion != null) {
|
|
4182
4404
|
localVarHeaderParameter['Sec-WebSocket-Version'] = String(secWebSocketVersion);
|
|
4183
4405
|
}
|
|
4184
|
-
|
|
4406
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4185
4407
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4186
4408
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4187
4409
|
return {
|
|
4188
|
-
url:
|
|
4410
|
+
url: toPathString(localVarUrlObj),
|
|
4189
4411
|
options: localVarRequestOptions,
|
|
4190
4412
|
};
|
|
4191
4413
|
}),
|
|
@@ -4199,14 +4421,14 @@ const StreamsApiAxiosParamCreator = function (configuration) {
|
|
|
4199
4421
|
*/
|
|
4200
4422
|
webSocketMarketData: (upgrade_1, secWebSocketKey_1, secWebSocketVersion_1, ...args_1) => __awaiter(this, [upgrade_1, secWebSocketKey_1, secWebSocketVersion_1, ...args_1], void 0, function* (upgrade, secWebSocketKey, secWebSocketVersion, options = {}) {
|
|
4201
4423
|
// verify required parameter 'upgrade' is not null or undefined
|
|
4202
|
-
|
|
4424
|
+
assertParamExists('webSocketMarketData', 'upgrade', upgrade);
|
|
4203
4425
|
// verify required parameter 'secWebSocketKey' is not null or undefined
|
|
4204
|
-
|
|
4426
|
+
assertParamExists('webSocketMarketData', 'secWebSocketKey', secWebSocketKey);
|
|
4205
4427
|
// verify required parameter 'secWebSocketVersion' is not null or undefined
|
|
4206
|
-
|
|
4428
|
+
assertParamExists('webSocketMarketData', 'secWebSocketVersion', secWebSocketVersion);
|
|
4207
4429
|
const localVarPath = `/ws/market`;
|
|
4208
4430
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4209
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4431
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4210
4432
|
let baseOptions;
|
|
4211
4433
|
if (configuration) {
|
|
4212
4434
|
baseOptions = configuration.baseOptions;
|
|
@@ -4223,23 +4445,22 @@ const StreamsApiAxiosParamCreator = function (configuration) {
|
|
|
4223
4445
|
if (secWebSocketVersion != null) {
|
|
4224
4446
|
localVarHeaderParameter['Sec-WebSocket-Version'] = String(secWebSocketVersion);
|
|
4225
4447
|
}
|
|
4226
|
-
|
|
4448
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4227
4449
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4228
4450
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4229
4451
|
return {
|
|
4230
|
-
url:
|
|
4452
|
+
url: toPathString(localVarUrlObj),
|
|
4231
4453
|
options: localVarRequestOptions,
|
|
4232
4454
|
};
|
|
4233
4455
|
}),
|
|
4234
4456
|
};
|
|
4235
4457
|
};
|
|
4236
|
-
exports.StreamsApiAxiosParamCreator = StreamsApiAxiosParamCreator;
|
|
4237
4458
|
/**
|
|
4238
4459
|
* StreamsApi - functional programming interface
|
|
4239
4460
|
* @export
|
|
4240
4461
|
*/
|
|
4241
|
-
const StreamsApiFp = function (configuration) {
|
|
4242
|
-
const localVarAxiosParamCreator =
|
|
4462
|
+
export const StreamsApiFp = function (configuration) {
|
|
4463
|
+
const localVarAxiosParamCreator = StreamsApiAxiosParamCreator(configuration);
|
|
4243
4464
|
return {
|
|
4244
4465
|
/**
|
|
4245
4466
|
* WebSocket Account Streams URL.
|
|
@@ -4255,8 +4476,8 @@ const StreamsApiFp = function (configuration) {
|
|
|
4255
4476
|
var _a, _b, _c;
|
|
4256
4477
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.webSocketAccountData(authorization, upgrade, secWebSocketKey, secWebSocketVersion, options);
|
|
4257
4478
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4258
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4259
|
-
return (axios, basePath) =>
|
|
4479
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['StreamsApi.webSocketAccountData']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4480
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4260
4481
|
});
|
|
4261
4482
|
},
|
|
4262
4483
|
/**
|
|
@@ -4272,19 +4493,18 @@ const StreamsApiFp = function (configuration) {
|
|
|
4272
4493
|
var _a, _b, _c;
|
|
4273
4494
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.webSocketMarketData(upgrade, secWebSocketKey, secWebSocketVersion, options);
|
|
4274
4495
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4275
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4276
|
-
return (axios, basePath) =>
|
|
4496
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['StreamsApi.webSocketMarketData']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4497
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4277
4498
|
});
|
|
4278
4499
|
},
|
|
4279
4500
|
};
|
|
4280
4501
|
};
|
|
4281
|
-
exports.StreamsApiFp = StreamsApiFp;
|
|
4282
4502
|
/**
|
|
4283
4503
|
* StreamsApi - factory interface
|
|
4284
4504
|
* @export
|
|
4285
4505
|
*/
|
|
4286
|
-
const StreamsApiFactory = function (configuration, basePath, axios) {
|
|
4287
|
-
const localVarFp =
|
|
4506
|
+
export const StreamsApiFactory = function (configuration, basePath, axios) {
|
|
4507
|
+
const localVarFp = StreamsApiFp(configuration);
|
|
4288
4508
|
return {
|
|
4289
4509
|
/**
|
|
4290
4510
|
* WebSocket Account Streams URL.
|
|
@@ -4311,14 +4531,13 @@ const StreamsApiFactory = function (configuration, basePath, axios) {
|
|
|
4311
4531
|
},
|
|
4312
4532
|
};
|
|
4313
4533
|
};
|
|
4314
|
-
exports.StreamsApiFactory = StreamsApiFactory;
|
|
4315
4534
|
/**
|
|
4316
4535
|
* StreamsApi - object-oriented interface
|
|
4317
4536
|
* @export
|
|
4318
4537
|
* @class StreamsApi
|
|
4319
4538
|
* @extends {BaseAPI}
|
|
4320
4539
|
*/
|
|
4321
|
-
class StreamsApi extends
|
|
4540
|
+
export class StreamsApi extends BaseAPI {
|
|
4322
4541
|
/**
|
|
4323
4542
|
* WebSocket Account Streams URL.
|
|
4324
4543
|
* @param {string} authorization
|
|
@@ -4330,7 +4549,7 @@ class StreamsApi extends base_1.BaseAPI {
|
|
|
4330
4549
|
* @memberof StreamsApi
|
|
4331
4550
|
*/
|
|
4332
4551
|
webSocketAccountData(authorization, upgrade, secWebSocketKey, secWebSocketVersion, options) {
|
|
4333
|
-
return
|
|
4552
|
+
return StreamsApiFp(this.configuration).webSocketAccountData(authorization, upgrade, secWebSocketKey, secWebSocketVersion, options).then((request) => request(this.axios, this.basePath));
|
|
4334
4553
|
}
|
|
4335
4554
|
/**
|
|
4336
4555
|
* WebSocket Market Streams URL.
|
|
@@ -4342,39 +4561,38 @@ class StreamsApi extends base_1.BaseAPI {
|
|
|
4342
4561
|
* @memberof StreamsApi
|
|
4343
4562
|
*/
|
|
4344
4563
|
webSocketMarketData(upgrade, secWebSocketKey, secWebSocketVersion, options) {
|
|
4345
|
-
return
|
|
4564
|
+
return StreamsApiFp(this.configuration).webSocketMarketData(upgrade, secWebSocketKey, secWebSocketVersion, options).then((request) => request(this.axios, this.basePath));
|
|
4346
4565
|
}
|
|
4347
4566
|
}
|
|
4348
|
-
exports.StreamsApi = StreamsApi;
|
|
4349
4567
|
/**
|
|
4350
4568
|
* @export
|
|
4351
4569
|
*/
|
|
4352
|
-
|
|
4570
|
+
export const WebSocketAccountDataUpgradeEnum = {
|
|
4353
4571
|
Websocket: 'websocket'
|
|
4354
4572
|
};
|
|
4355
4573
|
/**
|
|
4356
4574
|
* @export
|
|
4357
4575
|
*/
|
|
4358
|
-
|
|
4576
|
+
export const WebSocketAccountDataSecWebSocketVersionEnum = {
|
|
4359
4577
|
_13: '13'
|
|
4360
4578
|
};
|
|
4361
4579
|
/**
|
|
4362
4580
|
* @export
|
|
4363
4581
|
*/
|
|
4364
|
-
|
|
4582
|
+
export const WebSocketMarketDataUpgradeEnum = {
|
|
4365
4583
|
Websocket: 'websocket'
|
|
4366
4584
|
};
|
|
4367
4585
|
/**
|
|
4368
4586
|
* @export
|
|
4369
4587
|
*/
|
|
4370
|
-
|
|
4588
|
+
export const WebSocketMarketDataSecWebSocketVersionEnum = {
|
|
4371
4589
|
_13: '13'
|
|
4372
4590
|
};
|
|
4373
4591
|
/**
|
|
4374
4592
|
* TradeApi - axios parameter creator
|
|
4375
4593
|
* @export
|
|
4376
4594
|
*/
|
|
4377
|
-
const TradeApiAxiosParamCreator = function (configuration) {
|
|
4595
|
+
export const TradeApiAxiosParamCreator = function (configuration) {
|
|
4378
4596
|
return {
|
|
4379
4597
|
/**
|
|
4380
4598
|
* Cancel orders for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
@@ -4385,10 +4603,10 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4385
4603
|
*/
|
|
4386
4604
|
cancelOrders: (cancelOrdersRequest_1, ...args_1) => __awaiter(this, [cancelOrdersRequest_1, ...args_1], void 0, function* (cancelOrdersRequest, options = {}) {
|
|
4387
4605
|
// verify required parameter 'cancelOrdersRequest' is not null or undefined
|
|
4388
|
-
|
|
4606
|
+
assertParamExists('cancelOrders', 'cancelOrdersRequest', cancelOrdersRequest);
|
|
4389
4607
|
const localVarPath = `/api/v1/trade/orders/cancel`;
|
|
4390
4608
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4391
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4609
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4392
4610
|
let baseOptions;
|
|
4393
4611
|
if (configuration) {
|
|
4394
4612
|
baseOptions = configuration.baseOptions;
|
|
@@ -4398,14 +4616,14 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4398
4616
|
const localVarQueryParameter = {};
|
|
4399
4617
|
// authentication bearerAuth required
|
|
4400
4618
|
// http bearer authentication required
|
|
4401
|
-
yield
|
|
4619
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4402
4620
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4403
|
-
|
|
4621
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4404
4622
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4405
4623
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4406
|
-
localVarRequestOptions.data =
|
|
4624
|
+
localVarRequestOptions.data = serializeDataIfNeeded(cancelOrdersRequest, localVarRequestOptions, configuration);
|
|
4407
4625
|
return {
|
|
4408
|
-
url:
|
|
4626
|
+
url: toPathString(localVarUrlObj),
|
|
4409
4627
|
options: localVarRequestOptions,
|
|
4410
4628
|
};
|
|
4411
4629
|
}),
|
|
@@ -4418,10 +4636,10 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4418
4636
|
*/
|
|
4419
4637
|
cancelStandbyOrders: (cancelOrdersRequest_1, ...args_1) => __awaiter(this, [cancelOrdersRequest_1, ...args_1], void 0, function* (cancelOrdersRequest, options = {}) {
|
|
4420
4638
|
// verify required parameter 'cancelOrdersRequest' is not null or undefined
|
|
4421
|
-
|
|
4639
|
+
assertParamExists('cancelStandbyOrders', 'cancelOrdersRequest', cancelOrdersRequest);
|
|
4422
4640
|
const localVarPath = `/api/v1/trade/orders/cancel/standby`;
|
|
4423
4641
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4424
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4642
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4425
4643
|
let baseOptions;
|
|
4426
4644
|
if (configuration) {
|
|
4427
4645
|
baseOptions = configuration.baseOptions;
|
|
@@ -4431,14 +4649,14 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4431
4649
|
const localVarQueryParameter = {};
|
|
4432
4650
|
// authentication bearerAuth required
|
|
4433
4651
|
// http bearer authentication required
|
|
4434
|
-
yield
|
|
4652
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4435
4653
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4436
|
-
|
|
4654
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4437
4655
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4438
4656
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4439
|
-
localVarRequestOptions.data =
|
|
4657
|
+
localVarRequestOptions.data = serializeDataIfNeeded(cancelOrdersRequest, localVarRequestOptions, configuration);
|
|
4440
4658
|
return {
|
|
4441
|
-
url:
|
|
4659
|
+
url: toPathString(localVarUrlObj),
|
|
4442
4660
|
options: localVarRequestOptions,
|
|
4443
4661
|
};
|
|
4444
4662
|
}),
|
|
@@ -4452,7 +4670,7 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4452
4670
|
getOpenOrders: (symbol_1, ...args_1) => __awaiter(this, [symbol_1, ...args_1], void 0, function* (symbol, options = {}) {
|
|
4453
4671
|
const localVarPath = `/api/v1/trade/openOrders`;
|
|
4454
4672
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4455
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4673
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4456
4674
|
let baseOptions;
|
|
4457
4675
|
if (configuration) {
|
|
4458
4676
|
baseOptions = configuration.baseOptions;
|
|
@@ -4462,15 +4680,15 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4462
4680
|
const localVarQueryParameter = {};
|
|
4463
4681
|
// authentication bearerAuth required
|
|
4464
4682
|
// http bearer authentication required
|
|
4465
|
-
yield
|
|
4683
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4466
4684
|
if (symbol !== undefined) {
|
|
4467
4685
|
localVarQueryParameter['symbol'] = symbol;
|
|
4468
4686
|
}
|
|
4469
|
-
|
|
4687
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4470
4688
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4471
4689
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4472
4690
|
return {
|
|
4473
|
-
url:
|
|
4691
|
+
url: toPathString(localVarUrlObj),
|
|
4474
4692
|
options: localVarRequestOptions,
|
|
4475
4693
|
};
|
|
4476
4694
|
}),
|
|
@@ -4484,7 +4702,7 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4484
4702
|
getStandbyOrders: (symbol_1, ...args_1) => __awaiter(this, [symbol_1, ...args_1], void 0, function* (symbol, options = {}) {
|
|
4485
4703
|
const localVarPath = `/api/v1/trade/standbyOrders`;
|
|
4486
4704
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4487
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4705
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4488
4706
|
let baseOptions;
|
|
4489
4707
|
if (configuration) {
|
|
4490
4708
|
baseOptions = configuration.baseOptions;
|
|
@@ -4494,15 +4712,15 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4494
4712
|
const localVarQueryParameter = {};
|
|
4495
4713
|
// authentication bearerAuth required
|
|
4496
4714
|
// http bearer authentication required
|
|
4497
|
-
yield
|
|
4715
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4498
4716
|
if (symbol !== undefined) {
|
|
4499
4717
|
localVarQueryParameter['symbol'] = symbol;
|
|
4500
4718
|
}
|
|
4501
|
-
|
|
4719
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4502
4720
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4503
4721
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4504
4722
|
return {
|
|
4505
|
-
url:
|
|
4723
|
+
url: toPathString(localVarUrlObj),
|
|
4506
4724
|
options: localVarRequestOptions,
|
|
4507
4725
|
};
|
|
4508
4726
|
}),
|
|
@@ -4515,10 +4733,10 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4515
4733
|
*/
|
|
4516
4734
|
postCreateOrder: (createOrderRequest_1, ...args_1) => __awaiter(this, [createOrderRequest_1, ...args_1], void 0, function* (createOrderRequest, options = {}) {
|
|
4517
4735
|
// verify required parameter 'createOrderRequest' is not null or undefined
|
|
4518
|
-
|
|
4736
|
+
assertParamExists('postCreateOrder', 'createOrderRequest', createOrderRequest);
|
|
4519
4737
|
const localVarPath = `/api/v1/trade/orders`;
|
|
4520
4738
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4521
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4739
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4522
4740
|
let baseOptions;
|
|
4523
4741
|
if (configuration) {
|
|
4524
4742
|
baseOptions = configuration.baseOptions;
|
|
@@ -4528,14 +4746,14 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4528
4746
|
const localVarQueryParameter = {};
|
|
4529
4747
|
// authentication bearerAuth required
|
|
4530
4748
|
// http bearer authentication required
|
|
4531
|
-
yield
|
|
4749
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4532
4750
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4533
|
-
|
|
4751
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4534
4752
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4535
4753
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4536
|
-
localVarRequestOptions.data =
|
|
4754
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createOrderRequest, localVarRequestOptions, configuration);
|
|
4537
4755
|
return {
|
|
4538
|
-
url:
|
|
4756
|
+
url: toPathString(localVarUrlObj),
|
|
4539
4757
|
options: localVarRequestOptions,
|
|
4540
4758
|
};
|
|
4541
4759
|
}),
|
|
@@ -4548,10 +4766,10 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4548
4766
|
*/
|
|
4549
4767
|
postWithdraw: (withdrawRequest_1, ...args_1) => __awaiter(this, [withdrawRequest_1, ...args_1], void 0, function* (withdrawRequest, options = {}) {
|
|
4550
4768
|
// verify required parameter 'withdrawRequest' is not null or undefined
|
|
4551
|
-
|
|
4769
|
+
assertParamExists('postWithdraw', 'withdrawRequest', withdrawRequest);
|
|
4552
4770
|
const localVarPath = `/api/v1/trade/withdraw`;
|
|
4553
4771
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4554
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4772
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4555
4773
|
let baseOptions;
|
|
4556
4774
|
if (configuration) {
|
|
4557
4775
|
baseOptions = configuration.baseOptions;
|
|
@@ -4561,14 +4779,14 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4561
4779
|
const localVarQueryParameter = {};
|
|
4562
4780
|
// authentication bearerAuth required
|
|
4563
4781
|
// http bearer authentication required
|
|
4564
|
-
yield
|
|
4782
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4565
4783
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4566
|
-
|
|
4784
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4567
4785
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4568
4786
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4569
|
-
localVarRequestOptions.data =
|
|
4787
|
+
localVarRequestOptions.data = serializeDataIfNeeded(withdrawRequest, localVarRequestOptions, configuration);
|
|
4570
4788
|
return {
|
|
4571
|
-
url:
|
|
4789
|
+
url: toPathString(localVarUrlObj),
|
|
4572
4790
|
options: localVarRequestOptions,
|
|
4573
4791
|
};
|
|
4574
4792
|
}),
|
|
@@ -4581,10 +4799,10 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4581
4799
|
*/
|
|
4582
4800
|
putAdjustIsolatedMargin: (adjustIsolatedMarginRequest_1, ...args_1) => __awaiter(this, [adjustIsolatedMarginRequest_1, ...args_1], void 0, function* (adjustIsolatedMarginRequest, options = {}) {
|
|
4583
4801
|
// verify required parameter 'adjustIsolatedMarginRequest' is not null or undefined
|
|
4584
|
-
|
|
4802
|
+
assertParamExists('putAdjustIsolatedMargin', 'adjustIsolatedMarginRequest', adjustIsolatedMarginRequest);
|
|
4585
4803
|
const localVarPath = `/api/v1/trade/adjustIsolatedMargin`;
|
|
4586
4804
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4587
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4805
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4588
4806
|
let baseOptions;
|
|
4589
4807
|
if (configuration) {
|
|
4590
4808
|
baseOptions = configuration.baseOptions;
|
|
@@ -4594,14 +4812,14 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4594
4812
|
const localVarQueryParameter = {};
|
|
4595
4813
|
// authentication bearerAuth required
|
|
4596
4814
|
// http bearer authentication required
|
|
4597
|
-
yield
|
|
4815
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4598
4816
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4599
|
-
|
|
4817
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4600
4818
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4601
4819
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4602
|
-
localVarRequestOptions.data =
|
|
4820
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adjustIsolatedMarginRequest, localVarRequestOptions, configuration);
|
|
4603
4821
|
return {
|
|
4604
|
-
url:
|
|
4822
|
+
url: toPathString(localVarUrlObj),
|
|
4605
4823
|
options: localVarRequestOptions,
|
|
4606
4824
|
};
|
|
4607
4825
|
}),
|
|
@@ -4614,10 +4832,10 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4614
4832
|
*/
|
|
4615
4833
|
putAuthorizeAccount: (accountAuthorizationRequest_1, ...args_1) => __awaiter(this, [accountAuthorizationRequest_1, ...args_1], void 0, function* (accountAuthorizationRequest, options = {}) {
|
|
4616
4834
|
// verify required parameter 'accountAuthorizationRequest' is not null or undefined
|
|
4617
|
-
|
|
4835
|
+
assertParamExists('putAuthorizeAccount', 'accountAuthorizationRequest', accountAuthorizationRequest);
|
|
4618
4836
|
const localVarPath = `/api/v1/trade/accounts/authorize`;
|
|
4619
4837
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4620
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4838
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4621
4839
|
let baseOptions;
|
|
4622
4840
|
if (configuration) {
|
|
4623
4841
|
baseOptions = configuration.baseOptions;
|
|
@@ -4626,12 +4844,12 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4626
4844
|
const localVarHeaderParameter = {};
|
|
4627
4845
|
const localVarQueryParameter = {};
|
|
4628
4846
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4629
|
-
|
|
4847
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4630
4848
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4631
4849
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4632
|
-
localVarRequestOptions.data =
|
|
4850
|
+
localVarRequestOptions.data = serializeDataIfNeeded(accountAuthorizationRequest, localVarRequestOptions, configuration);
|
|
4633
4851
|
return {
|
|
4634
|
-
url:
|
|
4852
|
+
url: toPathString(localVarUrlObj),
|
|
4635
4853
|
options: localVarRequestOptions,
|
|
4636
4854
|
};
|
|
4637
4855
|
}),
|
|
@@ -4644,10 +4862,10 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4644
4862
|
*/
|
|
4645
4863
|
putDeauthorizeAccount: (accountAuthorizationRequest_1, ...args_1) => __awaiter(this, [accountAuthorizationRequest_1, ...args_1], void 0, function* (accountAuthorizationRequest, options = {}) {
|
|
4646
4864
|
// verify required parameter 'accountAuthorizationRequest' is not null or undefined
|
|
4647
|
-
|
|
4865
|
+
assertParamExists('putDeauthorizeAccount', 'accountAuthorizationRequest', accountAuthorizationRequest);
|
|
4648
4866
|
const localVarPath = `/api/v1/trade/accounts/deauthorize`;
|
|
4649
4867
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4650
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4868
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4651
4869
|
let baseOptions;
|
|
4652
4870
|
if (configuration) {
|
|
4653
4871
|
baseOptions = configuration.baseOptions;
|
|
@@ -4656,12 +4874,12 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4656
4874
|
const localVarHeaderParameter = {};
|
|
4657
4875
|
const localVarQueryParameter = {};
|
|
4658
4876
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4659
|
-
|
|
4877
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4660
4878
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4661
4879
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4662
|
-
localVarRequestOptions.data =
|
|
4880
|
+
localVarRequestOptions.data = serializeDataIfNeeded(accountAuthorizationRequest, localVarRequestOptions, configuration);
|
|
4663
4881
|
return {
|
|
4664
|
-
url:
|
|
4882
|
+
url: toPathString(localVarUrlObj),
|
|
4665
4883
|
options: localVarRequestOptions,
|
|
4666
4884
|
};
|
|
4667
4885
|
}),
|
|
@@ -4674,10 +4892,10 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4674
4892
|
*/
|
|
4675
4893
|
putLeverageUpdate: (accountPositionLeverageUpdateRequest_1, ...args_1) => __awaiter(this, [accountPositionLeverageUpdateRequest_1, ...args_1], void 0, function* (accountPositionLeverageUpdateRequest, options = {}) {
|
|
4676
4894
|
// verify required parameter 'accountPositionLeverageUpdateRequest' is not null or undefined
|
|
4677
|
-
|
|
4895
|
+
assertParamExists('putLeverageUpdate', 'accountPositionLeverageUpdateRequest', accountPositionLeverageUpdateRequest);
|
|
4678
4896
|
const localVarPath = `/api/v1/trade/leverage`;
|
|
4679
4897
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4680
|
-
const localVarUrlObj = new URL(localVarPath,
|
|
4898
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4681
4899
|
let baseOptions;
|
|
4682
4900
|
if (configuration) {
|
|
4683
4901
|
baseOptions = configuration.baseOptions;
|
|
@@ -4687,26 +4905,25 @@ const TradeApiAxiosParamCreator = function (configuration) {
|
|
|
4687
4905
|
const localVarQueryParameter = {};
|
|
4688
4906
|
// authentication bearerAuth required
|
|
4689
4907
|
// http bearer authentication required
|
|
4690
|
-
yield
|
|
4908
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4691
4909
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4692
|
-
|
|
4910
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4693
4911
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4694
4912
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4695
|
-
localVarRequestOptions.data =
|
|
4913
|
+
localVarRequestOptions.data = serializeDataIfNeeded(accountPositionLeverageUpdateRequest, localVarRequestOptions, configuration);
|
|
4696
4914
|
return {
|
|
4697
|
-
url:
|
|
4915
|
+
url: toPathString(localVarUrlObj),
|
|
4698
4916
|
options: localVarRequestOptions,
|
|
4699
4917
|
};
|
|
4700
4918
|
}),
|
|
4701
4919
|
};
|
|
4702
4920
|
};
|
|
4703
|
-
exports.TradeApiAxiosParamCreator = TradeApiAxiosParamCreator;
|
|
4704
4921
|
/**
|
|
4705
4922
|
* TradeApi - functional programming interface
|
|
4706
4923
|
* @export
|
|
4707
4924
|
*/
|
|
4708
|
-
const TradeApiFp = function (configuration) {
|
|
4709
|
-
const localVarAxiosParamCreator =
|
|
4925
|
+
export const TradeApiFp = function (configuration) {
|
|
4926
|
+
const localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);
|
|
4710
4927
|
return {
|
|
4711
4928
|
/**
|
|
4712
4929
|
* Cancel orders for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
@@ -4720,8 +4937,8 @@ const TradeApiFp = function (configuration) {
|
|
|
4720
4937
|
var _a, _b, _c;
|
|
4721
4938
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelOrders(cancelOrdersRequest, options);
|
|
4722
4939
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4723
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4724
|
-
return (axios, basePath) =>
|
|
4940
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.cancelOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4941
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4725
4942
|
});
|
|
4726
4943
|
},
|
|
4727
4944
|
/**
|
|
@@ -4736,8 +4953,8 @@ const TradeApiFp = function (configuration) {
|
|
|
4736
4953
|
var _a, _b, _c;
|
|
4737
4954
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelStandbyOrders(cancelOrdersRequest, options);
|
|
4738
4955
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4739
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4740
|
-
return (axios, basePath) =>
|
|
4956
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.cancelStandbyOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4957
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4741
4958
|
});
|
|
4742
4959
|
},
|
|
4743
4960
|
/**
|
|
@@ -4752,8 +4969,8 @@ const TradeApiFp = function (configuration) {
|
|
|
4752
4969
|
var _a, _b, _c;
|
|
4753
4970
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOpenOrders(symbol, options);
|
|
4754
4971
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4755
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4756
|
-
return (axios, basePath) =>
|
|
4972
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.getOpenOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4973
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4757
4974
|
});
|
|
4758
4975
|
},
|
|
4759
4976
|
/**
|
|
@@ -4768,8 +4985,8 @@ const TradeApiFp = function (configuration) {
|
|
|
4768
4985
|
var _a, _b, _c;
|
|
4769
4986
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getStandbyOrders(symbol, options);
|
|
4770
4987
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4771
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4772
|
-
return (axios, basePath) =>
|
|
4988
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.getStandbyOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4989
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4773
4990
|
});
|
|
4774
4991
|
},
|
|
4775
4992
|
/**
|
|
@@ -4784,8 +5001,8 @@ const TradeApiFp = function (configuration) {
|
|
|
4784
5001
|
var _a, _b, _c;
|
|
4785
5002
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.postCreateOrder(createOrderRequest, options);
|
|
4786
5003
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4787
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4788
|
-
return (axios, basePath) =>
|
|
5004
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.postCreateOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5005
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4789
5006
|
});
|
|
4790
5007
|
},
|
|
4791
5008
|
/**
|
|
@@ -4800,8 +5017,8 @@ const TradeApiFp = function (configuration) {
|
|
|
4800
5017
|
var _a, _b, _c;
|
|
4801
5018
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.postWithdraw(withdrawRequest, options);
|
|
4802
5019
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4803
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4804
|
-
return (axios, basePath) =>
|
|
5020
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.postWithdraw']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5021
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4805
5022
|
});
|
|
4806
5023
|
},
|
|
4807
5024
|
/**
|
|
@@ -4816,8 +5033,8 @@ const TradeApiFp = function (configuration) {
|
|
|
4816
5033
|
var _a, _b, _c;
|
|
4817
5034
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.putAdjustIsolatedMargin(adjustIsolatedMarginRequest, options);
|
|
4818
5035
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4819
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4820
|
-
return (axios, basePath) =>
|
|
5036
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.putAdjustIsolatedMargin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5037
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4821
5038
|
});
|
|
4822
5039
|
},
|
|
4823
5040
|
/**
|
|
@@ -4832,8 +5049,8 @@ const TradeApiFp = function (configuration) {
|
|
|
4832
5049
|
var _a, _b, _c;
|
|
4833
5050
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.putAuthorizeAccount(accountAuthorizationRequest, options);
|
|
4834
5051
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4835
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4836
|
-
return (axios, basePath) =>
|
|
5052
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.putAuthorizeAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5053
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4837
5054
|
});
|
|
4838
5055
|
},
|
|
4839
5056
|
/**
|
|
@@ -4848,8 +5065,8 @@ const TradeApiFp = function (configuration) {
|
|
|
4848
5065
|
var _a, _b, _c;
|
|
4849
5066
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.putDeauthorizeAccount(accountAuthorizationRequest, options);
|
|
4850
5067
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4851
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4852
|
-
return (axios, basePath) =>
|
|
5068
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.putDeauthorizeAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5069
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4853
5070
|
});
|
|
4854
5071
|
},
|
|
4855
5072
|
/**
|
|
@@ -4864,19 +5081,18 @@ const TradeApiFp = function (configuration) {
|
|
|
4864
5081
|
var _a, _b, _c;
|
|
4865
5082
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.putLeverageUpdate(accountPositionLeverageUpdateRequest, options);
|
|
4866
5083
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4867
|
-
const localVarOperationServerBasePath = (_c = (_b =
|
|
4868
|
-
return (axios, basePath) =>
|
|
5084
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TradeApi.putLeverageUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5085
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4869
5086
|
});
|
|
4870
5087
|
},
|
|
4871
5088
|
};
|
|
4872
5089
|
};
|
|
4873
|
-
exports.TradeApiFp = TradeApiFp;
|
|
4874
5090
|
/**
|
|
4875
5091
|
* TradeApi - factory interface
|
|
4876
5092
|
* @export
|
|
4877
5093
|
*/
|
|
4878
|
-
const TradeApiFactory = function (configuration, basePath, axios) {
|
|
4879
|
-
const localVarFp =
|
|
5094
|
+
export const TradeApiFactory = function (configuration, basePath, axios) {
|
|
5095
|
+
const localVarFp = TradeApiFp(configuration);
|
|
4880
5096
|
return {
|
|
4881
5097
|
/**
|
|
4882
5098
|
* Cancel orders for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
@@ -4980,14 +5196,13 @@ const TradeApiFactory = function (configuration, basePath, axios) {
|
|
|
4980
5196
|
},
|
|
4981
5197
|
};
|
|
4982
5198
|
};
|
|
4983
|
-
exports.TradeApiFactory = TradeApiFactory;
|
|
4984
5199
|
/**
|
|
4985
5200
|
* TradeApi - object-oriented interface
|
|
4986
5201
|
* @export
|
|
4987
5202
|
* @class TradeApi
|
|
4988
5203
|
* @extends {BaseAPI}
|
|
4989
5204
|
*/
|
|
4990
|
-
class TradeApi extends
|
|
5205
|
+
export class TradeApi extends BaseAPI {
|
|
4991
5206
|
/**
|
|
4992
5207
|
* Cancel orders for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
4993
5208
|
* @summary /trade/orders/cancel
|
|
@@ -4997,7 +5212,7 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
4997
5212
|
* @memberof TradeApi
|
|
4998
5213
|
*/
|
|
4999
5214
|
cancelOrders(cancelOrdersRequest, options) {
|
|
5000
|
-
return
|
|
5215
|
+
return TradeApiFp(this.configuration).cancelOrders(cancelOrdersRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5001
5216
|
}
|
|
5002
5217
|
/**
|
|
5003
5218
|
* Cancel orders in standby for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
@@ -5008,7 +5223,7 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
5008
5223
|
* @memberof TradeApi
|
|
5009
5224
|
*/
|
|
5010
5225
|
cancelStandbyOrders(cancelOrdersRequest, options) {
|
|
5011
|
-
return
|
|
5226
|
+
return TradeApiFp(this.configuration).cancelStandbyOrders(cancelOrdersRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5012
5227
|
}
|
|
5013
5228
|
/**
|
|
5014
5229
|
* Retrieve details of open orders for a specific account.
|
|
@@ -5019,7 +5234,7 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
5019
5234
|
* @memberof TradeApi
|
|
5020
5235
|
*/
|
|
5021
5236
|
getOpenOrders(symbol, options) {
|
|
5022
|
-
return
|
|
5237
|
+
return TradeApiFp(this.configuration).getOpenOrders(symbol, options).then((request) => request(this.axios, this.basePath));
|
|
5023
5238
|
}
|
|
5024
5239
|
/**
|
|
5025
5240
|
* Retrieve details of orders in standby for a specific account.
|
|
@@ -5030,7 +5245,7 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
5030
5245
|
* @memberof TradeApi
|
|
5031
5246
|
*/
|
|
5032
5247
|
getStandbyOrders(symbol, options) {
|
|
5033
|
-
return
|
|
5248
|
+
return TradeApiFp(this.configuration).getStandbyOrders(symbol, options).then((request) => request(this.axios, this.basePath));
|
|
5034
5249
|
}
|
|
5035
5250
|
/**
|
|
5036
5251
|
* Submit a new order for execution.
|
|
@@ -5041,7 +5256,7 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
5041
5256
|
* @memberof TradeApi
|
|
5042
5257
|
*/
|
|
5043
5258
|
postCreateOrder(createOrderRequest, options) {
|
|
5044
|
-
return
|
|
5259
|
+
return TradeApiFp(this.configuration).postCreateOrder(createOrderRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5045
5260
|
}
|
|
5046
5261
|
/**
|
|
5047
5262
|
* Initiates a withdraw action to remove some amount of funds from a user\'s account.
|
|
@@ -5052,7 +5267,7 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
5052
5267
|
* @memberof TradeApi
|
|
5053
5268
|
*/
|
|
5054
5269
|
postWithdraw(withdrawRequest, options) {
|
|
5055
|
-
return
|
|
5270
|
+
return TradeApiFp(this.configuration).postWithdraw(withdrawRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5056
5271
|
}
|
|
5057
5272
|
/**
|
|
5058
5273
|
* Adjust margin for an isolated position on a specific market.
|
|
@@ -5063,7 +5278,7 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
5063
5278
|
* @memberof TradeApi
|
|
5064
5279
|
*/
|
|
5065
5280
|
putAdjustIsolatedMargin(adjustIsolatedMarginRequest, options) {
|
|
5066
|
-
return
|
|
5281
|
+
return TradeApiFp(this.configuration).putAdjustIsolatedMargin(adjustIsolatedMarginRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5067
5282
|
}
|
|
5068
5283
|
/**
|
|
5069
5284
|
* Authorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
@@ -5074,7 +5289,7 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
5074
5289
|
* @memberof TradeApi
|
|
5075
5290
|
*/
|
|
5076
5291
|
putAuthorizeAccount(accountAuthorizationRequest, options) {
|
|
5077
|
-
return
|
|
5292
|
+
return TradeApiFp(this.configuration).putAuthorizeAccount(accountAuthorizationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5078
5293
|
}
|
|
5079
5294
|
/**
|
|
5080
5295
|
* Deauthorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
@@ -5085,7 +5300,7 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
5085
5300
|
* @memberof TradeApi
|
|
5086
5301
|
*/
|
|
5087
5302
|
putDeauthorizeAccount(accountAuthorizationRequest, options) {
|
|
5088
|
-
return
|
|
5303
|
+
return TradeApiFp(this.configuration).putDeauthorizeAccount(accountAuthorizationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5089
5304
|
}
|
|
5090
5305
|
/**
|
|
5091
5306
|
* Updates leverage for positions of a given market and closes all open orders for that market.
|
|
@@ -5096,8 +5311,384 @@ class TradeApi extends base_1.BaseAPI {
|
|
|
5096
5311
|
* @memberof TradeApi
|
|
5097
5312
|
*/
|
|
5098
5313
|
putLeverageUpdate(accountPositionLeverageUpdateRequest, options) {
|
|
5099
|
-
return
|
|
5314
|
+
return TradeApiFp(this.configuration).putLeverageUpdate(accountPositionLeverageUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5315
|
+
}
|
|
5316
|
+
}
|
|
5317
|
+
/**
|
|
5318
|
+
* VeraPointsApi - axios parameter creator
|
|
5319
|
+
* @export
|
|
5320
|
+
*/
|
|
5321
|
+
export const VeraPointsApiAxiosParamCreator = function (configuration) {
|
|
5322
|
+
return {
|
|
5323
|
+
/**
|
|
5324
|
+
* Claim a swap transaction for Vera Points attribution.
|
|
5325
|
+
* @summary /vera/swap/claim
|
|
5326
|
+
* @param {SwapClaimRequest} swapClaimRequest
|
|
5327
|
+
* @param {*} [options] Override http request option.
|
|
5328
|
+
* @throws {RequiredError}
|
|
5329
|
+
*/
|
|
5330
|
+
claimSwap: (swapClaimRequest_1, ...args_1) => __awaiter(this, [swapClaimRequest_1, ...args_1], void 0, function* (swapClaimRequest, options = {}) {
|
|
5331
|
+
// verify required parameter 'swapClaimRequest' is not null or undefined
|
|
5332
|
+
assertParamExists('claimSwap', 'swapClaimRequest', swapClaimRequest);
|
|
5333
|
+
const localVarPath = `/v1/vera/swap/claim`;
|
|
5334
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5335
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5336
|
+
let baseOptions;
|
|
5337
|
+
if (configuration) {
|
|
5338
|
+
baseOptions = configuration.baseOptions;
|
|
5339
|
+
}
|
|
5340
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
5341
|
+
const localVarHeaderParameter = {};
|
|
5342
|
+
const localVarQueryParameter = {};
|
|
5343
|
+
// authentication bearerAuth required
|
|
5344
|
+
// http bearer authentication required
|
|
5345
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
5346
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
5347
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5348
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5349
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5350
|
+
localVarRequestOptions.data = serializeDataIfNeeded(swapClaimRequest, localVarRequestOptions, configuration);
|
|
5351
|
+
return {
|
|
5352
|
+
url: toPathString(localVarUrlObj),
|
|
5353
|
+
options: localVarRequestOptions,
|
|
5354
|
+
};
|
|
5355
|
+
}),
|
|
5356
|
+
/**
|
|
5357
|
+
* Claim a vault deposit transaction for Vera Points attribution.
|
|
5358
|
+
* @summary /vera/vault/claim
|
|
5359
|
+
* @param {VaultClaimRequest} vaultClaimRequest
|
|
5360
|
+
* @param {*} [options] Override http request option.
|
|
5361
|
+
* @throws {RequiredError}
|
|
5362
|
+
*/
|
|
5363
|
+
claimVault: (vaultClaimRequest_1, ...args_1) => __awaiter(this, [vaultClaimRequest_1, ...args_1], void 0, function* (vaultClaimRequest, options = {}) {
|
|
5364
|
+
// verify required parameter 'vaultClaimRequest' is not null or undefined
|
|
5365
|
+
assertParamExists('claimVault', 'vaultClaimRequest', vaultClaimRequest);
|
|
5366
|
+
const localVarPath = `/v1/vera/vault/claim`;
|
|
5367
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5368
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5369
|
+
let baseOptions;
|
|
5370
|
+
if (configuration) {
|
|
5371
|
+
baseOptions = configuration.baseOptions;
|
|
5372
|
+
}
|
|
5373
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
5374
|
+
const localVarHeaderParameter = {};
|
|
5375
|
+
const localVarQueryParameter = {};
|
|
5376
|
+
// authentication bearerAuth required
|
|
5377
|
+
// http bearer authentication required
|
|
5378
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
5379
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
5380
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5381
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5382
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5383
|
+
localVarRequestOptions.data = serializeDataIfNeeded(vaultClaimRequest, localVarRequestOptions, configuration);
|
|
5384
|
+
return {
|
|
5385
|
+
url: toPathString(localVarUrlObj),
|
|
5386
|
+
options: localVarRequestOptions,
|
|
5387
|
+
};
|
|
5388
|
+
}),
|
|
5389
|
+
/**
|
|
5390
|
+
* Returns a user\'s lifetime Vera Points, current tier, rank, and next tier threshold. Public endpoint; user_address is passed as query parameter.
|
|
5391
|
+
* @summary Get user\'s points, tier, and rank
|
|
5392
|
+
* @param {string} userAddress Wallet address to look up balance for.
|
|
5393
|
+
* @param {*} [options] Override http request option.
|
|
5394
|
+
* @throws {RequiredError}
|
|
5395
|
+
*/
|
|
5396
|
+
getBalance: (userAddress_1, ...args_1) => __awaiter(this, [userAddress_1, ...args_1], void 0, function* (userAddress, options = {}) {
|
|
5397
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
5398
|
+
assertParamExists('getBalance', 'userAddress', userAddress);
|
|
5399
|
+
const localVarPath = `/v1/vera/balance`;
|
|
5400
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5401
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5402
|
+
let baseOptions;
|
|
5403
|
+
if (configuration) {
|
|
5404
|
+
baseOptions = configuration.baseOptions;
|
|
5405
|
+
}
|
|
5406
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
5407
|
+
const localVarHeaderParameter = {};
|
|
5408
|
+
const localVarQueryParameter = {};
|
|
5409
|
+
if (userAddress !== undefined) {
|
|
5410
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
5411
|
+
}
|
|
5412
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5413
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5414
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5415
|
+
return {
|
|
5416
|
+
url: toPathString(localVarUrlObj),
|
|
5417
|
+
options: localVarRequestOptions,
|
|
5418
|
+
};
|
|
5419
|
+
}),
|
|
5420
|
+
/**
|
|
5421
|
+
* Paginated leaderboard ranked by lifetime Vera Points.
|
|
5422
|
+
* @summary Top users by lifetime points
|
|
5423
|
+
* @param {number} [limit] Number of entries to return.
|
|
5424
|
+
* @param {number} [offset] Number of entries to skip.
|
|
5425
|
+
* @param {*} [options] Override http request option.
|
|
5426
|
+
* @throws {RequiredError}
|
|
5427
|
+
*/
|
|
5428
|
+
getLeaderboard: (limit_1, offset_1, ...args_1) => __awaiter(this, [limit_1, offset_1, ...args_1], void 0, function* (limit, offset, options = {}) {
|
|
5429
|
+
const localVarPath = `/v1/vera/leaderboard`;
|
|
5430
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5431
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5432
|
+
let baseOptions;
|
|
5433
|
+
if (configuration) {
|
|
5434
|
+
baseOptions = configuration.baseOptions;
|
|
5435
|
+
}
|
|
5436
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
5437
|
+
const localVarHeaderParameter = {};
|
|
5438
|
+
const localVarQueryParameter = {};
|
|
5439
|
+
if (limit !== undefined) {
|
|
5440
|
+
localVarQueryParameter['limit'] = limit;
|
|
5441
|
+
}
|
|
5442
|
+
if (offset !== undefined) {
|
|
5443
|
+
localVarQueryParameter['offset'] = offset;
|
|
5444
|
+
}
|
|
5445
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5446
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5447
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5448
|
+
return {
|
|
5449
|
+
url: toPathString(localVarUrlObj),
|
|
5450
|
+
options: localVarRequestOptions,
|
|
5451
|
+
};
|
|
5452
|
+
}),
|
|
5453
|
+
/**
|
|
5454
|
+
* Record a daily app session for vault points eligibility. user_address is extracted from JWT; session_date is set server-side to the current UTC date. Idempotent — one session per (user, date) pair; multiple calls on the same day are no-ops. This is a required daily gate for vault balance points.
|
|
5455
|
+
* @summary /vera/session
|
|
5456
|
+
* @param {*} [options] Override http request option.
|
|
5457
|
+
* @throws {RequiredError}
|
|
5458
|
+
*/
|
|
5459
|
+
recordSession: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
5460
|
+
const localVarPath = `/v1/vera/session`;
|
|
5461
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5462
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5463
|
+
let baseOptions;
|
|
5464
|
+
if (configuration) {
|
|
5465
|
+
baseOptions = configuration.baseOptions;
|
|
5466
|
+
}
|
|
5467
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
5468
|
+
const localVarHeaderParameter = {};
|
|
5469
|
+
const localVarQueryParameter = {};
|
|
5470
|
+
// authentication bearerAuth required
|
|
5471
|
+
// http bearer authentication required
|
|
5472
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
5473
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5474
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5475
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5476
|
+
return {
|
|
5477
|
+
url: toPathString(localVarUrlObj),
|
|
5478
|
+
options: localVarRequestOptions,
|
|
5479
|
+
};
|
|
5480
|
+
}),
|
|
5481
|
+
};
|
|
5482
|
+
};
|
|
5483
|
+
/**
|
|
5484
|
+
* VeraPointsApi - functional programming interface
|
|
5485
|
+
* @export
|
|
5486
|
+
*/
|
|
5487
|
+
export const VeraPointsApiFp = function (configuration) {
|
|
5488
|
+
const localVarAxiosParamCreator = VeraPointsApiAxiosParamCreator(configuration);
|
|
5489
|
+
return {
|
|
5490
|
+
/**
|
|
5491
|
+
* Claim a swap transaction for Vera Points attribution.
|
|
5492
|
+
* @summary /vera/swap/claim
|
|
5493
|
+
* @param {SwapClaimRequest} swapClaimRequest
|
|
5494
|
+
* @param {*} [options] Override http request option.
|
|
5495
|
+
* @throws {RequiredError}
|
|
5496
|
+
*/
|
|
5497
|
+
claimSwap(swapClaimRequest, options) {
|
|
5498
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5499
|
+
var _a, _b, _c;
|
|
5500
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimSwap(swapClaimRequest, options);
|
|
5501
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
5502
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VeraPointsApi.claimSwap']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5503
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5504
|
+
});
|
|
5505
|
+
},
|
|
5506
|
+
/**
|
|
5507
|
+
* Claim a vault deposit transaction for Vera Points attribution.
|
|
5508
|
+
* @summary /vera/vault/claim
|
|
5509
|
+
* @param {VaultClaimRequest} vaultClaimRequest
|
|
5510
|
+
* @param {*} [options] Override http request option.
|
|
5511
|
+
* @throws {RequiredError}
|
|
5512
|
+
*/
|
|
5513
|
+
claimVault(vaultClaimRequest, options) {
|
|
5514
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5515
|
+
var _a, _b, _c;
|
|
5516
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimVault(vaultClaimRequest, options);
|
|
5517
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
5518
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VeraPointsApi.claimVault']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5519
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5520
|
+
});
|
|
5521
|
+
},
|
|
5522
|
+
/**
|
|
5523
|
+
* Returns a user\'s lifetime Vera Points, current tier, rank, and next tier threshold. Public endpoint; user_address is passed as query parameter.
|
|
5524
|
+
* @summary Get user\'s points, tier, and rank
|
|
5525
|
+
* @param {string} userAddress Wallet address to look up balance for.
|
|
5526
|
+
* @param {*} [options] Override http request option.
|
|
5527
|
+
* @throws {RequiredError}
|
|
5528
|
+
*/
|
|
5529
|
+
getBalance(userAddress, options) {
|
|
5530
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5531
|
+
var _a, _b, _c;
|
|
5532
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(userAddress, options);
|
|
5533
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
5534
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VeraPointsApi.getBalance']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5535
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5536
|
+
});
|
|
5537
|
+
},
|
|
5538
|
+
/**
|
|
5539
|
+
* Paginated leaderboard ranked by lifetime Vera Points.
|
|
5540
|
+
* @summary Top users by lifetime points
|
|
5541
|
+
* @param {number} [limit] Number of entries to return.
|
|
5542
|
+
* @param {number} [offset] Number of entries to skip.
|
|
5543
|
+
* @param {*} [options] Override http request option.
|
|
5544
|
+
* @throws {RequiredError}
|
|
5545
|
+
*/
|
|
5546
|
+
getLeaderboard(limit, offset, options) {
|
|
5547
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5548
|
+
var _a, _b, _c;
|
|
5549
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getLeaderboard(limit, offset, options);
|
|
5550
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
5551
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VeraPointsApi.getLeaderboard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5552
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5553
|
+
});
|
|
5554
|
+
},
|
|
5555
|
+
/**
|
|
5556
|
+
* Record a daily app session for vault points eligibility. user_address is extracted from JWT; session_date is set server-side to the current UTC date. Idempotent — one session per (user, date) pair; multiple calls on the same day are no-ops. This is a required daily gate for vault balance points.
|
|
5557
|
+
* @summary /vera/session
|
|
5558
|
+
* @param {*} [options] Override http request option.
|
|
5559
|
+
* @throws {RequiredError}
|
|
5560
|
+
*/
|
|
5561
|
+
recordSession(options) {
|
|
5562
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5563
|
+
var _a, _b, _c;
|
|
5564
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.recordSession(options);
|
|
5565
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
5566
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VeraPointsApi.recordSession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5567
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5568
|
+
});
|
|
5569
|
+
},
|
|
5570
|
+
};
|
|
5571
|
+
};
|
|
5572
|
+
/**
|
|
5573
|
+
* VeraPointsApi - factory interface
|
|
5574
|
+
* @export
|
|
5575
|
+
*/
|
|
5576
|
+
export const VeraPointsApiFactory = function (configuration, basePath, axios) {
|
|
5577
|
+
const localVarFp = VeraPointsApiFp(configuration);
|
|
5578
|
+
return {
|
|
5579
|
+
/**
|
|
5580
|
+
* Claim a swap transaction for Vera Points attribution.
|
|
5581
|
+
* @summary /vera/swap/claim
|
|
5582
|
+
* @param {SwapClaimRequest} swapClaimRequest
|
|
5583
|
+
* @param {*} [options] Override http request option.
|
|
5584
|
+
* @throws {RequiredError}
|
|
5585
|
+
*/
|
|
5586
|
+
claimSwap(swapClaimRequest, options) {
|
|
5587
|
+
return localVarFp.claimSwap(swapClaimRequest, options).then((request) => request(axios, basePath));
|
|
5588
|
+
},
|
|
5589
|
+
/**
|
|
5590
|
+
* Claim a vault deposit transaction for Vera Points attribution.
|
|
5591
|
+
* @summary /vera/vault/claim
|
|
5592
|
+
* @param {VaultClaimRequest} vaultClaimRequest
|
|
5593
|
+
* @param {*} [options] Override http request option.
|
|
5594
|
+
* @throws {RequiredError}
|
|
5595
|
+
*/
|
|
5596
|
+
claimVault(vaultClaimRequest, options) {
|
|
5597
|
+
return localVarFp.claimVault(vaultClaimRequest, options).then((request) => request(axios, basePath));
|
|
5598
|
+
},
|
|
5599
|
+
/**
|
|
5600
|
+
* Returns a user\'s lifetime Vera Points, current tier, rank, and next tier threshold. Public endpoint; user_address is passed as query parameter.
|
|
5601
|
+
* @summary Get user\'s points, tier, and rank
|
|
5602
|
+
* @param {string} userAddress Wallet address to look up balance for.
|
|
5603
|
+
* @param {*} [options] Override http request option.
|
|
5604
|
+
* @throws {RequiredError}
|
|
5605
|
+
*/
|
|
5606
|
+
getBalance(userAddress, options) {
|
|
5607
|
+
return localVarFp.getBalance(userAddress, options).then((request) => request(axios, basePath));
|
|
5608
|
+
},
|
|
5609
|
+
/**
|
|
5610
|
+
* Paginated leaderboard ranked by lifetime Vera Points.
|
|
5611
|
+
* @summary Top users by lifetime points
|
|
5612
|
+
* @param {number} [limit] Number of entries to return.
|
|
5613
|
+
* @param {number} [offset] Number of entries to skip.
|
|
5614
|
+
* @param {*} [options] Override http request option.
|
|
5615
|
+
* @throws {RequiredError}
|
|
5616
|
+
*/
|
|
5617
|
+
getLeaderboard(limit, offset, options) {
|
|
5618
|
+
return localVarFp.getLeaderboard(limit, offset, options).then((request) => request(axios, basePath));
|
|
5619
|
+
},
|
|
5620
|
+
/**
|
|
5621
|
+
* Record a daily app session for vault points eligibility. user_address is extracted from JWT; session_date is set server-side to the current UTC date. Idempotent — one session per (user, date) pair; multiple calls on the same day are no-ops. This is a required daily gate for vault balance points.
|
|
5622
|
+
* @summary /vera/session
|
|
5623
|
+
* @param {*} [options] Override http request option.
|
|
5624
|
+
* @throws {RequiredError}
|
|
5625
|
+
*/
|
|
5626
|
+
recordSession(options) {
|
|
5627
|
+
return localVarFp.recordSession(options).then((request) => request(axios, basePath));
|
|
5628
|
+
},
|
|
5629
|
+
};
|
|
5630
|
+
};
|
|
5631
|
+
/**
|
|
5632
|
+
* VeraPointsApi - object-oriented interface
|
|
5633
|
+
* @export
|
|
5634
|
+
* @class VeraPointsApi
|
|
5635
|
+
* @extends {BaseAPI}
|
|
5636
|
+
*/
|
|
5637
|
+
export class VeraPointsApi extends BaseAPI {
|
|
5638
|
+
/**
|
|
5639
|
+
* Claim a swap transaction for Vera Points attribution.
|
|
5640
|
+
* @summary /vera/swap/claim
|
|
5641
|
+
* @param {SwapClaimRequest} swapClaimRequest
|
|
5642
|
+
* @param {*} [options] Override http request option.
|
|
5643
|
+
* @throws {RequiredError}
|
|
5644
|
+
* @memberof VeraPointsApi
|
|
5645
|
+
*/
|
|
5646
|
+
claimSwap(swapClaimRequest, options) {
|
|
5647
|
+
return VeraPointsApiFp(this.configuration).claimSwap(swapClaimRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5648
|
+
}
|
|
5649
|
+
/**
|
|
5650
|
+
* Claim a vault deposit transaction for Vera Points attribution.
|
|
5651
|
+
* @summary /vera/vault/claim
|
|
5652
|
+
* @param {VaultClaimRequest} vaultClaimRequest
|
|
5653
|
+
* @param {*} [options] Override http request option.
|
|
5654
|
+
* @throws {RequiredError}
|
|
5655
|
+
* @memberof VeraPointsApi
|
|
5656
|
+
*/
|
|
5657
|
+
claimVault(vaultClaimRequest, options) {
|
|
5658
|
+
return VeraPointsApiFp(this.configuration).claimVault(vaultClaimRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5659
|
+
}
|
|
5660
|
+
/**
|
|
5661
|
+
* Returns a user\'s lifetime Vera Points, current tier, rank, and next tier threshold. Public endpoint; user_address is passed as query parameter.
|
|
5662
|
+
* @summary Get user\'s points, tier, and rank
|
|
5663
|
+
* @param {string} userAddress Wallet address to look up balance for.
|
|
5664
|
+
* @param {*} [options] Override http request option.
|
|
5665
|
+
* @throws {RequiredError}
|
|
5666
|
+
* @memberof VeraPointsApi
|
|
5667
|
+
*/
|
|
5668
|
+
getBalance(userAddress, options) {
|
|
5669
|
+
return VeraPointsApiFp(this.configuration).getBalance(userAddress, options).then((request) => request(this.axios, this.basePath));
|
|
5670
|
+
}
|
|
5671
|
+
/**
|
|
5672
|
+
* Paginated leaderboard ranked by lifetime Vera Points.
|
|
5673
|
+
* @summary Top users by lifetime points
|
|
5674
|
+
* @param {number} [limit] Number of entries to return.
|
|
5675
|
+
* @param {number} [offset] Number of entries to skip.
|
|
5676
|
+
* @param {*} [options] Override http request option.
|
|
5677
|
+
* @throws {RequiredError}
|
|
5678
|
+
* @memberof VeraPointsApi
|
|
5679
|
+
*/
|
|
5680
|
+
getLeaderboard(limit, offset, options) {
|
|
5681
|
+
return VeraPointsApiFp(this.configuration).getLeaderboard(limit, offset, options).then((request) => request(this.axios, this.basePath));
|
|
5682
|
+
}
|
|
5683
|
+
/**
|
|
5684
|
+
* Record a daily app session for vault points eligibility. user_address is extracted from JWT; session_date is set server-side to the current UTC date. Idempotent — one session per (user, date) pair; multiple calls on the same day are no-ops. This is a required daily gate for vault balance points.
|
|
5685
|
+
* @summary /vera/session
|
|
5686
|
+
* @param {*} [options] Override http request option.
|
|
5687
|
+
* @throws {RequiredError}
|
|
5688
|
+
* @memberof VeraPointsApi
|
|
5689
|
+
*/
|
|
5690
|
+
recordSession(options) {
|
|
5691
|
+
return VeraPointsApiFp(this.configuration).recordSession(options).then((request) => request(this.axios, this.basePath));
|
|
5100
5692
|
}
|
|
5101
5693
|
}
|
|
5102
|
-
exports.TradeApi = TradeApi;
|
|
5103
5694
|
//# sourceMappingURL=api.js.map
|