@crypticdot/defituna-api 3.0.4 → 3.1.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/dist/index.js CHANGED
@@ -102,9 +102,9 @@ async function customFetch(url, init) {
102
102
 
103
103
  // src/gen/defiTunaAPI.ts
104
104
  var BadRequestErrorCodeErrorBodyCode = {
105
+ invalidBody: "invalid_body",
105
106
  invalidPath: "invalid_path",
106
- invalidQuery: "invalid_query",
107
- invalidBody: "invalid_body"
107
+ invalidQuery: "invalid_query"
108
108
  };
109
109
  var GetLimitOrderError404ErrorCode = {
110
110
  notFound: "not_found"
@@ -115,6 +115,12 @@ var GetLimitOrderError500ErrorCode = {
115
115
  var InternalErrorCodeErrorBodyCode = {
116
116
  internalError: "internal_error"
117
117
  };
118
+ var LeaderboardError400BadRequestCode = {
119
+ badRequest: "bad_request"
120
+ };
121
+ var LeaderboardError500ErrorCode = {
122
+ internalError: "internal_error"
123
+ };
118
124
  var LeaderboardPeriod = {
119
125
  week: "week"
120
126
  };
@@ -129,6 +135,24 @@ var LimitOrderStatus = {
129
135
  complete: "complete",
130
136
  cancelled: "cancelled"
131
137
  };
138
+ var LpPositionsError400BadRequestCode = {
139
+ badRequest: "bad_request"
140
+ };
141
+ var LpPositionsError500ErrorCode = {
142
+ internalError: "internal_error"
143
+ };
144
+ var MarketError404ErrorCode = {
145
+ notFound: "not_found"
146
+ };
147
+ var MarketError500ErrorCode = {
148
+ internalError: "internal_error"
149
+ };
150
+ var MintError404ErrorCode = {
151
+ notFound: "not_found"
152
+ };
153
+ var MintError500ErrorCode = {
154
+ internalError: "internal_error"
155
+ };
132
156
  var NotificationAction = {
133
157
  create: "create",
134
158
  update: "update"
@@ -148,6 +172,12 @@ var NotificationEntity = {
148
172
  orderHistoryEntry: "order_history_entry",
149
173
  stateSnapshot: "state_snapshot"
150
174
  };
175
+ var OraclePriceError404ErrorCode = {
176
+ notFound: "not_found"
177
+ };
178
+ var OraclePriceError500ErrorCode = {
179
+ internalError: "internal_error"
180
+ };
151
181
  var OrderHistoryStatus = {
152
182
  open: "open",
153
183
  partiallyFilled: "partially_filled",
@@ -178,6 +208,27 @@ var PoolSubscriptionTopic = {
178
208
  orderBook: "order_book",
179
209
  poolPrices: "pool_prices"
180
210
  };
211
+ var PoolsError400BadRequestCode = {
212
+ badRequest: "bad_request"
213
+ };
214
+ var PoolsError404ErrorCode = {
215
+ notFound: "not_found"
216
+ };
217
+ var PoolsError500ErrorCode = {
218
+ internalError: "internal_error"
219
+ };
220
+ var SpotPositionError404ErrorCode = {
221
+ notFound: "not_found"
222
+ };
223
+ var SpotPositionError500ErrorCode = {
224
+ internalError: "internal_error"
225
+ };
226
+ var StakingError400BadRequestCode = {
227
+ badRequest: "bad_request"
228
+ };
229
+ var StakingError500ErrorCode = {
230
+ internalError: "internal_error"
231
+ };
181
232
  var StakingPositionActionType = {
182
233
  stake: "stake",
183
234
  unstake: "unstake",
@@ -185,6 +236,12 @@ var StakingPositionActionType = {
185
236
  claimRewards: "claim_rewards",
186
237
  compoundRewards: "compound_rewards"
187
238
  };
239
+ var StatsError400BadRequestCode = {
240
+ badRequest: "bad_request"
241
+ };
242
+ var StatsError500ErrorCode = {
243
+ internalError: "internal_error"
244
+ };
188
245
  var TradeHistoryAction = {
189
246
  swap: "swap",
190
247
  limitOrderFill: "limit_order_fill",
@@ -254,12 +311,27 @@ var TunaSpotPositionDtoState = {
254
311
  open: "open",
255
312
  closed: "closed"
256
313
  };
314
+ var UpdateStreamSubscriptionError404ErrorCode = {
315
+ notFound: "not_found"
316
+ };
317
+ var UpdateStreamSubscriptionError500ErrorCode = {
318
+ internalError: "internal_error"
319
+ };
257
320
  var ValidationErrorCodeErrorBodyCode = {
258
321
  validationFailed: "validation_failed"
259
322
  };
260
323
  var ValidationErrorCodeValidationDetailsErrorBodyCode = {
261
324
  validationFailed: "validation_failed"
262
325
  };
326
+ var VaultError400BadRequestCode = {
327
+ badRequest: "bad_request"
328
+ };
329
+ var VaultError404ErrorCode = {
330
+ notFound: "not_found"
331
+ };
332
+ var VaultError500ErrorCode = {
333
+ internalError: "internal_error"
334
+ };
263
335
  var WalletSubscriptionTopic = {
264
336
  tunaPositions: "tuna_positions",
265
337
  tunaSpotPositions: "tuna_spot_positions",
@@ -890,12 +962,12 @@ var getSpotPositions = async (userAddress, options) => {
890
962
  }
891
963
  );
892
964
  };
893
- var getGetSpotPositionUrl = (userAddress, spotPositionAddress) => {
894
- return `/v1/users/${userAddress}/spot-positions/${spotPositionAddress}`;
965
+ var getGetSpotPositionUrl = (userAddress, positionAddress) => {
966
+ return `/v1/users/${userAddress}/spot-positions/${positionAddress}`;
895
967
  };
896
- var getSpotPosition = async (userAddress, spotPositionAddress, options) => {
968
+ var getSpotPosition = async (userAddress, positionAddress, options) => {
897
969
  return customFetch(
898
- getGetSpotPositionUrl(userAddress, spotPositionAddress),
970
+ getGetSpotPositionUrl(userAddress, positionAddress),
899
971
  {
900
972
  ...options,
901
973
  method: "GET"
@@ -1469,17 +1541,36 @@ export {
1469
1541
  GetLimitOrderError404ErrorCode,
1470
1542
  GetLimitOrderError500ErrorCode,
1471
1543
  InternalErrorCodeErrorBodyCode,
1544
+ LeaderboardError400BadRequestCode,
1545
+ LeaderboardError500ErrorCode,
1472
1546
  LeaderboardPeriod,
1473
1547
  LeaderboardSortBy,
1474
1548
  LimitOrderStatus,
1549
+ LpPositionsError400BadRequestCode,
1550
+ LpPositionsError500ErrorCode,
1551
+ MarketError404ErrorCode,
1552
+ MarketError500ErrorCode,
1553
+ MintError404ErrorCode,
1554
+ MintError500ErrorCode,
1475
1555
  NotificationAction,
1476
1556
  NotificationEntity,
1557
+ OraclePriceError404ErrorCode,
1558
+ OraclePriceError500ErrorCode,
1477
1559
  OrderHistoryStatus,
1478
1560
  OrderHistoryType,
1479
1561
  OrderHistoryUIDirection,
1480
1562
  PoolProvider,
1481
1563
  PoolSubscriptionTopic,
1564
+ PoolsError400BadRequestCode,
1565
+ PoolsError404ErrorCode,
1566
+ PoolsError500ErrorCode,
1567
+ SpotPositionError404ErrorCode,
1568
+ SpotPositionError500ErrorCode,
1569
+ StakingError400BadRequestCode,
1570
+ StakingError500ErrorCode,
1482
1571
  StakingPositionActionType,
1572
+ StatsError400BadRequestCode,
1573
+ StatsError500ErrorCode,
1483
1574
  TradeHistoryAction,
1484
1575
  TradeHistoryUIDirection,
1485
1576
  TunaLpPositionAutoCompound,
@@ -1491,8 +1582,13 @@ export {
1491
1582
  TunaPositionMarketMaker,
1492
1583
  TunaPositionPoolToken,
1493
1584
  TunaSpotPositionDtoState,
1585
+ UpdateStreamSubscriptionError404ErrorCode,
1586
+ UpdateStreamSubscriptionError500ErrorCode,
1494
1587
  ValidationErrorCodeErrorBodyCode,
1495
1588
  ValidationErrorCodeValidationDetailsErrorBodyCode,
1589
+ VaultError400BadRequestCode,
1590
+ VaultError404ErrorCode,
1591
+ VaultError500ErrorCode,
1496
1592
  WalletSubscriptionTopic,
1497
1593
  eventIsInitialMessage,
1498
1594
  eventIsLendingPosition,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-api",
3
- "version": "3.0.4",
3
+ "version": "3.1.0",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",