/* 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. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; import { convertToFireblocksResponse } from "../response/fireblocksResponse"; // URLSearchParams not necessarily used // @ts-ignore import { URL, URLSearchParams } from 'url'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; import { assertParamExistsAndNotEmpty } from '../utils/validation_utils'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore import { CreateNetworkIdRequest } from '../models'; // @ts-ignore import { DeleteNetworkConnectionResponse } from '../models'; // @ts-ignore import { DeleteNetworkIdResponse } from '../models'; // @ts-ignore import { ErrorSchema } from '../models'; // @ts-ignore import { GetNetworkConnectionsResponse } from '../models'; // @ts-ignore import { GetNetworkIdsResponse } from '../models'; // @ts-ignore import { GetRoutingPolicyAssetGroupsResponse } from '../models'; // @ts-ignore import { NetworkConnection } from '../models'; // @ts-ignore import { NetworkConnectionResponse } from '../models'; // @ts-ignore import { NetworkIdResponse } from '../models'; // @ts-ignore import { SearchNetworkIdsResponse } from '../models'; // @ts-ignore import { SetNetworkIdDiscoverabilityRequest } from '../models'; // @ts-ignore import { SetNetworkIdNameRequest } from '../models'; // @ts-ignore import { SetNetworkIdResponse } from '../models'; // @ts-ignore import { SetNetworkIdRoutingPolicyRequest } from '../models'; // @ts-ignore import { SetRoutingPolicyRequest } from '../models'; // @ts-ignore import { SetRoutingPolicyResponse } from '../models'; // @ts-ignore import { ThirdPartyRouting } from '../models'; /** * NetworkConnectionsApi - axios parameter creator * @export */ export const NetworkConnectionsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * The Fireblocks Network allows for flexibility around incoming deposits. A receiver can receive network deposits to locations other than Fireblocks. This endpoint validates whether future transactions are routed to the displayed recipient or to a 3rd party. * @summary Retrieve third-party network routing validation * @param {string} connectionId The ID of the network connection * @param {string} assetType The destination asset type * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkThirdPartyRouting: async (connectionId: string, assetType: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('checkThirdPartyRouting', 'connectionId', connectionId) assertParamExistsAndNotEmpty('checkThirdPartyRouting', 'assetType', assetType) const localVarPath = `/network_connections/{connectionId}/is_third_party_routing/{assetType}` .replace(`{${"connectionId"}}`, encodeURIComponent(String(connectionId))) .replace(`{${"assetType"}}`, encodeURIComponent(String(assetType))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'checkThirdPartyRouting'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Initiates a new network connection. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). * @summary Create a new network connection * @param {NetworkConnection} [networkConnection] * @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} */ createNetworkConnection: async (networkConnection?: NetworkConnection, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/network_connections`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'createNetworkConnection'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(networkConnection, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create a new Network ID. * @summary Creates a new Network ID * @param {CreateNetworkIdRequest} [createNetworkIdRequest] * @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} */ createNetworkId: async (createNetworkIdRequest?: CreateNetworkIdRequest, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/network_ids`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'createNetworkId'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createNetworkIdRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Deletes an existing network connection specified by its connection ID. * @summary Delete a network connection by ID * @param {string} connectionId The ID of the network connection to delete * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteNetworkConnection: async (connectionId: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('deleteNetworkConnection', 'connectionId', connectionId) const localVarPath = `/network_connections/{connectionId}` .replace(`{${"connectionId"}}`, encodeURIComponent(String(connectionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'deleteNetworkConnection'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Deletes a network by its ID. * @summary Delete specific network ID. * @param {string} networkId The ID of the network * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteNetworkId: async (networkId: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('deleteNetworkId', 'networkId', networkId) const localVarPath = `/network_ids/{networkId}` .replace(`{${"networkId"}}`, encodeURIComponent(String(networkId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'deleteNetworkId'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets a network connection by ID. * @summary Get a network connection * @param {string} connectionId The ID of the connection * @param {*} [options] Override http request option. * @throws {RequiredError} */ getNetwork: async (connectionId: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('getNetwork', 'connectionId', connectionId) const localVarPath = `/network_connections/{connectionId}` .replace(`{${"connectionId"}}`, encodeURIComponent(String(connectionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'getNetwork'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns all network connections. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** * @summary List network connections * @param {*} [options] Override http request option. * @throws {RequiredError} */ getNetworkConnections: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/network_connections`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'getNetworkConnections'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns specific network ID. * @summary Return specific network ID. * @param {string} networkId The ID of the network * @param {*} [options] Override http request option. * @throws {RequiredError} */ getNetworkId: async (networkId: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('getNetworkId', 'networkId', networkId) const localVarPath = `/network_ids/{networkId}` .replace(`{${"networkId"}}`, encodeURIComponent(String(networkId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'getNetworkId'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieves a list of all local and discoverable remote network IDs. * @summary Get all network IDs * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ getNetworkIds: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/network_ids`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'getNetworkIds'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns all enabled routing policy asset groups * @summary Return all enabled routing policy asset groups * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRoutingPolicyAssetGroups: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/network_ids/routing_policy_asset_groups`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'getRoutingPolicyAssetGroups'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieves a list of all local and discoverable remote network IDs. Can be filtered. * @summary Get both local IDs and discoverable remote IDs * @param {string} [search] Search string - displayName networkId. Optional * @param {boolean} [excludeSelf] Exclude your networkIds. Optional, default false * @param {boolean} [onlySelf] Include just your networkIds. Optional, default false * @param {boolean} [excludeConnected] Exclude connected networkIds. Optional, default false * @param {string} [pageCursor] ID of the record after which to fetch $limit records * @param {number} [pageSize] Number of records to fetch. By default, it is 50 * @param {*} [options] Override http request option. * @throws {RequiredError} */ searchNetworkIds: async (search?: string, excludeSelf?: boolean, onlySelf?: boolean, excludeConnected?: boolean, pageCursor?: string, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/network_ids/search`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'searchNetworkIds'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (search !== undefined) { localVarQueryParameter['search'] = search; } if (excludeSelf !== undefined) { localVarQueryParameter['excludeSelf'] = excludeSelf; } if (onlySelf !== undefined) { localVarQueryParameter['onlySelf'] = onlySelf; } if (excludeConnected !== undefined) { localVarQueryParameter['excludeConnected'] = excludeConnected; } if (pageCursor !== undefined) { localVarQueryParameter['pageCursor'] = pageCursor; } if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update whether or not the network ID is discoverable by others. * @summary Update network ID\'s discoverability. * @param {SetNetworkIdDiscoverabilityRequest} setNetworkIdDiscoverabilityRequest * @param {string} networkId The ID of the network * @param {*} [options] Override http request option. * @throws {RequiredError} */ setNetworkIdDiscoverability: async (setNetworkIdDiscoverabilityRequest: SetNetworkIdDiscoverabilityRequest, networkId: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExists('setNetworkIdDiscoverability', 'setNetworkIdDiscoverabilityRequest', setNetworkIdDiscoverabilityRequest) assertParamExistsAndNotEmpty('setNetworkIdDiscoverability', 'networkId', networkId) const localVarPath = `/network_ids/{networkId}/set_discoverability` .replace(`{${"networkId"}}`, encodeURIComponent(String(networkId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'setNetworkIdDiscoverability'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(setNetworkIdDiscoverabilityRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates name of a specified network ID. * @summary Update network ID\'s name. * @param {SetNetworkIdNameRequest} setNetworkIdNameRequest * @param {string} networkId The ID of the network * @param {*} [options] Override http request option. * @throws {RequiredError} */ setNetworkIdName: async (setNetworkIdNameRequest: SetNetworkIdNameRequest, networkId: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExists('setNetworkIdName', 'setNetworkIdNameRequest', setNetworkIdNameRequest) assertParamExistsAndNotEmpty('setNetworkIdName', 'networkId', networkId) const localVarPath = `/network_ids/{networkId}/set_name` .replace(`{${"networkId"}}`, encodeURIComponent(String(networkId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'setNetworkIdName'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(setNetworkIdNameRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates the routing policy of a specified network ID. * @summary Update network id routing policy. * @param {string} networkId The ID of the network * @param {SetNetworkIdRoutingPolicyRequest} [setNetworkIdRoutingPolicyRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ setNetworkIdRoutingPolicy: async (networkId: string, setNetworkIdRoutingPolicyRequest?: SetNetworkIdRoutingPolicyRequest, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('setNetworkIdRoutingPolicy', 'networkId', networkId) const localVarPath = `/network_ids/{networkId}/set_routing_policy` .replace(`{${"networkId"}}`, encodeURIComponent(String(networkId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'setNetworkIdRoutingPolicy'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(setNetworkIdRoutingPolicyRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates an existing network connection\'s routing policy. * @summary Update network connection routing policy. * @param {string} connectionId The ID of the network connection * @param {SetRoutingPolicyRequest} [setRoutingPolicyRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ setRoutingPolicy: async (connectionId: string, setRoutingPolicyRequest?: SetRoutingPolicyRequest, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('setRoutingPolicy', 'connectionId', connectionId) const localVarPath = `/network_connections/{connectionId}/set_routing_policy` .replace(`{${"connectionId"}}`, encodeURIComponent(String(connectionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'setRoutingPolicy'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(setRoutingPolicyRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * NetworkConnectionsApi - functional programming interface * @export */ export const NetworkConnectionsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = NetworkConnectionsApiAxiosParamCreator(configuration) return { /** * The Fireblocks Network allows for flexibility around incoming deposits. A receiver can receive network deposits to locations other than Fireblocks. This endpoint validates whether future transactions are routed to the displayed recipient or to a 3rd party. * @summary Retrieve third-party network routing validation * @param {string} connectionId The ID of the network connection * @param {string} assetType The destination asset type * @param {*} [options] Override http request option. * @throws {RequiredError} */ async checkThirdPartyRouting(connectionId: string, assetType: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.checkThirdPartyRouting(connectionId, assetType, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.checkThirdPartyRouting']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Initiates a new network connection. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). * @summary Create a new network connection * @param {NetworkConnection} [networkConnection] * @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} */ async createNetworkConnection(networkConnection?: NetworkConnection, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createNetworkConnection(networkConnection, idempotencyKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.createNetworkConnection']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Create a new Network ID. * @summary Creates a new Network ID * @param {CreateNetworkIdRequest} [createNetworkIdRequest] * @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} */ async createNetworkId(createNetworkIdRequest?: CreateNetworkIdRequest, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createNetworkId(createNetworkIdRequest, idempotencyKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.createNetworkId']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Deletes an existing network connection specified by its connection ID. * @summary Delete a network connection by ID * @param {string} connectionId The ID of the network connection to delete * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteNetworkConnection(connectionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNetworkConnection(connectionId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.deleteNetworkConnection']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Deletes a network by its ID. * @summary Delete specific network ID. * @param {string} networkId The ID of the network * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteNetworkId(networkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNetworkId(networkId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.deleteNetworkId']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Gets a network connection by ID. * @summary Get a network connection * @param {string} connectionId The ID of the connection * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getNetwork(connectionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getNetwork(connectionId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.getNetwork']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Returns all network connections. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** * @summary List network connections * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getNetworkConnections(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getNetworkConnections(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.getNetworkConnections']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Returns specific network ID. * @summary Return specific network ID. * @param {string} networkId The ID of the network * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getNetworkId(networkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getNetworkId(networkId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.getNetworkId']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Retrieves a list of all local and discoverable remote network IDs. * @summary Get all network IDs * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ async getNetworkIds(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getNetworkIds(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.getNetworkIds']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Returns all enabled routing policy asset groups * @summary Return all enabled routing policy asset groups * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getRoutingPolicyAssetGroups(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getRoutingPolicyAssetGroups(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.getRoutingPolicyAssetGroups']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Retrieves a list of all local and discoverable remote network IDs. Can be filtered. * @summary Get both local IDs and discoverable remote IDs * @param {string} [search] Search string - displayName networkId. Optional * @param {boolean} [excludeSelf] Exclude your networkIds. Optional, default false * @param {boolean} [onlySelf] Include just your networkIds. Optional, default false * @param {boolean} [excludeConnected] Exclude connected networkIds. Optional, default false * @param {string} [pageCursor] ID of the record after which to fetch $limit records * @param {number} [pageSize] Number of records to fetch. By default, it is 50 * @param {*} [options] Override http request option. * @throws {RequiredError} */ async searchNetworkIds(search?: string, excludeSelf?: boolean, onlySelf?: boolean, excludeConnected?: boolean, pageCursor?: string, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchNetworkIds(search, excludeSelf, onlySelf, excludeConnected, pageCursor, pageSize, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.searchNetworkIds']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Update whether or not the network ID is discoverable by others. * @summary Update network ID\'s discoverability. * @param {SetNetworkIdDiscoverabilityRequest} setNetworkIdDiscoverabilityRequest * @param {string} networkId The ID of the network * @param {*} [options] Override http request option. * @throws {RequiredError} */ async setNetworkIdDiscoverability(setNetworkIdDiscoverabilityRequest: SetNetworkIdDiscoverabilityRequest, networkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setNetworkIdDiscoverability(setNetworkIdDiscoverabilityRequest, networkId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.setNetworkIdDiscoverability']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Updates name of a specified network ID. * @summary Update network ID\'s name. * @param {SetNetworkIdNameRequest} setNetworkIdNameRequest * @param {string} networkId The ID of the network * @param {*} [options] Override http request option. * @throws {RequiredError} */ async setNetworkIdName(setNetworkIdNameRequest: SetNetworkIdNameRequest, networkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setNetworkIdName(setNetworkIdNameRequest, networkId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.setNetworkIdName']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Updates the routing policy of a specified network ID. * @summary Update network id routing policy. * @param {string} networkId The ID of the network * @param {SetNetworkIdRoutingPolicyRequest} [setNetworkIdRoutingPolicyRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async setNetworkIdRoutingPolicy(networkId: string, setNetworkIdRoutingPolicyRequest?: SetNetworkIdRoutingPolicyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setNetworkIdRoutingPolicy(networkId, setNetworkIdRoutingPolicyRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.setNetworkIdRoutingPolicy']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Updates an existing network connection\'s routing policy. * @summary Update network connection routing policy. * @param {string} connectionId The ID of the network connection * @param {SetRoutingPolicyRequest} [setRoutingPolicyRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async setRoutingPolicy(connectionId: string, setRoutingPolicyRequest?: SetRoutingPolicyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setRoutingPolicy(connectionId, setRoutingPolicyRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['NetworkConnectionsApi.setRoutingPolicy']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, } }; /** * NetworkConnectionsApi - factory interface * @export */ export const NetworkConnectionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = NetworkConnectionsApiFp(configuration) return { /** * The Fireblocks Network allows for flexibility around incoming deposits. A receiver can receive network deposits to locations other than Fireblocks. This endpoint validates whether future transactions are routed to the displayed recipient or to a 3rd party. * @summary Retrieve third-party network routing validation * @param {NetworkConnectionsApiCheckThirdPartyRoutingRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkThirdPartyRouting(requestParameters: NetworkConnectionsApiCheckThirdPartyRoutingRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.checkThirdPartyRouting(requestParameters.connectionId, requestParameters.assetType, options).then((request) => request(axios, basePath)); }, /** * Initiates a new network connection. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). * @summary Create a new network connection * @param {NetworkConnectionsApiCreateNetworkConnectionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createNetworkConnection(requestParameters: NetworkConnectionsApiCreateNetworkConnectionRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createNetworkConnection(requestParameters.networkConnection, requestParameters.idempotencyKey, options).then((request) => request(axios, basePath)); }, /** * Create a new Network ID. * @summary Creates a new Network ID * @param {NetworkConnectionsApiCreateNetworkIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createNetworkId(requestParameters: NetworkConnectionsApiCreateNetworkIdRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createNetworkId(requestParameters.createNetworkIdRequest, requestParameters.idempotencyKey, options).then((request) => request(axios, basePath)); }, /** * Deletes an existing network connection specified by its connection ID. * @summary Delete a network connection by ID * @param {NetworkConnectionsApiDeleteNetworkConnectionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteNetworkConnection(requestParameters: NetworkConnectionsApiDeleteNetworkConnectionRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteNetworkConnection(requestParameters.connectionId, options).then((request) => request(axios, basePath)); }, /** * Deletes a network by its ID. * @summary Delete specific network ID. * @param {NetworkConnectionsApiDeleteNetworkIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteNetworkId(requestParameters: NetworkConnectionsApiDeleteNetworkIdRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteNetworkId(requestParameters.networkId, options).then((request) => request(axios, basePath)); }, /** * Gets a network connection by ID. * @summary Get a network connection * @param {NetworkConnectionsApiGetNetworkRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getNetwork(requestParameters: NetworkConnectionsApiGetNetworkRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getNetwork(requestParameters.connectionId, options).then((request) => request(axios, basePath)); }, /** * Returns all network connections. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** * @summary List network connections * @param {*} [options] Override http request option. * @throws {RequiredError} */ getNetworkConnections(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getNetworkConnections(options).then((request) => request(axios, basePath)); }, /** * Returns specific network ID. * @summary Return specific network ID. * @param {NetworkConnectionsApiGetNetworkIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getNetworkId(requestParameters: NetworkConnectionsApiGetNetworkIdRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getNetworkId(requestParameters.networkId, options).then((request) => request(axios, basePath)); }, /** * Retrieves a list of all local and discoverable remote network IDs. * @summary Get all network IDs * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ getNetworkIds(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getNetworkIds(options).then((request) => request(axios, basePath)); }, /** * Returns all enabled routing policy asset groups * @summary Return all enabled routing policy asset groups * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRoutingPolicyAssetGroups(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getRoutingPolicyAssetGroups(options).then((request) => request(axios, basePath)); }, /** * Retrieves a list of all local and discoverable remote network IDs. Can be filtered. * @summary Get both local IDs and discoverable remote IDs * @param {NetworkConnectionsApiSearchNetworkIdsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ searchNetworkIds(requestParameters: NetworkConnectionsApiSearchNetworkIdsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.searchNetworkIds(requestParameters.search, requestParameters.excludeSelf, requestParameters.onlySelf, requestParameters.excludeConnected, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath)); }, /** * Update whether or not the network ID is discoverable by others. * @summary Update network ID\'s discoverability. * @param {NetworkConnectionsApiSetNetworkIdDiscoverabilityRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ setNetworkIdDiscoverability(requestParameters: NetworkConnectionsApiSetNetworkIdDiscoverabilityRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.setNetworkIdDiscoverability(requestParameters.setNetworkIdDiscoverabilityRequest, requestParameters.networkId, options).then((request) => request(axios, basePath)); }, /** * Updates name of a specified network ID. * @summary Update network ID\'s name. * @param {NetworkConnectionsApiSetNetworkIdNameRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ setNetworkIdName(requestParameters: NetworkConnectionsApiSetNetworkIdNameRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.setNetworkIdName(requestParameters.setNetworkIdNameRequest, requestParameters.networkId, options).then((request) => request(axios, basePath)); }, /** * Updates the routing policy of a specified network ID. * @summary Update network id routing policy. * @param {NetworkConnectionsApiSetNetworkIdRoutingPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ setNetworkIdRoutingPolicy(requestParameters: NetworkConnectionsApiSetNetworkIdRoutingPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.setNetworkIdRoutingPolicy(requestParameters.networkId, requestParameters.setNetworkIdRoutingPolicyRequest, options).then((request) => request(axios, basePath)); }, /** * Updates an existing network connection\'s routing policy. * @summary Update network connection routing policy. * @param {NetworkConnectionsApiSetRoutingPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ setRoutingPolicy(requestParameters: NetworkConnectionsApiSetRoutingPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.setRoutingPolicy(requestParameters.connectionId, requestParameters.setRoutingPolicyRequest, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for checkThirdPartyRouting operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiCheckThirdPartyRoutingRequest */ export interface NetworkConnectionsApiCheckThirdPartyRoutingRequest { /** * The ID of the network connection * @type {string} * @memberof NetworkConnectionsApiCheckThirdPartyRouting */ readonly connectionId: string /** * The destination asset type * @type {string} * @memberof NetworkConnectionsApiCheckThirdPartyRouting */ readonly assetType: string } /** * Request parameters for createNetworkConnection operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiCreateNetworkConnectionRequest */ export interface NetworkConnectionsApiCreateNetworkConnectionRequest { /** * * @type {NetworkConnection} * @memberof NetworkConnectionsApiCreateNetworkConnection */ readonly networkConnection?: NetworkConnection /** * 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. * @type {string} * @memberof NetworkConnectionsApiCreateNetworkConnection */ readonly idempotencyKey?: string } /** * Request parameters for createNetworkId operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiCreateNetworkIdRequest */ export interface NetworkConnectionsApiCreateNetworkIdRequest { /** * * @type {CreateNetworkIdRequest} * @memberof NetworkConnectionsApiCreateNetworkId */ readonly createNetworkIdRequest?: CreateNetworkIdRequest /** * 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. * @type {string} * @memberof NetworkConnectionsApiCreateNetworkId */ readonly idempotencyKey?: string } /** * Request parameters for deleteNetworkConnection operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiDeleteNetworkConnectionRequest */ export interface NetworkConnectionsApiDeleteNetworkConnectionRequest { /** * The ID of the network connection to delete * @type {string} * @memberof NetworkConnectionsApiDeleteNetworkConnection */ readonly connectionId: string } /** * Request parameters for deleteNetworkId operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiDeleteNetworkIdRequest */ export interface NetworkConnectionsApiDeleteNetworkIdRequest { /** * The ID of the network * @type {string} * @memberof NetworkConnectionsApiDeleteNetworkId */ readonly networkId: string } /** * Request parameters for getNetwork operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiGetNetworkRequest */ export interface NetworkConnectionsApiGetNetworkRequest { /** * The ID of the connection * @type {string} * @memberof NetworkConnectionsApiGetNetwork */ readonly connectionId: string } /** * Request parameters for getNetworkId operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiGetNetworkIdRequest */ export interface NetworkConnectionsApiGetNetworkIdRequest { /** * The ID of the network * @type {string} * @memberof NetworkConnectionsApiGetNetworkId */ readonly networkId: string } /** * Request parameters for searchNetworkIds operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiSearchNetworkIdsRequest */ export interface NetworkConnectionsApiSearchNetworkIdsRequest { /** * Search string - displayName networkId. Optional * @type {string} * @memberof NetworkConnectionsApiSearchNetworkIds */ readonly search?: string /** * Exclude your networkIds. Optional, default false * @type {boolean} * @memberof NetworkConnectionsApiSearchNetworkIds */ readonly excludeSelf?: boolean /** * Include just your networkIds. Optional, default false * @type {boolean} * @memberof NetworkConnectionsApiSearchNetworkIds */ readonly onlySelf?: boolean /** * Exclude connected networkIds. Optional, default false * @type {boolean} * @memberof NetworkConnectionsApiSearchNetworkIds */ readonly excludeConnected?: boolean /** * ID of the record after which to fetch $limit records * @type {string} * @memberof NetworkConnectionsApiSearchNetworkIds */ readonly pageCursor?: string /** * Number of records to fetch. By default, it is 50 * @type {number} * @memberof NetworkConnectionsApiSearchNetworkIds */ readonly pageSize?: number } /** * Request parameters for setNetworkIdDiscoverability operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiSetNetworkIdDiscoverabilityRequest */ export interface NetworkConnectionsApiSetNetworkIdDiscoverabilityRequest { /** * * @type {SetNetworkIdDiscoverabilityRequest} * @memberof NetworkConnectionsApiSetNetworkIdDiscoverability */ readonly setNetworkIdDiscoverabilityRequest: SetNetworkIdDiscoverabilityRequest /** * The ID of the network * @type {string} * @memberof NetworkConnectionsApiSetNetworkIdDiscoverability */ readonly networkId: string } /** * Request parameters for setNetworkIdName operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiSetNetworkIdNameRequest */ export interface NetworkConnectionsApiSetNetworkIdNameRequest { /** * * @type {SetNetworkIdNameRequest} * @memberof NetworkConnectionsApiSetNetworkIdName */ readonly setNetworkIdNameRequest: SetNetworkIdNameRequest /** * The ID of the network * @type {string} * @memberof NetworkConnectionsApiSetNetworkIdName */ readonly networkId: string } /** * Request parameters for setNetworkIdRoutingPolicy operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiSetNetworkIdRoutingPolicyRequest */ export interface NetworkConnectionsApiSetNetworkIdRoutingPolicyRequest { /** * The ID of the network * @type {string} * @memberof NetworkConnectionsApiSetNetworkIdRoutingPolicy */ readonly networkId: string /** * * @type {SetNetworkIdRoutingPolicyRequest} * @memberof NetworkConnectionsApiSetNetworkIdRoutingPolicy */ readonly setNetworkIdRoutingPolicyRequest?: SetNetworkIdRoutingPolicyRequest } /** * Request parameters for setRoutingPolicy operation in NetworkConnectionsApi. * @export * @interface NetworkConnectionsApiSetRoutingPolicyRequest */ export interface NetworkConnectionsApiSetRoutingPolicyRequest { /** * The ID of the network connection * @type {string} * @memberof NetworkConnectionsApiSetRoutingPolicy */ readonly connectionId: string /** * * @type {SetRoutingPolicyRequest} * @memberof NetworkConnectionsApiSetRoutingPolicy */ readonly setRoutingPolicyRequest?: SetRoutingPolicyRequest } /** * NetworkConnectionsApi - object-oriented interface * @export * @class NetworkConnectionsApi * @extends {BaseAPI} */ export class NetworkConnectionsApi extends BaseAPI { /** * The Fireblocks Network allows for flexibility around incoming deposits. A receiver can receive network deposits to locations other than Fireblocks. This endpoint validates whether future transactions are routed to the displayed recipient or to a 3rd party. * @summary Retrieve third-party network routing validation * @param {NetworkConnectionsApiCheckThirdPartyRoutingRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public checkThirdPartyRouting(requestParameters: NetworkConnectionsApiCheckThirdPartyRoutingRequest) { return NetworkConnectionsApiFp(this.configuration).checkThirdPartyRouting(requestParameters.connectionId, requestParameters.assetType).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Initiates a new network connection. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). * @summary Create a new network connection * @param {NetworkConnectionsApiCreateNetworkConnectionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public createNetworkConnection(requestParameters: NetworkConnectionsApiCreateNetworkConnectionRequest = {}) { return NetworkConnectionsApiFp(this.configuration).createNetworkConnection(requestParameters.networkConnection, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Create a new Network ID. * @summary Creates a new Network ID * @param {NetworkConnectionsApiCreateNetworkIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public createNetworkId(requestParameters: NetworkConnectionsApiCreateNetworkIdRequest = {}) { return NetworkConnectionsApiFp(this.configuration).createNetworkId(requestParameters.createNetworkIdRequest, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Deletes an existing network connection specified by its connection ID. * @summary Delete a network connection by ID * @param {NetworkConnectionsApiDeleteNetworkConnectionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public deleteNetworkConnection(requestParameters: NetworkConnectionsApiDeleteNetworkConnectionRequest) { return NetworkConnectionsApiFp(this.configuration).deleteNetworkConnection(requestParameters.connectionId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Deletes a network by its ID. * @summary Delete specific network ID. * @param {NetworkConnectionsApiDeleteNetworkIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public deleteNetworkId(requestParameters: NetworkConnectionsApiDeleteNetworkIdRequest) { return NetworkConnectionsApiFp(this.configuration).deleteNetworkId(requestParameters.networkId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Gets a network connection by ID. * @summary Get a network connection * @param {NetworkConnectionsApiGetNetworkRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public getNetwork(requestParameters: NetworkConnectionsApiGetNetworkRequest) { return NetworkConnectionsApiFp(this.configuration).getNetwork(requestParameters.connectionId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Returns all network connections. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** * @summary List network connections * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public getNetworkConnections() { return NetworkConnectionsApiFp(this.configuration).getNetworkConnections().then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Returns specific network ID. * @summary Return specific network ID. * @param {NetworkConnectionsApiGetNetworkIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public getNetworkId(requestParameters: NetworkConnectionsApiGetNetworkIdRequest) { return NetworkConnectionsApiFp(this.configuration).getNetworkId(requestParameters.networkId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Retrieves a list of all local and discoverable remote network IDs. * @summary Get all network IDs * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public getNetworkIds() { return NetworkConnectionsApiFp(this.configuration).getNetworkIds().then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Returns all enabled routing policy asset groups * @summary Return all enabled routing policy asset groups * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public getRoutingPolicyAssetGroups() { return NetworkConnectionsApiFp(this.configuration).getRoutingPolicyAssetGroups().then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Retrieves a list of all local and discoverable remote network IDs. Can be filtered. * @summary Get both local IDs and discoverable remote IDs * @param {NetworkConnectionsApiSearchNetworkIdsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public searchNetworkIds(requestParameters: NetworkConnectionsApiSearchNetworkIdsRequest = {}) { return NetworkConnectionsApiFp(this.configuration).searchNetworkIds(requestParameters.search, requestParameters.excludeSelf, requestParameters.onlySelf, requestParameters.excludeConnected, requestParameters.pageCursor, requestParameters.pageSize).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Update whether or not the network ID is discoverable by others. * @summary Update network ID\'s discoverability. * @param {NetworkConnectionsApiSetNetworkIdDiscoverabilityRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public setNetworkIdDiscoverability(requestParameters: NetworkConnectionsApiSetNetworkIdDiscoverabilityRequest) { return NetworkConnectionsApiFp(this.configuration).setNetworkIdDiscoverability(requestParameters.setNetworkIdDiscoverabilityRequest, requestParameters.networkId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Updates name of a specified network ID. * @summary Update network ID\'s name. * @param {NetworkConnectionsApiSetNetworkIdNameRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public setNetworkIdName(requestParameters: NetworkConnectionsApiSetNetworkIdNameRequest) { return NetworkConnectionsApiFp(this.configuration).setNetworkIdName(requestParameters.setNetworkIdNameRequest, requestParameters.networkId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Updates the routing policy of a specified network ID. * @summary Update network id routing policy. * @param {NetworkConnectionsApiSetNetworkIdRoutingPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public setNetworkIdRoutingPolicy(requestParameters: NetworkConnectionsApiSetNetworkIdRoutingPolicyRequest) { return NetworkConnectionsApiFp(this.configuration).setNetworkIdRoutingPolicy(requestParameters.networkId, requestParameters.setNetworkIdRoutingPolicyRequest).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Updates an existing network connection\'s routing policy. * @summary Update network connection routing policy. * @param {NetworkConnectionsApiSetRoutingPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NetworkConnectionsApi */ public setRoutingPolicy(requestParameters: NetworkConnectionsApiSetRoutingPolicyRequest) { return NetworkConnectionsApiFp(this.configuration).setRoutingPolicy(requestParameters.connectionId, requestParameters.setRoutingPolicyRequest).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } }