diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5eba000e..661b79c0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -348,7 +348,7 @@ docs/CreateVaultAccountConnectionRequest.md docs/CreateVaultAccountRequest.md docs/CreateVaultAssetResponse.md docs/CreateWalletRequest.md -docs/CreateWebhookOAuthRequest.md +docs/CreateWebhookOauthRequest.md docs/CreateWebhookRequest.md docs/CreateWorkflowExecutionRequestParamsInner.md docs/CustomRoutingDest.md @@ -362,7 +362,7 @@ docs/DelegationBlockchainPositionInfo.md docs/DelegationSummary.md docs/DeleteNetworkConnectionResponse.md docs/DeleteNetworkIdResponse.md -docs/DeleteWebhookOAuthResponse.md +docs/DeleteWebhookOauthResponse.md docs/DeployLayerZeroAdaptersRequest.md docs/DeployableAddressResponse.md docs/DeployedContractNotFoundError.md @@ -1237,6 +1237,8 @@ docs/UpdateAutomationSettingsRequest.md docs/UpdateBlockchainResponse.md docs/UpdateCallbackHandlerRequest.md docs/UpdateCallbackHandlerResponse.md +docs/UpdateConnectedAccountCredentialsRequest.md +docs/UpdateConnectedAccountCredentialsResponse.md docs/UpdateCounterpartyGroupRequest.md docs/UpdateDraftRequest.md docs/UpdateFindingExternalRequest.md @@ -1245,7 +1247,7 @@ docs/UpdateTagRequest.md docs/UpdateTokenOwnershipStatusDto.md docs/UpdateVaultAccountAssetAddressRequest.md docs/UpdateVaultAccountRequest.md -docs/UpdateWebhookOAuthRequest.md +docs/UpdateWebhookOauthRequest.md docs/UpdateWebhookRequest.md docs/UsWirePaymentInfo.md docs/UsdcGatewayWalletAsset.md @@ -1296,9 +1298,7 @@ docs/WebhookEvent.md docs/WebhookMetric.md docs/WebhookMtls.md docs/WebhookMtlsCsrResponse.md -docs/WebhookOAuth.md -docs/WebhookOAuthCredentials.md -docs/WebhookOAuthResponse.md +docs/WebhookOauthCredentials.md docs/WebhookPaginatedResponse.md docs/WebhooksApi.md docs/WebhooksV2Api.md @@ -1724,7 +1724,7 @@ src/main/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequest.java src/main/java/com/fireblocks/sdk/model/CreateVaultAccountRequest.java src/main/java/com/fireblocks/sdk/model/CreateVaultAssetResponse.java src/main/java/com/fireblocks/sdk/model/CreateWalletRequest.java -src/main/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequest.java +src/main/java/com/fireblocks/sdk/model/CreateWebhookOauthRequest.java src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java src/main/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInner.java src/main/java/com/fireblocks/sdk/model/CustomRoutingDest.java @@ -1738,7 +1738,7 @@ src/main/java/com/fireblocks/sdk/model/DelegationBlockchainPositionInfo.java src/main/java/com/fireblocks/sdk/model/DelegationSummary.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponse.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkIdResponse.java -src/main/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponse.java +src/main/java/com/fireblocks/sdk/model/DeleteWebhookOauthResponse.java src/main/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequest.java src/main/java/com/fireblocks/sdk/model/DeployableAddressResponse.java src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java @@ -2582,6 +2582,8 @@ src/main/java/com/fireblocks/sdk/model/UpdateAutomationSettingsRequest.java src/main/java/com/fireblocks/sdk/model/UpdateBlockchainResponse.java src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequest.java src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponse.java +src/main/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsRequest.java +src/main/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsResponse.java src/main/java/com/fireblocks/sdk/model/UpdateCounterpartyGroupRequest.java src/main/java/com/fireblocks/sdk/model/UpdateDraftRequest.java src/main/java/com/fireblocks/sdk/model/UpdateFindingExternalRequest.java @@ -2590,7 +2592,7 @@ src/main/java/com/fireblocks/sdk/model/UpdateTagRequest.java src/main/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDto.java src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequest.java src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountRequest.java -src/main/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequest.java +src/main/java/com/fireblocks/sdk/model/UpdateWebhookOauthRequest.java src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java src/main/java/com/fireblocks/sdk/model/UsWirePaymentInfo.java src/main/java/com/fireblocks/sdk/model/UsdcGatewayWalletAsset.java @@ -2636,9 +2638,7 @@ src/main/java/com/fireblocks/sdk/model/WebhookEvent.java src/main/java/com/fireblocks/sdk/model/WebhookMetric.java src/main/java/com/fireblocks/sdk/model/WebhookMtls.java src/main/java/com/fireblocks/sdk/model/WebhookMtlsCsrResponse.java -src/main/java/com/fireblocks/sdk/model/WebhookOAuth.java -src/main/java/com/fireblocks/sdk/model/WebhookOAuthCredentials.java -src/main/java/com/fireblocks/sdk/model/WebhookOAuthResponse.java +src/main/java/com/fireblocks/sdk/model/WebhookOauthCredentials.java src/main/java/com/fireblocks/sdk/model/WebhookPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/WithdrawRequest.java src/main/java/com/fireblocks/sdk/model/WorkflowConfigStatus.java @@ -3037,7 +3037,7 @@ src/test/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequestTest.j src/test/java/com/fireblocks/sdk/model/CreateVaultAccountRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateVaultAssetResponseTest.java src/test/java/com/fireblocks/sdk/model/CreateWalletRequestTest.java -src/test/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequestTest.java +src/test/java/com/fireblocks/sdk/model/CreateWebhookOauthRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInnerTest.java src/test/java/com/fireblocks/sdk/model/CustomRoutingDestTest.java @@ -3051,7 +3051,7 @@ src/test/java/com/fireblocks/sdk/model/DelegationSummaryTest.java src/test/java/com/fireblocks/sdk/model/DelegationTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponseTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkIdResponseTest.java -src/test/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponseTest.java +src/test/java/com/fireblocks/sdk/model/DeleteWebhookOauthResponseTest.java src/test/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequestTest.java src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseTest.java src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.java @@ -3895,6 +3895,8 @@ src/test/java/com/fireblocks/sdk/model/UpdateAutomationSettingsRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateBlockchainResponseTest.java src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponseTest.java +src/test/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsRequestTest.java +src/test/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsResponseTest.java src/test/java/com/fireblocks/sdk/model/UpdateCounterpartyGroupRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateDraftRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateFindingExternalRequestTest.java @@ -3903,7 +3905,7 @@ src/test/java/com/fireblocks/sdk/model/UpdateTagRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDtoTest.java src/test/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateVaultAccountRequestTest.java -src/test/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequestTest.java +src/test/java/com/fireblocks/sdk/model/UpdateWebhookOauthRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java src/test/java/com/fireblocks/sdk/model/UsWirePaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/UsdcGatewayWalletAssetTest.java @@ -3948,9 +3950,7 @@ src/test/java/com/fireblocks/sdk/model/WebhookEventTest.java src/test/java/com/fireblocks/sdk/model/WebhookMetricTest.java src/test/java/com/fireblocks/sdk/model/WebhookMtlsCsrResponseTest.java src/test/java/com/fireblocks/sdk/model/WebhookMtlsTest.java -src/test/java/com/fireblocks/sdk/model/WebhookOAuthCredentialsTest.java -src/test/java/com/fireblocks/sdk/model/WebhookOAuthResponseTest.java -src/test/java/com/fireblocks/sdk/model/WebhookOAuthTest.java +src/test/java/com/fireblocks/sdk/model/WebhookOauthCredentialsTest.java src/test/java/com/fireblocks/sdk/model/WebhookPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/WebhookTest.java src/test/java/com/fireblocks/sdk/model/WithdrawRequestTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 1df443d0..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,239 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v30.0.0](https://github.com/fireblocks/java-sdk/compare/v15.0.0...v30.0.0) - 2026-09-08 - -### Merged - -- Generated SDK #2829319317 [`#156`](https://github.com/fireblocks/java-sdk/pull/156) - -## [v15.0.0](https://github.com/fireblocks/java-sdk/compare/v14.1.0...v15.0.0) - 2026-03-15 - -### Merged - -- Generated SDK #3733 (major) [`#128`](https://github.com/fireblocks/java-sdk/pull/128) - -## [v14.1.0](https://github.com/fireblocks/java-sdk/compare/v14.0.0...v14.1.0) - 2026-02-26 - -### Merged - -- Generated SDK #2167 [`#126`](https://github.com/fireblocks/java-sdk/pull/126) - -## [v14.0.0](https://github.com/fireblocks/java-sdk/compare/v13.0.0...v14.0.0) - 2026-02-03 - -### Merged - -- Generated SDK #4746 [`#121`](https://github.com/fireblocks/java-sdk/pull/121) - -## [v13.0.0](https://github.com/fireblocks/java-sdk/compare/v12.1.3...v13.0.0) - 2025-11-13 - -### Merged - -- Generated SDK #5834 [`#116`](https://github.com/fireblocks/java-sdk/pull/116) - -## [v12.1.3](https://github.com/fireblocks/java-sdk/compare/v12.1.2...v12.1.3) - 2025-10-22 - -### Merged - -- Generated SDK #8293 [`#115`](https://github.com/fireblocks/java-sdk/pull/115) - -## [v12.1.2](https://github.com/fireblocks/java-sdk/compare/v12.1.1...v12.1.2) - 2025-09-29 - -### Merged - -- Generated SDK #6061 [`#113`](https://github.com/fireblocks/java-sdk/pull/113) - -## [v12.1.1](https://github.com/fireblocks/java-sdk/compare/v12.1.0...v12.1.1) - 2025-09-10 - -### Merged - -- Generated SDK #1410 [`#111`](https://github.com/fireblocks/java-sdk/pull/111) - -## [v12.1.0](https://github.com/fireblocks/java-sdk/compare/v12.0.0...v12.1.0) - 2025-09-09 - -### Merged - -- Generated SDK #4521 [`#109`](https://github.com/fireblocks/java-sdk/pull/109) - -## [v12.0.0](https://github.com/fireblocks/java-sdk/compare/v11.2.0...v12.0.0) - 2025-09-01 - -### Merged - -- Generated SDK #7741 [`#108`](https://github.com/fireblocks/java-sdk/pull/108) - -## [v11.2.0](https://github.com/fireblocks/java-sdk/compare/v11.1.0...v11.2.0) - 2025-08-21 - -### Merged - -- Generated SDK #3302 [`#107`](https://github.com/fireblocks/java-sdk/pull/107) - -## [v11.1.0](https://github.com/fireblocks/java-sdk/compare/v11.0.0...v11.1.0) - 2025-08-11 - -### Merged - -- Generated SDK #1782 [`#105`](https://github.com/fireblocks/java-sdk/pull/105) - -## [v11.0.0](https://github.com/fireblocks/java-sdk/compare/v10.4.0...v11.0.0) - 2025-07-15 - -### Merged - -- Generated SDK #5610 [`#103`](https://github.com/fireblocks/java-sdk/pull/103) - -## [v10.4.0](https://github.com/fireblocks/java-sdk/compare/v10.3.0...v10.4.0) - 2025-06-29 - -### Merged - -- Generated SDK #1492 [`#101`](https://github.com/fireblocks/java-sdk/pull/101) - -## [v10.3.0](https://github.com/fireblocks/java-sdk/compare/v10.2.0...v10.3.0) - 2025-06-18 - -### Merged - -- Generated SDK #4009 [`#99`](https://github.com/fireblocks/java-sdk/pull/99) - -## [v10.2.0](https://github.com/fireblocks/java-sdk/compare/v10.1.1...v10.2.0) - 2025-06-04 - -### Merged - -- Generated SDK #8912 [`#98`](https://github.com/fireblocks/java-sdk/pull/98) - -## [v10.1.1](https://github.com/fireblocks/java-sdk/compare/v10.1.0...v10.1.1) - 2025-05-18 - -### Merged - -- Generated SDK #5019 [`#97`](https://github.com/fireblocks/java-sdk/pull/97) - -## [v10.1.0](https://github.com/fireblocks/java-sdk/compare/v10.0.2...v10.1.0) - 2025-05-07 - -### Merged - -- Generated SDK #7076 [`#95`](https://github.com/fireblocks/java-sdk/pull/95) - -## [v10.0.2](https://github.com/fireblocks/java-sdk/compare/v10.0.1...v10.0.2) - 2025-04-20 - -### Merged - -- Generated SDK #4794 [`#94`](https://github.com/fireblocks/java-sdk/pull/94) - -## [v10.0.1](https://github.com/fireblocks/java-sdk/compare/v10.0.0...v10.0.1) - 2025-04-07 - -### Merged - -- Generated SDK #3065 [`#93`](https://github.com/fireblocks/java-sdk/pull/93) - -## [v10.0.0](https://github.com/fireblocks/java-sdk/compare/v9.0.0...v10.0.0) - 2025-03-30 - -### Merged - -- Generated SDK #619 [`#90`](https://github.com/fireblocks/java-sdk/pull/90) - -## [v9.0.0](https://github.com/fireblocks/java-sdk/compare/v8.1.0...v9.0.0) - 2025-03-17 - -### Merged - -- Generated SDK #645 [`#89`](https://github.com/fireblocks/java-sdk/pull/89) - -## [v8.1.0](https://github.com/fireblocks/java-sdk/compare/v8.0.1...v8.1.0) - 2025-02-24 - -### Merged - -- Generated SDK #9833 [`#84`](https://github.com/fireblocks/java-sdk/pull/84) - -## [v8.0.1](https://github.com/fireblocks/java-sdk/compare/v8.0.0...v8.0.1) - 2025-02-12 - -### Merged - -- Generated SDK #4262 [`#82`](https://github.com/fireblocks/java-sdk/pull/82) - -## [v8.0.0](https://github.com/fireblocks/java-sdk/compare/v7.0.0...v8.0.0) - 2025-02-02 - -### Merged - -- Generated SDK #538 [`#80`](https://github.com/fireblocks/java-sdk/pull/80) - -## [v7.0.0](https://github.com/fireblocks/java-sdk/compare/v6.0.0...v7.0.0) - 2025-01-08 - -### Merged - -- Generated SDK #8699 [`#77`](https://github.com/fireblocks/java-sdk/pull/77) - -## [v6.0.0](https://github.com/fireblocks/java-sdk/compare/v5.0.0...v6.0.0) - 2024-12-05 - -### Merged - -- Generated SDK #1430 [`#73`](https://github.com/fireblocks/java-sdk/pull/73) - -## [v5.0.0](https://github.com/fireblocks/java-sdk/compare/v4.0.0...v5.0.0) - 2024-10-31 - -### Merged - -- Generated SDK #5184 [`#71`](https://github.com/fireblocks/java-sdk/pull/71) - -## [v4.0.0](https://github.com/fireblocks/java-sdk/compare/v3.1.0...v4.0.0) - 2024-09-17 - -### Merged - -- Generated SDK #237 [`#70`](https://github.com/fireblocks/java-sdk/pull/70) - -## [v3.1.0](https://github.com/fireblocks/java-sdk/compare/v3.0.0...v3.1.0) - 2024-07-25 - -### Merged - -- Generated SDK #6749 [`#67`](https://github.com/fireblocks/java-sdk/pull/67) - -## [v3.0.0](https://github.com/fireblocks/java-sdk/compare/v2.1.0...v3.0.0) - 2024-07-17 - -### Merged - -- Generated SDK #6152 [`#65`](https://github.com/fireblocks/java-sdk/pull/65) -- Generated SDK #7984 [`#62`](https://github.com/fireblocks/java-sdk/pull/62) -- Generated SDK #2873 [`#61`](https://github.com/fireblocks/java-sdk/pull/61) - -## [v2.1.0](https://github.com/fireblocks/java-sdk/compare/v2.0.1...v2.1.0) - 2024-06-04 - -### Merged - -- Generated SDK for version COR-46191/fix_pipelines [`#24`](https://github.com/fireblocks/java-sdk/pull/24) -- Generated SDK for version COR-46191/fix_pipelines [`#23`](https://github.com/fireblocks/java-sdk/pull/23) -- Generated SDK for version COR-46191/fix_pipelines [`#22`](https://github.com/fireblocks/java-sdk/pull/22) -- Generated SDK for version COR-46191/fix_pipelines [`#21`](https://github.com/fireblocks/java-sdk/pull/21) - -## [v2.0.1](https://github.com/fireblocks/java-sdk/compare/v2.0.0...v2.0.1) - 2024-06-04 - -### Merged - -- Generated SDK for version COR-46191/fix_pipelines [`#20`](https://github.com/fireblocks/java-sdk/pull/20) - -## [v2.0.0](https://github.com/fireblocks/java-sdk/compare/v1.1.0...v2.0.0) - 2024-05-08 - -### Merged - -- feat: add tokenization api [`#12`](https://github.com/fireblocks/java-sdk/pull/12) - -## [v1.1.0](https://github.com/fireblocks/java-sdk/compare/v1.0.1...v1.1.0) - 2024-04-17 - -### Merged - -- feat: add cosigners beta api [`#11`](https://github.com/fireblocks/java-sdk/pull/11) -- fix: fix readme doc headline [`#10`](https://github.com/fireblocks/java-sdk/pull/10) - -## [v1.0.1](https://github.com/fireblocks/java-sdk/compare/v1.0.0...v1.0.1) - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.1 [`#9`](https://github.com/fireblocks/java-sdk/pull/9) - -## v1.0.0 - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.0 GA [`#8`](https://github.com/fireblocks/java-sdk/pull/8) -- v0.0.1-beta [`#6`](https://github.com/fireblocks/java-sdk/pull/6) -- Update GitHub Actions workflows [`#5`](https://github.com/fireblocks/java-sdk/pull/5) -- Generated #1189972817 [`#3`](https://github.com/fireblocks/java-sdk/pull/3) -- Add installation instructions [`#2`](https://github.com/fireblocks/java-sdk/pull/2) -- Added Idempotency & NCW headers support #6 [`#1`](https://github.com/fireblocks/java-sdk/pull/1) diff --git a/README.md b/README.md index 6f82de42..f529f8ba 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 30.0.0 + 0.0.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:30.0.0" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-30.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -146,6 +146,7 @@ Class | Method | HTTP request | Description *ApiUserApi* | [**issueApiUserPairingToken**](docs/ApiUserApi.md#issueApiUserPairingToken) | **POST** /management/api_users/{userId}/pairing_token | Issue API user pairing token *ApprovalsBetaApi* | [**getApprovalById**](docs/ApprovalsBetaApi.md#getApprovalById) | **GET** /approvals/{requestId} | Get a single approval request *ApprovalsBetaApi* | [**getApprovals**](docs/ApprovalsBetaApi.md#getApprovals) | **GET** /approvals | List approval requests +*ApprovalsBetaApi* | [**rejectApproval**](docs/ApprovalsBetaApi.md#rejectApproval) | **POST** /approvals/{requestId}/reject | Reject an approval request *AuditLogsApi* | [**getAuditLogs**](docs/AuditLogsApi.md#getAuditLogs) | **GET** /management/audit_logs | Get audit logs *BlockchainLinkBetaApi* | [**activateBlockchainLinkChain**](docs/BlockchainLinkBetaApi.md#activateBlockchainLinkChain) | **POST** /blockchain_link/blockchains/{blockchainId}/activate | Activate a blockchain (triggers activation workflow) *BlockchainLinkBetaApi* | [**createBlockchainLinkChain**](docs/BlockchainLinkBetaApi.md#createBlockchainLinkChain) | **POST** /blockchain_link/blockchains | Create a new blockchain @@ -218,6 +219,7 @@ Class | Method | HTTP request | Description *ConnectedAccountsBetaApi* | [**getConnectedAccountsCredentialsPublicKey**](docs/ConnectedAccountsBetaApi.md#getConnectedAccountsCredentialsPublicKey) | **GET** /connected_accounts/credentials/public_key | Get public key to encrypt connected account credentials *ConnectedAccountsBetaApi* | [**renameConnectedAccount**](docs/ConnectedAccountsBetaApi.md#renameConnectedAccount) | **POST** /connected_accounts/{accountId}/rename | Rename Connected Account *ConnectedAccountsBetaApi* | [**syncConnectedAccountAllowlist**](docs/ConnectedAccountsBetaApi.md#syncConnectedAccountAllowlist) | **POST** /connected_accounts/{accountId}/allowlist/sync | Sync allowlist for connected account +*ConnectedAccountsBetaApi* | [**updateConnectedAccountCredentials**](docs/ConnectedAccountsBetaApi.md#updateConnectedAccountCredentials) | **POST** /connected_accounts/{accountId}/credentials | Update connected account credentials *ConsoleUserApi* | [**createConsoleUser**](docs/ConsoleUserApi.md#createConsoleUser) | **POST** /management/users | Create console user *ConsoleUserApi* | [**getConsoleUsers**](docs/ConsoleUserApi.md#getConsoleUsers) | **GET** /management/users | Get console users *ContactsApi* | [**getContacts**](docs/ContactsApi.md#getContacts) | **GET** /contacts | List contacts @@ -580,9 +582,9 @@ Class | Method | HTTP request | Description *WebhooksApi* | [**resendTransactionWebhooks**](docs/WebhooksApi.md#resendTransactionWebhooks) | **POST** /webhooks/resend/{txId} | Resend webhooks for a transaction by ID *WebhooksApi* | [**resendWebhooks**](docs/WebhooksApi.md#resendWebhooks) | **POST** /webhooks/resend | Resend failed webhooks *WebhooksV2Api* | [**createWebhook**](docs/WebhooksV2Api.md#createWebhook) | **POST** /webhooks | Create a new webhook -*WebhooksV2Api* | [**createWebhookOAuth**](docs/WebhooksV2Api.md#createWebhookOAuth) | **POST** /webhooks_settings/oauth | Create OAuth credentials +*WebhooksV2Api* | [**createWebhookOauth**](docs/WebhooksV2Api.md#createWebhookOauth) | **POST** /webhooks_settings/oauth | Create OAuth credentials *WebhooksV2Api* | [**deleteWebhook**](docs/WebhooksV2Api.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook -*WebhooksV2Api* | [**deleteWebhookOAuth**](docs/WebhooksV2Api.md#deleteWebhookOAuth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials +*WebhooksV2Api* | [**deleteWebhookOauth**](docs/WebhooksV2Api.md#deleteWebhookOauth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials *WebhooksV2Api* | [**getMetrics**](docs/WebhooksV2Api.md#getMetrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics *WebhooksV2Api* | [**getMtlsCsr**](docs/WebhooksV2Api.md#getMtlsCsr) | **GET** /webhooks/mtls/csr | Get mTLS CSR *WebhooksV2Api* | [**getNotification**](docs/WebhooksV2Api.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id @@ -591,15 +593,15 @@ Class | Method | HTTP request | Description *WebhooksV2Api* | [**getResendByQueryJobStatus**](docs/WebhooksV2Api.md#getResendByQueryJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_by_query/jobs/{jobId} | Get resend by query job status *WebhooksV2Api* | [**getResendJobStatus**](docs/WebhooksV2Api.md#getResendJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId} | Get resend job status *WebhooksV2Api* | [**getWebhook**](docs/WebhooksV2Api.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id -*WebhooksV2Api* | [**getWebhookOAuth**](docs/WebhooksV2Api.md#getWebhookOAuth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id -*WebhooksV2Api* | [**getWebhookOAuths**](docs/WebhooksV2Api.md#getWebhookOAuths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials +*WebhooksV2Api* | [**getWebhookOauth**](docs/WebhooksV2Api.md#getWebhookOauth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id +*WebhooksV2Api* | [**getWebhookOauths**](docs/WebhooksV2Api.md#getWebhookOauths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials *WebhooksV2Api* | [**getWebhooks**](docs/WebhooksV2Api.md#getWebhooks) | **GET** /webhooks | Get all webhooks *WebhooksV2Api* | [**resendFailedNotifications**](docs/WebhooksV2Api.md#resendFailedNotifications) | **POST** /webhooks/{webhookId}/notifications/resend_failed | Resend failed notifications *WebhooksV2Api* | [**resendNotificationById**](docs/WebhooksV2Api.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id *WebhooksV2Api* | [**resendNotificationsByQuery**](docs/WebhooksV2Api.md#resendNotificationsByQuery) | **POST** /webhooks/{webhookId}/notifications/resend_by_query | Resend notifications by query *WebhooksV2Api* | [**resendNotificationsByResourceId**](docs/WebhooksV2Api.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id *WebhooksV2Api* | [**updateWebhook**](docs/WebhooksV2Api.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook -*WebhooksV2Api* | [**updateWebhookOAuth**](docs/WebhooksV2Api.md#updateWebhookOAuth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials +*WebhooksV2Api* | [**updateWebhookOauth**](docs/WebhooksV2Api.md#updateWebhookOauth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials *WhitelistIpAddressesApi* | [**getWhitelistIpAddresses**](docs/WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Get whitelisted ip addresses for an API Key *WorkspaceApi* | [**getWorkspace**](docs/WorkspaceApi.md#getWorkspace) | **GET** /workspace | Get workspace *WorkspaceStatusBetaApi* | [**getWorkspaceStatus**](docs/WorkspaceStatusBetaApi.md#getWorkspaceStatus) | **GET** /management/workspace_status | Returns current workspace status @@ -933,7 +935,7 @@ Class | Method | HTTP request | Description - [CreateVaultAccountRequest](docs/CreateVaultAccountRequest.md) - [CreateVaultAssetResponse](docs/CreateVaultAssetResponse.md) - [CreateWalletRequest](docs/CreateWalletRequest.md) - - [CreateWebhookOAuthRequest](docs/CreateWebhookOAuthRequest.md) + - [CreateWebhookOauthRequest](docs/CreateWebhookOauthRequest.md) - [CreateWebhookRequest](docs/CreateWebhookRequest.md) - [CreateWorkflowExecutionRequestParamsInner](docs/CreateWorkflowExecutionRequestParamsInner.md) - [CustomRoutingDest](docs/CustomRoutingDest.md) @@ -947,7 +949,7 @@ Class | Method | HTTP request | Description - [DelegationSummary](docs/DelegationSummary.md) - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) - - [DeleteWebhookOAuthResponse](docs/DeleteWebhookOAuthResponse.md) + - [DeleteWebhookOauthResponse](docs/DeleteWebhookOauthResponse.md) - [DeployLayerZeroAdaptersRequest](docs/DeployLayerZeroAdaptersRequest.md) - [DeployableAddressResponse](docs/DeployableAddressResponse.md) - [DeployedContractNotFoundError](docs/DeployedContractNotFoundError.md) @@ -1791,6 +1793,8 @@ Class | Method | HTTP request | Description - [UpdateBlockchainResponse](docs/UpdateBlockchainResponse.md) - [UpdateCallbackHandlerRequest](docs/UpdateCallbackHandlerRequest.md) - [UpdateCallbackHandlerResponse](docs/UpdateCallbackHandlerResponse.md) + - [UpdateConnectedAccountCredentialsRequest](docs/UpdateConnectedAccountCredentialsRequest.md) + - [UpdateConnectedAccountCredentialsResponse](docs/UpdateConnectedAccountCredentialsResponse.md) - [UpdateCounterpartyGroupRequest](docs/UpdateCounterpartyGroupRequest.md) - [UpdateDraftRequest](docs/UpdateDraftRequest.md) - [UpdateFindingExternalRequest](docs/UpdateFindingExternalRequest.md) @@ -1799,7 +1803,7 @@ Class | Method | HTTP request | Description - [UpdateTokenOwnershipStatusDto](docs/UpdateTokenOwnershipStatusDto.md) - [UpdateVaultAccountAssetAddressRequest](docs/UpdateVaultAccountAssetAddressRequest.md) - [UpdateVaultAccountRequest](docs/UpdateVaultAccountRequest.md) - - [UpdateWebhookOAuthRequest](docs/UpdateWebhookOAuthRequest.md) + - [UpdateWebhookOauthRequest](docs/UpdateWebhookOauthRequest.md) - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) - [UsWirePaymentInfo](docs/UsWirePaymentInfo.md) - [UsdcGatewayWalletAsset](docs/UsdcGatewayWalletAsset.md) @@ -1845,9 +1849,7 @@ Class | Method | HTTP request | Description - [WebhookMetric](docs/WebhookMetric.md) - [WebhookMtls](docs/WebhookMtls.md) - [WebhookMtlsCsrResponse](docs/WebhookMtlsCsrResponse.md) - - [WebhookOAuth](docs/WebhookOAuth.md) - - [WebhookOAuthCredentials](docs/WebhookOAuthCredentials.md) - - [WebhookOAuthResponse](docs/WebhookOAuthResponse.md) + - [WebhookOauthCredentials](docs/WebhookOauthCredentials.md) - [WebhookPaginatedResponse](docs/WebhookPaginatedResponse.md) - [WithdrawRequest](docs/WithdrawRequest.md) - [WorkflowConfigStatus](docs/WorkflowConfigStatus.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index b018f316..23bff231 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -583,6 +583,70 @@ paths: \ user_id, quorum_status_mode);" x-accepts: - application/json + /approvals/{requestId}/reject: + post: + description: |- + Reject a pending approval request as the authenticated API user. No signature is required (unlike approve). The caller must be eligible to act on the request; rejecting finalizes the request as rejected per the approval policy. + + Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. + operationId: rejectApproval + parameters: + - description: "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." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + - description: The approval request ID. + example: "18055" + explode: false + in: path + name: requestId + required: true + schema: + type: string + style: simple + responses: + "204": + description: The approval request was rejected. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Reject an approval request + tags: + - Approvals (Beta) + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.approvalsBeta.rejectApproval(approvalsBetaApiRejectApprovalRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.approvalsBeta().rejectApproval(requestId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.approvals_beta.reject_approval(request_id,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.approvalsBeta.rejectApproval(approvalsBetaApiRejectApprovalRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.approvalsBeta().rejectApproval(requestId,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.approvals_beta.reject_approval(request_id,\ + \ idempotency_key);" + x-accepts: + - application/json /management/audit_logs: get: description: |- @@ -5809,6 +5873,133 @@ paths: \ page_size, page_cursor);" x-accepts: - application/json + /connected_accounts/{accountId}/credentials: + post: + description: | + Replace the API credentials (secret + API key) of a connected account. + + Credentials belong to an API key, which can back a single account or an entire hierarchy. + Updating them affects all accounts sharing that key, so the endpoint returns an array of modified accounts. + + The `creds` field must be a Base64-encoded RSA-encrypted credential blob; use + `GET /connected_accounts/credentials/public_key` to retrieve the public key for encryption. + Both `creds` and `apiKey` are mandatory. + + Validation against the exchange is synchronous, but the update itself is **pending mobile + approval** — the existing credentials stay live until the change is approved, so none of the + affected accounts are disconnected in the meantime. + + Endpoint Permission: Admin, Non-Signing Admin. + + **Note:** This endpoint is currently in beta and might be subject to changes. + operationId: updateConnectedAccountCredentials + parameters: + - description: The unique identifier of the connected account whose API key + credentials are being replaced. + example: 2c96e3aa-07ca-4524-a026-75579d25e24a + explode: false + in: path + name: accountId + required: true + schema: + minLength: 1 + type: string + style: simple + - description: "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." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateConnectedAccountCredentialsRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateConnectedAccountCredentialsResponse" + description: Credential update initiated (pending approval). + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedAccountErrorResponse" + description: "Bad request — credentials cannot be updated on a sub-account,\ + \ or missing creds / apiKey." + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedAccountErrorResponse" + description: "Insufficient permissions, or feature not enabled for this\ + \ tenant." + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedAccountErrorResponse" + description: Connected account not found. + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedAccountErrorResponse" + description: "Account is not in an updatable state, or the credentials belong\ + \ to a different account." + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedAccountErrorResponse" + description: The provided credentials were rejected by the exchange. + default: + $ref: "#/components/responses/Error" + summary: Update connected account credentials + tags: + - Connected Accounts (Beta) + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.updateConnectedAccountCredentials(connectedAccountsBetaApiUpdateConnectedAccountCredentialsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.connectedAccountsBeta().updateConnectedAccountCredentials(updateConnectedAccountCredentialsRequest,\ + \ accountId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.connected_accounts_beta.update_connected_account_credentials(update_connected_account_credentials_request,\ + \ account_id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.updateConnectedAccountCredentials(connectedAccountsBetaApiUpdateConnectedAccountCredentialsRequest);" + - lang: Java + source: "CompletableFuture>\ + \ response = fireblocks.connectedAccountsBeta().updateConnectedAccountCredentials(updateConnectedAccountCredentialsRequest,\ + \ accountId, idempotencyKey);" + - lang: Python + source: "response = fireblocks.connected_accounts_beta.update_connected_account_credentials(update_connected_account_credentials_request,\ + \ account_id, idempotency_key);" + x-content-type: application/json + x-accepts: + - application/json /connected_accounts/{accountId}/manifest/capabilities/trading/pairs: get: description: | @@ -36782,13 +36973,13 @@ paths: get: description: | Lists every OAuth credential set for the workspace. Client secrets are never returned. - operationId: getWebhookOAuths + operationId: getWebhookOauths responses: "200": content: application/json: schema: - $ref: "#/components/schemas/WebhookOAuthList" + $ref: "#/components/schemas/WebhookOauthList" description: The workspace's OAuth credentials headers: X-Request-ID: @@ -36802,23 +36993,23 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.webhooksV2.getWebhookOAuths();" + code: "const response: Promise> = fireblocks.webhooksV2.getWebhookOauths();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture>> response - = fireblocks.webhooksV2().getWebhookOAuths(); + code: CompletableFuture>> response + = fireblocks.webhooksV2().getWebhookOauths(); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.webhooks_v2.get_webhook_o_auths(); + code: response = fireblocks.webhooks_v2.get_webhook_oauths(); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.webhooksV2.getWebhookOAuths();" + source: "const response: Promise> = fireblocks.webhooksV2.getWebhookOauths();" - lang: Java - source: CompletableFuture>> response - = fireblocks.webhooksV2().getWebhookOAuths(); + source: CompletableFuture>> response + = fireblocks.webhooksV2().getWebhookOauths(); - lang: Python - source: response = fireblocks.webhooks_v2.get_webhook_o_auths(); + source: response = fireblocks.webhooks_v2.get_webhook_oauths(); x-accepts: - application/json post: @@ -36826,7 +37017,7 @@ paths: Creates a reusable OAuth client credential set. Attach it to a webhook by passing the returned id as that webhook's `webhookOauthId`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. The client secret is write-only and is never returned. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. - operationId: createWebhookOAuth + operationId: createWebhookOauth parameters: - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ @@ -36843,14 +37034,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateWebhookOAuthRequest" + $ref: "#/components/schemas/CreateWebhookOauthRequest" required: true responses: "201": content: application/json: schema: - $ref: "#/components/schemas/WebhookOAuthCredentials" + $ref: "#/components/schemas/WebhookOauthCredentials" description: created the OAuth credentials successfully headers: X-Request-ID: @@ -36864,28 +37055,28 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.webhooksV2.createWebhookOAuth(webhooksV2ApiCreateWebhookOAuthRequest);" + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.createWebhookOauth(webhooksV2ApiCreateWebhookOauthRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.webhooksV2().createWebhookOAuth(createWebhookOAuthRequest,\ + code: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().createWebhookOauth(createWebhookOauthRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2.create_webhook_o_auth(create_webhook_o_auth_request,\ + code: "response = fireblocks.webhooks_v2.create_webhook_oauth(create_webhook_oauth_request,\ \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.webhooksV2.createWebhookOAuth(webhooksV2ApiCreateWebhookOAuthRequest);" + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.createWebhookOauth(webhooksV2ApiCreateWebhookOauthRequest);" - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.webhooksV2().createWebhookOAuth(createWebhookOAuthRequest,\ + source: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().createWebhookOauth(createWebhookOauthRequest,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.webhooks_v2.create_webhook_o_auth(create_webhook_o_auth_request,\ + source: "response = fireblocks.webhooks_v2.create_webhook_oauth(create_webhook_oauth_request,\ \ idempotency_key);" x-content-type: application/json x-accepts: @@ -36900,7 +37091,7 @@ paths: When nothing references the credentials the delete succeeds either way, and `detachedWebhookIds` comes back empty. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. - operationId: deleteWebhookOAuth + operationId: deleteWebhookOauth parameters: - description: The unique identifier of the OAuth credentials explode: false @@ -36929,7 +37120,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DeleteWebhookOAuthResponse" + $ref: "#/components/schemas/DeleteWebhookOauthResponse" description: "The deleted OAuth credentials, plus the ids of any webhooks\ \ that were detached from them" headers: @@ -36956,33 +37147,33 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.webhooksV2.deleteWebhookOAuth(webhooksV2ApiDeleteWebhookOAuthRequest);" + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.deleteWebhookOauth(webhooksV2ApiDeleteWebhookOauthRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.webhooksV2().deleteWebhookOAuth(webhookOauthId, forceDelete);" + code: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().deleteWebhookOauth(webhookOauthId, forceDelete);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2.delete_webhook_o_auth(webhook_oauth_id,\ + code: "response = fireblocks.webhooks_v2.delete_webhook_oauth(webhook_oauth_id,\ \ force_delete);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.webhooksV2.deleteWebhookOAuth(webhooksV2ApiDeleteWebhookOAuthRequest);" + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.deleteWebhookOauth(webhooksV2ApiDeleteWebhookOauthRequest);" - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.webhooksV2().deleteWebhookOAuth(webhookOauthId, forceDelete);" + source: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().deleteWebhookOauth(webhookOauthId, forceDelete);" - lang: Python - source: "response = fireblocks.webhooks_v2.delete_webhook_o_auth(webhook_oauth_id,\ + source: "response = fireblocks.webhooks_v2.delete_webhook_oauth(webhook_oauth_id,\ \ force_delete);" x-accepts: - application/json get: description: | Retrieve an OAuth credential set by its id. The client secret is never returned. - operationId: getWebhookOAuth + operationId: getWebhookOauth parameters: - description: The unique identifier of the OAuth credentials explode: false @@ -36999,7 +37190,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/WebhookOAuthCredentials" + $ref: "#/components/schemas/WebhookOauthCredentials" description: An OAuth credentials object headers: X-Request-ID: @@ -37013,25 +37204,25 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.webhooksV2.getWebhookOAuth(webhooksV2ApiGetWebhookOAuthRequest);" + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.getWebhookOauth(webhooksV2ApiGetWebhookOauthRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = - fireblocks.webhooksV2().getWebhookOAuth(webhookOauthId); + code: CompletableFuture> response = + fireblocks.webhooksV2().getWebhookOauth(webhookOauthId); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.webhooks_v2.get_webhook_o_auth(webhook_oauth_id); + code: response = fireblocks.webhooks_v2.get_webhook_oauth(webhook_oauth_id); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.webhooksV2.getWebhookOAuth(webhooksV2ApiGetWebhookOAuthRequest);" + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.getWebhookOauth(webhooksV2ApiGetWebhookOauthRequest);" - lang: Java - source: CompletableFuture> response = - fireblocks.webhooksV2().getWebhookOAuth(webhookOauthId); + source: CompletableFuture> response = + fireblocks.webhooksV2().getWebhookOauth(webhookOauthId); - lang: Python - source: response = fireblocks.webhooks_v2.get_webhook_o_auth(webhook_oauth_id); + source: response = fireblocks.webhooks_v2.get_webhook_oauth(webhook_oauth_id); x-accepts: - application/json patch: @@ -37041,7 +37232,7 @@ paths: `customJwtClaims`, `customBodyParams` and `customHeaders` are all merged key by key rather than replaced, the same way a webhook's own `customHeaders` behaves: a key sent with a value is added or overwritten, a key sent with a `null` value is deleted, and a key you omit is left alone. Since a `null` inside a map is the delete mechanism, none of the three accepts `null` for the whole field — `customJwtClaims: null`, `customBodyParams: null` or `customHeaders: null` is rejected with a `400` rather than ignored. Clear a map by listing each of its keys with a `null` value. Because `null` is spent on deletion, a claim cannot be set to JSON `null` either, on this endpoint or on create. `mtlsClientSignedCert` is a scalar rather than a map, so `null` there does remove it. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. - operationId: updateWebhookOAuth + operationId: updateWebhookOauth parameters: - description: The unique identifier of the OAuth credentials explode: false @@ -37057,14 +37248,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateWebhookOAuthRequest" + $ref: "#/components/schemas/UpdateWebhookOauthRequest" required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/WebhookOAuthCredentials" + $ref: "#/components/schemas/WebhookOauthCredentials" description: Updated OAuth credentials object headers: X-Request-ID: @@ -37078,28 +37269,28 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.webhooksV2.updateWebhookOAuth(webhooksV2ApiUpdateWebhookOAuthRequest);" + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.updateWebhookOauth(webhooksV2ApiUpdateWebhookOauthRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.webhooksV2().updateWebhookOAuth(updateWebhookOAuthRequest,\ + code: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().updateWebhookOauth(updateWebhookOauthRequest,\ \ webhookOauthId);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2.update_webhook_o_auth(update_webhook_o_auth_request,\ + code: "response = fireblocks.webhooks_v2.update_webhook_oauth(update_webhook_oauth_request,\ \ webhook_oauth_id);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.webhooksV2.updateWebhookOAuth(webhooksV2ApiUpdateWebhookOAuthRequest);" + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.updateWebhookOauth(webhooksV2ApiUpdateWebhookOauthRequest);" - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.webhooksV2().updateWebhookOAuth(updateWebhookOAuthRequest,\ + source: "CompletableFuture> response\ + \ = fireblocks.webhooksV2().updateWebhookOauth(updateWebhookOauthRequest,\ \ webhookOauthId);" - lang: Python - source: "response = fireblocks.webhooks_v2.update_webhook_o_auth(update_webhook_o_auth_request,\ + source: "response = fireblocks.webhooks_v2.update_webhook_oauth(update_webhook_oauth_request,\ \ webhook_oauth_id);" x-content-type: application/json x-accepts: @@ -41636,8 +41827,35 @@ components: - tenantId type: object FiatAccountType: + description: "OTHER indicates the underlying provider isn't representable by\ + \ this API version's enum (e.g. a newly onboarded provider, or one removed\ + \ from this list) — it does not identify a specific provider, so it should\ + \ not be used to key any client-side logic." enum: - BLINC + - BLINC_TEST + - CROSSRIVER + - CROSSRIVER_TEST + - CUSTOMERSBANK + - CUSTOMERSBANK_TEST + - FIFTHTHIRD + - FIFTHTHIRD_TEST + - KINGDOM_BANK + - KINGDOM_BANK_TESTNET + - LYNQ + - LYNQ_DEV + - LYNQ_QA + - LYNQ_UAT + - N3XT + - N3XT_ALPHA + - N3XT_BETA + - N3XT_OMEGA + - SYGNUM_CONNECT + - SYGNUM_CONNECT_STAGING + - TRANSFERO + - TRANSFERO_STAGING + - ZENUS_DEV + - OTHER type: string FiatAsset: example: @@ -42131,6 +42349,47 @@ components: - UNKNOWN_ERROR example: SUCCESS type: string + UpdateConnectedAccountCredentialsRequest: + example: + apiKey: api_key_new_abc123 + creds: !!binary |- + YmFzZTY0ZW5jb2RlZGVuY3J5cHRlZGNyZWRlbnRpYWxzPT0= + properties: + creds: + description: Base64-encoded RSA-encrypted credential blob (the new secret). + Encrypt using the public key from GET /connected_accounts/credentials/public_key. + example: !!binary |- + YmFzZTY0ZW5jb2RlZGVuY3J5cHRlZGNyZWRlbnRpYWxzPT0= + format: byte + type: string + apiKey: + description: The new account-level API key. Mandatory for credential update. + example: api_key_new_abc123 + type: string + required: + - apiKey + - creds + type: object + UpdateConnectedAccountCredentialsResponse: + example: + accounts: + - accountId: acc-789012 + name: My Exchange Account + status: WAITING_FOR_APPROVAL + properties: + accounts: + description: The account whose credentials are pending update (status WAITING_FOR_APPROVAL). + Old credentials stay live until the change is approved. + example: + - accountId: acc-789012 + name: My Exchange Account + status: WAITING_FOR_APPROVAL + items: + $ref: "#/components/schemas/AddedConnectedAccountItem" + type: array + required: + - accounts + type: object ConnectedAccountBalances: properties: assetId: @@ -59147,6 +59406,8 @@ components: - exchange_account.connected - fiat_account.connected - connected_account.connected + - exchange_account.credentials_replaced + - connected_account.credentials_replaced - ticket.created - ticket.submitted - ticket.expired @@ -59192,39 +59453,6 @@ components: required: - clientSignedCert type: object - WebhookOAuthResponse: - description: OAuth 2.0 client credentials configuration for the webhook. Present - only when OAuth is configured. The `clientSecret` is write-only and is never - returned. - example: - clientId: my-client-id - url: https://auth.example.com/oauth/token - mtlsClientSignedCert: |- - -----BEGIN CERTIFICATE----- - ... - -----END CERTIFICATE----- - properties: - clientId: - description: OAuth client ID used to authenticate with the token endpoint. - example: my-client-id - type: string - url: - description: Token endpoint URL. - example: https://auth.example.com/oauth/token - type: string - mtlsClientSignedCert: - description: Signed client certificate PEM used for mTLS when connecting - to the token endpoint. - example: |- - -----BEGIN CERTIFICATE----- - ... - -----END CERTIFICATE----- - nullable: true - type: string - required: - - clientId - - url - type: object WebhookCustomHeadersResponse: description: Names of the custom headers configured for this webhook. Header values are never returned. @@ -59237,6 +59465,7 @@ components: Webhook: example: createdAt: 1625126400000 + webhookOauthId: 123e4567-e89b-12d3-a456-426614174000 description: This webhook is used for transactions notifications id: 123e4567-e89b-12d3-a456-426614174000 mtls: @@ -59244,13 +59473,6 @@ components: -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- - oauth: - clientId: my-client-id - url: https://auth.example.com/oauth/token - mtlsClientSignedCert: |- - -----BEGIN CERTIFICATE----- - ... - -----END CERTIFICATE----- url: https://example.com/webhook events: - transaction.created @@ -59305,8 +59527,13 @@ components: type: integer mtls: $ref: "#/components/schemas/WebhookMtls" - oauth: - $ref: "#/components/schemas/WebhookOAuthResponse" + webhookOauthId: + description: "The id of the OAuth credentials this webhook authenticates\ + \ with. Absent when the webhook does not use OAuth. Read the credentials\ + \ themselves from `/v1/webhooks_settings/oauth/{webhookOauthId}`." + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string customHeaders: description: Names of the custom headers configured for this webhook. Header values are never returned. @@ -59329,6 +59556,7 @@ components: next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 data: - createdAt: 1625126400000 + webhookOauthId: 123e4567-e89b-12d3-a456-426614174000 description: This webhook is used for transactions notifications id: 123e4567-e89b-12d3-a456-426614174000 mtls: @@ -59336,13 +59564,6 @@ components: -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- - oauth: - clientId: my-client-id - url: https://auth.example.com/oauth/token - mtlsClientSignedCert: |- - -----BEGIN CERTIFICATE----- - ... - -----END CERTIFICATE----- url: https://example.com/webhook events: - transaction.created @@ -59353,6 +59574,7 @@ components: status: ENABLED updatedAt: 1625126400000 - createdAt: 1625126400000 + webhookOauthId: 123e4567-e89b-12d3-a456-426614174000 description: This webhook is used for transactions notifications id: 123e4567-e89b-12d3-a456-426614174000 mtls: @@ -59360,13 +59582,6 @@ components: -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- - oauth: - clientId: my-client-id - url: https://auth.example.com/oauth/token - mtlsClientSignedCert: |- - -----BEGIN CERTIFICATE----- - ... - -----END CERTIFICATE----- url: https://example.com/webhook events: - transaction.created @@ -59390,66 +59605,20 @@ components: required: - data type: object - WebhookOAuth: - description: "OAuth 2.0 client credentials configuration for the webhook. When\ - \ set, the webhook dispatcher fetches a bearer token from the configured token\ - \ endpoint before each delivery and attaches it as `Authorization: Bearer\ - \ {token}`. Send `null` to remove OAuth configuration entirely." - example: - clientId: my-client-id - clientSecret: my-client-secret - url: https://auth.example.com/oauth/token - mtlsClientSignedCert: |- - -----BEGIN CERTIFICATE----- - ... - -----END CERTIFICATE----- - nullable: true - properties: - clientId: - description: OAuth client ID used to authenticate with the token endpoint. - example: my-client-id - maxLength: 255 - type: string - clientSecret: - description: OAuth client secret. Write-only — never returned in responses. - example: my-client-secret - maxLength: 480 - type: string - url: - description: Token endpoint URL. Must be HTTPS. - example: https://auth.example.com/oauth/token - maxLength: 2048 - pattern: ^https:// - type: string - mtlsClientSignedCert: - description: Signed client certificate PEM used for mTLS when connecting - to the token endpoint. Same format as the webhook mTLS certificate. Send - `null` to remove. - example: |- - -----BEGIN CERTIFICATE----- - ... - -----END CERTIFICATE----- - nullable: true - type: string - required: - - clientId - - clientSecret - - url - type: object WebhookCustomHeaders: additionalProperties: description: "A string, sent as one header line, or an array of strings, sent\ \ as one header line per element. A string may be empty: RFC 9110 §5.5 permits\ \ an empty field value, and it reaches your endpoint as an empty value rather\ - \ than being dropped. Values are at most 1024 characters and must not contain\ - \ control characters. An array must not be empty and is not accepted for\ - \ `Cookie`." + \ than being dropped. A value has no length limit of its own and must not\ + \ contain control characters. An array must not be empty and is not accepted\ + \ for `Cookie`." example: abc123 description: |- Custom HTTP headers attached to every notification delivered by this webhook. A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. - At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. Values are at most 1024 characters and may be empty. - Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`, `Authorization`. `Authorization` is reserved whether or not this webhook has OAuth credentials attached, because Fireblocks sets it once it does. + At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. A value may be empty and has no length limit of its own; the whole object must be under 16 KB when serialized as UTF-8. A value that large may still be refused by your own endpoint, since web servers commonly cap the whole request header block at around 8 KB. + Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`. When this webhook has OAuth credentials attached, an `Authorization` value you set and the bearer token are both sent as separate header lines. Values are write-only; responses return only the header names. example: X-Gateway-Key: abc123 @@ -59460,20 +59629,13 @@ components: type: object CreateWebhookRequest: example: + webhookOauthId: 123e4567-e89b-12d3-a456-426614174000 description: This webhook is used for transactions notifications mtls: clientSignedCert: |- -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- - oauth: - clientId: my-client-id - clientSecret: my-client-secret - url: https://auth.example.com/oauth/token - mtlsClientSignedCert: |- - -----BEGIN CERTIFICATE----- - ... - -----END CERTIFICATE----- url: https://example.com/webhook events: - transaction.created @@ -59513,22 +59675,29 @@ components: type: boolean mtls: $ref: "#/components/schemas/WebhookMtls" - oauth: - $ref: "#/components/schemas/WebhookOAuth" + webhookOauthId: + description: "The id of the OAuth credentials this webhook authenticates\ + \ with, from `/v1/webhooks_settings/oauth`. Several webhooks may share\ + \ one credential set, so rotating its client secret covers all of them\ + \ at once. Send `null` to stop using OAuth for this webhook." + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + nullable: true + type: string customHeaders: additionalProperties: description: "A string, sent as one header line, or an array of strings,\ \ sent as one header line per element. A string may be empty: RFC 9110\ \ §5.5 permits an empty field value, and it reaches your endpoint as\ - \ an empty value rather than being dropped. Values are at most 1024\ - \ characters and must not contain control characters. An array must\ + \ an empty value rather than being dropped. A value has no length limit\ + \ of its own and must not contain control characters. An array must\ \ not be empty and is not accepted for `Cookie`." example: abc123 description: |- Custom HTTP headers attached to every notification delivered by this webhook. A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. - At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. Values are at most 1024 characters and may be empty. - Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`, `Authorization`. `Authorization` is reserved whether or not this webhook has OAuth credentials attached, because Fireblocks sets it once it does. + At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. A value may be empty and has no length limit of its own; the whole object must be under 16 KB when serialized as UTF-8. A value that large may still be refused by your own endpoint, since web servers commonly cap the whole request header block at around 8 KB. + Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`. When this webhook has OAuth credentials attached, an `Authorization` value you set and the bearer token are both sent as separate header lines. Values are write-only; responses return only the header names. example: X-Gateway-Key: abc123 @@ -59559,7 +59728,7 @@ components: required: - csr type: object - WebhookOAuthCredentials: + WebhookOauthCredentials: description: "A stored OAuth 2.0 client credential set, referenced by webhooks\ \ through their `webhookOauthId`. When a webhook references one, the dispatcher\ \ fetches a bearer token from `url` before each delivery and attaches it as\ @@ -59670,47 +59839,47 @@ components: - updatedAt - url type: object - WebhookOAuthList: + WebhookOauthList: description: Every OAuth credential set belonging to the workspace. Client secrets are never returned. items: - $ref: "#/components/schemas/WebhookOAuthCredentials" + $ref: "#/components/schemas/WebhookOauthCredentials" type: array - WebhookOAuthCustomJwtClaims: + WebhookOauthCustomJwtClaims: additionalProperties: description: Claim value. May be any JSON type except `null`. description: |- Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. - Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOAuthCustomJwtClaimsUpdate`. + Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOauthCustomJwtClaimsUpdate`. example: aud: https://auth.example.com email_verified: true nullable: true type: object - WebhookOAuthCustomBodyParams: + WebhookOauthCustomBodyParams: additionalProperties: type: string description: |- Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. - Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`. + Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOauthCustomBodyParamsUpdate`. example: scope: payments.read payments.write nullable: true type: object - WebhookOAuthCustomHeaders: + WebhookOauthCustomHeaders: additionalProperties: type: string description: |- Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. - Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Authorization`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. The whole object must be under 16 KB. - Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOAuthCustomHeadersUpdate`. + Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. `Authorization` is not sent when `authMethod` is `client_secret_basic`. Values have no length limit of their own; the whole object must be under 16 KB when serialized as UTF-8. + Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOauthCustomHeadersUpdate`. example: x-api-key: gateway-key nullable: true type: object - CreateWebhookOAuthRequest: + CreateWebhookOauthRequest: description: "A new reusable OAuth 2.0 client credential set. Attach it to a\ \ webhook by passing the returned id as that webhook's `webhookOauthId`. Several\ \ webhooks may share one credential set, so rotating its client secret covers\ @@ -59775,7 +59944,7 @@ components: description: |- Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. - Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOAuthCustomJwtClaimsUpdate`. + Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOauthCustomJwtClaimsUpdate`. example: aud: https://auth.example.com email_verified: true @@ -59787,7 +59956,7 @@ components: description: |- Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. - Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`. + Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOauthCustomBodyParamsUpdate`. example: scope: payments.read payments.write nullable: true @@ -59797,8 +59966,8 @@ components: type: string description: |- Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. - Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Authorization`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. The whole object must be under 16 KB. - Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOAuthCustomHeadersUpdate`. + Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. `Authorization` is not sent when `authMethod` is `client_secret_basic`. Values have no length limit of their own; the whole object must be under 16 KB when serialized as UTF-8. + Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOauthCustomHeadersUpdate`. example: x-api-key: gateway-key nullable: true @@ -59817,9 +59986,9 @@ components: - name - url type: object - DeleteWebhookOAuthResponse: + DeleteWebhookOauthResponse: allOf: - - $ref: "#/components/schemas/WebhookOAuthCredentials" + - $ref: "#/components/schemas/WebhookOauthCredentials" - properties: detachedWebhookIds: description: "Webhooks whose `webhookOauthId` was cleared. The webhooks\ @@ -59859,7 +60028,7 @@ components: ... -----END CERTIFICATE----- updatedAt: 1625097600000 - WebhookOAuthCustomJwtClaimsUpdate: + WebhookOauthCustomJwtClaimsUpdate: additionalProperties: description: "Claim value. May be any JSON type, or `null` to delete the claim." description: |- @@ -59871,7 +60040,7 @@ components: resource: null nullable: true type: object - WebhookOAuthCustomBodyParamsUpdate: + WebhookOauthCustomBodyParamsUpdate: additionalProperties: nullable: true type: string @@ -59884,20 +60053,20 @@ components: audience: null nullable: true type: object - WebhookOAuthCustomHeadersUpdate: + WebhookOauthCustomHeadersUpdate: additionalProperties: nullable: true type: string description: |- A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ "X-Api-Key": "new-key", "X-Tenant": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. - Same rules as on create: string values only, `Content-Type`/`Authorization`/ `Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. + Same rules as on create: string values only, `Content-Type`/`Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. example: x-api-key: gateway-key x-tenant: null nullable: true type: object - UpdateWebhookOAuthRequest: + UpdateWebhookOauthRequest: description: |- A partial update. Every field is optional and an omitted field is left as it is, so `{ "clientSecret": "new-secret" }` rotates the secret and changes nothing else. A rotation applies to every webhook referencing these credentials. @@ -59989,7 +60158,7 @@ components: description: |- A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ "X-Api-Key": "new-key", "X-Tenant": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. - Same rules as on create: string values only, `Content-Type`/`Authorization`/ `Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. + Same rules as on create: string values only, `Content-Type`/`Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. example: x-api-key: gateway-key x-tenant: null @@ -60010,7 +60179,7 @@ components: additionalProperties: description: "A string, sent as one header line, or an array of strings, sent\ \ as one header line per element, or `null` to delete the header. A string\ - \ may be empty. Values are at most 1024 characters and must not contain\ + \ may be empty. A value has no length limit of its own and must not contain\ \ control characters. An array must not be empty and is not accepted for\ \ `Cookie`." example: abc123 @@ -60018,7 +60187,7 @@ components: A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another. - Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. + Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total and under 16 KB in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. example: X-Gateway-Key: abc123 X-Forwarded-For: @@ -60029,20 +60198,13 @@ components: type: object UpdateWebhookRequest: example: + webhookOauthId: 123e4567-e89b-12d3-a456-426614174000 description: This webhook is used for transactions notifications mtls: clientSignedCert: |- -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- - oauth: - clientId: my-client-id - clientSecret: my-client-secret - url: https://auth.example.com/oauth/token - mtlsClientSignedCert: |- - -----BEGIN CERTIFICATE----- - ... - -----END CERTIFICATE----- url: https://example.com/webhook events: - transaction.created @@ -60081,21 +60243,28 @@ components: type: boolean mtls: $ref: "#/components/schemas/WebhookMtls" - oauth: - $ref: "#/components/schemas/WebhookOAuth" + webhookOauthId: + description: "The id of the OAuth credentials this webhook authenticates\ + \ with, from `/v1/webhooks_settings/oauth`. Several webhooks may share\ + \ one credential set, so rotating its client secret covers all of them\ + \ at once. Send `null` to stop using OAuth for this webhook." + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + nullable: true + type: string customHeaders: additionalProperties: description: "A string, sent as one header line, or an array of strings,\ \ sent as one header line per element, or `null` to delete the header.\ - \ A string may be empty. Values are at most 1024 characters and must\ - \ not contain control characters. An array must not be empty and is\ - \ not accepted for `Cookie`." + \ A string may be empty. A value has no length limit of its own and\ + \ must not contain control characters. An array must not be empty and\ + \ is not accepted for `Cookie`." example: abc123 description: |- A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another. - Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. + Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total and under 16 KB in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. example: X-Gateway-Key: abc123 X-Forwarded-For: diff --git a/build.gradle b/build.gradle index 28a5ddf4..d43e483e 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '30.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/ApprovalsBetaApi.md b/docs/ApprovalsBetaApi.md index 1e795c89..bf477412 100644 --- a/docs/ApprovalsBetaApi.md +++ b/docs/ApprovalsBetaApi.md @@ -6,6 +6,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ |------------- | ------------- | -------------| | [**getApprovalById**](ApprovalsBetaApi.md#getApprovalById) | **GET** /approvals/{requestId} | Get a single approval request | | [**getApprovals**](ApprovalsBetaApi.md#getApprovals) | **GET** /approvals | List approval requests | +| [**rejectApproval**](ApprovalsBetaApi.md#rejectApproval) | **POST** /approvals/{requestId}/reject | Reject an approval request | @@ -176,3 +177,81 @@ No authorization required | **200** | Approval requests the authenticated user is eligible to act on. | * X-Request-ID -
| | **0** | Error Response | * X-Request-ID -
| + +## rejectApproval + +> CompletableFuture> rejectApproval rejectApproval(requestId, idempotencyKey) + +Reject an approval request + +Reject a pending approval request as the authenticated API user. No signature is required (unlike approve). The caller must be eligible to act on the request; rejecting finalizes the request as rejected per the approval policy. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.ApprovalsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String requestId = "18055"; // String | The approval request ID. + String idempotencyKey = "idempotencyKey_example"; // String | 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. + try { + CompletableFuture> response = fireblocks.approvalsBeta().rejectApproval(requestId, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling ApprovalsBetaApi#rejectApproval"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **requestId** | **String**| The approval request ID. | | +| **idempotencyKey** | **String**| 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. | [optional] | + +### Return type + + +CompletableFuture> + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | The approval request was rejected. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/ConnectedAccountsBetaApi.md b/docs/ConnectedAccountsBetaApi.md index 86ad7d5f..b95d66df 100644 --- a/docs/ConnectedAccountsBetaApi.md +++ b/docs/ConnectedAccountsBetaApi.md @@ -16,6 +16,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getConnectedAccountsCredentialsPublicKey**](ConnectedAccountsBetaApi.md#getConnectedAccountsCredentialsPublicKey) | **GET** /connected_accounts/credentials/public_key | Get public key to encrypt connected account credentials | | [**renameConnectedAccount**](ConnectedAccountsBetaApi.md#renameConnectedAccount) | **POST** /connected_accounts/{accountId}/rename | Rename Connected Account | | [**syncConnectedAccountAllowlist**](ConnectedAccountsBetaApi.md#syncConnectedAccountAllowlist) | **POST** /connected_accounts/{accountId}/allowlist/sync | Sync allowlist for connected account | +| [**updateConnectedAccountCredentials**](ConnectedAccountsBetaApi.md#updateConnectedAccountCredentials) | **POST** /connected_accounts/{accountId}/credentials | Update connected account credentials | @@ -988,3 +989,89 @@ No authorization required | **202** | Sync request accepted and processing | * X-Request-ID -
| | **0** | Error Response | * X-Request-ID -
| + +## updateConnectedAccountCredentials + +> CompletableFuture> updateConnectedAccountCredentials updateConnectedAccountCredentials(updateConnectedAccountCredentialsRequest, accountId, idempotencyKey) + +Update connected account credentials + +Replace the API credentials (secret + API key) of a connected account. Credentials belong to an API key, which can back a single account or an entire hierarchy. Updating them affects all accounts sharing that key, so the endpoint returns an array of modified accounts. The `creds` field must be a Base64-encoded RSA-encrypted credential blob; use `GET /connected_accounts/credentials/public_key` to retrieve the public key for encryption. Both `creds` and `apiKey` are mandatory. Validation against the exchange is synchronous, but the update itself is **pending mobile approval** — the existing credentials stay live until the change is approved, so none of the affected accounts are disconnected in the meantime. Endpoint Permission: Admin, Non-Signing Admin. **Note:** This endpoint is currently in beta and might be subject to changes. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.ConnectedAccountsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UpdateConnectedAccountCredentialsRequest updateConnectedAccountCredentialsRequest = new UpdateConnectedAccountCredentialsRequest(); // UpdateConnectedAccountCredentialsRequest | + String accountId = "2c96e3aa-07ca-4524-a026-75579d25e24a"; // String | The unique identifier of the connected account whose API key credentials are being replaced. + String idempotencyKey = "idempotencyKey_example"; // String | 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. + try { + CompletableFuture> response = fireblocks.connectedAccountsBeta().updateConnectedAccountCredentials(updateConnectedAccountCredentialsRequest, accountId, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling ConnectedAccountsBetaApi#updateConnectedAccountCredentials"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **updateConnectedAccountCredentialsRequest** | [**UpdateConnectedAccountCredentialsRequest**](UpdateConnectedAccountCredentialsRequest.md)| | | +| **accountId** | **String**| The unique identifier of the connected account whose API key credentials are being replaced. | | +| **idempotencyKey** | **String**| 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. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Credential update initiated (pending approval). | * X-Request-ID -
| +| **400** | Bad request — credentials cannot be updated on a sub-account, or missing creds / apiKey. | - | +| **403** | Insufficient permissions, or feature not enabled for this tenant. | - | +| **404** | Connected account not found. | - | +| **409** | Account is not in an updatable state, or the credentials belong to a different account. | - | +| **422** | The provided credentials were rejected by the exchange. | - | +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/CreateWebhookOAuthRequest.md b/docs/CreateWebhookOauthRequest.md similarity index 83% rename from docs/CreateWebhookOAuthRequest.md rename to docs/CreateWebhookOauthRequest.md index 2693c58d..5495d5d5 100644 --- a/docs/CreateWebhookOAuthRequest.md +++ b/docs/CreateWebhookOauthRequest.md @@ -1,6 +1,6 @@ -# CreateWebhookOAuthRequest +# CreateWebhookOauthRequest A new reusable OAuth 2.0 client credential set. Attach it to a webhook by passing the returned id as that webhook's `webhookOauthId`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. @@ -13,9 +13,9 @@ A new reusable OAuth 2.0 client credential set. Attach it to a webhook by passin |**clientSecret** | **String** | OAuth client secret. Write-only — never returned. Limited to 480 bytes UTF-8 encoded. With `client_secret_jwt` it signs the assertion rather than being sent. | | |**url** | **String** | Token endpoint URL. HTTPS on port 443 only, and the host must resolve publicly — localhost and private, link-local or loopback addresses are rejected. | | |**authMethod** | **String** | How the client credentials reach the token endpoint. `client_secret_basic` uses an HTTP Basic header, `client_secret_post` uses form fields in the body, and `client_secret_jwt` sends a JWT assertion signed with the secret, so the secret itself is never transmitted. Defaults to `client_secret_basic`. | [optional] | -|**customJwtClaims** | **Map<String, Object>** | Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOAuthCustomJwtClaimsUpdate`. | [optional] | -|**customBodyParams** | **Map<String, String>** | Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`. | [optional] | -|**customHeaders** | **Map<String, String>** | Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Authorization`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. The whole object must be under 16 KB. Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOAuthCustomHeadersUpdate`. | [optional] | +|**customJwtClaims** | **Map<String, Object>** | Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOauthCustomJwtClaimsUpdate`. | [optional] | +|**customBodyParams** | **Map<String, String>** | Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOauthCustomBodyParamsUpdate`. | [optional] | +|**customHeaders** | **Map<String, String>** | Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. `Authorization` is not sent when `authMethod` is `client_secret_basic`. Values have no length limit of their own; the whole object must be under 16 KB when serialized as UTF-8. Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOauthCustomHeadersUpdate`. | [optional] | |**mtlsClientSignedCert** | **String** | PEM-encoded client certificate for mTLS when fetching tokens. Must be a valid X.509 certificate inside its validity window. | [optional] | diff --git a/docs/CreateWebhookRequest.md b/docs/CreateWebhookRequest.md index 1f1cc292..964944ea 100644 --- a/docs/CreateWebhookRequest.md +++ b/docs/CreateWebhookRequest.md @@ -12,8 +12,8 @@ |**events** | **List<WebhookEvent>** | event types the webhook will subscribe to | | |**enabled** | **Boolean** | The status of the webhook. If false, the webhook will not receive notifications. | [optional] | |**mtls** | [**WebhookMtls**](WebhookMtls.md) | | [optional] | -|**oauth** | [**WebhookOAuth**](WebhookOAuth.md) | | [optional] | -|**customHeaders** | **Map<String, Object>** | Custom HTTP headers attached to every notification delivered by this webhook. A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. Values are at most 1024 characters and may be empty. Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`, `Authorization`. `Authorization` is reserved whether or not this webhook has OAuth credentials attached, because Fireblocks sets it once it does. Values are write-only; responses return only the header names. | [optional] | +|**webhookOauthId** | **UUID** | The id of the OAuth credentials this webhook authenticates with, from `/v1/webhooks_settings/oauth`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. Send `null` to stop using OAuth for this webhook. | [optional] | +|**customHeaders** | **Map<String, Object>** | Custom HTTP headers attached to every notification delivered by this webhook. A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. A value may be empty and has no length limit of its own; the whole object must be under 16 KB when serialized as UTF-8. A value that large may still be refused by your own endpoint, since web servers commonly cap the whole request header block at around 8 KB. Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`. When this webhook has OAuth credentials attached, an `Authorization` value you set and the bearer token are both sent as separate header lines. Values are write-only; responses return only the header names. | [optional] | diff --git a/docs/DeleteWebhookOAuthResponse.md b/docs/DeleteWebhookOauthResponse.md similarity index 98% rename from docs/DeleteWebhookOAuthResponse.md rename to docs/DeleteWebhookOauthResponse.md index 63c14f8f..e544e32d 100644 --- a/docs/DeleteWebhookOAuthResponse.md +++ b/docs/DeleteWebhookOauthResponse.md @@ -1,6 +1,6 @@ -# DeleteWebhookOAuthResponse +# DeleteWebhookOauthResponse The deleted OAuth credential set, plus the ids of any webhooks the delete detached from it. Webhooks are only detached by `forceDelete=true`; without it a delete is refused with `409` while anything still references the credentials. diff --git a/docs/FiatAccountType.md b/docs/FiatAccountType.md index 4afd39ee..89cf9a12 100644 --- a/docs/FiatAccountType.md +++ b/docs/FiatAccountType.md @@ -7,5 +7,51 @@ * `BLINC` (value: `"BLINC"`) +* `BLINC_TEST` (value: `"BLINC_TEST"`) + +* `CROSSRIVER` (value: `"CROSSRIVER"`) + +* `CROSSRIVER_TEST` (value: `"CROSSRIVER_TEST"`) + +* `CUSTOMERSBANK` (value: `"CUSTOMERSBANK"`) + +* `CUSTOMERSBANK_TEST` (value: `"CUSTOMERSBANK_TEST"`) + +* `FIFTHTHIRD` (value: `"FIFTHTHIRD"`) + +* `FIFTHTHIRD_TEST` (value: `"FIFTHTHIRD_TEST"`) + +* `KINGDOM_BANK` (value: `"KINGDOM_BANK"`) + +* `KINGDOM_BANK_TESTNET` (value: `"KINGDOM_BANK_TESTNET"`) + +* `LYNQ` (value: `"LYNQ"`) + +* `LYNQ_DEV` (value: `"LYNQ_DEV"`) + +* `LYNQ_QA` (value: `"LYNQ_QA"`) + +* `LYNQ_UAT` (value: `"LYNQ_UAT"`) + +* `N3_XT` (value: `"N3XT"`) + +* `N3_XT_ALPHA` (value: `"N3XT_ALPHA"`) + +* `N3_XT_BETA` (value: `"N3XT_BETA"`) + +* `N3_XT_OMEGA` (value: `"N3XT_OMEGA"`) + +* `SYGNUM_CONNECT` (value: `"SYGNUM_CONNECT"`) + +* `SYGNUM_CONNECT_STAGING` (value: `"SYGNUM_CONNECT_STAGING"`) + +* `TRANSFERO` (value: `"TRANSFERO"`) + +* `TRANSFERO_STAGING` (value: `"TRANSFERO_STAGING"`) + +* `ZENUS_DEV` (value: `"ZENUS_DEV"`) + +* `OTHER` (value: `"OTHER"`) + diff --git a/docs/UpdateConnectedAccountCredentialsRequest.md b/docs/UpdateConnectedAccountCredentialsRequest.md new file mode 100644 index 00000000..1d15d4cb --- /dev/null +++ b/docs/UpdateConnectedAccountCredentialsRequest.md @@ -0,0 +1,14 @@ + + +# UpdateConnectedAccountCredentialsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**creds** | **byte[]** | Base64-encoded RSA-encrypted credential blob (the new secret). Encrypt using the public key from GET /connected_accounts/credentials/public_key. | | +|**apiKey** | **String** | The new account-level API key. Mandatory for credential update. | | + + + diff --git a/docs/UpdateConnectedAccountCredentialsResponse.md b/docs/UpdateConnectedAccountCredentialsResponse.md new file mode 100644 index 00000000..19aac572 --- /dev/null +++ b/docs/UpdateConnectedAccountCredentialsResponse.md @@ -0,0 +1,13 @@ + + +# UpdateConnectedAccountCredentialsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accounts** | [**List<AddedConnectedAccountItem>**](AddedConnectedAccountItem.md) | The account whose credentials are pending update (status WAITING_FOR_APPROVAL). Old credentials stay live until the change is approved. | | + + + diff --git a/docs/UpdateWebhookOAuthRequest.md b/docs/UpdateWebhookOauthRequest.md similarity index 95% rename from docs/UpdateWebhookOAuthRequest.md rename to docs/UpdateWebhookOauthRequest.md index 05517864..46eb8f8f 100644 --- a/docs/UpdateWebhookOAuthRequest.md +++ b/docs/UpdateWebhookOauthRequest.md @@ -1,6 +1,6 @@ -# UpdateWebhookOAuthRequest +# UpdateWebhookOauthRequest A partial update. Every field is optional and an omitted field is left as it is, so `{ \"clientSecret\": \"new-secret\" }` rotates the secret and changes nothing else. A rotation applies to every webhook referencing these credentials. The three custom maps merge: a key with a value is upserted, a key with `null` is deleted, a key you leave out is untouched. Because `null` inside a map means delete, none of the three is nullable as a whole — `customJwtClaims: null` and friends are rejected with a `400`. Clear a map by naming each key with a `null` value. `mtlsClientSignedCert` is a scalar, so `null` there does remove it. @@ -15,7 +15,7 @@ A partial update. Every field is optional and an omitted field is left as it is, |**authMethod** | **String** | `client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Omit to leave it unchanged — it does not revert to the default. | [optional] | |**customJwtClaims** | **Map<String, Object>** | A delta applied to the JWT assertion claims. A claim with a value is added or replaced, a claim with `null` is deleted, and a claim you leave out is untouched. So `{ \"aud\": \"https://auth.example.com\", \"resource\": null }` sets `aud`, drops `resource`, and changes nothing else. Send `customJwtClaims: null` to clear every claim in one call. That does not collide with a `null` value on a name: one names the claim to delete, the other names the whole field. Same rules as on create: any JSON type except `null`, `iss`/`sub`/`jti`/`iat`/`exp` reserved, names case-sensitive, resulting set under 16 KB, values write-only. | [optional] | |**customBodyParams** | **Map<String, String>** | A delta applied to the token request body parameters. A parameter with a value is added or replaced, a parameter with `null` is deleted, and one you leave out is untouched. So `{ \"scope\": \"payments.read\", \"audience\": null }` sets `scope`, drops `audience`, and changes nothing else. Send `customBodyParams: null` to clear every parameter in one call. That does not collide with a `null` value on a name: one names the parameter to delete, the other names the whole field. Same rules as on create: string values only, `grant_type`/`client_id`/`client_secret`/ `client_assertion`/`client_assertion_type` reserved, names case-sensitive, resulting set under 16 KB, values write-only. | [optional] | -|**customHeaders** | **Map<String, String>** | A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ \"X-Api-Key\": \"new-key\", \"X-Tenant\": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. Same rules as on create: string values only, `Content-Type`/`Authorization`/ `Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. | [optional] | +|**customHeaders** | **Map<String, String>** | A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ \"X-Api-Key\": \"new-key\", \"X-Tenant\": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. Same rules as on create: string values only, `Content-Type`/`Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. | [optional] | |**mtlsClientSignedCert** | **String** | PEM-encoded client certificate for mTLS. Must be a valid X.509 certificate inside its validity window. Omit to leave it unchanged, or send `null` to remove it. | [optional] | diff --git a/docs/UpdateWebhookRequest.md b/docs/UpdateWebhookRequest.md index b875b680..6b5346b9 100644 --- a/docs/UpdateWebhookRequest.md +++ b/docs/UpdateWebhookRequest.md @@ -12,8 +12,8 @@ |**events** | **List<WebhookEvent>** | The events that the webhook will be subscribed to | [optional] | |**enabled** | **Boolean** | The status of the webhook | [optional] | |**mtls** | [**WebhookMtls**](WebhookMtls.md) | | [optional] | -|**oauth** | [**WebhookOAuth**](WebhookOAuth.md) | | [optional] | -|**customHeaders** | **Map<String, Object>** | A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another. Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. | [optional] | +|**webhookOauthId** | **UUID** | The id of the OAuth credentials this webhook authenticates with, from `/v1/webhooks_settings/oauth`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. Send `null` to stop using OAuth for this webhook. | [optional] | +|**customHeaders** | **Map<String, Object>** | A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another. Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total and under 16 KB in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. | [optional] | diff --git a/docs/Webhook.md b/docs/Webhook.md index fa9ce76e..15ec34a5 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -15,7 +15,7 @@ |**createdAt** | **Long** | The date and time the webhook was created in milliseconds | | |**updatedAt** | **Long** | The date and time the webhook was last updated in milliseconds | | |**mtls** | [**WebhookMtls**](WebhookMtls.md) | | [optional] | -|**oauth** | [**WebhookOAuthResponse**](WebhookOAuthResponse.md) | | [optional] | +|**webhookOauthId** | **UUID** | The id of the OAuth credentials this webhook authenticates with. Absent when the webhook does not use OAuth. Read the credentials themselves from `/v1/webhooks_settings/oauth/{webhookOauthId}`. | [optional] | |**customHeaders** | **List<String>** | Names of the custom headers configured for this webhook. Header values are never returned. | [optional] | diff --git a/docs/WebhookEvent.md b/docs/WebhookEvent.md index f1a80666..66dfdf81 100644 --- a/docs/WebhookEvent.md +++ b/docs/WebhookEvent.md @@ -71,6 +71,10 @@ * `CONNECTED_ACCOUNT_CONNECTED` (value: `"connected_account.connected"`) +* `EXCHANGE_ACCOUNT_CREDENTIALS_REPLACED` (value: `"exchange_account.credentials_replaced"`) + +* `CONNECTED_ACCOUNT_CREDENTIALS_REPLACED` (value: `"connected_account.credentials_replaced"`) + * `TICKET_CREATED` (value: `"ticket.created"`) * `TICKET_SUBMITTED` (value: `"ticket.submitted"`) diff --git a/docs/WebhookOAuth.md b/docs/WebhookOAuth.md deleted file mode 100644 index 4db72df7..00000000 --- a/docs/WebhookOAuth.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# WebhookOAuth - -OAuth 2.0 client credentials configuration for the webhook. When set, the webhook dispatcher fetches a bearer token from the configured token endpoint before each delivery and attaches it as `Authorization: Bearer {token}`. Send `null` to remove OAuth configuration entirely. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientId** | **String** | OAuth client ID used to authenticate with the token endpoint. | | -|**clientSecret** | **String** | OAuth client secret. Write-only — never returned in responses. | | -|**url** | **String** | Token endpoint URL. Must be HTTPS. | | -|**mtlsClientSignedCert** | **String** | Signed client certificate PEM used for mTLS when connecting to the token endpoint. Same format as the webhook mTLS certificate. Send `null` to remove. | [optional] | - - - diff --git a/docs/WebhookOAuthResponse.md b/docs/WebhookOAuthResponse.md deleted file mode 100644 index fc76f213..00000000 --- a/docs/WebhookOAuthResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# WebhookOAuthResponse - -OAuth 2.0 client credentials configuration for the webhook. Present only when OAuth is configured. The `clientSecret` is write-only and is never returned. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientId** | **String** | OAuth client ID used to authenticate with the token endpoint. | | -|**url** | **String** | Token endpoint URL. | | -|**mtlsClientSignedCert** | **String** | Signed client certificate PEM used for mTLS when connecting to the token endpoint. | [optional] | - - - diff --git a/docs/WebhookOAuthCredentials.md b/docs/WebhookOauthCredentials.md similarity index 98% rename from docs/WebhookOAuthCredentials.md rename to docs/WebhookOauthCredentials.md index ec7729f8..7fc4a206 100644 --- a/docs/WebhookOAuthCredentials.md +++ b/docs/WebhookOauthCredentials.md @@ -1,6 +1,6 @@ -# WebhookOAuthCredentials +# WebhookOauthCredentials A stored OAuth 2.0 client credential set, referenced by webhooks through their `webhookOauthId`. When a webhook references one, the dispatcher fetches a bearer token from `url` before each delivery and attaches it as `Authorization: Bearer {token}`. Secret material is never returned: `clientSecret` is absent from this schema entirely, and the `customJwtClaims`, `customBodyParams` and `customHeaders` fields are reduced to their names, without the configured values. diff --git a/docs/WebhooksV2Api.md b/docs/WebhooksV2Api.md index d6e22ab4..e91bc9c6 100644 --- a/docs/WebhooksV2Api.md +++ b/docs/WebhooksV2Api.md @@ -5,9 +5,9 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**createWebhook**](WebhooksV2Api.md#createWebhook) | **POST** /webhooks | Create a new webhook | -| [**createWebhookOAuth**](WebhooksV2Api.md#createWebhookOAuth) | **POST** /webhooks_settings/oauth | Create OAuth credentials | +| [**createWebhookOauth**](WebhooksV2Api.md#createWebhookOauth) | **POST** /webhooks_settings/oauth | Create OAuth credentials | | [**deleteWebhook**](WebhooksV2Api.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook | -| [**deleteWebhookOAuth**](WebhooksV2Api.md#deleteWebhookOAuth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials | +| [**deleteWebhookOauth**](WebhooksV2Api.md#deleteWebhookOauth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials | | [**getMetrics**](WebhooksV2Api.md#getMetrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics | | [**getMtlsCsr**](WebhooksV2Api.md#getMtlsCsr) | **GET** /webhooks/mtls/csr | Get mTLS CSR | | [**getNotification**](WebhooksV2Api.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id | @@ -16,15 +16,15 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getResendByQueryJobStatus**](WebhooksV2Api.md#getResendByQueryJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_by_query/jobs/{jobId} | Get resend by query job status | | [**getResendJobStatus**](WebhooksV2Api.md#getResendJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId} | Get resend job status | | [**getWebhook**](WebhooksV2Api.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id | -| [**getWebhookOAuth**](WebhooksV2Api.md#getWebhookOAuth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id | -| [**getWebhookOAuths**](WebhooksV2Api.md#getWebhookOAuths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials | +| [**getWebhookOauth**](WebhooksV2Api.md#getWebhookOauth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id | +| [**getWebhookOauths**](WebhooksV2Api.md#getWebhookOauths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials | | [**getWebhooks**](WebhooksV2Api.md#getWebhooks) | **GET** /webhooks | Get all webhooks | | [**resendFailedNotifications**](WebhooksV2Api.md#resendFailedNotifications) | **POST** /webhooks/{webhookId}/notifications/resend_failed | Resend failed notifications | | [**resendNotificationById**](WebhooksV2Api.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id | | [**resendNotificationsByQuery**](WebhooksV2Api.md#resendNotificationsByQuery) | **POST** /webhooks/{webhookId}/notifications/resend_by_query | Resend notifications by query | | [**resendNotificationsByResourceId**](WebhooksV2Api.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id | | [**updateWebhook**](WebhooksV2Api.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook | -| [**updateWebhookOAuth**](WebhooksV2Api.md#updateWebhookOAuth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials | +| [**updateWebhookOauth**](WebhooksV2Api.md#updateWebhookOauth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials | @@ -107,9 +107,9 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| -## createWebhookOAuth +## createWebhookOauth -> CompletableFuture> createWebhookOAuth createWebhookOAuth(createWebhookOAuthRequest, idempotencyKey) +> CompletableFuture> createWebhookOauth createWebhookOauth(createWebhookOauthRequest, idempotencyKey) Create OAuth credentials @@ -138,16 +138,16 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - CreateWebhookOAuthRequest createWebhookOAuthRequest = new CreateWebhookOAuthRequest(); // CreateWebhookOAuthRequest | + CreateWebhookOauthRequest createWebhookOauthRequest = new CreateWebhookOauthRequest(); // CreateWebhookOauthRequest | String idempotencyKey = "idempotencyKey_example"; // String | 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. try { - CompletableFuture> response = fireblocks.webhooksV2().createWebhookOAuth(createWebhookOAuthRequest, idempotencyKey); + CompletableFuture> response = fireblocks.webhooksV2().createWebhookOauth(createWebhookOauthRequest, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling WebhooksV2Api#createWebhookOAuth"); + System.err.println("Exception when calling WebhooksV2Api#createWebhookOauth"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -162,12 +162,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **createWebhookOAuthRequest** | [**CreateWebhookOAuthRequest**](CreateWebhookOAuthRequest.md)| | | +| **createWebhookOauthRequest** | [**CreateWebhookOauthRequest**](CreateWebhookOauthRequest.md)| | | | **idempotencyKey** | **String**| 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. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -263,9 +263,9 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| -## deleteWebhookOAuth +## deleteWebhookOauth -> CompletableFuture> deleteWebhookOAuth deleteWebhookOAuth(webhookOauthId, forceDelete) +> CompletableFuture> deleteWebhookOauth deleteWebhookOauth(webhookOauthId, forceDelete) Delete OAuth credentials @@ -297,13 +297,13 @@ public class Example { UUID webhookOauthId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the OAuth credentials Boolean forceDelete = false; // Boolean | Delete the credentials even while webhooks still reference them, detaching those webhooks instead of refusing. Leave it unset, or `false`, to get a `409 Conflict` whenever anything still references the credentials. try { - CompletableFuture> response = fireblocks.webhooksV2().deleteWebhookOAuth(webhookOauthId, forceDelete); + CompletableFuture> response = fireblocks.webhooksV2().deleteWebhookOauth(webhookOauthId, forceDelete); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling WebhooksV2Api#deleteWebhookOAuth"); + System.err.println("Exception when calling WebhooksV2Api#deleteWebhookOauth"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -323,7 +323,7 @@ public class Example { ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -989,9 +989,9 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| -## getWebhookOAuth +## getWebhookOauth -> CompletableFuture> getWebhookOAuth getWebhookOAuth(webhookOauthId) +> CompletableFuture> getWebhookOauth getWebhookOauth(webhookOauthId) Get OAuth credentials by id @@ -1022,13 +1022,13 @@ public class Example { UUID webhookOauthId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the OAuth credentials try { - CompletableFuture> response = fireblocks.webhooksV2().getWebhookOAuth(webhookOauthId); + CompletableFuture> response = fireblocks.webhooksV2().getWebhookOauth(webhookOauthId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling WebhooksV2Api#getWebhookOAuth"); + System.err.println("Exception when calling WebhooksV2Api#getWebhookOauth"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -1047,7 +1047,7 @@ public class Example { ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -1066,9 +1066,9 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| -## getWebhookOAuths +## getWebhookOauths -> CompletableFuture>> getWebhookOAuths getWebhookOAuths() +> CompletableFuture>> getWebhookOauths getWebhookOauths() Get all OAuth credentials @@ -1098,13 +1098,13 @@ public class Example { Fireblocks fireblocks = new Fireblocks(configurationOptions); try { - CompletableFuture>> response = fireblocks.webhooksV2().getWebhookOAuths(); + CompletableFuture>> response = fireblocks.webhooksV2().getWebhookOauths(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling WebhooksV2Api#getWebhookOAuths"); + System.err.println("Exception when calling WebhooksV2Api#getWebhookOauths"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -1120,7 +1120,7 @@ This endpoint does not need any parameter. ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -1623,9 +1623,9 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| -## updateWebhookOAuth +## updateWebhookOauth -> CompletableFuture> updateWebhookOAuth updateWebhookOAuth(updateWebhookOAuthRequest, webhookOauthId) +> CompletableFuture> updateWebhookOauth updateWebhookOauth(updateWebhookOauthRequest, webhookOauthId) Update OAuth credentials @@ -1654,16 +1654,16 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - UpdateWebhookOAuthRequest updateWebhookOAuthRequest = new UpdateWebhookOAuthRequest(); // UpdateWebhookOAuthRequest | + UpdateWebhookOauthRequest updateWebhookOauthRequest = new UpdateWebhookOauthRequest(); // UpdateWebhookOauthRequest | UUID webhookOauthId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the OAuth credentials try { - CompletableFuture> response = fireblocks.webhooksV2().updateWebhookOAuth(updateWebhookOAuthRequest, webhookOauthId); + CompletableFuture> response = fireblocks.webhooksV2().updateWebhookOauth(updateWebhookOauthRequest, webhookOauthId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling WebhooksV2Api#updateWebhookOAuth"); + System.err.println("Exception when calling WebhooksV2Api#updateWebhookOauth"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -1678,12 +1678,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **updateWebhookOAuthRequest** | [**UpdateWebhookOAuthRequest**](UpdateWebhookOAuthRequest.md)| | | +| **updateWebhookOauthRequest** | [**UpdateWebhookOauthRequest**](UpdateWebhookOauthRequest.md)| | | | **webhookOauthId** | **UUID**| The unique identifier of the OAuth credentials | | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization diff --git a/pom.xml b/pom.xml index f0695ad7..5c58d835 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 30.0.0 + 0.0.0 https://github.com/fireblocks/java-sdk The Fireblocks Official SDK is a comprehensive software development kit that enables seamless integration and interaction with the Fireblocks platform. Fireblocks is a cutting-edge blockchain infrastructure platform that provides secure and scalable solutions for managing digital assets and transactions. This SDK empowers developers to build robust applications that can interact with the Fireblocks platform's features, including creating and managing vault accounts, initiating secure transactions, managing assets, and more. It abstracts complex interactions with the Fireblocks API, making it easier for developers to leverage the platform's capabilities while adhering to best practices in security and efficiency. diff --git a/src/main/java/com/fireblocks/sdk/Configuration.java b/src/main/java/com/fireblocks/sdk/Configuration.java index 553d4488..aa53bae8 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -21,7 +21,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class Configuration { - public static final String VERSION = "30.0.0"; + public static final String VERSION = "0.0.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java index 07676fa2..df42161d 100644 --- a/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java @@ -360,4 +360,77 @@ private HttpRequest.Builder getApprovalsRequestBuilder( } return localVarRequestBuilder; } + /** + * Reject an approval request Reject a pending approval request as the authenticated API user. + * No signature is required (unlike approve). The caller must be eligible to act on the request; + * rejecting finalizes the request as rejected per the approval policy. Endpoint Permission: + * Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. + * + * @param requestId The approval request ID. (required) + * @param 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. (optional) + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails + */ + public CompletableFuture> rejectApproval( + String requestId, String idempotencyKey) { + try { + HttpRequest.Builder localVarRequestBuilder = + rejectApprovalRequestBuilder(requestId, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("rejectApproval", localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder rejectApprovalRequestBuilder( + String requestId, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("rejectApproval", "requestId", requestId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/approvals/{requestId}/reject" + .replace("{requestId}", ApiClient.urlEncode(requestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } } diff --git a/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java index 122010d9..e40fd89e 100644 --- a/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java @@ -33,6 +33,8 @@ import com.fireblocks.sdk.model.GetConnectedAccountsCredentialsPublicKeyResponse; import com.fireblocks.sdk.model.RenameConnectedAccountRequest; import com.fireblocks.sdk.model.RenameConnectedAccountResponse; +import com.fireblocks.sdk.model.UpdateConnectedAccountCredentialsRequest; +import com.fireblocks.sdk.model.UpdateConnectedAccountCredentialsResponse; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -1256,4 +1258,126 @@ private HttpRequest.Builder syncConnectedAccountAllowlistRequestBuilder( } return localVarRequestBuilder; } + /** + * Update connected account credentials Replace the API credentials (secret + API key) of a + * connected account. Credentials belong to an API key, which can back a single account or an + * entire hierarchy. Updating them affects all accounts sharing that key, so the endpoint + * returns an array of modified accounts. The `creds` field must be a Base64-encoded + * RSA-encrypted credential blob; use `GET /connected_accounts/credentials/public_key` + * to retrieve the public key for encryption. Both `creds` and `apiKey` are + * mandatory. Validation against the exchange is synchronous, but the update itself is **pending + * mobile approval** — the existing credentials stay live until the change is approved, so none + * of the affected accounts are disconnected in the meantime. Endpoint Permission: Admin, + * Non-Signing Admin. **Note:** This endpoint is currently in beta and might be subject to + * changes. + * + * @param updateConnectedAccountCredentialsRequest (required) + * @param accountId The unique identifier of the connected account whose API key credentials are + * being replaced. (required) + * @param 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. (optional) + * @return + * CompletableFuture<ApiResponse<UpdateConnectedAccountCredentialsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> + updateConnectedAccountCredentials( + UpdateConnectedAccountCredentialsRequest + updateConnectedAccountCredentialsRequest, + String accountId, + String idempotencyKey) { + try { + HttpRequest.Builder localVarRequestBuilder = + updateConnectedAccountCredentialsRequestBuilder( + updateConnectedAccountCredentialsRequest, accountId, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "updateConnectedAccountCredentials", + localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse< + UpdateConnectedAccountCredentialsResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + UpdateConnectedAccountCredentialsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder updateConnectedAccountCredentialsRequestBuilder( + UpdateConnectedAccountCredentialsRequest updateConnectedAccountCredentialsRequest, + String accountId, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "updateConnectedAccountCredentials", + "updateConnectedAccountCredentialsRequest", + updateConnectedAccountCredentialsRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "updateConnectedAccountCredentials", "accountId", accountId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/connected_accounts/{accountId}/credentials" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes( + updateConnectedAccountCredentialsRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } } diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java index 7d20906e..f80211dd 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java @@ -20,9 +20,9 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; -import com.fireblocks.sdk.model.CreateWebhookOAuthRequest; +import com.fireblocks.sdk.model.CreateWebhookOauthRequest; import com.fireblocks.sdk.model.CreateWebhookRequest; -import com.fireblocks.sdk.model.DeleteWebhookOAuthResponse; +import com.fireblocks.sdk.model.DeleteWebhookOauthResponse; import com.fireblocks.sdk.model.NotificationAttemptsPaginatedResponse; import com.fireblocks.sdk.model.NotificationPaginatedResponse; import com.fireblocks.sdk.model.NotificationStatus; @@ -33,13 +33,13 @@ import com.fireblocks.sdk.model.ResendFailedNotificationsRequest; import com.fireblocks.sdk.model.ResendFailedNotificationsResponse; import com.fireblocks.sdk.model.ResendNotificationsByResourceIdRequest; -import com.fireblocks.sdk.model.UpdateWebhookOAuthRequest; +import com.fireblocks.sdk.model.UpdateWebhookOauthRequest; import com.fireblocks.sdk.model.UpdateWebhookRequest; import com.fireblocks.sdk.model.Webhook; import com.fireblocks.sdk.model.WebhookEvent; import com.fireblocks.sdk.model.WebhookMetric; import com.fireblocks.sdk.model.WebhookMtlsCsrResponse; -import com.fireblocks.sdk.model.WebhookOAuthCredentials; +import com.fireblocks.sdk.model.WebhookOauthCredentials; import com.fireblocks.sdk.model.WebhookPaginatedResponse; import java.io.IOException; import java.io.InputStream; @@ -215,18 +215,18 @@ private HttpRequest.Builder createWebhookRequestBuilder( * once. The client secret is write-only and is never returned. **Endpoint Permissions:** Owner, * Admin, Non-Signing Admin. * - * @param createWebhookOAuthRequest (required) + * @param createWebhookOauthRequest (required) * @param 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. (optional) - * @return CompletableFuture<ApiResponse<WebhookOAuthCredentials>>, which completes + * @return CompletableFuture<ApiResponse<WebhookOauthCredentials>>, which completes * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> createWebhookOAuth( - CreateWebhookOAuthRequest createWebhookOAuthRequest, String idempotencyKey) { + public CompletableFuture> createWebhookOauth( + CreateWebhookOauthRequest createWebhookOauthRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = - createWebhookOAuthRequestBuilder(createWebhookOAuthRequest, idempotencyKey); + createWebhookOauthRequestBuilder(createWebhookOauthRequest, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -237,12 +237,12 @@ public CompletableFuture> createWebhookOAut if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( - "createWebhookOAuth", localVarResponse)); + "createWebhookOauth", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -250,7 +250,7 @@ public CompletableFuture> createWebhookOAut : memberVarObjectMapper.readValue( responseBody, new TypeReference< - WebhookOAuthCredentials>() {}))); + WebhookOauthCredentials>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -260,7 +260,7 @@ public CompletableFuture> createWebhookOAut localVarThrowable == null ? CompletableFuture.completedFuture(localVarApiResponse) : CompletableFuture - .> + .> failedFuture( toApiFailure( localVarThrowable))) @@ -270,11 +270,11 @@ public CompletableFuture> createWebhookOAut } } - private HttpRequest.Builder createWebhookOAuthRequestBuilder( - CreateWebhookOAuthRequest createWebhookOAuthRequest, String idempotencyKey) + private HttpRequest.Builder createWebhookOauthRequestBuilder( + CreateWebhookOauthRequest createWebhookOauthRequest, String idempotencyKey) throws ApiException { ValidationUtils.assertParamExists( - "createWebhookOAuth", "createWebhookOAuthRequest", createWebhookOAuthRequest); + "createWebhookOauth", "createWebhookOauthRequest", createWebhookOauthRequest); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -290,7 +290,7 @@ private HttpRequest.Builder createWebhookOAuthRequestBuilder( try { byte[] localVarPostBody = - memberVarObjectMapper.writeValueAsBytes(createWebhookOAuthRequest); + memberVarObjectMapper.writeValueAsBytes(createWebhookOauthRequest); localVarRequestBuilder.method( "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { @@ -397,14 +397,14 @@ private HttpRequest.Builder deleteWebhookRequestBuilder(UUID webhookId) throws A * those webhooks instead of refusing. Leave it unset, or `false`, to get a * `409 Conflict` whenever anything still references the credentials. (optional, * default to false) - * @return CompletableFuture<ApiResponse<DeleteWebhookOAuthResponse>>, which + * @return CompletableFuture<ApiResponse<DeleteWebhookOauthResponse>>, which * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteWebhookOAuth( + public CompletableFuture> deleteWebhookOauth( UUID webhookOauthId, Boolean forceDelete) { try { HttpRequest.Builder localVarRequestBuilder = - deleteWebhookOAuthRequestBuilder(webhookOauthId, forceDelete); + deleteWebhookOauthRequestBuilder(webhookOauthId, forceDelete); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -415,12 +415,12 @@ public CompletableFuture> deleteWebhookO if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( - "deleteWebhookOAuth", localVarResponse)); + "deleteWebhookOauth", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -428,7 +428,7 @@ public CompletableFuture> deleteWebhookO : memberVarObjectMapper.readValue( responseBody, new TypeReference< - DeleteWebhookOAuthResponse>() {}))); + DeleteWebhookOauthResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -438,7 +438,7 @@ public CompletableFuture> deleteWebhookO localVarThrowable == null ? CompletableFuture.completedFuture(localVarApiResponse) : CompletableFuture - .> + .> failedFuture( toApiFailure( localVarThrowable))) @@ -448,10 +448,10 @@ public CompletableFuture> deleteWebhookO } } - private HttpRequest.Builder deleteWebhookOAuthRequestBuilder( + private HttpRequest.Builder deleteWebhookOauthRequestBuilder( UUID webhookOauthId, Boolean forceDelete) throws ApiException { ValidationUtils.assertParamExistsAndNotEmpty( - "deleteWebhookOAuth", "webhookOauthId", webhookOauthId.toString()); + "deleteWebhookOauth", "webhookOauthId", webhookOauthId.toString()); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -1245,14 +1245,14 @@ private HttpRequest.Builder getWebhookRequestBuilder(UUID webhookId) throws ApiE * never returned. * * @param webhookOauthId The unique identifier of the OAuth credentials (required) - * @return CompletableFuture<ApiResponse<WebhookOAuthCredentials>>, which completes + * @return CompletableFuture<ApiResponse<WebhookOauthCredentials>>, which completes * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getWebhookOAuth( + public CompletableFuture> getWebhookOauth( UUID webhookOauthId) { try { HttpRequest.Builder localVarRequestBuilder = - getWebhookOAuthRequestBuilder(webhookOauthId); + getWebhookOauthRequestBuilder(webhookOauthId); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -1262,12 +1262,12 @@ public CompletableFuture> getWebhookOAuth( } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException("getWebhookOAuth", localVarResponse)); + getApiException("getWebhookOauth", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -1275,7 +1275,7 @@ public CompletableFuture> getWebhookOAuth( : memberVarObjectMapper.readValue( responseBody, new TypeReference< - WebhookOAuthCredentials>() {}))); + WebhookOauthCredentials>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -1285,7 +1285,7 @@ public CompletableFuture> getWebhookOAuth( localVarThrowable == null ? CompletableFuture.completedFuture(localVarApiResponse) : CompletableFuture - .> + .> failedFuture( toApiFailure( localVarThrowable))) @@ -1295,10 +1295,10 @@ public CompletableFuture> getWebhookOAuth( } } - private HttpRequest.Builder getWebhookOAuthRequestBuilder(UUID webhookOauthId) + private HttpRequest.Builder getWebhookOauthRequestBuilder(UUID webhookOauthId) throws ApiException { ValidationUtils.assertParamExistsAndNotEmpty( - "getWebhookOAuth", "webhookOauthId", webhookOauthId.toString()); + "getWebhookOauth", "webhookOauthId", webhookOauthId.toString()); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -1324,12 +1324,12 @@ private HttpRequest.Builder getWebhookOAuthRequestBuilder(UUID webhookOauthId) * Get all OAuth credentials Lists every OAuth credential set for the workspace. Client secrets * are never returned. * - * @return CompletableFuture<ApiResponse<List<WebhookOAuthCredentials>>>, + * @return CompletableFuture<ApiResponse<List<WebhookOauthCredentials>>>, * which completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getWebhookOAuths() { + public CompletableFuture>> getWebhookOauths() { try { - HttpRequest.Builder localVarRequestBuilder = getWebhookOAuthsRequestBuilder(); + HttpRequest.Builder localVarRequestBuilder = getWebhookOauthsRequestBuilder(); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -1339,12 +1339,12 @@ public CompletableFuture>> getWebhookO } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException("getWebhookOAuths", localVarResponse)); + getApiException("getWebhookOauths", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse>( + new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -1353,7 +1353,7 @@ public CompletableFuture>> getWebhookO responseBody, new TypeReference< List< - WebhookOAuthCredentials>>() {}))); + WebhookOauthCredentials>>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -1363,7 +1363,7 @@ public CompletableFuture>> getWebhookO localVarThrowable == null ? CompletableFuture.completedFuture(localVarApiResponse) : CompletableFuture - .>> + .>> failedFuture( toApiFailure( localVarThrowable))) @@ -1373,7 +1373,7 @@ public CompletableFuture>> getWebhookO } } - private HttpRequest.Builder getWebhookOAuthsRequestBuilder() throws ApiException { + private HttpRequest.Builder getWebhookOauthsRequestBuilder() throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -1968,16 +1968,16 @@ private HttpRequest.Builder updateWebhookRequestBuilder( * `mtlsClientSignedCert` is a scalar rather than a map, so `null` there * does remove it. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. * - * @param updateWebhookOAuthRequest (required) + * @param updateWebhookOauthRequest (required) * @param webhookOauthId The unique identifier of the OAuth credentials (required) - * @return CompletableFuture<ApiResponse<WebhookOAuthCredentials>>, which completes + * @return CompletableFuture<ApiResponse<WebhookOauthCredentials>>, which completes * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> updateWebhookOAuth( - UpdateWebhookOAuthRequest updateWebhookOAuthRequest, UUID webhookOauthId) { + public CompletableFuture> updateWebhookOauth( + UpdateWebhookOauthRequest updateWebhookOauthRequest, UUID webhookOauthId) { try { HttpRequest.Builder localVarRequestBuilder = - updateWebhookOAuthRequestBuilder(updateWebhookOAuthRequest, webhookOauthId); + updateWebhookOauthRequestBuilder(updateWebhookOauthRequest, webhookOauthId); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -1988,12 +1988,12 @@ public CompletableFuture> updateWebhookOAut if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( - "updateWebhookOAuth", localVarResponse)); + "updateWebhookOauth", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -2001,7 +2001,7 @@ public CompletableFuture> updateWebhookOAut : memberVarObjectMapper.readValue( responseBody, new TypeReference< - WebhookOAuthCredentials>() {}))); + WebhookOauthCredentials>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -2011,7 +2011,7 @@ public CompletableFuture> updateWebhookOAut localVarThrowable == null ? CompletableFuture.completedFuture(localVarApiResponse) : CompletableFuture - .> + .> failedFuture( toApiFailure( localVarThrowable))) @@ -2021,13 +2021,13 @@ public CompletableFuture> updateWebhookOAut } } - private HttpRequest.Builder updateWebhookOAuthRequestBuilder( - UpdateWebhookOAuthRequest updateWebhookOAuthRequest, UUID webhookOauthId) + private HttpRequest.Builder updateWebhookOauthRequestBuilder( + UpdateWebhookOauthRequest updateWebhookOauthRequest, UUID webhookOauthId) throws ApiException { ValidationUtils.assertParamExists( - "updateWebhookOAuth", "updateWebhookOAuthRequest", updateWebhookOAuthRequest); + "updateWebhookOauth", "updateWebhookOauthRequest", updateWebhookOauthRequest); ValidationUtils.assertParamExistsAndNotEmpty( - "updateWebhookOAuth", "webhookOauthId", webhookOauthId.toString()); + "updateWebhookOauth", "webhookOauthId", webhookOauthId.toString()); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -2043,7 +2043,7 @@ private HttpRequest.Builder updateWebhookOAuthRequestBuilder( try { byte[] localVarPostBody = - memberVarObjectMapper.writeValueAsBytes(updateWebhookOAuthRequest); + memberVarObjectMapper.writeValueAsBytes(updateWebhookOauthRequest); localVarRequestBuilder.method( "PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { diff --git a/src/main/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateWebhookOauthRequest.java similarity index 88% rename from src/main/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequest.java rename to src/main/java/com/fireblocks/sdk/model/CreateWebhookOauthRequest.java index c24ae20b..05915809 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateWebhookOauthRequest.java @@ -29,20 +29,20 @@ * so rotating its client secret covers all of them at once. */ @JsonPropertyOrder({ - CreateWebhookOAuthRequest.JSON_PROPERTY_NAME, - CreateWebhookOAuthRequest.JSON_PROPERTY_CLIENT_ID, - CreateWebhookOAuthRequest.JSON_PROPERTY_CLIENT_SECRET, - CreateWebhookOAuthRequest.JSON_PROPERTY_URL, - CreateWebhookOAuthRequest.JSON_PROPERTY_AUTH_METHOD, - CreateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, - CreateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_BODY_PARAMS, - CreateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_HEADERS, - CreateWebhookOAuthRequest.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT + CreateWebhookOauthRequest.JSON_PROPERTY_NAME, + CreateWebhookOauthRequest.JSON_PROPERTY_CLIENT_ID, + CreateWebhookOauthRequest.JSON_PROPERTY_CLIENT_SECRET, + CreateWebhookOauthRequest.JSON_PROPERTY_URL, + CreateWebhookOauthRequest.JSON_PROPERTY_AUTH_METHOD, + CreateWebhookOauthRequest.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, + CreateWebhookOauthRequest.JSON_PROPERTY_CUSTOM_BODY_PARAMS, + CreateWebhookOauthRequest.JSON_PROPERTY_CUSTOM_HEADERS, + CreateWebhookOauthRequest.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class CreateWebhookOAuthRequest { +public class CreateWebhookOauthRequest { public static final String JSON_PROPERTY_NAME = "name"; @jakarta.annotation.Nonnull private String name; @@ -70,10 +70,10 @@ public class CreateWebhookOAuthRequest { public static final String JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT = "mtlsClientSignedCert"; @jakarta.annotation.Nullable private String mtlsClientSignedCert; - public CreateWebhookOAuthRequest() {} + public CreateWebhookOauthRequest() {} @JsonCreator - public CreateWebhookOAuthRequest( + public CreateWebhookOauthRequest( @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, @JsonProperty(value = JSON_PROPERTY_CLIENT_ID, required = true) String clientId, @JsonProperty(value = JSON_PROPERTY_CLIENT_SECRET, required = true) String clientSecret, @@ -84,7 +84,7 @@ public CreateWebhookOAuthRequest( this.url = url; } - public CreateWebhookOAuthRequest name(@jakarta.annotation.Nonnull String name) { + public CreateWebhookOauthRequest name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -107,7 +107,7 @@ public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public CreateWebhookOAuthRequest clientId(@jakarta.annotation.Nonnull String clientId) { + public CreateWebhookOauthRequest clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -130,7 +130,7 @@ public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public CreateWebhookOAuthRequest clientSecret(@jakarta.annotation.Nonnull String clientSecret) { + public CreateWebhookOauthRequest clientSecret(@jakarta.annotation.Nonnull String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -154,7 +154,7 @@ public void setClientSecret(@jakarta.annotation.Nonnull String clientSecret) { this.clientSecret = clientSecret; } - public CreateWebhookOAuthRequest url(@jakarta.annotation.Nonnull String url) { + public CreateWebhookOauthRequest url(@jakarta.annotation.Nonnull String url) { this.url = url; return this; } @@ -178,7 +178,7 @@ public void setUrl(@jakarta.annotation.Nonnull String url) { this.url = url; } - public CreateWebhookOAuthRequest authMethod(@jakarta.annotation.Nullable String authMethod) { + public CreateWebhookOauthRequest authMethod(@jakarta.annotation.Nullable String authMethod) { this.authMethod = authMethod; return this; } @@ -204,13 +204,13 @@ public void setAuthMethod(@jakarta.annotation.Nullable String authMethod) { this.authMethod = authMethod; } - public CreateWebhookOAuthRequest customJwtClaims( + public CreateWebhookOauthRequest customJwtClaims( @jakarta.annotation.Nullable Map customJwtClaims) { this.customJwtClaims = customJwtClaims; return this; } - public CreateWebhookOAuthRequest putCustomJwtClaimsItem( + public CreateWebhookOauthRequest putCustomJwtClaimsItem( String key, Object customJwtClaimsItem) { if (this.customJwtClaims == null) { this.customJwtClaims = new HashMap<>(); @@ -228,7 +228,7 @@ public CreateWebhookOAuthRequest putCustomJwtClaimsItem( * `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The * whole object must be under 16 KB. Values are write-only; responses return only the claim * names. On update this merges claim by claim rather than replacing — see - * `WebhookOAuthCustomJwtClaimsUpdate`. + * `WebhookOauthCustomJwtClaimsUpdate`. * * @return customJwtClaims */ @@ -246,13 +246,13 @@ public void setCustomJwtClaims( this.customJwtClaims = customJwtClaims; } - public CreateWebhookOAuthRequest customBodyParams( + public CreateWebhookOauthRequest customBodyParams( @jakarta.annotation.Nullable Map customBodyParams) { this.customBodyParams = customBodyParams; return this; } - public CreateWebhookOAuthRequest putCustomBodyParamsItem( + public CreateWebhookOauthRequest putCustomBodyParamsItem( String key, String customBodyParamsItem) { if (this.customBodyParams == null) { this.customBodyParams = new HashMap<>(); @@ -269,7 +269,7 @@ public CreateWebhookOAuthRequest putCustomBodyParamsItem( * `client_assertion` and `client_assertion_type` are set by Fireblocks and * cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values * are write-only; responses return only the parameter names. On update this merges key by key - * rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`. + * rather than replacing — see `WebhookOauthCustomBodyParamsUpdate`. * * @return customBodyParams */ @@ -287,13 +287,13 @@ public void setCustomBodyParams( this.customBodyParams = customBodyParams; } - public CreateWebhookOAuthRequest customHeaders( + public CreateWebhookOauthRequest customHeaders( @jakarta.annotation.Nullable Map customHeaders) { this.customHeaders = customHeaders; return this; } - public CreateWebhookOAuthRequest putCustomHeadersItem(String key, String customHeadersItem) { + public CreateWebhookOauthRequest putCustomHeadersItem(String key, String customHeadersItem) { if (this.customHeaders == null) { this.customHeaders = new HashMap<>(); } @@ -307,11 +307,12 @@ public CreateWebhookOAuthRequest putCustomHeadersItem(String key, String customH * the usual case. Applies to every authentication method. Values must be strings; an empty * string is allowed. Names are matched case-insensitively, so two names differing only in case * are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes - * back as `x-api-key`. `Content-Type`, `Authorization`, - * `Content-Length` and `Host` are set by Fireblocks and cannot be - * overridden. The whole object must be under 16 KB. Values are write-only; responses return - * only the header names. On update this merges name by name rather than replacing — see - * `WebhookOAuthCustomHeadersUpdate`. + * back as `x-api-key`. `Content-Type`, `Content-Length` and + * `Host` are set by Fireblocks and cannot be overridden. `Authorization` is + * not sent when `authMethod` is `client_secret_basic`. Values have no + * length limit of their own; the whole object must be under 16 KB when serialized as UTF-8. + * Values are write-only; responses return only the header names. On update this merges name by + * name rather than replacing — see `WebhookOauthCustomHeadersUpdate`. * * @return customHeaders */ @@ -328,7 +329,7 @@ public void setCustomHeaders(@jakarta.annotation.Nullable Map cu this.customHeaders = customHeaders; } - public CreateWebhookOAuthRequest mtlsClientSignedCert( + public CreateWebhookOauthRequest mtlsClientSignedCert( @jakarta.annotation.Nullable String mtlsClientSignedCert) { this.mtlsClientSignedCert = mtlsClientSignedCert; return this; @@ -353,7 +354,7 @@ public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClie this.mtlsClientSignedCert = mtlsClientSignedCert; } - /** Return true if this CreateWebhookOAuthRequest object is equal to o. */ + /** Return true if this CreateWebhookOauthRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -362,17 +363,17 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateWebhookOAuthRequest createWebhookOAuthRequest = (CreateWebhookOAuthRequest) o; - return Objects.equals(this.name, createWebhookOAuthRequest.name) - && Objects.equals(this.clientId, createWebhookOAuthRequest.clientId) - && Objects.equals(this.clientSecret, createWebhookOAuthRequest.clientSecret) - && Objects.equals(this.url, createWebhookOAuthRequest.url) - && Objects.equals(this.authMethod, createWebhookOAuthRequest.authMethod) - && Objects.equals(this.customJwtClaims, createWebhookOAuthRequest.customJwtClaims) - && Objects.equals(this.customBodyParams, createWebhookOAuthRequest.customBodyParams) - && Objects.equals(this.customHeaders, createWebhookOAuthRequest.customHeaders) + CreateWebhookOauthRequest createWebhookOauthRequest = (CreateWebhookOauthRequest) o; + return Objects.equals(this.name, createWebhookOauthRequest.name) + && Objects.equals(this.clientId, createWebhookOauthRequest.clientId) + && Objects.equals(this.clientSecret, createWebhookOauthRequest.clientSecret) + && Objects.equals(this.url, createWebhookOauthRequest.url) + && Objects.equals(this.authMethod, createWebhookOauthRequest.authMethod) + && Objects.equals(this.customJwtClaims, createWebhookOauthRequest.customJwtClaims) + && Objects.equals(this.customBodyParams, createWebhookOauthRequest.customBodyParams) + && Objects.equals(this.customHeaders, createWebhookOauthRequest.customHeaders) && Objects.equals( - this.mtlsClientSignedCert, createWebhookOAuthRequest.mtlsClientSignedCert); + this.mtlsClientSignedCert, createWebhookOauthRequest.mtlsClientSignedCert); } @Override @@ -392,7 +393,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateWebhookOAuthRequest {\n"); + sb.append("class CreateWebhookOauthRequest {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java index a95ca900..54f7ae7d 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java @@ -24,6 +24,7 @@ import java.util.Map; import java.util.Objects; import java.util.StringJoiner; +import java.util.UUID; /** CreateWebhookRequest */ @JsonPropertyOrder({ @@ -32,7 +33,7 @@ CreateWebhookRequest.JSON_PROPERTY_EVENTS, CreateWebhookRequest.JSON_PROPERTY_ENABLED, CreateWebhookRequest.JSON_PROPERTY_MTLS, - CreateWebhookRequest.JSON_PROPERTY_OAUTH, + CreateWebhookRequest.JSON_PROPERTY_WEBHOOK_OAUTH_ID, CreateWebhookRequest.JSON_PROPERTY_CUSTOM_HEADERS }) @jakarta.annotation.Generated( @@ -54,8 +55,8 @@ public class CreateWebhookRequest { public static final String JSON_PROPERTY_MTLS = "mtls"; @jakarta.annotation.Nullable private WebhookMtls mtls; - public static final String JSON_PROPERTY_OAUTH = "oauth"; - @jakarta.annotation.Nullable private WebhookOAuth oauth; + public static final String JSON_PROPERTY_WEBHOOK_OAUTH_ID = "webhookOauthId"; + @jakarta.annotation.Nullable private UUID webhookOauthId; public static final String JSON_PROPERTY_CUSTOM_HEADERS = "customHeaders"; @jakarta.annotation.Nullable private Map customHeaders; @@ -194,27 +195,30 @@ public void setMtls(@jakarta.annotation.Nullable WebhookMtls mtls) { this.mtls = mtls; } - public CreateWebhookRequest oauth(@jakarta.annotation.Nullable WebhookOAuth oauth) { - this.oauth = oauth; + public CreateWebhookRequest webhookOauthId(@jakarta.annotation.Nullable UUID webhookOauthId) { + this.webhookOauthId = webhookOauthId; return this; } /** - * Get oauth + * The id of the OAuth credentials this webhook authenticates with, from + * `/v1/webhooks_settings/oauth`. Several webhooks may share one credential set, so + * rotating its client secret covers all of them at once. Send `null` to stop using + * OAuth for this webhook. * - * @return oauth + * @return webhookOauthId */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OAUTH) + @JsonProperty(JSON_PROPERTY_WEBHOOK_OAUTH_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WebhookOAuth getOauth() { - return oauth; + public UUID getWebhookOauthId() { + return webhookOauthId; } - @JsonProperty(JSON_PROPERTY_OAUTH) + @JsonProperty(JSON_PROPERTY_WEBHOOK_OAUTH_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(@jakarta.annotation.Nullable WebhookOAuth oauth) { - this.oauth = oauth; + public void setWebhookOauthId(@jakarta.annotation.Nullable UUID webhookOauthId) { + this.webhookOauthId = webhookOauthId; } public CreateWebhookRequest customHeaders( @@ -237,14 +241,15 @@ public CreateWebhookRequest putCustomHeadersItem(String key, Object customHeader * under the same name. `Cookie` accepts only a string. An empty array is rejected — * leave the name out instead. At most 10 header lines in total, counted per array element * rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are - * at most 128 characters. Values are at most 1024 characters and may be empty. Reserved names: - * `Host`, `Content-Type`, `Content-Length`, + * at most 128 characters. A value may be empty and has no length limit of its own; the whole + * object must be under 16 KB when serialized as UTF-8. A value that large may still be refused + * by your own endpoint, since web servers commonly cap the whole request header block at around + * 8 KB. Reserved names: `Host`, `Content-Type`, `Content-Length`, * `Transfer-Encoding`, `Connection`, `User-Agent`, * `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, - * `Fireblocks-Webhook-Signature`, `Authorization`. - * `Authorization` is reserved whether or not this webhook has OAuth credentials - * attached, because Fireblocks sets it once it does. Values are write-only; responses return - * only the header names. + * `Fireblocks-Webhook-Signature`. When this webhook has OAuth credentials attached, + * an `Authorization` value you set and the bearer token are both sent as separate + * header lines. Values are write-only; responses return only the header names. * * @return customHeaders */ @@ -276,13 +281,13 @@ public boolean equals(Object o) { && Objects.equals(this.events, createWebhookRequest.events) && Objects.equals(this.enabled, createWebhookRequest.enabled) && Objects.equals(this.mtls, createWebhookRequest.mtls) - && Objects.equals(this.oauth, createWebhookRequest.oauth) + && Objects.equals(this.webhookOauthId, createWebhookRequest.webhookOauthId) && Objects.equals(this.customHeaders, createWebhookRequest.customHeaders); } @Override public int hashCode() { - return Objects.hash(url, description, events, enabled, mtls, oauth, customHeaders); + return Objects.hash(url, description, events, enabled, mtls, webhookOauthId, customHeaders); } @Override @@ -294,7 +299,7 @@ public String toString() { sb.append(" events: ").append(toIndentedString(events)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" mtls: ").append(toIndentedString(mtls)).append("\n"); - sb.append(" oauth: ").append(toIndentedString(oauth)).append("\n"); + sb.append(" webhookOauthId: ").append(toIndentedString(webhookOauthId)).append("\n"); sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); sb.append("}"); return sb.toString(); @@ -397,9 +402,14 @@ public String toUrlQueryString(String prefix) { joiner.add(getMtls().toUrlQueryString(prefix + "mtls" + suffix)); } - // add `oauth` to the URL query string - if (getOauth() != null) { - joiner.add(getOauth().toUrlQueryString(prefix + "oauth" + suffix)); + // add `webhookOauthId` to the URL query string + if (getWebhookOauthId() != null) { + joiner.add( + String.format( + "%swebhookOauthId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getWebhookOauthId())))); } // add `customHeaders` to the URL query string diff --git a/src/main/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponse.java b/src/main/java/com/fireblocks/sdk/model/DeleteWebhookOauthResponse.java similarity index 90% rename from src/main/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponse.java rename to src/main/java/com/fireblocks/sdk/model/DeleteWebhookOauthResponse.java index 41a34cc0..3506aa56 100644 --- a/src/main/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/DeleteWebhookOauthResponse.java @@ -30,23 +30,23 @@ * with `409` while anything still references the credentials. */ @JsonPropertyOrder({ - DeleteWebhookOAuthResponse.JSON_PROPERTY_ID, - DeleteWebhookOAuthResponse.JSON_PROPERTY_NAME, - DeleteWebhookOAuthResponse.JSON_PROPERTY_CLIENT_ID, - DeleteWebhookOAuthResponse.JSON_PROPERTY_URL, - DeleteWebhookOAuthResponse.JSON_PROPERTY_AUTH_METHOD, - DeleteWebhookOAuthResponse.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, - DeleteWebhookOAuthResponse.JSON_PROPERTY_CUSTOM_BODY_PARAMS, - DeleteWebhookOAuthResponse.JSON_PROPERTY_CUSTOM_HEADERS, - DeleteWebhookOAuthResponse.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT, - DeleteWebhookOAuthResponse.JSON_PROPERTY_CREATED_AT, - DeleteWebhookOAuthResponse.JSON_PROPERTY_UPDATED_AT, - DeleteWebhookOAuthResponse.JSON_PROPERTY_DETACHED_WEBHOOK_IDS + DeleteWebhookOauthResponse.JSON_PROPERTY_ID, + DeleteWebhookOauthResponse.JSON_PROPERTY_NAME, + DeleteWebhookOauthResponse.JSON_PROPERTY_CLIENT_ID, + DeleteWebhookOauthResponse.JSON_PROPERTY_URL, + DeleteWebhookOauthResponse.JSON_PROPERTY_AUTH_METHOD, + DeleteWebhookOauthResponse.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, + DeleteWebhookOauthResponse.JSON_PROPERTY_CUSTOM_BODY_PARAMS, + DeleteWebhookOauthResponse.JSON_PROPERTY_CUSTOM_HEADERS, + DeleteWebhookOauthResponse.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT, + DeleteWebhookOauthResponse.JSON_PROPERTY_CREATED_AT, + DeleteWebhookOauthResponse.JSON_PROPERTY_UPDATED_AT, + DeleteWebhookOauthResponse.JSON_PROPERTY_DETACHED_WEBHOOK_IDS }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class DeleteWebhookOAuthResponse { +public class DeleteWebhookOauthResponse { public static final String JSON_PROPERTY_ID = "id"; @jakarta.annotation.Nonnull private UUID id; @@ -83,10 +83,10 @@ public class DeleteWebhookOAuthResponse { public static final String JSON_PROPERTY_DETACHED_WEBHOOK_IDS = "detachedWebhookIds"; @jakarta.annotation.Nonnull private List detachedWebhookIds; - public DeleteWebhookOAuthResponse() {} + public DeleteWebhookOauthResponse() {} @JsonCreator - public DeleteWebhookOAuthResponse( + public DeleteWebhookOauthResponse( @JsonProperty(value = JSON_PROPERTY_ID, required = true) UUID id, @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, @JsonProperty(value = JSON_PROPERTY_CLIENT_ID, required = true) String clientId, @@ -106,7 +106,7 @@ public DeleteWebhookOAuthResponse( this.detachedWebhookIds = detachedWebhookIds; } - public DeleteWebhookOAuthResponse id(@jakarta.annotation.Nonnull UUID id) { + public DeleteWebhookOauthResponse id(@jakarta.annotation.Nonnull UUID id) { this.id = id; return this; } @@ -130,7 +130,7 @@ public void setId(@jakarta.annotation.Nonnull UUID id) { this.id = id; } - public DeleteWebhookOAuthResponse name(@jakarta.annotation.Nonnull String name) { + public DeleteWebhookOauthResponse name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -153,7 +153,7 @@ public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public DeleteWebhookOAuthResponse clientId(@jakarta.annotation.Nonnull String clientId) { + public DeleteWebhookOauthResponse clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -176,7 +176,7 @@ public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public DeleteWebhookOAuthResponse url(@jakarta.annotation.Nonnull String url) { + public DeleteWebhookOauthResponse url(@jakarta.annotation.Nonnull String url) { this.url = url; return this; } @@ -199,7 +199,7 @@ public void setUrl(@jakarta.annotation.Nonnull String url) { this.url = url; } - public DeleteWebhookOAuthResponse authMethod(@jakarta.annotation.Nonnull String authMethod) { + public DeleteWebhookOauthResponse authMethod(@jakarta.annotation.Nonnull String authMethod) { this.authMethod = authMethod; return this; } @@ -225,13 +225,13 @@ public void setAuthMethod(@jakarta.annotation.Nonnull String authMethod) { this.authMethod = authMethod; } - public DeleteWebhookOAuthResponse customJwtClaims( + public DeleteWebhookOauthResponse customJwtClaims( @jakarta.annotation.Nullable List customJwtClaims) { this.customJwtClaims = customJwtClaims; return this; } - public DeleteWebhookOAuthResponse addCustomJwtClaimsItem(String customJwtClaimsItem) { + public DeleteWebhookOauthResponse addCustomJwtClaimsItem(String customJwtClaimsItem) { if (this.customJwtClaims == null) { this.customJwtClaims = new ArrayList<>(); } @@ -258,13 +258,13 @@ public void setCustomJwtClaims(@jakarta.annotation.Nullable List customJ this.customJwtClaims = customJwtClaims; } - public DeleteWebhookOAuthResponse customBodyParams( + public DeleteWebhookOauthResponse customBodyParams( @jakarta.annotation.Nullable List customBodyParams) { this.customBodyParams = customBodyParams; return this; } - public DeleteWebhookOAuthResponse addCustomBodyParamsItem(String customBodyParamsItem) { + public DeleteWebhookOauthResponse addCustomBodyParamsItem(String customBodyParamsItem) { if (this.customBodyParams == null) { this.customBodyParams = new ArrayList<>(); } @@ -291,13 +291,13 @@ public void setCustomBodyParams(@jakarta.annotation.Nullable List custom this.customBodyParams = customBodyParams; } - public DeleteWebhookOAuthResponse customHeaders( + public DeleteWebhookOauthResponse customHeaders( @jakarta.annotation.Nullable List customHeaders) { this.customHeaders = customHeaders; return this; } - public DeleteWebhookOAuthResponse addCustomHeadersItem(String customHeadersItem) { + public DeleteWebhookOauthResponse addCustomHeadersItem(String customHeadersItem) { if (this.customHeaders == null) { this.customHeaders = new ArrayList<>(); } @@ -326,7 +326,7 @@ public void setCustomHeaders(@jakarta.annotation.Nullable List customHea this.customHeaders = customHeaders; } - public DeleteWebhookOAuthResponse mtlsClientSignedCert( + public DeleteWebhookOauthResponse mtlsClientSignedCert( @jakarta.annotation.Nullable String mtlsClientSignedCert) { this.mtlsClientSignedCert = mtlsClientSignedCert; return this; @@ -350,7 +350,7 @@ public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClie this.mtlsClientSignedCert = mtlsClientSignedCert; } - public DeleteWebhookOAuthResponse createdAt(@jakarta.annotation.Nonnull Long createdAt) { + public DeleteWebhookOauthResponse createdAt(@jakarta.annotation.Nonnull Long createdAt) { this.createdAt = createdAt; return this; } @@ -373,7 +373,7 @@ public void setCreatedAt(@jakarta.annotation.Nonnull Long createdAt) { this.createdAt = createdAt; } - public DeleteWebhookOAuthResponse updatedAt(@jakarta.annotation.Nonnull Long updatedAt) { + public DeleteWebhookOauthResponse updatedAt(@jakarta.annotation.Nonnull Long updatedAt) { this.updatedAt = updatedAt; return this; } @@ -396,13 +396,13 @@ public void setUpdatedAt(@jakarta.annotation.Nonnull Long updatedAt) { this.updatedAt = updatedAt; } - public DeleteWebhookOAuthResponse detachedWebhookIds( + public DeleteWebhookOauthResponse detachedWebhookIds( @jakarta.annotation.Nonnull List detachedWebhookIds) { this.detachedWebhookIds = detachedWebhookIds; return this; } - public DeleteWebhookOAuthResponse addDetachedWebhookIdsItem(UUID detachedWebhookIdsItem) { + public DeleteWebhookOauthResponse addDetachedWebhookIdsItem(UUID detachedWebhookIdsItem) { if (this.detachedWebhookIds == null) { this.detachedWebhookIds = new ArrayList<>(); } @@ -430,7 +430,7 @@ public void setDetachedWebhookIds(@jakarta.annotation.Nonnull List detache this.detachedWebhookIds = detachedWebhookIds; } - /** Return true if this DeleteWebhookOAuthResponse object is equal to o. */ + /** Return true if this DeleteWebhookOauthResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -439,22 +439,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeleteWebhookOAuthResponse deleteWebhookOAuthResponse = (DeleteWebhookOAuthResponse) o; - return Objects.equals(this.id, deleteWebhookOAuthResponse.id) - && Objects.equals(this.name, deleteWebhookOAuthResponse.name) - && Objects.equals(this.clientId, deleteWebhookOAuthResponse.clientId) - && Objects.equals(this.url, deleteWebhookOAuthResponse.url) - && Objects.equals(this.authMethod, deleteWebhookOAuthResponse.authMethod) - && Objects.equals(this.customJwtClaims, deleteWebhookOAuthResponse.customJwtClaims) + DeleteWebhookOauthResponse deleteWebhookOauthResponse = (DeleteWebhookOauthResponse) o; + return Objects.equals(this.id, deleteWebhookOauthResponse.id) + && Objects.equals(this.name, deleteWebhookOauthResponse.name) + && Objects.equals(this.clientId, deleteWebhookOauthResponse.clientId) + && Objects.equals(this.url, deleteWebhookOauthResponse.url) + && Objects.equals(this.authMethod, deleteWebhookOauthResponse.authMethod) + && Objects.equals(this.customJwtClaims, deleteWebhookOauthResponse.customJwtClaims) && Objects.equals( - this.customBodyParams, deleteWebhookOAuthResponse.customBodyParams) - && Objects.equals(this.customHeaders, deleteWebhookOAuthResponse.customHeaders) + this.customBodyParams, deleteWebhookOauthResponse.customBodyParams) + && Objects.equals(this.customHeaders, deleteWebhookOauthResponse.customHeaders) && Objects.equals( - this.mtlsClientSignedCert, deleteWebhookOAuthResponse.mtlsClientSignedCert) - && Objects.equals(this.createdAt, deleteWebhookOAuthResponse.createdAt) - && Objects.equals(this.updatedAt, deleteWebhookOAuthResponse.updatedAt) + this.mtlsClientSignedCert, deleteWebhookOauthResponse.mtlsClientSignedCert) + && Objects.equals(this.createdAt, deleteWebhookOauthResponse.createdAt) + && Objects.equals(this.updatedAt, deleteWebhookOauthResponse.updatedAt) && Objects.equals( - this.detachedWebhookIds, deleteWebhookOAuthResponse.detachedWebhookIds); + this.detachedWebhookIds, deleteWebhookOauthResponse.detachedWebhookIds); } @Override @@ -477,7 +477,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DeleteWebhookOAuthResponse {\n"); + sb.append("class DeleteWebhookOauthResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/FiatAccountType.java b/src/main/java/com/fireblocks/sdk/model/FiatAccountType.java index cef49718..611ede3f 100644 --- a/src/main/java/com/fireblocks/sdk/model/FiatAccountType.java +++ b/src/main/java/com/fireblocks/sdk/model/FiatAccountType.java @@ -16,9 +16,59 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Gets or Sets FiatAccountType */ +/** + * OTHER indicates the underlying provider isn't representable by this API version's enum + * (e.g. a newly onboarded provider, or one removed from this list) — it does not identify a + * specific provider, so it should not be used to key any client-side logic. + */ public enum FiatAccountType { - BLINC("BLINC"); + BLINC("BLINC"), + + BLINC_TEST("BLINC_TEST"), + + CROSSRIVER("CROSSRIVER"), + + CROSSRIVER_TEST("CROSSRIVER_TEST"), + + CUSTOMERSBANK("CUSTOMERSBANK"), + + CUSTOMERSBANK_TEST("CUSTOMERSBANK_TEST"), + + FIFTHTHIRD("FIFTHTHIRD"), + + FIFTHTHIRD_TEST("FIFTHTHIRD_TEST"), + + KINGDOM_BANK("KINGDOM_BANK"), + + KINGDOM_BANK_TESTNET("KINGDOM_BANK_TESTNET"), + + LYNQ("LYNQ"), + + LYNQ_DEV("LYNQ_DEV"), + + LYNQ_QA("LYNQ_QA"), + + LYNQ_UAT("LYNQ_UAT"), + + N3_XT("N3XT"), + + N3_XT_ALPHA("N3XT_ALPHA"), + + N3_XT_BETA("N3XT_BETA"), + + N3_XT_OMEGA("N3XT_OMEGA"), + + SYGNUM_CONNECT("SYGNUM_CONNECT"), + + SYGNUM_CONNECT_STAGING("SYGNUM_CONNECT_STAGING"), + + TRANSFERO("TRANSFERO"), + + TRANSFERO_STAGING("TRANSFERO_STAGING"), + + ZENUS_DEV("ZENUS_DEV"), + + OTHER("OTHER"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsRequest.java new file mode 100644 index 00000000..51d2de5e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsRequest.java @@ -0,0 +1,194 @@ +/* + * 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. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Arrays; +import java.util.Objects; +import java.util.StringJoiner; + +/** UpdateConnectedAccountCredentialsRequest */ +@JsonPropertyOrder({ + UpdateConnectedAccountCredentialsRequest.JSON_PROPERTY_CREDS, + UpdateConnectedAccountCredentialsRequest.JSON_PROPERTY_API_KEY +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class UpdateConnectedAccountCredentialsRequest { + public static final String JSON_PROPERTY_CREDS = "creds"; + @jakarta.annotation.Nonnull private byte[] creds; + + public static final String JSON_PROPERTY_API_KEY = "apiKey"; + @jakarta.annotation.Nonnull private String apiKey; + + public UpdateConnectedAccountCredentialsRequest() {} + + @JsonCreator + public UpdateConnectedAccountCredentialsRequest( + @JsonProperty(value = JSON_PROPERTY_CREDS, required = true) byte[] creds, + @JsonProperty(value = JSON_PROPERTY_API_KEY, required = true) String apiKey) { + this.creds = creds; + this.apiKey = apiKey; + } + + public UpdateConnectedAccountCredentialsRequest creds( + @jakarta.annotation.Nonnull byte[] creds) { + this.creds = creds; + return this; + } + + /** + * Base64-encoded RSA-encrypted credential blob (the new secret). Encrypt using the public key + * from GET /connected_accounts/credentials/public_key. + * + * @return creds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public byte[] getCreds() { + return creds; + } + + @JsonProperty(JSON_PROPERTY_CREDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreds(@jakarta.annotation.Nonnull byte[] creds) { + this.creds = creds; + } + + public UpdateConnectedAccountCredentialsRequest apiKey( + @jakarta.annotation.Nonnull String apiKey) { + this.apiKey = apiKey; + return this; + } + + /** + * The new account-level API key. Mandatory for credential update. + * + * @return apiKey + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getApiKey() { + return apiKey; + } + + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setApiKey(@jakarta.annotation.Nonnull String apiKey) { + this.apiKey = apiKey; + } + + /** Return true if this UpdateConnectedAccountCredentialsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectedAccountCredentialsRequest updateConnectedAccountCredentialsRequest = + (UpdateConnectedAccountCredentialsRequest) o; + return Arrays.equals(this.creds, updateConnectedAccountCredentialsRequest.creds) + && Objects.equals(this.apiKey, updateConnectedAccountCredentialsRequest.apiKey); + } + + @Override + public int hashCode() { + return Objects.hash(Arrays.hashCode(creds), apiKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectedAccountCredentialsRequest {\n"); + sb.append(" creds: ").append(toIndentedString(creds)).append("\n"); + sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `creds` to the URL query string + if (getCreds() != null) { + joiner.add( + String.format( + "%screds%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCreds())))); + } + + // add `apiKey` to the URL query string + if (getApiKey() != null) { + joiner.add( + String.format( + "%sapiKey%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getApiKey())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsResponse.java b/src/main/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsResponse.java new file mode 100644 index 00000000..67289709 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsResponse.java @@ -0,0 +1,173 @@ +/* + * 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. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** UpdateConnectedAccountCredentialsResponse */ +@JsonPropertyOrder({UpdateConnectedAccountCredentialsResponse.JSON_PROPERTY_ACCOUNTS}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class UpdateConnectedAccountCredentialsResponse { + public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + @jakarta.annotation.Nonnull private List accounts; + + public UpdateConnectedAccountCredentialsResponse() {} + + @JsonCreator + public UpdateConnectedAccountCredentialsResponse( + @JsonProperty(value = JSON_PROPERTY_ACCOUNTS, required = true) + List accounts) { + this.accounts = accounts; + } + + public UpdateConnectedAccountCredentialsResponse accounts( + @jakarta.annotation.Nonnull List accounts) { + this.accounts = accounts; + return this; + } + + public UpdateConnectedAccountCredentialsResponse addAccountsItem( + AddedConnectedAccountItem accountsItem) { + if (this.accounts == null) { + this.accounts = new ArrayList<>(); + } + this.accounts.add(accountsItem); + return this; + } + + /** + * The account whose credentials are pending update (status WAITING_FOR_APPROVAL). Old + * credentials stay live until the change is approved. + * + * @return accounts + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAccounts() { + return accounts; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccounts(@jakarta.annotation.Nonnull List accounts) { + this.accounts = accounts; + } + + /** Return true if this UpdateConnectedAccountCredentialsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectedAccountCredentialsResponse updateConnectedAccountCredentialsResponse = + (UpdateConnectedAccountCredentialsResponse) o; + return Objects.equals(this.accounts, updateConnectedAccountCredentialsResponse.accounts); + } + + @Override + public int hashCode() { + return Objects.hash(accounts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectedAccountCredentialsResponse {\n"); + sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accounts` to the URL query string + if (getAccounts() != null) { + for (int i = 0; i < getAccounts().size(); i++) { + if (getAccounts().get(i) != null) { + joiner.add( + getAccounts() + .get(i) + .toUrlQueryString( + String.format( + "%saccounts%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookOauthRequest.java similarity index 91% rename from src/main/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequest.java rename to src/main/java/com/fireblocks/sdk/model/UpdateWebhookOauthRequest.java index 29995bad..8fc10a4e 100644 --- a/src/main/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookOauthRequest.java @@ -33,20 +33,20 @@ * `mtlsClientSignedCert` is a scalar, so `null` there does remove it. */ @JsonPropertyOrder({ - UpdateWebhookOAuthRequest.JSON_PROPERTY_NAME, - UpdateWebhookOAuthRequest.JSON_PROPERTY_CLIENT_ID, - UpdateWebhookOAuthRequest.JSON_PROPERTY_CLIENT_SECRET, - UpdateWebhookOAuthRequest.JSON_PROPERTY_URL, - UpdateWebhookOAuthRequest.JSON_PROPERTY_AUTH_METHOD, - UpdateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, - UpdateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_BODY_PARAMS, - UpdateWebhookOAuthRequest.JSON_PROPERTY_CUSTOM_HEADERS, - UpdateWebhookOAuthRequest.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT + UpdateWebhookOauthRequest.JSON_PROPERTY_NAME, + UpdateWebhookOauthRequest.JSON_PROPERTY_CLIENT_ID, + UpdateWebhookOauthRequest.JSON_PROPERTY_CLIENT_SECRET, + UpdateWebhookOauthRequest.JSON_PROPERTY_URL, + UpdateWebhookOauthRequest.JSON_PROPERTY_AUTH_METHOD, + UpdateWebhookOauthRequest.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, + UpdateWebhookOauthRequest.JSON_PROPERTY_CUSTOM_BODY_PARAMS, + UpdateWebhookOauthRequest.JSON_PROPERTY_CUSTOM_HEADERS, + UpdateWebhookOauthRequest.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class UpdateWebhookOAuthRequest { +public class UpdateWebhookOauthRequest { public static final String JSON_PROPERTY_NAME = "name"; @jakarta.annotation.Nullable private String name; @@ -74,9 +74,9 @@ public class UpdateWebhookOAuthRequest { public static final String JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT = "mtlsClientSignedCert"; @jakarta.annotation.Nullable private String mtlsClientSignedCert; - public UpdateWebhookOAuthRequest() {} + public UpdateWebhookOauthRequest() {} - public UpdateWebhookOAuthRequest name(@jakarta.annotation.Nullable String name) { + public UpdateWebhookOauthRequest name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -99,7 +99,7 @@ public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public UpdateWebhookOAuthRequest clientId(@jakarta.annotation.Nullable String clientId) { + public UpdateWebhookOauthRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -122,7 +122,7 @@ public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public UpdateWebhookOAuthRequest clientSecret( + public UpdateWebhookOauthRequest clientSecret( @jakarta.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; return this; @@ -149,7 +149,7 @@ public void setClientSecret(@jakarta.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; } - public UpdateWebhookOAuthRequest url(@jakarta.annotation.Nullable String url) { + public UpdateWebhookOauthRequest url(@jakarta.annotation.Nullable String url) { this.url = url; return this; } @@ -173,7 +173,7 @@ public void setUrl(@jakarta.annotation.Nullable String url) { this.url = url; } - public UpdateWebhookOAuthRequest authMethod(@jakarta.annotation.Nullable String authMethod) { + public UpdateWebhookOauthRequest authMethod(@jakarta.annotation.Nullable String authMethod) { this.authMethod = authMethod; return this; } @@ -198,13 +198,13 @@ public void setAuthMethod(@jakarta.annotation.Nullable String authMethod) { this.authMethod = authMethod; } - public UpdateWebhookOAuthRequest customJwtClaims( + public UpdateWebhookOauthRequest customJwtClaims( @jakarta.annotation.Nullable Map customJwtClaims) { this.customJwtClaims = customJwtClaims; return this; } - public UpdateWebhookOAuthRequest putCustomJwtClaimsItem( + public UpdateWebhookOauthRequest putCustomJwtClaimsItem( String key, Object customJwtClaimsItem) { if (this.customJwtClaims == null) { this.customJwtClaims = new HashMap<>(); @@ -240,13 +240,13 @@ public void setCustomJwtClaims( this.customJwtClaims = customJwtClaims; } - public UpdateWebhookOAuthRequest customBodyParams( + public UpdateWebhookOauthRequest customBodyParams( @jakarta.annotation.Nullable Map customBodyParams) { this.customBodyParams = customBodyParams; return this; } - public UpdateWebhookOAuthRequest putCustomBodyParamsItem( + public UpdateWebhookOauthRequest putCustomBodyParamsItem( String key, String customBodyParamsItem) { if (this.customBodyParams == null) { this.customBodyParams = new HashMap<>(); @@ -283,13 +283,13 @@ public void setCustomBodyParams( this.customBodyParams = customBodyParams; } - public UpdateWebhookOAuthRequest customHeaders( + public UpdateWebhookOauthRequest customHeaders( @jakarta.annotation.Nullable Map customHeaders) { this.customHeaders = customHeaders; return this; } - public UpdateWebhookOAuthRequest putCustomHeadersItem(String key, String customHeadersItem) { + public UpdateWebhookOauthRequest putCustomHeadersItem(String key, String customHeadersItem) { if (this.customHeaders == null) { this.customHeaders = new HashMap<>(); } @@ -307,9 +307,8 @@ public UpdateWebhookOAuthRequest putCustomHeadersItem(String key, String customH * names the header to delete, the other names the whole field. Names are case-insensitive, so a * `null` under one casing deletes a header stored under another, and names are stored * and returned lowercased. Same rules as on create: string values only, - * `Content-Type`/`Authorization`/ - * `Content-Length`/`Host` reserved, resulting set under 16 KB, values - * write-only. + * `Content-Type`/`Content-Length`/`Host` reserved, resulting set + * under 16 KB, values write-only. * * @return customHeaders */ @@ -326,7 +325,7 @@ public void setCustomHeaders(@jakarta.annotation.Nullable Map cu this.customHeaders = customHeaders; } - public UpdateWebhookOAuthRequest mtlsClientSignedCert( + public UpdateWebhookOauthRequest mtlsClientSignedCert( @jakarta.annotation.Nullable String mtlsClientSignedCert) { this.mtlsClientSignedCert = mtlsClientSignedCert; return this; @@ -351,7 +350,7 @@ public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClie this.mtlsClientSignedCert = mtlsClientSignedCert; } - /** Return true if this UpdateWebhookOAuthRequest object is equal to o. */ + /** Return true if this UpdateWebhookOauthRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -360,17 +359,17 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UpdateWebhookOAuthRequest updateWebhookOAuthRequest = (UpdateWebhookOAuthRequest) o; - return Objects.equals(this.name, updateWebhookOAuthRequest.name) - && Objects.equals(this.clientId, updateWebhookOAuthRequest.clientId) - && Objects.equals(this.clientSecret, updateWebhookOAuthRequest.clientSecret) - && Objects.equals(this.url, updateWebhookOAuthRequest.url) - && Objects.equals(this.authMethod, updateWebhookOAuthRequest.authMethod) - && Objects.equals(this.customJwtClaims, updateWebhookOAuthRequest.customJwtClaims) - && Objects.equals(this.customBodyParams, updateWebhookOAuthRequest.customBodyParams) - && Objects.equals(this.customHeaders, updateWebhookOAuthRequest.customHeaders) + UpdateWebhookOauthRequest updateWebhookOauthRequest = (UpdateWebhookOauthRequest) o; + return Objects.equals(this.name, updateWebhookOauthRequest.name) + && Objects.equals(this.clientId, updateWebhookOauthRequest.clientId) + && Objects.equals(this.clientSecret, updateWebhookOauthRequest.clientSecret) + && Objects.equals(this.url, updateWebhookOauthRequest.url) + && Objects.equals(this.authMethod, updateWebhookOauthRequest.authMethod) + && Objects.equals(this.customJwtClaims, updateWebhookOauthRequest.customJwtClaims) + && Objects.equals(this.customBodyParams, updateWebhookOauthRequest.customBodyParams) + && Objects.equals(this.customHeaders, updateWebhookOauthRequest.customHeaders) && Objects.equals( - this.mtlsClientSignedCert, updateWebhookOAuthRequest.mtlsClientSignedCert); + this.mtlsClientSignedCert, updateWebhookOauthRequest.mtlsClientSignedCert); } @Override @@ -390,7 +389,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class UpdateWebhookOAuthRequest {\n"); + sb.append("class UpdateWebhookOauthRequest {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java index be9e1773..5046a639 100644 --- a/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java @@ -23,6 +23,7 @@ import java.util.Map; import java.util.Objects; import java.util.StringJoiner; +import java.util.UUID; /** UpdateWebhookRequest */ @JsonPropertyOrder({ @@ -31,7 +32,7 @@ UpdateWebhookRequest.JSON_PROPERTY_EVENTS, UpdateWebhookRequest.JSON_PROPERTY_ENABLED, UpdateWebhookRequest.JSON_PROPERTY_MTLS, - UpdateWebhookRequest.JSON_PROPERTY_OAUTH, + UpdateWebhookRequest.JSON_PROPERTY_WEBHOOK_OAUTH_ID, UpdateWebhookRequest.JSON_PROPERTY_CUSTOM_HEADERS }) @jakarta.annotation.Generated( @@ -53,8 +54,8 @@ public class UpdateWebhookRequest { public static final String JSON_PROPERTY_MTLS = "mtls"; @jakarta.annotation.Nullable private WebhookMtls mtls; - public static final String JSON_PROPERTY_OAUTH = "oauth"; - @jakarta.annotation.Nullable private WebhookOAuth oauth; + public static final String JSON_PROPERTY_WEBHOOK_OAUTH_ID = "webhookOauthId"; + @jakarta.annotation.Nullable private UUID webhookOauthId; public static final String JSON_PROPERTY_CUSTOM_HEADERS = "customHeaders"; @jakarta.annotation.Nullable private Map customHeaders; @@ -184,27 +185,30 @@ public void setMtls(@jakarta.annotation.Nullable WebhookMtls mtls) { this.mtls = mtls; } - public UpdateWebhookRequest oauth(@jakarta.annotation.Nullable WebhookOAuth oauth) { - this.oauth = oauth; + public UpdateWebhookRequest webhookOauthId(@jakarta.annotation.Nullable UUID webhookOauthId) { + this.webhookOauthId = webhookOauthId; return this; } /** - * Get oauth + * The id of the OAuth credentials this webhook authenticates with, from + * `/v1/webhooks_settings/oauth`. Several webhooks may share one credential set, so + * rotating its client secret covers all of them at once. Send `null` to stop using + * OAuth for this webhook. * - * @return oauth + * @return webhookOauthId */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OAUTH) + @JsonProperty(JSON_PROPERTY_WEBHOOK_OAUTH_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WebhookOAuth getOauth() { - return oauth; + public UUID getWebhookOauthId() { + return webhookOauthId; } - @JsonProperty(JSON_PROPERTY_OAUTH) + @JsonProperty(JSON_PROPERTY_WEBHOOK_OAUTH_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(@jakarta.annotation.Nullable WebhookOAuth oauth) { - this.oauth = oauth; + public void setWebhookOauthId(@jakarta.annotation.Nullable UUID webhookOauthId) { + this.webhookOauthId = webhookOauthId; } public UpdateWebhookRequest customHeaders( @@ -229,9 +233,9 @@ public UpdateWebhookRequest putCustomHeadersItem(String key, Object customHeader * call. That does not collide with a `null` value on a name: one names the header to * delete, the other names the whole field. Names are case-insensitive, so a `null` * under one casing deletes a header stored under another. Same rules as on create: string or - * non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the - * same reserved names, and values write-only. Entries set to `null` do not count - * towards the limit. + * non-empty array, `Cookie` string-only, 10 lines total and under 16 KB in the + * resulting set, the same reserved names, and values write-only. Entries set to + * `null` do not count towards the limit. * * @return customHeaders */ @@ -263,13 +267,13 @@ public boolean equals(Object o) { && Objects.equals(this.events, updateWebhookRequest.events) && Objects.equals(this.enabled, updateWebhookRequest.enabled) && Objects.equals(this.mtls, updateWebhookRequest.mtls) - && Objects.equals(this.oauth, updateWebhookRequest.oauth) + && Objects.equals(this.webhookOauthId, updateWebhookRequest.webhookOauthId) && Objects.equals(this.customHeaders, updateWebhookRequest.customHeaders); } @Override public int hashCode() { - return Objects.hash(url, description, events, enabled, mtls, oauth, customHeaders); + return Objects.hash(url, description, events, enabled, mtls, webhookOauthId, customHeaders); } @Override @@ -281,7 +285,7 @@ public String toString() { sb.append(" events: ").append(toIndentedString(events)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" mtls: ").append(toIndentedString(mtls)).append("\n"); - sb.append(" oauth: ").append(toIndentedString(oauth)).append("\n"); + sb.append(" webhookOauthId: ").append(toIndentedString(webhookOauthId)).append("\n"); sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); sb.append("}"); return sb.toString(); @@ -384,9 +388,14 @@ public String toUrlQueryString(String prefix) { joiner.add(getMtls().toUrlQueryString(prefix + "mtls" + suffix)); } - // add `oauth` to the URL query string - if (getOauth() != null) { - joiner.add(getOauth().toUrlQueryString(prefix + "oauth" + suffix)); + // add `webhookOauthId` to the URL query string + if (getWebhookOauthId() != null) { + joiner.add( + String.format( + "%swebhookOauthId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getWebhookOauthId())))); } // add `customHeaders` to the URL query string diff --git a/src/main/java/com/fireblocks/sdk/model/Webhook.java b/src/main/java/com/fireblocks/sdk/model/Webhook.java index 64dcb5e8..b3972cbc 100644 --- a/src/main/java/com/fireblocks/sdk/model/Webhook.java +++ b/src/main/java/com/fireblocks/sdk/model/Webhook.java @@ -35,7 +35,7 @@ Webhook.JSON_PROPERTY_CREATED_AT, Webhook.JSON_PROPERTY_UPDATED_AT, Webhook.JSON_PROPERTY_MTLS, - Webhook.JSON_PROPERTY_OAUTH, + Webhook.JSON_PROPERTY_WEBHOOK_OAUTH_ID, Webhook.JSON_PROPERTY_CUSTOM_HEADERS }) @jakarta.annotation.Generated( @@ -101,8 +101,8 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_MTLS = "mtls"; @jakarta.annotation.Nullable private WebhookMtls mtls; - public static final String JSON_PROPERTY_OAUTH = "oauth"; - @jakarta.annotation.Nullable private WebhookOAuthResponse oauth; + public static final String JSON_PROPERTY_WEBHOOK_OAUTH_ID = "webhookOauthId"; + @jakarta.annotation.Nullable private UUID webhookOauthId; public static final String JSON_PROPERTY_CUSTOM_HEADERS = "customHeaders"; @jakarta.annotation.Nullable private List customHeaders; @@ -317,27 +317,29 @@ public void setMtls(@jakarta.annotation.Nullable WebhookMtls mtls) { this.mtls = mtls; } - public Webhook oauth(@jakarta.annotation.Nullable WebhookOAuthResponse oauth) { - this.oauth = oauth; + public Webhook webhookOauthId(@jakarta.annotation.Nullable UUID webhookOauthId) { + this.webhookOauthId = webhookOauthId; return this; } /** - * Get oauth + * The id of the OAuth credentials this webhook authenticates with. Absent when the webhook does + * not use OAuth. Read the credentials themselves from + * `/v1/webhooks_settings/oauth/{webhookOauthId}`. * - * @return oauth + * @return webhookOauthId */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OAUTH) + @JsonProperty(JSON_PROPERTY_WEBHOOK_OAUTH_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WebhookOAuthResponse getOauth() { - return oauth; + public UUID getWebhookOauthId() { + return webhookOauthId; } - @JsonProperty(JSON_PROPERTY_OAUTH) + @JsonProperty(JSON_PROPERTY_WEBHOOK_OAUTH_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(@jakarta.annotation.Nullable WebhookOAuthResponse oauth) { - this.oauth = oauth; + public void setWebhookOauthId(@jakarta.annotation.Nullable UUID webhookOauthId) { + this.webhookOauthId = webhookOauthId; } public Webhook customHeaders(@jakarta.annotation.Nullable List customHeaders) { @@ -389,7 +391,7 @@ public boolean equals(Object o) { && Objects.equals(this.createdAt, webhook.createdAt) && Objects.equals(this.updatedAt, webhook.updatedAt) && Objects.equals(this.mtls, webhook.mtls) - && Objects.equals(this.oauth, webhook.oauth) + && Objects.equals(this.webhookOauthId, webhook.webhookOauthId) && Objects.equals(this.customHeaders, webhook.customHeaders); } @@ -404,7 +406,7 @@ public int hashCode() { createdAt, updatedAt, mtls, - oauth, + webhookOauthId, customHeaders); } @@ -420,7 +422,7 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" mtls: ").append(toIndentedString(mtls)).append("\n"); - sb.append(" oauth: ").append(toIndentedString(oauth)).append("\n"); + sb.append(" webhookOauthId: ").append(toIndentedString(webhookOauthId)).append("\n"); sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); sb.append("}"); return sb.toString(); @@ -551,9 +553,14 @@ public String toUrlQueryString(String prefix) { joiner.add(getMtls().toUrlQueryString(prefix + "mtls" + suffix)); } - // add `oauth` to the URL query string - if (getOauth() != null) { - joiner.add(getOauth().toUrlQueryString(prefix + "oauth" + suffix)); + // add `webhookOauthId` to the URL query string + if (getWebhookOauthId() != null) { + joiner.add( + String.format( + "%swebhookOauthId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getWebhookOauthId())))); } // add `customHeaders` to the URL query string diff --git a/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java b/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java index bc996b5c..0b61281d 100644 --- a/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java +++ b/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java @@ -85,6 +85,10 @@ public enum WebhookEvent { CONNECTED_ACCOUNT_CONNECTED("connected_account.connected"), + EXCHANGE_ACCOUNT_CREDENTIALS_REPLACED("exchange_account.credentials_replaced"), + + CONNECTED_ACCOUNT_CREDENTIALS_REPLACED("connected_account.credentials_replaced"), + TICKET_CREATED("ticket.created"), TICKET_SUBMITTED("ticket.submitted"), diff --git a/src/main/java/com/fireblocks/sdk/model/WebhookOAuth.java b/src/main/java/com/fireblocks/sdk/model/WebhookOAuth.java deleted file mode 100644 index 54dca853..00000000 --- a/src/main/java/com/fireblocks/sdk/model/WebhookOAuth.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 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. - */ - -package com.fireblocks.sdk.model; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fireblocks.sdk.ApiClient; -import java.util.Objects; -import java.util.StringJoiner; - -/** - * OAuth 2.0 client credentials configuration for the webhook. When set, the webhook dispatcher - * fetches a bearer token from the configured token endpoint before each delivery and attaches it as - * `Authorization: Bearer {token}`. Send `null` to remove OAuth configuration - * entirely. - */ -@JsonPropertyOrder({ - WebhookOAuth.JSON_PROPERTY_CLIENT_ID, - WebhookOAuth.JSON_PROPERTY_CLIENT_SECRET, - WebhookOAuth.JSON_PROPERTY_URL, - WebhookOAuth.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT -}) -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.14.0") -public class WebhookOAuth { - public static final String JSON_PROPERTY_CLIENT_ID = "clientId"; - @jakarta.annotation.Nonnull private String clientId; - - public static final String JSON_PROPERTY_CLIENT_SECRET = "clientSecret"; - @jakarta.annotation.Nonnull private String clientSecret; - - public static final String JSON_PROPERTY_URL = "url"; - @jakarta.annotation.Nonnull private String url; - - public static final String JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT = "mtlsClientSignedCert"; - @jakarta.annotation.Nullable private String mtlsClientSignedCert; - - public WebhookOAuth() {} - - @JsonCreator - public WebhookOAuth( - @JsonProperty(value = JSON_PROPERTY_CLIENT_ID, required = true) String clientId, - @JsonProperty(value = JSON_PROPERTY_CLIENT_SECRET, required = true) String clientSecret, - @JsonProperty(value = JSON_PROPERTY_URL, required = true) String url) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.url = url; - } - - public WebhookOAuth clientId(@jakarta.annotation.Nonnull String clientId) { - this.clientId = clientId; - return this; - } - - /** - * OAuth client ID used to authenticate with the token endpoint. - * - * @return clientId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(@jakarta.annotation.Nonnull String clientId) { - this.clientId = clientId; - } - - public WebhookOAuth clientSecret(@jakarta.annotation.Nonnull String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * OAuth client secret. Write-only — never returned in responses. - * - * @return clientSecret - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientSecret() { - return clientSecret; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientSecret(@jakarta.annotation.Nonnull String clientSecret) { - this.clientSecret = clientSecret; - } - - public WebhookOAuth url(@jakarta.annotation.Nonnull String url) { - this.url = url; - return this; - } - - /** - * Token endpoint URL. Must be HTTPS. - * - * @return url - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUrl(@jakarta.annotation.Nonnull String url) { - this.url = url; - } - - public WebhookOAuth mtlsClientSignedCert( - @jakarta.annotation.Nullable String mtlsClientSignedCert) { - this.mtlsClientSignedCert = mtlsClientSignedCert; - return this; - } - - /** - * Signed client certificate PEM used for mTLS when connecting to the token endpoint. Same - * format as the webhook mTLS certificate. Send `null` to remove. - * - * @return mtlsClientSignedCert - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMtlsClientSignedCert() { - return mtlsClientSignedCert; - } - - @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClientSignedCert) { - this.mtlsClientSignedCert = mtlsClientSignedCert; - } - - /** Return true if this WebhookOAuth object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WebhookOAuth webhookOAuth = (WebhookOAuth) o; - return Objects.equals(this.clientId, webhookOAuth.clientId) - && Objects.equals(this.clientSecret, webhookOAuth.clientSecret) - && Objects.equals(this.url, webhookOAuth.url) - && Objects.equals(this.mtlsClientSignedCert, webhookOAuth.mtlsClientSignedCert); - } - - @Override - public int hashCode() { - return Objects.hash(clientId, clientSecret, url, mtlsClientSignedCert); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WebhookOAuth {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" mtlsClientSignedCert: ") - .append(toIndentedString(mtlsClientSignedCert)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `clientId` to the URL query string - if (getClientId() != null) { - joiner.add( - String.format( - "%sclientId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getClientId())))); - } - - // add `clientSecret` to the URL query string - if (getClientSecret() != null) { - joiner.add( - String.format( - "%sclientSecret%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getClientSecret())))); - } - - // add `url` to the URL query string - if (getUrl() != null) { - joiner.add( - String.format( - "%surl%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getUrl())))); - } - - // add `mtlsClientSignedCert` to the URL query string - if (getMtlsClientSignedCert() != null) { - joiner.add( - String.format( - "%smtlsClientSignedCert%s=%s", - prefix, - suffix, - ApiClient.urlEncode( - ApiClient.valueToString(getMtlsClientSignedCert())))); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/WebhookOAuthResponse.java b/src/main/java/com/fireblocks/sdk/model/WebhookOAuthResponse.java deleted file mode 100644 index 2bd40dd4..00000000 --- a/src/main/java/com/fireblocks/sdk/model/WebhookOAuthResponse.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 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. - */ - -package com.fireblocks.sdk.model; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fireblocks.sdk.ApiClient; -import java.util.Objects; -import java.util.StringJoiner; - -/** - * OAuth 2.0 client credentials configuration for the webhook. Present only when OAuth is - * configured. The `clientSecret` is write-only and is never returned. - */ -@JsonPropertyOrder({ - WebhookOAuthResponse.JSON_PROPERTY_CLIENT_ID, - WebhookOAuthResponse.JSON_PROPERTY_URL, - WebhookOAuthResponse.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT -}) -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.14.0") -public class WebhookOAuthResponse { - public static final String JSON_PROPERTY_CLIENT_ID = "clientId"; - @jakarta.annotation.Nonnull private String clientId; - - public static final String JSON_PROPERTY_URL = "url"; - @jakarta.annotation.Nonnull private String url; - - public static final String JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT = "mtlsClientSignedCert"; - @jakarta.annotation.Nullable private String mtlsClientSignedCert; - - public WebhookOAuthResponse() {} - - @JsonCreator - public WebhookOAuthResponse( - @JsonProperty(value = JSON_PROPERTY_CLIENT_ID, required = true) String clientId, - @JsonProperty(value = JSON_PROPERTY_URL, required = true) String url) { - this.clientId = clientId; - this.url = url; - } - - public WebhookOAuthResponse clientId(@jakarta.annotation.Nonnull String clientId) { - this.clientId = clientId; - return this; - } - - /** - * OAuth client ID used to authenticate with the token endpoint. - * - * @return clientId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(@jakarta.annotation.Nonnull String clientId) { - this.clientId = clientId; - } - - public WebhookOAuthResponse url(@jakarta.annotation.Nonnull String url) { - this.url = url; - return this; - } - - /** - * Token endpoint URL. - * - * @return url - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUrl(@jakarta.annotation.Nonnull String url) { - this.url = url; - } - - public WebhookOAuthResponse mtlsClientSignedCert( - @jakarta.annotation.Nullable String mtlsClientSignedCert) { - this.mtlsClientSignedCert = mtlsClientSignedCert; - return this; - } - - /** - * Signed client certificate PEM used for mTLS when connecting to the token endpoint. - * - * @return mtlsClientSignedCert - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMtlsClientSignedCert() { - return mtlsClientSignedCert; - } - - @JsonProperty(JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClientSignedCert) { - this.mtlsClientSignedCert = mtlsClientSignedCert; - } - - /** Return true if this WebhookOAuthResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WebhookOAuthResponse webhookOAuthResponse = (WebhookOAuthResponse) o; - return Objects.equals(this.clientId, webhookOAuthResponse.clientId) - && Objects.equals(this.url, webhookOAuthResponse.url) - && Objects.equals( - this.mtlsClientSignedCert, webhookOAuthResponse.mtlsClientSignedCert); - } - - @Override - public int hashCode() { - return Objects.hash(clientId, url, mtlsClientSignedCert); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WebhookOAuthResponse {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" mtlsClientSignedCert: ") - .append(toIndentedString(mtlsClientSignedCert)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `clientId` to the URL query string - if (getClientId() != null) { - joiner.add( - String.format( - "%sclientId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getClientId())))); - } - - // add `url` to the URL query string - if (getUrl() != null) { - joiner.add( - String.format( - "%surl%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getUrl())))); - } - - // add `mtlsClientSignedCert` to the URL query string - if (getMtlsClientSignedCert() != null) { - joiner.add( - String.format( - "%smtlsClientSignedCert%s=%s", - prefix, - suffix, - ApiClient.urlEncode( - ApiClient.valueToString(getMtlsClientSignedCert())))); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/WebhookOAuthCredentials.java b/src/main/java/com/fireblocks/sdk/model/WebhookOauthCredentials.java similarity index 89% rename from src/main/java/com/fireblocks/sdk/model/WebhookOAuthCredentials.java rename to src/main/java/com/fireblocks/sdk/model/WebhookOauthCredentials.java index 26f854cc..9bb882ec 100644 --- a/src/main/java/com/fireblocks/sdk/model/WebhookOAuthCredentials.java +++ b/src/main/java/com/fireblocks/sdk/model/WebhookOauthCredentials.java @@ -33,22 +33,22 @@ * `customHeaders` fields are reduced to their names, without the configured values. */ @JsonPropertyOrder({ - WebhookOAuthCredentials.JSON_PROPERTY_ID, - WebhookOAuthCredentials.JSON_PROPERTY_NAME, - WebhookOAuthCredentials.JSON_PROPERTY_CLIENT_ID, - WebhookOAuthCredentials.JSON_PROPERTY_URL, - WebhookOAuthCredentials.JSON_PROPERTY_AUTH_METHOD, - WebhookOAuthCredentials.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, - WebhookOAuthCredentials.JSON_PROPERTY_CUSTOM_BODY_PARAMS, - WebhookOAuthCredentials.JSON_PROPERTY_CUSTOM_HEADERS, - WebhookOAuthCredentials.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT, - WebhookOAuthCredentials.JSON_PROPERTY_CREATED_AT, - WebhookOAuthCredentials.JSON_PROPERTY_UPDATED_AT + WebhookOauthCredentials.JSON_PROPERTY_ID, + WebhookOauthCredentials.JSON_PROPERTY_NAME, + WebhookOauthCredentials.JSON_PROPERTY_CLIENT_ID, + WebhookOauthCredentials.JSON_PROPERTY_URL, + WebhookOauthCredentials.JSON_PROPERTY_AUTH_METHOD, + WebhookOauthCredentials.JSON_PROPERTY_CUSTOM_JWT_CLAIMS, + WebhookOauthCredentials.JSON_PROPERTY_CUSTOM_BODY_PARAMS, + WebhookOauthCredentials.JSON_PROPERTY_CUSTOM_HEADERS, + WebhookOauthCredentials.JSON_PROPERTY_MTLS_CLIENT_SIGNED_CERT, + WebhookOauthCredentials.JSON_PROPERTY_CREATED_AT, + WebhookOauthCredentials.JSON_PROPERTY_UPDATED_AT }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class WebhookOAuthCredentials { +public class WebhookOauthCredentials { public static final String JSON_PROPERTY_ID = "id"; @jakarta.annotation.Nonnull private UUID id; @@ -82,10 +82,10 @@ public class WebhookOAuthCredentials { public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; @jakarta.annotation.Nonnull private Long updatedAt; - public WebhookOAuthCredentials() {} + public WebhookOauthCredentials() {} @JsonCreator - public WebhookOAuthCredentials( + public WebhookOauthCredentials( @JsonProperty(value = JSON_PROPERTY_ID, required = true) UUID id, @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, @JsonProperty(value = JSON_PROPERTY_CLIENT_ID, required = true) String clientId, @@ -102,7 +102,7 @@ public WebhookOAuthCredentials( this.updatedAt = updatedAt; } - public WebhookOAuthCredentials id(@jakarta.annotation.Nonnull UUID id) { + public WebhookOauthCredentials id(@jakarta.annotation.Nonnull UUID id) { this.id = id; return this; } @@ -126,7 +126,7 @@ public void setId(@jakarta.annotation.Nonnull UUID id) { this.id = id; } - public WebhookOAuthCredentials name(@jakarta.annotation.Nonnull String name) { + public WebhookOauthCredentials name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -149,7 +149,7 @@ public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public WebhookOAuthCredentials clientId(@jakarta.annotation.Nonnull String clientId) { + public WebhookOauthCredentials clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -172,7 +172,7 @@ public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public WebhookOAuthCredentials url(@jakarta.annotation.Nonnull String url) { + public WebhookOauthCredentials url(@jakarta.annotation.Nonnull String url) { this.url = url; return this; } @@ -195,7 +195,7 @@ public void setUrl(@jakarta.annotation.Nonnull String url) { this.url = url; } - public WebhookOAuthCredentials authMethod(@jakarta.annotation.Nonnull String authMethod) { + public WebhookOauthCredentials authMethod(@jakarta.annotation.Nonnull String authMethod) { this.authMethod = authMethod; return this; } @@ -221,13 +221,13 @@ public void setAuthMethod(@jakarta.annotation.Nonnull String authMethod) { this.authMethod = authMethod; } - public WebhookOAuthCredentials customJwtClaims( + public WebhookOauthCredentials customJwtClaims( @jakarta.annotation.Nullable List customJwtClaims) { this.customJwtClaims = customJwtClaims; return this; } - public WebhookOAuthCredentials addCustomJwtClaimsItem(String customJwtClaimsItem) { + public WebhookOauthCredentials addCustomJwtClaimsItem(String customJwtClaimsItem) { if (this.customJwtClaims == null) { this.customJwtClaims = new ArrayList<>(); } @@ -254,13 +254,13 @@ public void setCustomJwtClaims(@jakarta.annotation.Nullable List customJ this.customJwtClaims = customJwtClaims; } - public WebhookOAuthCredentials customBodyParams( + public WebhookOauthCredentials customBodyParams( @jakarta.annotation.Nullable List customBodyParams) { this.customBodyParams = customBodyParams; return this; } - public WebhookOAuthCredentials addCustomBodyParamsItem(String customBodyParamsItem) { + public WebhookOauthCredentials addCustomBodyParamsItem(String customBodyParamsItem) { if (this.customBodyParams == null) { this.customBodyParams = new ArrayList<>(); } @@ -287,13 +287,13 @@ public void setCustomBodyParams(@jakarta.annotation.Nullable List custom this.customBodyParams = customBodyParams; } - public WebhookOAuthCredentials customHeaders( + public WebhookOauthCredentials customHeaders( @jakarta.annotation.Nullable List customHeaders) { this.customHeaders = customHeaders; return this; } - public WebhookOAuthCredentials addCustomHeadersItem(String customHeadersItem) { + public WebhookOauthCredentials addCustomHeadersItem(String customHeadersItem) { if (this.customHeaders == null) { this.customHeaders = new ArrayList<>(); } @@ -322,7 +322,7 @@ public void setCustomHeaders(@jakarta.annotation.Nullable List customHea this.customHeaders = customHeaders; } - public WebhookOAuthCredentials mtlsClientSignedCert( + public WebhookOauthCredentials mtlsClientSignedCert( @jakarta.annotation.Nullable String mtlsClientSignedCert) { this.mtlsClientSignedCert = mtlsClientSignedCert; return this; @@ -346,7 +346,7 @@ public void setMtlsClientSignedCert(@jakarta.annotation.Nullable String mtlsClie this.mtlsClientSignedCert = mtlsClientSignedCert; } - public WebhookOAuthCredentials createdAt(@jakarta.annotation.Nonnull Long createdAt) { + public WebhookOauthCredentials createdAt(@jakarta.annotation.Nonnull Long createdAt) { this.createdAt = createdAt; return this; } @@ -369,7 +369,7 @@ public void setCreatedAt(@jakarta.annotation.Nonnull Long createdAt) { this.createdAt = createdAt; } - public WebhookOAuthCredentials updatedAt(@jakarta.annotation.Nonnull Long updatedAt) { + public WebhookOauthCredentials updatedAt(@jakarta.annotation.Nonnull Long updatedAt) { this.updatedAt = updatedAt; return this; } @@ -392,7 +392,7 @@ public void setUpdatedAt(@jakarta.annotation.Nonnull Long updatedAt) { this.updatedAt = updatedAt; } - /** Return true if this WebhookOAuthCredentials object is equal to o. */ + /** Return true if this WebhookOauthCredentials object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -401,19 +401,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WebhookOAuthCredentials webhookOAuthCredentials = (WebhookOAuthCredentials) o; - return Objects.equals(this.id, webhookOAuthCredentials.id) - && Objects.equals(this.name, webhookOAuthCredentials.name) - && Objects.equals(this.clientId, webhookOAuthCredentials.clientId) - && Objects.equals(this.url, webhookOAuthCredentials.url) - && Objects.equals(this.authMethod, webhookOAuthCredentials.authMethod) - && Objects.equals(this.customJwtClaims, webhookOAuthCredentials.customJwtClaims) - && Objects.equals(this.customBodyParams, webhookOAuthCredentials.customBodyParams) - && Objects.equals(this.customHeaders, webhookOAuthCredentials.customHeaders) + WebhookOauthCredentials webhookOauthCredentials = (WebhookOauthCredentials) o; + return Objects.equals(this.id, webhookOauthCredentials.id) + && Objects.equals(this.name, webhookOauthCredentials.name) + && Objects.equals(this.clientId, webhookOauthCredentials.clientId) + && Objects.equals(this.url, webhookOauthCredentials.url) + && Objects.equals(this.authMethod, webhookOauthCredentials.authMethod) + && Objects.equals(this.customJwtClaims, webhookOauthCredentials.customJwtClaims) + && Objects.equals(this.customBodyParams, webhookOauthCredentials.customBodyParams) + && Objects.equals(this.customHeaders, webhookOauthCredentials.customHeaders) && Objects.equals( - this.mtlsClientSignedCert, webhookOAuthCredentials.mtlsClientSignedCert) - && Objects.equals(this.createdAt, webhookOAuthCredentials.createdAt) - && Objects.equals(this.updatedAt, webhookOAuthCredentials.updatedAt); + this.mtlsClientSignedCert, webhookOauthCredentials.mtlsClientSignedCert) + && Objects.equals(this.createdAt, webhookOauthCredentials.createdAt) + && Objects.equals(this.updatedAt, webhookOauthCredentials.updatedAt); } @Override @@ -435,7 +435,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class WebhookOAuthCredentials {\n"); + sb.append("class WebhookOauthCredentials {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); diff --git a/src/test/java/com/fireblocks/sdk/api/ApprovalsBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/ApprovalsBetaApiTest.java index b3911cdf..3d64420e 100644 --- a/src/test/java/com/fireblocks/sdk/api/ApprovalsBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ApprovalsBetaApiTest.java @@ -77,4 +77,21 @@ public void getApprovalsTest() { pageSize, pageCursor); } + + /** + * Reject an approval request + * + *

Reject a pending approval request as the authenticated API user. No signature is required + * (unlike approve). The caller must be eligible to act on the request; rejecting finalizes the + * request as rejected per the approval policy. Endpoint Permission: Owner, Admin, Non-Signing + * Admin, Approver, Signer, Security Admin. + */ + @Test + public void rejectApprovalTest() { + String requestId = null; + String idempotencyKey = null; + + CompletableFuture> response = + api.rejectApproval(requestId, idempotencyKey); + } } diff --git a/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java index 2473648c..4834c503 100644 --- a/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java @@ -27,6 +27,8 @@ import com.fireblocks.sdk.model.GetConnectedAccountsCredentialsPublicKeyResponse; import com.fireblocks.sdk.model.RenameConnectedAccountRequest; import com.fireblocks.sdk.model.RenameConnectedAccountResponse; +import com.fireblocks.sdk.model.UpdateConnectedAccountCredentialsRequest; +import com.fireblocks.sdk.model.UpdateConnectedAccountCredentialsResponse; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -233,4 +235,28 @@ public void syncConnectedAccountAllowlistTest() { CompletableFuture> response = api.syncConnectedAccountAllowlist(accountId, idempotencyKey); } + + /** + * Update connected account credentials + * + *

Replace the API credentials (secret + API key) of a connected account. Credentials belong + * to an API key, which can back a single account or an entire hierarchy. Updating them affects + * all accounts sharing that key, so the endpoint returns an array of modified accounts. The + * `creds` field must be a Base64-encoded RSA-encrypted credential blob; use `GET + * /connected_accounts/credentials/public_key` to retrieve the public key for encryption. + * Both `creds` and `apiKey` are mandatory. Validation against the exchange + * is synchronous, but the update itself is **pending mobile approval** — the existing + * credentials stay live until the change is approved, so none of the affected accounts are + * disconnected in the meantime. Endpoint Permission: Admin, Non-Signing Admin. **Note:** This + * endpoint is currently in beta and might be subject to changes. + */ + @Test + public void updateConnectedAccountCredentialsTest() { + UpdateConnectedAccountCredentialsRequest updateConnectedAccountCredentialsRequest = null; + String accountId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.updateConnectedAccountCredentials( + updateConnectedAccountCredentialsRequest, accountId, idempotencyKey); + } } diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java index 3d851e09..04a1b8d4 100644 --- a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java @@ -14,9 +14,9 @@ import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.CreateWebhookOAuthRequest; +import com.fireblocks.sdk.model.CreateWebhookOauthRequest; import com.fireblocks.sdk.model.CreateWebhookRequest; -import com.fireblocks.sdk.model.DeleteWebhookOAuthResponse; +import com.fireblocks.sdk.model.DeleteWebhookOauthResponse; import com.fireblocks.sdk.model.NotificationAttemptsPaginatedResponse; import com.fireblocks.sdk.model.NotificationPaginatedResponse; import com.fireblocks.sdk.model.NotificationStatus; @@ -27,13 +27,13 @@ import com.fireblocks.sdk.model.ResendFailedNotificationsRequest; import com.fireblocks.sdk.model.ResendFailedNotificationsResponse; import com.fireblocks.sdk.model.ResendNotificationsByResourceIdRequest; -import com.fireblocks.sdk.model.UpdateWebhookOAuthRequest; +import com.fireblocks.sdk.model.UpdateWebhookOauthRequest; import com.fireblocks.sdk.model.UpdateWebhookRequest; import com.fireblocks.sdk.model.Webhook; import com.fireblocks.sdk.model.WebhookEvent; import com.fireblocks.sdk.model.WebhookMetric; import com.fireblocks.sdk.model.WebhookMtlsCsrResponse; -import com.fireblocks.sdk.model.WebhookOAuthCredentials; +import com.fireblocks.sdk.model.WebhookOauthCredentials; import com.fireblocks.sdk.model.WebhookPaginatedResponse; import java.math.BigDecimal; import java.util.List; @@ -72,11 +72,11 @@ public void createWebhookTest() { * Admin. */ @Test - public void createWebhookOAuthTest() { - CreateWebhookOAuthRequest createWebhookOAuthRequest = null; + public void createWebhookOauthTest() { + CreateWebhookOauthRequest createWebhookOauthRequest = null; String idempotencyKey = null; - CompletableFuture> response = - api.createWebhookOAuth(createWebhookOAuthRequest, idempotencyKey); + CompletableFuture> response = + api.createWebhookOauth(createWebhookOauthRequest, idempotencyKey); } /** @@ -108,11 +108,11 @@ public void deleteWebhookTest() { * Owner, Admin, Non-Signing Admin. */ @Test - public void deleteWebhookOAuthTest() { + public void deleteWebhookOauthTest() { UUID webhookOauthId = null; Boolean forceDelete = null; - CompletableFuture> response = - api.deleteWebhookOAuth(webhookOauthId, forceDelete); + CompletableFuture> response = + api.deleteWebhookOauth(webhookOauthId, forceDelete); } /** @@ -242,10 +242,10 @@ public void getWebhookTest() { *

Retrieve an OAuth credential set by its id. The client secret is never returned. */ @Test - public void getWebhookOAuthTest() { + public void getWebhookOauthTest() { UUID webhookOauthId = null; - CompletableFuture> response = - api.getWebhookOAuth(webhookOauthId); + CompletableFuture> response = + api.getWebhookOauth(webhookOauthId); } /** @@ -254,9 +254,9 @@ public void getWebhookOAuthTest() { *

Lists every OAuth credential set for the workspace. Client secrets are never returned. */ @Test - public void getWebhookOAuthsTest() { - CompletableFuture>> response = - api.getWebhookOAuths(); + public void getWebhookOauthsTest() { + CompletableFuture>> response = + api.getWebhookOauths(); } /** @@ -369,10 +369,10 @@ public void updateWebhookTest() { * does remove it. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. */ @Test - public void updateWebhookOAuthTest() { - UpdateWebhookOAuthRequest updateWebhookOAuthRequest = null; + public void updateWebhookOauthTest() { + UpdateWebhookOauthRequest updateWebhookOauthRequest = null; UUID webhookOauthId = null; - CompletableFuture> response = - api.updateWebhookOAuth(updateWebhookOAuthRequest, webhookOauthId); + CompletableFuture> response = + api.updateWebhookOauth(updateWebhookOauthRequest, webhookOauthId); } } diff --git a/src/test/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateWebhookOauthRequestTest.java similarity index 85% rename from src/test/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequestTest.java rename to src/test/java/com/fireblocks/sdk/model/CreateWebhookOauthRequestTest.java index 42708fea..5aeb2913 100644 --- a/src/test/java/com/fireblocks/sdk/model/UpdateWebhookOAuthRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateWebhookOauthRequestTest.java @@ -15,14 +15,14 @@ import org.junit.jupiter.api.Test; -/** Model tests for UpdateWebhookOAuthRequest */ -class UpdateWebhookOAuthRequestTest { - private final UpdateWebhookOAuthRequest model = new UpdateWebhookOAuthRequest(); +/** Model tests for CreateWebhookOauthRequest */ +class CreateWebhookOauthRequestTest { + private final CreateWebhookOauthRequest model = new CreateWebhookOauthRequest(); - /** Model tests for UpdateWebhookOAuthRequest */ + /** Model tests for CreateWebhookOauthRequest */ @Test - void testUpdateWebhookOAuthRequest() { - // TODO: test UpdateWebhookOAuthRequest + void testCreateWebhookOauthRequest() { + // TODO: test CreateWebhookOauthRequest } /** Test the property 'name' */ diff --git a/src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java index 557a64ee..39e2e321 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java @@ -55,10 +55,10 @@ void mtlsTest() { // TODO: test mtls } - /** Test the property 'oauth' */ + /** Test the property 'webhookOauthId' */ @Test - void oauthTest() { - // TODO: test oauth + void webhookOauthIdTest() { + // TODO: test webhookOauthId } /** Test the property 'customHeaders' */ diff --git a/src/test/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponseTest.java b/src/test/java/com/fireblocks/sdk/model/DeleteWebhookOauthResponseTest.java similarity index 87% rename from src/test/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/DeleteWebhookOauthResponseTest.java index b8226074..4e0ad0ec 100644 --- a/src/test/java/com/fireblocks/sdk/model/DeleteWebhookOAuthResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DeleteWebhookOauthResponseTest.java @@ -15,14 +15,14 @@ import org.junit.jupiter.api.Test; -/** Model tests for DeleteWebhookOAuthResponse */ -class DeleteWebhookOAuthResponseTest { - private final DeleteWebhookOAuthResponse model = new DeleteWebhookOAuthResponse(); +/** Model tests for DeleteWebhookOauthResponse */ +class DeleteWebhookOauthResponseTest { + private final DeleteWebhookOauthResponse model = new DeleteWebhookOauthResponse(); - /** Model tests for DeleteWebhookOAuthResponse */ + /** Model tests for DeleteWebhookOauthResponse */ @Test - void testDeleteWebhookOAuthResponse() { - // TODO: test DeleteWebhookOAuthResponse + void testDeleteWebhookOauthResponse() { + // TODO: test DeleteWebhookOauthResponse } /** Test the property 'id' */ diff --git a/src/test/java/com/fireblocks/sdk/model/WebhookOAuthResponseTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsRequestTest.java similarity index 54% rename from src/test/java/com/fireblocks/sdk/model/WebhookOAuthResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsRequestTest.java index b158be90..39760ba6 100644 --- a/src/test/java/com/fireblocks/sdk/model/WebhookOAuthResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsRequestTest.java @@ -15,31 +15,26 @@ import org.junit.jupiter.api.Test; -/** Model tests for WebhookOAuthResponse */ -class WebhookOAuthResponseTest { - private final WebhookOAuthResponse model = new WebhookOAuthResponse(); +/** Model tests for UpdateConnectedAccountCredentialsRequest */ +class UpdateConnectedAccountCredentialsRequestTest { + private final UpdateConnectedAccountCredentialsRequest model = + new UpdateConnectedAccountCredentialsRequest(); - /** Model tests for WebhookOAuthResponse */ + /** Model tests for UpdateConnectedAccountCredentialsRequest */ @Test - void testWebhookOAuthResponse() { - // TODO: test WebhookOAuthResponse + void testUpdateConnectedAccountCredentialsRequest() { + // TODO: test UpdateConnectedAccountCredentialsRequest } - /** Test the property 'clientId' */ + /** Test the property 'creds' */ @Test - void clientIdTest() { - // TODO: test clientId + void credsTest() { + // TODO: test creds } - /** Test the property 'url' */ + /** Test the property 'apiKey' */ @Test - void urlTest() { - // TODO: test url - } - - /** Test the property 'mtlsClientSignedCert' */ - @Test - void mtlsClientSignedCertTest() { - // TODO: test mtlsClientSignedCert + void apiKeyTest() { + // TODO: test apiKey } } diff --git a/src/test/java/com/fireblocks/sdk/model/WebhookOAuthTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsResponseTest.java similarity index 50% rename from src/test/java/com/fireblocks/sdk/model/WebhookOAuthTest.java rename to src/test/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsResponseTest.java index a52fa748..88b96121 100644 --- a/src/test/java/com/fireblocks/sdk/model/WebhookOAuthTest.java +++ b/src/test/java/com/fireblocks/sdk/model/UpdateConnectedAccountCredentialsResponseTest.java @@ -15,37 +15,20 @@ import org.junit.jupiter.api.Test; -/** Model tests for WebhookOAuth */ -class WebhookOAuthTest { - private final WebhookOAuth model = new WebhookOAuth(); +/** Model tests for UpdateConnectedAccountCredentialsResponse */ +class UpdateConnectedAccountCredentialsResponseTest { + private final UpdateConnectedAccountCredentialsResponse model = + new UpdateConnectedAccountCredentialsResponse(); - /** Model tests for WebhookOAuth */ + /** Model tests for UpdateConnectedAccountCredentialsResponse */ @Test - void testWebhookOAuth() { - // TODO: test WebhookOAuth + void testUpdateConnectedAccountCredentialsResponse() { + // TODO: test UpdateConnectedAccountCredentialsResponse } - /** Test the property 'clientId' */ + /** Test the property 'accounts' */ @Test - void clientIdTest() { - // TODO: test clientId - } - - /** Test the property 'clientSecret' */ - @Test - void clientSecretTest() { - // TODO: test clientSecret - } - - /** Test the property 'url' */ - @Test - void urlTest() { - // TODO: test url - } - - /** Test the property 'mtlsClientSignedCert' */ - @Test - void mtlsClientSignedCertTest() { - // TODO: test mtlsClientSignedCert + void accountsTest() { + // TODO: test accounts } } diff --git a/src/test/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequestTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateWebhookOauthRequestTest.java similarity index 85% rename from src/test/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequestTest.java rename to src/test/java/com/fireblocks/sdk/model/UpdateWebhookOauthRequestTest.java index abb8dd19..21bdd39a 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateWebhookOAuthRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/UpdateWebhookOauthRequestTest.java @@ -15,14 +15,14 @@ import org.junit.jupiter.api.Test; -/** Model tests for CreateWebhookOAuthRequest */ -class CreateWebhookOAuthRequestTest { - private final CreateWebhookOAuthRequest model = new CreateWebhookOAuthRequest(); +/** Model tests for UpdateWebhookOauthRequest */ +class UpdateWebhookOauthRequestTest { + private final UpdateWebhookOauthRequest model = new UpdateWebhookOauthRequest(); - /** Model tests for CreateWebhookOAuthRequest */ + /** Model tests for UpdateWebhookOauthRequest */ @Test - void testCreateWebhookOAuthRequest() { - // TODO: test CreateWebhookOAuthRequest + void testUpdateWebhookOauthRequest() { + // TODO: test UpdateWebhookOauthRequest } /** Test the property 'name' */ diff --git a/src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java index 1d33418e..e3ae46a1 100644 --- a/src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java @@ -55,10 +55,10 @@ void mtlsTest() { // TODO: test mtls } - /** Test the property 'oauth' */ + /** Test the property 'webhookOauthId' */ @Test - void oauthTest() { - // TODO: test oauth + void webhookOauthIdTest() { + // TODO: test webhookOauthId } /** Test the property 'customHeaders' */ diff --git a/src/test/java/com/fireblocks/sdk/model/WebhookOAuthCredentialsTest.java b/src/test/java/com/fireblocks/sdk/model/WebhookOauthCredentialsTest.java similarity index 87% rename from src/test/java/com/fireblocks/sdk/model/WebhookOAuthCredentialsTest.java rename to src/test/java/com/fireblocks/sdk/model/WebhookOauthCredentialsTest.java index 62dcd14e..e6589b7c 100644 --- a/src/test/java/com/fireblocks/sdk/model/WebhookOAuthCredentialsTest.java +++ b/src/test/java/com/fireblocks/sdk/model/WebhookOauthCredentialsTest.java @@ -15,14 +15,14 @@ import org.junit.jupiter.api.Test; -/** Model tests for WebhookOAuthCredentials */ -class WebhookOAuthCredentialsTest { - private final WebhookOAuthCredentials model = new WebhookOAuthCredentials(); +/** Model tests for WebhookOauthCredentials */ +class WebhookOauthCredentialsTest { + private final WebhookOauthCredentials model = new WebhookOauthCredentials(); - /** Model tests for WebhookOAuthCredentials */ + /** Model tests for WebhookOauthCredentials */ @Test - void testWebhookOAuthCredentials() { - // TODO: test WebhookOAuthCredentials + void testWebhookOauthCredentials() { + // TODO: test WebhookOauthCredentials } /** Test the property 'id' */ diff --git a/src/test/java/com/fireblocks/sdk/model/WebhookTest.java b/src/test/java/com/fireblocks/sdk/model/WebhookTest.java index 81442e89..71ebb912 100644 --- a/src/test/java/com/fireblocks/sdk/model/WebhookTest.java +++ b/src/test/java/com/fireblocks/sdk/model/WebhookTest.java @@ -73,10 +73,10 @@ void mtlsTest() { // TODO: test mtls } - /** Test the property 'oauth' */ + /** Test the property 'webhookOauthId' */ @Test - void oauthTest() { - // TODO: test oauth + void webhookOauthIdTest() { + // TODO: test webhookOauthId } /** Test the property 'customHeaders' */