@ember-finance/sdk 1.0.21 → 1.0.22
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/src/vaults/api/apis/vaults-api.d.ts +42 -0
- package/dist/src/vaults/api/apis/vaults-api.js +84 -0
- package/dist/src/vaults/api/models/apy-history-v2.d.ts +49 -0
- package/dist/src/vaults/api/models/apy-history-v2.js +15 -0
- package/dist/src/vaults/api/models/index.d.ts +1 -0
- package/dist/src/vaults/api/models/index.js +1 -0
- package/package.json +2 -2
|
@@ -13,6 +13,7 @@ import type { Configuration } from "../configuration";
|
|
|
13
13
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios";
|
|
14
14
|
import { type RequestArgs, BaseAPI } from "../base";
|
|
15
15
|
import type { ApyHistory } from "../models";
|
|
16
|
+
import type { ApyHistoryV2 } from "../models";
|
|
16
17
|
import type { CoinPrice } from "../models";
|
|
17
18
|
import type { Exposure } from "../models";
|
|
18
19
|
import type { Fees } from "../models";
|
|
@@ -96,6 +97,16 @@ export declare const VaultsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
96
97
|
* @throws {RequiredError}
|
|
97
98
|
*/
|
|
98
99
|
getVaultApyHistory: (vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @summary Get the apy history of the vault (1h, 1d, 1w, 1mon) descending by time
|
|
103
|
+
* @param {string} vaultId The id of the vault
|
|
104
|
+
* @param {number} [limit] The limit of the rows
|
|
105
|
+
* @param {HistoryInterval} [interval] The interval of the rows
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
*/
|
|
109
|
+
getVaultApyHistoryV2: (vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
99
110
|
/**
|
|
100
111
|
*
|
|
101
112
|
* @summary Get the exposure of the vault
|
|
@@ -242,6 +253,16 @@ export declare const VaultsApiFp: (configuration?: Configuration) => {
|
|
|
242
253
|
* @throws {RequiredError}
|
|
243
254
|
*/
|
|
244
255
|
getVaultApyHistory(vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ApyHistory>>>;
|
|
256
|
+
/**
|
|
257
|
+
*
|
|
258
|
+
* @summary Get the apy history of the vault (1h, 1d, 1w, 1mon) descending by time
|
|
259
|
+
* @param {string} vaultId The id of the vault
|
|
260
|
+
* @param {number} [limit] The limit of the rows
|
|
261
|
+
* @param {HistoryInterval} [interval] The interval of the rows
|
|
262
|
+
* @param {*} [options] Override http request option.
|
|
263
|
+
* @throws {RequiredError}
|
|
264
|
+
*/
|
|
265
|
+
getVaultApyHistoryV2(vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApyHistoryV2>>;
|
|
245
266
|
/**
|
|
246
267
|
*
|
|
247
268
|
* @summary Get the exposure of the vault
|
|
@@ -388,6 +409,16 @@ export declare const VaultsApiFactory: (configuration?: Configuration, basePath?
|
|
|
388
409
|
* @throws {RequiredError}
|
|
389
410
|
*/
|
|
390
411
|
getVaultApyHistory(vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig): AxiosPromise<Array<ApyHistory>>;
|
|
412
|
+
/**
|
|
413
|
+
*
|
|
414
|
+
* @summary Get the apy history of the vault (1h, 1d, 1w, 1mon) descending by time
|
|
415
|
+
* @param {string} vaultId The id of the vault
|
|
416
|
+
* @param {number} [limit] The limit of the rows
|
|
417
|
+
* @param {HistoryInterval} [interval] The interval of the rows
|
|
418
|
+
* @param {*} [options] Override http request option.
|
|
419
|
+
* @throws {RequiredError}
|
|
420
|
+
*/
|
|
421
|
+
getVaultApyHistoryV2(vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig): AxiosPromise<ApyHistoryV2>;
|
|
391
422
|
/**
|
|
392
423
|
*
|
|
393
424
|
* @summary Get the exposure of the vault
|
|
@@ -543,6 +574,17 @@ export declare class VaultsApi extends BaseAPI {
|
|
|
543
574
|
* @memberof VaultsApi
|
|
544
575
|
*/
|
|
545
576
|
getVaultApyHistory(vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ApyHistory[], any, {}>>;
|
|
577
|
+
/**
|
|
578
|
+
*
|
|
579
|
+
* @summary Get the apy history of the vault (1h, 1d, 1w, 1mon) descending by time
|
|
580
|
+
* @param {string} vaultId The id of the vault
|
|
581
|
+
* @param {number} [limit] The limit of the rows
|
|
582
|
+
* @param {HistoryInterval} [interval] The interval of the rows
|
|
583
|
+
* @param {*} [options] Override http request option.
|
|
584
|
+
* @throws {RequiredError}
|
|
585
|
+
* @memberof VaultsApi
|
|
586
|
+
*/
|
|
587
|
+
getVaultApyHistoryV2(vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ApyHistoryV2, any, {}>>;
|
|
546
588
|
/**
|
|
547
589
|
*
|
|
548
590
|
* @summary Get the exposure of the vault
|
|
@@ -293,6 +293,46 @@ const VaultsApiAxiosParamCreator = function (configuration) {
|
|
|
293
293
|
options: localVarRequestOptions
|
|
294
294
|
};
|
|
295
295
|
},
|
|
296
|
+
/**
|
|
297
|
+
*
|
|
298
|
+
* @summary Get the apy history of the vault (1h, 1d, 1w, 1mon) descending by time
|
|
299
|
+
* @param {string} vaultId The id of the vault
|
|
300
|
+
* @param {number} [limit] The limit of the rows
|
|
301
|
+
* @param {HistoryInterval} [interval] The interval of the rows
|
|
302
|
+
* @param {*} [options] Override http request option.
|
|
303
|
+
* @throws {RequiredError}
|
|
304
|
+
*/
|
|
305
|
+
getVaultApyHistoryV2: async (vaultId, limit, interval, options = {}) => {
|
|
306
|
+
// verify required parameter 'vaultId' is not null or undefined
|
|
307
|
+
(0, common_1.assertParamExists)("getVaultApyHistoryV2", "vaultId", vaultId);
|
|
308
|
+
const localVarPath = `/api/v1/vaults/apy-history/v2/{vaultId}`.replace(`{${"vaultId"}}`, encodeURIComponent(String(vaultId)));
|
|
309
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
310
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
311
|
+
let baseOptions;
|
|
312
|
+
if (configuration) {
|
|
313
|
+
baseOptions = configuration.baseOptions;
|
|
314
|
+
}
|
|
315
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
316
|
+
const localVarHeaderParameter = {};
|
|
317
|
+
const localVarQueryParameter = {};
|
|
318
|
+
if (limit !== undefined) {
|
|
319
|
+
localVarQueryParameter["limit"] = limit;
|
|
320
|
+
}
|
|
321
|
+
if (interval !== undefined) {
|
|
322
|
+
localVarQueryParameter["interval"] = interval;
|
|
323
|
+
}
|
|
324
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
325
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
326
|
+
localVarRequestOptions.headers = {
|
|
327
|
+
...localVarHeaderParameter,
|
|
328
|
+
...headersFromBaseOptions,
|
|
329
|
+
...options.headers
|
|
330
|
+
};
|
|
331
|
+
return {
|
|
332
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
333
|
+
options: localVarRequestOptions
|
|
334
|
+
};
|
|
335
|
+
},
|
|
296
336
|
/**
|
|
297
337
|
*
|
|
298
338
|
* @summary Get the exposure of the vault
|
|
@@ -716,6 +756,21 @@ const VaultsApiFp = function (configuration) {
|
|
|
716
756
|
const localVarOperationServerBasePath = base_1.operationServerMap["VaultsApi.getVaultApyHistory"]?.[localVarOperationServerIndex]?.url;
|
|
717
757
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
718
758
|
},
|
|
759
|
+
/**
|
|
760
|
+
*
|
|
761
|
+
* @summary Get the apy history of the vault (1h, 1d, 1w, 1mon) descending by time
|
|
762
|
+
* @param {string} vaultId The id of the vault
|
|
763
|
+
* @param {number} [limit] The limit of the rows
|
|
764
|
+
* @param {HistoryInterval} [interval] The interval of the rows
|
|
765
|
+
* @param {*} [options] Override http request option.
|
|
766
|
+
* @throws {RequiredError}
|
|
767
|
+
*/
|
|
768
|
+
async getVaultApyHistoryV2(vaultId, limit, interval, options) {
|
|
769
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getVaultApyHistoryV2(vaultId, limit, interval, options);
|
|
770
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
771
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["VaultsApi.getVaultApyHistoryV2"]?.[localVarOperationServerIndex]?.url;
|
|
772
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
773
|
+
},
|
|
719
774
|
/**
|
|
720
775
|
*
|
|
721
776
|
* @summary Get the exposure of the vault
|
|
@@ -940,6 +995,20 @@ const VaultsApiFactory = function (configuration, basePath, axios) {
|
|
|
940
995
|
.getVaultApyHistory(vaultId, limit, interval, options)
|
|
941
996
|
.then(request => request(axios, basePath));
|
|
942
997
|
},
|
|
998
|
+
/**
|
|
999
|
+
*
|
|
1000
|
+
* @summary Get the apy history of the vault (1h, 1d, 1w, 1mon) descending by time
|
|
1001
|
+
* @param {string} vaultId The id of the vault
|
|
1002
|
+
* @param {number} [limit] The limit of the rows
|
|
1003
|
+
* @param {HistoryInterval} [interval] The interval of the rows
|
|
1004
|
+
* @param {*} [options] Override http request option.
|
|
1005
|
+
* @throws {RequiredError}
|
|
1006
|
+
*/
|
|
1007
|
+
getVaultApyHistoryV2(vaultId, limit, interval, options) {
|
|
1008
|
+
return localVarFp
|
|
1009
|
+
.getVaultApyHistoryV2(vaultId, limit, interval, options)
|
|
1010
|
+
.then(request => request(axios, basePath));
|
|
1011
|
+
},
|
|
943
1012
|
/**
|
|
944
1013
|
*
|
|
945
1014
|
* @summary Get the exposure of the vault
|
|
@@ -1161,6 +1230,21 @@ class VaultsApi extends base_1.BaseAPI {
|
|
|
1161
1230
|
.getVaultApyHistory(vaultId, limit, interval, options)
|
|
1162
1231
|
.then(request => request(this.axios, this.basePath));
|
|
1163
1232
|
}
|
|
1233
|
+
/**
|
|
1234
|
+
*
|
|
1235
|
+
* @summary Get the apy history of the vault (1h, 1d, 1w, 1mon) descending by time
|
|
1236
|
+
* @param {string} vaultId The id of the vault
|
|
1237
|
+
* @param {number} [limit] The limit of the rows
|
|
1238
|
+
* @param {HistoryInterval} [interval] The interval of the rows
|
|
1239
|
+
* @param {*} [options] Override http request option.
|
|
1240
|
+
* @throws {RequiredError}
|
|
1241
|
+
* @memberof VaultsApi
|
|
1242
|
+
*/
|
|
1243
|
+
getVaultApyHistoryV2(vaultId, limit, interval, options) {
|
|
1244
|
+
return (0, exports.VaultsApiFp)(this.configuration)
|
|
1245
|
+
.getVaultApyHistoryV2(vaultId, limit, interval, options)
|
|
1246
|
+
.then(request => request(this.axios, this.basePath));
|
|
1247
|
+
}
|
|
1164
1248
|
/**
|
|
1165
1249
|
*
|
|
1166
1250
|
* @summary Get the exposure of the vault
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
import type { ApyHistory } from "./apy-history";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ApyHistoryV2
|
|
17
|
+
*/
|
|
18
|
+
export interface ApyHistoryV2 {
|
|
19
|
+
/**
|
|
20
|
+
* The average total (vaults + lending) apy of the vault over the last 7 days
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ApyHistoryV2
|
|
23
|
+
*/
|
|
24
|
+
avg7dTotalApyE9: string;
|
|
25
|
+
/**
|
|
26
|
+
* The average total (vaults + lending) apy of the vault over the last 30 days
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof ApyHistoryV2
|
|
29
|
+
*/
|
|
30
|
+
avg30dTotalApyE9: string;
|
|
31
|
+
/**
|
|
32
|
+
* The average total (vaults + lending) apy of the vault over the last 60 days
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof ApyHistoryV2
|
|
35
|
+
*/
|
|
36
|
+
avg60dTotalApyE9: string;
|
|
37
|
+
/**
|
|
38
|
+
* The average total (vaults + lending) apy of the vault over the last 90 days
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ApyHistoryV2
|
|
41
|
+
*/
|
|
42
|
+
avg90dTotalApyE9: string;
|
|
43
|
+
/**
|
|
44
|
+
* The historical apy data of the vault
|
|
45
|
+
* @type {Array<ApyHistory>}
|
|
46
|
+
* @memberof ApyHistoryV2
|
|
47
|
+
*/
|
|
48
|
+
data: Array<ApyHistory>;
|
|
49
|
+
}
|
|
@@ -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 });
|
|
@@ -2,6 +2,7 @@ export * from "./account-transaction";
|
|
|
2
2
|
export * from "./account-transaction-transaction-data";
|
|
3
3
|
export * from "./account-withdrawal-request";
|
|
4
4
|
export * from "./apy-history";
|
|
5
|
+
export * from "./apy-history-v2";
|
|
5
6
|
export * from "./asset";
|
|
6
7
|
export * from "./borrowed";
|
|
7
8
|
export * from "./chain";
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./account-transaction"), exports);
|
|
|
18
18
|
__exportStar(require("./account-transaction-transaction-data"), exports);
|
|
19
19
|
__exportStar(require("./account-withdrawal-request"), exports);
|
|
20
20
|
__exportStar(require("./apy-history"), exports);
|
|
21
|
+
__exportStar(require("./apy-history-v2"), exports);
|
|
21
22
|
__exportStar(require("./asset"), exports);
|
|
22
23
|
__exportStar(require("./borrowed"), exports);
|
|
23
24
|
__exportStar(require("./chain"), exports);
|
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.
|
|
4
|
+
"version": "1.0.22",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"publish-beta": "npm publish --tag beta",
|
|
35
35
|
"generate:vaults:api-client": "openapi-generator-cli generate -i ./src/vaults/api/openapi.yml -g typescript-axios -c ./src/vaults/api/config.json -o ./src/vaults/api",
|
|
36
36
|
"generate:vaults:md-docs": "widdershins --search false --language_tabs 'typescript:TypeScript' --summary ./src/vaults/api/openapi.yml -o ./src/vaults/api/README.md",
|
|
37
|
-
"generate:vaults": "yarn run generate:vaults:api-client && yarn run generate:vaults:md-docs"
|
|
37
|
+
"generate:vaults": "yarn run generate:vaults:api-client && yarn run generate:vaults:md-docs && yarn run format-all"
|
|
38
38
|
},
|
|
39
39
|
"directories": {
|
|
40
40
|
"test": "tests"
|