"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.GetValidationKeysListOrderEnum = exports.GetValidationKeysListSortByEnum = exports.GetSigningKeysListAlgorithmEnum = exports.GetSigningKeysListOrderEnum = exports.GetSigningKeysListSortByEnum = exports.KeyLinkBetaApi = exports.KeyLinkBetaApiFactory = exports.KeyLinkBetaApiFp = exports.KeyLinkBetaApiAxiosParamCreator = 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");
/**
 * KeyLinkBetaApi - axios parameter creator
 * @export
 */
var KeyLinkBetaApiAxiosParamCreator = function (configuration) {
    var _this = this;
    return {
        /**
         * Adds a new signing key to the workspace. The added key will be linked to the specific Fireblocks agent user ID. The same user will receive the proof of ownership message to be signed, and upon successful proof, the key will become enabled.
         * @summary Add a new signing key
         * @param {CreateSigningKeyDto} createSigningKeyDto
         * @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}
         */
        createSigningKey: function (createSigningKeyDto, 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)('createSigningKey', 'createSigningKeyDto', createSigningKeyDto);
                    localVarPath = "/key_link/signing_keys";
                    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)(createSigningKeyDto, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Adds a new validation key used to validate signing keys. The new validation key will undergo an approval process by the workspace quorum.
         * @summary Add a new validation key
         * @param {CreateValidationKeyDto} createValidationKeyDto
         * @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}
         */
        createValidationKey: function (createValidationKeyDto, 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)('createValidationKey', 'createValidationKeyDto', createValidationKeyDto);
                    localVarPath = "/key_link/validation_keys";
                    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)(createValidationKeyDto, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Allows disabling validation key even if it has not expired yet. It is not allowed to enable the validation key back. Another key has to be used for future validations.
         * @summary Disables a validation key
         * @param {ModifyValidationKeyDto} modifyValidationKeyDto
         * @param {string} keyId The unique identifier for the validation key provided by Fireblocks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disableValidationKey: function (modifyValidationKeyDto, keyId, 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)('disableValidationKey', 'modifyValidationKeyDto', modifyValidationKeyDto);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('disableValidationKey', 'keyId', keyId);
                    localVarPath = "/key_link/validation_keys/{keyId}"
                        .replace("{".concat("keyId", "}"), encodeURIComponent(String(keyId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    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)(modifyValidationKeyDto, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Returns a signing key if it exists, identified by the specified `keyId`.
         * @summary Get a signing key by `keyId`
         * @param {string} keyId The unique identifier for the signing key provided by Fireblocks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getSigningKey: function (keyId, 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)('getSigningKey', 'keyId', keyId);
                    localVarPath = "/key_link/signing_keys/{keyId}"
                        .replace("{".concat("keyId", "}"), encodeURIComponent(String(keyId)));
                    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,
                        }];
                });
            });
        },
        /**
         * Returns the list of signing keys in the workspace
         * @summary Get list of signing keys
         * @param {string} [pageCursor] Cursor to the next page
         * @param {number} [pageSize] Amount of results to return in the next page
         * @param {GetSigningKeysListSortByEnum} [sortBy] Field(s) to use for sorting
         * @param {GetSigningKeysListOrderEnum} [order] Is the order ascending or descending
         * @param {number} [vaultAccountId] Return keys assigned to a specific vault
         * @param {string} [agentUserId] Return keys associated with a specific agent user
         * @param {GetSigningKeysListAlgorithmEnum} [algorithm] Return only keys with a specific algorithm
         * @param {boolean} [enabled] Return keys that have been proof of ownership
         * @param {boolean} [available] Return keys that are proof of ownership but not assigned. Available filter can be used only when vaultAccountId and enabled filters are not set
         * @param {boolean | null} [isAssigned] Return keys that are assigned to a vault account
         * @param {string} [keyPrefix] A case-insensitive prefix filter that matches records where either keyId or signingDeviceKeyID starts with the specified value.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getSigningKeysList: function (pageCursor, pageSize, sortBy, order, vaultAccountId, agentUserId, algorithm, enabled, available, isAssigned, keyPrefix, 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 = "/key_link/signing_keys";
                    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 (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (sortBy !== undefined) {
                        localVarQueryParameter['sortBy'] = sortBy;
                    }
                    if (order !== undefined) {
                        localVarQueryParameter['order'] = order;
                    }
                    if (vaultAccountId !== undefined) {
                        localVarQueryParameter['vaultAccountId'] = vaultAccountId;
                    }
                    if (agentUserId !== undefined) {
                        localVarQueryParameter['agentUserId'] = agentUserId;
                    }
                    if (algorithm !== undefined) {
                        localVarQueryParameter['algorithm'] = algorithm;
                    }
                    if (enabled !== undefined) {
                        localVarQueryParameter['enabled'] = enabled;
                    }
                    if (available !== undefined) {
                        localVarQueryParameter['available'] = available;
                    }
                    if (isAssigned !== undefined) {
                        localVarQueryParameter['isAssigned'] = isAssigned;
                    }
                    if (keyPrefix !== undefined) {
                        localVarQueryParameter['keyPrefix'] = keyPrefix;
                    }
                    (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 a validation key if it exists, identified by the specified `keyId`.
         * @summary Get a validation key by `keyId`
         * @param {string} keyId
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getValidationKey: function (keyId, 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)('getValidationKey', 'keyId', keyId);
                    localVarPath = "/key_link/validation_keys/{keyId}"
                        .replace("{".concat("keyId", "}"), encodeURIComponent(String(keyId)));
                    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,
                        }];
                });
            });
        },
        /**
         * Returns the list of validation keys in the workspace
         * @summary Get list of registered validation keys
         * @param {string} [pageCursor] Cursor to the next page
         * @param {number} [pageSize] Amount of results to return in the next page
         * @param {GetValidationKeysListSortByEnum} [sortBy] Field(s) to use for sorting
         * @param {GetValidationKeysListOrderEnum} [order] Is the order ascending or descending
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getValidationKeysList: function (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) {
                    localVarPath = "/key_link/validation_keys";
                    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 (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,
                        }];
                });
            });
        },
        /**
         * Can modify existing signing key id if the key is not enabled. The change done in background and will be visible once applied. If key is already enabled (after proof of ownership) the user cannot be changed.
         * @summary Set agent user id
         * @param {ModifySigningKeyAgentIdDto} modifySigningKeyAgentIdDto
         * @param {string} keyId The unique identifier for the signing key provided by Fireblocks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setAgentId: function (modifySigningKeyAgentIdDto, keyId, 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)('setAgentId', 'modifySigningKeyAgentIdDto', modifySigningKeyAgentIdDto);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('setAgentId', 'keyId', keyId);
                    localVarPath = "/key_link/signing_keys/{keyId}/agent_user_id"
                        .replace("{".concat("keyId", "}"), encodeURIComponent(String(keyId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    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)(modifySigningKeyAgentIdDto, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Allows assigning the signing key to a vault account, if it hasn\'t been assigned to any other vault accounts yet.
         * @summary Modify the signing keyId
         * @param {ModifySigningKeyDto} modifySigningKeyDto
         * @param {string} keyId The unique identifier for the signing key provided by Fireblocks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateSigningKey: function (modifySigningKeyDto, keyId, 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)('updateSigningKey', 'modifySigningKeyDto', modifySigningKeyDto);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('updateSigningKey', 'keyId', keyId);
                    localVarPath = "/key_link/signing_keys/{keyId}"
                        .replace("{".concat("keyId", "}"), encodeURIComponent(String(keyId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    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)(modifySigningKeyDto, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
    };
};
exports.KeyLinkBetaApiAxiosParamCreator = KeyLinkBetaApiAxiosParamCreator;
/**
 * KeyLinkBetaApi - functional programming interface
 * @export
 */
