"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.GetCosignersOrderEnum = exports.GetApiKeysOrderEnum = exports.CosignersBetaApi = exports.CosignersBetaApiFactory = exports.CosignersBetaApiFp = exports.CosignersBetaApiAxiosParamCreator = 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");
/**
 * CosignersBetaApi - axios parameter creator
 * @export
 */
var CosignersBetaApiAxiosParamCreator = function (configuration) {
    var _this = this;
    return {
        /**
         * Add a new cosigner. The cosigner will be pending pairing until the API key is manually paired Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Add cosigner
         * @param {AddCosignerRequest} addCosignerRequest
         * @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}
         */
        addCosigner: function (addCosignerRequest, 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)('addCosigner', 'addCosignerRequest', addCosignerRequest);
                    localVarPath = "/cosigners";
                    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)(addCosignerRequest, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Get an API key by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get API key
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getApiKey: function (cosignerId, apiKeyId, 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)('getApiKey', 'cosignerId', cosignerId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getApiKey', 'apiKeyId', apiKeyId);
                    localVarPath = "/cosigners/{cosignerId}/api_keys/{apiKeyId}"
                        .replace("{".concat("cosignerId", "}"), encodeURIComponent(String(cosignerId)))
                        .replace("{".concat("apiKeyId", "}"), encodeURIComponent(String(apiKeyId)));
                    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,
                        }];
                });
            });
        },
        /**
         * Get all cosigner paired API keys (paginated). **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get all API keys
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {GetApiKeysOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {string} [pageCursor] Cursor of the required page
         * @param {number} [pageSize] Maximum number of items in the page
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getApiKeys: function (cosignerId, order, pageCursor, pageSize, 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)('getApiKeys', 'cosignerId', cosignerId);
                    localVarPath = "/cosigners/{cosignerId}/api_keys"
                        .replace("{".concat("cosignerId", "}"), encodeURIComponent(String(cosignerId)));
                    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 (order !== undefined) {
                        localVarQueryParameter['order'] = order;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    (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,
                        }];
                });
            });
        },
        /**
         * Get a cosigner by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get cosigner
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCosigner: function (cosignerId, 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)('getCosigner', 'cosignerId', cosignerId);
                    localVarPath = "/cosigners/{cosignerId}"
                        .replace("{".concat("cosignerId", "}"), encodeURIComponent(String(cosignerId)));
                    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,
                        }];
                });
            });
        },
        /**
         * Get all workspace cosigners (paginated). **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get all cosigners
         * @param {GetCosignersOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {string} [pageCursor] Cursor of the required page
         * @param {number} [pageSize] Maximum number of items in the page
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCosigners: function (order, pageCursor, pageSize, 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 = "/cosigners";
                    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 (order !== undefined) {
                        localVarQueryParameter['order'] = order;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    (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,
                        }];
                });
            });
        },
        /**
         * Get the status of an asynchronous request Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get request status
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @param {string} requestId
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRequestStatus: function (cosignerId, apiKeyId, requestId, 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)('getRequestStatus', 'cosignerId', cosignerId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getRequestStatus', 'apiKeyId', apiKeyId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getRequestStatus', 'requestId', requestId);
                    localVarPath = "/cosigners/{cosignerId}/api_keys/{apiKeyId}/{requestId}"
                        .replace("{".concat("cosignerId", "}"), encodeURIComponent(String(cosignerId)))
                        .replace("{".concat("apiKeyId", "}"), encodeURIComponent(String(apiKeyId)))
                        .replace("{".concat("requestId", "}"), encodeURIComponent(String(requestId)));
                    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,
                        }];
                });
            });
        },
        /**
         * Pair an API key to a cosigner Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Pair API key
         * @param {PairApiKeyRequest} pairApiKeyRequest
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @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}
         */
        pairApiKey: function (pairApiKeyRequest, cosignerId, apiKeyId, 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)('pairApiKey', 'pairApiKeyRequest', pairApiKeyRequest);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('pairApiKey', 'cosignerId', cosignerId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('pairApiKey', 'apiKeyId', apiKeyId);
                    localVarPath = "/cosigners/{cosignerId}/api_keys/{apiKeyId}"
                        .replace("{".concat("cosignerId", "}"), encodeURIComponent(String(cosignerId)))
                        .replace("{".concat("apiKeyId", "}"), encodeURIComponent(String(apiKeyId)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'PUT' }, 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)(pairApiKeyRequest, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Rename a cosigner by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Rename cosigner
         * @param {RenameCosigner} renameCosigner
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        renameCosigner: function (renameCosigner, cosignerId, 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)('renameCosigner', 'renameCosigner', renameCosigner);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('renameCosigner', 'cosignerId', cosignerId);
                    localVarPath = "/cosigners/{cosignerId}"
                        .replace("{".concat("cosignerId", "}"), encodeURIComponent(String(cosignerId)));
                    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)(renameCosigner, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Unpair an API key from a cosigner Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Unpair API key
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        unpairApiKey: function (cosignerId, apiKeyId, 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)('unpairApiKey', 'cosignerId', cosignerId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('unpairApiKey', 'apiKeyId', apiKeyId);
                    localVarPath = "/cosigners/{cosignerId}/api_keys/{apiKeyId}"
                        .replace("{".concat("cosignerId", "}"), encodeURIComponent(String(cosignerId)))
                        .replace("{".concat("apiKeyId", "}"), encodeURIComponent(String(apiKeyId)));
                    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,
                        }];
                });
            });
        },
        /**
         * Update the callback handler of an API key Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Update API key callback handler
         * @param {UpdateCallbackHandlerRequest} updateCallbackHandlerRequest
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCallbackHandler: function (updateCallbackHandlerRequest, cosignerId, apiKeyId, 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)('updateCallbackHandler', 'updateCallbackHandlerRequest', updateCallbackHandlerRequest);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('updateCallbackHandler', 'cosignerId', cosignerId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('updateCallbackHandler', 'apiKeyId', apiKeyId);
                    localVarPath = "/cosigners/{cosignerId}/api_keys/{apiKeyId}"
                        .replace("{".concat("cosignerId", "}"), encodeURIComponent(String(cosignerId)))
                        .replace("{".concat("apiKeyId", "}"), encodeURIComponent(String(apiKeyId)));
                    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)(updateCallbackHandlerRequest, localVarRequestOptions, configuration);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
    };
};
exports.CosignersBetaApiAxiosParamCreator = CosignersBetaApiAxiosParamCreator;
/**
 * CosignersBetaApi - functional programming interface
 * @export
 */
var CosignersBetaApiFp = function (configuration) {
    var localVarAxiosParamCreator = (0, exports.CosignersBetaApiAxiosParamCreator)(configuration);
    return {
        /**
         * Add a new cosigner. The cosigner will be pending pairing until the API key is manually paired Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Add cosigner
         * @param {AddCosignerRequest} addCosignerRequest
         * @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}
         */
        addCosigner: function (addCosignerRequest, 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.addCosigner(addCosignerRequest, 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['CosignersBetaApi.addCosigner']) === 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); }];
                    }
                });
            });
        },
        /**
         * Get an API key by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get API key
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getApiKey: function (cosignerId, apiKeyId, 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.getApiKey(cosignerId, apiKeyId, 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['CosignersBetaApi.getApiKey']) === 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); }];
                    }
                });
            });
        },
        /**
         * Get all cosigner paired API keys (paginated). **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get all API keys
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {GetApiKeysOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {string} [pageCursor] Cursor of the required page
         * @param {number} [pageSize] Maximum number of items in the page
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getApiKeys: function (cosignerId, order, pageCursor, pageSize, 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.getApiKeys(cosignerId, order, pageCursor, pageSize, 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['CosignersBetaApi.getApiKeys']) === 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); }];
                    }
                });
            });
        },
        /**
         * Get a cosigner by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get cosigner
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCosigner: function (cosignerId, 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.getCosigner(cosignerId, 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['CosignersBetaApi.getCosigner']) === 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); }];
                    }
                });
            });
        },
        /**
         * Get all workspace cosigners (paginated). **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get all cosigners
         * @param {GetCosignersOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {string} [pageCursor] Cursor of the required page
         * @param {number} [pageSize] Maximum number of items in the page
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCosigners: function (order, pageCursor, pageSize, 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.getCosigners(order, pageCursor, pageSize, 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['CosignersBetaApi.getCosigners']) === 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); }];
                    }
                });
            });
        },
        /**
         * Get the status of an asynchronous request Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get request status
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @param {string} requestId
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRequestStatus: function (cosignerId, apiKeyId, requestId, 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.getRequestStatus(cosignerId, apiKeyId, requestId, 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['CosignersBetaApi.getRequestStatus']) === 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); }];
                    }
                });
            });
        },
        /**
         * Pair an API key to a cosigner Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Pair API key
         * @param {PairApiKeyRequest} pairApiKeyRequest
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @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}
         */
        pairApiKey: function (pairApiKeyRequest, cosignerId, apiKeyId, 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.pairApiKey(pairApiKeyRequest, cosignerId, apiKeyId, 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['CosignersBetaApi.pairApiKey']) === 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 cosigner by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Rename cosigner
         * @param {RenameCosigner} renameCosigner
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        renameCosigner: function (renameCosigner, cosignerId, 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.renameCosigner(renameCosigner, cosignerId, 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['CosignersBetaApi.renameCosigner']) === 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); }];
                    }
                });
            });
        },
        /**
         * Unpair an API key from a cosigner Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Unpair API key
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        unpairApiKey: function (cosignerId, apiKeyId, 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.unpairApiKey(cosignerId, apiKeyId, 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['CosignersBetaApi.unpairApiKey']) === 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); }];
                    }
                });
            });
        },
        /**
         * Update the callback handler of an API key Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Update API key callback handler
         * @param {UpdateCallbackHandlerRequest} updateCallbackHandlerRequest
         * @param {string} cosignerId The unique identifier of the cosigner
         * @param {string} apiKeyId The unique identifier of the API key
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCallbackHandler: function (updateCallbackHandlerRequest, cosignerId, apiKeyId, 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.updateCallbackHandler(updateCallbackHandlerRequest, cosignerId, apiKeyId, 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['CosignersBetaApi.updateCallbackHandler']) === 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.CosignersBetaApiFp = CosignersBetaApiFp;
/**
 * CosignersBetaApi - factory interface
 * @export
 */
var CosignersBetaApiFactory = function (configuration, basePath, axios) {
    var localVarFp = (0, exports.CosignersBetaApiFp)(configuration);
    return {
        /**
         * Add a new cosigner. The cosigner will be pending pairing until the API key is manually paired Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Add cosigner
         * @param {CosignersBetaApiAddCosignerRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        addCosigner: function (requestParameters, options) {
            return localVarFp.addCosigner(requestParameters.addCosignerRequest, requestParameters.idempotencyKey, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Get an API key by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get API key
         * @param {CosignersBetaApiGetApiKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getApiKey: function (requestParameters, options) {
            return localVarFp.getApiKey(requestParameters.cosignerId, requestParameters.apiKeyId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Get all cosigner paired API keys (paginated). **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get all API keys
         * @param {CosignersBetaApiGetApiKeysRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getApiKeys: function (requestParameters, options) {
            return localVarFp.getApiKeys(requestParameters.cosignerId, requestParameters.order, requestParameters.pageCursor, requestParameters.pageSize, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Get a cosigner by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get cosigner
         * @param {CosignersBetaApiGetCosignerRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCosigner: function (requestParameters, options) {
            return localVarFp.getCosigner(requestParameters.cosignerId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Get all workspace cosigners (paginated). **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get all cosigners
         * @param {CosignersBetaApiGetCosignersRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCosigners: function (requestParameters, options) {
            if (requestParameters === void 0) { requestParameters = {}; }
            return localVarFp.getCosigners(requestParameters.order, requestParameters.pageCursor, requestParameters.pageSize, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Get the status of an asynchronous request Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Get request status
         * @param {CosignersBetaApiGetRequestStatusRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRequestStatus: function (requestParameters, options) {
            return localVarFp.getRequestStatus(requestParameters.cosignerId, requestParameters.apiKeyId, requestParameters.requestId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Pair an API key to a cosigner Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Pair API key
         * @param {CosignersBetaApiPairApiKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        pairApiKey: function (requestParameters, options) {
            return localVarFp.pairApiKey(requestParameters.pairApiKeyRequest, requestParameters.cosignerId, requestParameters.apiKeyId, requestParameters.idempotencyKey, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Rename a cosigner by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Rename cosigner
         * @param {CosignersBetaApiRenameCosignerRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        renameCosigner: function (requestParameters, options) {
            return localVarFp.renameCosigner(requestParameters.renameCosigner, requestParameters.cosignerId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Unpair an API key from a cosigner Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Unpair API key
         * @param {CosignersBetaApiUnpairApiKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        unpairApiKey: function (requestParameters, options) {
            return localVarFp.unpairApiKey(requestParameters.cosignerId, requestParameters.apiKeyId, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Update the callback handler of an API key Endpoint Permission: Admin and Non-Signing Admin.
         * @summary Update API key callback handler
         * @param {CosignersBetaApiUpdateCallbackHandlerRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCallbackHandler: function (requestParameters, options) {
            return localVarFp.updateCallbackHandler(requestParameters.updateCallbackHandlerRequest, requestParameters.cosignerId, requestParameters.apiKeyId, options).then(function (request) { return request(axios, basePath); });
        },
    };
};
exports.CosignersBetaApiFactory = CosignersBetaApiFactory;
/**
 * CosignersBetaApi - object-oriented interface
 * @export
 * @class CosignersBetaApi
 * @extends {BaseAPI}
 */
var CosignersBetaApi = /** @class */ (function (_super) {
    __extends(CosignersBetaApi, _super);
    function CosignersBetaApi() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Add a new cosigner. The cosigner will be pending pairing until the API key is manually paired Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Add cosigner
     * @param {CosignersBetaApiAddCosignerRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.addCosigner = function (requestParameters) {
        var _this = this;
        return (0, exports.CosignersBetaApiFp)(this.configuration).addCosigner(requestParameters.addCosignerRequest, requestParameters.idempotencyKey).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Get an API key by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Get API key
     * @param {CosignersBetaApiGetApiKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.getApiKey = function (requestParameters) {
        var _this = this;
        return (0, exports.CosignersBetaApiFp)(this.configuration).getApiKey(requestParameters.cosignerId, requestParameters.apiKeyId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Get all cosigner paired API keys (paginated). **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Get all API keys
     * @param {CosignersBetaApiGetApiKeysRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.getApiKeys = function (requestParameters) {
        var _this = this;
        return (0, exports.CosignersBetaApiFp)(this.configuration).getApiKeys(requestParameters.cosignerId, requestParameters.order, requestParameters.pageCursor, requestParameters.pageSize).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Get a cosigner by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Get cosigner
     * @param {CosignersBetaApiGetCosignerRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.getCosigner = function (requestParameters) {
        var _this = this;
        return (0, exports.CosignersBetaApiFp)(this.configuration).getCosigner(requestParameters.cosignerId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Get all workspace cosigners (paginated). **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Get all cosigners
     * @param {CosignersBetaApiGetCosignersRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.getCosigners = function (requestParameters) {
        var _this = this;
        if (requestParameters === void 0) { requestParameters = {}; }
        return (0, exports.CosignersBetaApiFp)(this.configuration).getCosigners(requestParameters.order, requestParameters.pageCursor, requestParameters.pageSize).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Get the status of an asynchronous request Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Get request status
     * @param {CosignersBetaApiGetRequestStatusRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.getRequestStatus = function (requestParameters) {
        var _this = this;
        return (0, exports.CosignersBetaApiFp)(this.configuration).getRequestStatus(requestParameters.cosignerId, requestParameters.apiKeyId, requestParameters.requestId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Pair an API key to a cosigner Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Pair API key
     * @param {CosignersBetaApiPairApiKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.pairApiKey = function (requestParameters) {
        var _this = this;
        return (0, exports.CosignersBetaApiFp)(this.configuration).pairApiKey(requestParameters.pairApiKeyRequest, requestParameters.cosignerId, requestParameters.apiKeyId, requestParameters.idempotencyKey).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Rename a cosigner by ID. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Rename cosigner
     * @param {CosignersBetaApiRenameCosignerRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.renameCosigner = function (requestParameters) {
        var _this = this;
        return (0, exports.CosignersBetaApiFp)(this.configuration).renameCosigner(requestParameters.renameCosigner, requestParameters.cosignerId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Unpair an API key from a cosigner Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Unpair API key
     * @param {CosignersBetaApiUnpairApiKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.unpairApiKey = function (requestParameters) {
        var _this = this;
        return (0, exports.CosignersBetaApiFp)(this.configuration).unpairApiKey(requestParameters.cosignerId, requestParameters.apiKeyId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Update the callback handler of an API key Endpoint Permission: Admin and Non-Signing Admin.
     * @summary Update API key callback handler
     * @param {CosignersBetaApiUpdateCallbackHandlerRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CosignersBetaApi
     */
    CosignersBetaApi.prototype.updateCallbackHandler = function (requestParameters) {
        var _this = this;
        return (0, exports.CosignersBetaApiFp)(this.configuration).updateCallbackHandler(requestParameters.updateCallbackHandlerRequest, requestParameters.cosignerId, requestParameters.apiKeyId).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    return CosignersBetaApi;
}(base_1.BaseAPI));
exports.CosignersBetaApi = CosignersBetaApi;
/**
 * @export
 */
exports.GetApiKeysOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
/**
 * @export
 */
exports.GetCosignersOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
//# sourceMappingURL=cosigners-beta-api.js.map