"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Fireblocks API
 * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
 *
 * The version of the OpenAPI document: 1.6.2
 * Contact: developers@fireblocks.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (g && (g = 0, op[0] && (_ = 0)), _) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetConnectedAccountAllowlistOrderEnum = exports.GetConnectedAccountAllowlistSortByEnum = exports.ConnectedAccountsBetaApi = exports.ConnectedAccountsBetaApiFactory = exports.ConnectedAccountsBetaApiFp = exports.ConnectedAccountsBetaApiAxiosParamCreator = void 0;
var axios_1 = __importDefault(require("axios"));
var fireblocksResponse_1 = require("../response/fireblocksResponse");
// URLSearchParams not necessarily used
// @ts-ignore
var url_1 = require("url");
// Some imports not used depending on template conditions
// @ts-ignore
var common_1 = require("../common");
var validation_utils_1 = require("../utils/validation_utils");
// @ts-ignore
var base_1 = require("../base");
/**
 * ConnectedAccountsBetaApi - axios parameter creator
 * @export
 */
var ConnectedAccountsBetaApiAxiosParamCreator = function (configuration) {
    var _this = this;
    return {
        /**
         * Creates a new connected account for the authenticated tenant.  The `creds` field must be a Base64-encoded RSA-encrypted credential blob. Use `GET /exchange_accounts/credentials_public_key` to retrieve the public key for encryption.  The `providerType` is derived server-side from the `providerId` — callers do not supply it.  Endpoint Permission: Editor, Admin, Non-Signing Admin.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Create a connected account
         * @param {CreateConnectedAccountRequest} createConnectedAccountRequest
         * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createConnectedAccount: function (createConnectedAccountRequest, idempotencyKey, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, common_1.assertParamExists)('createConnectedAccount', 'createConnectedAccountRequest', createConnectedAccountRequest);
                    localVarPath = "/connected_accounts";
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (idempotencyKey != null) {
                        localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
                    }
                    localVarHeaderParameter['Content-Type'] = 'application/json';
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createConnectedAccountRequest, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Disconnect a connected account by ID.  **Note**: - This endpoint is currently in beta and might be subject to changes.
         * @summary Disconnect connected account
         * @param {string} accountId The ID of the account to disconnect.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disconnectConnectedAccount: function (accountId, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('disconnectConnectedAccount', 'accountId', accountId);
                    localVarPath = "/connected_accounts/{accountId}"
                        .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Retrieve detailed information about a specific connected account by ID.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get connected account
         * @param {string} accountId The ID of the account to fetch.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccount: function (accountId, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getConnectedAccount', 'accountId', accountId);
                    localVarPath = "/connected_accounts/{accountId}"
                        .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Retrieves the address allowlist for a specified connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
         * @summary Get allowlist for connected account
         * @param {string} accountId The connected account identifier
         * @param {AllowlistEntryStatus} [status] Filter by allowlist entry status
         * @param {string} [assetId] Filter by Fireblocks asset ID.  See [List assets](https://developers.fireblocks.com/reference/listassets) for the canonical list of Fireblocks asset IDs.
         * @param {string} [networkId] Filter by Fireblocks network ID.  See [List blockchains](https://developers.fireblocks.com/reference/listblockchains) for the canonical list of Fireblocks blockchain identifiers.
         * @param {string} [address] Filter by specific address
         * @param {string} [pageCursor] Pagination cursor for next page
         * @param {number} [pageSize] Maximum number of entries to return
         * @param {GetConnectedAccountAllowlistSortByEnum} [sortBy] Field to sort results by.
         * @param {GetConnectedAccountAllowlistOrderEnum} [order] Sort order (ASC or DESC).
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountAllowlist: function (accountId, status, assetId, networkId, address, pageCursor, pageSize, sortBy, order, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getConnectedAccountAllowlist', 'accountId', accountId);
                    localVarPath = "/connected_accounts/{accountId}/allowlist"
                        .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (status !== undefined) {
                        localVarQueryParameter['status'] = status;
                    }
                    if (assetId !== undefined) {
                        localVarQueryParameter['assetId'] = assetId;
                    }
                    if (networkId !== undefined) {
                        localVarQueryParameter['networkId'] = networkId;
                    }
                    if (address !== undefined) {
                        localVarQueryParameter['address'] = address;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (sortBy !== undefined) {
                        localVarQueryParameter['sortBy'] = sortBy;
                    }
                    if (order !== undefined) {
                        localVarQueryParameter['order'] = order;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Retrieves a single allowlist entry by its Fireblocks identifier for a specified connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
         * @summary Get a single allowlist entry for a connected account
         * @param {string} accountId The connected account identifier
         * @param {string} allowlistId The Fireblocks allowlist entry identifier
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountAllowlistEntry: function (accountId, allowlistId, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getConnectedAccountAllowlistEntry', 'accountId', accountId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getConnectedAccountAllowlistEntry', 'allowlistId', allowlistId);
                    localVarPath = "/connected_accounts/{accountId}/allowlist/{allowlistId}"
                        .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
                        .replace("{".concat("allowlistId", "}"), encodeURIComponent(String(allowlistId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Retrieve current asset balances for a specific connected account as a flat list (one row per `assetId`, `balanceType`).  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get balances for an account
         * @param {string} accountId The ID of the account to fetch balances for.
         * @param {number} [pageSize] Page size for pagination.
         * @param {string} [pageCursor] Page cursor for pagination.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountBalances: function (accountId, pageSize, pageCursor, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getConnectedAccountBalances', 'accountId', accountId);
                    localVarPath = "/connected_accounts/{accountId}/balances"
                        .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Retrieve current exchange rates for converting between specific assets in a connected account.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get exchange rates for an account
         * @param {string} accountId The ID of the account to fetch rates for.
         * @param {string} baseAssetId The ID of the asset to fetch rates for.
         * @param {string} quoteAssetId The ID of the asset to get the rates nominally.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountRates: function (accountId, baseAssetId, quoteAssetId, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getConnectedAccountRates', 'accountId', accountId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getConnectedAccountRates', 'baseAssetId', baseAssetId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getConnectedAccountRates', 'quoteAssetId', quoteAssetId);
                    localVarPath = "/connected_accounts/{accountId}/rates"
                        .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (baseAssetId !== undefined) {
                        localVarQueryParameter['baseAssetId'] = baseAssetId;
                    }
                    if (quoteAssetId !== undefined) {
                        localVarQueryParameter['quoteAssetId'] = quoteAssetId;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Retrieve all asset trading pairs supported by a specific connected account, including the pair type (`quote`, `market`, `onOffRamp`).  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get supported trading pairs for an account
         * @param {string} accountId The ID of the account to fetch supported pairs for.
         * @param {number} [pageSize] Page size for pagination.
         * @param {string} [pageCursor] Page cursor for pagination.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountTradingPairs: function (accountId, pageSize, pageCursor, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getConnectedAccountTradingPairs', 'accountId', accountId);
                    localVarPath = "/connected_accounts/{accountId}/manifest/capabilities/trading/pairs"
                        .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Returns all connected accounts.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get connected accounts
         * @param {boolean} [mainAccounts] Whether to include only main accounts in the response.
         * @param {number} [pageSize] Page size for pagination.
         * @param {string} [pageCursor] Page cursor for pagination.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccounts: function (mainAccounts, pageSize, pageCursor, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    localVarPath = "/connected_accounts";
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (mainAccounts !== undefined) {
                        localVarQueryParameter['mainAccounts'] = mainAccounts;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Rename a connected account by account ID.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Rename Connected Account
         * @param {RenameConnectedAccountRequest} renameConnectedAccountRequest
         * @param {string} accountId The unique identifier of the connected account
         * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        renameConnectedAccount: function (renameConnectedAccountRequest, accountId, idempotencyKey, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, common_1.assertParamExists)('renameConnectedAccount', 'renameConnectedAccountRequest', renameConnectedAccountRequest);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('renameConnectedAccount', 'accountId', accountId);
                    localVarPath = "/connected_accounts/{accountId}/rename"
                        .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (idempotencyKey != null) {
                        localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
                    }
                    localVarHeaderParameter['Content-Type'] = 'application/json';
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(renameConnectedAccountRequest, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Triggers an on-demand sync from the exchange, bypassing the cache and fetching live data immediately.  **Rate limit:** 1 request per minute per connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
         * @summary Sync allowlist for connected account
         * @param {string} accountId The connected account identifier
         * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        syncConnectedAccountAllowlist: function (accountId, idempotencyKey, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('syncConnectedAccountAllowlist', 'accountId', accountId);
                    localVarPath = "/connected_accounts/{accountId}/allowlist/sync"
                        .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (idempotencyKey != null) {
                        localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
    };
};
exports.ConnectedAccountsBetaApiAxiosParamCreator = ConnectedAccountsBetaApiAxiosParamCreator;
/**
 * ConnectedAccountsBetaApi - functional programming interface
 * @export
 */
var ConnectedAccountsBetaApiFp = function (configuration) {
    var localVarAxiosParamCreator = (0, exports.ConnectedAccountsBetaApiAxiosParamCreator)(configuration);
    return {
        /**
         * Creates a new connected account for the authenticated tenant.  The `creds` field must be a Base64-encoded RSA-encrypted credential blob. Use `GET /exchange_accounts/credentials_public_key` to retrieve the public key for encryption.  The `providerType` is derived server-side from the `providerId` — callers do not supply it.  Endpoint Permission: Editor, Admin, Non-Signing Admin.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Create a connected account
         * @param {CreateConnectedAccountRequest} createConnectedAccountRequest
         * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createConnectedAccount: function (createConnectedAccountRequest, idempotencyKey, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.createConnectedAccount(createConnectedAccountRequest, idempotencyKey, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.createConnectedAccount']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Disconnect a connected account by ID.  **Note**: - This endpoint is currently in beta and might be subject to changes.
         * @summary Disconnect connected account
         * @param {string} accountId The ID of the account to disconnect.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disconnectConnectedAccount: function (accountId, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.disconnectConnectedAccount(accountId, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.disconnectConnectedAccount']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Retrieve detailed information about a specific connected account by ID.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get connected account
         * @param {string} accountId The ID of the account to fetch.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccount: function (accountId, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getConnectedAccount(accountId, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.getConnectedAccount']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Retrieves the address allowlist for a specified connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
         * @summary Get allowlist for connected account
         * @param {string} accountId The connected account identifier
         * @param {AllowlistEntryStatus} [status] Filter by allowlist entry status
         * @param {string} [assetId] Filter by Fireblocks asset ID.  See [List assets](https://developers.fireblocks.com/reference/listassets) for the canonical list of Fireblocks asset IDs.
         * @param {string} [networkId] Filter by Fireblocks network ID.  See [List blockchains](https://developers.fireblocks.com/reference/listblockchains) for the canonical list of Fireblocks blockchain identifiers.
         * @param {string} [address] Filter by specific address
         * @param {string} [pageCursor] Pagination cursor for next page
         * @param {number} [pageSize] Maximum number of entries to return
         * @param {GetConnectedAccountAllowlistSortByEnum} [sortBy] Field to sort results by.
         * @param {GetConnectedAccountAllowlistOrderEnum} [order] Sort order (ASC or DESC).
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountAllowlist: function (accountId, status, assetId, networkId, address, pageCursor, pageSize, sortBy, order, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getConnectedAccountAllowlist(accountId, status, assetId, networkId, address, pageCursor, pageSize, sortBy, order, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.getConnectedAccountAllowlist']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Retrieves a single allowlist entry by its Fireblocks identifier for a specified connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
         * @summary Get a single allowlist entry for a connected account
         * @param {string} accountId The connected account identifier
         * @param {string} allowlistId The Fireblocks allowlist entry identifier
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountAllowlistEntry: function (accountId, allowlistId, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getConnectedAccountAllowlistEntry(accountId, allowlistId, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.getConnectedAccountAllowlistEntry']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Retrieve current asset balances for a specific connected account as a flat list (one row per `assetId`, `balanceType`).  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get balances for an account
         * @param {string} accountId The ID of the account to fetch balances for.
         * @param {number} [pageSize] Page size for pagination.
         * @param {string} [pageCursor] Page cursor for pagination.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountBalances: function (accountId, pageSize, pageCursor, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getConnectedAccountBalances(accountId, pageSize, pageCursor, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.getConnectedAccountBalances']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Retrieve current exchange rates for converting between specific assets in a connected account.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get exchange rates for an account
         * @param {string} accountId The ID of the account to fetch rates for.
         * @param {string} baseAssetId The ID of the asset to fetch rates for.
         * @param {string} quoteAssetId The ID of the asset to get the rates nominally.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountRates: function (accountId, baseAssetId, quoteAssetId, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getConnectedAccountRates(accountId, baseAssetId, quoteAssetId, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.getConnectedAccountRates']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Retrieve all asset trading pairs supported by a specific connected account, including the pair type (`quote`, `market`, `onOffRamp`).  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get supported trading pairs for an account
         * @param {string} accountId The ID of the account to fetch supported pairs for.
         * @param {number} [pageSize] Page size for pagination.
         * @param {string} [pageCursor] Page cursor for pagination.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountTradingPairs: function (accountId, pageSize, pageCursor, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getConnectedAccountTradingPairs(accountId, pageSize, pageCursor, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.getConnectedAccountTradingPairs']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Returns all connected accounts.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get connected accounts
         * @param {boolean} [mainAccounts] Whether to include only main accounts in the response.
         * @param {number} [pageSize] Page size for pagination.
         * @param {string} [pageCursor] Page cursor for pagination.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccounts: function (mainAccounts, pageSize, pageCursor, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getConnectedAccounts(mainAccounts, pageSize, pageCursor, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.getConnectedAccounts']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Rename a connected account by account ID.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Rename Connected Account
         * @param {RenameConnectedAccountRequest} renameConnectedAccountRequest
         * @param {string} accountId The unique identifier of the connected account
         * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        renameConnectedAccount: function (renameConnectedAccountRequest, accountId, idempotencyKey, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.renameConnectedAccount(renameConnectedAccountRequest, accountId, idempotencyKey, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.renameConnectedAccount']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Triggers an on-demand sync from the exchange, bypassing the cache and fetching live data immediately.  **Rate limit:** 1 request per minute per connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
         * @summary Sync allowlist for connected account
         * @param {string} accountId The connected account identifier
         * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        syncConnectedAccountAllowlist: function (accountId, idempotencyKey, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.syncConnectedAccountAllowlist(accountId, idempotencyKey, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['ConnectedAccountsBetaApi.syncConnectedAccountAllowlist']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
    };
};
exports.ConnectedAccountsBetaApiFp = ConnectedAccountsBetaApiFp;
/**
 * ConnectedAccountsBetaApi - factory interface
 * @export
 */
var ConnectedAccountsBetaApiFactory = function (configuration, basePath, axios) {
    var localVarFp = (0, exports.ConnectedAccountsBetaApiFp)(configuration);
    return {
        /**
         * Creates a new connected account for the authenticated tenant.  The `creds` field must be a Base64-encoded RSA-encrypted credential blob. Use `GET /exchange_accounts/credentials_public_key` to retrieve the public key for encryption.  The `providerType` is derived server-side from the `providerId` — callers do not supply it.  Endpoint Permission: Editor, Admin, Non-Signing Admin.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Create a connected account
         * @param {ConnectedAccountsBetaApiCreateConnectedAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createConnectedAccount: function (requestParameters, options) {
            return localVarFp.createConnectedAccount(requestParameters.createConnectedAccountRequest, requestParameters.idempotencyKey, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Disconnect a connected account by ID.  **Note**: - This endpoint is currently in beta and might be subject to changes.
         * @summary Disconnect connected account
         * @param {ConnectedAccountsBetaApiDisconnectConnectedAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disconnectConnectedAccount: function (requestParameters, options) {
            return localVarFp.disconnectConnectedAccount(requestParameters.accountId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Retrieve detailed information about a specific connected account by ID.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get connected account
         * @param {ConnectedAccountsBetaApiGetConnectedAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccount: function (requestParameters, options) {
            return localVarFp.getConnectedAccount(requestParameters.accountId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Retrieves the address allowlist for a specified connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
         * @summary Get allowlist for connected account
         * @param {ConnectedAccountsBetaApiGetConnectedAccountAllowlistRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountAllowlist: function (requestParameters, options) {
            return localVarFp.getConnectedAccountAllowlist(requestParameters.accountId, requestParameters.status, requestParameters.assetId, requestParameters.networkId, requestParameters.address, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Retrieves a single allowlist entry by its Fireblocks identifier for a specified connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
         * @summary Get a single allowlist entry for a connected account
         * @param {ConnectedAccountsBetaApiGetConnectedAccountAllowlistEntryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountAllowlistEntry: function (requestParameters, options) {
            return localVarFp.getConnectedAccountAllowlistEntry(requestParameters.accountId, requestParameters.allowlistId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Retrieve current asset balances for a specific connected account as a flat list (one row per `assetId`, `balanceType`).  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get balances for an account
         * @param {ConnectedAccountsBetaApiGetConnectedAccountBalancesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountBalances: function (requestParameters, options) {
            return localVarFp.getConnectedAccountBalances(requestParameters.accountId, requestParameters.pageSize, requestParameters.pageCursor, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Retrieve current exchange rates for converting between specific assets in a connected account.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get exchange rates for an account
         * @param {ConnectedAccountsBetaApiGetConnectedAccountRatesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountRates: function (requestParameters, options) {
            return localVarFp.getConnectedAccountRates(requestParameters.accountId, requestParameters.baseAssetId, requestParameters.quoteAssetId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Retrieve all asset trading pairs supported by a specific connected account, including the pair type (`quote`, `market`, `onOffRamp`).  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get supported trading pairs for an account
         * @param {ConnectedAccountsBetaApiGetConnectedAccountTradingPairsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccountTradingPairs: function (requestParameters, options) {
            return localVarFp.getConnectedAccountTradingPairs(requestParameters.accountId, requestParameters.pageSize, requestParameters.pageCursor, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns all connected accounts.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Get connected accounts
         * @param {ConnectedAccountsBetaApiGetConnectedAccountsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getConnectedAccounts: function (requestParameters, options) {
            if (requestParameters === void 0) { requestParameters = {}; }
            return localVarFp.getConnectedAccounts(requestParameters.mainAccounts, requestParameters.pageSize, requestParameters.pageCursor, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Rename a connected account by account ID.  **Note:** This endpoint is currently in beta and might be subject to changes.
         * @summary Rename Connected Account
         * @param {ConnectedAccountsBetaApiRenameConnectedAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        renameConnectedAccount: function (requestParameters, options) {
            return localVarFp.renameConnectedAccount(requestParameters.renameConnectedAccountRequest, requestParameters.accountId, requestParameters.idempotencyKey, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Triggers an on-demand sync from the exchange, bypassing the cache and fetching live data immediately.  **Rate limit:** 1 request per minute per connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
         * @summary Sync allowlist for connected account
         * @param {ConnectedAccountsBetaApiSyncConnectedAccountAllowlistRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        syncConnectedAccountAllowlist: function (requestParameters, options) {
            return localVarFp.syncConnectedAccountAllowlist(requestParameters.accountId, requestParameters.idempotencyKey, options).then(function (request) { return request(axios, basePath); });
        },
    };
};
exports.ConnectedAccountsBetaApiFactory = ConnectedAccountsBetaApiFactory;
/**
 * ConnectedAccountsBetaApi - object-oriented interface
 * @export
 * @class ConnectedAccountsBetaApi
 * @extends {BaseAPI}
 */
var ConnectedAccountsBetaApi = /** @class */ (function (_super) {
    __extends(ConnectedAccountsBetaApi, _super);
    function ConnectedAccountsBetaApi() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Creates a new connected account for the authenticated tenant.  The `creds` field must be a Base64-encoded RSA-encrypted credential blob. Use `GET /exchange_accounts/credentials_public_key` to retrieve the public key for encryption.  The `providerType` is derived server-side from the `providerId` — callers do not supply it.  Endpoint Permission: Editor, Admin, Non-Signing Admin.  **Note:** This endpoint is currently in beta and might be subject to changes.
     * @summary Create a connected account
     * @param {ConnectedAccountsBetaApiCreateConnectedAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.createConnectedAccount = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).createConnectedAccount(requestParameters.createConnectedAccountRequest, requestParameters.idempotencyKey).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Disconnect a connected account by ID.  **Note**: - This endpoint is currently in beta and might be subject to changes.
     * @summary Disconnect connected account
     * @param {ConnectedAccountsBetaApiDisconnectConnectedAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.disconnectConnectedAccount = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).disconnectConnectedAccount(requestParameters.accountId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Retrieve detailed information about a specific connected account by ID.  **Note:** This endpoint is currently in beta and might be subject to changes.
     * @summary Get connected account
     * @param {ConnectedAccountsBetaApiGetConnectedAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.getConnectedAccount = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).getConnectedAccount(requestParameters.accountId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Retrieves the address allowlist for a specified connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
     * @summary Get allowlist for connected account
     * @param {ConnectedAccountsBetaApiGetConnectedAccountAllowlistRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.getConnectedAccountAllowlist = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).getConnectedAccountAllowlist(requestParameters.accountId, requestParameters.status, requestParameters.assetId, requestParameters.networkId, requestParameters.address, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Retrieves a single allowlist entry by its Fireblocks identifier for a specified connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
     * @summary Get a single allowlist entry for a connected account
     * @param {ConnectedAccountsBetaApiGetConnectedAccountAllowlistEntryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.getConnectedAccountAllowlistEntry = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).getConnectedAccountAllowlistEntry(requestParameters.accountId, requestParameters.allowlistId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Retrieve current asset balances for a specific connected account as a flat list (one row per `assetId`, `balanceType`).  **Note:** This endpoint is currently in beta and might be subject to changes.
     * @summary Get balances for an account
     * @param {ConnectedAccountsBetaApiGetConnectedAccountBalancesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.getConnectedAccountBalances = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).getConnectedAccountBalances(requestParameters.accountId, requestParameters.pageSize, requestParameters.pageCursor).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Retrieve current exchange rates for converting between specific assets in a connected account.  **Note:** This endpoint is currently in beta and might be subject to changes.
     * @summary Get exchange rates for an account
     * @param {ConnectedAccountsBetaApiGetConnectedAccountRatesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.getConnectedAccountRates = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).getConnectedAccountRates(requestParameters.accountId, requestParameters.baseAssetId, requestParameters.quoteAssetId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Retrieve all asset trading pairs supported by a specific connected account, including the pair type (`quote`, `market`, `onOffRamp`).  **Note:** This endpoint is currently in beta and might be subject to changes.
     * @summary Get supported trading pairs for an account
     * @param {ConnectedAccountsBetaApiGetConnectedAccountTradingPairsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.getConnectedAccountTradingPairs = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).getConnectedAccountTradingPairs(requestParameters.accountId, requestParameters.pageSize, requestParameters.pageCursor).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns all connected accounts.  **Note:** This endpoint is currently in beta and might be subject to changes.
     * @summary Get connected accounts
     * @param {ConnectedAccountsBetaApiGetConnectedAccountsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.getConnectedAccounts = function (requestParameters) {
        var _this = this;
        if (requestParameters === void 0) { requestParameters = {}; }
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).getConnectedAccounts(requestParameters.mainAccounts, requestParameters.pageSize, requestParameters.pageCursor).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Rename a connected account by account ID.  **Note:** This endpoint is currently in beta and might be subject to changes.
     * @summary Rename Connected Account
     * @param {ConnectedAccountsBetaApiRenameConnectedAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.renameConnectedAccount = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).renameConnectedAccount(requestParameters.renameConnectedAccountRequest, requestParameters.accountId, requestParameters.idempotencyKey).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Triggers an on-demand sync from the exchange, bypassing the cache and fetching live data immediately.  **Rate limit:** 1 request per minute per connected account.  **Note:** This endpoint is currently in beta and might be subject to changes. Currently supports CoinbaseExchange/Binance accounts only.
     * @summary Sync allowlist for connected account
     * @param {ConnectedAccountsBetaApiSyncConnectedAccountAllowlistRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ConnectedAccountsBetaApi
     */
    ConnectedAccountsBetaApi.prototype.syncConnectedAccountAllowlist = function (requestParameters) {
        var _this = this;
        return (0, exports.ConnectedAccountsBetaApiFp)(this.configuration).syncConnectedAccountAllowlist(requestParameters.accountId, requestParameters.idempotencyKey).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    return ConnectedAccountsBetaApi;
}(base_1.BaseAPI));
exports.ConnectedAccountsBetaApi = ConnectedAccountsBetaApi;
/**
 * @export
 */
exports.GetConnectedAccountAllowlistSortByEnum = {
    AddedAt: 'addedAt',
    LastSyncedAt: 'lastSyncedAt'
};
/**
 * @export
 */
exports.GetConnectedAccountAllowlistOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
//# sourceMappingURL=connected-accounts-beta-api.js.map