var KeyLinkBetaApiFp = function (configuration) {
    var localVarAxiosParamCreator = (0, exports.KeyLinkBetaApiAxiosParamCreator)(configuration);
    return {
        /**
         * Adds a new signing key to the workspace. The added key will be linked to the specific Fireblocks agent user ID. The same user will receive the proof of ownership message to be signed, and upon successful proof, the key will become enabled.
         * @summary Add a new signing key
         * @param {CreateSigningKeyDto} createSigningKeyDto
         * @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}
         */
        createSigningKey: function (createSigningKeyDto, 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.createSigningKey(createSigningKeyDto, 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['KeyLinkBetaApi.createSigningKey']) === 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); }];
                    }
                });
            });
        },
        /**
         * Adds a new validation key used to validate signing keys. The new validation key will undergo an approval process by the workspace quorum.
         * @summary Add a new validation key
         * @param {CreateValidationKeyDto} createValidationKeyDto
         * @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}
         */
        createValidationKey: function (createValidationKeyDto, 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.createValidationKey(createValidationKeyDto, 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['KeyLinkBetaApi.createValidationKey']) === 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); }];
                    }
                });
            });
        },
        /**
         * Allows disabling validation key even if it has not expired yet. It is not allowed to enable the validation key back. Another key has to be used for future validations.
         * @summary Disables a validation key
         * @param {ModifyValidationKeyDto} modifyValidationKeyDto
         * @param {string} keyId The unique identifier for the validation key provided by Fireblocks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disableValidationKey: function (modifyValidationKeyDto, keyId, 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.disableValidationKey(modifyValidationKeyDto, keyId, 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['KeyLinkBetaApi.disableValidationKey']) === 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 a signing key if it exists, identified by the specified `keyId`.
         * @summary Get a signing key by `keyId`
         * @param {string} keyId The unique identifier for the signing key provided by Fireblocks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getSigningKey: function (keyId, 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.getSigningKey(keyId, 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['KeyLinkBetaApi.getSigningKey']) === 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 the list of signing keys in the workspace
         * @summary Get list of signing keys
         * @param {string} [pageCursor] Cursor to the next page
         * @param {number} [pageSize] Amount of results to return in the next page
         * @param {GetSigningKeysListSortByEnum} [sortBy] Field(s) to use for sorting
         * @param {GetSigningKeysListOrderEnum} [order] Is the order ascending or descending
         * @param {number} [vaultAccountId] Return keys assigned to a specific vault
         * @param {string} [agentUserId] Return keys associated with a specific agent user
         * @param {GetSigningKeysListAlgorithmEnum} [algorithm] Return only keys with a specific algorithm
         * @param {boolean} [enabled] Return keys that have been proof of ownership
         * @param {boolean} [available] Return keys that are proof of ownership but not assigned. Available filter can be used only when vaultAccountId and enabled filters are not set
         * @param {boolean | null} [isAssigned] Return keys that are assigned to a vault account
         * @param {string} [keyPrefix] A case-insensitive prefix filter that matches records where either keyId or signingDeviceKeyID starts with the specified value.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getSigningKeysList: function (pageCursor, pageSize, sortBy, order, vaultAccountId, agentUserId, algorithm, enabled, available, isAssigned, keyPrefix, 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.getSigningKeysList(pageCursor, pageSize, sortBy, order, vaultAccountId, agentUserId, algorithm, enabled, available, isAssigned, keyPrefix, 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['KeyLinkBetaApi.getSigningKeysList']) === 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 a validation key if it exists, identified by the specified `keyId`.
         * @summary Get a validation key by `keyId`
         * @param {string} keyId
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getValidationKey: function (keyId, 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.getValidationKey(keyId, 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['KeyLinkBetaApi.getValidationKey']) === 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 the list of validation keys in the workspace
         * @summary Get list of registered validation keys
         * @param {string} [pageCursor] Cursor to the next page
         * @param {number} [pageSize] Amount of results to return in the next page
         * @param {GetValidationKeysListSortByEnum} [sortBy] Field(s) to use for sorting
         * @param {GetValidationKeysListOrderEnum} [order] Is the order ascending or descending
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getValidationKeysList: function (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.getValidationKeysList(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['KeyLinkBetaApi.getValidationKeysList']) === 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); }];
                    }
                });
            });
        },
        /**
         * Can modify existing signing key id if the key is not enabled. The change done in background and will be visible once applied. If key is already enabled (after proof of ownership) the user cannot be changed.
         * @summary Set agent user id
         * @param {ModifySigningKeyAgentIdDto} modifySigningKeyAgentIdDto
         * @param {string} keyId The unique identifier for the signing key provided by Fireblocks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setAgentId: function (modifySigningKeyAgentIdDto, keyId, 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.setAgentId(modifySigningKeyAgentIdDto, keyId, 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['KeyLinkBetaApi.setAgentId']) === 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); }];
                    }
                });
            });
        },
        /**
         * Allows assigning the signing key to a vault account, if it hasn\'t been assigned to any other vault accounts yet.
         * @summary Modify the signing keyId
         * @param {ModifySigningKeyDto} modifySigningKeyDto
         * @param {string} keyId The unique identifier for the signing key provided by Fireblocks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateSigningKey: function (modifySigningKeyDto, keyId, 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.updateSigningKey(modifySigningKeyDto, keyId, 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['KeyLinkBetaApi.updateSigningKey']) === 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.KeyLinkBetaApiFp = KeyLinkBetaApiFp;
/**
 * KeyLinkBetaApi - factory interface
 * @export
 */
