@openweb3-io/wallet 0.1.2 → 0.1.3
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.d.ts +2 -14
- package/dist/index.js +87 -167
- package/dist/index.js.map +1 -1
- package/dist/openapi/apis/AddressesApi.js +170 -191
- package/dist/openapi/apis/AddressesApi.js.map +1 -1
- package/dist/openapi/apis/CurrenciesApi.js +94 -111
- package/dist/openapi/apis/CurrenciesApi.js.map +1 -1
- package/dist/openapi/apis/ExchangesApi.js +278 -311
- package/dist/openapi/apis/ExchangesApi.js.map +1 -1
- package/dist/openapi/apis/NetworksApi.js +48 -61
- package/dist/openapi/apis/NetworksApi.js.map +1 -1
- package/dist/openapi/apis/RatesApi.js +105 -122
- package/dist/openapi/apis/RatesApi.js.map +1 -1
- package/dist/openapi/apis/TransactionsApi.js +256 -285
- package/dist/openapi/apis/TransactionsApi.js.map +1 -1
- package/dist/openapi/apis/WalletsApi.js +243 -272
- package/dist/openapi/apis/WalletsApi.js.map +1 -1
- package/dist/openapi/apis/WebhookEndpointsApi.js +190 -219
- package/dist/openapi/apis/WebhookEndpointsApi.js.map +1 -1
- package/dist/openapi/apis/WebhookEventTypesApi.js +31 -44
- package/dist/openapi/apis/WebhookEventTypesApi.js.map +1 -1
- package/dist/openapi/apis/WebhookEventsApi.js +83 -100
- package/dist/openapi/apis/WebhookEventsApi.js.map +1 -1
- package/dist/openapi/dist/apis/AddressesApi.d.ts +12 -0
- package/dist/openapi/dist/apis/AddressesApi.js +222 -0
- package/dist/openapi/dist/apis/AddressesApi.js.map +1 -0
- package/dist/openapi/dist/apis/CurrenciesApi.d.ts +10 -0
- package/dist/openapi/dist/apis/CurrenciesApi.js +140 -0
- package/dist/openapi/dist/apis/CurrenciesApi.js.map +1 -0
- package/dist/openapi/dist/apis/ExchangesApi.d.ts +18 -0
- package/dist/openapi/dist/apis/ExchangesApi.js +348 -0
- package/dist/openapi/dist/apis/ExchangesApi.js.map +1 -0
- package/dist/openapi/dist/apis/NetworksApi.d.ts +8 -0
- package/dist/openapi/dist/apis/NetworksApi.js +88 -0
- package/dist/openapi/dist/apis/NetworksApi.js.map +1 -0
- package/dist/openapi/dist/apis/RatesApi.d.ts +10 -0
- package/dist/openapi/dist/apis/RatesApi.js +151 -0
- package/dist/openapi/dist/apis/RatesApi.js.map +1 -0
- package/dist/openapi/dist/apis/TransactionsApi.d.ts +16 -0
- package/dist/openapi/dist/apis/TransactionsApi.js +320 -0
- package/dist/openapi/dist/apis/TransactionsApi.js.map +1 -0
- package/dist/openapi/dist/apis/WalletsApi.d.ts +16 -0
- package/dist/openapi/dist/apis/WalletsApi.js +307 -0
- package/dist/openapi/dist/apis/WalletsApi.js.map +1 -0
- package/dist/openapi/dist/apis/WebhookEndpointsApi.d.ts +16 -0
- package/dist/openapi/dist/apis/WebhookEndpointsApi.js +254 -0
- package/dist/openapi/dist/apis/WebhookEndpointsApi.js.map +1 -0
- package/dist/openapi/dist/apis/WebhookEventTypesApi.d.ts +8 -0
- package/dist/openapi/dist/apis/WebhookEventTypesApi.js +71 -0
- package/dist/openapi/dist/apis/WebhookEventTypesApi.js.map +1 -0
- package/dist/openapi/dist/apis/WebhookEventsApi.d.ts +10 -0
- package/dist/openapi/dist/apis/WebhookEventsApi.js +129 -0
- package/dist/openapi/dist/apis/WebhookEventsApi.js.map +1 -0
- package/dist/openapi/dist/apis/baseapi.d.ts +14 -0
- package/dist/openapi/dist/apis/baseapi.js +25 -0
- package/dist/openapi/dist/apis/baseapi.js.map +1 -0
- package/dist/openapi/dist/apis/exception.d.ts +5 -0
- package/dist/openapi/dist/apis/exception.js +12 -0
- package/dist/openapi/dist/apis/exception.js.map +1 -0
- package/dist/openapi/dist/auth/auth.d.ts +9 -0
- package/dist/openapi/dist/auth/auth.js +27 -0
- package/dist/openapi/dist/auth/auth.js.map +1 -0
- package/dist/openapi/dist/configuration.d.ts +6 -0
- package/dist/openapi/dist/configuration.js +21 -0
- package/dist/openapi/dist/configuration.js.map +1 -0
- package/dist/openapi/dist/http/http.d.ts +40 -0
- package/dist/openapi/dist/http/http.js +171 -0
- package/dist/openapi/dist/http/http.js.map +1 -0
- package/dist/openapi/dist/http/isomorphic-fetch.d.ts +3 -0
- package/dist/openapi/dist/http/isomorphic-fetch.js +31 -0
- package/dist/openapi/dist/http/isomorphic-fetch.js.map +1 -0
- package/dist/openapi/dist/index.d.ts +7 -0
- package/dist/openapi/dist/index.js +31 -0
- package/dist/openapi/dist/index.js.map +1 -0
- package/dist/openapi/dist/middleware.d.ts +6 -0
- package/dist/openapi/dist/middleware.js +17 -0
- package/dist/openapi/dist/middleware.js.map +1 -0
- package/dist/openapi/dist/models/Account.d.ts +17 -0
- package/dist/openapi/dist/models/Account.js +51 -0
- package/dist/openapi/dist/models/Account.js.map +1 -0
- package/dist/openapi/dist/models/Address.d.ts +17 -0
- package/dist/openapi/dist/models/Address.js +33 -0
- package/dist/openapi/dist/models/Address.js.map +1 -0
- package/dist/openapi/dist/models/ChainNetwork.d.ts +17 -0
- package/dist/openapi/dist/models/ChainNetwork.js +63 -0
- package/dist/openapi/dist/models/ChainNetwork.js.map +1 -0
- package/dist/openapi/dist/models/CreateEndpoint.d.ts +17 -0
- package/dist/openapi/dist/models/CreateEndpoint.js +57 -0
- package/dist/openapi/dist/models/CreateEndpoint.js.map +1 -0
- package/dist/openapi/dist/models/CreateExchange.d.ts +17 -0
- package/dist/openapi/dist/models/CreateExchange.js +45 -0
- package/dist/openapi/dist/models/CreateExchange.js.map +1 -0
- package/dist/openapi/dist/models/CreateTransferRequest.d.ts +17 -0
- package/dist/openapi/dist/models/CreateTransferRequest.js +39 -0
- package/dist/openapi/dist/models/CreateTransferRequest.js.map +1 -0
- package/dist/openapi/dist/models/CreateTransferResponse.d.ts +17 -0
- package/dist/openapi/dist/models/CreateTransferResponse.js +21 -0
- package/dist/openapi/dist/models/CreateTransferResponse.js.map +1 -0
- package/dist/openapi/dist/models/CreateWalletRequest.d.ts +17 -0
- package/dist/openapi/dist/models/CreateWalletRequest.js +27 -0
- package/dist/openapi/dist/models/CreateWalletRequest.js.map +1 -0
- package/dist/openapi/dist/models/CreateWithdrawReply.d.ts +17 -0
- package/dist/openapi/dist/models/CreateWithdrawReply.js +21 -0
- package/dist/openapi/dist/models/CreateWithdrawReply.js.map +1 -0
- package/dist/openapi/dist/models/CreateWithdrawRequest.d.ts +17 -0
- package/dist/openapi/dist/models/CreateWithdrawRequest.js +57 -0
- package/dist/openapi/dist/models/CreateWithdrawRequest.js.map +1 -0
- package/dist/openapi/dist/models/Currency.d.ts +17 -0
- package/dist/openapi/dist/models/Currency.js +135 -0
- package/dist/openapi/dist/models/Currency.js.map +1 -0
- package/dist/openapi/dist/models/CurrencyNetwork.d.ts +17 -0
- package/dist/openapi/dist/models/CurrencyNetwork.js +135 -0
- package/dist/openapi/dist/models/CurrencyNetwork.js.map +1 -0
- package/dist/openapi/dist/models/CurrencyPair.d.ts +17 -0
- package/dist/openapi/dist/models/CurrencyPair.js +27 -0
- package/dist/openapi/dist/models/CurrencyPair.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageAccount.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageAccount.js +39 -0
- package/dist/openapi/dist/models/CursorPageAccount.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageAddress.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageAddress.js +39 -0
- package/dist/openapi/dist/models/CursorPageAddress.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageChainNetwork.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageChainNetwork.js +39 -0
- package/dist/openapi/dist/models/CursorPageChainNetwork.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageCurrency.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageCurrency.js +39 -0
- package/dist/openapi/dist/models/CursorPageCurrency.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageEndpoint.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageEndpoint.js +39 -0
- package/dist/openapi/dist/models/CursorPageEndpoint.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageExchange.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageExchange.js +39 -0
- package/dist/openapi/dist/models/CursorPageExchange.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageTransaction.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageTransaction.js +39 -0
- package/dist/openapi/dist/models/CursorPageTransaction.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageWallet.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageWallet.js +39 -0
- package/dist/openapi/dist/models/CursorPageWallet.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageWebhookEvent.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageWebhookEvent.js +39 -0
- package/dist/openapi/dist/models/CursorPageWebhookEvent.js.map +1 -0
- package/dist/openapi/dist/models/DeleteWebhookEndpointResponse.d.ts +17 -0
- package/dist/openapi/dist/models/DeleteWebhookEndpointResponse.js +21 -0
- package/dist/openapi/dist/models/DeleteWebhookEndpointResponse.js.map +1 -0
- package/dist/openapi/dist/models/Endpoint.d.ts +17 -0
- package/dist/openapi/dist/models/Endpoint.js +69 -0
- package/dist/openapi/dist/models/Endpoint.js.map +1 -0
- package/dist/openapi/dist/models/EstimateFeeRequest.d.ts +17 -0
- package/dist/openapi/dist/models/EstimateFeeRequest.js +45 -0
- package/dist/openapi/dist/models/EstimateFeeRequest.js.map +1 -0
- package/dist/openapi/dist/models/EstimateFeeResponse.d.ts +17 -0
- package/dist/openapi/dist/models/EstimateFeeResponse.js +27 -0
- package/dist/openapi/dist/models/EstimateFeeResponse.js.map +1 -0
- package/dist/openapi/dist/models/EstimateResponse.d.ts +17 -0
- package/dist/openapi/dist/models/EstimateResponse.js +45 -0
- package/dist/openapi/dist/models/EstimateResponse.js.map +1 -0
- package/dist/openapi/dist/models/EventType.d.ts +17 -0
- package/dist/openapi/dist/models/EventType.js +27 -0
- package/dist/openapi/dist/models/EventType.js.map +1 -0
- package/dist/openapi/dist/models/Exchange.d.ts +17 -0
- package/dist/openapi/dist/models/Exchange.js +99 -0
- package/dist/openapi/dist/models/Exchange.js.map +1 -0
- package/dist/openapi/dist/models/ExchangeCurrencyPairs.d.ts +17 -0
- package/dist/openapi/dist/models/ExchangeCurrencyPairs.js +27 -0
- package/dist/openapi/dist/models/ExchangeCurrencyPairs.js.map +1 -0
- package/dist/openapi/dist/models/ExchangeSubmitResponse.d.ts +17 -0
- package/dist/openapi/dist/models/ExchangeSubmitResponse.js +21 -0
- package/dist/openapi/dist/models/ExchangeSubmitResponse.js.map +1 -0
- package/dist/openapi/dist/models/GetCurrencyPairQuotaResponse.d.ts +17 -0
- package/dist/openapi/dist/models/GetCurrencyPairQuotaResponse.js +51 -0
- package/dist/openapi/dist/models/GetCurrencyPairQuotaResponse.js.map +1 -0
- package/dist/openapi/dist/models/GetRatesRequest.d.ts +17 -0
- package/dist/openapi/dist/models/GetRatesRequest.js +21 -0
- package/dist/openapi/dist/models/GetRatesRequest.js.map +1 -0
- package/dist/openapi/dist/models/GetRatesResponse.d.ts +17 -0
- package/dist/openapi/dist/models/GetRatesResponse.js +21 -0
- package/dist/openapi/dist/models/GetRatesResponse.js.map +1 -0
- package/dist/openapi/dist/models/ListExchangeCurrencyPairsResponse.d.ts +17 -0
- package/dist/openapi/dist/models/ListExchangeCurrencyPairsResponse.js +21 -0
- package/dist/openapi/dist/models/ListExchangeCurrencyPairsResponse.js.map +1 -0
- package/dist/openapi/dist/models/ModelError.d.ts +17 -0
- package/dist/openapi/dist/models/ModelError.js +27 -0
- package/dist/openapi/dist/models/ModelError.js.map +1 -0
- package/dist/openapi/dist/models/ObjectSerializer.d.ts +55 -0
- package/dist/openapi/dist/models/ObjectSerializer.js +330 -0
- package/dist/openapi/dist/models/ObjectSerializer.js.map +1 -0
- package/dist/openapi/dist/models/Rate.d.ts +17 -0
- package/dist/openapi/dist/models/Rate.js +27 -0
- package/dist/openapi/dist/models/Rate.js.map +1 -0
- package/dist/openapi/dist/models/ResendWebhookEventRequest.d.ts +17 -0
- package/dist/openapi/dist/models/ResendWebhookEventRequest.js +27 -0
- package/dist/openapi/dist/models/ResendWebhookEventRequest.js.map +1 -0
- package/dist/openapi/dist/models/ResendWebhookEventResponse.d.ts +17 -0
- package/dist/openapi/dist/models/ResendWebhookEventResponse.js +21 -0
- package/dist/openapi/dist/models/ResendWebhookEventResponse.js.map +1 -0
- package/dist/openapi/dist/models/Transaction.d.ts +17 -0
- package/dist/openapi/dist/models/Transaction.js +99 -0
- package/dist/openapi/dist/models/Transaction.js.map +1 -0
- package/dist/openapi/dist/models/TransactionDirection.d.ts +0 -0
- package/dist/openapi/dist/models/TransactionDirection.js +2 -0
- package/dist/openapi/dist/models/TransactionDirection.js.map +1 -0
- package/dist/openapi/dist/models/TransactionStatus.d.ts +0 -0
- package/dist/openapi/dist/models/TransactionStatus.js +2 -0
- package/dist/openapi/dist/models/TransactionStatus.js.map +1 -0
- package/dist/openapi/dist/models/UpdateEndpoint.d.ts +17 -0
- package/dist/openapi/dist/models/UpdateEndpoint.js +57 -0
- package/dist/openapi/dist/models/UpdateEndpoint.js.map +1 -0
- package/dist/openapi/dist/models/UpdateWalletRequest.d.ts +17 -0
- package/dist/openapi/dist/models/UpdateWalletRequest.js +27 -0
- package/dist/openapi/dist/models/UpdateWalletRequest.js.map +1 -0
- package/dist/openapi/dist/models/Wallet.d.ts +17 -0
- package/dist/openapi/dist/models/Wallet.js +39 -0
- package/dist/openapi/dist/models/Wallet.js.map +1 -0
- package/dist/openapi/dist/models/WebhookEvent.d.ts +17 -0
- package/dist/openapi/dist/models/WebhookEvent.js +39 -0
- package/dist/openapi/dist/models/WebhookEvent.js.map +1 -0
- package/dist/openapi/dist/models/all.d.ts +46 -0
- package/dist/openapi/dist/models/all.js +59 -0
- package/dist/openapi/dist/models/all.js.map +1 -0
- package/dist/openapi/dist/rxjsStub.d.ts +10 -0
- package/dist/openapi/dist/rxjsStub.js +32 -0
- package/dist/openapi/dist/rxjsStub.js.map +1 -0
- package/dist/openapi/dist/servers.d.ts +12 -0
- package/dist/openapi/dist/servers.js +31 -0
- package/dist/openapi/dist/servers.js.map +1 -0
- package/dist/openapi/dist/types/ObjectParamAPI.d.ts +82 -0
- package/dist/openapi/dist/types/ObjectParamAPI.js +170 -0
- package/dist/openapi/dist/types/ObjectParamAPI.js.map +1 -0
- package/dist/openapi/dist/types/ObservableAPI.d.ts +92 -0
- package/dist/openapi/dist/types/ObservableAPI.js +576 -0
- package/dist/openapi/dist/types/ObservableAPI.js.map +1 -0
- package/dist/openapi/dist/types/PromiseAPI.d.ts +82 -0
- package/dist/openapi/dist/types/PromiseAPI.js +202 -0
- package/dist/openapi/dist/types/PromiseAPI.js.map +1 -0
- package/dist/openapi/dist/util.d.ts +1 -0
- package/dist/openapi/dist/util.js +25 -0
- package/dist/openapi/dist/util.js.map +1 -0
- package/dist/openapi/http/http.js +23 -36
- package/dist/openapi/http/http.js.map +1 -1
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +0 -1
- package/dist/openapi/index.js.map +1 -1
- package/dist/openapi/models/CreateTransferRequest.d.ts +3 -0
- package/dist/openapi/models/CreateTransferRequest.js +6 -0
- package/dist/openapi/models/CreateTransferRequest.js.map +1 -1
- package/dist/openapi/models/Currency.d.ts +2 -0
- package/dist/openapi/models/Currency.js +12 -0
- package/dist/openapi/models/Currency.js.map +1 -1
- package/dist/openapi/models/CurrencyNetwork.d.ts +1 -0
- package/dist/openapi/models/CurrencyNetwork.js +6 -0
- package/dist/openapi/models/CurrencyNetwork.js.map +1 -1
- package/dist/openapi/models/EstimateFeeResponse.js.map +1 -1
- package/dist/openapi/models/ObjectSerializer.d.ts +0 -7
- package/dist/openapi/models/ObjectSerializer.js +0 -21
- package/dist/openapi/models/ObjectSerializer.js.map +1 -1
- package/dist/openapi/models/all.d.ts +0 -7
- package/dist/openapi/models/all.js +0 -7
- package/dist/openapi/models/all.js.map +1 -1
- package/dist/openapi/types/ObjectParamAPI.d.ts +0 -37
- package/dist/openapi/types/ObjectParamAPI.js +14 -39
- package/dist/openapi/types/ObjectParamAPI.js.map +1 -1
- package/dist/openapi/types/ObservableAPI.d.ts +0 -19
- package/dist/openapi/types/ObservableAPI.js +1 -100
- package/dist/openapi/types/ObservableAPI.js.map +1 -1
- package/dist/openapi/types/PromiseAPI.d.ts +0 -17
- package/dist/openapi/types/PromiseAPI.js +14 -45
- package/dist/openapi/types/PromiseAPI.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.ExchangesApiResponseProcessor = exports.ExchangesApiRequestFactory = void 0;
|
|
13
4
|
const baseapi_1 = require("./baseapi");
|
|
@@ -16,322 +7,298 @@ const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
|
16
7
|
const exception_1 = require("./exception");
|
|
17
8
|
const util_1 = require("../util");
|
|
18
9
|
class ExchangesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
19
|
-
v1ExchangesCreate(request, _options) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return requestContext;
|
|
40
|
-
});
|
|
10
|
+
async v1ExchangesCreate(request, _options) {
|
|
11
|
+
let _config = _options || this.configuration;
|
|
12
|
+
if (request === null || request === undefined) {
|
|
13
|
+
throw new baseapi_1.RequiredError('Required parameter request was null or undefined when calling v1ExchangesCreate.');
|
|
14
|
+
}
|
|
15
|
+
const localVarPath = '/api/v1/exchanges';
|
|
16
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
17
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
18
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
19
|
+
"application/json"
|
|
20
|
+
]);
|
|
21
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
22
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(request, "CreateExchange", ""), contentType);
|
|
23
|
+
requestContext.setBody(serializedBody);
|
|
24
|
+
let authMethod = null;
|
|
25
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
26
|
+
if (authMethod) {
|
|
27
|
+
await authMethod.applySecurityAuthentication(requestContext);
|
|
28
|
+
}
|
|
29
|
+
return requestContext;
|
|
41
30
|
}
|
|
42
|
-
v1ExchangesCurrencyPairs(_options) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return requestContext;
|
|
54
|
-
});
|
|
31
|
+
async v1ExchangesCurrencyPairs(_options) {
|
|
32
|
+
let _config = _options || this.configuration;
|
|
33
|
+
const localVarPath = '/api/v1/exchanges/currency_pairs';
|
|
34
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
35
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
36
|
+
let authMethod = null;
|
|
37
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
38
|
+
if (authMethod) {
|
|
39
|
+
await authMethod.applySecurityAuthentication(requestContext);
|
|
40
|
+
}
|
|
41
|
+
return requestContext;
|
|
55
42
|
}
|
|
56
|
-
v1ExchangesCurrencyQuota(fromCurrency, toCurrency, _options) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return requestContext;
|
|
80
|
-
});
|
|
43
|
+
async v1ExchangesCurrencyQuota(fromCurrency, toCurrency, _options) {
|
|
44
|
+
let _config = _options || this.configuration;
|
|
45
|
+
if (fromCurrency === null || fromCurrency === undefined) {
|
|
46
|
+
throw new baseapi_1.RequiredError('Required parameter fromCurrency was null or undefined when calling v1ExchangesCurrencyQuota.');
|
|
47
|
+
}
|
|
48
|
+
if (toCurrency === null || toCurrency === undefined) {
|
|
49
|
+
throw new baseapi_1.RequiredError('Required parameter toCurrency was null or undefined when calling v1ExchangesCurrencyQuota.');
|
|
50
|
+
}
|
|
51
|
+
const localVarPath = '/api/v1/exchanges/currency_pair_quota';
|
|
52
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
53
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
54
|
+
if (fromCurrency !== undefined) {
|
|
55
|
+
requestContext.setQueryParam("from_currency", ObjectSerializer_1.ObjectSerializer.serialize(fromCurrency, "string", ""));
|
|
56
|
+
}
|
|
57
|
+
if (toCurrency !== undefined) {
|
|
58
|
+
requestContext.setQueryParam("to_currency", ObjectSerializer_1.ObjectSerializer.serialize(toCurrency, "string", ""));
|
|
59
|
+
}
|
|
60
|
+
let authMethod = null;
|
|
61
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
62
|
+
if (authMethod) {
|
|
63
|
+
await authMethod.applySecurityAuthentication(requestContext);
|
|
64
|
+
}
|
|
65
|
+
return requestContext;
|
|
81
66
|
}
|
|
82
|
-
v1ExchangesList(limit, walletId, cursor, _options) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return requestContext;
|
|
109
|
-
});
|
|
67
|
+
async v1ExchangesList(limit, walletId, cursor, _options) {
|
|
68
|
+
let _config = _options || this.configuration;
|
|
69
|
+
if (limit === null || limit === undefined) {
|
|
70
|
+
throw new baseapi_1.RequiredError('Required parameter limit was null or undefined when calling v1ExchangesList.');
|
|
71
|
+
}
|
|
72
|
+
if (walletId === null || walletId === undefined) {
|
|
73
|
+
throw new baseapi_1.RequiredError('Required parameter walletId was null or undefined when calling v1ExchangesList.');
|
|
74
|
+
}
|
|
75
|
+
const localVarPath = '/api/v1/exchanges';
|
|
76
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
77
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
78
|
+
if (cursor !== undefined) {
|
|
79
|
+
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
80
|
+
}
|
|
81
|
+
if (limit !== undefined) {
|
|
82
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
83
|
+
}
|
|
84
|
+
if (walletId !== undefined) {
|
|
85
|
+
requestContext.setQueryParam("wallet_id", ObjectSerializer_1.ObjectSerializer.serialize(walletId, "string", ""));
|
|
86
|
+
}
|
|
87
|
+
let authMethod = null;
|
|
88
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
89
|
+
if (authMethod) {
|
|
90
|
+
await authMethod.applySecurityAuthentication(requestContext);
|
|
91
|
+
}
|
|
92
|
+
return requestContext;
|
|
110
93
|
}
|
|
111
|
-
v1ExchangesRetrieve(exchangeId, _options) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return requestContext;
|
|
127
|
-
});
|
|
94
|
+
async v1ExchangesRetrieve(exchangeId, _options) {
|
|
95
|
+
let _config = _options || this.configuration;
|
|
96
|
+
if (exchangeId === null || exchangeId === undefined) {
|
|
97
|
+
throw new baseapi_1.RequiredError('Required parameter exchangeId was null or undefined when calling v1ExchangesRetrieve.');
|
|
98
|
+
}
|
|
99
|
+
const localVarPath = '/api/v1/exchanges/{exchangeId}'
|
|
100
|
+
.replace('{' + 'exchangeId' + '}', encodeURIComponent(String(exchangeId)));
|
|
101
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
102
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
103
|
+
let authMethod = null;
|
|
104
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
105
|
+
if (authMethod) {
|
|
106
|
+
await authMethod.applySecurityAuthentication(requestContext);
|
|
107
|
+
}
|
|
108
|
+
return requestContext;
|
|
128
109
|
}
|
|
129
|
-
v1ExchangesSubmit(exchangeId, _options) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return requestContext;
|
|
145
|
-
});
|
|
110
|
+
async v1ExchangesSubmit(exchangeId, _options) {
|
|
111
|
+
let _config = _options || this.configuration;
|
|
112
|
+
if (exchangeId === null || exchangeId === undefined) {
|
|
113
|
+
throw new baseapi_1.RequiredError('Required parameter exchangeId was null or undefined when calling v1ExchangesSubmit.');
|
|
114
|
+
}
|
|
115
|
+
const localVarPath = '/api/v1/exchanges/{exchangeId}/submit'
|
|
116
|
+
.replace('{' + 'exchangeId' + '}', encodeURIComponent(String(exchangeId)));
|
|
117
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
118
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
119
|
+
let authMethod = null;
|
|
120
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
121
|
+
if (authMethod) {
|
|
122
|
+
await authMethod.applySecurityAuthentication(requestContext);
|
|
123
|
+
}
|
|
124
|
+
return requestContext;
|
|
146
125
|
}
|
|
147
126
|
}
|
|
148
127
|
exports.ExchangesApiRequestFactory = ExchangesApiRequestFactory;
|
|
149
128
|
class ExchangesApiResponseProcessor {
|
|
150
|
-
v1ExchangesCreate(response) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
179
|
-
});
|
|
129
|
+
async v1ExchangesCreate(response) {
|
|
130
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
131
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
132
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Exchange", "");
|
|
133
|
+
return body;
|
|
134
|
+
}
|
|
135
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
136
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
137
|
+
throw new exception_1.ApiException(400, body);
|
|
138
|
+
}
|
|
139
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
140
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
141
|
+
throw new exception_1.ApiException(401, body);
|
|
142
|
+
}
|
|
143
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
144
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
145
|
+
throw new exception_1.ApiException(404, body);
|
|
146
|
+
}
|
|
147
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
148
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
149
|
+
throw new exception_1.ApiException(500, body);
|
|
150
|
+
}
|
|
151
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
152
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Exchange", "");
|
|
153
|
+
return body;
|
|
154
|
+
}
|
|
155
|
+
let body = response.body || "";
|
|
156
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
180
157
|
}
|
|
181
|
-
v1ExchangesCurrencyPairs(response) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
210
|
-
});
|
|
158
|
+
async v1ExchangesCurrencyPairs(response) {
|
|
159
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
160
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
161
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListExchangeCurrencyPairsResponse", "");
|
|
162
|
+
return body;
|
|
163
|
+
}
|
|
164
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
165
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
166
|
+
throw new exception_1.ApiException(400, body);
|
|
167
|
+
}
|
|
168
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
169
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
170
|
+
throw new exception_1.ApiException(401, body);
|
|
171
|
+
}
|
|
172
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
173
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
174
|
+
throw new exception_1.ApiException(404, body);
|
|
175
|
+
}
|
|
176
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
177
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
178
|
+
throw new exception_1.ApiException(500, body);
|
|
179
|
+
}
|
|
180
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
181
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListExchangeCurrencyPairsResponse", "");
|
|
182
|
+
return body;
|
|
183
|
+
}
|
|
184
|
+
let body = response.body || "";
|
|
185
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
211
186
|
}
|
|
212
|
-
v1ExchangesCurrencyQuota(response) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
241
|
-
});
|
|
187
|
+
async v1ExchangesCurrencyQuota(response) {
|
|
188
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
189
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
190
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCurrencyPairQuotaResponse", "");
|
|
191
|
+
return body;
|
|
192
|
+
}
|
|
193
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
194
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
195
|
+
throw new exception_1.ApiException(400, body);
|
|
196
|
+
}
|
|
197
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
198
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
199
|
+
throw new exception_1.ApiException(401, body);
|
|
200
|
+
}
|
|
201
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
202
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
203
|
+
throw new exception_1.ApiException(404, body);
|
|
204
|
+
}
|
|
205
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
206
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
207
|
+
throw new exception_1.ApiException(500, body);
|
|
208
|
+
}
|
|
209
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
210
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCurrencyPairQuotaResponse", "");
|
|
211
|
+
return body;
|
|
212
|
+
}
|
|
213
|
+
let body = response.body || "";
|
|
214
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
242
215
|
}
|
|
243
|
-
v1ExchangesList(response) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
272
|
-
});
|
|
216
|
+
async v1ExchangesList(response) {
|
|
217
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
218
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
219
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CursorPageExchange", "");
|
|
220
|
+
return body;
|
|
221
|
+
}
|
|
222
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
223
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
224
|
+
throw new exception_1.ApiException(400, body);
|
|
225
|
+
}
|
|
226
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
227
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
228
|
+
throw new exception_1.ApiException(401, body);
|
|
229
|
+
}
|
|
230
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
231
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
232
|
+
throw new exception_1.ApiException(404, body);
|
|
233
|
+
}
|
|
234
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
235
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
236
|
+
throw new exception_1.ApiException(500, body);
|
|
237
|
+
}
|
|
238
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
239
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CursorPageExchange", "");
|
|
240
|
+
return body;
|
|
241
|
+
}
|
|
242
|
+
let body = response.body || "";
|
|
243
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
273
244
|
}
|
|
274
|
-
v1ExchangesRetrieve(response) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
303
|
-
});
|
|
245
|
+
async v1ExchangesRetrieve(response) {
|
|
246
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
247
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
248
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Exchange", "");
|
|
249
|
+
return body;
|
|
250
|
+
}
|
|
251
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
252
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
253
|
+
throw new exception_1.ApiException(400, body);
|
|
254
|
+
}
|
|
255
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
256
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
257
|
+
throw new exception_1.ApiException(401, body);
|
|
258
|
+
}
|
|
259
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
260
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
261
|
+
throw new exception_1.ApiException(404, body);
|
|
262
|
+
}
|
|
263
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
264
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
265
|
+
throw new exception_1.ApiException(500, body);
|
|
266
|
+
}
|
|
267
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
268
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Exchange", "");
|
|
269
|
+
return body;
|
|
270
|
+
}
|
|
271
|
+
let body = response.body || "";
|
|
272
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
304
273
|
}
|
|
305
|
-
v1ExchangesSubmit(response) {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
334
|
-
});
|
|
274
|
+
async v1ExchangesSubmit(response) {
|
|
275
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
276
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
277
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ExchangeSubmitResponse", "");
|
|
278
|
+
return body;
|
|
279
|
+
}
|
|
280
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
281
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
282
|
+
throw new exception_1.ApiException(400, body);
|
|
283
|
+
}
|
|
284
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
285
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
286
|
+
throw new exception_1.ApiException(401, body);
|
|
287
|
+
}
|
|
288
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
289
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
290
|
+
throw new exception_1.ApiException(404, body);
|
|
291
|
+
}
|
|
292
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
293
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Error", "");
|
|
294
|
+
throw new exception_1.ApiException(500, body);
|
|
295
|
+
}
|
|
296
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
297
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ExchangeSubmitResponse", "");
|
|
298
|
+
return body;
|
|
299
|
+
}
|
|
300
|
+
let body = response.body || "";
|
|
301
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
335
302
|
}
|
|
336
303
|
}
|
|
337
304
|
exports.ExchangesApiResponseProcessor = ExchangesApiResponseProcessor;
|