@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.cjs CHANGED
@@ -23,17 +23,36 @@ __export(index_exports, {
23
23
  GetLimitOrderError404ErrorCode: () => GetLimitOrderError404ErrorCode,
24
24
  GetLimitOrderError500ErrorCode: () => GetLimitOrderError500ErrorCode,
25
25
  InternalErrorCodeErrorBodyCode: () => InternalErrorCodeErrorBodyCode,
26
+ LeaderboardError400BadRequestCode: () => LeaderboardError400BadRequestCode,
27
+ LeaderboardError500ErrorCode: () => LeaderboardError500ErrorCode,
26
28
  LeaderboardPeriod: () => LeaderboardPeriod,
27
29
  LeaderboardSortBy: () => LeaderboardSortBy,
28
30
  LimitOrderStatus: () => LimitOrderStatus,
31
+ LpPositionsError400BadRequestCode: () => LpPositionsError400BadRequestCode,
32
+ LpPositionsError500ErrorCode: () => LpPositionsError500ErrorCode,
33
+ MarketError404ErrorCode: () => MarketError404ErrorCode,
34
+ MarketError500ErrorCode: () => MarketError500ErrorCode,
35
+ MintError404ErrorCode: () => MintError404ErrorCode,
36
+ MintError500ErrorCode: () => MintError500ErrorCode,
29
37
  NotificationAction: () => NotificationAction,
30
38
  NotificationEntity: () => NotificationEntity,
39
+ OraclePriceError404ErrorCode: () => OraclePriceError404ErrorCode,
40
+ OraclePriceError500ErrorCode: () => OraclePriceError500ErrorCode,
31
41
  OrderHistoryStatus: () => OrderHistoryStatus,
32
42
  OrderHistoryType: () => OrderHistoryType,
33
43
  OrderHistoryUIDirection: () => OrderHistoryUIDirection,
34
44
  PoolProvider: () => PoolProvider,
35
45
  PoolSubscriptionTopic: () => PoolSubscriptionTopic,
46
+ PoolsError400BadRequestCode: () => PoolsError400BadRequestCode,
47
+ PoolsError404ErrorCode: () => PoolsError404ErrorCode,
48
+ PoolsError500ErrorCode: () => PoolsError500ErrorCode,
49
+ SpotPositionError404ErrorCode: () => SpotPositionError404ErrorCode,
50
+ SpotPositionError500ErrorCode: () => SpotPositionError500ErrorCode,
51
+ StakingError400BadRequestCode: () => StakingError400BadRequestCode,
52
+ StakingError500ErrorCode: () => StakingError500ErrorCode,
36
53
  StakingPositionActionType: () => StakingPositionActionType,
54
+ StatsError400BadRequestCode: () => StatsError400BadRequestCode,
55
+ StatsError500ErrorCode: () => StatsError500ErrorCode,
37
56
  TradeHistoryAction: () => TradeHistoryAction,
38
57
  TradeHistoryUIDirection: () => TradeHistoryUIDirection,
39
58
  TunaLpPositionAutoCompound: () => TunaLpPositionAutoCompound,
@@ -45,8 +64,13 @@ __export(index_exports, {
45
64
  TunaPositionMarketMaker: () => TunaPositionMarketMaker,
46
65
  TunaPositionPoolToken: () => TunaPositionPoolToken,
47
66
  TunaSpotPositionDtoState: () => TunaSpotPositionDtoState,
67
+ UpdateStreamSubscriptionError404ErrorCode: () => UpdateStreamSubscriptionError404ErrorCode,
68
+ UpdateStreamSubscriptionError500ErrorCode: () => UpdateStreamSubscriptionError500ErrorCode,
48
69
  ValidationErrorCodeErrorBodyCode: () => ValidationErrorCodeErrorBodyCode,
49
70
  ValidationErrorCodeValidationDetailsErrorBodyCode: () => ValidationErrorCodeValidationDetailsErrorBodyCode,
71
+ VaultError400BadRequestCode: () => VaultError400BadRequestCode,
72
+ VaultError404ErrorCode: () => VaultError404ErrorCode,
73
+ VaultError500ErrorCode: () => VaultError500ErrorCode,
50
74
  WalletSubscriptionTopic: () => WalletSubscriptionTopic,
51
75
  eventIsInitialMessage: () => eventIsInitialMessage,
52
76
  eventIsLendingPosition: () => eventIsLendingPosition,
@@ -260,9 +284,9 @@ async function customFetch(url, init) {
260
284
 
261
285
  // src/gen/defiTunaAPI.ts
262
286
  var BadRequestErrorCodeErrorBodyCode = {
287
+ invalidBody: "invalid_body",
263
288
  invalidPath: "invalid_path",
264
- invalidQuery: "invalid_query",
265
- invalidBody: "invalid_body"
289
+ invalidQuery: "invalid_query"
266
290
  };
267
291
  var GetLimitOrderError404ErrorCode = {
268
292
  notFound: "not_found"
@@ -273,6 +297,12 @@ var GetLimitOrderError500ErrorCode = {
273
297
  var InternalErrorCodeErrorBodyCode = {
274
298
  internalError: "internal_error"
275
299
  };
300
+ var LeaderboardError400BadRequestCode = {
301
+ badRequest: "bad_request"
302
+ };
303
+ var LeaderboardError500ErrorCode = {
304
+ internalError: "internal_error"
305
+ };
276
306
  var LeaderboardPeriod = {
277
307
  week: "week"
278
308
  };
@@ -287,6 +317,24 @@ var LimitOrderStatus = {
287
317
  complete: "complete",
288
318
  cancelled: "cancelled"
289
319
  };
320
+ var LpPositionsError400BadRequestCode = {
321
+ badRequest: "bad_request"
322
+ };
323
+ var LpPositionsError500ErrorCode = {
324
+ internalError: "internal_error"
325
+ };
326
+ var MarketError404ErrorCode = {
327
+ notFound: "not_found"
328
+ };
329
+ var MarketError500ErrorCode = {
330
+ internalError: "internal_error"
331
+ };
332
+ var MintError404ErrorCode = {
333
+ notFound: "not_found"
334
+ };
335
+ var MintError500ErrorCode = {
336
+ internalError: "internal_error"
337
+ };
290
338
  var NotificationAction = {
291
339
  create: "create",
292
340
  update: "update"
@@ -306,6 +354,12 @@ var NotificationEntity = {
306
354
  orderHistoryEntry: "order_history_entry",
307
355
  stateSnapshot: "state_snapshot"
308
356
  };
357
+ var OraclePriceError404ErrorCode = {
358
+ notFound: "not_found"
359
+ };
360
+ var OraclePriceError500ErrorCode = {
361
+ internalError: "internal_error"
362
+ };
309
363
  var OrderHistoryStatus = {
310
364
  open: "open",
311
365
  partiallyFilled: "partially_filled",
@@ -336,6 +390,27 @@ var PoolSubscriptionTopic = {
336
390
  orderBook: "order_book",
337
391
  poolPrices: "pool_prices"
338
392
  };
393
+ var PoolsError400BadRequestCode = {
394
+ badRequest: "bad_request"
395
+ };
396
+ var PoolsError404ErrorCode = {
397
+ notFound: "not_found"
398
+ };
399
+ var PoolsError500ErrorCode = {
400
+ internalError: "internal_error"
401
+ };
402
+ var SpotPositionError404ErrorCode = {
403
+ notFound: "not_found"
404
+ };
405
+ var SpotPositionError500ErrorCode = {
406
+ internalError: "internal_error"
407
+ };
408
+ var StakingError400BadRequestCode = {
409
+ badRequest: "bad_request"
410
+ };
411
+ var StakingError500ErrorCode = {
412
+ internalError: "internal_error"
413
+ };
339
414
  var StakingPositionActionType = {
340
415
  stake: "stake",
341
416
  unstake: "unstake",
@@ -343,6 +418,12 @@ var StakingPositionActionType = {
343
418
  claimRewards: "claim_rewards",
344
419
  compoundRewards: "compound_rewards"
345
420
  };
421
+ var StatsError400BadRequestCode = {
422
+ badRequest: "bad_request"
423
+ };
424
+ var StatsError500ErrorCode = {
425
+ internalError: "internal_error"
426
+ };
346
427
  var TradeHistoryAction = {
347
428
  swap: "swap",
348
429
  limitOrderFill: "limit_order_fill",
@@ -412,12 +493,27 @@ var TunaSpotPositionDtoState = {
412
493
  open: "open",
413
494
  closed: "closed"
414
495
  };
496
+ var UpdateStreamSubscriptionError404ErrorCode = {
497
+ notFound: "not_found"
498
+ };
499
+ var UpdateStreamSubscriptionError500ErrorCode = {
500
+ internalError: "internal_error"
501
+ };
415
502
  var ValidationErrorCodeErrorBodyCode = {
416
503
  validationFailed: "validation_failed"
417
504
  };
418
505
  var ValidationErrorCodeValidationDetailsErrorBodyCode = {
419
506
  validationFailed: "validation_failed"
420
507
  };
508
+ var VaultError400BadRequestCode = {
509
+ badRequest: "bad_request"
510
+ };
511
+ var VaultError404ErrorCode = {
512
+ notFound: "not_found"
513
+ };
514
+ var VaultError500ErrorCode = {
515
+ internalError: "internal_error"
516
+ };
421
517
  var WalletSubscriptionTopic = {
422
518
  tunaPositions: "tuna_positions",
423
519
  tunaSpotPositions: "tuna_spot_positions",
@@ -1048,12 +1144,12 @@ var getSpotPositions = async (userAddress, options) => {
1048
1144
  }
1049
1145
  );
1050
1146
  };
1051
- var getGetSpotPositionUrl = (userAddress, spotPositionAddress) => {
1052
- return `/v1/users/${userAddress}/spot-positions/${spotPositionAddress}`;
1147
+ var getGetSpotPositionUrl = (userAddress, positionAddress) => {
1148
+ return `/v1/users/${userAddress}/spot-positions/${positionAddress}`;
1053
1149
  };
1054
- var getSpotPosition = async (userAddress, spotPositionAddress, options) => {
1150
+ var getSpotPosition = async (userAddress, positionAddress, options) => {
1055
1151
  return customFetch(
1056
- getGetSpotPositionUrl(userAddress, spotPositionAddress),
1152
+ getGetSpotPositionUrl(userAddress, positionAddress),
1057
1153
  {
1058
1154
  ...options,
1059
1155
  method: "GET"
@@ -1628,17 +1724,36 @@ function eventIsStateSnapshot(event) {
1628
1724
  GetLimitOrderError404ErrorCode,
1629
1725
  GetLimitOrderError500ErrorCode,
1630
1726
  InternalErrorCodeErrorBodyCode,
1727
+ LeaderboardError400BadRequestCode,
1728
+ LeaderboardError500ErrorCode,
1631
1729
  LeaderboardPeriod,
1632
1730
  LeaderboardSortBy,
1633
1731
  LimitOrderStatus,
1732
+ LpPositionsError400BadRequestCode,
1733
+ LpPositionsError500ErrorCode,
1734
+ MarketError404ErrorCode,
1735
+ MarketError500ErrorCode,
1736
+ MintError404ErrorCode,
1737
+ MintError500ErrorCode,
1634
1738
  NotificationAction,
1635
1739
  NotificationEntity,
1740
+ OraclePriceError404ErrorCode,
1741
+ OraclePriceError500ErrorCode,
1636
1742
  OrderHistoryStatus,
1637
1743
  OrderHistoryType,
1638
1744
  OrderHistoryUIDirection,
1639
1745
  PoolProvider,
1640
1746
  PoolSubscriptionTopic,
1747
+ PoolsError400BadRequestCode,
1748
+ PoolsError404ErrorCode,
1749
+ PoolsError500ErrorCode,
1750
+ SpotPositionError404ErrorCode,
1751
+ SpotPositionError500ErrorCode,
1752
+ StakingError400BadRequestCode,
1753
+ StakingError500ErrorCode,
1641
1754
  StakingPositionActionType,
1755
+ StatsError400BadRequestCode,
1756
+ StatsError500ErrorCode,
1642
1757
  TradeHistoryAction,
1643
1758
  TradeHistoryUIDirection,
1644
1759
  TunaLpPositionAutoCompound,
@@ -1650,8 +1765,13 @@ function eventIsStateSnapshot(event) {
1650
1765
  TunaPositionMarketMaker,
1651
1766
  TunaPositionPoolToken,
1652
1767
  TunaSpotPositionDtoState,
1768
+ UpdateStreamSubscriptionError404ErrorCode,
1769
+ UpdateStreamSubscriptionError500ErrorCode,
1653
1770
  ValidationErrorCodeErrorBodyCode,
1654
1771
  ValidationErrorCodeValidationDetailsErrorBodyCode,
1772
+ VaultError400BadRequestCode,
1773
+ VaultError404ErrorCode,
1774
+ VaultError500ErrorCode,
1655
1775
  WalletSubscriptionTopic,
1656
1776
  eventIsInitialMessage,
1657
1777
  eventIsLendingPosition,