@ember-finance/sdk 1.0.17 → 1.0.19

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.
@@ -15,6 +15,7 @@ import { type RequestArgs, BaseAPI } from "../base";
15
15
  import type { ApyHistory } from "../models";
16
16
  import type { CoinPrice } from "../models";
17
17
  import type { Exposure } from "../models";
18
+ import type { Fees } from "../models";
18
19
  import type { HistoryInterval } from "../models";
19
20
  import type { PnlHistory } from "../models";
20
21
  import type { PnlHistoryInterval } from "../models";
@@ -47,6 +48,15 @@ export declare const VaultsApiAxiosParamCreator: (configuration?: Configuration)
47
48
  * @throws {RequiredError}
48
49
  */
49
50
  getCoinsPrice: (coinTypes?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
51
+ /**
52
+ *
53
+ * @summary Get the fees of the protocol
54
+ * @param {number} startTimestampInMs The start timestamp of the fees
55
+ * @param {number} endTimestampInMs The end timestamp of the fees
56
+ * @param {*} [options] Override http request option.
57
+ * @throws {RequiredError}
58
+ */
59
+ getFees: (startTimestampInMs: number, endTimestampInMs: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
50
60
  /**
51
61
  *
52
62
  * @summary Get the pnl history of the protocol (1h, 1d, 1w, 1mon) descending by time
@@ -184,6 +194,15 @@ export declare const VaultsApiFp: (configuration?: Configuration) => {
184
194
  * @throws {RequiredError}
185
195
  */
186
196
  getCoinsPrice(coinTypes?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<CoinPrice>>>;
197
+ /**
198
+ *
199
+ * @summary Get the fees of the protocol
200
+ * @param {number} startTimestampInMs The start timestamp of the fees
201
+ * @param {number} endTimestampInMs The end timestamp of the fees
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ getFees(startTimestampInMs: number, endTimestampInMs: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Fees>>;
187
206
  /**
188
207
  *
189
208
  * @summary Get the pnl history of the protocol (1h, 1d, 1w, 1mon) descending by time
@@ -321,6 +340,15 @@ export declare const VaultsApiFactory: (configuration?: Configuration, basePath?
321
340
  * @throws {RequiredError}
322
341
  */
323
342
  getCoinsPrice(coinTypes?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<CoinPrice>>;
343
+ /**
344
+ *
345
+ * @summary Get the fees of the protocol
346
+ * @param {number} startTimestampInMs The start timestamp of the fees
347
+ * @param {number} endTimestampInMs The end timestamp of the fees
348
+ * @param {*} [options] Override http request option.
349
+ * @throws {RequiredError}
350
+ */
351
+ getFees(startTimestampInMs: number, endTimestampInMs: number, options?: RawAxiosRequestConfig): AxiosPromise<Fees>;
324
352
  /**
325
353
  *
326
354
  * @summary Get the pnl history of the protocol (1h, 1d, 1w, 1mon) descending by time
@@ -462,6 +490,16 @@ export declare class VaultsApi extends BaseAPI {
462
490
  * @memberof VaultsApi
463
491
  */
464
492
  getCoinsPrice(coinTypes?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CoinPrice[], any, {}>>;
493
+ /**
494
+ *
495
+ * @summary Get the fees of the protocol
496
+ * @param {number} startTimestampInMs The start timestamp of the fees
497
+ * @param {number} endTimestampInMs The end timestamp of the fees
498
+ * @param {*} [options] Override http request option.
499
+ * @throws {RequiredError}
500
+ * @memberof VaultsApi
501
+ */
502
+ getFees(startTimestampInMs: number, endTimestampInMs: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Fees, any, {}>>;
465
503
  /**
466
504
  *
467
505
  * @summary Get the pnl history of the protocol (1h, 1d, 1w, 1mon) descending by time
@@ -91,6 +91,47 @@ const VaultsApiAxiosParamCreator = function (configuration) {
91
91
  options: localVarRequestOptions
92
92
  };
93
93
  },
94
+ /**
95
+ *
96
+ * @summary Get the fees of the protocol
97
+ * @param {number} startTimestampInMs The start timestamp of the fees
98
+ * @param {number} endTimestampInMs The end timestamp of the fees
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ getFees: async (startTimestampInMs, endTimestampInMs, options = {}) => {
103
+ // verify required parameter 'startTimestampInMs' is not null or undefined
104
+ (0, common_1.assertParamExists)("getFees", "startTimestampInMs", startTimestampInMs);
105
+ // verify required parameter 'endTimestampInMs' is not null or undefined
106
+ (0, common_1.assertParamExists)("getFees", "endTimestampInMs", endTimestampInMs);
107
+ const localVarPath = `/api/v1/vaults/fees`;
108
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
109
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
110
+ let baseOptions;
111
+ if (configuration) {
112
+ baseOptions = configuration.baseOptions;
113
+ }
114
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
115
+ const localVarHeaderParameter = {};
116
+ const localVarQueryParameter = {};
117
+ if (startTimestampInMs !== undefined) {
118
+ localVarQueryParameter["startTimestampInMs"] = startTimestampInMs;
119
+ }
120
+ if (endTimestampInMs !== undefined) {
121
+ localVarQueryParameter["endTimestampInMs"] = endTimestampInMs;
122
+ }
123
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
124
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
125
+ localVarRequestOptions.headers = {
126
+ ...localVarHeaderParameter,
127
+ ...headersFromBaseOptions,
128
+ ...options.headers
129
+ };
130
+ return {
131
+ url: (0, common_1.toPathString)(localVarUrlObj),
132
+ options: localVarRequestOptions
133
+ };
134
+ },
94
135
  /**
95
136
  *
96
137
  * @summary Get the pnl history of the protocol (1h, 1d, 1w, 1mon) descending by time
@@ -601,6 +642,21 @@ const VaultsApiFp = function (configuration) {
601
642
  const localVarOperationServerBasePath = base_1.operationServerMap["VaultsApi.getCoinsPrice"]?.[localVarOperationServerIndex]?.url;
602
643
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
603
644
  },
645
+ /**
646
+ *
647
+ * @summary Get the fees of the protocol
648
+ * @param {number} startTimestampInMs The start timestamp of the fees
649
+ * @param {number} endTimestampInMs The end timestamp of the fees
650
+ * @param {*} [options] Override http request option.
651
+ * @throws {RequiredError}
652
+ */
653
+ async getFees(startTimestampInMs, endTimestampInMs, options) {
654
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFees(startTimestampInMs, endTimestampInMs, options);
655
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
656
+ const localVarOperationServerBasePath = base_1.operationServerMap["VaultsApi.getFees"]?.[localVarOperationServerIndex]
657
+ ?.url;
658
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
659
+ },
604
660
  /**
605
661
  *
606
662
  * @summary Get the pnl history of the protocol (1h, 1d, 1w, 1mon) descending by time
@@ -816,6 +872,19 @@ const VaultsApiFactory = function (configuration, basePath, axios) {
816
872
  .getCoinsPrice(coinTypes, options)
817
873
  .then(request => request(axios, basePath));
818
874
  },
875
+ /**
876
+ *
877
+ * @summary Get the fees of the protocol
878
+ * @param {number} startTimestampInMs The start timestamp of the fees
879
+ * @param {number} endTimestampInMs The end timestamp of the fees
880
+ * @param {*} [options] Override http request option.
881
+ * @throws {RequiredError}
882
+ */
883
+ getFees(startTimestampInMs, endTimestampInMs, options) {
884
+ return localVarFp
885
+ .getFees(startTimestampInMs, endTimestampInMs, options)
886
+ .then(request => request(axios, basePath));
887
+ },
819
888
  /**
820
889
  *
821
890
  * @summary Get the pnl history of the protocol (1h, 1d, 1w, 1mon) descending by time
@@ -1019,6 +1088,20 @@ class VaultsApi extends base_1.BaseAPI {
1019
1088
  .getCoinsPrice(coinTypes, options)
1020
1089
  .then(request => request(this.axios, this.basePath));
1021
1090
  }
1091
+ /**
1092
+ *
1093
+ * @summary Get the fees of the protocol
1094
+ * @param {number} startTimestampInMs The start timestamp of the fees
1095
+ * @param {number} endTimestampInMs The end timestamp of the fees
1096
+ * @param {*} [options] Override http request option.
1097
+ * @throws {RequiredError}
1098
+ * @memberof VaultsApi
1099
+ */
1100
+ getFees(startTimestampInMs, endTimestampInMs, options) {
1101
+ return (0, exports.VaultsApiFp)(this.configuration)
1102
+ .getFees(startTimestampInMs, endTimestampInMs, options)
1103
+ .then(request => request(this.axios, this.basePath));
1104
+ }
1022
1105
  /**
1023
1106
  *
1024
1107
  * @summary Get the pnl history of the protocol (1h, 1d, 1w, 1mon) descending by time
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Ember Protocol Vaults API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface Fees
16
+ */
17
+ export interface Fees {
18
+ /**
19
+ * The start timestamp of the fees
20
+ * @type {number}
21
+ * @memberof Fees
22
+ */
23
+ startTimestampInMs: number;
24
+ /**
25
+ * The end timestamp of the fees
26
+ * @type {number}
27
+ * @memberof Fees
28
+ */
29
+ endTimestampInMs: number;
30
+ /**
31
+ * The fees in e9 in USDC
32
+ * @type {string}
33
+ * @memberof Fees
34
+ */
35
+ feesUsdE9: string;
36
+ /**
37
+ * The revenue in e9 in USDC
38
+ * @type {string}
39
+ * @memberof Fees
40
+ */
41
+ revenueUsdE9: string;
42
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Ember Protocol Vaults API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,6 +11,7 @@ export * from "./exposure";
11
11
  export * from "./exposure-coin";
12
12
  export * from "./exposure-protocol";
13
13
  export * from "./fee";
14
+ export * from "./fees";
14
15
  export * from "./history-interval";
15
16
  export * from "./lp";
16
17
  export * from "./manager";
@@ -27,6 +27,7 @@ __exportStar(require("./exposure"), exports);
27
27
  __exportStar(require("./exposure-coin"), exports);
28
28
  __exportStar(require("./exposure-protocol"), exports);
29
29
  __exportStar(require("./fee"), exports);
30
+ __exportStar(require("./fees"), exports);
30
31
  __exportStar(require("./history-interval"), exports);
31
32
  __exportStar(require("./lp"), exports);
32
33
  __exportStar(require("./manager"), exports);
@@ -33,4 +33,28 @@ export interface PnlHistory {
33
33
  * @memberof PnlHistory
34
34
  */
35
35
  cumulativePnlE9: string;
36
+ /**
37
+ * The pnl in terms of usd
38
+ * @type {string}
39
+ * @memberof PnlHistory
40
+ */
41
+ pnlUsdE9: string;
42
+ /**
43
+ * The cumulative pnl in terms of usd
44
+ * @type {string}
45
+ * @memberof PnlHistory
46
+ */
47
+ cumulativePnlUsdE9: string;
48
+ /**
49
+ * The pnl in terms of deposit coin amount
50
+ * @type {string}
51
+ * @memberof PnlHistory
52
+ */
53
+ pnlInCoinAmount: string;
54
+ /**
55
+ * The cumulative pnl in terms of deposit coin amount
56
+ * @type {string}
57
+ * @memberof PnlHistory
58
+ */
59
+ cumulativePnlInCoinAmount: string;
36
60
  }
@@ -27,12 +27,36 @@ export interface PositionHistory {
27
27
  * @memberof PositionHistory
28
28
  */
29
29
  positionValueUsdE9: string;
30
+ /**
31
+ * The position value in terms of deposit coin amount
32
+ * @type {string}
33
+ * @memberof PositionHistory
34
+ */
35
+ positionValueInCoinAmount: string;
30
36
  /**
31
37
  * The shares of the event
32
38
  * @type {string}
33
39
  * @memberof PositionHistory
34
40
  */
35
41
  shares: string;
42
+ /**
43
+ * The unrealized yield in terms of deposit coin amount
44
+ * @type {string}
45
+ * @memberof PositionHistory
46
+ */
47
+ unrealizedYieldInCoinAmount: string;
48
+ /**
49
+ * The realized yield in terms of deposit coin amount
50
+ * @type {string}
51
+ * @memberof PositionHistory
52
+ */
53
+ realizedYieldInCoinAmount: string;
54
+ /**
55
+ * The total yield in terms of deposit coin amount
56
+ * @type {string}
57
+ * @memberof PositionHistory
58
+ */
59
+ totalYieldInCoinAmount: string;
36
60
  /**
37
61
  * The unrealized yield of the event
38
62
  * @type {string}
@@ -27,6 +27,12 @@ export interface PositionValue {
27
27
  * @memberof PositionValue
28
28
  */
29
29
  positionValueUsdE9: string;
30
+ /**
31
+ * The position value of the account in terms of deposit coin amount
32
+ * @type {string}
33
+ * @memberof PositionValue
34
+ */
35
+ positionValueInCoinAmount: string;
30
36
  /**
31
37
  * The shares of the account
32
38
  * @type {string}
@@ -39,18 +45,36 @@ export interface PositionValue {
39
45
  * @memberof PositionValue
40
46
  */
41
47
  unrealizedYieldUsdE9: string;
48
+ /**
49
+ * The unrealized yield of the account in terms of deposit coin amount
50
+ * @type {string}
51
+ * @memberof PositionValue
52
+ */
53
+ unrealizedYieldInCoinAmount: string;
42
54
  /**
43
55
  * The realized yield value of the account in e9 in USDC
44
56
  * @type {string}
45
57
  * @memberof PositionValue
46
58
  */
47
59
  realizedYieldUsdE9: string;
60
+ /**
61
+ * The realized yield of the account in terms of deposit coin amount
62
+ * @type {string}
63
+ * @memberof PositionValue
64
+ */
65
+ realizedYieldInCoinAmount: string;
48
66
  /**
49
67
  * The total yield value of the account in e9 in USDC
50
68
  * @type {string}
51
69
  * @memberof PositionValue
52
70
  */
53
71
  totalYieldUsdE9: string;
72
+ /**
73
+ * The total yield of the account in terms of deposit coin amount
74
+ * @type {string}
75
+ * @memberof PositionValue
76
+ */
77
+ totalYieldInCoinAmount: string;
54
78
  /**
55
79
  * The status of the position
56
80
  * @type {string}
@@ -39,4 +39,10 @@ export interface Tag {
39
39
  * @memberof Tag
40
40
  */
41
41
  rank: number;
42
+ /**
43
+ * The slug of the tag
44
+ * @type {string}
45
+ * @memberof Tag
46
+ */
47
+ slug: string;
42
48
  }
@@ -27,4 +27,16 @@ export interface TvlHistory {
27
27
  * @memberof TvlHistory
28
28
  */
29
29
  tvlE9: string;
30
+ /**
31
+ * The tvl in terms of usd
32
+ * @type {string}
33
+ * @memberof TvlHistory
34
+ */
35
+ tvlUsdE9: string;
36
+ /**
37
+ * The tvl in terms of deposit coin amount
38
+ * @type {string}
39
+ * @memberof TvlHistory
40
+ */
41
+ tvlInCoinAmount: string;
30
42
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ember-finance/sdk",
3
3
  "description": "Ember Protocol SDK",
4
- "version": "1.0.17",
4
+ "version": "1.0.19",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -86,5 +86,6 @@
86
86
  "ajv": "^6.12.6",
87
87
  "jsonpointer": ">=5.0.0",
88
88
  "form-data": ">=3.0.4"
89
- }
89
+ },
90
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
90
91
  }