var KeyLinkBetaApiFactory = function (configuration, basePath, axios) {
    var localVarFp = (0, exports.KeyLinkBetaApiFp)(configuration);
    return {
        /**
         * Adds a new signing key to the workspace. The added key will be linked to the specific Fireblocks agent user ID. The same user will receive the proof of ownership message to be signed, and upon successful proof, the key will become enabled.
         * @summary Add a new signing key
         * @param {KeyLinkBetaApiCreateSigningKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createSigningKey: function (requestParameters, options) {
            return localVarFp.createSigningKey(requestParameters.createSigningKeyDto, requestParameters.idempotencyKey, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Adds a new validation key used to validate signing keys. The new validation key will undergo an approval process by the workspace quorum.
         * @summary Add a new validation key
         * @param {KeyLinkBetaApiCreateValidationKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createValidationKey: function (requestParameters, options) {
            return localVarFp.createValidationKey(requestParameters.createValidationKeyDto, requestParameters.idempotencyKey, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Allows disabling validation key even if it has not expired yet. It is not allowed to enable the validation key back. Another key has to be used for future validations.
         * @summary Disables a validation key
         * @param {KeyLinkBetaApiDisableValidationKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disableValidationKey: function (requestParameters, options) {
            return localVarFp.disableValidationKey(requestParameters.modifyValidationKeyDto, requestParameters.keyId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns a signing key if it exists, identified by the specified `keyId`.
         * @summary Get a signing key by `keyId`
         * @param {KeyLinkBetaApiGetSigningKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getSigningKey: function (requestParameters, options) {
            return localVarFp.getSigningKey(requestParameters.keyId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns the list of signing keys in the workspace
         * @summary Get list of signing keys
         * @param {KeyLinkBetaApiGetSigningKeysListRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getSigningKeysList: function (requestParameters, options) {
            if (requestParameters === void 0) { requestParameters = {}; }
            return localVarFp.getSigningKeysList(requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order, requestParameters.vaultAccountId, requestParameters.agentUserId, requestParameters.algorithm, requestParameters.enabled, requestParameters.available, requestParameters.isAssigned, requestParameters.keyPrefix, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns a validation key if it exists, identified by the specified `keyId`.
         * @summary Get a validation key by `keyId`
         * @param {KeyLinkBetaApiGetValidationKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getValidationKey: function (requestParameters, options) {
            return localVarFp.getValidationKey(requestParameters.keyId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns the list of validation keys in the workspace
         * @summary Get list of registered validation keys
         * @param {KeyLinkBetaApiGetValidationKeysListRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getValidationKeysList: function (requestParameters, options) {
            if (requestParameters === void 0) { requestParameters = {}; }
            return localVarFp.getValidationKeysList(requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Can modify existing signing key id if the key is not enabled. The change done in background and will be visible once applied. If key is already enabled (after proof of ownership) the user cannot be changed.
         * @summary Set agent user id
         * @param {KeyLinkBetaApiSetAgentIdRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setAgentId: function (requestParameters, options) {
            return localVarFp.setAgentId(requestParameters.modifySigningKeyAgentIdDto, requestParameters.keyId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Allows assigning the signing key to a vault account, if it hasn\'t been assigned to any other vault accounts yet.
         * @summary Modify the signing keyId
         * @param {KeyLinkBetaApiUpdateSigningKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateSigningKey: function (requestParameters, options) {
            return localVarFp.updateSigningKey(requestParameters.modifySigningKeyDto, requestParameters.keyId, options).then(function (request) { return request(axios, basePath); });
        },
    };
};
exports.KeyLinkBetaApiFactory = KeyLinkBetaApiFactory;
/**
 * KeyLinkBetaApi - object-oriented interface
 * @export
 * @class KeyLinkBetaApi
 * @extends {BaseAPI}
 */
var KeyLinkBetaApi = /** @class */ (function (_super) {
    __extends(KeyLinkBetaApi, _super);
    function KeyLinkBetaApi() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Adds a new signing key to the workspace. The added key will be linked to the specific Fireblocks agent user ID. The same user will receive the proof of ownership message to be signed, and upon successful proof, the key will become enabled.
     * @summary Add a new signing key
     * @param {KeyLinkBetaApiCreateSigningKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeyLinkBetaApi
     */
    KeyLinkBetaApi.prototype.createSigningKey = function (requestParameters) {
        var _this = this;
        return (0, exports.KeyLinkBetaApiFp)(this.configuration).createSigningKey(requestParameters.createSigningKeyDto, requestParameters.idempotencyKey).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Adds a new validation key used to validate signing keys. The new validation key will undergo an approval process by the workspace quorum.
     * @summary Add a new validation key
     * @param {KeyLinkBetaApiCreateValidationKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeyLinkBetaApi
     */
    KeyLinkBetaApi.prototype.createValidationKey = function (requestParameters) {
        var _this = this;
        return (0, exports.KeyLinkBetaApiFp)(this.configuration).createValidationKey(requestParameters.createValidationKeyDto, requestParameters.idempotencyKey).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Allows disabling validation key even if it has not expired yet. It is not allowed to enable the validation key back. Another key has to be used for future validations.
     * @summary Disables a validation key
     * @param {KeyLinkBetaApiDisableValidationKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeyLinkBetaApi
     */
    KeyLinkBetaApi.prototype.disableValidationKey = function (requestParameters) {
        var _this = this;
        return (0, exports.KeyLinkBetaApiFp)(this.configuration).disableValidationKey(requestParameters.modifyValidationKeyDto, requestParameters.keyId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns a signing key if it exists, identified by the specified `keyId`.
     * @summary Get a signing key by `keyId`
     * @param {KeyLinkBetaApiGetSigningKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeyLinkBetaApi
     */
    KeyLinkBetaApi.prototype.getSigningKey = function (requestParameters) {
        var _this = this;
        return (0, exports.KeyLinkBetaApiFp)(this.configuration).getSigningKey(requestParameters.keyId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns the list of signing keys in the workspace
     * @summary Get list of signing keys
     * @param {KeyLinkBetaApiGetSigningKeysListRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeyLinkBetaApi
     */
    KeyLinkBetaApi.prototype.getSigningKeysList = function (requestParameters) {
        var _this = this;
        if (requestParameters === void 0) { requestParameters = {}; }
        return (0, exports.KeyLinkBetaApiFp)(this.configuration).getSigningKeysList(requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order, requestParameters.vaultAccountId, requestParameters.agentUserId, requestParameters.algorithm, requestParameters.enabled, requestParameters.available, requestParameters.isAssigned, requestParameters.keyPrefix).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns a validation key if it exists, identified by the specified `keyId`.
     * @summary Get a validation key by `keyId`
     * @param {KeyLinkBetaApiGetValidationKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeyLinkBetaApi
     */
    KeyLinkBetaApi.prototype.getValidationKey = function (requestParameters) {
        var _this = this;
        return (0, exports.KeyLinkBetaApiFp)(this.configuration).getValidationKey(requestParameters.keyId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns the list of validation keys in the workspace
     * @summary Get list of registered validation keys
     * @param {KeyLinkBetaApiGetValidationKeysListRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeyLinkBetaApi
     */
    KeyLinkBetaApi.prototype.getValidationKeysList = function (requestParameters) {
        var _this = this;
        if (requestParameters === void 0) { requestParameters = {}; }
        return (0, exports.KeyLinkBetaApiFp)(this.configuration).getValidationKeysList(requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Can modify existing signing key id if the key is not enabled. The change done in background and will be visible once applied. If key is already enabled (after proof of ownership) the user cannot be changed.
     * @summary Set agent user id
     * @param {KeyLinkBetaApiSetAgentIdRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeyLinkBetaApi
     */
    KeyLinkBetaApi.prototype.setAgentId = function (requestParameters) {
        var _this = this;
        return (0, exports.KeyLinkBetaApiFp)(this.configuration).setAgentId(requestParameters.modifySigningKeyAgentIdDto, requestParameters.keyId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Allows assigning the signing key to a vault account, if it hasn\'t been assigned to any other vault accounts yet.
     * @summary Modify the signing keyId
     * @param {KeyLinkBetaApiUpdateSigningKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeyLinkBetaApi
     */
    KeyLinkBetaApi.prototype.updateSigningKey = function (requestParameters) {
        var _this = this;
        return (0, exports.KeyLinkBetaApiFp)(this.configuration).updateSigningKey(requestParameters.modifySigningKeyDto, requestParameters.keyId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    return KeyLinkBetaApi;
}(base_1.BaseAPI));
exports.KeyLinkBetaApi = KeyLinkBetaApi;
/**
 * @export
 */
exports.GetSigningKeysListSortByEnum = {
    CreatedAt: 'createdAt'
};
/**
 * @export
 */
exports.GetSigningKeysListOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
/**
 * @export
 */
exports.GetSigningKeysListAlgorithmEnum = {
    EcdsaSecp256K1: 'ECDSA_SECP256K1',
    EddsaEd25519: 'EDDSA_ED25519'
};
/**
 * @export
 */
exports.GetValidationKeysListSortByEnum = {
    CreatedAt: 'createdAt'
};
/**
 * @export
 */
exports.GetValidationKeysListOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
//# sourceMappingURL=key-link-beta-api.js.map