diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 86bb7227..b6298383 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -75,7 +75,6 @@ docs/AddressReverseLookupResponse.md docs/AddressesFilters.md docs/AlertExposureTypeEnum.md docs/AlertLevelEnum.md -docs/AllocationWithdrawPayload.md docs/AllowListPayload.md docs/AllowlistEntry.md docs/AllowlistEntryResponse.md @@ -180,6 +179,9 @@ docs/BlockchainStateFilter.md docs/BlockchainTransfer.md docs/BlockchainsAssetsApi.md docs/BpsFee.md +docs/BulkProofOfOwnership.md +docs/BulkSigningKey.md +docs/BulkSigningKeyJob.md docs/BusinessEntityTypeEnum.md docs/BusinessIdentification.md docs/ByorkConfigResponse.md @@ -196,7 +198,6 @@ docs/CallbackHandler.md docs/CallbackHandlerRequest.md docs/CancelTransactionResponse.md docs/CantonCall.md -docs/CantonCallAllocationWithdraw.md docs/CantonCallAllowListAdd.md docs/CantonCallAllowListRemove.md docs/CantonCallDetails.md @@ -323,6 +324,8 @@ docs/CreateAddressesReportRequest.md docs/CreateAssetsRequest.md docs/CreateBlockchainRequest.md docs/CreateBlockchainResponse.md +docs/CreateBulkSigningKeys.md +docs/CreateBulkSigningKeysResponse.md docs/CreateConfigOperationRequest.md docs/CreateConnectionRequest.md docs/CreateConnectionResponse.md @@ -542,6 +545,7 @@ docs/GetAuditLogsResponse.md docs/GetAutomationSettingsResponse.md docs/GetBillingInfoResponse.md docs/GetBlockchainByIdResponse.md +docs/GetBulkSigningKeysJobsResponse.md docs/GetByorkVerdictResponse.md docs/GetConnectedAccountsCredentialsPublicKeyResponse.md docs/GetConnectionsResponse.md @@ -706,6 +710,7 @@ docs/OfferResponse.md docs/OfferResponseAccepted.md docs/OfferResponseAllocationAccept.md docs/OfferResponseAllocationReject.md +docs/OfferResponseAllocationWithdraw.md docs/OfferResponseDtccOnboardingAccept.md docs/OfferResponseDtccOnboardingReject.md docs/OfferResponseTradewebAccept.md @@ -1175,7 +1180,7 @@ docs/TotalSupplyPagedResponse.md docs/TotalSupplyPagedResponse2.md docs/TrLinkApi.md docs/TradingAccountType.md -docs/TradingBetaApi.md +docs/TradingApi.md docs/TradingErrorSchema.md docs/TradingProvider.md docs/Transaction.md @@ -1396,6 +1401,7 @@ src/main/java/com/fireblocks/sdk/ConfigurationOptions.java src/main/java/com/fireblocks/sdk/Fireblocks.java src/main/java/com/fireblocks/sdk/InstanceTimeWrapper.java src/main/java/com/fireblocks/sdk/JSON.java +src/main/java/com/fireblocks/sdk/LifecycleWarning.java src/main/java/com/fireblocks/sdk/Pair.java src/main/java/com/fireblocks/sdk/RFC3339DateFormat.java src/main/java/com/fireblocks/sdk/RFC3339InstantDeserializer.java @@ -1449,7 +1455,7 @@ src/main/java/com/fireblocks/sdk/api/TagsApi.java src/main/java/com/fireblocks/sdk/api/TempoBetaApi.java src/main/java/com/fireblocks/sdk/api/TokenizationApi.java src/main/java/com/fireblocks/sdk/api/TrLinkApi.java -src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java +src/main/java/com/fireblocks/sdk/api/TradingApi.java src/main/java/com/fireblocks/sdk/api/TransactionsApi.java src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java @@ -1530,7 +1536,6 @@ src/main/java/com/fireblocks/sdk/model/AddressReverseLookupResponse.java src/main/java/com/fireblocks/sdk/model/AddressesFilters.java src/main/java/com/fireblocks/sdk/model/AlertExposureTypeEnum.java src/main/java/com/fireblocks/sdk/model/AlertLevelEnum.java -src/main/java/com/fireblocks/sdk/model/AllocationWithdrawPayload.java src/main/java/com/fireblocks/sdk/model/AllowListPayload.java src/main/java/com/fireblocks/sdk/model/AllowlistEntry.java src/main/java/com/fireblocks/sdk/model/AllowlistEntryResponse.java @@ -1630,6 +1635,9 @@ src/main/java/com/fireblocks/sdk/model/BlockchainSortField.java src/main/java/com/fireblocks/sdk/model/BlockchainStateFilter.java src/main/java/com/fireblocks/sdk/model/BlockchainTransfer.java src/main/java/com/fireblocks/sdk/model/BpsFee.java +src/main/java/com/fireblocks/sdk/model/BulkProofOfOwnership.java +src/main/java/com/fireblocks/sdk/model/BulkSigningKey.java +src/main/java/com/fireblocks/sdk/model/BulkSigningKeyJob.java src/main/java/com/fireblocks/sdk/model/BusinessEntityTypeEnum.java src/main/java/com/fireblocks/sdk/model/BusinessIdentification.java src/main/java/com/fireblocks/sdk/model/ByorkConfigResponse.java @@ -1646,7 +1654,6 @@ src/main/java/com/fireblocks/sdk/model/CallbackHandler.java src/main/java/com/fireblocks/sdk/model/CallbackHandlerRequest.java src/main/java/com/fireblocks/sdk/model/CancelTransactionResponse.java src/main/java/com/fireblocks/sdk/model/CantonCall.java -src/main/java/com/fireblocks/sdk/model/CantonCallAllocationWithdraw.java src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java src/main/java/com/fireblocks/sdk/model/CantonCallDetails.java @@ -1763,6 +1770,8 @@ src/main/java/com/fireblocks/sdk/model/CreateAddressesReportRequest.java src/main/java/com/fireblocks/sdk/model/CreateAssetsRequest.java src/main/java/com/fireblocks/sdk/model/CreateBlockchainRequest.java src/main/java/com/fireblocks/sdk/model/CreateBlockchainResponse.java +src/main/java/com/fireblocks/sdk/model/CreateBulkSigningKeys.java +src/main/java/com/fireblocks/sdk/model/CreateBulkSigningKeysResponse.java src/main/java/com/fireblocks/sdk/model/CreateConfigOperationRequest.java src/main/java/com/fireblocks/sdk/model/CreateConnectionRequest.java src/main/java/com/fireblocks/sdk/model/CreateConnectionResponse.java @@ -1974,6 +1983,7 @@ src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponse.java src/main/java/com/fireblocks/sdk/model/GetAutomationSettingsResponse.java src/main/java/com/fireblocks/sdk/model/GetBillingInfoResponse.java src/main/java/com/fireblocks/sdk/model/GetBlockchainByIdResponse.java +src/main/java/com/fireblocks/sdk/model/GetBulkSigningKeysJobsResponse.java src/main/java/com/fireblocks/sdk/model/GetByorkVerdictResponse.java src/main/java/com/fireblocks/sdk/model/GetConnectedAccountsCredentialsPublicKeyResponse.java src/main/java/com/fireblocks/sdk/model/GetConnectionsResponse.java @@ -2132,6 +2142,7 @@ src/main/java/com/fireblocks/sdk/model/OfferResponse.java src/main/java/com/fireblocks/sdk/model/OfferResponseAccepted.java src/main/java/com/fireblocks/sdk/model/OfferResponseAllocationAccept.java src/main/java/com/fireblocks/sdk/model/OfferResponseAllocationReject.java +src/main/java/com/fireblocks/sdk/model/OfferResponseAllocationWithdraw.java src/main/java/com/fireblocks/sdk/model/OfferResponseDtccOnboardingAccept.java src/main/java/com/fireblocks/sdk/model/OfferResponseDtccOnboardingReject.java src/main/java/com/fireblocks/sdk/model/OfferResponseTradewebAccept.java @@ -2780,6 +2791,7 @@ src/test/java/com/fireblocks/sdk/BasePathTest.java src/test/java/com/fireblocks/sdk/ConfigurationOptionsTest.java src/test/java/com/fireblocks/sdk/DummyTestKey.txt src/test/java/com/fireblocks/sdk/FireblocksTest.java +src/test/java/com/fireblocks/sdk/LifecycleWarningTest.java src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java src/test/java/com/fireblocks/sdk/ValidationUtilsTest.java src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java @@ -2826,7 +2838,7 @@ src/test/java/com/fireblocks/sdk/api/TagsApiTest.java src/test/java/com/fireblocks/sdk/api/TempoBetaApiTest.java src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java src/test/java/com/fireblocks/sdk/api/TrLinkApiTest.java -src/test/java/com/fireblocks/sdk/api/TradingBetaApiTest.java +src/test/java/com/fireblocks/sdk/api/TradingApiTest.java src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java src/test/java/com/fireblocks/sdk/api/TravelRuleApiTest.java src/test/java/com/fireblocks/sdk/api/UserGroupsBetaApiTest.java @@ -2906,7 +2918,6 @@ src/test/java/com/fireblocks/sdk/model/AddressReverseLookupResponseTest.java src/test/java/com/fireblocks/sdk/model/AddressesFiltersTest.java src/test/java/com/fireblocks/sdk/model/AlertExposureTypeEnumTest.java src/test/java/com/fireblocks/sdk/model/AlertLevelEnumTest.java -src/test/java/com/fireblocks/sdk/model/AllocationWithdrawPayloadTest.java src/test/java/com/fireblocks/sdk/model/AllowListPayloadTest.java src/test/java/com/fireblocks/sdk/model/AllowlistEntryResponseTest.java src/test/java/com/fireblocks/sdk/model/AllowlistEntryStatusTest.java @@ -3006,6 +3017,9 @@ src/test/java/com/fireblocks/sdk/model/BlockchainStateFilterTest.java src/test/java/com/fireblocks/sdk/model/BlockchainTest.java src/test/java/com/fireblocks/sdk/model/BlockchainTransferTest.java src/test/java/com/fireblocks/sdk/model/BpsFeeTest.java +src/test/java/com/fireblocks/sdk/model/BulkProofOfOwnershipTest.java +src/test/java/com/fireblocks/sdk/model/BulkSigningKeyJobTest.java +src/test/java/com/fireblocks/sdk/model/BulkSigningKeyTest.java src/test/java/com/fireblocks/sdk/model/BusinessEntityTypeEnumTest.java src/test/java/com/fireblocks/sdk/model/BusinessIdentificationTest.java src/test/java/com/fireblocks/sdk/model/ByorkConfigResponseTest.java @@ -3021,7 +3035,6 @@ src/test/java/com/fireblocks/sdk/model/CallAcceptedTest.java src/test/java/com/fireblocks/sdk/model/CallbackHandlerRequestTest.java src/test/java/com/fireblocks/sdk/model/CallbackHandlerTest.java src/test/java/com/fireblocks/sdk/model/CancelTransactionResponseTest.java -src/test/java/com/fireblocks/sdk/model/CantonCallAllocationWithdrawTest.java src/test/java/com/fireblocks/sdk/model/CantonCallAllowListAddTest.java src/test/java/com/fireblocks/sdk/model/CantonCallAllowListRemoveTest.java src/test/java/com/fireblocks/sdk/model/CantonCallDetailsTest.java @@ -3139,6 +3152,8 @@ src/test/java/com/fireblocks/sdk/model/CreateAddressesReportRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateAssetsRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateBlockchainRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateBlockchainResponseTest.java +src/test/java/com/fireblocks/sdk/model/CreateBulkSigningKeysResponseTest.java +src/test/java/com/fireblocks/sdk/model/CreateBulkSigningKeysTest.java src/test/java/com/fireblocks/sdk/model/CreateConfigOperationRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateConnectionRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateConnectionResponseTest.java @@ -3350,6 +3365,7 @@ src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetAutomationSettingsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetBillingInfoResponseTest.java src/test/java/com/fireblocks/sdk/model/GetBlockchainByIdResponseTest.java +src/test/java/com/fireblocks/sdk/model/GetBulkSigningKeysJobsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetByorkVerdictResponseTest.java src/test/java/com/fireblocks/sdk/model/GetConnectedAccountsCredentialsPublicKeyResponseTest.java src/test/java/com/fireblocks/sdk/model/GetConnectionsResponseTest.java @@ -3506,6 +3522,7 @@ src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java src/test/java/com/fireblocks/sdk/model/OfferResponseAcceptedTest.java src/test/java/com/fireblocks/sdk/model/OfferResponseAllocationAcceptTest.java src/test/java/com/fireblocks/sdk/model/OfferResponseAllocationRejectTest.java +src/test/java/com/fireblocks/sdk/model/OfferResponseAllocationWithdrawTest.java src/test/java/com/fireblocks/sdk/model/OfferResponseDtccOnboardingAcceptTest.java src/test/java/com/fireblocks/sdk/model/OfferResponseDtccOnboardingRejectTest.java src/test/java/com/fireblocks/sdk/model/OfferResponseTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 1cc50527..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). - -## [v34.0.0](https://github.com/fireblocks/java-sdk/compare/v15.0.0...v34.0.0) - 2026-10-06 - -### Merged - -- Generated SDK #2917861426 [`#160`](https://github.com/fireblocks/java-sdk/pull/160) - -## [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 65657580..1e4ed68d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 34.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:34.0.0" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,9 +55,12 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-34.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` +## Versioning + +This SDK follows [semantic versioning](https://semver.org), with one exception: operations in the `beta` lifecycle state. Beta operations are not generally available and may not be accessible to all customers. They can change or be removed without notice. ## Getting Started ### Initiate Fireblocks Client @@ -135,6 +138,47 @@ CreateTransactionResponse transactionResponse = response.get(); String txId = transactionResponse.getId(); ``` +## API Lifecycle Warnings + +When you call an operation that is not generally available, the SDK logs a warning +naming the operation and its lifecycle state. The state is read from a response +header, so it is always current - it does not depend on the SDK version you have +installed. + +``` +Operation 'createTransaction' is in 'beta' lifecycle state and is not generally available. It may change or be removed without notice. +``` + +Deprecated operations report their sunset date, and the replacement and migration +guide when the API provides them. + +An operation that has been closed answers `410 Gone` to most callers and logs nothing. +If your account still has temporary access to it, calls that are served log a warning +saying so. + +Warnings are emitted through `java.util.logging` at `WARNING` level under their own +logger, `com.fireblocks.sdk.lifecycle`, so you can silence them without also +silencing genuine SDK errors: + +```java +Logger.getLogger("com.fireblocks.sdk.lifecycle").setLevel(Level.SEVERE); +``` + +or in `logging.properties`: + +```properties +com.fireblocks.sdk.lifecycle.level = SEVERE +``` + +If your application bridges JUL to SLF4J (Spring Boot does this by default), the +same logger name works in your Logback or Log4j configuration. + +Or suppress them entirely with an environment variable: + +```shell +export FIREBLOCKS_SDK_SUPPRESS_LIFECYCLE_WARNING=1 +``` + ## Documentation for API Endpoints All URIs are relative to *https://api.fireblocks.io/v1* @@ -333,9 +377,12 @@ Class | Method | HTTP request | Description *InternalWalletsApi* | [**getInternalWalletAssetsPaginated**](docs/InternalWalletsApi.md#getInternalWalletAssetsPaginated) | **GET** /internal_wallets/{walletId}/assets | List assets in an internal wallet (Paginated) *InternalWalletsApi* | [**getInternalWallets**](docs/InternalWalletsApi.md#getInternalWallets) | **GET** /internal_wallets | List internal wallets *InternalWalletsApi* | [**setCustomerRefIdForInternalWallet**](docs/InternalWalletsApi.md#setCustomerRefIdForInternalWallet) | **POST** /internal_wallets/{walletId}/set_customer_ref_id | Set an AML/KYT customer reference ID for internal wallet +*KeyLinkBetaApi* | [**createBulkSigningKeys**](docs/KeyLinkBetaApi.md#createBulkSigningKeys) | **POST** /key_link/signing_keys/bulk | Register signing keys in bulk *KeyLinkBetaApi* | [**createSigningKey**](docs/KeyLinkBetaApi.md#createSigningKey) | **POST** /key_link/signing_keys | Add a new signing key *KeyLinkBetaApi* | [**createValidationKey**](docs/KeyLinkBetaApi.md#createValidationKey) | **POST** /key_link/validation_keys | Add a new validation key *KeyLinkBetaApi* | [**disableValidationKey**](docs/KeyLinkBetaApi.md#disableValidationKey) | **PATCH** /key_link/validation_keys/{keyId} | Disables a validation key +*KeyLinkBetaApi* | [**getBulkSigningKeysJob**](docs/KeyLinkBetaApi.md#getBulkSigningKeysJob) | **GET** /key_link/signing_keys/bulk/jobs/{jobId} | Get a bulk registration job +*KeyLinkBetaApi* | [**getBulkSigningKeysJobs**](docs/KeyLinkBetaApi.md#getBulkSigningKeysJobs) | **GET** /key_link/signing_keys/bulk/jobs | Get bulk registration jobs *KeyLinkBetaApi* | [**getSigningKey**](docs/KeyLinkBetaApi.md#getSigningKey) | **GET** /key_link/signing_keys/{keyId} | Get a signing key by `keyId` *KeyLinkBetaApi* | [**getSigningKeysList**](docs/KeyLinkBetaApi.md#getSigningKeysList) | **GET** /key_link/signing_keys | Get list of signing keys *KeyLinkBetaApi* | [**getValidationKey**](docs/KeyLinkBetaApi.md#getValidationKey) | **GET** /key_link/validation_keys/{keyId} | Get a validation key by `keyId` @@ -509,17 +556,17 @@ Class | Method | HTTP request | Description *TrLinkApi* | [**setTRLinkTransactionTravelRuleMessageId**](docs/TrLinkApi.md#setTRLinkTransactionTravelRuleMessageId) | **POST** /screening/trlink/transaction/{txId}/travel_rule_message_id | Set transaction travel rule message ID *TrLinkApi* | [**testTRLinkIntegrationConnection**](docs/TrLinkApi.md#testTRLinkIntegrationConnection) | **POST** /screening/trlink/customers/integration/{customerIntegrationId}/test_connection | Test connection *TrLinkApi* | [**updateTRLinkCustomer**](docs/TrLinkApi.md#updateTRLinkCustomer) | **PUT** /screening/trlink/customers/{customerId} | Update customer -*TradingBetaApi* | [**createOrder**](docs/TradingBetaApi.md#createOrder) | **POST** /trading/orders | Create an order -*TradingBetaApi* | [**createQuote**](docs/TradingBetaApi.md#createQuote) | **POST** /trading/quotes | Create a quote -*TradingBetaApi* | [**fetchAllOffers**](docs/TradingBetaApi.md#fetchAllOffers) | **POST** /trading/offers | Get all offers -*TradingBetaApi* | [**fetchRates**](docs/TradingBetaApi.md#fetchRates) | **POST** /trading/rates | Get rates -*TradingBetaApi* | [**getOrder**](docs/TradingBetaApi.md#getOrder) | **GET** /trading/orders/{orderId} | Get order details -*TradingBetaApi* | [**getOrderRequirements**](docs/TradingBetaApi.md#getOrderRequirements) | **GET** /trading/orders/{orderId}/requirement | Get order requirement details for an order -*TradingBetaApi* | [**getOrders**](docs/TradingBetaApi.md#getOrders) | **GET** /trading/orders | Get orders -*TradingBetaApi* | [**getTradingProviderById**](docs/TradingBetaApi.md#getTradingProviderById) | **GET** /trading/providers/{providerId} | Get trading provider by ID -*TradingBetaApi* | [**getTradingProviders**](docs/TradingBetaApi.md#getTradingProviders) | **GET** /trading/providers | Get providers -*TradingBetaApi* | [**submitOrderRequirements**](docs/TradingBetaApi.md#submitOrderRequirements) | **POST** /trading/orders/{orderId}/requirement/data | Submit a response to an order requirement -*TradingBetaApi* | [**uploadOrderRequirementFile**](docs/TradingBetaApi.md#uploadOrderRequirementFile) | **POST** /trading/orders/{orderId}/requirement/file | Upload a file for an order requirement +*TradingApi* | [**createOrder**](docs/TradingApi.md#createOrder) | **POST** /trading/orders | Create an order +*TradingApi* | [**createQuote**](docs/TradingApi.md#createQuote) | **POST** /trading/quotes | Create a quote +*TradingApi* | [**fetchAllOffers**](docs/TradingApi.md#fetchAllOffers) | **POST** /trading/offers | Get all offers +*TradingApi* | [**fetchRates**](docs/TradingApi.md#fetchRates) | **POST** /trading/rates | Get rates +*TradingApi* | [**getOrder**](docs/TradingApi.md#getOrder) | **GET** /trading/orders/{orderId} | Get order details +*TradingApi* | [**getOrderRequirements**](docs/TradingApi.md#getOrderRequirements) | **GET** /trading/orders/{orderId}/requirement | Get order requirement details for an order +*TradingApi* | [**getOrders**](docs/TradingApi.md#getOrders) | **GET** /trading/orders | Get orders +*TradingApi* | [**getTradingProviderById**](docs/TradingApi.md#getTradingProviderById) | **GET** /trading/providers/{providerId} | Get trading provider by ID +*TradingApi* | [**getTradingProviders**](docs/TradingApi.md#getTradingProviders) | **GET** /trading/providers | Get providers +*TradingApi* | [**submitOrderRequirements**](docs/TradingApi.md#submitOrderRequirements) | **POST** /trading/orders/{orderId}/requirement/data | Submit a response to an order requirement +*TradingApi* | [**uploadOrderRequirementFile**](docs/TradingApi.md#uploadOrderRequirementFile) | **POST** /trading/orders/{orderId}/requirement/file | Upload a file for an order requirement *TransactionsApi* | [**cancelTransaction**](docs/TransactionsApi.md#cancelTransaction) | **POST** /transactions/{txId}/cancel | Cancel a transaction *TransactionsApi* | [**createTransaction**](docs/TransactionsApi.md#createTransaction) | **POST** /transactions | Create a new transaction *TransactionsApi* | [**dropTransaction**](docs/TransactionsApi.md#dropTransaction) | **POST** /transactions/{txId}/drop | Drop ETH (EVM) transaction by ID @@ -582,7 +629,6 @@ Class | Method | HTTP request | Description *VaultsApi* | [**getVaultBalanceByAsset**](docs/VaultsApi.md#getVaultBalanceByAsset) | **GET** /vault/assets/{assetId} | Get vault balance by an asset *VaultsApi* | [**hideVaultAccount**](docs/VaultsApi.md#hideVaultAccount) | **POST** /vault/accounts/{vaultAccountId}/hide | Hide a vault account in the console *VaultsApi* | [**lookupVaultByAddress**](docs/VaultsApi.md#lookupVaultByAddress) | **GET** /vault/lookup_by_address | Look up a vault account by blockchain address -*VaultsApi* | [**registerTempoOmnibusWallet**](docs/VaultsApi.md#registerTempoOmnibusWallet) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/omnibus/tempo/register | Register a Tempo omnibus wallet *VaultsApi* | [**setCustomerRefIdForAddress**](docs/VaultsApi.md#setCustomerRefIdForAddress) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/set_customer_ref_id | Assign AML customer reference ID *VaultsApi* | [**setUsdcGatewayDepositAutomationBeta**](docs/VaultsApi.md#setUsdcGatewayDepositAutomationBeta) | **POST** /vault/accounts/{vaultAccountId}/virtual_asset_wallet/usdc_gateway/deposit_automation | Set up a USDC Gateway deposit automation for a vault account *VaultsApi* | [**setVaultAccountAutoFuel**](docs/VaultsApi.md#setVaultAccountAutoFuel) | **POST** /vault/accounts/{vaultAccountId}/set_auto_fuel | Set auto fueling to on or off @@ -698,7 +744,6 @@ Class | Method | HTTP request | Description - [AddressesFilters](docs/AddressesFilters.md) - [AlertExposureTypeEnum](docs/AlertExposureTypeEnum.md) - [AlertLevelEnum](docs/AlertLevelEnum.md) - - [AllocationWithdrawPayload](docs/AllocationWithdrawPayload.md) - [AllowListPayload](docs/AllowListPayload.md) - [AllowlistEntry](docs/AllowlistEntry.md) - [AllowlistEntryResponse](docs/AllowlistEntryResponse.md) @@ -798,6 +843,9 @@ Class | Method | HTTP request | Description - [BlockchainStateFilter](docs/BlockchainStateFilter.md) - [BlockchainTransfer](docs/BlockchainTransfer.md) - [BpsFee](docs/BpsFee.md) + - [BulkProofOfOwnership](docs/BulkProofOfOwnership.md) + - [BulkSigningKey](docs/BulkSigningKey.md) + - [BulkSigningKeyJob](docs/BulkSigningKeyJob.md) - [BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md) - [BusinessIdentification](docs/BusinessIdentification.md) - [ByorkConfigResponse](docs/ByorkConfigResponse.md) @@ -814,7 +862,6 @@ Class | Method | HTTP request | Description - [CallbackHandlerRequest](docs/CallbackHandlerRequest.md) - [CancelTransactionResponse](docs/CancelTransactionResponse.md) - [CantonCall](docs/CantonCall.md) - - [CantonCallAllocationWithdraw](docs/CantonCallAllocationWithdraw.md) - [CantonCallAllowListAdd](docs/CantonCallAllowListAdd.md) - [CantonCallAllowListRemove](docs/CantonCallAllowListRemove.md) - [CantonCallDetails](docs/CantonCallDetails.md) @@ -931,6 +978,8 @@ Class | Method | HTTP request | Description - [CreateAssetsRequest](docs/CreateAssetsRequest.md) - [CreateBlockchainRequest](docs/CreateBlockchainRequest.md) - [CreateBlockchainResponse](docs/CreateBlockchainResponse.md) + - [CreateBulkSigningKeys](docs/CreateBulkSigningKeys.md) + - [CreateBulkSigningKeysResponse](docs/CreateBulkSigningKeysResponse.md) - [CreateConfigOperationRequest](docs/CreateConfigOperationRequest.md) - [CreateConnectionRequest](docs/CreateConnectionRequest.md) - [CreateConnectionResponse](docs/CreateConnectionResponse.md) @@ -1142,6 +1191,7 @@ Class | Method | HTTP request | Description - [GetAutomationSettingsResponse](docs/GetAutomationSettingsResponse.md) - [GetBillingInfoResponse](docs/GetBillingInfoResponse.md) - [GetBlockchainByIdResponse](docs/GetBlockchainByIdResponse.md) + - [GetBulkSigningKeysJobsResponse](docs/GetBulkSigningKeysJobsResponse.md) - [GetByorkVerdictResponse](docs/GetByorkVerdictResponse.md) - [GetConnectedAccountsCredentialsPublicKeyResponse](docs/GetConnectedAccountsCredentialsPublicKeyResponse.md) - [GetConnectionsResponse](docs/GetConnectionsResponse.md) @@ -1300,6 +1350,7 @@ Class | Method | HTTP request | Description - [OfferResponseAccepted](docs/OfferResponseAccepted.md) - [OfferResponseAllocationAccept](docs/OfferResponseAllocationAccept.md) - [OfferResponseAllocationReject](docs/OfferResponseAllocationReject.md) + - [OfferResponseAllocationWithdraw](docs/OfferResponseAllocationWithdraw.md) - [OfferResponseDtccOnboardingAccept](docs/OfferResponseDtccOnboardingAccept.md) - [OfferResponseDtccOnboardingReject](docs/OfferResponseDtccOnboardingReject.md) - [OfferResponseTradewebAccept](docs/OfferResponseTradewebAccept.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index bf19ac08..40cbdb71 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -2575,11 +2575,13 @@ paths: /operations/canton/calls: post: description: |- - Submits one Canton call. `type` names the call and selects the shape of `payload`. + Submits one Canton call. `type` names the call and selects the shape of `payload`; `vaultAccountId` and `blockchainId` name the wallet that makes it, and are the same for every `type`. + {"type":"DTCC_END_INVESTOR_INVITE","vaultAccountId":"12","blockchainId":"CANTON", "payload":{"endInvestor":"investor-party::1220abc…"}} + `payload` is optional on `DTCC_PARTICIPANT_ONBOARDING`, where every field it holds is. An unknown or missing `type`, or a `payload` missing a required field, is a `400`. A field that does not belong to the selected `type` is ignored rather than rejected. A `501` has two different causes, and the distinction is permanent rather than a build-order detail, so it belongs in the published spec: NO CANTON CAPABILITY — specified so the contract is complete, but not available in v1: `DTCC_END_INVESTOR_INVITE_CANCEL`, `DTCC_ALLOW_LIST_ADD`, `DTCC_ALLOW_LIST_REMOVE`. NO HANDLER YET — the capability exists and the type is being wired one slice at a time. - `ALLOCATION_WITHDRAW` is implemented and answers `201` / `400` / `404` / `409`. + To withdraw an allocation, answer the allocation offer with `ALLOCATION_WITHDRAW` on `/offers/{offerId}/responses` — it is not a call. operationId: createCantonCall parameters: - description: "A unique identifier for the request. If the request is sent\ @@ -2625,7 +2627,7 @@ paths: schema: $ref: "#/components/schemas/ErrorSchema" description: "No Canton wallet for this vault account and blockchainId,\ - \ or an unknown transaction id for this tenant" + \ or an unknown end investor for this tenant" headers: X-Request-ID: $ref: "#/components/headers/X-Request-ID" @@ -2663,6 +2665,7 @@ paths: description: |- ONE endpoint for every offer. `responseType` selects the variant, and `payload` carries that variant's arguments — the same `{discriminator, payload}` shape `/calls` uses. The union is closed, so an unknown `responseType` is a `400`. {"responseType":"DTCC_END_INVESTOR_ONBOARDING_REJECT","payload":{"reason":"KYC"}} {"responseType":"ALLOCATION_ACCEPT"} + An allocation offer takes three answers, all on the offer's own id: `ALLOCATION_ACCEPT`, `ALLOCATION_REJECT`, and — once the accept has settled — `ALLOCATION_WITHDRAW`, which unlocks the holding the accept allocated. Sent earlier, the withdraw is a `409`. `payload` appears ONLY on the variants that take arguments. A variant with no arguments has no `payload` property at all, rather than an empty object — so the schema says what the ledger says, and a future type that needs fields declares its own instead of widening this envelope. `responseType` is a direct copy of a value the caller already read off the offer, in `cantonDetails.offerResponse.availableResponses`. Both sides share one flat vocabulary, so there is nothing to translate; the previous shape required pairing that value with a matching `domain` string, which carried no information `responseType` did not already determine. operationId: respondToCantonOffer @@ -2729,8 +2732,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorSchema" - description: "The offer is not answerable — already answered, expired, or\ - \ a response is in flight" + description: "The offer cannot take this response now. An accept or reject:\ + \ the offer is already answered, expired, or a response is in flight.\ + \ ALLOCATION_WITHDRAW — which is sent AFTER the accept, on the same offer:\ + \ the allocation is not ALLOCATED, because the accept has not settled\ + \ yet, or it was already withdrawn or settled by the venue. The message\ + \ names the state." headers: X-Request-ID: $ref: "#/components/headers/X-Request-ID" @@ -7388,6 +7395,7 @@ paths: delete: description: |- Requests deletion of a console user. The request is asynchronous: it goes through the workspace's configured "Delete users" approval policy (Settings > Quorums), exactly as deleting a user from the console does, and the user is removed only once that approval completes. + - The workspace must have a "Delete users" approval policy (admin quorum or approval group). If "Delete users" is Owner-only, which is the default, the request is refused with OWNER_ONLY (2760) and the Owner deletes users in the Console. With an admin quorum, the requesting API user's own approval counts toward the quorum. - Track progress by polling GET /management/users; deletion is complete when the user is disabled. - Please note that this endpoint is available only for API keys with Admin/Non Signing Admin/Security Admin permissions. Endpoint Permission: Admin, Non-Signing Admin, Security Admin. @@ -7451,7 +7459,10 @@ paths: schema: $ref: "#/components/schemas/ErrorSchema" description: "Lacking permissions, or the target cannot be deleted: the\ - \ user is the workspace Owner, or the caller is the target." + \ user is the workspace Owner, or the caller is the target. Also returned\ + \ as OWNER_ONLY (2760) when the workspace's \"Delete users\" approval\ + \ is Owner-only; set an approval policy in the Console under Settings\ + \ > Quorums." headers: X-Request-ID: $ref: "#/components/headers/X-Request-ID" @@ -7507,7 +7518,7 @@ paths: - Console User x-rate-limit-category: write x-lifecycle: - state: private_beta + state: beta x-readme: code-samples: - language: javascript @@ -15788,6 +15799,204 @@ paths: x-content-type: application/json x-accepts: - application/json + /key_link/signing_keys/bulk: + post: + description: "Accepts a set of signing keys certified by a single validation\ + \ key and queues them for registration in the background. Returns a job id\ + \ to poll. A workspace can have one bulk registration at a time; submitting\ + \ another while one is QUEUED or IN_PROGRESS is rejected with 409. Bulk registrations\ + \ from different workspaces share a limited number of slots, so a job may\ + \ wait QUEUED behind another workspace's before it starts. Keys already registered\ + \ in the workspace are recognized and skipped, so resubmitting the same request\ + \ after a failure is safe and only processes what is missing. Every key must\ + \ carry its own proof of ownership; a bulk registration has no interactive\ + \ step in which one can arrive later." + operationId: createBulkSigningKeys + 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 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateBulkSigningKeys" + required: true + responses: + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/CreateBulkSigningKeysResponse" + description: Registration is queued + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "409": + $ref: "#/components/responses/Error" + default: + $ref: "#/components/responses/Error" + summary: Register signing keys in bulk + tags: + - Key Link (Beta) + x-rate-limit-category: async + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.keyLinkBeta.createBulkSigningKeys(keyLinkBetaApiCreateBulkSigningKeysRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.keyLinkBeta().createBulkSigningKeys(createBulkSigningKeys,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.key_link_beta.create_bulk_signing_keys(create_bulk_signing_keys,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.keyLinkBeta.createBulkSigningKeys(keyLinkBetaApiCreateBulkSigningKeysRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.keyLinkBeta().createBulkSigningKeys(createBulkSigningKeys,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.key_link_beta.create_bulk_signing_keys(create_bulk_signing_keys,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: + - application/json + /key_link/signing_keys/bulk/jobs: + get: + description: "Returns the workspace's bulk registration jobs, newest first,\ + \ a page at a time." + operationId: getBulkSigningKeysJobs + parameters: + - description: Cursor to the next page + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Amount of results to return in the next page + explode: true + in: query + name: pageSize + required: false + schema: + default: 10 + maximum: 50 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetBulkSigningKeysJobsResponse" + description: Bulk registration jobs for the workspace + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get bulk registration jobs + tags: + - Key Link (Beta) + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.keyLinkBeta.getBulkSigningKeysJobs(keyLinkBetaApiGetBulkSigningKeysJobsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.keyLinkBeta().getBulkSigningKeysJobs(pageCursor, pageSize);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.key_link_beta.get_bulk_signing_keys_jobs(page_cursor,\ + \ page_size);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.keyLinkBeta.getBulkSigningKeysJobs(keyLinkBetaApiGetBulkSigningKeysJobsRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.keyLinkBeta().getBulkSigningKeysJobs(pageCursor, pageSize);" + - lang: Python + source: "response = fireblocks.key_link_beta.get_bulk_signing_keys_jobs(page_cursor,\ + \ page_size);" + x-accepts: + - application/json + /key_link/signing_keys/bulk/jobs/{jobId}: + get: + description: Returns the progress and outcome of a bulk registration job. `created + + alreadyRegistered` reaching `total` means every submitted key is present. + operationId: getBulkSigningKeysJob + parameters: + - description: The id of the bulk registration job + example: 46a92767-5f93-4a46-9eed-f012196bb4fc + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/BulkSigningKeyJob" + description: The bulk registration job + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get a bulk registration job + tags: + - Key Link (Beta) + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.keyLinkBeta.getBulkSigningKeysJob(keyLinkBetaApiGetBulkSigningKeysJobRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.keyLinkBeta().getBulkSigningKeysJob(jobId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.key_link_beta.get_bulk_signing_keys_job(job_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.keyLinkBeta.getBulkSigningKeysJob(keyLinkBetaApiGetBulkSigningKeysJobRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.keyLinkBeta().getBulkSigningKeysJob(jobId); + - lang: Python + source: response = fireblocks.key_link_beta.get_bulk_signing_keys_job(job_id); + x-accepts: + - application/json /key_link/validation_keys: get: description: Returns the list of validation keys in the workspace @@ -28264,10 +28473,6 @@ paths: If no slippageBps is provided, it defaults to 50 bps (0.5%). Slippage and settlement configuration do not affect the returned rate. - Note: These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -28352,29 +28557,29 @@ paths: $ref: "#/components/responses/Error" summary: Get all offers tags: - - Trading (Beta) + - Trading x-rate-limit-category: external_query x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.tradingBeta.fetchAllOffers(tradingBetaApiFetchAllOffersRequest);" + code: "const response: Promise> = fireblocks.trading.fetchAllOffers(tradingApiFetchAllOffersRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.tradingBeta().fetchAllOffers(createOffersRequest,\ + code: "CompletableFuture> response = fireblocks.trading().fetchAllOffers(createOffersRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.trading_beta.fetch_all_offers(create_offers_request,\ + code: "response = fireblocks.trading.fetch_all_offers(create_offers_request,\ \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tradingBeta.fetchAllOffers(tradingBetaApiFetchAllOffersRequest);" + source: "const response: Promise> = fireblocks.trading.fetchAllOffers(tradingApiFetchAllOffersRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.tradingBeta().fetchAllOffers(createOffersRequest,\ + source: "CompletableFuture> response = fireblocks.trading().fetchAllOffers(createOffersRequest,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.trading_beta.fetch_all_offers(create_offers_request,\ + source: "response = fireblocks.trading.fetch_all_offers(create_offers_request,\ \ idempotency_key);" x-content-type: application/json x-accepts: @@ -28384,10 +28589,6 @@ paths: description: |- Retrieve a paginated list of orders with optional filtering by account, provider, status, and time range. - Note:These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -28534,33 +28735,33 @@ paths: $ref: "#/components/responses/Error" summary: Get orders tags: - - Trading (Beta) + - Trading x-rate-limit-category: read x-readme: code-samples: - language: typescript code: "const response: Promise> =\ - \ fireblocks.tradingBeta.getOrders(tradingBetaApiGetOrdersRequest);" + \ fireblocks.trading.getOrders(tradingApiGetOrdersRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.tradingBeta().getOrders(pageSize,\ + code: "CompletableFuture> response = fireblocks.trading().getOrders(pageSize,\ \ pageCursor, order, accountId, providerId, statuses, startTime, endTime,\ \ assetConversionType);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.trading_beta.get_orders(page_size, page_cursor,\ + code: "response = fireblocks.trading.get_orders(page_size, page_cursor,\ \ order, account_id, provider_id, statuses, start_time, end_time, asset_conversion_type);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise> =\ - \ fireblocks.tradingBeta.getOrders(tradingBetaApiGetOrdersRequest);" + \ fireblocks.trading.getOrders(tradingApiGetOrdersRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.tradingBeta().getOrders(pageSize,\ + source: "CompletableFuture> response = fireblocks.trading().getOrders(pageSize,\ \ pageCursor, order, accountId, providerId, statuses, startTime, endTime,\ \ assetConversionType);" - lang: Python - source: "response = fireblocks.trading_beta.get_orders(page_size, page_cursor,\ + source: "response = fireblocks.trading.get_orders(page_size, page_cursor,\ \ order, account_id, provider_id, statuses, start_time, end_time, asset_conversion_type);" x-accepts: - application/json @@ -28568,10 +28769,6 @@ paths: description: |- Create an order to buy or sell an asset. If no source is given, an external source will be use. - Note: These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -28656,29 +28853,29 @@ paths: $ref: "#/components/responses/Error" summary: Create an order tags: - - Trading (Beta) + - Trading x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.tradingBeta.createOrder(tradingBetaApiCreateOrderRequest);" + code: "const response: Promise> = fireblocks.trading.createOrder(tradingApiCreateOrderRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.tradingBeta().createOrder(createOrderRequest,\ + code: "CompletableFuture> response = fireblocks.trading().createOrder(createOrderRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.trading_beta.create_order(create_order_request,\ + code: "response = fireblocks.trading.create_order(create_order_request,\ \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tradingBeta.createOrder(tradingBetaApiCreateOrderRequest);" + source: "const response: Promise> = fireblocks.trading.createOrder(tradingApiCreateOrderRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.tradingBeta().createOrder(createOrderRequest,\ + source: "CompletableFuture> response = fireblocks.trading().createOrder(createOrderRequest,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.trading_beta.create_order(create_order_request,\ + source: "response = fireblocks.trading.create_order(create_order_request,\ \ idempotency_key);" x-content-type: application/json x-accepts: @@ -28688,10 +28885,6 @@ paths: description: |- Retrieve detailed information about a specific order by its ID. - Note:These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -28767,26 +28960,26 @@ paths: $ref: "#/components/responses/Error" summary: Get order details tags: - - Trading (Beta) + - Trading x-rate-limit-category: read x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.tradingBeta.getOrder(tradingBetaApiGetOrderRequest);" + code: "const response: Promise> = fireblocks.trading.getOrder(tradingApiGetOrderRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.tradingBeta().getOrder(orderId); + code: CompletableFuture> response = fireblocks.trading().getOrder(orderId); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.trading_beta.get_order(order_id); + code: response = fireblocks.trading.get_order(order_id); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tradingBeta.getOrder(tradingBetaApiGetOrderRequest);" + source: "const response: Promise> = fireblocks.trading.getOrder(tradingApiGetOrderRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.tradingBeta().getOrder(orderId); + source: CompletableFuture> response = fireblocks.trading().getOrder(orderId); - lang: Python - source: response = fireblocks.trading_beta.get_order(order_id); + source: response = fireblocks.trading.get_order(order_id); x-accepts: - application/json /trading/orders/{orderId}/requirement: @@ -28799,10 +28992,6 @@ paths: `POST /trading/orders/{orderId}/requirement/data`, and `requiredFiles` descriptors for any files the provider requires (uploaded via `POST /trading/orders/{orderId}/requirement/file`). - Note: These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -28888,30 +29077,30 @@ paths: $ref: "#/components/responses/Error" summary: Get order requirement details for an order tags: - - Trading (Beta) + - Trading x-rate-limit-category: read x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.tradingBeta.getOrderRequirements(tradingBetaApiGetOrderRequirementsRequest);" + \ = fireblocks.trading.getOrderRequirements(tradingApiGetOrderRequirementsRequest);" name: Fireblocks SDK TypeScript example - language: java code: CompletableFuture> response = - fireblocks.tradingBeta().getOrderRequirements(orderId); + fireblocks.trading().getOrderRequirements(orderId); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.trading_beta.get_order_requirements(order_id); + code: response = fireblocks.trading.get_order_requirements(order_id); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.tradingBeta.getOrderRequirements(tradingBetaApiGetOrderRequirementsRequest);" + \ = fireblocks.trading.getOrderRequirements(tradingApiGetOrderRequirementsRequest);" - lang: Java source: CompletableFuture> response = - fireblocks.tradingBeta().getOrderRequirements(orderId); + fireblocks.trading().getOrderRequirements(orderId); - lang: Python - source: response = fireblocks.trading_beta.get_order_requirements(order_id); + source: response = fireblocks.trading.get_order_requirements(order_id); x-accepts: - application/json /trading/orders/{orderId}/requirement/data: @@ -28923,10 +29112,6 @@ paths: returned by the GET endpoint. Any required files are uploaded separately via `POST /trading/orders/{orderId}/requirement/file`. - Note: These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -29036,29 +29221,29 @@ paths: $ref: "#/components/responses/Error" summary: Submit a response to an order requirement tags: - - Trading (Beta) + - Trading x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.tradingBeta.submitOrderRequirements(tradingBetaApiSubmitOrderRequirementsRequest);" + code: "const response: Promise> = fireblocks.trading.submitOrderRequirements(tradingApiSubmitOrderRequirementsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.tradingBeta().submitOrderRequirements(submitOrderRequirementRequest,\ + code: "CompletableFuture> response = fireblocks.trading().submitOrderRequirements(submitOrderRequirementRequest,\ \ orderId, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.trading_beta.submit_order_requirements(submit_order_requirement_request,\ + code: "response = fireblocks.trading.submit_order_requirements(submit_order_requirement_request,\ \ order_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tradingBeta.submitOrderRequirements(tradingBetaApiSubmitOrderRequirementsRequest);" + source: "const response: Promise> = fireblocks.trading.submitOrderRequirements(tradingApiSubmitOrderRequirementsRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.tradingBeta().submitOrderRequirements(submitOrderRequirementRequest,\ + source: "CompletableFuture> response = fireblocks.trading().submitOrderRequirements(submitOrderRequirementRequest,\ \ orderId, idempotencyKey);" - lang: Python - source: "response = fireblocks.trading_beta.submit_order_requirements(submit_order_requirement_request,\ + source: "response = fireblocks.trading.submit_order_requirements(submit_order_requirement_request,\ \ order_id, idempotency_key);" x-content-type: application/json x-accepts: @@ -29074,10 +29259,6 @@ paths: underlying provider. The textual response is submitted separately via `POST /trading/orders/{orderId}/requirement/data`. - Note: These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -29186,29 +29367,29 @@ paths: $ref: "#/components/responses/Error" summary: Upload a file for an order requirement tags: - - Trading (Beta) + - Trading x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.tradingBeta.uploadOrderRequirementFile(tradingBetaApiUploadOrderRequirementFileRequest);" + code: "const response: Promise> = fireblocks.trading.uploadOrderRequirementFile(tradingApiUploadOrderRequirementFileRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.tradingBeta().uploadOrderRequirementFile(orderId,\ + code: "CompletableFuture> response = fireblocks.trading().uploadOrderRequirementFile(orderId,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.trading_beta.upload_order_requirement_file(order_id,\ + code: "response = fireblocks.trading.upload_order_requirement_file(order_id,\ \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tradingBeta.uploadOrderRequirementFile(tradingBetaApiUploadOrderRequirementFileRequest);" + source: "const response: Promise> = fireblocks.trading.uploadOrderRequirementFile(tradingApiUploadOrderRequirementFileRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.tradingBeta().uploadOrderRequirementFile(orderId,\ + source: "CompletableFuture> response = fireblocks.trading().uploadOrderRequirementFile(orderId,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.trading_beta.upload_order_requirement_file(order_id,\ + source: "response = fireblocks.trading.upload_order_requirement_file(order_id,\ \ idempotency_key);" x-content-type: multipart/form-data x-accepts: @@ -29218,8 +29399,6 @@ paths: description: | Retrieve a list of all available external providers supporting trading activities through the platform. - **Note:** These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -29296,32 +29475,30 @@ paths: $ref: "#/components/responses/Error" summary: Get providers tags: - - Trading (Beta) + - Trading x-rate-limit-category: query x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.tradingBeta.getTradingProviders(tradingBetaApiGetTradingProvidersRequest);" + \ = fireblocks.trading.getTradingProviders(tradingApiGetTradingProvidersRequest);" name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response =\ - \ fireblocks.tradingBeta().getTradingProviders(pageSize, pageCursor);" + \ fireblocks.trading().getTradingProviders(pageSize, pageCursor);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.trading_beta.get_trading_providers(page_size,\ - \ page_cursor);" + code: "response = fireblocks.trading.get_trading_providers(page_size, page_cursor);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.tradingBeta.getTradingProviders(tradingBetaApiGetTradingProvidersRequest);" + \ = fireblocks.trading.getTradingProviders(tradingApiGetTradingProvidersRequest);" - lang: Java source: "CompletableFuture> response =\ - \ fireblocks.tradingBeta().getTradingProviders(pageSize, pageCursor);" + \ fireblocks.trading().getTradingProviders(pageSize, pageCursor);" - lang: Python - source: "response = fireblocks.trading_beta.get_trading_providers(page_size,\ - \ page_cursor);" + source: "response = fireblocks.trading.get_trading_providers(page_size, page_cursor);" x-accepts: - application/json /trading/providers/{providerId}: @@ -29329,8 +29506,6 @@ paths: description: | Retrieve a single provider by ID. - **Note:** These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -29406,26 +29581,26 @@ paths: $ref: "#/components/responses/Error" summary: Get trading provider by ID tags: - - Trading (Beta) + - Trading x-rate-limit-category: read x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.tradingBeta.getTradingProviderById(tradingBetaApiGetTradingProviderByIdRequest);" + code: "const response: Promise> = fireblocks.trading.getTradingProviderById(tradingApiGetTradingProviderByIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.tradingBeta().getTradingProviderById(providerId); + code: CompletableFuture> response = fireblocks.trading().getTradingProviderById(providerId); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.trading_beta.get_trading_provider_by_id(provider_id); + code: response = fireblocks.trading.get_trading_provider_by_id(provider_id); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tradingBeta.getTradingProviderById(tradingBetaApiGetTradingProviderByIdRequest);" + source: "const response: Promise> = fireblocks.trading.getTradingProviderById(tradingApiGetTradingProviderByIdRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.tradingBeta().getTradingProviderById(providerId); + source: CompletableFuture> response = fireblocks.trading().getTradingProviderById(providerId); - lang: Python - source: response = fireblocks.trading_beta.get_trading_provider_by_id(provider_id); + source: response = fireblocks.trading.get_trading_provider_by_id(provider_id); x-accepts: - application/json /trading/quotes: @@ -29433,10 +29608,6 @@ paths: description: |- Generate a time-limited quote for asset conversion, providing exchange rate and amount calculations. - Note: These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -29521,28 +29692,28 @@ paths: $ref: "#/components/responses/Error" summary: Create a quote tags: - - Trading (Beta) + - Trading x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.tradingBeta.createQuote(tradingBetaApiCreateQuoteRequest);" + code: "const response: Promise> = fireblocks.trading.createQuote(tradingApiCreateQuoteRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.tradingBeta().createQuote(createQuote,\ + code: "CompletableFuture> response = fireblocks.trading().createQuote(createQuote,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.trading_beta.create_quote(create_quote, idempotency_key);" + code: "response = fireblocks.trading.create_quote(create_quote, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tradingBeta.createQuote(tradingBetaApiCreateQuoteRequest);" + source: "const response: Promise> = fireblocks.trading.createQuote(tradingApiCreateQuoteRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.tradingBeta().createQuote(createQuote,\ + source: "CompletableFuture> response = fireblocks.trading().createQuote(createQuote,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.trading_beta.create_quote(create_quote, idempotency_key);" + source: "response = fireblocks.trading.create_quote(create_quote, idempotency_key);" x-content-type: application/json x-accepts: - application/json @@ -29552,10 +29723,6 @@ paths: Retrieve indicative exchange rate from specified providers for a given asset pair. Rates are non-executable price signals intended for discovery and display purposes. - Note: These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -29640,28 +29807,28 @@ paths: $ref: "#/components/responses/Error" summary: Get rates tags: - - Trading (Beta) + - Trading x-rate-limit-category: external_query x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.tradingBeta.fetchRates(tradingBetaApiFetchRatesRequest);" + code: "const response: Promise> = fireblocks.trading.fetchRates(tradingApiFetchRatesRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.tradingBeta().fetchRates(ratesRequest,\ + code: "CompletableFuture> response = fireblocks.trading().fetchRates(ratesRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.trading_beta.fetch_rates(rates_request, idempotency_key);" + code: "response = fireblocks.trading.fetch_rates(rates_request, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tradingBeta.fetchRates(tradingBetaApiFetchRatesRequest);" + source: "const response: Promise> = fireblocks.trading.fetchRates(tradingApiFetchRatesRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.tradingBeta().fetchRates(ratesRequest,\ + source: "CompletableFuture> response = fireblocks.trading().fetchRates(ratesRequest,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.trading_beta.fetch_rates(rates_request, idempotency_key);" + source: "response = fireblocks.trading.fetch_rates(rates_request, idempotency_key);" x-content-type: application/json x-accepts: - application/json @@ -36051,88 +36218,6 @@ paths: \ address, min_amount, max_amount);" x-accepts: - application/json - /vault/accounts/{vaultAccountId}/{assetId}/omnibus/tempo/register: - post: - description: |- - Registers a Tempo omnibus wallet for the requested vault account. - Triggering this flow requires the vault account to hold PATH_USD with a balance sufficient to cover the gas fee. - Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - operationId: registerTempoOmnibusWallet - parameters: - - description: The ID of the vault account for which to register the Tempo wallet. - explode: false - in: path - name: vaultAccountId - required: true - schema: - format: numeric - type: string - x-fb-entity: vault_account - style: simple - - description: The Tempo network asset to register for the vault account. - explode: false - in: path - name: assetId - required: true - schema: - type: string - x-fb-entity: asset - 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 - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/CreateVaultAssetResponse" - description: OK - headers: - X-Request-ID: - $ref: "#/components/headers/X-Request-ID" - default: - $ref: "#/components/responses/Error" - summary: Register a Tempo omnibus wallet - tags: - - Vaults - x-rate-limit-category: write - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.vaults.registerTempoOmnibusWallet(vaultsApiRegisterTempoOmnibusWalletRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: "CompletableFuture> response\ - \ = fireblocks.vaults().registerTempoOmnibusWallet(vaultAccountId, assetId,\ - \ idempotencyKey);" - name: Fireblocks SDK Java example - - language: python - code: "response = fireblocks.vaults.register_tempo_omnibus_wallet(vault_account_id,\ - \ asset_id, idempotency_key);" - name: Fireblocks SDK Python example - x-codeSamples: - - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.vaults.registerTempoOmnibusWallet(vaultsApiRegisterTempoOmnibusWalletRequest);" - - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.vaults().registerTempoOmnibusWallet(vaultAccountId, assetId,\ - \ idempotencyKey);" - - lang: Python - source: "response = fireblocks.vaults.register_tempo_omnibus_wallet(vault_account_id,\ - \ asset_id, idempotency_key);" - x-accepts: - - application/json /vault/accounts/{vaultAccountId}/{assetId}/unspent_inputs: get: description: |- @@ -45479,6 +45564,189 @@ components: required: - agentUserId type: object + BulkProofOfOwnership: + description: "Proof that the customer holds the private key. Required for every\ + \ key, unlike the single key endpoint: bulk registration has no interactive\ + \ step in which a proof can arrive later." + properties: + message: + description: The message to be signed by the key as proof of ownership. + 64 to 1024 bytes in hexadecimal format. + example: 46697265626c6f636b737c50726f6f66206f66204f776e6572736869702e2e2e + maxLength: 2048 + minLength: 64 + type: string + signature: + description: The signature of the message. 64 bytes in hexadecimal format. + example: 67bf2628888b677a249c694fe03c90bcb160de5b1c0ad9a6bbd6ab5f3f7c1f9d0a2e4c6b8d0f2a4c6e8b0d2f4a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4 + maxLength: 128 + minLength: 128 + type: string + required: + - message + - signature + type: object + BulkSigningKey: + properties: + signingDeviceKeyId: + description: "The ID, name or label of the key specified on the customer's\ + \ signing device." + example: MyKey1 + maxLength: 256 + type: string + signedCertPem: + description: "The signed certificate that includes the public key PEM of\ + \ the signing key, signed by the validation key declared for the request." + example: '-----BEGIN CERTIFICATE ... END CERTIFICATE-----' + type: string + agentUserId: + description: Id of user to which this key belongs + example: d18847b5-1df6-4c46-8f99-5cce47284529 + maxLength: 36 + minLength: 36 + type: string + proofOfOwnership: + $ref: "#/components/schemas/BulkProofOfOwnership" + required: + - agentUserId + - proofOfOwnership + - signedCertPem + - signingDeviceKeyId + type: object + CreateBulkSigningKeys: + example: + validationKeyId: fb5d0a66-ca01-44f0-9080-8c3282964a23 + keys: [] + properties: + validationKeyId: + description: "The id of the validation key that signed every certificate\ + \ in this request, as returned when the validation key was registered.\ + \ Not the signingDeviceKeyId of any signing key." + example: fb5d0a66-ca01-44f0-9080-8c3282964a23 + maxLength: 64 + type: string + keys: + description: The signing keys to register. + example: [] + items: + $ref: "#/components/schemas/BulkSigningKey" + maxItems: 10000 + minItems: 1 + type: array + required: + - keys + - validationKeyId + type: object + CreateBulkSigningKeysResponse: + example: + jobId: 46a92767-5f93-4a46-9eed-f012196bb4fc + properties: + jobId: + description: Id of the registration job. Poll it for progress. + example: 46a92767-5f93-4a46-9eed-f012196bb4fc + type: string + required: + - jobId + type: object + BulkSigningKeyJob: + example: + jobId: 46a92767-5f93-4a46-9eed-f012196bb4fc + reason: reason + createdAt: 124757537 + total: 10000 + created: 5700 + alreadyRegistered: 4300 + fileHash: 2fbd1d6db47ea4d7599c81a30b6f31ff6728661c842414d4510718e109253d98 + failed: 0 + status: COMPLETED + updatedAt: 124757537 + properties: + jobId: + description: Id of the registration job. + example: 46a92767-5f93-4a46-9eed-f012196bb4fc + type: string + status: + description: "QUEUED means the job is waiting for another bulk registration\ + \ to finish, since only a limited number run at once. IN_PROGRESS means\ + \ it is running. COMPLETED means every submitted key is present in the\ + \ workspace. FAILED means the request was refused before any key was registered,\ + \ so `reason` has to be acted on before resubmitting is worth anything.\ + \ INCOMPLETE means some keys are not registered; resubmitting the same\ + \ request retries exactly those, and `reason` says whether that is likely\ + \ to help -- keys not registered because of a transient failure will succeed,\ + \ a key whose certificate or proof was rejected will be rejected again." + enum: + - QUEUED + - IN_PROGRESS + - COMPLETED + - INCOMPLETE + - FAILED + example: COMPLETED + type: string + total: + description: Keys in the submitted request. + example: 10000 + type: number + created: + description: Keys registered by this job. + example: 5700 + type: number + alreadyRegistered: + description: "Keys already present in the workspace, recognized and skipped." + example: 4300 + type: number + failed: + description: Keys rejected. See `reason`. + example: 0 + type: number + reason: + description: Free text describing what went wrong. Null while the job is + healthy. + nullable: true + type: string + example: null + fileHash: + description: "Hex digest over the submitted keys. Two jobs sharing a digest\ + \ were the same set of keys, which makes a sequence of resubmissions recognizable." + example: 2fbd1d6db47ea4d7599c81a30b6f31ff6728661c842414d4510718e109253d98 + nullable: true + type: string + createdAt: + description: Creation date (timestamp) in milliseconds. + example: 124757537 + type: number + updatedAt: + description: Last progress update (timestamp) in milliseconds. + example: 124757537 + type: number + required: + - alreadyRegistered + - created + - createdAt + - failed + - jobId + - status + - total + - updatedAt + type: object + GetBulkSigningKeysJobsResponse: + example: + next: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== + data: [] + properties: + data: + description: "Registration jobs for the workspace, newest first." + example: [] + items: + $ref: "#/components/schemas/BulkSigningKeyJob" + type: array + next: + description: Cursor to the next page. Absent on the last page. + example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== + type: string + required: + - data + type: object ValidationKeyDto: example: createdAt: 12345633 @@ -48556,16 +48824,16 @@ components: type: string CantonOfferResponseDetails: description: "The transaction belongs to an offer conversation: the offer itself,\ - \ the response to it, or a leg that carries no answer of its own. The only\ - \ block that changes over a transaction's lifetime." + \ a response to it, or a leg that carries no answer of its own. The only block\ + \ that changes over a transaction's lifetime. An offer can have more than\ + \ one response — an allocation offer is accepted and later withdrawn — so\ + \ every response transaction states which answer it is in `responseType`." example: version: 1 - domain: ONBOARDING - vendor: DTCC - availableResponses: - - DTCC_END_INVESTOR_ONBOARDING_ACCEPT - - DTCC_END_INVESTOR_ONBOARDING_REJECT - expiresAt: 2026-12-31T23:59:59Z + domain: ALLOCATION + responseType: ALLOCATION_WITHDRAW + originalTransactionId: 9f2b7c14-8d55-4a02-b6e1-5c3f90a7d488 + allocationTransactionId: 5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21 properties: version: description: "The shape of this block. Stamped at creation and never changed,\ @@ -48577,10 +48845,14 @@ components: vendor: $ref: "#/components/schemas/CantonVendorEnum" availableResponses: - description: The responses that can be sent for this offer right now. An - empty array means nothing is answerable on this transaction — which is - the difference between an actionable offer and a linked leg that shares - its sub-status. + description: "The responses this offer accepts — copy one into `responseType`\ + \ to answer it. Present on the offer only, set when it arrives and never\ + \ changed: it states what the offer TYPE accepts, not whether it is answerable\ + \ right now. The respond endpoint is the authority on that, and answers\ + \ `409` when the offer's state or expiry rules a response out — for example\ + \ an `ALLOCATION_WITHDRAW` sent before the accept has settled. An empty\ + \ array means nothing is answerable on this transaction — the difference\ + \ between an actionable offer and a linked leg that shares its sub-status." example: - DTCC_END_INVESTOR_ONBOARDING_ACCEPT - DTCC_END_INVESTOR_ONBOARDING_REJECT @@ -48604,6 +48876,17 @@ components: answered. example: 9f2b7c14-8d55-4a02-b6e1-5c3f90a7d488 type: string + responseType: + description: "On a response transaction, which answer it is — the `responseType`\ + \ that was sent. Absent on the offer itself." + example: ALLOCATION_ACCEPT + type: string + allocationTransactionId: + description: "On an `ALLOCATION_WITHDRAW` response only — the accept whose\ + \ allocation this withdraw released, so the withdraw transaction read\ + \ on its own says what it undid." + example: 5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21 + type: string verdict: description: "The outcome, set once the transaction reaches a terminal status." enum: @@ -48617,9 +48900,9 @@ components: never changed. example: version: 1 - domain: ALLOCATION - type: ALLOCATION_WITHDRAW - originalTransactionId: 9f2b7c14-8d55-4a02-b6e1-5c3f90a7d488 + domain: ONBOARDING + type: DTCC_END_INVESTOR_INVITE + vendor: DTCC properties: version: description: "The shape of this block. Stamped at creation and never changed,\ @@ -48630,15 +48913,15 @@ components: $ref: "#/components/schemas/CantonDomainEnum" type: description: "The call type, matching the `type` sent when the call was\ - \ created." - example: ALLOCATION_WITHDRAW + \ created. Transactions created before a type moved to the offers endpoint\ + \ keep the value they were written with — `ALLOCATION_WITHDRAW` is one;\ + \ new withdraws are offer responses." + example: DTCC_END_INVESTOR_INVITE type: string vendor: $ref: "#/components/schemas/CantonVendorEnum" originalTransactionId: - description: "The transaction this call acts on. On a withdraw it is the\ - \ allocation that was withdrawn, so the withdraw transaction read on its\ - \ own still says what it withdrew." + description: "The transaction this call acts on, where it acts on one." example: 9f2b7c14-8d55-4a02-b6e1-5c3f90a7d488 type: string type: object @@ -48676,11 +48959,12 @@ components: Every block carries `version`, stamped when the transaction is created and never changed — a transaction written today keeps its shape, so `version` is how you know which shape you are reading. example: - call: + offerResponse: version: 1 domain: ALLOCATION - type: ALLOCATION_WITHDRAW + responseType: ALLOCATION_WITHDRAW originalTransactionId: 9f2b7c14-8d55-4a02-b6e1-5c3f90a7d488 + allocationTransactionId: 5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21 properties: offerResponse: $ref: "#/components/schemas/CantonOfferResponseDetails" @@ -51030,11 +51314,12 @@ components: categoryId: 5 timestamp: 1774363599908 cantonDetails: - call: + offerResponse: version: 1 domain: ALLOCATION - type: ALLOCATION_WITHDRAW + responseType: ALLOCATION_WITHDRAW originalTransactionId: 9f2b7c14-8d55-4a02-b6e1-5c3f90a7d488 + allocationTransactionId: 5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21 requestedAmount: 3.616076749251911 status: status note: note @@ -95755,6 +96040,23 @@ components: required: - responseType type: object + OfferResponseAllocationWithdraw: + additionalProperties: false + description: "Withdraw the allocation you made by accepting this offer, unlocking\ + \ the holding. Carries no arguments — the allocation is resolved from the\ + \ offer. Answers `409` until the accept has settled." + properties: + responseType: + description: |- + How you are answering the offer. Must be one of the values listed in the transaction's `cantonDetails.offerResponse.availableResponses` — TOP-LEVEL on the transaction, not nested under an `additionalInfo` envelope, which does not exist on `TransactionResponse`. + `availableResponses` states what this offer TYPE accepts. It is set when the offer arrives and does not change, so it does NOT tell you whether the offer is still answerable — check `expiresAt` and the transaction's status for that, and expect this endpoint to be the authority: it re-checks state and expiry on every call and answers 409 when either has moved. + enum: + - ALLOCATION_WITHDRAW + example: ALLOCATION_WITHDRAW + type: string + required: + - responseType + type: object OfferResponse: discriminator: mapping: @@ -95767,6 +96069,7 @@ components: TRANSFER_ACCEPT: "#/components/schemas/OfferResponseTransferAccept" TRANSFER_REJECT: "#/components/schemas/OfferResponseTransferReject" TRANSFER_WITHDRAW: "#/components/schemas/OfferResponseTransferWithdraw" + ALLOCATION_WITHDRAW: "#/components/schemas/OfferResponseAllocationWithdraw" propertyName: responseType oneOf: - $ref: "#/components/schemas/OfferResponseDtccOnboardingAccept" @@ -95778,6 +96081,7 @@ components: - $ref: "#/components/schemas/OfferResponseTransferAccept" - $ref: "#/components/schemas/OfferResponseTransferReject" - $ref: "#/components/schemas/OfferResponseTransferWithdraw" + - $ref: "#/components/schemas/OfferResponseAllocationWithdraw" OfferResponseAccepted: description: The outgoing transaction that carries the response. Its on-chain outcome arrives by webhook as a status update on this transaction. @@ -95801,19 +96105,10 @@ components: - transactionId type: object ParticipantOnboardingPayload: + description: "Optional, and so is every field in it: omit `payload` entirely\ + \ to onboard with DTCC's published parties for the blockchain and the default\ + \ expiry." properties: - vaultAccountId: - description: The vault account that acts as the participant. Its Canton - party is derived for you. - example: "12" - type: string - blockchainId: - description: The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. - enum: - - CANTON - - CANTON_TEST - example: CANTON - type: string expiresAt: description: When the onboarding request expires if it has not been answered. RFC 3339. @@ -95821,35 +96116,30 @@ components: format: date-time type: string operator: - description: DTCC infra operator party id. + description: DTCC infra operator party id. Optional — overrides the service's + default for the blockchain. example: dtcc-operator::1220abc… type: string compliance: - description: DTCC compliance party id. + description: DTCC compliance party id. Optional — overrides the service's + default for the blockchain. example: dtcc-compliance::1220abc… type: string registrar: - description: DTCC registrar party id — co-signs the accept. + description: DTCC registrar party id — co-signs the accept. Optional — overrides + the service's default for the blockchain. example: dtcc-registrar::1220abc… type: string clientOnboarder: - description: DTCC client onboarder party id — co-signs the accept. + description: DTCC client onboarder party id — co-signs the accept. Optional + — overrides the service's default for the blockchain. example: dtcc-onboarder::1220abc… type: string upgrader: - description: "DTCC upgrader party id — the Model Upgrade Tool authority.\ - \ Supplied by DTCC during the off-chain registration, alongside the other\ - \ party ids." + description: DTCC upgrader party id — the Model Upgrade Tool authority. + Optional — overrides the service's default for the blockchain. example: dtcc-upgrader::1220abc… type: string - required: - - blockchainId - - clientOnboarder - - compliance - - operator - - registrar - - upgrader - - vaultAccountId type: object CantonCallParticipantOnboarding: additionalProperties: false @@ -95860,35 +96150,35 @@ components: - DTCC_PARTICIPANT_ONBOARDING example: DTCC_PARTICIPANT_ONBOARDING type: string - payload: - $ref: "#/components/schemas/ParticipantOnboardingPayload" - required: - - payload - - type - type: object - EndInvestorPayload: - description: "Shared by invite / invite-cancel / offboard — identical wire shape,\ - \ different verb." - properties: vaultAccountId: - description: The vault account whose Canton wallet acts here. + description: The vault account whose Canton wallet makes this call. example: "12" type: string blockchainId: - description: The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. + description: The blockchain the vault account's Canton party is connected + to — `CANTON` or `CANTON_TEST`. enum: - CANTON - CANTON_TEST example: CANTON type: string + payload: + $ref: "#/components/schemas/ParticipantOnboardingPayload" + required: + - blockchainId + - type + - vaultAccountId + type: object + EndInvestorPayload: + description: "Shared by invite / invite-cancel / offboard — identical wire shape,\ + \ different verb." + properties: endInvestor: description: The end investor's Canton party id. example: investor-party::1220abc… type: string required: - - blockchainId - endInvestor - - vaultAccountId type: object CantonCallEndInvestorInvite: additionalProperties: false @@ -95899,11 +96189,25 @@ components: - DTCC_END_INVESTOR_INVITE example: DTCC_END_INVESTOR_INVITE type: string + vaultAccountId: + description: The vault account whose Canton wallet makes this call. + example: "12" + type: string + blockchainId: + description: The blockchain the vault account's Canton party is connected + to — `CANTON` or `CANTON_TEST`. + enum: + - CANTON + - CANTON_TEST + example: CANTON + type: string payload: $ref: "#/components/schemas/EndInvestorPayload" required: + - blockchainId - payload - type + - vaultAccountId type: object CantonCallEndInvestorInviteCancel: additionalProperties: false @@ -95914,11 +96218,25 @@ components: - DTCC_END_INVESTOR_INVITE_CANCEL example: DTCC_END_INVESTOR_INVITE_CANCEL type: string + vaultAccountId: + description: The vault account whose Canton wallet makes this call. + example: "12" + type: string + blockchainId: + description: The blockchain the vault account's Canton party is connected + to — `CANTON` or `CANTON_TEST`. + enum: + - CANTON + - CANTON_TEST + example: CANTON + type: string payload: $ref: "#/components/schemas/EndInvestorPayload" required: + - blockchainId - payload - type + - vaultAccountId type: object CantonCallEndInvestorOffboard: additionalProperties: false @@ -95929,25 +96247,28 @@ components: - DTCC_END_INVESTOR_OFFBOARD example: DTCC_END_INVESTOR_OFFBOARD type: string - payload: - $ref: "#/components/schemas/EndInvestorPayload" - required: - - payload - - type - type: object - AllowListPayload: - properties: vaultAccountId: - description: The vault account whose Canton wallet acts here. + description: The vault account whose Canton wallet makes this call. example: "12" type: string blockchainId: - description: The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. + description: The blockchain the vault account's Canton party is connected + to — `CANTON` or `CANTON_TEST`. enum: - CANTON - CANTON_TEST example: CANTON type: string + payload: + $ref: "#/components/schemas/EndInvestorPayload" + required: + - blockchainId + - payload + - type + - vaultAccountId + type: object + AllowListPayload: + properties: wallets: description: Canton party ids to add or remove. example: @@ -95957,8 +96278,6 @@ components: minItems: 1 type: array required: - - blockchainId - - vaultAccountId - wallets type: object CantonCallAllowListAdd: @@ -95970,11 +96289,25 @@ components: - DTCC_ALLOW_LIST_ADD example: DTCC_ALLOW_LIST_ADD type: string + vaultAccountId: + description: The vault account whose Canton wallet makes this call. + example: "12" + type: string + blockchainId: + description: The blockchain the vault account's Canton party is connected + to — `CANTON` or `CANTON_TEST`. + enum: + - CANTON + - CANTON_TEST + example: CANTON + type: string payload: $ref: "#/components/schemas/AllowListPayload" required: + - blockchainId - payload - type + - vaultAccountId type: object CantonCallAllowListRemove: additionalProperties: false @@ -95985,37 +96318,25 @@ components: - DTCC_ALLOW_LIST_REMOVE example: DTCC_ALLOW_LIST_REMOVE type: string - payload: - $ref: "#/components/schemas/AllowListPayload" - required: - - payload - - type - type: object - AllocationWithdrawPayload: - properties: - allocationTransactionId: - description: The Fireblocks transaction id of the outgoing response that - created the allocation. The allocation is resolved from it — Canton contract - ids are never accepted here. - example: 5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21 + vaultAccountId: + description: The vault account whose Canton wallet makes this call. + example: "12" type: string - required: - - allocationTransactionId - type: object - CantonCallAllocationWithdraw: - additionalProperties: false - properties: - type: - description: Which call to make. Selects the shape of `payload`. + blockchainId: + description: The blockchain the vault account's Canton party is connected + to — `CANTON` or `CANTON_TEST`. enum: - - ALLOCATION_WITHDRAW - example: ALLOCATION_WITHDRAW + - CANTON + - CANTON_TEST + example: CANTON type: string payload: - $ref: "#/components/schemas/AllocationWithdrawPayload" + $ref: "#/components/schemas/AllowListPayload" required: + - blockchainId - payload - type + - vaultAccountId type: object CantonCall: discriminator: @@ -96026,7 +96347,6 @@ components: DTCC_END_INVESTOR_OFFBOARD: "#/components/schemas/CantonCallEndInvestorOffboard" DTCC_ALLOW_LIST_ADD: "#/components/schemas/CantonCallAllowListAdd" DTCC_ALLOW_LIST_REMOVE: "#/components/schemas/CantonCallAllowListRemove" - ALLOCATION_WITHDRAW: "#/components/schemas/CantonCallAllocationWithdraw" propertyName: type oneOf: - $ref: "#/components/schemas/CantonCallParticipantOnboarding" @@ -96035,7 +96355,6 @@ components: - $ref: "#/components/schemas/CantonCallEndInvestorOffboard" - $ref: "#/components/schemas/CantonCallAllowListAdd" - $ref: "#/components/schemas/CantonCallAllowListRemove" - - $ref: "#/components/schemas/CantonCallAllocationWithdraw" CallAccepted: description: The outgoing transaction that carries the call. properties: diff --git a/build.gradle b/build.gradle index db229a3b..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 = '34.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AllocationWithdrawPayload.md b/docs/AllocationWithdrawPayload.md deleted file mode 100644 index 28d82ba5..00000000 --- a/docs/AllocationWithdrawPayload.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AllocationWithdrawPayload - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**allocationTransactionId** | **String** | The Fireblocks transaction id of the outgoing response that created the allocation. The allocation is resolved from it — Canton contract ids are never accepted here. | | - - - diff --git a/docs/AllowListPayload.md b/docs/AllowListPayload.md index 653692c6..8ed2d6c8 100644 --- a/docs/AllowListPayload.md +++ b/docs/AllowListPayload.md @@ -7,18 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**vaultAccountId** | **String** | The vault account whose Canton wallet acts here. | | -|**blockchainId** | [**BlockchainIdEnum**](#BlockchainIdEnum) | The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. | | |**wallets** | **List<String>** | Canton party ids to add or remove. | | -## Enum: BlockchainIdEnum - -| Name | Value | -|---- | -----| -| CANTON | "CANTON" | -| CANTON_TEST | "CANTON_TEST" | - - - diff --git a/docs/BulkProofOfOwnership.md b/docs/BulkProofOfOwnership.md new file mode 100644 index 00000000..6757d8f7 --- /dev/null +++ b/docs/BulkProofOfOwnership.md @@ -0,0 +1,15 @@ + + +# BulkProofOfOwnership + +Proof that the customer holds the private key. Required for every key, unlike the single key endpoint: bulk registration has no interactive step in which a proof can arrive later. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | The message to be signed by the key as proof of ownership. 64 to 1024 bytes in hexadecimal format. | | +|**signature** | **String** | The signature of the message. 64 bytes in hexadecimal format. | | + + + diff --git a/docs/BulkSigningKey.md b/docs/BulkSigningKey.md new file mode 100644 index 00000000..3db57535 --- /dev/null +++ b/docs/BulkSigningKey.md @@ -0,0 +1,16 @@ + + +# BulkSigningKey + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**signingDeviceKeyId** | **String** | The ID, name or label of the key specified on the customer's signing device. | | +|**signedCertPem** | **String** | The signed certificate that includes the public key PEM of the signing key, signed by the validation key declared for the request. | | +|**agentUserId** | **String** | Id of user to which this key belongs | | +|**proofOfOwnership** | [**BulkProofOfOwnership**](BulkProofOfOwnership.md) | | | + + + diff --git a/docs/BulkSigningKeyJob.md b/docs/BulkSigningKeyJob.md new file mode 100644 index 00000000..4b8f6dd4 --- /dev/null +++ b/docs/BulkSigningKeyJob.md @@ -0,0 +1,34 @@ + + +# BulkSigningKeyJob + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**jobId** | **String** | Id of the registration job. | | +|**status** | [**StatusEnum**](#StatusEnum) | QUEUED means the job is waiting for another bulk registration to finish, since only a limited number run at once. IN_PROGRESS means it is running. COMPLETED means every submitted key is present in the workspace. FAILED means the request was refused before any key was registered, so `reason` has to be acted on before resubmitting is worth anything. INCOMPLETE means some keys are not registered; resubmitting the same request retries exactly those, and `reason` says whether that is likely to help -- keys not registered because of a transient failure will succeed, a key whose certificate or proof was rejected will be rejected again. | | +|**total** | **BigDecimal** | Keys in the submitted request. | | +|**created** | **BigDecimal** | Keys registered by this job. | | +|**alreadyRegistered** | **BigDecimal** | Keys already present in the workspace, recognized and skipped. | | +|**failed** | **BigDecimal** | Keys rejected. See `reason`. | | +|**reason** | **String** | Free text describing what went wrong. Null while the job is healthy. | [optional] | +|**fileHash** | **String** | Hex digest over the submitted keys. Two jobs sharing a digest were the same set of keys, which makes a sequence of resubmissions recognizable. | [optional] | +|**createdAt** | **BigDecimal** | Creation date (timestamp) in milliseconds. | | +|**updatedAt** | **BigDecimal** | Last progress update (timestamp) in milliseconds. | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| QUEUED | "QUEUED" | +| IN_PROGRESS | "IN_PROGRESS" | +| COMPLETED | "COMPLETED" | +| INCOMPLETE | "INCOMPLETE" | +| FAILED | "FAILED" | + + + diff --git a/docs/CantonCall.md b/docs/CantonCall.md index 5ab02c7d..d441b381 100644 --- a/docs/CantonCall.md +++ b/docs/CantonCall.md @@ -3,7 +3,6 @@ # CantonCall ## oneOf schemas -* [CantonCallAllocationWithdraw](CantonCallAllocationWithdraw.md) * [CantonCallAllowListAdd](CantonCallAllowListAdd.md) * [CantonCallAllowListRemove](CantonCallAllowListRemove.md) * [CantonCallEndInvestorInvite](CantonCallEndInvestorInvite.md) @@ -15,7 +14,6 @@ ```java // Import classes: import com.fireblocks.sdk.model.CantonCall; -import com.fireblocks.sdk.model.CantonCallAllocationWithdraw; import com.fireblocks.sdk.model.CantonCallAllowListAdd; import com.fireblocks.sdk.model.CantonCallAllowListRemove; import com.fireblocks.sdk.model.CantonCallEndInvestorInvite; @@ -27,13 +25,6 @@ public class Example { public static void main(String[] args) { CantonCall exampleCantonCall = new CantonCall(); - // create a new CantonCallAllocationWithdraw - CantonCallAllocationWithdraw exampleCantonCallAllocationWithdraw = new CantonCallAllocationWithdraw(); - // set CantonCall to CantonCallAllocationWithdraw - exampleCantonCall.setActualInstance(exampleCantonCallAllocationWithdraw); - // to get back the CantonCallAllocationWithdraw set earlier - CantonCallAllocationWithdraw testCantonCallAllocationWithdraw = (CantonCallAllocationWithdraw) exampleCantonCall.getActualInstance(); - // create a new CantonCallAllowListAdd CantonCallAllowListAdd exampleCantonCallAllowListAdd = new CantonCallAllowListAdd(); // set CantonCall to CantonCallAllowListAdd diff --git a/docs/CantonCallAllocationWithdraw.md b/docs/CantonCallAllocationWithdraw.md deleted file mode 100644 index 67616df5..00000000 --- a/docs/CantonCallAllocationWithdraw.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# CantonCallAllocationWithdraw - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | -|**payload** | [**AllocationWithdrawPayload**](AllocationWithdrawPayload.md) | | | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| ALLOCATION_WITHDRAW | "ALLOCATION_WITHDRAW" | - - - diff --git a/docs/CantonCallAllowListAdd.md b/docs/CantonCallAllowListAdd.md index 8962847a..aa57acf6 100644 --- a/docs/CantonCallAllowListAdd.md +++ b/docs/CantonCallAllowListAdd.md @@ -8,6 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**vaultAccountId** | **String** | The vault account whose Canton wallet makes this call. | | +|**blockchainId** | [**BlockchainIdEnum**](#BlockchainIdEnum) | The blockchain the vault account's Canton party is connected to — `CANTON` or `CANTON_TEST`. | | |**payload** | [**AllowListPayload**](AllowListPayload.md) | | | @@ -20,3 +22,12 @@ +## Enum: BlockchainIdEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/CantonCallAllowListRemove.md b/docs/CantonCallAllowListRemove.md index fcd2de10..c05c44ed 100644 --- a/docs/CantonCallAllowListRemove.md +++ b/docs/CantonCallAllowListRemove.md @@ -8,6 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**vaultAccountId** | **String** | The vault account whose Canton wallet makes this call. | | +|**blockchainId** | [**BlockchainIdEnum**](#BlockchainIdEnum) | The blockchain the vault account's Canton party is connected to — `CANTON` or `CANTON_TEST`. | | |**payload** | [**AllowListPayload**](AllowListPayload.md) | | | @@ -20,3 +22,12 @@ +## Enum: BlockchainIdEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/CantonCallDetails.md b/docs/CantonCallDetails.md index 8abe77c8..aa0f8368 100644 --- a/docs/CantonCallDetails.md +++ b/docs/CantonCallDetails.md @@ -10,9 +10,9 @@ A call made through the Canton calls endpoint. Written once and never changed. |------------ | ------------- | ------------- | -------------| |**version** | **Integer** | The shape of this block. Stamped at creation and never changed, so a reader always knows which version it is holding. | [optional] | |**domain** | **CantonDomainEnum** | | [optional] | -|**type** | **String** | The call type, matching the `type` sent when the call was created. | [optional] | +|**type** | **String** | The call type, matching the `type` sent when the call was created. Transactions created before a type moved to the offers endpoint keep the value they were written with — `ALLOCATION_WITHDRAW` is one; new withdraws are offer responses. | [optional] | |**vendor** | **CantonVendorEnum** | | [optional] | -|**originalTransactionId** | **String** | The transaction this call acts on. On a withdraw it is the allocation that was withdrawn, so the withdraw transaction read on its own still says what it withdrew. | [optional] | +|**originalTransactionId** | **String** | The transaction this call acts on, where it acts on one. | [optional] | diff --git a/docs/CantonCallEndInvestorInvite.md b/docs/CantonCallEndInvestorInvite.md index 39a9d662..693b0947 100644 --- a/docs/CantonCallEndInvestorInvite.md +++ b/docs/CantonCallEndInvestorInvite.md @@ -8,6 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**vaultAccountId** | **String** | The vault account whose Canton wallet makes this call. | | +|**blockchainId** | [**BlockchainIdEnum**](#BlockchainIdEnum) | The blockchain the vault account's Canton party is connected to — `CANTON` or `CANTON_TEST`. | | |**payload** | [**EndInvestorPayload**](EndInvestorPayload.md) | | | @@ -20,3 +22,12 @@ +## Enum: BlockchainIdEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/CantonCallEndInvestorInviteCancel.md b/docs/CantonCallEndInvestorInviteCancel.md index 9bbd34b0..3cd87bce 100644 --- a/docs/CantonCallEndInvestorInviteCancel.md +++ b/docs/CantonCallEndInvestorInviteCancel.md @@ -8,6 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**vaultAccountId** | **String** | The vault account whose Canton wallet makes this call. | | +|**blockchainId** | [**BlockchainIdEnum**](#BlockchainIdEnum) | The blockchain the vault account's Canton party is connected to — `CANTON` or `CANTON_TEST`. | | |**payload** | [**EndInvestorPayload**](EndInvestorPayload.md) | | | @@ -20,3 +22,12 @@ +## Enum: BlockchainIdEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/CantonCallEndInvestorOffboard.md b/docs/CantonCallEndInvestorOffboard.md index e3e3432a..18994816 100644 --- a/docs/CantonCallEndInvestorOffboard.md +++ b/docs/CantonCallEndInvestorOffboard.md @@ -8,6 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | +|**vaultAccountId** | **String** | The vault account whose Canton wallet makes this call. | | +|**blockchainId** | [**BlockchainIdEnum**](#BlockchainIdEnum) | The blockchain the vault account's Canton party is connected to — `CANTON` or `CANTON_TEST`. | | |**payload** | [**EndInvestorPayload**](EndInvestorPayload.md) | | | @@ -20,3 +22,12 @@ +## Enum: BlockchainIdEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/CantonCallParticipantOnboarding.md b/docs/CantonCallParticipantOnboarding.md index 21ff7714..0fff3967 100644 --- a/docs/CantonCallParticipantOnboarding.md +++ b/docs/CantonCallParticipantOnboarding.md @@ -8,7 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | Which call to make. Selects the shape of `payload`. | | -|**payload** | [**ParticipantOnboardingPayload**](ParticipantOnboardingPayload.md) | | | +|**vaultAccountId** | **String** | The vault account whose Canton wallet makes this call. | | +|**blockchainId** | [**BlockchainIdEnum**](#BlockchainIdEnum) | The blockchain the vault account's Canton party is connected to — `CANTON` or `CANTON_TEST`. | | +|**payload** | [**ParticipantOnboardingPayload**](ParticipantOnboardingPayload.md) | | [optional] | @@ -20,3 +22,12 @@ +## Enum: BlockchainIdEnum + +| Name | Value | +|---- | -----| +| CANTON | "CANTON" | +| CANTON_TEST | "CANTON_TEST" | + + + diff --git a/docs/CantonOfferResponseDetails.md b/docs/CantonOfferResponseDetails.md index 7bcdb47f..cc5392b9 100644 --- a/docs/CantonOfferResponseDetails.md +++ b/docs/CantonOfferResponseDetails.md @@ -2,7 +2,7 @@ # CantonOfferResponseDetails -The transaction belongs to an offer conversation: the offer itself, the response to it, or a leg that carries no answer of its own. The only block that changes over a transaction's lifetime. +The transaction belongs to an offer conversation: the offer itself, a response to it, or a leg that carries no answer of its own. The only block that changes over a transaction's lifetime. An offer can have more than one response — an allocation offer is accepted and later withdrawn — so every response transaction states which answer it is in `responseType`. ## Properties @@ -11,10 +11,12 @@ The transaction belongs to an offer conversation: the offer itself, the response |**version** | **Integer** | The shape of this block. Stamped at creation and never changed, so a reader always knows which version it is holding. | [optional] | |**domain** | **CantonDomainEnum** | | [optional] | |**vendor** | **CantonVendorEnum** | | [optional] | -|**availableResponses** | **List<String>** | The responses that can be sent for this offer right now. An empty array means nothing is answerable on this transaction — which is the difference between an actionable offer and a linked leg that shares its sub-status. | [optional] | +|**availableResponses** | **List<String>** | The responses this offer accepts — copy one into `responseType` to answer it. Present on the offer only, set when it arrives and never changed: it states what the offer TYPE accepts, not whether it is answerable right now. The respond endpoint is the authority on that, and answers `409` when the offer's state or expiry rules a response out — for example an `ALLOCATION_WITHDRAW` sent before the accept has settled. An empty array means nothing is answerable on this transaction — the difference between an actionable offer and a linked leg that shares its sub-status. | [optional] | |**expiresAt** | **OffsetDateTime** | When the offer expires, where it has a deadline. | [optional] | |**approvalTransactionId** | **String** | The response transaction, once one has been dispatched for this offer. | [optional] | |**originalTransactionId** | **String** | The transaction this one relates to — the offer a response answered. | [optional] | +|**responseType** | **String** | On a response transaction, which answer it is — the `responseType` that was sent. Absent on the offer itself. | [optional] | +|**allocationTransactionId** | **String** | On an `ALLOCATION_WITHDRAW` response only — the accept whose allocation this withdraw released, so the withdraw transaction read on its own says what it undid. | [optional] | |**verdict** | [**VerdictEnum**](#VerdictEnum) | The outcome, set once the transaction reaches a terminal status. | [optional] | diff --git a/docs/ConsoleUserApi.md b/docs/ConsoleUserApi.md index f3caa699..5ba25ccd 100644 --- a/docs/ConsoleUserApi.md +++ b/docs/ConsoleUserApi.md @@ -98,7 +98,7 @@ No authorization required Request deletion of a console user -Requests deletion of a console user. The request is asynchronous: it goes through the workspace's configured \"Delete users\" approval policy (Settings > Quorums), exactly as deleting a user from the console does, and the user is removed only once that approval completes. - Track progress by polling GET /management/users; deletion is complete when the user is disabled. - Please note that this endpoint is available only for API keys with Admin/Non Signing Admin/Security Admin permissions. Endpoint Permission: Admin, Non-Signing Admin, Security Admin. **Note:** This endpoint is currently in beta and might be subject to changes. +Requests deletion of a console user. The request is asynchronous: it goes through the workspace's configured \"Delete users\" approval policy (Settings > Quorums), exactly as deleting a user from the console does, and the user is removed only once that approval completes. - The workspace must have a \"Delete users\" approval policy (admin quorum or approval group). If \"Delete users\" is Owner-only, which is the default, the request is refused with OWNER_ONLY (2760) and the Owner deletes users in the Console. With an admin quorum, the requesting API user's own approval counts toward the quorum. - Track progress by polling GET /management/users; deletion is complete when the user is disabled. - Please note that this endpoint is available only for API keys with Admin/Non Signing Admin/Security Admin permissions. Endpoint Permission: Admin, Non-Signing Admin, Security Admin. **Note:** This endpoint is currently in beta and might be subject to changes. ### Example @@ -170,7 +170,7 @@ No authorization required | **202** | Deletion request accepted. Returns the console user that will be removed once the workspace's configured approval completes. | * X-Request-ID -
| | **400** | Bad request: invalid parameters (for example a non-boolean `force`), or TARGET_IS_API_USER - the ID belongs to an API user in this workspace; this endpoint deletes console users only. | * X-Request-ID -
| | **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| -| **403** | Lacking permissions, or the target cannot be deleted: the user is the workspace Owner, or the caller is the target. | * X-Request-ID -
| +| **403** | Lacking permissions, or the target cannot be deleted: the user is the workspace Owner, or the caller is the target. Also returned as OWNER_ONLY (2760) when the workspace's \"Delete users\" approval is Owner-only; set an approval policy in the Console under Settings > Quorums. | * X-Request-ID -
| | **404** | Console user not found. Also returned for users in other workspaces (so the endpoint does not reveal whether an ID exists there) and for users that were already deleted. | * X-Request-ID -
| | **409** | PENDING_REQUEST_EXISTS - a deletion request for this user is already awaiting approval; USER_REFERENCED_IN_TAP - the user is referenced by the workspace transaction authorization policy (can be overridden with force=true); or USER_PENDING_ONBOARDING - the user has not completed onboarding, so there is nothing to delete yet. Revoke the invitation from the console instead. | * X-Request-ID -
| | **422** | QUORUM_INTEGRITY - the user is required to complete the workspace's admin approval quorum. Can be overridden with force=true, matching the console's acknowledgement checkbox. | * X-Request-ID -
| diff --git a/docs/CreateBulkSigningKeys.md b/docs/CreateBulkSigningKeys.md new file mode 100644 index 00000000..5bc7a7a3 --- /dev/null +++ b/docs/CreateBulkSigningKeys.md @@ -0,0 +1,14 @@ + + +# CreateBulkSigningKeys + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**validationKeyId** | **String** | The id of the validation key that signed every certificate in this request, as returned when the validation key was registered. Not the signingDeviceKeyId of any signing key. | | +|**keys** | [**List<BulkSigningKey>**](BulkSigningKey.md) | The signing keys to register. | | + + + diff --git a/docs/CreateBulkSigningKeysResponse.md b/docs/CreateBulkSigningKeysResponse.md new file mode 100644 index 00000000..fb9aa065 --- /dev/null +++ b/docs/CreateBulkSigningKeysResponse.md @@ -0,0 +1,13 @@ + + +# CreateBulkSigningKeysResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**jobId** | **String** | Id of the registration job. Poll it for progress. | | + + + diff --git a/docs/EndInvestorPayload.md b/docs/EndInvestorPayload.md index 9f1f0919..95cf0cfb 100644 --- a/docs/EndInvestorPayload.md +++ b/docs/EndInvestorPayload.md @@ -8,18 +8,7 @@ Shared by invite / invite-cancel / offboard — identical wire shape, different | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**vaultAccountId** | **String** | The vault account whose Canton wallet acts here. | | -|**blockchainId** | [**BlockchainIdEnum**](#BlockchainIdEnum) | The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. | | |**endInvestor** | **String** | The end investor's Canton party id. | | -## Enum: BlockchainIdEnum - -| Name | Value | -|---- | -----| -| CANTON | "CANTON" | -| CANTON_TEST | "CANTON_TEST" | - - - diff --git a/docs/GetBulkSigningKeysJobsResponse.md b/docs/GetBulkSigningKeysJobsResponse.md new file mode 100644 index 00000000..903b6616 --- /dev/null +++ b/docs/GetBulkSigningKeysJobsResponse.md @@ -0,0 +1,14 @@ + + +# GetBulkSigningKeysJobsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<BulkSigningKeyJob>**](BulkSigningKeyJob.md) | Registration jobs for the workspace, newest first. | | +|**next** | **String** | Cursor to the next page. Absent on the last page. | [optional] | + + + diff --git a/docs/KeyLinkBetaApi.md b/docs/KeyLinkBetaApi.md index dba90fd3..d8c2da90 100644 --- a/docs/KeyLinkBetaApi.md +++ b/docs/KeyLinkBetaApi.md @@ -4,9 +4,12 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**createBulkSigningKeys**](KeyLinkBetaApi.md#createBulkSigningKeys) | **POST** /key_link/signing_keys/bulk | Register signing keys in bulk | | [**createSigningKey**](KeyLinkBetaApi.md#createSigningKey) | **POST** /key_link/signing_keys | Add a new signing key | | [**createValidationKey**](KeyLinkBetaApi.md#createValidationKey) | **POST** /key_link/validation_keys | Add a new validation key | | [**disableValidationKey**](KeyLinkBetaApi.md#disableValidationKey) | **PATCH** /key_link/validation_keys/{keyId} | Disables a validation key | +| [**getBulkSigningKeysJob**](KeyLinkBetaApi.md#getBulkSigningKeysJob) | **GET** /key_link/signing_keys/bulk/jobs/{jobId} | Get a bulk registration job | +| [**getBulkSigningKeysJobs**](KeyLinkBetaApi.md#getBulkSigningKeysJobs) | **GET** /key_link/signing_keys/bulk/jobs | Get bulk registration jobs | | [**getSigningKey**](KeyLinkBetaApi.md#getSigningKey) | **GET** /key_link/signing_keys/{keyId} | Get a signing key by `keyId` | | [**getSigningKeysList**](KeyLinkBetaApi.md#getSigningKeysList) | **GET** /key_link/signing_keys | Get list of signing keys | | [**getValidationKey**](KeyLinkBetaApi.md#getValidationKey) | **GET** /key_link/validation_keys/{keyId} | Get a validation key by `keyId` | @@ -16,6 +19,86 @@ All URIs are relative to https://developers.fireblocks.com/reference/ +## createBulkSigningKeys + +> CompletableFuture> createBulkSigningKeys createBulkSigningKeys(createBulkSigningKeys, idempotencyKey) + +Register signing keys in bulk + +Accepts a set of signing keys certified by a single validation key and queues them for registration in the background. Returns a job id to poll. A workspace can have one bulk registration at a time; submitting another while one is QUEUED or IN_PROGRESS is rejected with 409. Bulk registrations from different workspaces share a limited number of slots, so a job may wait QUEUED behind another workspace's before it starts. Keys already registered in the workspace are recognized and skipped, so resubmitting the same request after a failure is safe and only processes what is missing. Every key must carry its own proof of ownership; a bulk registration has no interactive step in which one can arrive later. + +### 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.KeyLinkBetaApi; +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); + + CreateBulkSigningKeys createBulkSigningKeys = new CreateBulkSigningKeys(); // CreateBulkSigningKeys | + 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.keyLinkBeta().createBulkSigningKeys(createBulkSigningKeys, 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 KeyLinkBetaApi#createBulkSigningKeys"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createBulkSigningKeys** | [**CreateBulkSigningKeys**](CreateBulkSigningKeys.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> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Registration is queued | * X-Request-ID -
| +| **409** | Error Response | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## createSigningKey > CompletableFuture> createSigningKey createSigningKey(createSigningKeyDto, idempotencyKey) @@ -253,6 +336,162 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getBulkSigningKeysJob + +> CompletableFuture> getBulkSigningKeysJob getBulkSigningKeysJob(jobId) + +Get a bulk registration job + +Returns the progress and outcome of a bulk registration job. `created + alreadyRegistered` reaching `total` means every submitted key is present. + +### 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.KeyLinkBetaApi; +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 jobId = "46a92767-5f93-4a46-9eed-f012196bb4fc"; // String | The id of the bulk registration job + try { + CompletableFuture> response = fireblocks.keyLinkBeta().getBulkSigningKeysJob(jobId); + 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 KeyLinkBetaApi#getBulkSigningKeysJob"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **jobId** | **String**| The id of the bulk registration job | | + +### 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 | +|-------------|-------------|------------------| +| **200** | The bulk registration job | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getBulkSigningKeysJobs + +> CompletableFuture> getBulkSigningKeysJobs getBulkSigningKeysJobs(pageCursor, pageSize) + +Get bulk registration jobs + +Returns the workspace's bulk registration jobs, newest first, a page at a time. + +### 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.KeyLinkBetaApi; +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 pageCursor = "pageCursor_example"; // String | Cursor to the next page + Integer pageSize = 10; // Integer | Amount of results to return in the next page + try { + CompletableFuture> response = fireblocks.keyLinkBeta().getBulkSigningKeysJobs(pageCursor, pageSize); + 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 KeyLinkBetaApi#getBulkSigningKeysJobs"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **pageCursor** | **String**| Cursor to the next page | [optional] | +| **pageSize** | **Integer**| Amount of results to return in the next page | [optional] [default to 10] | + +### 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 | +|-------------|-------------|------------------| +| **200** | Bulk registration jobs for the workspace | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getSigningKey > CompletableFuture> getSigningKey getSigningKey(keyId) diff --git a/docs/OfferResponse.md b/docs/OfferResponse.md index 50a6235c..f95ad4d0 100644 --- a/docs/OfferResponse.md +++ b/docs/OfferResponse.md @@ -5,6 +5,7 @@ ## oneOf schemas * [OfferResponseAllocationAccept](OfferResponseAllocationAccept.md) * [OfferResponseAllocationReject](OfferResponseAllocationReject.md) +* [OfferResponseAllocationWithdraw](OfferResponseAllocationWithdraw.md) * [OfferResponseDtccOnboardingAccept](OfferResponseDtccOnboardingAccept.md) * [OfferResponseDtccOnboardingReject](OfferResponseDtccOnboardingReject.md) * [OfferResponseTradewebAccept](OfferResponseTradewebAccept.md) @@ -19,6 +20,7 @@ import com.fireblocks.sdk.model.OfferResponse; import com.fireblocks.sdk.model.OfferResponseAllocationAccept; import com.fireblocks.sdk.model.OfferResponseAllocationReject; +import com.fireblocks.sdk.model.OfferResponseAllocationWithdraw; import com.fireblocks.sdk.model.OfferResponseDtccOnboardingAccept; import com.fireblocks.sdk.model.OfferResponseDtccOnboardingReject; import com.fireblocks.sdk.model.OfferResponseTradewebAccept; @@ -45,6 +47,13 @@ public class Example { // to get back the OfferResponseAllocationReject set earlier OfferResponseAllocationReject testOfferResponseAllocationReject = (OfferResponseAllocationReject) exampleOfferResponse.getActualInstance(); + // create a new OfferResponseAllocationWithdraw + OfferResponseAllocationWithdraw exampleOfferResponseAllocationWithdraw = new OfferResponseAllocationWithdraw(); + // set OfferResponse to OfferResponseAllocationWithdraw + exampleOfferResponse.setActualInstance(exampleOfferResponseAllocationWithdraw); + // to get back the OfferResponseAllocationWithdraw set earlier + OfferResponseAllocationWithdraw testOfferResponseAllocationWithdraw = (OfferResponseAllocationWithdraw) exampleOfferResponse.getActualInstance(); + // create a new OfferResponseDtccOnboardingAccept OfferResponseDtccOnboardingAccept exampleOfferResponseDtccOnboardingAccept = new OfferResponseDtccOnboardingAccept(); // set OfferResponse to OfferResponseDtccOnboardingAccept diff --git a/docs/OfferResponseAllocationWithdraw.md b/docs/OfferResponseAllocationWithdraw.md new file mode 100644 index 00000000..b7ee1b53 --- /dev/null +++ b/docs/OfferResponseAllocationWithdraw.md @@ -0,0 +1,22 @@ + + +# OfferResponseAllocationWithdraw + +Withdraw the allocation you made by accepting this offer, unlocking the holding. Carries no arguments — the allocation is resolved from the offer. Answers `409` until the accept has settled. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseType** | [**ResponseTypeEnum**](#ResponseTypeEnum) | How you are answering the offer. Must be one of the values listed in the transaction's `cantonDetails.offerResponse.availableResponses` — TOP-LEVEL on the transaction, not nested under an `additionalInfo` envelope, which does not exist on `TransactionResponse`. `availableResponses` states what this offer TYPE accepts. It is set when the offer arrives and does not change, so it does NOT tell you whether the offer is still answerable — check `expiresAt` and the transaction's status for that, and expect this endpoint to be the authority: it re-checks state and expiry on every call and answers 409 when either has moved. | | + + + +## Enum: ResponseTypeEnum + +| Name | Value | +|---- | -----| +| ALLOCATION_WITHDRAW | "ALLOCATION_WITHDRAW" | + + + diff --git a/docs/ParticipantOnboardingPayload.md b/docs/ParticipantOnboardingPayload.md index 65d583fb..46e24e0d 100644 --- a/docs/ParticipantOnboardingPayload.md +++ b/docs/ParticipantOnboardingPayload.md @@ -2,28 +2,18 @@ # ParticipantOnboardingPayload +Optional, and so is every field in it: omit `payload` entirely to onboard with DTCC's published parties for the blockchain and the default expiry. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**vaultAccountId** | **String** | The vault account that acts as the participant. Its Canton party is derived for you. | | -|**blockchainId** | [**BlockchainIdEnum**](#BlockchainIdEnum) | The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. | | |**expiresAt** | **OffsetDateTime** | When the onboarding request expires if it has not been answered. RFC 3339. | [optional] | -|**operator** | **String** | DTCC infra operator party id. | | -|**compliance** | **String** | DTCC compliance party id. | | -|**registrar** | **String** | DTCC registrar party id — co-signs the accept. | | -|**clientOnboarder** | **String** | DTCC client onboarder party id — co-signs the accept. | | -|**upgrader** | **String** | DTCC upgrader party id — the Model Upgrade Tool authority. Supplied by DTCC during the off-chain registration, alongside the other party ids. | | - - - -## Enum: BlockchainIdEnum - -| Name | Value | -|---- | -----| -| CANTON | "CANTON" | -| CANTON_TEST | "CANTON_TEST" | +|**operator** | **String** | DTCC infra operator party id. Optional — overrides the service's default for the blockchain. | [optional] | +|**compliance** | **String** | DTCC compliance party id. Optional — overrides the service's default for the blockchain. | [optional] | +|**registrar** | **String** | DTCC registrar party id — co-signs the accept. Optional — overrides the service's default for the blockchain. | [optional] | +|**clientOnboarder** | **String** | DTCC client onboarder party id — co-signs the accept. Optional — overrides the service's default for the blockchain. | [optional] | +|**upgrader** | **String** | DTCC upgrader party id — the Model Upgrade Tool authority. Optional — overrides the service's default for the blockchain. | [optional] | diff --git a/docs/TradingBetaApi.md b/docs/TradingApi.md similarity index 81% rename from docs/TradingBetaApi.md rename to docs/TradingApi.md index 73bba491..ce44dd3e 100644 --- a/docs/TradingBetaApi.md +++ b/docs/TradingApi.md @@ -1,20 +1,20 @@ -# TradingBetaApi +# TradingApi All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createOrder**](TradingBetaApi.md#createOrder) | **POST** /trading/orders | Create an order | -| [**createQuote**](TradingBetaApi.md#createQuote) | **POST** /trading/quotes | Create a quote | -| [**fetchAllOffers**](TradingBetaApi.md#fetchAllOffers) | **POST** /trading/offers | Get all offers | -| [**fetchRates**](TradingBetaApi.md#fetchRates) | **POST** /trading/rates | Get rates | -| [**getOrder**](TradingBetaApi.md#getOrder) | **GET** /trading/orders/{orderId} | Get order details | -| [**getOrderRequirements**](TradingBetaApi.md#getOrderRequirements) | **GET** /trading/orders/{orderId}/requirement | Get order requirement details for an order | -| [**getOrders**](TradingBetaApi.md#getOrders) | **GET** /trading/orders | Get orders | -| [**getTradingProviderById**](TradingBetaApi.md#getTradingProviderById) | **GET** /trading/providers/{providerId} | Get trading provider by ID | -| [**getTradingProviders**](TradingBetaApi.md#getTradingProviders) | **GET** /trading/providers | Get providers | -| [**submitOrderRequirements**](TradingBetaApi.md#submitOrderRequirements) | **POST** /trading/orders/{orderId}/requirement/data | Submit a response to an order requirement | -| [**uploadOrderRequirementFile**](TradingBetaApi.md#uploadOrderRequirementFile) | **POST** /trading/orders/{orderId}/requirement/file | Upload a file for an order requirement | +| [**createOrder**](TradingApi.md#createOrder) | **POST** /trading/orders | Create an order | +| [**createQuote**](TradingApi.md#createQuote) | **POST** /trading/quotes | Create a quote | +| [**fetchAllOffers**](TradingApi.md#fetchAllOffers) | **POST** /trading/offers | Get all offers | +| [**fetchRates**](TradingApi.md#fetchRates) | **POST** /trading/rates | Get rates | +| [**getOrder**](TradingApi.md#getOrder) | **GET** /trading/orders/{orderId} | Get order details | +| [**getOrderRequirements**](TradingApi.md#getOrderRequirements) | **GET** /trading/orders/{orderId}/requirement | Get order requirement details for an order | +| [**getOrders**](TradingApi.md#getOrders) | **GET** /trading/orders | Get orders | +| [**getTradingProviderById**](TradingApi.md#getTradingProviderById) | **GET** /trading/providers/{providerId} | Get trading provider by ID | +| [**getTradingProviders**](TradingApi.md#getTradingProviders) | **GET** /trading/providers | Get providers | +| [**submitOrderRequirements**](TradingApi.md#submitOrderRequirements) | **POST** /trading/orders/{orderId}/requirement/data | Submit a response to an order requirement | +| [**uploadOrderRequirementFile**](TradingApi.md#uploadOrderRequirementFile) | **POST** /trading/orders/{orderId}/requirement/file | Upload a file for an order requirement | @@ -24,7 +24,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ Create an order -Create an order to buy or sell an asset. If no source is given, an external source will be use. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Create an order to buy or sell an asset. If no source is given, an external source will be use. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -37,7 +37,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -52,13 +52,13 @@ public class Example { CreateOrderRequest createOrderRequest = new CreateOrderRequest(); // CreateOrderRequest | 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.tradingBeta().createOrder(createOrderRequest, idempotencyKey); + CompletableFuture> response = fireblocks.trading().createOrder(createOrderRequest, 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 TradingBetaApi#createOrder"); + System.err.println("Exception when calling TradingApi#createOrder"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -108,7 +108,7 @@ No authorization required Create a quote -Generate a time-limited quote for asset conversion, providing exchange rate and amount calculations. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Generate a time-limited quote for asset conversion, providing exchange rate and amount calculations. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -121,7 +121,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -136,13 +136,13 @@ public class Example { CreateQuote createQuote = new CreateQuote(); // CreateQuote | 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.tradingBeta().createQuote(createQuote, idempotencyKey); + CompletableFuture> response = fireblocks.trading().createQuote(createQuote, 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 TradingBetaApi#createQuote"); + System.err.println("Exception when calling TradingApi#createQuote"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -192,7 +192,7 @@ No authorization required Get all offers -Retrieve all available offers across the workspace for a given asset pair. Always operates in open scope — no provider or account selection required. Returns a mix of indicative rates and committed quotes as applicable per provider. If no slippageBps is provided, it defaults to 50 bps (0.5%). Slippage and settlement configuration do not affect the returned rate. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Retrieve all available offers across the workspace for a given asset pair. Always operates in open scope — no provider or account selection required. Returns a mix of indicative rates and committed quotes as applicable per provider. If no slippageBps is provided, it defaults to 50 bps (0.5%). Slippage and settlement configuration do not affect the returned rate. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -205,7 +205,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -220,13 +220,13 @@ public class Example { CreateOffersRequest createOffersRequest = new CreateOffersRequest(); // CreateOffersRequest | 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.tradingBeta().fetchAllOffers(createOffersRequest, idempotencyKey); + CompletableFuture> response = fireblocks.trading().fetchAllOffers(createOffersRequest, 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 TradingBetaApi#fetchAllOffers"); + System.err.println("Exception when calling TradingApi#fetchAllOffers"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -276,7 +276,7 @@ No authorization required Get rates -Retrieve indicative exchange rate from specified providers for a given asset pair. Rates are non-executable price signals intended for discovery and display purposes. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Retrieve indicative exchange rate from specified providers for a given asset pair. Rates are non-executable price signals intended for discovery and display purposes. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -289,7 +289,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -304,13 +304,13 @@ public class Example { RatesRequest ratesRequest = new RatesRequest(); // RatesRequest | 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.tradingBeta().fetchRates(ratesRequest, idempotencyKey); + CompletableFuture> response = fireblocks.trading().fetchRates(ratesRequest, 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 TradingBetaApi#fetchRates"); + System.err.println("Exception when calling TradingApi#fetchRates"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -360,7 +360,7 @@ No authorization required Get order details -Retrieve detailed information about a specific order by its ID. Note:These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Retrieve detailed information about a specific order by its ID. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -373,7 +373,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -387,13 +387,13 @@ public class Example { String orderId = "orderId_example"; // String | The ID of the order to fetch. try { - CompletableFuture> response = fireblocks.tradingBeta().getOrder(orderId); + CompletableFuture> response = fireblocks.trading().getOrder(orderId); 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 TradingBetaApi#getOrder"); + System.err.println("Exception when calling TradingApi#getOrder"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -442,7 +442,7 @@ No authorization required Get order requirement details for an order -Fetch order requirement details for an order that is in `AWAITING_INFORMATION` status. The response includes `requirementId` and `dueBy` metadata, a `requiredData` JSON Schema (Draft-7) describing the shape of the `data` object expected on `POST /trading/orders/{orderId}/requirement/data`, and `requiredFiles` descriptors for any files the provider requires (uploaded via `POST /trading/orders/{orderId}/requirement/file`). Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Fetch order requirement details for an order that is in `AWAITING_INFORMATION` status. The response includes `requirementId` and `dueBy` metadata, a `requiredData` JSON Schema (Draft-7) describing the shape of the `data` object expected on `POST /trading/orders/{orderId}/requirement/data`, and `requiredFiles` descriptors for any files the provider requires (uploaded via `POST /trading/orders/{orderId}/requirement/file`). Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -455,7 +455,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -469,13 +469,13 @@ public class Example { String orderId = "orderId_example"; // String | The ID of the order for which the order requirement is issued. try { - CompletableFuture> response = fireblocks.tradingBeta().getOrderRequirements(orderId); + CompletableFuture> response = fireblocks.trading().getOrderRequirements(orderId); 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 TradingBetaApi#getOrderRequirements"); + System.err.println("Exception when calling TradingApi#getOrderRequirements"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -525,7 +525,7 @@ No authorization required Get orders -Retrieve a paginated list of orders with optional filtering by account, provider, status, and time range. Note:These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Retrieve a paginated list of orders with optional filtering by account, provider, status, and time range. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -538,7 +538,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -560,13 +560,13 @@ public class Example { Integer endTime = 56; // Integer | String assetConversionType = "DIGITAL_ONLY"; // String | try { - CompletableFuture> response = fireblocks.tradingBeta().getOrders(pageSize, pageCursor, order, accountId, providerId, statuses, startTime, endTime, assetConversionType); + CompletableFuture> response = fireblocks.trading().getOrders(pageSize, pageCursor, order, accountId, providerId, statuses, startTime, endTime, assetConversionType); 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 TradingBetaApi#getOrders"); + System.err.println("Exception when calling TradingApi#getOrders"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -622,7 +622,7 @@ No authorization required Get trading provider by ID -Retrieve a single provider by ID. **Note:** These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Retrieve a single provider by ID. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -635,7 +635,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -649,13 +649,13 @@ public class Example { String providerId = "providerId_example"; // String | The unique identifier of the provider. try { - CompletableFuture> response = fireblocks.tradingBeta().getTradingProviderById(providerId); + CompletableFuture> response = fireblocks.trading().getTradingProviderById(providerId); 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 TradingBetaApi#getTradingProviderById"); + System.err.println("Exception when calling TradingApi#getTradingProviderById"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -704,7 +704,7 @@ No authorization required Get providers -Retrieve a list of all available external providers supporting trading activities through the platform. **Note:** These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Retrieve a list of all available external providers supporting trading activities through the platform. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -717,7 +717,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -732,13 +732,13 @@ public class Example { Integer pageSize = 20; // Integer | Page size for pagination. String pageCursor = "pageCursor_example"; // String | Page cursor for pagination. try { - CompletableFuture> response = fireblocks.tradingBeta().getTradingProviders(pageSize, pageCursor); + CompletableFuture> response = fireblocks.trading().getTradingProviders(pageSize, pageCursor); 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 TradingBetaApi#getTradingProviders"); + System.err.println("Exception when calling TradingApi#getTradingProviders"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -787,7 +787,7 @@ No authorization required Submit a response to an order requirement -Submit the user's textual response to an order requirement on an order that is in `AWAITING_INFORMATION` status. The request body carries `data` — a free-form object conforming to the `requiredData` JSON Schema returned by the GET endpoint. Any required files are uploaded separately via `POST /trading/orders/{orderId}/requirement/file`. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Submit the user's textual response to an order requirement on an order that is in `AWAITING_INFORMATION` status. The request body carries `data` — a free-form object conforming to the `requiredData` JSON Schema returned by the GET endpoint. Any required files are uploaded separately via `POST /trading/orders/{orderId}/requirement/file`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -800,7 +800,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -816,12 +816,12 @@ public class Example { String orderId = "orderId_example"; // String | The ID of the order to submit the order requirement response for. 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.tradingBeta().submitOrderRequirements(submitOrderRequirementRequest, orderId, idempotencyKey); + CompletableFuture> response = fireblocks.trading().submitOrderRequirements(submitOrderRequirementRequest, orderId, 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 TradingBetaApi#submitOrderRequirements"); + System.err.println("Exception when calling TradingApi#submitOrderRequirements"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -874,7 +874,7 @@ No authorization required Upload a file for an order requirement -Upload a single file (multipart/form-data) in response to an order requirement on an order that is in `AWAITING_INFORMATION` status. Call this endpoint once per required file. Send `fileKey` (matching a `fileKey` from `requiredFiles` on the GET response) and the binary `file`. Its type must be one of the supported file formats. Fireblocks encrypts each file and uploads it individually to the underlying provider. The textual response is submitted separately via `POST /trading/orders/{orderId}/requirement/data`. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). +Upload a single file (multipart/form-data) in response to an order requirement on an order that is in `AWAITING_INFORMATION` status. Call this endpoint once per required file. Send `fileKey` (matching a `fileKey` from `requiredFiles` on the GET response) and the binary `file`. Its type must be one of the supported file formats. Fireblocks encrypts each file and uploads it individually to the underlying provider. The textual response is submitted separately via `POST /trading/orders/{orderId}/requirement/data`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). ### Example @@ -887,7 +887,7 @@ 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.TradingBetaApi; +import com.fireblocks.sdk.api.TradingApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -904,12 +904,12 @@ public class Example { String orderId = "orderId_example"; // String | The ID of the order to upload the order requirement file for. 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.tradingBeta().uploadOrderRequirementFile(fileKey, _file, orderId, idempotencyKey); + CompletableFuture> response = fireblocks.trading().uploadOrderRequirementFile(fileKey, _file, orderId, 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 TradingBetaApi#uploadOrderRequirementFile"); + System.err.println("Exception when calling TradingApi#uploadOrderRequirementFile"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); diff --git a/docs/VaultsApi.md b/docs/VaultsApi.md index beb9b304..97aa1182 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -33,7 +33,6 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getVaultBalanceByAsset**](VaultsApi.md#getVaultBalanceByAsset) | **GET** /vault/assets/{assetId} | Get vault balance by an asset | | [**hideVaultAccount**](VaultsApi.md#hideVaultAccount) | **POST** /vault/accounts/{vaultAccountId}/hide | Hide a vault account in the console | | [**lookupVaultByAddress**](VaultsApi.md#lookupVaultByAddress) | **GET** /vault/lookup_by_address | Look up a vault account by blockchain address | -| [**registerTempoOmnibusWallet**](VaultsApi.md#registerTempoOmnibusWallet) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/omnibus/tempo/register | Register a Tempo omnibus wallet | | [**setCustomerRefIdForAddress**](VaultsApi.md#setCustomerRefIdForAddress) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/set_customer_ref_id | Assign AML customer reference ID | | [**setUsdcGatewayDepositAutomationBeta**](VaultsApi.md#setUsdcGatewayDepositAutomationBeta) | **POST** /vault/accounts/{vaultAccountId}/virtual_asset_wallet/usdc_gateway/deposit_automation | Set up a USDC Gateway deposit automation for a vault account | | [**setVaultAccountAutoFuel**](VaultsApi.md#setVaultAccountAutoFuel) | **POST** /vault/accounts/{vaultAccountId}/set_auto_fuel | Set auto fueling to on or off | @@ -2396,87 +2395,6 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| -## registerTempoOmnibusWallet - -> CompletableFuture> registerTempoOmnibusWallet registerTempoOmnibusWallet(vaultAccountId, assetId, idempotencyKey) - -Register a Tempo omnibus wallet - -Registers a Tempo omnibus wallet for the requested vault account. Triggering this flow requires the vault account to hold PATH_USD with a balance sufficient to cover the gas fee. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - -### 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.VaultsApi; -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 vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account for which to register the Tempo wallet. - String assetId = "assetId_example"; // String | The Tempo network asset to register for the vault account. - 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.vaults().registerTempoOmnibusWallet(vaultAccountId, assetId, 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 VaultsApi#registerTempoOmnibusWallet"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **vaultAccountId** | **String**| The ID of the vault account for which to register the Tempo wallet. | | -| **assetId** | **String**| The Tempo network asset to register for the vault account. | | -| **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 | -|-------------|-------------|------------------| -| **200** | OK | * X-Request-ID -
| -| **0** | Error Response | * X-Request-ID -
| - - ## setCustomerRefIdForAddress > CompletableFuture> setCustomerRefIdForAddress setCustomerRefIdForAddress(setCustomerRefIdForAddressRequest, vaultAccountId, assetId, addressId, idempotencyKey) diff --git a/pom.xml b/pom.xml index 957fe59d..5c58d835 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 34.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 a9cec617..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 = "34.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/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index be3fd3d2..5a4284c1 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -80,7 +80,7 @@ public class Fireblocks { private TempoBetaApi tempoBeta; private TokenizationApi tokenization; private TrLinkApi trLink; - private TradingBetaApi tradingBeta; + private TradingApi trading; private TransactionsApi transactions; private TravelRuleApi travelRule; private UserGroupsBetaApi userGroupsBeta; @@ -540,11 +540,11 @@ public TrLinkApi trLink() { return trLink; } - public TradingBetaApi tradingBeta() { - if (tradingBeta == null) { - tradingBeta = new TradingBetaApi(apiClient); + public TradingApi trading() { + if (trading == null) { + trading = new TradingApi(apiClient); } - return tradingBeta; + return trading; } public TransactionsApi transactions() { diff --git a/src/main/java/com/fireblocks/sdk/LifecycleWarning.java b/src/main/java/com/fireblocks/sdk/LifecycleWarning.java new file mode 100644 index 00000000..067d79a7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/LifecycleWarning.java @@ -0,0 +1,202 @@ +/* + * 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; + + +import java.net.http.HttpHeaders; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Optional; +import java.util.Set; +import java.util.logging.Logger; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Emits a warning when a response reports a non-GA API lifecycle state. + * + *

Warnings are logged through {@code java.util.logging} under a dedicated namespace, {@value + * #LOGGER_NAME}, so they can be silenced without also silencing genuine SDK errors: + * + *

+ *   Logger.getLogger("com.fireblocks.sdk.lifecycle").setLevel(Level.SEVERE);
+ * 
+ * + *

or via {@code logging.properties}: + * + *

+ *   com.fireblocks.sdk.lifecycle.level = SEVERE
+ * 
+ */ +public final class LifecycleWarning { + + /** Set (e.g. to 1) to suppress lifecycle warnings entirely; 0 and false do not suppress. */ + public static final String SUPPRESS_ENV_VAR = "FIREBLOCKS_SDK_SUPPRESS_LIFECYCLE_WARNING"; + + public static final String LIFECYCLE_STATE_HEADER = "Fireblocks-Lifecycle-State"; + public static final String SUNSET_HEADER = "Sunset"; + public static final String LINK_HEADER = "Link"; + + /** Dedicated child namespace, so these can be muted on their own. */ + public static final String LOGGER_NAME = "com.fireblocks.sdk.lifecycle"; + + public static final String BETA_STATE = "beta"; + public static final String DEPRECATED_STATE = "deprecated"; + public static final String CLOSED_STATE = "closed"; + + /** + * The gateway answers a closed operation with 410 Gone to every caller without a temporary + * exception. That response already says what happened, so no warning. + */ + public static final int GONE_STATUS = 410; + + private static final Set WARNING_STATES = + new HashSet<>(Arrays.asList("beta", "deprecated", "closed")); + + private static final String REL_DEPRECATION = "deprecation"; + private static final String REL_SUCCESSOR_VERSION = "successor-version"; + + // RFC 8288. Anchored on the angle brackets rather than split on commas, because + // a comma is legal inside a URI. `rel` may follow other parameters + // (`; type="text/html"; rel="deprecation"`), which [^<]*? allows without + // running into the next link, and its value may list several space-separated + // relation types. + private static final Pattern LINK_PATTERN = + Pattern.compile( + "<([^>]*)>[^<]*?;\\s*rel\\s*=\\s*(?:\"([^\"]*)\"|([^\\s;,]+))", + Pattern.CASE_INSENSITIVE); + + private LifecycleWarning() {} + + /** True when the suppression env var is set to anything other than 0 or false. */ + public static boolean isSuppressed(String value) { + return value != null && !value.isEmpty() && !"0".equals(value) && !"false".equals(value); + } + + /** + * Emit one warning per execution when the response reports a non-GA state. + * + *

Suppressed when {@code FIREBLOCKS_SDK_SUPPRESS_LIFECYCLE_WARNING} is set to anything other + * than 0 or false. + * + *

Never throws: a malformed header must not break a caller's request. + */ + public static void warn(HttpHeaders headers, String operationId, int statusCode) { + if (operationId == null + || operationId.isEmpty() + || isSuppressed(System.getenv(SUPPRESS_ENV_VAR))) { + return; + } + try { + String message = buildMessage(headers, operationId, statusCode); + if (message != null) { + // Resolved here rather than in a static field so nothing is touched + // until a warning is actually due. + Logger.getLogger(LOGGER_NAME).warning(message); + } + } catch (RuntimeException e) { + // Defensive: never break the request because of a warning. + } + } + + /** + * Build the warning for a response, or {@code null} when nothing should be logged. Silent on an + * absent or empty header, an unrecognised state, {@code ga}, and a {@code closed} operation + * answered with 410 Gone. + * + *

Header values are emitted as received. They are gateway-authored — the gateway strips any + * downstream-supplied lifecycle headers and reapplies its own, derived from the deployed + * specification, which is validated by the OpenAPI lint rules. + */ + public static String buildMessage(HttpHeaders headers, String operationId, int statusCode) { + if (headers == null) { + return null; + } + String rawState = firstValue(headers, LIFECYCLE_STATE_HEADER); + if (rawState == null || rawState.isBlank()) { + return null; + } + String state = rawState.trim().toLowerCase(Locale.ROOT); + if (!WARNING_STATES.contains(state)) { + return null; + } + + if (BETA_STATE.equals(state)) { + return "Operation '" + + operationId + + "' is in 'beta' lifecycle state and is not generally available." + + " It may change or be removed without notice."; + } + + if (CLOSED_STATE.equals(state)) { + if (statusCode == GONE_STATUS) { + return null; + } + return "Operation '" + + operationId + + "' has been closed and is no longer supported." + + " Your access is provided under a temporary exception and may be revoked." + + " Contact your Customer Success Manager for migration support"; + } + + String sunset = firstValue(headers, SUNSET_HEADER); + sunset = (sunset == null || sunset.isBlank()) ? null : sunset.trim(); + + StringBuilder message = new StringBuilder("Operation '").append(operationId); + if (sunset != null) { + message.append("' is deprecated and will stop working after ") + .append(sunset) + .append('.'); + } else { + message.append("' is deprecated."); + } + + String successor = linkFor(headers, REL_SUCCESSOR_VERSION); + if (successor != null) { + message.append(" Use ").append(successor).append(" instead."); + } + String migrationGuide = linkFor(headers, REL_DEPRECATION); + if (migrationGuide != null) { + message.append(" Migration guide: ").append(migrationGuide); + } + return message.toString(); + } + + /** HttpHeaders lookup is case-insensitive per the HTTP spec. */ + private static String firstValue(HttpHeaders headers, String name) { + Optional value = headers.firstValue(name); + return value.orElse(null); + } + + /** Map a link relation to its URL, first occurrence wins. */ + private static String linkFor(HttpHeaders headers, String relation) { + List values = headers.allValues(LINK_HEADER); + for (String value : values) { + if (value == null) { + continue; + } + Matcher matcher = LINK_PATTERN.matcher(value); + while (matcher.find()) { + String rels = matcher.group(2) != null ? matcher.group(2) : matcher.group(3); + for (String rel : rels.toLowerCase(Locale.ROOT).split("\\s+")) { + if (relation.equals(rel)) { + return matcher.group(1).trim(); + } + } + } + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java b/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java index 693f68f2..39248a3f 100644 --- a/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateAPIUser; import com.fireblocks.sdk.model.GetAPIUsersResponse; @@ -121,6 +122,13 @@ public CompletableFuture> createApiUser( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createApiUser", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createApiUser", localVarResponse)); @@ -191,6 +199,13 @@ public CompletableFuture> getApiUsers() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getApiUsers", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getApiUsers", localVarResponse)); @@ -269,6 +284,13 @@ private HttpRequest.Builder getApiUsersRequestBuilder() throws ApiException { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "issueApiUserPairingToken", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java index 18423317..25f498d2 100644 --- a/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ApprovalsBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.ApprovalRequestItem; @@ -137,6 +138,13 @@ public CompletableFuture> approveApproval( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "approveApproval", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("approveApproval", localVarResponse)); @@ -230,6 +238,13 @@ public CompletableFuture> createAppr if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createApprovalKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createApprovalKey", localVarResponse)); @@ -334,6 +349,13 @@ public CompletableFuture> deleteApprov if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteApprovalKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("deleteApprovalKey", localVarResponse)); @@ -432,6 +454,13 @@ public CompletableFuture> getApprovalById( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getApprovalById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getApprovalById", localVarResponse)); @@ -532,6 +561,13 @@ public CompletableFuture> getApprovalKe if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getApprovalKeys", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getApprovalKeys", localVarResponse)); @@ -669,6 +705,13 @@ public CompletableFuture> getApprovals( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getApprovals", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getApprovals", localVarResponse)); @@ -783,6 +826,13 @@ public CompletableFuture> rejectApproval( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "rejectApproval", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("rejectApproval", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java b/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java index 06fa1dcc..5624591c 100644 --- a/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.model.GetAuditLogsResponse; import java.io.IOException; @@ -164,6 +165,13 @@ public CompletableFuture> getAuditLogs( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAuditLogs", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getAuditLogs", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainLinkBetaApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainLinkBetaApi.java index 21c9fd8a..e3eadd35 100644 --- a/src/main/java/com/fireblocks/sdk/api/BlockchainLinkBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/BlockchainLinkBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.ActivateBlockchainResponse; @@ -137,6 +138,13 @@ public CompletableFuture> activateBlockc if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "activateBlockchainLinkChain", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -226,6 +234,13 @@ public CompletableFuture> createBlockchain if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createBlockchainLinkChain", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -315,6 +330,13 @@ public CompletableFuture> deleteBlockchainLinkChain(String blo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteBlockchainLinkChain", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -380,6 +402,13 @@ public CompletableFuture> getBlockchainLinkB if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getBlockchainLinkBillingInfo", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -456,6 +485,13 @@ public CompletableFuture> getBlockchainLi if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getBlockchainLinkChain", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -536,6 +572,13 @@ private HttpRequest.Builder getBlockchainLinkChainRequestBuilder(String blockcha if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getBlockchainLinkTestWalletAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -640,6 +683,13 @@ public CompletableFuture> listBlockchainLi if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listBlockchainLinkChains", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -758,6 +808,13 @@ private HttpRequest.Builder listBlockchainLinkChainsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "triggerBlockchainLinkValidation", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -849,6 +906,13 @@ public CompletableFuture> updateBlockchain if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateBlockchainLinkChain", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java index 19345fcc..abf71204 100644 --- a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.Asset; @@ -133,6 +134,13 @@ public CompletableFuture> getAsset(String id, String idempote if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getAsset", localVarResponse)); @@ -206,6 +214,13 @@ public CompletableFuture> getBlockchain(String i if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getBlockchain", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getBlockchain", localVarResponse)); @@ -281,6 +296,13 @@ public CompletableFuture>> getSupportedAsset if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSupportedAssets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -386,6 +408,13 @@ public CompletableFuture> listAssets( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listAssets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("listAssets", localVarResponse)); @@ -511,6 +540,13 @@ public CompletableFuture> listBlockchains( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listBlockchains", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("listBlockchains", localVarResponse)); @@ -622,6 +658,13 @@ public CompletableFuture> registerNewAsset( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "registerNewAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("registerNewAsset", localVarResponse)); @@ -710,6 +753,13 @@ public CompletableFuture> setAssetPrice( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setAssetPrice", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setAssetPrice", localVarResponse)); @@ -803,6 +853,13 @@ public CompletableFuture> updateAssetUserMetadata( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateAssetUserMetadata", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java b/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java index c4e2b430..612ec43d 100644 --- a/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AddressRegistryAddVaultOptOutsRequest; @@ -162,6 +163,13 @@ public CompletableFuture> activateArsConfig( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "activateArsConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("activateArsConfig", localVarResponse)); @@ -241,6 +249,13 @@ public CompletableFuture> activateByorkConfig( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "activateByorkConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -324,6 +339,13 @@ private HttpRequest.Builder activateByorkConfigRequestBuilder(String idempotency if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "addAddressRegistryVaultOptOuts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -428,6 +450,13 @@ private HttpRequest.Builder addAddressRegistryVaultOptOutsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "assignVaultsToLegalEntity", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -540,6 +569,13 @@ private HttpRequest.Builder assignVaultsToLegalEntityRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createAddressRegistryProofOfOwnership", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -642,6 +678,13 @@ public CompletableFuture> createCounterpartyGroup if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createCounterpartyGroup", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -735,6 +778,13 @@ public CompletableFuture> deactivateArsConfig( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deactivateArsConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -815,6 +865,13 @@ public CompletableFuture> deactivateByorkConfig if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deactivateByorkConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -891,6 +948,13 @@ public CompletableFuture> deleteCounterpartyGroup(UUID groupId if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteCounterpartyGroup", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -957,6 +1021,13 @@ public CompletableFuture> deleteLegalEntity(UUID legalEntityId if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteLegalEntity", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("deleteLegalEntity", localVarResponse)); @@ -1022,6 +1093,13 @@ private HttpRequest.Builder deleteLegalEntityRequestBuilder(UUID legalEntityId) if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAddressRegistryTenantParticipationStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1102,6 +1180,13 @@ private HttpRequest.Builder getAddressRegistryTenantParticipationStatusRequestBu if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAddressRegistryVaultOptOut", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1181,6 +1266,13 @@ public CompletableFuture> getAmlPostScreeni if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAmlPostScreeningPolicy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1254,6 +1346,13 @@ private HttpRequest.Builder getAmlPostScreeningPolicyRequestBuilder() throws Api if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAmlScreeningPolicy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1329,6 +1428,13 @@ public CompletableFuture> getByorkConfig() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getByorkConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getByorkConfig", localVarResponse)); @@ -1401,6 +1507,13 @@ public CompletableFuture> getByorkVerdict(S if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getByorkVerdict", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getByorkVerdict", localVarResponse)); @@ -1491,6 +1604,13 @@ public CompletableFuture> getCounterpartyGroup(UU if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getCounterpartyGroup", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1570,6 +1690,13 @@ public CompletableFuture> getLegalEntity( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getLegalEntity", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getLegalEntity", localVarResponse)); @@ -1651,6 +1778,13 @@ public CompletableFuture> getLegalEntity if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getLegalEntityForAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1727,6 +1861,13 @@ public CompletableFuture> getPostScreeningP if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPostScreeningPolicy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1802,6 +1943,13 @@ public CompletableFuture> getScreeningF if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getScreeningFullDetails", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1879,6 +2027,13 @@ private HttpRequest.Builder getScreeningFullDetailsRequestBuilder(String txId) if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getScreeningPolicy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1964,6 +2119,13 @@ private HttpRequest.Builder getScreeningPolicyRequestBuilder() throws ApiExcepti if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listAddressRegistryVaultOptOuts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2065,6 +2227,13 @@ private HttpRequest.Builder listAddressRegistryVaultOptOutsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listCounterpartyGroups", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2169,6 +2338,13 @@ public CompletableFuture> listLegalEntiti if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listLegalEntities", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("listLegalEntities", localVarResponse)); @@ -2268,6 +2444,13 @@ private HttpRequest.Builder listLegalEntitiesRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listVaultsForLegalEntity", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2369,6 +2552,13 @@ private HttpRequest.Builder listVaultsForLegalEntityRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "optInAddressRegistryTenant", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2449,6 +2639,13 @@ private HttpRequest.Builder optInAddressRegistryTenantRequestBuilder(String idem if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "optOutAddressRegistryTenant", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2531,6 +2728,13 @@ public CompletableFuture> registerLegalEnti if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "registerLegalEntity", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2623,6 +2827,13 @@ private HttpRequest.Builder registerLegalEntityRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "removeAddressRegistryVaultOptOut", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2707,6 +2918,13 @@ private HttpRequest.Builder removeAddressRegistryVaultOptOutRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "removeAllAddressRegistryVaultOptOuts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2795,6 +3013,13 @@ public CompletableFuture> rescreenRejec if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "rescreenRejectedTransaction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2894,6 +3119,13 @@ private HttpRequest.Builder rescreenRejectedTransactionRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "retryRejectedTransactionBypassScreeningChecks", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2983,6 +3215,13 @@ public CompletableFuture> setAmlVerdict( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setAmlVerdict", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setAmlVerdict", localVarResponse)); @@ -3078,6 +3317,13 @@ public CompletableFuture> setByorkTimeouts( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setByorkTimeouts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setByorkTimeouts", localVarResponse)); @@ -3171,6 +3417,13 @@ public CompletableFuture> setByorkVerdict( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setByorkVerdict", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setByorkVerdict", localVarResponse)); @@ -3260,6 +3513,13 @@ private HttpRequest.Builder setByorkVerdictRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateAmlScreeningConfiguration", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3347,6 +3607,13 @@ public CompletableFuture> updateCounterpartyGroup if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateCounterpartyGroup", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3451,6 +3718,13 @@ public CompletableFuture> updateLegalEntity if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateLegalEntity", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateLegalEntity", localVarResponse)); @@ -3551,6 +3825,13 @@ private HttpRequest.Builder updateLegalEntityRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateScreeningConfiguration", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3646,6 +3927,13 @@ public CompletableFuture> updateTrav if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateTravelRuleConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3735,6 +4023,13 @@ private HttpRequest.Builder updateTravelRuleConfigRequestBuilder(String idempote if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "verifyAddressRegistryProofOfOwnership", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/ComplianceOrchestratorBetaApi.java b/src/main/java/com/fireblocks/sdk/api/ComplianceOrchestratorBetaApi.java index 6066b9a4..5da69077 100644 --- a/src/main/java/com/fireblocks/sdk/api/ComplianceOrchestratorBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ComplianceOrchestratorBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.GetScreeningResultResponse; import com.fireblocks.sdk.model.GetWorkflowResponse; @@ -124,6 +125,13 @@ public CompletableFuture> getScreeningRe if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getScreeningResult", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -203,6 +211,13 @@ public CompletableFuture> getWorkflow(String wo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWorkflow", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getWorkflow", localVarResponse)); @@ -284,6 +299,13 @@ public CompletableFuture> triggerScreening if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "triggerScreening", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("triggerScreening", localVarResponse)); @@ -382,6 +404,13 @@ public CompletableFuture> updateWorkfl if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateWorkflowStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java b/src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java index 03653868..952b1b11 100644 --- a/src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.model.ScreeningConfigurationsRequest; import java.io.IOException; import java.io.InputStream; @@ -113,6 +114,13 @@ private String formatExceptionMessage(String operationId, int statusCode, String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAmlScreeningConfiguration", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -187,6 +195,13 @@ private HttpRequest.Builder getAmlScreeningConfigurationRequestBuilder() throws if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getScreeningConfiguration", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsApi.java b/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsApi.java index 3c708f11..54508740 100644 --- a/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AddConnectedAccountRequest; @@ -139,6 +140,13 @@ public CompletableFuture> addConnectedA if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "addConnectedAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -227,6 +235,13 @@ public CompletableFuture> disconnectConnectedAccount(String ac if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "disconnectConnectedAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -294,6 +309,13 @@ public CompletableFuture> getConnect if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConnectedAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -399,6 +421,13 @@ public CompletableFuture> getConnectedAccountAllo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConnectedAccountAllowlist", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -516,6 +545,13 @@ public CompletableFuture> getConnectedAccoun if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConnectedAccountAllowlistEntry", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -602,6 +638,13 @@ private HttpRequest.Builder getConnectedAccountAllowlistEntryRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConnectedAccountBalances", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -703,6 +746,13 @@ public CompletableFuture> getConnected if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConnectedAccountRates", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -808,6 +858,13 @@ private HttpRequest.Builder getConnectedAccountRatesRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConnectedAccountTradingPairs", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -910,6 +967,13 @@ public CompletableFuture> getConnectedAcc if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConnectedAccounts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1008,6 +1072,13 @@ private HttpRequest.Builder getConnectedAccountsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConnectedAccountsCredentialsPublicKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1093,6 +1164,13 @@ public CompletableFuture> renameConn if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "renameConnectedAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1195,6 +1273,13 @@ public CompletableFuture> syncConnectedAccountAllowlist( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "syncConnectedAccountAllowlist", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1285,6 +1370,13 @@ private HttpRequest.Builder syncConnectedAccountAllowlistRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateConnectedAccountCredentials", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java b/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java index b8791b55..6ac6ed79 100644 --- a/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.ConsoleUser; @@ -127,6 +128,13 @@ public CompletableFuture> createConsoleUser( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createConsoleUser", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createConsoleUser", localVarResponse)); @@ -183,7 +191,11 @@ private HttpRequest.Builder createConsoleUserRequestBuilder( * Request deletion of a console user Requests deletion of a console user. The request is * asynchronous: it goes through the workspace's configured \"Delete users\" * approval policy (Settings > Quorums), exactly as deleting a user from the console does, - * and the user is removed only once that approval completes. - Track progress by polling GET + * and the user is removed only once that approval completes. - The workspace must have a + * \"Delete users\" approval policy (admin quorum or approval group). If \"Delete + * users\" is Owner-only, which is the default, the request is refused with OWNER_ONLY + * (2760) and the Owner deletes users in the Console. With an admin quorum, the requesting API + * user's own approval counts toward the quorum. - Track progress by polling GET * /management/users; deletion is complete when the user is disabled. - Please note that this * endpoint is available only for API keys with Admin/Non Signing Admin/Security Admin * permissions. Endpoint Permission: Admin, Non-Signing Admin, Security Admin. **Note:** This @@ -206,6 +218,13 @@ public CompletableFuture> deleteConsoleUser(String id, if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteConsoleUser", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("deleteConsoleUser", localVarResponse)); @@ -295,6 +314,13 @@ public CompletableFuture> getConsoleUsers() if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConsoleUsers", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getConsoleUsers", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/ContactsApi.java b/src/main/java/com/fireblocks/sdk/api/ContactsApi.java index 1bef494a..dba59675 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContactsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContactsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.model.ContactsPagedResponse; import java.io.IOException; @@ -164,6 +165,13 @@ public CompletableFuture> getContacts( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContacts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getContacts", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java index 52810114..247aedbf 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.ContractAbiResponseDto; import com.fireblocks.sdk.model.ContractAddressResponse; @@ -136,6 +137,13 @@ public CompletableFuture> decodeContrac if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "decodeContractData", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -242,6 +250,13 @@ public CompletableFuture> getContractAddres if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContractAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -333,6 +348,13 @@ public CompletableFuture> getDeployedContrac if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getDeployedContractAbi", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -424,6 +446,13 @@ public CompletableFuture> getTransaction if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTransactionReceipt", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -515,6 +544,13 @@ public CompletableFuture>> readCallFunction if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "readCallFunction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("readCallFunction", localVarResponse)); @@ -626,6 +662,13 @@ public CompletableFuture> writeCallFun if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "writeCallFunction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("writeCallFunction", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java b/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java index 27ce01cf..238d6d7b 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AbiFunction; @@ -126,6 +127,13 @@ public CompletableFuture> deleteContractTemplateById( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteContractTemplateById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -203,6 +211,13 @@ public CompletableFuture> deployContract( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deployContract", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("deployContract", localVarResponse)); @@ -300,6 +315,13 @@ public CompletableFuture> getConstructorByContractTempl if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getConstructorByContractTemplateId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -396,6 +418,13 @@ public CompletableFuture> getContractTemplateBy if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContractTemplateById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -491,6 +520,13 @@ public CompletableFuture> getContractTem if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContractTemplates", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -602,6 +638,13 @@ public CompletableFuture> getFunctionAbiByContractTempl if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getFunctionAbiByContractTemplateId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -701,6 +744,13 @@ private HttpRequest.Builder getFunctionAbiByContractTemplateIdRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSupportedBlockchainsByTemplateId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -787,6 +837,13 @@ public CompletableFuture> uploadContractTemplat if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "uploadContractTemplate", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/ContractsApi.java b/src/main/java/com/fireblocks/sdk/api/ContractsApi.java index 38e4fb25..9f7a2747 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContractsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContractsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AddContractAssetRequest; import com.fireblocks.sdk.model.CreateContractRequest; @@ -128,6 +129,13 @@ public CompletableFuture> addContractAsset( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "addContractAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("addContractAsset", localVarResponse)); @@ -224,6 +232,13 @@ public CompletableFuture> createContract( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createContract", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createContract", localVarResponse)); @@ -307,6 +322,13 @@ public CompletableFuture> deleteContract(String contractId) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteContract", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("deleteContract", localVarResponse)); @@ -373,6 +395,13 @@ public CompletableFuture> deleteContractAsset( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteContractAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -440,6 +469,13 @@ public CompletableFuture> getContract(String contra if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContract", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getContract", localVarResponse)); @@ -516,6 +552,13 @@ public CompletableFuture> getContractAsset( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContractAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getContractAsset", localVarResponse)); @@ -591,6 +634,13 @@ public CompletableFuture>> getContracts() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContracts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getContracts", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java b/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java index c8fc0140..2b5287ec 100644 --- a/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AddCosignerRequest; @@ -135,6 +136,13 @@ public CompletableFuture> addCosigner( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "addCosigner", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("addCosigner", localVarResponse)); @@ -219,6 +227,13 @@ public CompletableFuture> getApiKey(UUID cosignerId, String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getApiKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getApiKey", localVarResponse)); @@ -301,6 +316,13 @@ public CompletableFuture> getApiKeys( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getApiKeys", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getApiKeys", localVarResponse)); @@ -399,6 +421,13 @@ public CompletableFuture> getCosigner(UUID cosignerId) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getCosigner", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getCosigner", localVarResponse)); @@ -477,6 +506,13 @@ public CompletableFuture> getCosigners( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getCosigners", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getCosigners", localVarResponse)); @@ -574,6 +610,13 @@ public CompletableFuture> getRequestStatus( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getRequestStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getRequestStatus", localVarResponse)); @@ -662,6 +705,13 @@ public CompletableFuture> pairApiKey( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "pairApiKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("pairApiKey", localVarResponse)); @@ -757,6 +807,13 @@ public CompletableFuture> renameCosigner( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "renameCosigner", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("renameCosigner", localVarResponse)); @@ -841,6 +898,13 @@ public CompletableFuture> unpairApiKey(UUID cosignerId, Stri if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "unpairApiKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("unpairApiKey", localVarResponse)); @@ -924,6 +988,13 @@ public CompletableFuture> updateCallb if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateCallbackHandler", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java index 504e0a6e..257407a0 100644 --- a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AddAbiRequestDto; @@ -126,6 +127,13 @@ public CompletableFuture> addContractABI( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "addContractABI", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("addContractABI", localVarResponse)); @@ -212,6 +220,13 @@ public CompletableFuture> fetchContractAbi( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "fetchContractAbi", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("fetchContractAbi", localVarResponse)); @@ -298,6 +313,13 @@ public CompletableFuture> getDeployedCo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getDeployedContractByAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -382,6 +404,13 @@ public CompletableFuture> getDeployedCo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getDeployedContractById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -470,6 +499,13 @@ public CompletableFuture> getDep if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getDeployedContracts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/EarnApi.java b/src/main/java/com/fireblocks/sdk/api/EarnApi.java index 9965a0f3..e650a951 100644 --- a/src/main/java/com/fireblocks/sdk/api/EarnApi.java +++ b/src/main/java/com/fireblocks/sdk/api/EarnApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateEarnActionRequest; @@ -129,6 +130,13 @@ public CompletableFuture> approveTermsOfService(String idempot if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "approveTermsOfService", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -200,6 +208,13 @@ public CompletableFuture> createEarnAction if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createEarnAction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createEarnAction", localVarResponse)); @@ -287,6 +302,13 @@ public CompletableFuture> getEarnAction(String id if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEarnAction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getEarnAction", localVarResponse)); @@ -364,6 +386,13 @@ public CompletableFuture> getEarnActions( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEarnActions", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getEarnActions", localVarResponse)); @@ -461,6 +490,13 @@ public CompletableFuture> getEarnOpportuni if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEarnOpportunities", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -570,6 +606,13 @@ public CompletableFuture> getEarnPositions( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEarnPositions", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getEarnPositions", localVarResponse)); @@ -679,6 +722,13 @@ public CompletableFuture> getEarnProviders( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEarnProviders", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getEarnProviders", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java b/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java index 66e6c96a..22a8bcfc 100644 --- a/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.EmbeddedWallet; @@ -142,6 +143,13 @@ public CompletableFuture> addEmbeddedW if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "addEmbeddedWalletAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -233,6 +241,13 @@ public CompletableFuture> assignEmbeddedWallet( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "assignEmbeddedWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -314,6 +329,13 @@ public CompletableFuture> createEmbeddedWallet( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createEmbeddedWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -393,6 +415,13 @@ public CompletableFuture> createEmbeddedWalle if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createEmbeddedWalletAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -474,6 +503,13 @@ public CompletableFuture> getEmbeddedWallet(String w if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getEmbeddedWallet", localVarResponse)); @@ -550,6 +586,13 @@ public CompletableFuture> getEmbeddedWalletAc if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -656,6 +699,13 @@ private HttpRequest.Builder getEmbeddedWalletAccountRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletAddresses", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -778,6 +828,13 @@ public CompletableFuture> getEmbeddedWa if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -864,6 +921,13 @@ public CompletableFuture> getEmbeddedWal if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletAssetBalance", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -962,6 +1026,13 @@ private HttpRequest.Builder getEmbeddedWalletAssetBalanceRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletAssets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1074,6 +1145,13 @@ public CompletableFuture> getEmbeddedWalletDev if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletDevice", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1158,6 +1236,13 @@ private HttpRequest.Builder getEmbeddedWalletDeviceRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletDeviceSetupState", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1253,6 +1338,13 @@ private HttpRequest.Builder getEmbeddedWalletDeviceSetupStateRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletDevicesPaginated", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1362,6 +1454,13 @@ private HttpRequest.Builder getEmbeddedWalletDevicesPaginatedRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletLatestBackup", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1465,6 +1564,13 @@ private HttpRequest.Builder getEmbeddedWalletLatestBackupRequestBuilder(String w if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletPublicKeyInfoForAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1588,6 +1694,13 @@ private HttpRequest.Builder getEmbeddedWalletPublicKeyInfoForAddressRequestBuild if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletSetupStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1673,6 +1786,13 @@ private HttpRequest.Builder getEmbeddedWalletSetupStatusRequestBuilder(String wa if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWalletSupportedAssets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1779,6 +1899,13 @@ private HttpRequest.Builder getEmbeddedWalletSupportedAssetsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getEmbeddedWallets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1893,6 +2020,13 @@ public CompletableFuture> getPublicKeyInfoNcw( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPublicKeyInfoNcw", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2011,6 +2145,13 @@ private HttpRequest.Builder getPublicKeyInfoNcwRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "refreshEmbeddedWalletAssetBalance", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2108,6 +2249,13 @@ public CompletableFuture> updateEmbeddedWalletDeviceStatus( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateEmbeddedWalletDeviceStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2196,6 +2344,13 @@ public CompletableFuture> updateEmbeddedWalletStatus( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateEmbeddedWalletStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java b/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java index bbe50de2..a80573b6 100644 --- a/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AddExchangeAccountRequest; @@ -137,6 +138,13 @@ public CompletableFuture> addExchangeAcc if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "addExchangeAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -239,6 +247,13 @@ public CompletableFuture> convertAssets( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "convertAssets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("convertAssets", localVarResponse)); @@ -333,6 +348,13 @@ public CompletableFuture> getExchangeAccount( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getExchangeAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -414,6 +436,13 @@ public CompletableFuture> getExchangeAccountAsset( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getExchangeAccountAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -495,6 +524,13 @@ private HttpRequest.Builder getExchangeAccountAssetRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getExchangeAccountsCredentialsPublicKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -576,6 +612,13 @@ private HttpRequest.Builder getExchangeAccountsCredentialsPublicKeyRequestBuilde if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPagedExchangeAccounts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -682,6 +725,13 @@ public CompletableFuture> internalTransfer if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "internalTransfer", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("internalTransfer", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/ExternalWalletsApi.java b/src/main/java/com/fireblocks/sdk/api/ExternalWalletsApi.java index 63fabaf2..293ef158 100644 --- a/src/main/java/com/fireblocks/sdk/api/ExternalWalletsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ExternalWalletsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AddAssetToExternalWalletRequest; import com.fireblocks.sdk.model.CreateWalletRequest; @@ -129,6 +130,13 @@ public CompletableFuture> addAssetToExternalWal if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "addAssetToExternalWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -231,6 +239,13 @@ public CompletableFuture> createExternalWallet( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createExternalWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -315,6 +330,13 @@ public CompletableFuture> deleteExternalWallet(String walletId if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteExternalWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -380,6 +402,13 @@ public CompletableFuture> getExternalWallet(String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getExternalWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getExternalWallet", localVarResponse)); @@ -459,6 +488,13 @@ public CompletableFuture> getExternalWalletAsse if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getExternalWalletAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -539,6 +575,13 @@ public CompletableFuture>> getExternalWallets( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getExternalWallets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -616,6 +659,13 @@ public CompletableFuture> removeAssetFromExternalWallet( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "removeAssetFromExternalWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -696,6 +746,13 @@ public CompletableFuture> setExternalWalletCustomerRefId( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setExternalWalletCustomerRefId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java b/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java index a8168606..fdfe87ec 100644 --- a/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.DepositFundsFromLinkedDDAResponse; import com.fireblocks.sdk.model.FiatAccount; @@ -122,6 +123,13 @@ private String formatExceptionMessage(String operationId, int statusCode, String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "depositFundsFromLinkedDDA", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -211,6 +219,13 @@ public CompletableFuture> getFiatAccount(String account if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getFiatAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getFiatAccount", localVarResponse)); @@ -282,6 +297,13 @@ public CompletableFuture>> getFiatAccounts() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getFiatAccounts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getFiatAccounts", localVarResponse)); @@ -358,6 +380,13 @@ public CompletableFuture> redeemFund if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "redeemFundsToLinkedDDA", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java b/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java index f451e75d..c2fde273 100644 --- a/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.EditGasStationConfigurationResponse; import com.fireblocks.sdk.model.GasStationConfiguration; @@ -117,6 +118,13 @@ public CompletableFuture> getGasStatio if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getGasStationByAssetId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -193,6 +201,13 @@ public CompletableFuture> getGasStatio if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getGasStationInfo", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getGasStationInfo", localVarResponse)); @@ -274,6 +289,13 @@ private HttpRequest.Builder getGasStationInfoRequestBuilder() throws ApiExceptio if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateGasStationConfiguration", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -378,6 +400,13 @@ private HttpRequest.Builder updateGasStationConfigurationRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateGasStationConfigurationByAssetId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/GenieBetaApi.java b/src/main/java/com/fireblocks/sdk/api/GenieBetaApi.java index fb22c211..72f21c4c 100644 --- a/src/main/java/com/fireblocks/sdk/api/GenieBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/GenieBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.GenieChatMessage; import com.fireblocks.sdk.model.GenieCreateSessionResponse; @@ -121,6 +122,13 @@ public CompletableFuture> createGenieSes if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createGenieSession", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -210,6 +218,13 @@ public CompletableFuture> sendGenieMessage( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "sendGenieMessage", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("sendGenieMessage", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/InternalWalletsApi.java b/src/main/java/com/fireblocks/sdk/api/InternalWalletsApi.java index e0c7013f..2543808d 100644 --- a/src/main/java/com/fireblocks/sdk/api/InternalWalletsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/InternalWalletsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateInternalWalletAssetRequest; @@ -129,6 +130,13 @@ public CompletableFuture> createInternalWallet( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createInternalWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -221,6 +229,13 @@ public CompletableFuture> createInternalWalletAsset( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createInternalWalletAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -315,6 +330,13 @@ public CompletableFuture> deleteInternalWallet(String walletId if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteInternalWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -382,6 +404,13 @@ public CompletableFuture> deleteInternalWalletAsset( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteInternalWalletAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -449,6 +478,13 @@ public CompletableFuture> getInternalWallet(String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getInternalWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getInternalWallet", localVarResponse)); @@ -525,6 +561,13 @@ public CompletableFuture> getInternalWalletAsset( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getInternalWalletAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -607,6 +650,13 @@ public CompletableFuture> getInternalWallet if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getInternalWalletAssetsPaginated", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -702,6 +752,13 @@ public CompletableFuture>> getInternalWallets( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getInternalWallets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -785,6 +842,13 @@ public CompletableFuture> setCustomerRefIdForInternalWallet( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setCustomerRefIdForInternalWallet", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java b/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java index 9c24c674..60b6d3a3 100644 --- a/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java @@ -18,11 +18,16 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.BulkSigningKeyJob; +import com.fireblocks.sdk.model.CreateBulkSigningKeys; +import com.fireblocks.sdk.model.CreateBulkSigningKeysResponse; import com.fireblocks.sdk.model.CreateSigningKeyDto; import com.fireblocks.sdk.model.CreateValidationKeyDto; import com.fireblocks.sdk.model.CreateValidationKeyResponseDto; +import com.fireblocks.sdk.model.GetBulkSigningKeysJobsResponse; import com.fireblocks.sdk.model.GetSigningKeyResponseDto; import com.fireblocks.sdk.model.GetValidationKeyResponseDto; import com.fireblocks.sdk.model.ModifySigningKeyAgentIdDto; @@ -109,6 +114,113 @@ private String formatExceptionMessage(String operationId, int statusCode, String return operationId + " call failed with: " + statusCode + " - " + body; } + /** + * Register signing keys in bulk Accepts a set of signing keys certified by a single validation + * key and queues them for registration in the background. Returns a job id to poll. A workspace + * can have one bulk registration at a time; submitting another while one is QUEUED or + * IN_PROGRESS is rejected with 409. Bulk registrations from different workspaces share a + * limited number of slots, so a job may wait QUEUED behind another workspace's before it + * starts. Keys already registered in the workspace are recognized and skipped, so resubmitting + * the same request after a failure is safe and only processes what is missing. Every key must + * carry its own proof of ownership; a bulk registration has no interactive step in which one + * can arrive later. + * + * @param createBulkSigningKeys (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<CreateBulkSigningKeysResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> createBulkSigningKeys( + CreateBulkSigningKeys createBulkSigningKeys, String idempotencyKey) { + try { + HttpRequest.Builder localVarRequestBuilder = + createBulkSigningKeysRequestBuilder(createBulkSigningKeys, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createBulkSigningKeys", + localVarResponse.statusCode()); + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "createBulkSigningKeys", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + CreateBulkSigningKeysResponse>() {}))); + } 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 createBulkSigningKeysRequestBuilder( + CreateBulkSigningKeys createBulkSigningKeys, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "createBulkSigningKeys", "createBulkSigningKeys", createBulkSigningKeys); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/key_link/signing_keys/bulk"; + + 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(createBulkSigningKeys); + 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; + } /** * Add a new signing key Adds a new signing key to the workspace. The added key will be linked * to the specific Fireblocks agent user ID. The same user will receive the proof of ownership @@ -133,6 +245,13 @@ public CompletableFuture> createSigningKey( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createSigningKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createSigningKey", localVarResponse)); @@ -221,6 +340,13 @@ public CompletableFuture> createVali if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createValidationKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -313,6 +439,13 @@ public CompletableFuture> disableValidationKey( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "disableValidationKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -380,6 +513,191 @@ private HttpRequest.Builder disableValidationKeyRequestBuilder( } return localVarRequestBuilder; } + /** + * Get a bulk registration job Returns the progress and outcome of a bulk registration job. + * `created + alreadyRegistered` reaching `total` means every submitted key + * is present. + * + * @param jobId The id of the bulk registration job (required) + * @return CompletableFuture<ApiResponse<BulkSigningKeyJob>>, which completes + * exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> getBulkSigningKeysJob(String jobId) { + try { + HttpRequest.Builder localVarRequestBuilder = getBulkSigningKeysJobRequestBuilder(jobId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getBulkSigningKeysJob", + localVarResponse.statusCode()); + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "getBulkSigningKeysJob", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + BulkSigningKeyJob>() {}))); + } 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 getBulkSigningKeysJobRequestBuilder(String jobId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getBulkSigningKeysJob", "jobId", jobId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/key_link/signing_keys/bulk/jobs/{jobId}" + .replace("{jobId}", ApiClient.urlEncode(jobId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get bulk registration jobs Returns the workspace's bulk registration jobs, newest first, + * a page at a time. + * + * @param pageCursor Cursor to the next page (optional) + * @param pageSize Amount of results to return in the next page (optional, default to 10) + * @return CompletableFuture<ApiResponse<GetBulkSigningKeysJobsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> getBulkSigningKeysJobs( + String pageCursor, Integer pageSize) { + try { + HttpRequest.Builder localVarRequestBuilder = + getBulkSigningKeysJobsRequestBuilder(pageCursor, pageSize); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getBulkSigningKeysJobs", + localVarResponse.statusCode()); + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "getBulkSigningKeysJobs", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + GetBulkSigningKeysJobsResponse>() {}))); + } 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 getBulkSigningKeysJobsRequestBuilder( + String pageCursor, Integer pageSize) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/key_link/signing_keys/bulk/jobs"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Get a signing key by `keyId` Returns a signing key if it exists, identified by the * specified `keyId`. @@ -398,6 +716,13 @@ public CompletableFuture> getSigningKey(String keyId) if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSigningKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getSigningKey", localVarResponse)); @@ -505,6 +830,13 @@ public CompletableFuture> getSigningKeysLi if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSigningKeysList", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -626,6 +958,13 @@ public CompletableFuture> getValidationKey(String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getValidationKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getValidationKey", localVarResponse)); @@ -703,6 +1042,13 @@ public CompletableFuture> getValidation if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getValidationKeysList", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -804,6 +1150,13 @@ public CompletableFuture> setAgentId( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setAgentId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setAgentId", localVarResponse)); @@ -881,6 +1234,13 @@ public CompletableFuture> updateSigningKey( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateSigningKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateSigningKey", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java b/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java index ff96e750..1a15387d 100644 --- a/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.GetMpcKeysResponse; import java.io.IOException; @@ -113,6 +114,13 @@ public CompletableFuture> getMpcKeysList() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getMpcKeysList", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getMpcKeysList", localVarResponse)); @@ -184,6 +192,13 @@ public CompletableFuture> getMpcKeysListByUser(S if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getMpcKeysListByUser", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java index 1a3477cd..58efd884 100644 --- a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateNetworkIdRequest; @@ -136,6 +137,13 @@ public CompletableFuture> checkThirdPartyRouting( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "checkThirdPartyRouting", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -232,6 +240,13 @@ public CompletableFuture> createNetworkCo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createNetworkConnection", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -320,6 +335,13 @@ public CompletableFuture> createNetworkId( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createNetworkId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createNetworkId", localVarResponse)); @@ -405,6 +427,13 @@ public CompletableFuture> deleteNet if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteNetworkConnection", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -483,6 +512,13 @@ public CompletableFuture> deleteNetworkId( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteNetworkId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("deleteNetworkId", localVarResponse)); @@ -559,6 +595,13 @@ public CompletableFuture> getNetwork( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getNetwork", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getNetwork", localVarResponse)); @@ -641,6 +684,13 @@ public CompletableFuture>> getNetwor if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getNetworkConnections", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -714,6 +764,13 @@ public CompletableFuture> getNetworkId(String net if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getNetworkId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getNetworkId", localVarResponse)); @@ -787,6 +844,13 @@ public CompletableFuture>> getNetworkIds() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getNetworkIds", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getNetworkIds", localVarResponse)); @@ -860,6 +924,13 @@ public CompletableFuture>> getRoutingPolicyAssetGroups( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getRoutingPolicyAssetGroups", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -945,6 +1016,13 @@ public CompletableFuture> searchNetworkIds if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "searchNetworkIds", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("searchNetworkIds", localVarResponse)); @@ -1056,6 +1134,13 @@ public CompletableFuture> setNetworkIdDiscover if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setNetworkIdDiscoverability", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1150,6 +1235,13 @@ public CompletableFuture> setNetworkIdName( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setNetworkIdName", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setNetworkIdName", localVarResponse)); @@ -1239,6 +1331,13 @@ public CompletableFuture> setNetworkIdRoutingP if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setNetworkIdRoutingPolicy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1329,6 +1428,13 @@ public CompletableFuture> setRoutingPolicy if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setRoutingPolicy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setRoutingPolicy", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/NftsApi.java b/src/main/java/com/fireblocks/sdk/api/NftsApi.java index 3d35980f..9a6da5c8 100644 --- a/src/main/java/com/fireblocks/sdk/api/NftsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/NftsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.GetNFTsResponse; @@ -125,6 +126,13 @@ public CompletableFuture> getNFT(String id) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getNFT", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getNFT", localVarResponse)); @@ -205,6 +213,13 @@ public CompletableFuture> getNFTs( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getNFTs", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getNFTs", localVarResponse)); @@ -354,6 +369,13 @@ public CompletableFuture> getOwnershipTo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getOwnershipTokens", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -505,6 +527,13 @@ public CompletableFuture> listOwnedCol if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listOwnedCollections", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -647,6 +676,13 @@ public CompletableFuture> listOwnedTokens( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listOwnedTokens", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("listOwnedTokens", localVarResponse)); @@ -767,6 +803,13 @@ public CompletableFuture> refreshNFTMetadata( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "refreshNFTMetadata", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -845,6 +888,13 @@ public CompletableFuture> updateOwnershipTokens( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateOwnershipTokens", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -944,6 +994,13 @@ public CompletableFuture> updateTokenOwnershipStatus( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateTokenOwnershipStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1041,6 +1098,13 @@ public CompletableFuture> updateTokensOwnershipSpam( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateTokensOwnershipSpam", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1132,6 +1196,13 @@ public CompletableFuture> updateTokensOwnershipStatus( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateTokensOwnershipStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/OffExchangesApi.java b/src/main/java/com/fireblocks/sdk/api/OffExchangesApi.java index 774c2310..dae2b1dd 100644 --- a/src/main/java/com/fireblocks/sdk/api/OffExchangesApi.java +++ b/src/main/java/com/fireblocks/sdk/api/OffExchangesApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AddCollateralRequestBody; @@ -129,6 +130,13 @@ public CompletableFuture> addOffExchange( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "addOffExchange", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("addOffExchange", localVarResponse)); @@ -219,6 +227,13 @@ public CompletableFuture> getOffExchangeCollateralA if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getOffExchangeCollateralAccounts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -302,6 +317,13 @@ private HttpRequest.Builder getOffExchangeCollateralAccountsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getOffExchangeSettlementTransactions", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -405,6 +427,13 @@ public CompletableFuture> removeOffExchan if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "removeOffExchange", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("removeOffExchange", localVarResponse)); @@ -496,6 +525,13 @@ public CompletableFuture> settleOffExchangeTrade if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "settleOffExchangeTrades", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/OnchainDataApi.java b/src/main/java/com/fireblocks/sdk/api/OnchainDataApi.java index a309fa2e..1bc9bc96 100644 --- a/src/main/java/com/fireblocks/sdk/api/OnchainDataApi.java +++ b/src/main/java/com/fireblocks/sdk/api/OnchainDataApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AccessRegistryCurrentStateResponse2; @@ -147,6 +148,13 @@ private String formatExceptionMessage(String operationId, int statusCode, String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAccessRegistryCurrentState", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -263,6 +271,13 @@ public CompletableFuture> getAccessRe if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAccessRegistrySummary", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -349,6 +364,13 @@ public CompletableFuture>> getActiveRolesF if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getActiveRolesForContract", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -467,6 +489,13 @@ public CompletableFuture> getContractB if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContractBalanceHistory", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -595,6 +624,13 @@ public CompletableFuture> getContractB if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContractBalancesSummary", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -708,6 +744,13 @@ public CompletableFuture> getContractTota if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getContractTotalSupply", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -853,6 +896,13 @@ private HttpRequest.Builder getContractTotalSupplyRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getLatestBalancesForContract", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -993,6 +1043,13 @@ public CompletableFuture> getOnch if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getOnchainTransactions", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java b/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java index 079e5550..27ba50df 100644 --- a/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.GetOtaStatusResponse; import com.fireblocks.sdk.model.SetOtaStatusRequest; @@ -113,6 +114,13 @@ public CompletableFuture> getOtaStatus() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getOtaStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getOtaStatus", localVarResponse)); @@ -191,6 +199,13 @@ public CompletableFuture> setOtaStatus( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setOtaStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setOtaStatus", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/PaymentsPayoutApi.java b/src/main/java/com/fireblocks/sdk/api/PaymentsPayoutApi.java index 6219d95a..14b78b46 100644 --- a/src/main/java/com/fireblocks/sdk/api/PaymentsPayoutApi.java +++ b/src/main/java/com/fireblocks/sdk/api/PaymentsPayoutApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreatePayoutRequest; import com.fireblocks.sdk.model.DispatchPayoutResponse; @@ -131,6 +132,13 @@ public CompletableFuture> createPayout( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createPayout", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createPayout", localVarResponse)); @@ -225,6 +233,13 @@ public CompletableFuture> executePayoutActio if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "executePayoutAction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -310,6 +325,13 @@ public CompletableFuture> getPayout(String payoutId) if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPayout", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getPayout", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/PolicyEditorBetaApi.java b/src/main/java/com/fireblocks/sdk/api/PolicyEditorBetaApi.java index 113c1f57..7902883d 100644 --- a/src/main/java/com/fireblocks/sdk/api/PolicyEditorBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/PolicyEditorBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.LegacyDraftReviewAndValidationResponse; import com.fireblocks.sdk.model.LegacyPolicyAndValidationResponse; @@ -122,6 +123,13 @@ private String formatExceptionMessage(String operationId, int statusCode, String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getActivePolicyLegacy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -199,6 +207,13 @@ public CompletableFuture> ge if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getDraftLegacy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getDraftLegacy", localVarResponse)); @@ -282,6 +297,13 @@ public CompletableFuture> publishDraftLegacy( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "publishDraftLegacy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -376,6 +398,13 @@ public CompletableFuture> publishPolicyRules( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "publishPolicyRules", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -470,6 +499,13 @@ public CompletableFuture> up if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateDraftLegacy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateDraftLegacy", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2Api.java b/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2Api.java index bac6dfe9..ca40bf1c 100644 --- a/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2Api.java +++ b/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2Api.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.DraftReviewAndValidationResponse; @@ -125,6 +126,13 @@ public CompletableFuture> getActivePoli if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getActivePolicy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getActivePolicy", localVarResponse)); @@ -218,6 +226,13 @@ public CompletableFuture> getDraft if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getDraft", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getDraft", localVarResponse)); @@ -319,6 +334,13 @@ public CompletableFuture> publishDraft( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "publishDraft", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("publishDraft", localVarResponse)); @@ -412,6 +434,13 @@ public CompletableFuture> updateDr if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateDraft", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateDraft", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java b/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java index 0abdc4f9..ca98a1f2 100644 --- a/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.PolicyRuleQuotaRequest; import com.fireblocks.sdk.model.PolicyRuleQuotaResponse; @@ -119,6 +120,13 @@ public CompletableFuture> getPolicyRuleQuot if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPolicyRuleQuota", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/ReportsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/ReportsBetaApi.java index 41de3fce..8329d3e4 100644 --- a/src/main/java/com/fireblocks/sdk/api/ReportsBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ReportsBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateAddressesReportRequest; @@ -130,6 +131,13 @@ public CompletableFuture> createReport( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createReport", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createReport", localVarResponse)); @@ -219,6 +227,13 @@ public CompletableFuture> getReport(String report if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getReport", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getReport", localVarResponse)); @@ -310,6 +325,13 @@ public CompletableFuture> listReports( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listReports", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("listReports", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java b/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java index 77b0456e..70a7adaa 100644 --- a/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java @@ -17,6 +17,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import java.io.InputStream; import java.net.URI; @@ -115,6 +116,13 @@ public CompletableFuture> resetDevice(String id, String idempo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "resetDevice", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("resetDevice", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java b/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java index ccc848b3..5019dc60 100644 --- a/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java +++ b/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.GetFindingsExternalResponse; @@ -121,6 +122,13 @@ public CompletableFuture> getSecurityFindin if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSecurityFindingById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -205,6 +213,13 @@ public CompletableFuture> getSecurityFi if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSecurityFindings", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -315,6 +330,13 @@ public CompletableFuture> updateSecurityFin if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateSecurityFindingById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java b/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java index 98573440..a99044d9 100644 --- a/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java +++ b/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.SmartTransferApproveTerm; @@ -145,6 +146,13 @@ public CompletableFuture> approveDv if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "approveDvPTicketTerm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -246,6 +254,13 @@ public CompletableFuture> cancelTicket( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "cancelTicket", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("cancelTicket", localVarResponse)); @@ -333,6 +348,13 @@ public CompletableFuture> createTicket( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTicket", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createTicket", localVarResponse)); @@ -431,6 +453,13 @@ public CompletableFuture> createTic if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTicketTerm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createTicketTerm", localVarResponse)); @@ -524,6 +553,13 @@ public CompletableFuture> findTicketByI if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "findTicketById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("findTicketById", localVarResponse)); @@ -602,6 +638,13 @@ public CompletableFuture> findTicke if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "findTicketTermById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -686,6 +729,13 @@ public CompletableFuture> fulfillTicket if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "fulfillTicket", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("fulfillTicket", localVarResponse)); @@ -773,6 +823,13 @@ public CompletableFuture> fundDvpTicket if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "fundDvpTicket", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("fundDvpTicket", localVarResponse)); @@ -877,6 +934,13 @@ public CompletableFuture> fundTicke if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "fundTicketTerm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("fundTicketTerm", localVarResponse)); @@ -970,6 +1034,13 @@ public CompletableFuture> getSmartTransferSt if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSmartTransferStatistic", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1043,6 +1114,13 @@ private HttpRequest.Builder getSmartTransferStatisticRequestBuilder() throws Api if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSmartTransferUserGroups", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1128,6 +1206,13 @@ public CompletableFuture> manuallyF if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "manuallyFundTicketTerm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1228,6 +1313,13 @@ public CompletableFuture> removeTicketTerm(String ticketId, St if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "removeTicketTerm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("removeTicketTerm", localVarResponse)); @@ -1333,6 +1425,13 @@ public CompletableFuture> searc if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "searchTickets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("searchTickets", localVarResponse)); @@ -1466,6 +1565,13 @@ public CompletableFuture> setExternalRe if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setExternalRefId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setExternalRefId", localVarResponse)); @@ -1569,6 +1675,13 @@ public CompletableFuture> setTicketExpi if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setTicketExpiration", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1669,6 +1782,13 @@ public CompletableFuture> setUserGr if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setUserGroups", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setUserGroups", localVarResponse)); @@ -1765,6 +1885,13 @@ public CompletableFuture> submitTicket( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "submitTicket", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("submitTicket", localVarResponse)); @@ -1867,6 +1994,13 @@ public CompletableFuture> updateTic if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateTicketTerm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateTicketTerm", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/StakingApi.java b/src/main/java/com/fireblocks/sdk/api/StakingApi.java index 7c34db75..784e3ec7 100644 --- a/src/main/java/com/fireblocks/sdk/api/StakingApi.java +++ b/src/main/java/com/fireblocks/sdk/api/StakingApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.ChainDescriptor; @@ -139,6 +140,13 @@ public CompletableFuture> approveTermsOfServiceByProviderId( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "approveTermsOfServiceByProviderId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -219,6 +227,13 @@ public CompletableFuture> claimRewards( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "claimRewards", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("claimRewards", localVarResponse)); @@ -312,6 +327,13 @@ public CompletableFuture> consolidate( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "consolidate", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("consolidate", localVarResponse)); @@ -412,6 +434,13 @@ public CompletableFuture>> getAllDelegations( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAllDelegations", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getAllDelegations", localVarResponse)); @@ -506,6 +535,13 @@ public CompletableFuture> getChainInfo( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getChainInfo", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getChainInfo", localVarResponse)); @@ -582,6 +618,13 @@ public CompletableFuture>> getChains() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getChains", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getChains", localVarResponse)); @@ -655,6 +698,13 @@ public CompletableFuture> getDelegationById(String id) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getDelegationById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getDelegationById", localVarResponse)); @@ -738,6 +788,13 @@ private HttpRequest.Builder getDelegationByIdRequestBuilder(String id) throws Ap if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPositionRelatedTransactions", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -856,6 +913,13 @@ public CompletableFuture> getPosi if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPositions", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getPositions", localVarResponse)); @@ -960,6 +1024,13 @@ public CompletableFuture>> getProviders() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getProviders", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getProviders", localVarResponse)); @@ -1029,6 +1100,13 @@ public CompletableFuture> getSummary() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSummary", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getSummary", localVarResponse)); @@ -1098,6 +1176,13 @@ public CompletableFuture>> getSummary if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getSummaryByVault", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getSummaryByVault", localVarResponse)); @@ -1184,6 +1269,13 @@ public CompletableFuture> mergeStakeAcco if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "mergeStakeAccounts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1287,6 +1379,13 @@ public CompletableFuture> split( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "split", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("split", localVarResponse)); @@ -1388,6 +1487,13 @@ public CompletableFuture> stake( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "stake", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("stake", localVarResponse)); @@ -1482,6 +1588,13 @@ public CompletableFuture> unstake( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "unstake", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("unstake", localVarResponse)); @@ -1572,6 +1685,13 @@ public CompletableFuture> withdraw( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "withdraw", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("withdraw", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/TagsApi.java b/src/main/java/com/fireblocks/sdk/api/TagsApi.java index 1a76eb86..e90a6635 100644 --- a/src/main/java/com/fireblocks/sdk/api/TagsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TagsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.ApprovalRequest; @@ -130,6 +131,13 @@ public CompletableFuture> createTag( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTag", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createTag", localVarResponse)); @@ -211,6 +219,13 @@ public CompletableFuture> deleteTag(UUID tagId) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteTag", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("deleteTag", localVarResponse)); @@ -271,6 +286,13 @@ public CompletableFuture> getApprovalRequest(String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getApprovalRequest", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -343,6 +365,13 @@ public CompletableFuture> getTag(UUID tagId) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTag", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTag", localVarResponse)); @@ -438,6 +467,13 @@ public CompletableFuture> getTags( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTags", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTags", localVarResponse)); @@ -557,6 +593,13 @@ public CompletableFuture> updateTag( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateTag", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateTag", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/TempoBetaApi.java b/src/main/java/com/fireblocks/sdk/api/TempoBetaApi.java index 8905e02d..47eb9903 100644 --- a/src/main/java/com/fireblocks/sdk/api/TempoBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TempoBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateTempoTransferRequest; import com.fireblocks.sdk.model.CreateTempoTransferResponse; @@ -118,6 +119,13 @@ public CompletableFuture> createTempoTr if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTempoTransfer", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java index 783c650b..ed385fc3 100644 --- a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AccessRegistryCurrentStateResponse; @@ -163,6 +164,13 @@ public CompletableFuture> burnCollectionT if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "burnCollectionToken", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -259,6 +267,13 @@ public CompletableFuture> createNewCollection( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createNewCollection", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -353,6 +368,13 @@ private HttpRequest.Builder createNewCollectionRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deactivateAndUnlinkAdapters", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -451,6 +473,13 @@ public CompletableFuture>> deployAndLi if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deployAndLinkAdapters", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -544,6 +573,13 @@ public CompletableFuture> fetchCollectionTokenDet if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "fetchCollectionTokenDetails", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -622,6 +658,13 @@ public CompletableFuture> getCollectionById(Strin if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getCollectionById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getCollectionById", localVarResponse)); @@ -701,6 +744,13 @@ public CompletableFuture> getDeployableAd if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getDeployableAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -794,6 +844,13 @@ public CompletableFuture> getLayerZer if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getLayerZeroDvnConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -893,6 +950,13 @@ public CompletableFuture> getLayerZeroPee if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getLayerZeroPeers", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getLayerZeroPeers", localVarResponse)); @@ -979,6 +1043,13 @@ private HttpRequest.Builder getLayerZeroPeersRequestBuilder(UUID adapterTokenLin if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getLinkedCollections", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1073,6 +1144,13 @@ public CompletableFuture> getLinkedToken(String id) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getLinkedToken", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getLinkedToken", localVarResponse)); @@ -1150,6 +1228,13 @@ public CompletableFuture> getLinkedTokens( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getLinkedTokens", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getLinkedTokens", localVarResponse)); @@ -1241,6 +1326,13 @@ public CompletableFuture> getLinkedTokensCount() if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getLinkedTokensCount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1321,6 +1413,13 @@ private HttpRequest.Builder getLinkedTokensCountRequestBuilder() throws ApiExcep if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenAccessRegistryAddresses", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1425,6 +1524,13 @@ private HttpRequest.Builder getTokenAccessRegistryAddressesRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenAccessRegistrySummary", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1506,6 +1612,13 @@ public CompletableFuture> getTokenBalanceForA if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenBalanceForAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1616,6 +1729,13 @@ public CompletableFuture> getTokenBalan if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenBalanceHistory", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1741,6 +1861,13 @@ public CompletableFuture> getTokenBalan if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenBalances", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTokenBalances", localVarResponse)); @@ -1841,6 +1968,13 @@ public CompletableFuture> getTokenCont if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenContractSummary", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1918,6 +2052,13 @@ public CompletableFuture> getTokenRbac(String i if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenRbac", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTokenRbac", localVarResponse)); @@ -2010,6 +2151,13 @@ public CompletableFuture> getTokenTotalSup if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenTotalSupply", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2139,6 +2287,13 @@ public CompletableFuture> getToken if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenTransactions", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2277,6 +2432,13 @@ public CompletableFuture> getTokenTra if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTokenTransfers", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTokenTransfers", localVarResponse)); @@ -2402,6 +2564,13 @@ public CompletableFuture> issueNewToken( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "issueNewToken", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("issueNewToken", localVarResponse)); @@ -2493,6 +2662,13 @@ public CompletableFuture>> issueTokenMultiChain( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "issueTokenMultiChain", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2586,6 +2762,13 @@ public CompletableFuture> link( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "link", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("link", localVarResponse)); @@ -2673,6 +2856,13 @@ public CompletableFuture> mintCollectionT if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "mintCollectionToken", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2774,6 +2964,13 @@ public CompletableFuture>> reIssueTokenMultiChain if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "reIssueTokenMultiChain", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2874,6 +3071,13 @@ public CompletableFuture> removeLayerZ if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "removeLayerZeroPeers", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2969,6 +3173,13 @@ public CompletableFuture> setLayerZer if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setLayerZeroDvnConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3066,6 +3277,13 @@ public CompletableFuture> setLayerZeroPee if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setLayerZeroPeers", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setLayerZeroPeers", localVarResponse)); @@ -3153,6 +3371,13 @@ public CompletableFuture> unlink(String id) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "unlink", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("unlink", localVarResponse)); @@ -3213,6 +3438,13 @@ public CompletableFuture> unlinkCollection(String id) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "unlinkCollection", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("unlinkCollection", localVarResponse)); @@ -3280,6 +3512,13 @@ private HttpRequest.Builder unlinkCollectionRequestBuilder(String id) throws Api if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "validateLayerZeroChannelConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/TrLinkApi.java b/src/main/java/com/fireblocks/sdk/api/TrLinkApi.java index 257fb19e..ae805715 100644 --- a/src/main/java/com/fireblocks/sdk/api/TrLinkApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TrLinkApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.TRLinkAPIPagedResponse; @@ -156,6 +157,13 @@ private String formatExceptionMessage(String operationId, int statusCode, String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "assessTRLinkTravelRuleRequirement", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -268,6 +276,13 @@ public CompletableFuture> cancelTRLinkTrm( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "cancelTRLinkTrm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("cancelTRLinkTrm", localVarResponse)); @@ -376,6 +391,13 @@ private HttpRequest.Builder cancelTRLinkTrmRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "connectTRLinkIntegration", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -483,6 +505,13 @@ public CompletableFuture> createTRLinkCustom if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTRLinkCustomer", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -582,6 +611,13 @@ private HttpRequest.Builder createTRLinkCustomerRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTRLinkIntegration", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -687,6 +723,13 @@ public CompletableFuture> createTRLink if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTRLinkManualDecision", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -801,6 +844,13 @@ public CompletableFuture> createTRLinkTrm( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTRLinkTrm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createTRLinkTrm", localVarResponse)); @@ -897,6 +947,13 @@ public CompletableFuture> deleteTRLinkCustomer(UUID customerId if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteTRLinkCustomer", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -967,6 +1024,13 @@ public CompletableFuture> disconnectTRLinkIntegration( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "disconnectTRLinkIntegration", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1039,6 +1103,13 @@ public CompletableFuture> getTRLinkCustomerB if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkCustomerById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1121,6 +1192,13 @@ private HttpRequest.Builder getTRLinkCustomerByIdRequestBuilder(UUID customerId) if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkCustomerIntegrationById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1211,6 +1289,13 @@ private HttpRequest.Builder getTRLinkCustomerIntegrationByIdRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkCustomerIntegrations", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1293,6 +1378,13 @@ public CompletableFuture>> getTRLinkCus if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkCustomers", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1370,6 +1462,13 @@ public CompletableFuture> getTRLinkIntegrat if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkIntegrationPublicKey", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1453,6 +1552,13 @@ public CompletableFuture>> getTRLinkPart if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkPartners", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTRLinkPartners", localVarResponse)); @@ -1528,6 +1634,13 @@ public CompletableFuture> getTRLinkPolicy() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkPolicy", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTRLinkPolicy", localVarResponse)); @@ -1604,6 +1717,13 @@ public CompletableFuture> getTRLink if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkSupportedAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1692,6 +1812,13 @@ public CompletableFuture> getTRLinkTrmById( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkTrmById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTRLinkTrmById", localVarResponse)); @@ -1776,6 +1903,13 @@ private HttpRequest.Builder getTRLinkTrmByIdRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkTrmRequiredActions", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1864,6 +1998,13 @@ public CompletableFuture> getTRLinkVaspById( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTRLinkVaspById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTRLinkVaspById", localVarResponse)); @@ -1949,6 +2090,13 @@ public CompletableFuture> listTRLinkS if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listTRLinkSupportedAssets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2053,6 +2201,13 @@ public CompletableFuture> listTRLinkVasps( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "listTRLinkVasps", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("listTRLinkVasps", localVarResponse)); @@ -2161,6 +2316,13 @@ public CompletableFuture> redirectTRLinkTrm( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "redirectTRLinkTrm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("redirectTRLinkTrm", localVarResponse)); @@ -2273,6 +2435,13 @@ public CompletableFuture> resolveActionTRLink if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "resolveActionTRLinkTrm", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2387,6 +2556,13 @@ private HttpRequest.Builder resolveActionTRLinkTrmRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setTRLinkDestinationTravelRuleMessageId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2500,6 +2676,13 @@ private HttpRequest.Builder setTRLinkDestinationTravelRuleMessageIdRequestBuilde if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setTRLinkTransactionTravelRuleMessageId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2608,6 +2791,13 @@ private HttpRequest.Builder setTRLinkTransactionTravelRuleMessageIdRequestBuilde if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "testTRLinkIntegrationConnection", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2703,6 +2893,13 @@ public CompletableFuture> updateTRLinkCustom if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateTRLinkCustomer", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java b/src/main/java/com/fireblocks/sdk/api/TradingApi.java similarity index 91% rename from src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java rename to src/main/java/com/fireblocks/sdk/api/TradingApi.java index 14d95d03..b5d2398f 100644 --- a/src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TradingApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateOffersRequest; @@ -61,7 +62,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class TradingBetaApi { +public class TradingApi { private final HttpClient memberVarHttpClient; private final ObjectMapper memberVarObjectMapper; private final String memberVarBaseUri; @@ -70,11 +71,11 @@ public class TradingBetaApi { private final Consumer> memberVarResponseInterceptor; private final Consumer> memberVarAsyncResponseInterceptor; - public TradingBetaApi() { + public TradingApi() { this(new ApiClient()); } - public TradingBetaApi(ApiClient apiClient) { + public TradingApi(ApiClient apiClient) { memberVarHttpClient = apiClient.getHttpClient(); memberVarObjectMapper = apiClient.getObjectMapper(); memberVarBaseUri = apiClient.getBaseUri(); @@ -122,12 +123,9 @@ private String formatExceptionMessage(String operationId, int statusCode, String /** * Create an order Create an order to buy or sell an asset. If no source is given, an external - * source will be use. Note: These endpoints are currently in beta and might be subject to - * changes. If you want to participate and learn more about the Fireblocks Trading, please - * contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - * Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed - * information about error codes and troubleshooting, please refer to our [API Error Codes - * documentation](https://developers.fireblocks.com/reference/api-error-codes). + * source will be use. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For + * detailed information about error codes and troubleshooting, please refer to our [API Error + * Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param createOrderRequest (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -148,6 +146,13 @@ public CompletableFuture> createOrder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createOrder", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createOrder", localVarResponse)); @@ -214,12 +219,9 @@ private HttpRequest.Builder createOrderRequestBuilder( } /** * Create a quote Generate a time-limited quote for asset conversion, providing exchange rate - * and amount calculations. Note: These endpoints are currently in beta and might be subject to - * changes. If you want to participate and learn more about the Fireblocks Trading, please - * contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - * Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed - * information about error codes and troubleshooting, please refer to our [API Error Codes - * documentation](https://developers.fireblocks.com/reference/api-error-codes). + * and amount calculations. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, + * Editor. For detailed information about error codes and troubleshooting, please refer to our + * [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param createQuote (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -240,6 +242,13 @@ public CompletableFuture> createQuote( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createQuote", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createQuote", localVarResponse)); @@ -309,12 +318,9 @@ private HttpRequest.Builder createQuoteRequestBuilder( * Always operates in open scope — no provider or account selection required. Returns a mix of * indicative rates and committed quotes as applicable per provider. If no slippageBps is * provided, it defaults to 50 bps (0.5%). Slippage and settlement configuration do not affect - * the returned rate. Note: These endpoints are currently in beta and might be subject to - * changes. If you want to participate and learn more about the Fireblocks Trading, please - * contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - * Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed - * information about error codes and troubleshooting, please refer to our [API Error Codes - * documentation](https://developers.fireblocks.com/reference/api-error-codes). + * the returned rate. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For + * detailed information about error codes and troubleshooting, please refer to our [API Error + * Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param createOffersRequest (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -335,6 +341,13 @@ public CompletableFuture> fetchAllOffers( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "fetchAllOffers", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("fetchAllOffers", localVarResponse)); @@ -402,12 +415,9 @@ private HttpRequest.Builder fetchAllOffersRequestBuilder( } /** * Get rates Retrieve indicative exchange rate from specified providers for a given asset pair. - * Rates are non-executable price signals intended for discovery and display purposes. Note: - * These endpoints are currently in beta and might be subject to changes. If you want to - * participate and learn more about the Fireblocks Trading, please contact your Fireblocks - * Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, - * Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about - * error codes and troubleshooting, please refer to our [API Error Codes + * Rates are non-executable price signals intended for discovery and display purposes. Endpoint + * Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed + * information about error codes and troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param ratesRequest (required) @@ -429,6 +439,13 @@ public CompletableFuture> fetchRates( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "fetchRates", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("fetchRates", localVarResponse)); @@ -494,12 +511,9 @@ private HttpRequest.Builder fetchRatesRequestBuilder( return localVarRequestBuilder; } /** - * Get order details Retrieve detailed information about a specific order by its ID. Note:These - * endpoints are currently in beta and might be subject to changes. If you want to participate - * and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success - * Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, - * Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error - * codes and troubleshooting, please refer to our [API Error Codes + * Get order details Retrieve detailed information about a specific order by its ID. Endpoint + * Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed + * information about error codes and troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param orderId The ID of the order to fetch. (required) @@ -516,6 +530,13 @@ public CompletableFuture> getOrder(String orderId) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getOrder", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getOrder", localVarResponse)); @@ -578,12 +599,9 @@ private HttpRequest.Builder getOrderRequestBuilder(String orderId) throws ApiExc * Schema (Draft-7) describing the shape of the `data` object expected on `POST * /trading/orders/{orderId}/requirement/data`, and `requiredFiles` descriptors * for any files the provider requires (uploaded via `POST - * /trading/orders/{orderId}/requirement/file`). Note: These endpoints are currently in - * beta and might be subject to changes. If you want to participate and learn more about the - * Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email - * to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, - * Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, - * please refer to our [API Error Codes + * /trading/orders/{orderId}/requirement/file`). Endpoint Permission: Owner, Admin, + * Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error + * codes and troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param orderId The ID of the order for which the order requirement is issued. (required) @@ -602,6 +620,13 @@ public CompletableFuture> getOrderRequireme if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getOrderRequirements", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -663,12 +688,10 @@ private HttpRequest.Builder getOrderRequirementsRequestBuilder(String orderId) } /** * Get orders Retrieve a paginated list of orders with optional filtering by account, provider, - * status, and time range. Note:These endpoints are currently in beta and might be subject to - * changes. If you want to participate and learn more about the Fireblocks Trading, please - * contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - * Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For - * detailed information about error codes and troubleshooting, please refer to our [API Error - * Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + * status, and time range. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, + * Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, + * please refer to our [API Error Codes + * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param pageSize pageSize for pagination. (required) * @param pageCursor (optional) @@ -711,6 +734,13 @@ public CompletableFuture> getOrders( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getOrders", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getOrders", localVarResponse)); @@ -808,12 +838,9 @@ private HttpRequest.Builder getOrdersRequestBuilder( return localVarRequestBuilder; } /** - * Get trading provider by ID Retrieve a single provider by ID. **Note:** These endpoints are - * currently in beta and might be subject to changes. If you want to participate and learn more - * about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send - * an email to CSM@fireblocks.com. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, - * Signer, Approver, Editor, Viewer. For detailed information about error codes and - * troubleshooting, please refer to our [API Error Codes + * Get trading provider by ID Retrieve a single provider by ID. **Endpoint Permission:** Owner, + * Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about + * error codes and troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param providerId The unique identifier of the provider. (required) @@ -832,6 +859,13 @@ public CompletableFuture> getTradingProviderById( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTradingProviderById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -892,12 +926,9 @@ private HttpRequest.Builder getTradingProviderByIdRequestBuilder(String provider } /** * Get providers Retrieve a list of all available external providers supporting trading - * activities through the platform. **Note:** These endpoints are currently in beta and might be - * subject to changes. If you want to participate and learn more about the Fireblocks Trading, - * please contact your Fireblocks Customer Success Manager or send an email to - * CSM@fireblocks.com. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, - * Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, - * please refer to our [API Error Codes + * activities through the platform. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, + * Signer, Approver, Editor, Viewer. For detailed information about error codes and + * troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param pageSize Page size for pagination. (optional, default to 20) @@ -917,6 +948,13 @@ public CompletableFuture> getTradingProviders if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTradingProviders", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -996,12 +1034,10 @@ private HttpRequest.Builder getTradingProvidersRequestBuilder( * requirement on an order that is in `AWAITING_INFORMATION` status. The request body * carries `data` — a free-form object conforming to the `requiredData` JSON * Schema returned by the GET endpoint. Any required files are uploaded separately via - * `POST /trading/orders/{orderId}/requirement/file`. Note: These endpoints are - * currently in beta and might be subject to changes. If you want to participate and learn more - * about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send - * an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, - * Editor. For detailed information about error codes and troubleshooting, please refer to our - * [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + * `POST /trading/orders/{orderId}/requirement/file`. Endpoint Permission: Owner, + * Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and + * troubleshooting, please refer to our [API Error Codes + * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param submitOrderRequirementRequest (required) * @param orderId The ID of the order to submit the order requirement response for. (required) @@ -1026,6 +1062,13 @@ public CompletableFuture> submitOrderRequirements( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "submitOrderRequirements", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1097,12 +1140,9 @@ private HttpRequest.Builder submitOrderRequirementsRequestBuilder( * `fileKey` from `requiredFiles` on the GET response) and the binary * `file`. Its type must be one of the supported file formats. Fireblocks encrypts * each file and uploads it individually to the underlying provider. The textual response is - * submitted separately via `POST /trading/orders/{orderId}/requirement/data`. Note: - * These endpoints are currently in beta and might be subject to changes. If you want to - * participate and learn more about the Fireblocks Trading, please contact your Fireblocks - * Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, - * Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and - * troubleshooting, please refer to our [API Error Codes + * submitted separately via `POST /trading/orders/{orderId}/requirement/data`. + * Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed + * information about error codes and troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param fileKey Identifier of the required file this upload satisfies. Must match a @@ -1130,6 +1170,13 @@ public CompletableFuture> uploadOrderRequirementFile( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "uploadOrderRequirementFile", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java b/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java index 4ca16478..5c60cc03 100644 --- a/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CancelTransactionResponse; @@ -138,6 +139,13 @@ public CompletableFuture> cancelTransacti if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "cancelTransaction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("cancelTransaction", localVarResponse)); @@ -231,6 +239,13 @@ public CompletableFuture> createTransacti if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTransaction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createTransaction", localVarResponse)); @@ -331,6 +346,13 @@ public CompletableFuture> dropTransaction( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "dropTransaction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("dropTransaction", localVarResponse)); @@ -439,6 +461,13 @@ public CompletableFuture> estimateNetwo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "estimateNetworkFee", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -541,6 +570,13 @@ public CompletableFuture> estimateT if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "estimateTransactionFee", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -634,6 +670,13 @@ public CompletableFuture> freezeTransacti if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "freezeTransaction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("freezeTransaction", localVarResponse)); @@ -717,6 +760,13 @@ public CompletableFuture> getTransaction(String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTransaction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTransaction", localVarResponse)); @@ -792,6 +842,13 @@ public CompletableFuture> getTransactionByExter if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTransactionByExternalId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -930,6 +987,13 @@ public CompletableFuture>> getTransactions if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTransactions", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getTransactions", localVarResponse)); @@ -1077,6 +1141,13 @@ private HttpRequest.Builder getTransactionsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setConfirmationThresholdByTransactionHash", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1182,6 +1253,13 @@ private HttpRequest.Builder setConfirmationThresholdByTransactionHashRequestBuil if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setTransactionConfirmationThreshold", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1283,6 +1361,13 @@ public CompletableFuture> unfreezeTrans if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "unfreezeTransaction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1369,6 +1454,13 @@ public CompletableFuture> validateAddress( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "validateAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("validateAddress", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java b/src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java index 975e20fe..9175b6bc 100644 --- a/src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.TravelRuleGetAllVASPsResponse; @@ -134,6 +135,13 @@ private String formatExceptionMessage(String operationId, int statusCode, String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createTrustProofOfAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -228,6 +236,13 @@ public CompletableFuture> getTrustProof if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTrustProofOfAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -314,6 +329,13 @@ public CompletableFuture> getVASPByDID( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getVASPByDID", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getVASPByDID", localVarResponse)); @@ -429,6 +451,13 @@ public CompletableFuture> getVASPs( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getVASPs", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getVASPs", localVarResponse)); @@ -536,6 +565,13 @@ public CompletableFuture> getVaspForVault( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getVaspForVault", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getVaspForVault", localVarResponse)); @@ -623,6 +659,13 @@ public CompletableFuture> setVaspForVault( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setVaspForVault", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("setVaspForVault", localVarResponse)); @@ -722,6 +765,13 @@ public CompletableFuture> updateVasp( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateVasp", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateVasp", localVarResponse)); @@ -826,6 +876,13 @@ private HttpRequest.Builder updateVaspRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "validateFullTravelRuleTransaction", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java index 50a25db9..309356a5 100644 --- a/src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateUserGroupResponse; import com.fireblocks.sdk.model.UserGroupCreateRequest; @@ -123,6 +124,13 @@ public CompletableFuture> createUserGroup( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createUserGroup", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createUserGroup", localVarResponse)); @@ -211,6 +219,13 @@ public CompletableFuture> deleteUserGroup(String groupId) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteUserGroup", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("deleteUserGroup", localVarResponse)); @@ -274,6 +289,13 @@ public CompletableFuture> getUserGroup(String gro if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getUserGroup", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getUserGroup", localVarResponse)); @@ -347,6 +369,13 @@ public CompletableFuture>> getUserGroups() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getUserGroups", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getUserGroups", localVarResponse)); @@ -427,6 +456,13 @@ public CompletableFuture> updateUserGroup( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateUserGroup", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateUserGroup", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/UsersApi.java b/src/main/java/com/fireblocks/sdk/api/UsersApi.java index 3833ea6f..48e7c73a 100644 --- a/src/main/java/com/fireblocks/sdk/api/UsersApi.java +++ b/src/main/java/com/fireblocks/sdk/api/UsersApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.model.UserResponse; import java.io.IOException; import java.io.InputStream; @@ -112,6 +113,13 @@ public CompletableFuture>> getUsers() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getUsers", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getUsers", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java b/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java index 5eb6e27b..d57dfcb3 100644 --- a/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AttachDetachUtxoLabelsRequest; @@ -125,6 +126,13 @@ public CompletableFuture> getUtxoSelect if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getUtxoSelectionConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -247,6 +255,13 @@ public CompletableFuture> getUtxos( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getUtxos", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getUtxos", localVarResponse)); @@ -390,6 +405,13 @@ private HttpRequest.Builder getUtxosRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getVaultAssetUtxoSelectionConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -495,6 +517,13 @@ public CompletableFuture> updateUtxo if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateUtxoLabels", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateUtxoLabels", localVarResponse)); @@ -599,6 +628,13 @@ public CompletableFuture> upsertUtxoSel if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "upsertUtxoSelectionConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -707,6 +743,13 @@ private HttpRequest.Builder upsertUtxoSelectionConfigRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "upsertVaultAssetUtxoSelectionConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java index 11903413..54f1b8e2 100644 --- a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.AddressReverseLookupResponse; @@ -168,6 +169,13 @@ public CompletableFuture> activateAssetFor if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "activateAssetForVaultAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -281,6 +289,13 @@ private HttpRequest.Builder activateAssetForVaultAccountRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "activateUsdcGatewayWalletBeta", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -375,6 +390,13 @@ private HttpRequest.Builder activateUsdcGatewayWalletBetaRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "attachOrDetachTagsFromVaultAccounts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -478,6 +500,13 @@ public CompletableFuture> createLegacyAddress if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createLegacyAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -572,6 +601,13 @@ public CompletableFuture> createMultipleAccounts( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createMultipleAccounts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -670,6 +706,13 @@ public CompletableFuture> createMultipleDepositAddresses if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createMultipleDepositAddresses", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -768,6 +811,13 @@ public CompletableFuture> createVaultAccount( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createVaultAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -875,6 +925,13 @@ public CompletableFuture> createVaultAccou if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createVaultAccountAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -999,6 +1056,13 @@ public CompletableFuture> createVaultAccountA if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createVaultAccountAssetAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1101,6 +1165,13 @@ private HttpRequest.Builder createVaultAccountAssetAddressRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deactivateUsdcGatewayWalletBeta", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1192,6 +1263,13 @@ public CompletableFuture> disableUsdcGatewayDepositAutomationS if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "disableUsdcGatewayDepositAutomationScheduleBeta", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1285,6 +1363,13 @@ public CompletableFuture> getAssetWall if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getAssetWallets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getAssetWallets", localVarResponse)); @@ -1394,6 +1479,13 @@ private HttpRequest.Builder getAssetWalletsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getCreateMultipleDepositAddressesJobStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1478,6 +1570,13 @@ private HttpRequest.Builder getCreateMultipleDepositAddressesJobStatusRequestBui if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getCreateMultipleVaultAccountsJobStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1561,6 +1660,13 @@ public CompletableFuture> getMaxBipIndex if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getMaxBipIndexUsed", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1681,6 +1787,13 @@ public CompletableFuture> getMaxSpend if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getMaxSpendableAmount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1839,6 +1952,13 @@ public CompletableFuture> getPagedVaultA if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPagedVaultAccounts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1967,6 +2087,13 @@ public CompletableFuture> getPublicKeyInfo( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPublicKeyInfo", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getPublicKeyInfo", localVarResponse)); @@ -2074,6 +2201,13 @@ public CompletableFuture> getPublicKeyInfoForA if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getPublicKeyInfoForAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2186,6 +2320,13 @@ public CompletableFuture>> getUnspentInp if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getUnspentInputs", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getUnspentInputs", localVarResponse)); @@ -2270,6 +2411,13 @@ private HttpRequest.Builder getUnspentInputsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getUsdcGatewayDepositAutomationBeta", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2353,6 +2501,13 @@ private HttpRequest.Builder getUsdcGatewayDepositAutomationBetaRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getUsdcGatewayWalletInfoBeta", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2434,6 +2589,13 @@ public CompletableFuture> getVaultAccount(String vault if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getVaultAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getVaultAccount", localVarResponse)); @@ -2514,6 +2676,13 @@ public CompletableFuture> getVaultAccountAsset( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getVaultAccountAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2605,6 +2774,13 @@ private HttpRequest.Builder getVaultAccountAssetRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getVaultAccountAssetAddressesPaginated", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2712,6 +2888,13 @@ public CompletableFuture>> getVaultAssets( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getVaultAssets", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getVaultAssets", localVarResponse)); @@ -2805,6 +2988,13 @@ public CompletableFuture> getVaultBalanceByAsset(String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getVaultBalanceByAsset", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2891,6 +3081,13 @@ public CompletableFuture> hideVaultAccount( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "hideVaultAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("hideVaultAccount", localVarResponse)); @@ -2973,6 +3170,13 @@ public CompletableFuture> lookupVaultB if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "lookupVaultByAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3046,101 +3250,6 @@ private HttpRequest.Builder lookupVaultByAddressRequestBuilder(String address) } return localVarRequestBuilder; } - /** - * Register a Tempo omnibus wallet Registers a Tempo omnibus wallet for the requested vault - * account. Triggering this flow requires the vault account to hold PATH_USD with a balance - * sufficient to cover the gas fee. Endpoint Permission: Admin, Non-Signing Admin, Signer, - * Approver, Editor. - * - * @param vaultAccountId The ID of the vault account for which to register the Tempo wallet. - * (required) - * @param assetId The Tempo network asset to register for the vault account. (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<CreateVaultAssetResponse>>, which completes - * exceptionally with an {@link ApiException} if the API call fails - */ - public CompletableFuture> registerTempoOmnibusWallet( - String vaultAccountId, String assetId, String idempotencyKey) { - try { - HttpRequest.Builder localVarRequestBuilder = - registerTempoOmnibusWalletRequestBuilder( - vaultAccountId, assetId, 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( - "registerTempoOmnibusWallet", - localVarResponse)); - } - try { - String responseBody = localVarResponse.body(); - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() - ? null - : memberVarObjectMapper.readValue( - responseBody, - new TypeReference< - CreateVaultAssetResponse>() {}))); - } 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 registerTempoOmnibusWalletRequestBuilder( - String vaultAccountId, String assetId, String idempotencyKey) throws ApiException { - ValidationUtils.assertParamExistsAndNotEmpty( - "registerTempoOmnibusWallet", "vaultAccountId", vaultAccountId); - ValidationUtils.assertParamExistsAndNotEmpty( - "registerTempoOmnibusWallet", "assetId", assetId); - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = - "/vault/accounts/{vaultAccountId}/{assetId}/omnibus/tempo/register" - .replace("{vaultAccountId}", ApiClient.urlEncode(vaultAccountId.toString())) - .replace("{assetId}", ApiClient.urlEncode(assetId.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; - } /** * Assign AML customer reference ID Sets an AML/KYT customer reference ID for a specific * address. Endpoint Permission: Admin, Non-Signing Admin. @@ -3177,6 +3286,13 @@ public CompletableFuture> setCustomerRefIdForAddr if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setCustomerRefIdForAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3293,6 +3409,13 @@ private HttpRequest.Builder setCustomerRefIdForAddressRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setUsdcGatewayDepositAutomationBeta", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3401,6 +3524,13 @@ public CompletableFuture> setVaultAccountAutoFuel if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setVaultAccountAutoFuel", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3502,6 +3632,13 @@ public CompletableFuture> setVaultAccountCustomer if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "setVaultAccountCustomerRefId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3601,6 +3738,13 @@ public CompletableFuture> unhideVaultAccount( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "unhideVaultAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3698,6 +3842,13 @@ private HttpRequest.Builder unhideVaultAccountRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateUsdcGatewayDepositAutomationBeta", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3808,6 +3959,13 @@ public CompletableFuture> updateVaultAcc if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateVaultAccount", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -3921,6 +4079,13 @@ public CompletableFuture> updateVaultAccountAsset if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateVaultAccountAssetAddress", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -4028,6 +4193,13 @@ public CompletableFuture> updateVaultAccountAssetBalance if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateVaultAccountAssetBalance", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java b/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java index befab5ef..f01e121a 100644 --- a/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateConnectionRequest; @@ -133,6 +134,13 @@ public CompletableFuture> create( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "create", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("create", localVarResponse)); @@ -237,6 +245,13 @@ public CompletableFuture> get( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "get", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("get", localVarResponse)); @@ -352,6 +367,13 @@ public CompletableFuture> remove(String id, UUID xEndUserWalle if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "remove", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("remove", localVarResponse)); @@ -431,6 +453,13 @@ public CompletableFuture> submit( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "submit", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("submit", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java b/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java index 01556f2e..e9915c12 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.ResendTransactionWebhooksRequest; import com.fireblocks.sdk.model.ResendWebhooksByTransactionIdResponse; @@ -127,6 +128,13 @@ private String formatExceptionMessage(String operationId, int statusCode, String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "resendTransactionWebhooks", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -227,6 +235,13 @@ public CompletableFuture> resendWebhooks( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "resendWebhooks", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("resendWebhooks", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java index b824ed16..f9d81a69 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateWebhookMtlsConfigRequest; @@ -148,6 +149,13 @@ public CompletableFuture> createWebhook( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createWebhook", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("createWebhook", localVarResponse)); @@ -242,6 +250,13 @@ public CompletableFuture> createWebhookMtlsConfig if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createWebhookMtlsConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -338,6 +353,13 @@ public CompletableFuture> createWebhookOaut if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "createWebhookOauth", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -426,6 +448,13 @@ public CompletableFuture> deleteWebhook(UUID webhookId) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteWebhook", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("deleteWebhook", localVarResponse)); @@ -517,6 +546,13 @@ public CompletableFuture> deleteWeb if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteWebhookMtlsConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -628,6 +664,13 @@ public CompletableFuture> deleteWebhookO if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "deleteWebhookOauth", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -725,6 +768,13 @@ public CompletableFuture> getMetrics( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getMetrics", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getMetrics", localVarResponse)); @@ -809,6 +859,13 @@ public CompletableFuture> getMtlsCsr(String if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getMtlsCsr", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getMtlsCsr", localVarResponse)); @@ -900,6 +957,13 @@ public CompletableFuture> getNotification( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getNotification", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getNotification", localVarResponse)); @@ -1005,6 +1069,13 @@ private HttpRequest.Builder getNotificationRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getNotificationAttempts", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1138,6 +1209,13 @@ public CompletableFuture> getNotifica if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getNotifications", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getNotifications", localVarResponse)); @@ -1260,6 +1338,13 @@ private HttpRequest.Builder getNotificationsRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getResendByQueryJobStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1345,6 +1430,13 @@ private HttpRequest.Builder getResendByQueryJobStatusRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getResendJobStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1425,6 +1517,13 @@ public CompletableFuture> getWebhook(UUID webhookId) { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWebhook", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getWebhook", localVarResponse)); @@ -1499,6 +1598,13 @@ public CompletableFuture> getWebhookMtlsConfig( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWebhookMtlsConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1579,6 +1685,13 @@ public CompletableFuture>> getWebhookMtlsCon if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWebhookMtlsConfigs", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -1672,6 +1785,13 @@ public CompletableFuture> getWebhookOauth( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWebhookOauth", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getWebhookOauth", localVarResponse)); @@ -1749,6 +1869,13 @@ public CompletableFuture>> getWebhookO if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWebhookOauths", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getWebhookOauths", localVarResponse)); @@ -1825,6 +1952,13 @@ public CompletableFuture> getWebhooks( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWebhooks", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getWebhooks", localVarResponse)); @@ -1928,6 +2062,13 @@ private HttpRequest.Builder getWebhooksRequestBuilder( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "resendFailedNotifications", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2031,6 +2172,13 @@ public CompletableFuture> resendNotificationById( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "resendNotificationById", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2111,6 +2259,13 @@ public CompletableFuture> resendNotifications if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "resendNotificationsByQuery", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2212,6 +2367,13 @@ public CompletableFuture> resendNotificationsByResourceId( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "resendNotificationsByResourceId", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2299,6 +2461,13 @@ public CompletableFuture> updateWebhook( if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateWebhook", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("updateWebhook", localVarResponse)); @@ -2392,6 +2561,13 @@ public CompletableFuture> updateWebhookMtlsConfig if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateWebhookMtlsConfig", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( @@ -2495,6 +2671,13 @@ public CompletableFuture> updateWebhookOaut if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "updateWebhookOauth", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java b/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java index 76b4fae3..3be19587 100644 --- a/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.GetWhitelistIpAddressesResponse; import java.io.IOException; @@ -116,6 +117,13 @@ public CompletableFuture> getWhitel if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWhitelistIpAddresses", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java b/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java index 0295b687..381819b5 100644 --- a/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.model.Workspace; import java.io.IOException; import java.io.InputStream; @@ -110,6 +111,13 @@ public CompletableFuture> getWorkspace() { if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWorkspace", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException("getWorkspace", localVarResponse)); diff --git a/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java b/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java index 5600dbab..4bc35f14 100644 --- a/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.LifecycleWarning; import com.fireblocks.sdk.model.GetWorkspaceStatusResponse; import java.io.IOException; import java.io.InputStream; @@ -113,6 +114,13 @@ public CompletableFuture> getWorkspaceSt if (memberVarAsyncResponseInterceptor != null) { memberVarAsyncResponseInterceptor.accept(localVarResponse); } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getWorkspaceStatus", + localVarResponse.statusCode()); if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( diff --git a/src/main/java/com/fireblocks/sdk/model/AllowListPayload.java b/src/main/java/com/fireblocks/sdk/model/AllowListPayload.java index 6a4e8bed..dbe30b1f 100644 --- a/src/main/java/com/fireblocks/sdk/model/AllowListPayload.java +++ b/src/main/java/com/fireblocks/sdk/model/AllowListPayload.java @@ -17,7 +17,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; import com.fireblocks.sdk.ApiClient; import java.util.ArrayList; import java.util.List; @@ -25,56 +24,11 @@ import java.util.StringJoiner; /** AllowListPayload */ -@JsonPropertyOrder({ - AllowListPayload.JSON_PROPERTY_VAULT_ACCOUNT_ID, - AllowListPayload.JSON_PROPERTY_BLOCKCHAIN_ID, - AllowListPayload.JSON_PROPERTY_WALLETS -}) +@JsonPropertyOrder({AllowListPayload.JSON_PROPERTY_WALLETS}) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class AllowListPayload { - public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; - @jakarta.annotation.Nonnull private String vaultAccountId; - - /** - * The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. - */ - public enum BlockchainIdEnum { - CANTON(String.valueOf("CANTON")), - - CANTON_TEST(String.valueOf("CANTON_TEST")); - - private String value; - - BlockchainIdEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static BlockchainIdEnum fromValue(String value) { - for (BlockchainIdEnum b : BlockchainIdEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; - @jakarta.annotation.Nonnull private BlockchainIdEnum blockchainId; - public static final String JSON_PROPERTY_WALLETS = "wallets"; @jakarta.annotation.Nonnull private List wallets; @@ -82,63 +36,10 @@ public AllowListPayload() {} @JsonCreator public AllowListPayload( - @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) - String vaultAccountId, - @JsonProperty(value = JSON_PROPERTY_BLOCKCHAIN_ID, required = true) - BlockchainIdEnum blockchainId, @JsonProperty(value = JSON_PROPERTY_WALLETS, required = true) List wallets) { - this.vaultAccountId = vaultAccountId; - this.blockchainId = blockchainId; this.wallets = wallets; } - public AllowListPayload vaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { - this.vaultAccountId = vaultAccountId; - return this; - } - - /** - * The vault account whose Canton wallet acts here. - * - * @return vaultAccountId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getVaultAccountId() { - return vaultAccountId; - } - - @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { - this.vaultAccountId = vaultAccountId; - } - - public AllowListPayload blockchainId( - @jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { - this.blockchainId = blockchainId; - return this; - } - - /** - * The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. - * - * @return blockchainId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BlockchainIdEnum getBlockchainId() { - return blockchainId; - } - - @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBlockchainId(@jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { - this.blockchainId = blockchainId; - } - public AllowListPayload wallets(@jakarta.annotation.Nonnull List wallets) { this.wallets = wallets; return this; @@ -180,22 +81,18 @@ public boolean equals(Object o) { return false; } AllowListPayload allowListPayload = (AllowListPayload) o; - return Objects.equals(this.vaultAccountId, allowListPayload.vaultAccountId) - && Objects.equals(this.blockchainId, allowListPayload.blockchainId) - && Objects.equals(this.wallets, allowListPayload.wallets); + return Objects.equals(this.wallets, allowListPayload.wallets); } @Override public int hashCode() { - return Objects.hash(vaultAccountId, blockchainId, wallets); + return Objects.hash(wallets); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AllowListPayload {\n"); - sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); - sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); sb.append(" wallets: ").append(toIndentedString(wallets)).append("\n"); sb.append("}"); return sb.toString(); @@ -244,26 +141,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `vaultAccountId` to the URL query string - if (getVaultAccountId() != null) { - joiner.add( - String.format( - "%svaultAccountId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); - } - - // add `blockchainId` to the URL query string - if (getBlockchainId() != null) { - joiner.add( - String.format( - "%sblockchainId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getBlockchainId())))); - } - // add `wallets` to the URL query string if (getWallets() != null) { for (int i = 0; i < getWallets().size(); i++) { diff --git a/src/main/java/com/fireblocks/sdk/model/BulkProofOfOwnership.java b/src/main/java/com/fireblocks/sdk/model/BulkProofOfOwnership.java new file mode 100644 index 00000000..20e136cd --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BulkProofOfOwnership.java @@ -0,0 +1,193 @@ +/* + * 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; + +/** + * Proof that the customer holds the private key. Required for every key, unlike the single key + * endpoint: bulk registration has no interactive step in which a proof can arrive later. + */ +@JsonPropertyOrder({ + BulkProofOfOwnership.JSON_PROPERTY_MESSAGE, + BulkProofOfOwnership.JSON_PROPERTY_SIGNATURE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class BulkProofOfOwnership { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nonnull private String message; + + public static final String JSON_PROPERTY_SIGNATURE = "signature"; + @jakarta.annotation.Nonnull private String signature; + + public BulkProofOfOwnership() {} + + @JsonCreator + public BulkProofOfOwnership( + @JsonProperty(value = JSON_PROPERTY_MESSAGE, required = true) String message, + @JsonProperty(value = JSON_PROPERTY_SIGNATURE, required = true) String signature) { + this.message = message; + this.signature = signature; + } + + public BulkProofOfOwnership message(@jakarta.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * The message to be signed by the key as proof of ownership. 64 to 1024 bytes in hexadecimal + * format. + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@jakarta.annotation.Nonnull String message) { + this.message = message; + } + + public BulkProofOfOwnership signature(@jakarta.annotation.Nonnull String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the message. 64 bytes in hexadecimal format. + * + * @return signature + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSignature() { + return signature; + } + + @JsonProperty(JSON_PROPERTY_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignature(@jakarta.annotation.Nonnull String signature) { + this.signature = signature; + } + + /** Return true if this BulkProofOfOwnership object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkProofOfOwnership bulkProofOfOwnership = (BulkProofOfOwnership) o; + return Objects.equals(this.message, bulkProofOfOwnership.message) + && Objects.equals(this.signature, bulkProofOfOwnership.signature); + } + + @Override + public int hashCode() { + return Objects.hash(message, signature); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkProofOfOwnership {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `signature` to the URL query string + if (getSignature() != null) { + joiner.add( + String.format( + "%ssignature%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSignature())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/BulkSigningKey.java b/src/main/java/com/fireblocks/sdk/model/BulkSigningKey.java new file mode 100644 index 00000000..20dc6305 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BulkSigningKey.java @@ -0,0 +1,276 @@ +/* + * 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; + +/** BulkSigningKey */ +@JsonPropertyOrder({ + BulkSigningKey.JSON_PROPERTY_SIGNING_DEVICE_KEY_ID, + BulkSigningKey.JSON_PROPERTY_SIGNED_CERT_PEM, + BulkSigningKey.JSON_PROPERTY_AGENT_USER_ID, + BulkSigningKey.JSON_PROPERTY_PROOF_OF_OWNERSHIP +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class BulkSigningKey { + public static final String JSON_PROPERTY_SIGNING_DEVICE_KEY_ID = "signingDeviceKeyId"; + @jakarta.annotation.Nonnull private String signingDeviceKeyId; + + public static final String JSON_PROPERTY_SIGNED_CERT_PEM = "signedCertPem"; + @jakarta.annotation.Nonnull private String signedCertPem; + + public static final String JSON_PROPERTY_AGENT_USER_ID = "agentUserId"; + @jakarta.annotation.Nonnull private String agentUserId; + + public static final String JSON_PROPERTY_PROOF_OF_OWNERSHIP = "proofOfOwnership"; + @jakarta.annotation.Nonnull private BulkProofOfOwnership proofOfOwnership; + + public BulkSigningKey() {} + + @JsonCreator + public BulkSigningKey( + @JsonProperty(value = JSON_PROPERTY_SIGNING_DEVICE_KEY_ID, required = true) + String signingDeviceKeyId, + @JsonProperty(value = JSON_PROPERTY_SIGNED_CERT_PEM, required = true) + String signedCertPem, + @JsonProperty(value = JSON_PROPERTY_AGENT_USER_ID, required = true) String agentUserId, + @JsonProperty(value = JSON_PROPERTY_PROOF_OF_OWNERSHIP, required = true) + BulkProofOfOwnership proofOfOwnership) { + this.signingDeviceKeyId = signingDeviceKeyId; + this.signedCertPem = signedCertPem; + this.agentUserId = agentUserId; + this.proofOfOwnership = proofOfOwnership; + } + + public BulkSigningKey signingDeviceKeyId( + @jakarta.annotation.Nonnull String signingDeviceKeyId) { + this.signingDeviceKeyId = signingDeviceKeyId; + return this; + } + + /** + * The ID, name or label of the key specified on the customer's signing device. + * + * @return signingDeviceKeyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNING_DEVICE_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSigningDeviceKeyId() { + return signingDeviceKeyId; + } + + @JsonProperty(JSON_PROPERTY_SIGNING_DEVICE_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSigningDeviceKeyId(@jakarta.annotation.Nonnull String signingDeviceKeyId) { + this.signingDeviceKeyId = signingDeviceKeyId; + } + + public BulkSigningKey signedCertPem(@jakarta.annotation.Nonnull String signedCertPem) { + this.signedCertPem = signedCertPem; + return this; + } + + /** + * The signed certificate that includes the public key PEM of the signing key, signed by the + * validation key declared for the request. + * + * @return signedCertPem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNED_CERT_PEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSignedCertPem() { + return signedCertPem; + } + + @JsonProperty(JSON_PROPERTY_SIGNED_CERT_PEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignedCertPem(@jakarta.annotation.Nonnull String signedCertPem) { + this.signedCertPem = signedCertPem; + } + + public BulkSigningKey agentUserId(@jakarta.annotation.Nonnull String agentUserId) { + this.agentUserId = agentUserId; + return this; + } + + /** + * Id of user to which this key belongs + * + * @return agentUserId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGENT_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAgentUserId() { + return agentUserId; + } + + @JsonProperty(JSON_PROPERTY_AGENT_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAgentUserId(@jakarta.annotation.Nonnull String agentUserId) { + this.agentUserId = agentUserId; + } + + public BulkSigningKey proofOfOwnership( + @jakarta.annotation.Nonnull BulkProofOfOwnership proofOfOwnership) { + this.proofOfOwnership = proofOfOwnership; + return this; + } + + /** + * Get proofOfOwnership + * + * @return proofOfOwnership + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROOF_OF_OWNERSHIP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BulkProofOfOwnership getProofOfOwnership() { + return proofOfOwnership; + } + + @JsonProperty(JSON_PROPERTY_PROOF_OF_OWNERSHIP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProofOfOwnership( + @jakarta.annotation.Nonnull BulkProofOfOwnership proofOfOwnership) { + this.proofOfOwnership = proofOfOwnership; + } + + /** Return true if this BulkSigningKey object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkSigningKey bulkSigningKey = (BulkSigningKey) o; + return Objects.equals(this.signingDeviceKeyId, bulkSigningKey.signingDeviceKeyId) + && Objects.equals(this.signedCertPem, bulkSigningKey.signedCertPem) + && Objects.equals(this.agentUserId, bulkSigningKey.agentUserId) + && Objects.equals(this.proofOfOwnership, bulkSigningKey.proofOfOwnership); + } + + @Override + public int hashCode() { + return Objects.hash(signingDeviceKeyId, signedCertPem, agentUserId, proofOfOwnership); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkSigningKey {\n"); + sb.append(" signingDeviceKeyId: ") + .append(toIndentedString(signingDeviceKeyId)) + .append("\n"); + sb.append(" signedCertPem: ").append(toIndentedString(signedCertPem)).append("\n"); + sb.append(" agentUserId: ").append(toIndentedString(agentUserId)).append("\n"); + sb.append(" proofOfOwnership: ").append(toIndentedString(proofOfOwnership)).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 `signingDeviceKeyId` to the URL query string + if (getSigningDeviceKeyId() != null) { + joiner.add( + String.format( + "%ssigningDeviceKeyId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSigningDeviceKeyId())))); + } + + // add `signedCertPem` to the URL query string + if (getSignedCertPem() != null) { + joiner.add( + String.format( + "%ssignedCertPem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSignedCertPem())))); + } + + // add `agentUserId` to the URL query string + if (getAgentUserId() != null) { + joiner.add( + String.format( + "%sagentUserId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAgentUserId())))); + } + + // add `proofOfOwnership` to the URL query string + if (getProofOfOwnership() != null) { + joiner.add( + getProofOfOwnership().toUrlQueryString(prefix + "proofOfOwnership" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/BulkSigningKeyJob.java b/src/main/java/com/fireblocks/sdk/model/BulkSigningKeyJob.java new file mode 100644 index 00000000..112af288 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BulkSigningKeyJob.java @@ -0,0 +1,585 @@ +/* + * 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.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.math.BigDecimal; +import java.util.Objects; +import java.util.StringJoiner; + +/** BulkSigningKeyJob */ +@JsonPropertyOrder({ + BulkSigningKeyJob.JSON_PROPERTY_JOB_ID, + BulkSigningKeyJob.JSON_PROPERTY_STATUS, + BulkSigningKeyJob.JSON_PROPERTY_TOTAL, + BulkSigningKeyJob.JSON_PROPERTY_CREATED, + BulkSigningKeyJob.JSON_PROPERTY_ALREADY_REGISTERED, + BulkSigningKeyJob.JSON_PROPERTY_FAILED, + BulkSigningKeyJob.JSON_PROPERTY_REASON, + BulkSigningKeyJob.JSON_PROPERTY_FILE_HASH, + BulkSigningKeyJob.JSON_PROPERTY_CREATED_AT, + BulkSigningKeyJob.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class BulkSigningKeyJob { + public static final String JSON_PROPERTY_JOB_ID = "jobId"; + @jakarta.annotation.Nonnull private String jobId; + + /** + * QUEUED means the job is waiting for another bulk registration to finish, since only a limited + * number run at once. IN_PROGRESS means it is running. COMPLETED means every submitted key is + * present in the workspace. FAILED means the request was refused before any key was registered, + * so `reason` has to be acted on before resubmitting is worth anything. INCOMPLETE + * means some keys are not registered; resubmitting the same request retries exactly those, and + * `reason` says whether that is likely to help -- keys not registered because of a + * transient failure will succeed, a key whose certificate or proof was rejected will be + * rejected again. + */ + public enum StatusEnum { + QUEUED(String.valueOf("QUEUED")), + + IN_PROGRESS(String.valueOf("IN_PROGRESS")), + + COMPLETED(String.valueOf("COMPLETED")), + + INCOMPLETE(String.valueOf("INCOMPLETE")), + + FAILED(String.valueOf("FAILED")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private StatusEnum status; + + public static final String JSON_PROPERTY_TOTAL = "total"; + @jakarta.annotation.Nonnull private BigDecimal total; + + public static final String JSON_PROPERTY_CREATED = "created"; + @jakarta.annotation.Nonnull private BigDecimal created; + + public static final String JSON_PROPERTY_ALREADY_REGISTERED = "alreadyRegistered"; + @jakarta.annotation.Nonnull private BigDecimal alreadyRegistered; + + public static final String JSON_PROPERTY_FAILED = "failed"; + @jakarta.annotation.Nonnull private BigDecimal failed; + + public static final String JSON_PROPERTY_REASON = "reason"; + @jakarta.annotation.Nullable private String reason; + + public static final String JSON_PROPERTY_FILE_HASH = "fileHash"; + @jakarta.annotation.Nullable private String fileHash; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + @jakarta.annotation.Nonnull private BigDecimal createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + @jakarta.annotation.Nonnull private BigDecimal updatedAt; + + public BulkSigningKeyJob() {} + + @JsonCreator + public BulkSigningKeyJob( + @JsonProperty(value = JSON_PROPERTY_JOB_ID, required = true) String jobId, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) StatusEnum status, + @JsonProperty(value = JSON_PROPERTY_TOTAL, required = true) BigDecimal total, + @JsonProperty(value = JSON_PROPERTY_CREATED, required = true) BigDecimal created, + @JsonProperty(value = JSON_PROPERTY_ALREADY_REGISTERED, required = true) + BigDecimal alreadyRegistered, + @JsonProperty(value = JSON_PROPERTY_FAILED, required = true) BigDecimal failed, + @JsonProperty(value = JSON_PROPERTY_CREATED_AT, required = true) BigDecimal createdAt, + @JsonProperty(value = JSON_PROPERTY_UPDATED_AT, required = true) BigDecimal updatedAt) { + this.jobId = jobId; + this.status = status; + this.total = total; + this.created = created; + this.alreadyRegistered = alreadyRegistered; + this.failed = failed; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public BulkSigningKeyJob jobId(@jakarta.annotation.Nonnull String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Id of the registration job. + * + * @return jobId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_JOB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getJobId() { + return jobId; + } + + @JsonProperty(JSON_PROPERTY_JOB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setJobId(@jakarta.annotation.Nonnull String jobId) { + this.jobId = jobId; + } + + public BulkSigningKeyJob status(@jakarta.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * QUEUED means the job is waiting for another bulk registration to finish, since only a limited + * number run at once. IN_PROGRESS means it is running. COMPLETED means every submitted key is + * present in the workspace. FAILED means the request was refused before any key was registered, + * so `reason` has to be acted on before resubmitting is worth anything. INCOMPLETE + * means some keys are not registered; resubmitting the same request retries exactly those, and + * `reason` says whether that is likely to help -- keys not registered because of a + * transient failure will succeed, a key whose certificate or proof was rejected will be + * rejected again. + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + public BulkSigningKeyJob total(@jakarta.annotation.Nonnull BigDecimal total) { + this.total = total; + return this; + } + + /** + * Keys in the submitted request. + * + * @return total + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@jakarta.annotation.Nonnull BigDecimal total) { + this.total = total; + } + + public BulkSigningKeyJob created(@jakarta.annotation.Nonnull BigDecimal created) { + this.created = created; + return this; + } + + /** + * Keys registered by this job. + * + * @return created + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCreated() { + return created; + } + + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreated(@jakarta.annotation.Nonnull BigDecimal created) { + this.created = created; + } + + public BulkSigningKeyJob alreadyRegistered( + @jakarta.annotation.Nonnull BigDecimal alreadyRegistered) { + this.alreadyRegistered = alreadyRegistered; + return this; + } + + /** + * Keys already present in the workspace, recognized and skipped. + * + * @return alreadyRegistered + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ALREADY_REGISTERED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAlreadyRegistered() { + return alreadyRegistered; + } + + @JsonProperty(JSON_PROPERTY_ALREADY_REGISTERED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAlreadyRegistered(@jakarta.annotation.Nonnull BigDecimal alreadyRegistered) { + this.alreadyRegistered = alreadyRegistered; + } + + public BulkSigningKeyJob failed(@jakarta.annotation.Nonnull BigDecimal failed) { + this.failed = failed; + return this; + } + + /** + * Keys rejected. See `reason`. + * + * @return failed + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAILED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getFailed() { + return failed; + } + + @JsonProperty(JSON_PROPERTY_FAILED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailed(@jakarta.annotation.Nonnull BigDecimal failed) { + this.failed = failed; + } + + public BulkSigningKeyJob reason(@jakarta.annotation.Nullable String reason) { + this.reason = reason; + return this; + } + + /** + * Free text describing what went wrong. Null while the job is healthy. + * + * @return reason + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReason() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(@jakarta.annotation.Nullable String reason) { + this.reason = reason; + } + + public BulkSigningKeyJob fileHash(@jakarta.annotation.Nullable String fileHash) { + this.fileHash = fileHash; + return this; + } + + /** + * Hex digest over the submitted keys. Two jobs sharing a digest were the same set of keys, + * which makes a sequence of resubmissions recognizable. + * + * @return fileHash + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileHash() { + return fileHash; + } + + @JsonProperty(JSON_PROPERTY_FILE_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFileHash(@jakarta.annotation.Nullable String fileHash) { + this.fileHash = fileHash; + } + + public BulkSigningKeyJob createdAt(@jakarta.annotation.Nonnull BigDecimal createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation date (timestamp) in milliseconds. + * + * @return createdAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@jakarta.annotation.Nonnull BigDecimal createdAt) { + this.createdAt = createdAt; + } + + public BulkSigningKeyJob updatedAt(@jakarta.annotation.Nonnull BigDecimal updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Last progress update (timestamp) in milliseconds. + * + * @return updatedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getUpdatedAt() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(@jakarta.annotation.Nonnull BigDecimal updatedAt) { + this.updatedAt = updatedAt; + } + + /** Return true if this BulkSigningKeyJob object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkSigningKeyJob bulkSigningKeyJob = (BulkSigningKeyJob) o; + return Objects.equals(this.jobId, bulkSigningKeyJob.jobId) + && Objects.equals(this.status, bulkSigningKeyJob.status) + && Objects.equals(this.total, bulkSigningKeyJob.total) + && Objects.equals(this.created, bulkSigningKeyJob.created) + && Objects.equals(this.alreadyRegistered, bulkSigningKeyJob.alreadyRegistered) + && Objects.equals(this.failed, bulkSigningKeyJob.failed) + && Objects.equals(this.reason, bulkSigningKeyJob.reason) + && Objects.equals(this.fileHash, bulkSigningKeyJob.fileHash) + && Objects.equals(this.createdAt, bulkSigningKeyJob.createdAt) + && Objects.equals(this.updatedAt, bulkSigningKeyJob.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash( + jobId, + status, + total, + created, + alreadyRegistered, + failed, + reason, + fileHash, + createdAt, + updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkSigningKeyJob {\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" alreadyRegistered: ") + .append(toIndentedString(alreadyRegistered)) + .append("\n"); + sb.append(" failed: ").append(toIndentedString(failed)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" fileHash: ").append(toIndentedString(fileHash)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 `jobId` to the URL query string + if (getJobId() != null) { + joiner.add( + String.format( + "%sjobId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getJobId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `created` to the URL query string + if (getCreated() != null) { + joiner.add( + String.format( + "%screated%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCreated())))); + } + + // add `alreadyRegistered` to the URL query string + if (getAlreadyRegistered() != null) { + joiner.add( + String.format( + "%salreadyRegistered%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAlreadyRegistered())))); + } + + // add `failed` to the URL query string + if (getFailed() != null) { + joiner.add( + String.format( + "%sfailed%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getFailed())))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add( + String.format( + "%sreason%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getReason())))); + } + + // add `fileHash` to the URL query string + if (getFileHash() != null) { + joiner.add( + String.format( + "%sfileHash%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getFileHash())))); + } + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add( + String.format( + "%screatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add( + String.format( + "%supdatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCall.java b/src/main/java/com/fireblocks/sdk/model/CantonCall.java index bec3817a..c23c3645 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonCall.java +++ b/src/main/java/com/fireblocks/sdk/model/CantonCall.java @@ -77,57 +77,6 @@ public CantonCall deserialize(JsonParser jp, DeserializationContext ctxt) boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); int match = 0; JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - // deserialize CantonCallAllocationWithdraw - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (CantonCallAllocationWithdraw.class.equals(Integer.class) - || CantonCallAllocationWithdraw.class.equals(Long.class) - || CantonCallAllocationWithdraw.class.equals(Float.class) - || CantonCallAllocationWithdraw.class.equals(Double.class) - || CantonCallAllocationWithdraw.class.equals(Boolean.class) - || CantonCallAllocationWithdraw.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((CantonCallAllocationWithdraw.class.equals(Integer.class) - || CantonCallAllocationWithdraw.class.equals( - Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((CantonCallAllocationWithdraw.class.equals(Float.class) - || CantonCallAllocationWithdraw.class.equals( - Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (CantonCallAllocationWithdraw.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (CantonCallAllocationWithdraw.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()) - .readValueAs(CantonCallAllocationWithdraw.class); - // TODO: there is no validation against JSON schema constraints - // (min, max, enum, pattern...), this does not perform a strict JSON - // validation, which means the 'match' count may be higher than it should be. - match++; - log.log( - Level.FINER, - "Input data matches schema 'CantonCallAllocationWithdraw'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'CantonCallAllocationWithdraw'", - e); - } - // deserialize CantonCallAllowListAdd try { boolean attemptParsing = true; @@ -452,11 +401,6 @@ public CantonCall() { super("oneOf", Boolean.FALSE); } - public CantonCall(CantonCallAllocationWithdraw o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public CantonCall(CantonCallAllowListAdd o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -488,7 +432,6 @@ public CantonCall(CantonCallParticipantOnboarding o) { } static { - schemas.put("CantonCallAllocationWithdraw", CantonCallAllocationWithdraw.class); schemas.put("CantonCallAllowListAdd", CantonCallAllowListAdd.class); schemas.put("CantonCallAllowListRemove", CantonCallAllowListRemove.class); schemas.put("CantonCallEndInvestorInvite", CantonCallEndInvestorInvite.class); @@ -498,14 +441,12 @@ public CantonCall(CantonCallParticipantOnboarding o) { JSON.registerDescendants(CantonCall.class, Collections.unmodifiableMap(schemas)); // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("ALLOCATION_WITHDRAW", CantonCallAllocationWithdraw.class); mappings.put("DTCC_ALLOW_LIST_ADD", CantonCallAllowListAdd.class); mappings.put("DTCC_ALLOW_LIST_REMOVE", CantonCallAllowListRemove.class); mappings.put("DTCC_END_INVESTOR_INVITE", CantonCallEndInvestorInvite.class); mappings.put("DTCC_END_INVESTOR_INVITE_CANCEL", CantonCallEndInvestorInviteCancel.class); mappings.put("DTCC_END_INVESTOR_OFFBOARD", CantonCallEndInvestorOffboard.class); mappings.put("DTCC_PARTICIPANT_ONBOARDING", CantonCallParticipantOnboarding.class); - mappings.put("CantonCallAllocationWithdraw", CantonCallAllocationWithdraw.class); mappings.put("CantonCallAllowListAdd", CantonCallAllowListAdd.class); mappings.put("CantonCallAllowListRemove", CantonCallAllowListRemove.class); mappings.put("CantonCallEndInvestorInvite", CantonCallEndInvestorInvite.class); @@ -523,8 +464,8 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CantonCallAllocationWithdraw, CantonCallAllowListAdd, - * CantonCallAllowListRemove, CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, + * against the oneOf child schemas: CantonCallAllowListAdd, CantonCallAllowListRemove, + * CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, * CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be @@ -532,12 +473,6 @@ public Map> getSchemas() { */ @Override public void setActualInstance(Object instance) { - if (JSON.isInstanceOf( - CantonCallAllocationWithdraw.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(CantonCallAllowListAdd.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -573,40 +508,25 @@ public void setActualInstance(Object instance) { } throw new RuntimeException( - "Invalid instance type. Must be CantonCallAllocationWithdraw," - + " CantonCallAllowListAdd, CantonCallAllowListRemove," + "Invalid instance type. Must be CantonCallAllowListAdd, CantonCallAllowListRemove," + " CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel," + " CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding"); } /** - * Get the actual instance, which can be the following: CantonCallAllocationWithdraw, - * CantonCallAllowListAdd, CantonCallAllowListRemove, CantonCallEndInvestorInvite, - * CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, - * CantonCallParticipantOnboarding + * Get the actual instance, which can be the following: CantonCallAllowListAdd, + * CantonCallAllowListRemove, CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, + * CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding * - * @return The actual instance (CantonCallAllocationWithdraw, CantonCallAllowListAdd, - * CantonCallAllowListRemove, CantonCallEndInvestorInvite, - * CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, - * CantonCallParticipantOnboarding) + * @return The actual instance (CantonCallAllowListAdd, CantonCallAllowListRemove, + * CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, + * CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding) */ @Override public Object getActualInstance() { return super.getActualInstance(); } - /** - * Get the actual instance of `CantonCallAllocationWithdraw`. If the actual instance is not - * `CantonCallAllocationWithdraw`, the ClassCastException will be thrown. - * - * @return The actual instance of `CantonCallAllocationWithdraw` - * @throws ClassCastException if the instance is not `CantonCallAllocationWithdraw` - */ - public CantonCallAllocationWithdraw getCantonCallAllocationWithdraw() - throws ClassCastException { - return (CantonCallAllocationWithdraw) super.getActualInstance(); - } - /** * Get the actual instance of `CantonCallAllowListAdd`. If the actual instance is not * `CantonCallAllowListAdd`, the ClassCastException will be thrown. @@ -756,14 +676,6 @@ public String toUrlQueryString(String prefix) { } return joiner.toString(); } - if (getActualInstance() instanceof CantonCallAllocationWithdraw) { - if (getActualInstance() != null) { - joiner.add( - ((CantonCallAllocationWithdraw) getActualInstance()) - .toUrlQueryString(prefix + "one_of_6" + suffix)); - } - return joiner.toString(); - } return null; } } diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java b/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java index 5e5469f5..945ffdbb 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListAdd.java @@ -25,6 +25,8 @@ /** CantonCallAllowListAdd */ @JsonPropertyOrder({ CantonCallAllowListAdd.JSON_PROPERTY_TYPE, + CantonCallAllowListAdd.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CantonCallAllowListAdd.JSON_PROPERTY_BLOCKCHAIN_ID, CantonCallAllowListAdd.JSON_PROPERTY_PAYLOAD }) @jakarta.annotation.Generated( @@ -65,6 +67,48 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; @jakarta.annotation.Nonnull private TypeEnum type; + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + */ + public enum BlockchainIdEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + BlockchainIdEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BlockchainIdEnum fromValue(String value) { + for (BlockchainIdEnum b : BlockchainIdEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + @jakarta.annotation.Nonnull private BlockchainIdEnum blockchainId; + public static final String JSON_PROPERTY_PAYLOAD = "payload"; @jakarta.annotation.Nonnull private AllowListPayload payload; @@ -73,9 +117,15 @@ public CantonCallAllowListAdd() {} @JsonCreator public CantonCallAllowListAdd( @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_BLOCKCHAIN_ID, required = true) + BlockchainIdEnum blockchainId, @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) AllowListPayload payload) { this.type = type; + this.vaultAccountId = vaultAccountId; + this.blockchainId = blockchainId; this.payload = payload; } @@ -102,6 +152,55 @@ public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } + public CantonCallAllowListAdd vaultAccountId( + @jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet makes this call. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CantonCallAllowListAdd blockchainId( + @jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlockchainIdEnum getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(@jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + } + public CantonCallAllowListAdd payload(@jakarta.annotation.Nonnull AllowListPayload payload) { this.payload = payload; return this; @@ -136,12 +235,14 @@ public boolean equals(Object o) { } CantonCallAllowListAdd cantonCallAllowListAdd = (CantonCallAllowListAdd) o; return Objects.equals(this.type, cantonCallAllowListAdd.type) + && Objects.equals(this.vaultAccountId, cantonCallAllowListAdd.vaultAccountId) + && Objects.equals(this.blockchainId, cantonCallAllowListAdd.blockchainId) && Objects.equals(this.payload, cantonCallAllowListAdd.payload); } @Override public int hashCode() { - return Objects.hash(type, payload); + return Objects.hash(type, vaultAccountId, blockchainId, payload); } @Override @@ -149,6 +250,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CantonCallAllowListAdd {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); sb.append("}"); return sb.toString(); @@ -207,6 +310,26 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getType())))); } + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBlockchainId())))); + } + // add `payload` to the URL query string if (getPayload() != null) { joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java b/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java index 05c4a9c9..297554d2 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallAllowListRemove.java @@ -25,6 +25,8 @@ /** CantonCallAllowListRemove */ @JsonPropertyOrder({ CantonCallAllowListRemove.JSON_PROPERTY_TYPE, + CantonCallAllowListRemove.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CantonCallAllowListRemove.JSON_PROPERTY_BLOCKCHAIN_ID, CantonCallAllowListRemove.JSON_PROPERTY_PAYLOAD }) @jakarta.annotation.Generated( @@ -65,6 +67,48 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; @jakarta.annotation.Nonnull private TypeEnum type; + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + */ + public enum BlockchainIdEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + BlockchainIdEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BlockchainIdEnum fromValue(String value) { + for (BlockchainIdEnum b : BlockchainIdEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + @jakarta.annotation.Nonnull private BlockchainIdEnum blockchainId; + public static final String JSON_PROPERTY_PAYLOAD = "payload"; @jakarta.annotation.Nonnull private AllowListPayload payload; @@ -73,9 +117,15 @@ public CantonCallAllowListRemove() {} @JsonCreator public CantonCallAllowListRemove( @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_BLOCKCHAIN_ID, required = true) + BlockchainIdEnum blockchainId, @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) AllowListPayload payload) { this.type = type; + this.vaultAccountId = vaultAccountId; + this.blockchainId = blockchainId; this.payload = payload; } @@ -102,6 +152,55 @@ public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } + public CantonCallAllowListRemove vaultAccountId( + @jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet makes this call. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CantonCallAllowListRemove blockchainId( + @jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlockchainIdEnum getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(@jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + } + public CantonCallAllowListRemove payload(@jakarta.annotation.Nonnull AllowListPayload payload) { this.payload = payload; return this; @@ -136,12 +235,14 @@ public boolean equals(Object o) { } CantonCallAllowListRemove cantonCallAllowListRemove = (CantonCallAllowListRemove) o; return Objects.equals(this.type, cantonCallAllowListRemove.type) + && Objects.equals(this.vaultAccountId, cantonCallAllowListRemove.vaultAccountId) + && Objects.equals(this.blockchainId, cantonCallAllowListRemove.blockchainId) && Objects.equals(this.payload, cantonCallAllowListRemove.payload); } @Override public int hashCode() { - return Objects.hash(type, payload); + return Objects.hash(type, vaultAccountId, blockchainId, payload); } @Override @@ -149,6 +250,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CantonCallAllowListRemove {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); sb.append("}"); return sb.toString(); @@ -207,6 +310,26 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getType())))); } + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBlockchainId())))); + } + // add `payload` to the URL query string if (getPayload() != null) { joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallDetails.java b/src/main/java/com/fireblocks/sdk/model/CantonCallDetails.java index f3eb02bb..0ddf9f6a 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonCallDetails.java +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallDetails.java @@ -102,7 +102,9 @@ public CantonCallDetails type(@jakarta.annotation.Nullable String type) { } /** - * The call type, matching the `type` sent when the call was created. + * The call type, matching the `type` sent when the call was created. Transactions + * created before a type moved to the offers endpoint keep the value they were written with — + * `ALLOCATION_WITHDRAW` is one; new withdraws are offer responses. * * @return type */ @@ -149,8 +151,7 @@ public CantonCallDetails originalTransactionId( } /** - * The transaction this call acts on. On a withdraw it is the allocation that was withdrawn, so - * the withdraw transaction read on its own still says what it withdrew. + * The transaction this call acts on, where it acts on one. * * @return originalTransactionId */ diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInvite.java b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInvite.java index 6d4a26d8..f9c5a9c8 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInvite.java +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInvite.java @@ -25,6 +25,8 @@ /** CantonCallEndInvestorInvite */ @JsonPropertyOrder({ CantonCallEndInvestorInvite.JSON_PROPERTY_TYPE, + CantonCallEndInvestorInvite.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CantonCallEndInvestorInvite.JSON_PROPERTY_BLOCKCHAIN_ID, CantonCallEndInvestorInvite.JSON_PROPERTY_PAYLOAD }) @jakarta.annotation.Generated( @@ -65,6 +67,48 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; @jakarta.annotation.Nonnull private TypeEnum type; + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + */ + public enum BlockchainIdEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + BlockchainIdEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BlockchainIdEnum fromValue(String value) { + for (BlockchainIdEnum b : BlockchainIdEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + @jakarta.annotation.Nonnull private BlockchainIdEnum blockchainId; + public static final String JSON_PROPERTY_PAYLOAD = "payload"; @jakarta.annotation.Nonnull private EndInvestorPayload payload; @@ -73,9 +117,15 @@ public CantonCallEndInvestorInvite() {} @JsonCreator public CantonCallEndInvestorInvite( @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_BLOCKCHAIN_ID, required = true) + BlockchainIdEnum blockchainId, @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) EndInvestorPayload payload) { this.type = type; + this.vaultAccountId = vaultAccountId; + this.blockchainId = blockchainId; this.payload = payload; } @@ -102,6 +152,55 @@ public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } + public CantonCallEndInvestorInvite vaultAccountId( + @jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet makes this call. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CantonCallEndInvestorInvite blockchainId( + @jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlockchainIdEnum getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(@jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + } + public CantonCallEndInvestorInvite payload( @jakarta.annotation.Nonnull EndInvestorPayload payload) { this.payload = payload; @@ -137,12 +236,14 @@ public boolean equals(Object o) { } CantonCallEndInvestorInvite cantonCallEndInvestorInvite = (CantonCallEndInvestorInvite) o; return Objects.equals(this.type, cantonCallEndInvestorInvite.type) + && Objects.equals(this.vaultAccountId, cantonCallEndInvestorInvite.vaultAccountId) + && Objects.equals(this.blockchainId, cantonCallEndInvestorInvite.blockchainId) && Objects.equals(this.payload, cantonCallEndInvestorInvite.payload); } @Override public int hashCode() { - return Objects.hash(type, payload); + return Objects.hash(type, vaultAccountId, blockchainId, payload); } @Override @@ -150,6 +251,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CantonCallEndInvestorInvite {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); sb.append("}"); return sb.toString(); @@ -208,6 +311,26 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getType())))); } + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBlockchainId())))); + } + // add `payload` to the URL query string if (getPayload() != null) { joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancel.java b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancel.java index 9d5c9557..935b0ccc 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancel.java +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorInviteCancel.java @@ -25,6 +25,8 @@ /** CantonCallEndInvestorInviteCancel */ @JsonPropertyOrder({ CantonCallEndInvestorInviteCancel.JSON_PROPERTY_TYPE, + CantonCallEndInvestorInviteCancel.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CantonCallEndInvestorInviteCancel.JSON_PROPERTY_BLOCKCHAIN_ID, CantonCallEndInvestorInviteCancel.JSON_PROPERTY_PAYLOAD }) @jakarta.annotation.Generated( @@ -65,6 +67,48 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; @jakarta.annotation.Nonnull private TypeEnum type; + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + */ + public enum BlockchainIdEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + BlockchainIdEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BlockchainIdEnum fromValue(String value) { + for (BlockchainIdEnum b : BlockchainIdEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + @jakarta.annotation.Nonnull private BlockchainIdEnum blockchainId; + public static final String JSON_PROPERTY_PAYLOAD = "payload"; @jakarta.annotation.Nonnull private EndInvestorPayload payload; @@ -73,9 +117,15 @@ public CantonCallEndInvestorInviteCancel() {} @JsonCreator public CantonCallEndInvestorInviteCancel( @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_BLOCKCHAIN_ID, required = true) + BlockchainIdEnum blockchainId, @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) EndInvestorPayload payload) { this.type = type; + this.vaultAccountId = vaultAccountId; + this.blockchainId = blockchainId; this.payload = payload; } @@ -102,6 +152,55 @@ public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } + public CantonCallEndInvestorInviteCancel vaultAccountId( + @jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet makes this call. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CantonCallEndInvestorInviteCancel blockchainId( + @jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlockchainIdEnum getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(@jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + } + public CantonCallEndInvestorInviteCancel payload( @jakarta.annotation.Nonnull EndInvestorPayload payload) { this.payload = payload; @@ -138,12 +237,15 @@ public boolean equals(Object o) { CantonCallEndInvestorInviteCancel cantonCallEndInvestorInviteCancel = (CantonCallEndInvestorInviteCancel) o; return Objects.equals(this.type, cantonCallEndInvestorInviteCancel.type) + && Objects.equals( + this.vaultAccountId, cantonCallEndInvestorInviteCancel.vaultAccountId) + && Objects.equals(this.blockchainId, cantonCallEndInvestorInviteCancel.blockchainId) && Objects.equals(this.payload, cantonCallEndInvestorInviteCancel.payload); } @Override public int hashCode() { - return Objects.hash(type, payload); + return Objects.hash(type, vaultAccountId, blockchainId, payload); } @Override @@ -151,6 +253,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CantonCallEndInvestorInviteCancel {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); sb.append("}"); return sb.toString(); @@ -209,6 +313,26 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getType())))); } + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBlockchainId())))); + } + // add `payload` to the URL query string if (getPayload() != null) { joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboard.java b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboard.java index 6f7b887b..f0969671 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboard.java +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallEndInvestorOffboard.java @@ -25,6 +25,8 @@ /** CantonCallEndInvestorOffboard */ @JsonPropertyOrder({ CantonCallEndInvestorOffboard.JSON_PROPERTY_TYPE, + CantonCallEndInvestorOffboard.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CantonCallEndInvestorOffboard.JSON_PROPERTY_BLOCKCHAIN_ID, CantonCallEndInvestorOffboard.JSON_PROPERTY_PAYLOAD }) @jakarta.annotation.Generated( @@ -65,6 +67,48 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; @jakarta.annotation.Nonnull private TypeEnum type; + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + */ + public enum BlockchainIdEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + BlockchainIdEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BlockchainIdEnum fromValue(String value) { + for (BlockchainIdEnum b : BlockchainIdEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + @jakarta.annotation.Nonnull private BlockchainIdEnum blockchainId; + public static final String JSON_PROPERTY_PAYLOAD = "payload"; @jakarta.annotation.Nonnull private EndInvestorPayload payload; @@ -73,9 +117,15 @@ public CantonCallEndInvestorOffboard() {} @JsonCreator public CantonCallEndInvestorOffboard( @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_BLOCKCHAIN_ID, required = true) + BlockchainIdEnum blockchainId, @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) EndInvestorPayload payload) { this.type = type; + this.vaultAccountId = vaultAccountId; + this.blockchainId = blockchainId; this.payload = payload; } @@ -102,6 +152,55 @@ public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } + public CantonCallEndInvestorOffboard vaultAccountId( + @jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet makes this call. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CantonCallEndInvestorOffboard blockchainId( + @jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlockchainIdEnum getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(@jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + } + public CantonCallEndInvestorOffboard payload( @jakarta.annotation.Nonnull EndInvestorPayload payload) { this.payload = payload; @@ -138,12 +237,14 @@ public boolean equals(Object o) { CantonCallEndInvestorOffboard cantonCallEndInvestorOffboard = (CantonCallEndInvestorOffboard) o; return Objects.equals(this.type, cantonCallEndInvestorOffboard.type) + && Objects.equals(this.vaultAccountId, cantonCallEndInvestorOffboard.vaultAccountId) + && Objects.equals(this.blockchainId, cantonCallEndInvestorOffboard.blockchainId) && Objects.equals(this.payload, cantonCallEndInvestorOffboard.payload); } @Override public int hashCode() { - return Objects.hash(type, payload); + return Objects.hash(type, vaultAccountId, blockchainId, payload); } @Override @@ -151,6 +252,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CantonCallEndInvestorOffboard {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); sb.append("}"); return sb.toString(); @@ -209,6 +312,26 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getType())))); } + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBlockchainId())))); + } + // add `payload` to the URL query string if (getPayload() != null) { joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallParticipantOnboarding.java b/src/main/java/com/fireblocks/sdk/model/CantonCallParticipantOnboarding.java index eebd0bbd..28968116 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonCallParticipantOnboarding.java +++ b/src/main/java/com/fireblocks/sdk/model/CantonCallParticipantOnboarding.java @@ -25,6 +25,8 @@ /** CantonCallParticipantOnboarding */ @JsonPropertyOrder({ CantonCallParticipantOnboarding.JSON_PROPERTY_TYPE, + CantonCallParticipantOnboarding.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CantonCallParticipantOnboarding.JSON_PROPERTY_BLOCKCHAIN_ID, CantonCallParticipantOnboarding.JSON_PROPERTY_PAYLOAD }) @jakarta.annotation.Generated( @@ -65,18 +67,63 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; @jakarta.annotation.Nonnull private TypeEnum type; + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + @jakarta.annotation.Nonnull private String vaultAccountId; + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + */ + public enum BlockchainIdEnum { + CANTON(String.valueOf("CANTON")), + + CANTON_TEST(String.valueOf("CANTON_TEST")); + + private String value; + + BlockchainIdEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BlockchainIdEnum fromValue(String value) { + for (BlockchainIdEnum b : BlockchainIdEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + @jakarta.annotation.Nonnull private BlockchainIdEnum blockchainId; + public static final String JSON_PROPERTY_PAYLOAD = "payload"; - @jakarta.annotation.Nonnull private ParticipantOnboardingPayload payload; + @jakarta.annotation.Nullable private ParticipantOnboardingPayload payload; public CantonCallParticipantOnboarding() {} @JsonCreator public CantonCallParticipantOnboarding( @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, - @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) - ParticipantOnboardingPayload payload) { + @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) + String vaultAccountId, + @JsonProperty(value = JSON_PROPERTY_BLOCKCHAIN_ID, required = true) + BlockchainIdEnum blockchainId) { this.type = type; - this.payload = payload; + this.vaultAccountId = vaultAccountId; + this.blockchainId = blockchainId; } public CantonCallParticipantOnboarding type(@jakarta.annotation.Nonnull TypeEnum type) { @@ -102,8 +149,57 @@ public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } + public CantonCallParticipantOnboarding vaultAccountId( + @jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account whose Canton wallet makes this call. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CantonCallParticipantOnboarding blockchainId( + @jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * The blockchain the vault account's Canton party is connected to — `CANTON` or + * `CANTON_TEST`. + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlockchainIdEnum getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(@jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { + this.blockchainId = blockchainId; + } + public CantonCallParticipantOnboarding payload( - @jakarta.annotation.Nonnull ParticipantOnboardingPayload payload) { + @jakarta.annotation.Nullable ParticipantOnboardingPayload payload) { this.payload = payload; return this; } @@ -113,16 +209,16 @@ public CantonCallParticipantOnboarding payload( * * @return payload */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_PAYLOAD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public ParticipantOnboardingPayload getPayload() { return payload; } @JsonProperty(JSON_PROPERTY_PAYLOAD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPayload(@jakarta.annotation.Nonnull ParticipantOnboardingPayload payload) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayload(@jakarta.annotation.Nullable ParticipantOnboardingPayload payload) { this.payload = payload; } @@ -138,12 +234,15 @@ public boolean equals(Object o) { CantonCallParticipantOnboarding cantonCallParticipantOnboarding = (CantonCallParticipantOnboarding) o; return Objects.equals(this.type, cantonCallParticipantOnboarding.type) + && Objects.equals( + this.vaultAccountId, cantonCallParticipantOnboarding.vaultAccountId) + && Objects.equals(this.blockchainId, cantonCallParticipantOnboarding.blockchainId) && Objects.equals(this.payload, cantonCallParticipantOnboarding.payload); } @Override public int hashCode() { - return Objects.hash(type, payload); + return Objects.hash(type, vaultAccountId, blockchainId, payload); } @Override @@ -151,6 +250,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CantonCallParticipantOnboarding {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); sb.append("}"); return sb.toString(); @@ -209,6 +310,26 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getType())))); } + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBlockchainId())))); + } + // add `payload` to the URL query string if (getPayload() != null) { joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); diff --git a/src/main/java/com/fireblocks/sdk/model/CantonOfferResponseDetails.java b/src/main/java/com/fireblocks/sdk/model/CantonOfferResponseDetails.java index 384143a1..50839d19 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonOfferResponseDetails.java +++ b/src/main/java/com/fireblocks/sdk/model/CantonOfferResponseDetails.java @@ -26,8 +26,10 @@ import java.util.StringJoiner; /** - * The transaction belongs to an offer conversation: the offer itself, the response to it, or a leg + * The transaction belongs to an offer conversation: the offer itself, a response to it, or a leg * that carries no answer of its own. The only block that changes over a transaction's lifetime. + * An offer can have more than one response — an allocation offer is accepted and later withdrawn — + * so every response transaction states which answer it is in `responseType`. */ @JsonPropertyOrder({ CantonOfferResponseDetails.JSON_PROPERTY_VERSION, @@ -37,6 +39,8 @@ CantonOfferResponseDetails.JSON_PROPERTY_EXPIRES_AT, CantonOfferResponseDetails.JSON_PROPERTY_APPROVAL_TRANSACTION_ID, CantonOfferResponseDetails.JSON_PROPERTY_ORIGINAL_TRANSACTION_ID, + CantonOfferResponseDetails.JSON_PROPERTY_RESPONSE_TYPE, + CantonOfferResponseDetails.JSON_PROPERTY_ALLOCATION_TRANSACTION_ID, CantonOfferResponseDetails.JSON_PROPERTY_VERDICT }) @jakarta.annotation.Generated( @@ -64,6 +68,12 @@ public class CantonOfferResponseDetails { public static final String JSON_PROPERTY_ORIGINAL_TRANSACTION_ID = "originalTransactionId"; @jakarta.annotation.Nullable private String originalTransactionId; + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nullable private String responseType; + + public static final String JSON_PROPERTY_ALLOCATION_TRANSACTION_ID = "allocationTransactionId"; + @jakarta.annotation.Nullable private String allocationTransactionId; + /** The outcome, set once the transaction reaches a terminal status. */ public enum VerdictEnum { ACCEPTED(String.valueOf("ACCEPTED")), @@ -187,9 +197,13 @@ public CantonOfferResponseDetails addAvailableResponsesItem(String availableResp } /** - * The responses that can be sent for this offer right now. An empty array means nothing is - * answerable on this transaction — which is the difference between an actionable offer and a - * linked leg that shares its sub-status. + * The responses this offer accepts — copy one into `responseType` to answer it. + * Present on the offer only, set when it arrives and never changed: it states what the offer + * TYPE accepts, not whether it is answerable right now. The respond endpoint is the authority + * on that, and answers `409` when the offer's state or expiry rules a response + * out — for example an `ALLOCATION_WITHDRAW` sent before the accept has settled. An + * empty array means nothing is answerable on this transaction — the difference between an + * actionable offer and a linked leg that shares its sub-status. * * @return availableResponses */ @@ -281,6 +295,57 @@ public void setOriginalTransactionId( this.originalTransactionId = originalTransactionId; } + public CantonOfferResponseDetails responseType( + @jakarta.annotation.Nullable String responseType) { + this.responseType = responseType; + return this; + } + + /** + * On a response transaction, which answer it is — the `responseType` that was sent. + * Absent on the offer itself. + * + * @return responseType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getResponseType() { + return responseType; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResponseType(@jakarta.annotation.Nullable String responseType) { + this.responseType = responseType; + } + + public CantonOfferResponseDetails allocationTransactionId( + @jakarta.annotation.Nullable String allocationTransactionId) { + this.allocationTransactionId = allocationTransactionId; + return this; + } + + /** + * On an `ALLOCATION_WITHDRAW` response only — the accept whose allocation this + * withdraw released, so the withdraw transaction read on its own says what it undid. + * + * @return allocationTransactionId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOCATION_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAllocationTransactionId() { + return allocationTransactionId; + } + + @JsonProperty(JSON_PROPERTY_ALLOCATION_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllocationTransactionId( + @jakarta.annotation.Nullable String allocationTransactionId) { + this.allocationTransactionId = allocationTransactionId; + } + public CantonOfferResponseDetails verdict(@jakarta.annotation.Nullable VerdictEnum verdict) { this.verdict = verdict; return this; @@ -326,6 +391,10 @@ public boolean equals(Object o) { && Objects.equals( this.originalTransactionId, cantonOfferResponseDetails.originalTransactionId) + && Objects.equals(this.responseType, cantonOfferResponseDetails.responseType) + && Objects.equals( + this.allocationTransactionId, + cantonOfferResponseDetails.allocationTransactionId) && Objects.equals(this.verdict, cantonOfferResponseDetails.verdict); } @@ -339,6 +408,8 @@ public int hashCode() { expiresAt, approvalTransactionId, originalTransactionId, + responseType, + allocationTransactionId, verdict); } @@ -359,6 +430,10 @@ public String toString() { sb.append(" originalTransactionId: ") .append(toIndentedString(originalTransactionId)) .append("\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).append("\n"); + sb.append(" allocationTransactionId: ") + .append(toIndentedString(allocationTransactionId)) + .append("\n"); sb.append(" verdict: ").append(toIndentedString(verdict)).append("\n"); sb.append("}"); return sb.toString(); @@ -486,6 +561,27 @@ public String toUrlQueryString(String prefix) { ApiClient.valueToString(getOriginalTransactionId())))); } + // add `responseType` to the URL query string + if (getResponseType() != null) { + joiner.add( + String.format( + "%sresponseType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); + } + + // add `allocationTransactionId` to the URL query string + if (getAllocationTransactionId() != null) { + joiner.add( + String.format( + "%sallocationTransactionId%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAllocationTransactionId())))); + } + // add `verdict` to the URL query string if (getVerdict() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/CreateBulkSigningKeys.java b/src/main/java/com/fireblocks/sdk/model/CreateBulkSigningKeys.java new file mode 100644 index 00000000..46cfc2d6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateBulkSigningKeys.java @@ -0,0 +1,215 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** CreateBulkSigningKeys */ +@JsonPropertyOrder({ + CreateBulkSigningKeys.JSON_PROPERTY_VALIDATION_KEY_ID, + CreateBulkSigningKeys.JSON_PROPERTY_KEYS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CreateBulkSigningKeys { + public static final String JSON_PROPERTY_VALIDATION_KEY_ID = "validationKeyId"; + @jakarta.annotation.Nonnull private String validationKeyId; + + public static final String JSON_PROPERTY_KEYS = "keys"; + @jakarta.annotation.Nonnull private List keys; + + public CreateBulkSigningKeys() {} + + @JsonCreator + public CreateBulkSigningKeys( + @JsonProperty(value = JSON_PROPERTY_VALIDATION_KEY_ID, required = true) + String validationKeyId, + @JsonProperty(value = JSON_PROPERTY_KEYS, required = true) List keys) { + this.validationKeyId = validationKeyId; + this.keys = keys; + } + + public CreateBulkSigningKeys validationKeyId( + @jakarta.annotation.Nonnull String validationKeyId) { + this.validationKeyId = validationKeyId; + return this; + } + + /** + * The id of the validation key that signed every certificate in this request, as returned when + * the validation key was registered. Not the signingDeviceKeyId of any signing key. + * + * @return validationKeyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALIDATION_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValidationKeyId() { + return validationKeyId; + } + + @JsonProperty(JSON_PROPERTY_VALIDATION_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValidationKeyId(@jakarta.annotation.Nonnull String validationKeyId) { + this.validationKeyId = validationKeyId; + } + + public CreateBulkSigningKeys keys(@jakarta.annotation.Nonnull List keys) { + this.keys = keys; + return this; + } + + public CreateBulkSigningKeys addKeysItem(BulkSigningKey keysItem) { + if (this.keys == null) { + this.keys = new ArrayList<>(); + } + this.keys.add(keysItem); + return this; + } + + /** + * The signing keys to register. + * + * @return keys + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getKeys() { + return keys; + } + + @JsonProperty(JSON_PROPERTY_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setKeys(@jakarta.annotation.Nonnull List keys) { + this.keys = keys; + } + + /** Return true if this CreateBulkSigningKeys object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBulkSigningKeys createBulkSigningKeys = (CreateBulkSigningKeys) o; + return Objects.equals(this.validationKeyId, createBulkSigningKeys.validationKeyId) + && Objects.equals(this.keys, createBulkSigningKeys.keys); + } + + @Override + public int hashCode() { + return Objects.hash(validationKeyId, keys); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBulkSigningKeys {\n"); + sb.append(" validationKeyId: ").append(toIndentedString(validationKeyId)).append("\n"); + sb.append(" keys: ").append(toIndentedString(keys)).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 `validationKeyId` to the URL query string + if (getValidationKeyId() != null) { + joiner.add( + String.format( + "%svalidationKeyId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getValidationKeyId())))); + } + + // add `keys` to the URL query string + if (getKeys() != null) { + for (int i = 0; i < getKeys().size(); i++) { + if (getKeys().get(i) != null) { + joiner.add( + getKeys() + .get(i) + .toUrlQueryString( + String.format( + "%skeys%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/AllocationWithdrawPayload.java b/src/main/java/com/fireblocks/sdk/model/CreateBulkSigningKeysResponse.java similarity index 57% rename from src/main/java/com/fireblocks/sdk/model/AllocationWithdrawPayload.java rename to src/main/java/com/fireblocks/sdk/model/CreateBulkSigningKeysResponse.java index 313b1b32..1c99b570 100644 --- a/src/main/java/com/fireblocks/sdk/model/AllocationWithdrawPayload.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateBulkSigningKeysResponse.java @@ -21,51 +21,47 @@ import java.util.Objects; import java.util.StringJoiner; -/** AllocationWithdrawPayload */ -@JsonPropertyOrder({AllocationWithdrawPayload.JSON_PROPERTY_ALLOCATION_TRANSACTION_ID}) +/** CreateBulkSigningKeysResponse */ +@JsonPropertyOrder({CreateBulkSigningKeysResponse.JSON_PROPERTY_JOB_ID}) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class AllocationWithdrawPayload { - public static final String JSON_PROPERTY_ALLOCATION_TRANSACTION_ID = "allocationTransactionId"; - @jakarta.annotation.Nonnull private String allocationTransactionId; +public class CreateBulkSigningKeysResponse { + public static final String JSON_PROPERTY_JOB_ID = "jobId"; + @jakarta.annotation.Nonnull private String jobId; - public AllocationWithdrawPayload() {} + public CreateBulkSigningKeysResponse() {} @JsonCreator - public AllocationWithdrawPayload( - @JsonProperty(value = JSON_PROPERTY_ALLOCATION_TRANSACTION_ID, required = true) - String allocationTransactionId) { - this.allocationTransactionId = allocationTransactionId; + public CreateBulkSigningKeysResponse( + @JsonProperty(value = JSON_PROPERTY_JOB_ID, required = true) String jobId) { + this.jobId = jobId; } - public AllocationWithdrawPayload allocationTransactionId( - @jakarta.annotation.Nonnull String allocationTransactionId) { - this.allocationTransactionId = allocationTransactionId; + public CreateBulkSigningKeysResponse jobId(@jakarta.annotation.Nonnull String jobId) { + this.jobId = jobId; return this; } /** - * The Fireblocks transaction id of the outgoing response that created the allocation. The - * allocation is resolved from it — Canton contract ids are never accepted here. + * Id of the registration job. Poll it for progress. * - * @return allocationTransactionId + * @return jobId */ @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ALLOCATION_TRANSACTION_ID) + @JsonProperty(JSON_PROPERTY_JOB_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAllocationTransactionId() { - return allocationTransactionId; + public String getJobId() { + return jobId; } - @JsonProperty(JSON_PROPERTY_ALLOCATION_TRANSACTION_ID) + @JsonProperty(JSON_PROPERTY_JOB_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAllocationTransactionId( - @jakarta.annotation.Nonnull String allocationTransactionId) { - this.allocationTransactionId = allocationTransactionId; + public void setJobId(@jakarta.annotation.Nonnull String jobId) { + this.jobId = jobId; } - /** Return true if this AllocationWithdrawPayload object is equal to o. */ + /** Return true if this CreateBulkSigningKeysResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -74,23 +70,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AllocationWithdrawPayload allocationWithdrawPayload = (AllocationWithdrawPayload) o; - return Objects.equals( - this.allocationTransactionId, allocationWithdrawPayload.allocationTransactionId); + CreateBulkSigningKeysResponse createBulkSigningKeysResponse = + (CreateBulkSigningKeysResponse) o; + return Objects.equals(this.jobId, createBulkSigningKeysResponse.jobId); } @Override public int hashCode() { - return Objects.hash(allocationTransactionId); + return Objects.hash(jobId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AllocationWithdrawPayload {\n"); - sb.append(" allocationTransactionId: ") - .append(toIndentedString(allocationTransactionId)) - .append("\n"); + sb.append("class CreateBulkSigningKeysResponse {\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -138,15 +132,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `allocationTransactionId` to the URL query string - if (getAllocationTransactionId() != null) { + // add `jobId` to the URL query string + if (getJobId() != null) { joiner.add( String.format( - "%sallocationTransactionId%s=%s", + "%sjobId%s=%s", prefix, suffix, - ApiClient.urlEncode( - ApiClient.valueToString(getAllocationTransactionId())))); + ApiClient.urlEncode(ApiClient.valueToString(getJobId())))); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/EndInvestorPayload.java b/src/main/java/com/fireblocks/sdk/model/EndInvestorPayload.java index e99eb2a2..174ae9e1 100644 --- a/src/main/java/com/fireblocks/sdk/model/EndInvestorPayload.java +++ b/src/main/java/com/fireblocks/sdk/model/EndInvestorPayload.java @@ -17,62 +17,16 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; import com.fireblocks.sdk.ApiClient; import java.util.Objects; import java.util.StringJoiner; /** Shared by invite / invite-cancel / offboard — identical wire shape, different verb. */ -@JsonPropertyOrder({ - EndInvestorPayload.JSON_PROPERTY_VAULT_ACCOUNT_ID, - EndInvestorPayload.JSON_PROPERTY_BLOCKCHAIN_ID, - EndInvestorPayload.JSON_PROPERTY_END_INVESTOR -}) +@JsonPropertyOrder({EndInvestorPayload.JSON_PROPERTY_END_INVESTOR}) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class EndInvestorPayload { - public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; - @jakarta.annotation.Nonnull private String vaultAccountId; - - /** - * The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. - */ - public enum BlockchainIdEnum { - CANTON(String.valueOf("CANTON")), - - CANTON_TEST(String.valueOf("CANTON_TEST")); - - private String value; - - BlockchainIdEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static BlockchainIdEnum fromValue(String value) { - for (BlockchainIdEnum b : BlockchainIdEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; - @jakarta.annotation.Nonnull private BlockchainIdEnum blockchainId; - public static final String JSON_PROPERTY_END_INVESTOR = "endInvestor"; @jakarta.annotation.Nonnull private String endInvestor; @@ -80,63 +34,10 @@ public EndInvestorPayload() {} @JsonCreator public EndInvestorPayload( - @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) - String vaultAccountId, - @JsonProperty(value = JSON_PROPERTY_BLOCKCHAIN_ID, required = true) - BlockchainIdEnum blockchainId, @JsonProperty(value = JSON_PROPERTY_END_INVESTOR, required = true) String endInvestor) { - this.vaultAccountId = vaultAccountId; - this.blockchainId = blockchainId; this.endInvestor = endInvestor; } - public EndInvestorPayload vaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { - this.vaultAccountId = vaultAccountId; - return this; - } - - /** - * The vault account whose Canton wallet acts here. - * - * @return vaultAccountId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getVaultAccountId() { - return vaultAccountId; - } - - @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { - this.vaultAccountId = vaultAccountId; - } - - public EndInvestorPayload blockchainId( - @jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { - this.blockchainId = blockchainId; - return this; - } - - /** - * The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. - * - * @return blockchainId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BlockchainIdEnum getBlockchainId() { - return blockchainId; - } - - @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBlockchainId(@jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { - this.blockchainId = blockchainId; - } - public EndInvestorPayload endInvestor(@jakarta.annotation.Nonnull String endInvestor) { this.endInvestor = endInvestor; return this; @@ -170,22 +71,18 @@ public boolean equals(Object o) { return false; } EndInvestorPayload endInvestorPayload = (EndInvestorPayload) o; - return Objects.equals(this.vaultAccountId, endInvestorPayload.vaultAccountId) - && Objects.equals(this.blockchainId, endInvestorPayload.blockchainId) - && Objects.equals(this.endInvestor, endInvestorPayload.endInvestor); + return Objects.equals(this.endInvestor, endInvestorPayload.endInvestor); } @Override public int hashCode() { - return Objects.hash(vaultAccountId, blockchainId, endInvestor); + return Objects.hash(endInvestor); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EndInvestorPayload {\n"); - sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); - sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); sb.append(" endInvestor: ").append(toIndentedString(endInvestor)).append("\n"); sb.append("}"); return sb.toString(); @@ -234,26 +131,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `vaultAccountId` to the URL query string - if (getVaultAccountId() != null) { - joiner.add( - String.format( - "%svaultAccountId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); - } - - // add `blockchainId` to the URL query string - if (getBlockchainId() != null) { - joiner.add( - String.format( - "%sblockchainId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getBlockchainId())))); - } - // add `endInvestor` to the URL query string if (getEndInvestor() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/GetBulkSigningKeysJobsResponse.java b/src/main/java/com/fireblocks/sdk/model/GetBulkSigningKeysJobsResponse.java new file mode 100644 index 00000000..0f857bb4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetBulkSigningKeysJobsResponse.java @@ -0,0 +1,213 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** GetBulkSigningKeysJobsResponse */ +@JsonPropertyOrder({ + GetBulkSigningKeysJobsResponse.JSON_PROPERTY_DATA, + GetBulkSigningKeysJobsResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class GetBulkSigningKeysJobsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + @jakarta.annotation.Nonnull private List data; + + public static final String JSON_PROPERTY_NEXT = "next"; + @jakarta.annotation.Nullable private String next; + + public GetBulkSigningKeysJobsResponse() {} + + @JsonCreator + public GetBulkSigningKeysJobsResponse( + @JsonProperty(value = JSON_PROPERTY_DATA, required = true) + List data) { + this.data = data; + } + + public GetBulkSigningKeysJobsResponse data( + @jakarta.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public GetBulkSigningKeysJobsResponse addDataItem(BulkSigningKeyJob dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Registration jobs for the workspace, newest first. + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@jakarta.annotation.Nonnull List data) { + this.data = data; + } + + public GetBulkSigningKeysJobsResponse next(@jakarta.annotation.Nullable String next) { + this.next = next; + return this; + } + + /** + * Cursor to the next page. Absent on the last page. + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(@jakarta.annotation.Nullable String next) { + this.next = next; + } + + /** Return true if this GetBulkSigningKeysJobsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetBulkSigningKeysJobsResponse getBulkSigningKeysJobsResponse = + (GetBulkSigningKeysJobsResponse) o; + return Objects.equals(this.data, getBulkSigningKeysJobsResponse.data) + && Objects.equals(this.next, getBulkSigningKeysJobsResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetBulkSigningKeysJobsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).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 `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/OfferResponse.java b/src/main/java/com/fireblocks/sdk/model/OfferResponse.java index 707753a5..aa10c6b5 100644 --- a/src/main/java/com/fireblocks/sdk/model/OfferResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/OfferResponse.java @@ -179,6 +179,57 @@ public OfferResponse deserialize(JsonParser jp, DeserializationContext ctxt) e); } + // deserialize OfferResponseAllocationWithdraw + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OfferResponseAllocationWithdraw.class.equals(Integer.class) + || OfferResponseAllocationWithdraw.class.equals(Long.class) + || OfferResponseAllocationWithdraw.class.equals(Float.class) + || OfferResponseAllocationWithdraw.class.equals(Double.class) + || OfferResponseAllocationWithdraw.class.equals(Boolean.class) + || OfferResponseAllocationWithdraw.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OfferResponseAllocationWithdraw.class.equals(Integer.class) + || OfferResponseAllocationWithdraw.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OfferResponseAllocationWithdraw.class.equals(Float.class) + || OfferResponseAllocationWithdraw.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (OfferResponseAllocationWithdraw.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OfferResponseAllocationWithdraw.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(OfferResponseAllocationWithdraw.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log( + Level.FINER, + "Input data matches schema 'OfferResponseAllocationWithdraw'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'OfferResponseAllocationWithdraw'", + e); + } + // deserialize OfferResponseDtccOnboardingAccept try { boolean attemptParsing = true; @@ -564,6 +615,11 @@ public OfferResponse(OfferResponseAllocationReject o) { setActualInstance(o); } + public OfferResponse(OfferResponseAllocationWithdraw o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public OfferResponse(OfferResponseDtccOnboardingAccept o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -602,6 +658,7 @@ public OfferResponse(OfferResponseTransferWithdraw o) { static { schemas.put("OfferResponseAllocationAccept", OfferResponseAllocationAccept.class); schemas.put("OfferResponseAllocationReject", OfferResponseAllocationReject.class); + schemas.put("OfferResponseAllocationWithdraw", OfferResponseAllocationWithdraw.class); schemas.put("OfferResponseDtccOnboardingAccept", OfferResponseDtccOnboardingAccept.class); schemas.put("OfferResponseDtccOnboardingReject", OfferResponseDtccOnboardingReject.class); schemas.put("OfferResponseTradewebAccept", OfferResponseTradewebAccept.class); @@ -614,6 +671,7 @@ public OfferResponse(OfferResponseTransferWithdraw o) { Map> mappings = new HashMap>(); mappings.put("ALLOCATION_ACCEPT", OfferResponseAllocationAccept.class); mappings.put("ALLOCATION_REJECT", OfferResponseAllocationReject.class); + mappings.put("ALLOCATION_WITHDRAW", OfferResponseAllocationWithdraw.class); mappings.put( "DTCC_END_INVESTOR_ONBOARDING_ACCEPT", OfferResponseDtccOnboardingAccept.class); mappings.put( @@ -625,6 +683,7 @@ public OfferResponse(OfferResponseTransferWithdraw o) { mappings.put("TRANSFER_WITHDRAW", OfferResponseTransferWithdraw.class); mappings.put("OfferResponseAllocationAccept", OfferResponseAllocationAccept.class); mappings.put("OfferResponseAllocationReject", OfferResponseAllocationReject.class); + mappings.put("OfferResponseAllocationWithdraw", OfferResponseAllocationWithdraw.class); mappings.put("OfferResponseDtccOnboardingAccept", OfferResponseDtccOnboardingAccept.class); mappings.put("OfferResponseDtccOnboardingReject", OfferResponseDtccOnboardingReject.class); mappings.put("OfferResponseTradewebAccept", OfferResponseTradewebAccept.class); @@ -644,9 +703,10 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid * against the oneOf child schemas: OfferResponseAllocationAccept, - * OfferResponseAllocationReject, OfferResponseDtccOnboardingAccept, - * OfferResponseDtccOnboardingReject, OfferResponseTradewebAccept, OfferResponseTradewebReject, - * OfferResponseTransferAccept, OfferResponseTransferReject, OfferResponseTransferWithdraw + * OfferResponseAllocationReject, OfferResponseAllocationWithdraw, + * OfferResponseDtccOnboardingAccept, OfferResponseDtccOnboardingReject, + * OfferResponseTradewebAccept, OfferResponseTradewebReject, OfferResponseTransferAccept, + * OfferResponseTransferReject, OfferResponseTransferWithdraw * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be * a composed schema (allOf, anyOf, oneOf). @@ -665,6 +725,12 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf( + OfferResponseAllocationWithdraw.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( OfferResponseDtccOnboardingAccept.class, instance, new HashSet>())) { super.setActualInstance(instance); @@ -709,22 +775,25 @@ public void setActualInstance(Object instance) { throw new RuntimeException( "Invalid instance type. Must be OfferResponseAllocationAccept," - + " OfferResponseAllocationReject, OfferResponseDtccOnboardingAccept," - + " OfferResponseDtccOnboardingReject, OfferResponseTradewebAccept," - + " OfferResponseTradewebReject, OfferResponseTransferAccept," - + " OfferResponseTransferReject, OfferResponseTransferWithdraw"); + + " OfferResponseAllocationReject, OfferResponseAllocationWithdraw," + + " OfferResponseDtccOnboardingAccept, OfferResponseDtccOnboardingReject," + + " OfferResponseTradewebAccept, OfferResponseTradewebReject," + + " OfferResponseTransferAccept, OfferResponseTransferReject," + + " OfferResponseTransferWithdraw"); } /** * Get the actual instance, which can be the following: OfferResponseAllocationAccept, - * OfferResponseAllocationReject, OfferResponseDtccOnboardingAccept, - * OfferResponseDtccOnboardingReject, OfferResponseTradewebAccept, OfferResponseTradewebReject, - * OfferResponseTransferAccept, OfferResponseTransferReject, OfferResponseTransferWithdraw + * OfferResponseAllocationReject, OfferResponseAllocationWithdraw, + * OfferResponseDtccOnboardingAccept, OfferResponseDtccOnboardingReject, + * OfferResponseTradewebAccept, OfferResponseTradewebReject, OfferResponseTransferAccept, + * OfferResponseTransferReject, OfferResponseTransferWithdraw * * @return The actual instance (OfferResponseAllocationAccept, OfferResponseAllocationReject, - * OfferResponseDtccOnboardingAccept, OfferResponseDtccOnboardingReject, - * OfferResponseTradewebAccept, OfferResponseTradewebReject, OfferResponseTransferAccept, - * OfferResponseTransferReject, OfferResponseTransferWithdraw) + * OfferResponseAllocationWithdraw, OfferResponseDtccOnboardingAccept, + * OfferResponseDtccOnboardingReject, OfferResponseTradewebAccept, + * OfferResponseTradewebReject, OfferResponseTransferAccept, OfferResponseTransferReject, + * OfferResponseTransferWithdraw) */ @Override public Object getActualInstance() { @@ -755,6 +824,18 @@ public OfferResponseAllocationReject getOfferResponseAllocationReject() return (OfferResponseAllocationReject) super.getActualInstance(); } + /** + * Get the actual instance of `OfferResponseAllocationWithdraw`. If the actual instance is not + * `OfferResponseAllocationWithdraw`, the ClassCastException will be thrown. + * + * @return The actual instance of `OfferResponseAllocationWithdraw` + * @throws ClassCastException if the instance is not `OfferResponseAllocationWithdraw` + */ + public OfferResponseAllocationWithdraw getOfferResponseAllocationWithdraw() + throws ClassCastException { + return (OfferResponseAllocationWithdraw) super.getActualInstance(); + } + /** * Get the actual instance of `OfferResponseDtccOnboardingAccept`. If the actual instance is not * `OfferResponseDtccOnboardingAccept`, the ClassCastException will be thrown. @@ -939,6 +1020,14 @@ public String toUrlQueryString(String prefix) { } return joiner.toString(); } + if (getActualInstance() instanceof OfferResponseAllocationWithdraw) { + if (getActualInstance() != null) { + joiner.add( + ((OfferResponseAllocationWithdraw) getActualInstance()) + .toUrlQueryString(prefix + "one_of_9" + suffix)); + } + return joiner.toString(); + } return null; } } diff --git a/src/main/java/com/fireblocks/sdk/model/CantonCallAllocationWithdraw.java b/src/main/java/com/fireblocks/sdk/model/OfferResponseAllocationWithdraw.java similarity index 51% rename from src/main/java/com/fireblocks/sdk/model/CantonCallAllocationWithdraw.java rename to src/main/java/com/fireblocks/sdk/model/OfferResponseAllocationWithdraw.java index 00843d00..c23e84a4 100644 --- a/src/main/java/com/fireblocks/sdk/model/CantonCallAllocationWithdraw.java +++ b/src/main/java/com/fireblocks/sdk/model/OfferResponseAllocationWithdraw.java @@ -22,22 +22,32 @@ import java.util.Objects; import java.util.StringJoiner; -/** CantonCallAllocationWithdraw */ -@JsonPropertyOrder({ - CantonCallAllocationWithdraw.JSON_PROPERTY_TYPE, - CantonCallAllocationWithdraw.JSON_PROPERTY_PAYLOAD -}) +/** + * Withdraw the allocation you made by accepting this offer, unlocking the holding. Carries no + * arguments — the allocation is resolved from the offer. Answers `409` until the accept + * has settled. + */ +@JsonPropertyOrder({OfferResponseAllocationWithdraw.JSON_PROPERTY_RESPONSE_TYPE}) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class CantonCallAllocationWithdraw { - /** Which call to make. Selects the shape of `payload`. */ - public enum TypeEnum { +public class OfferResponseAllocationWithdraw { + /** + * How you are answering the offer. Must be one of the values listed in the transaction's + * `cantonDetails.offerResponse.availableResponses` — TOP-LEVEL on the transaction, + * not nested under an `additionalInfo` envelope, which does not exist on + * `TransactionResponse`. `availableResponses` states what this offer TYPE + * accepts. It is set when the offer arrives and does not change, so it does NOT tell you + * whether the offer is still answerable — check `expiresAt` and the transaction's + * status for that, and expect this endpoint to be the authority: it re-checks state and expiry + * on every call and answers 409 when either has moved. + */ + public enum ResponseTypeEnum { ALLOCATION_WITHDRAW(String.valueOf("ALLOCATION_WITHDRAW")); private String value; - TypeEnum(String value) { + ResponseTypeEnum(String value) { this.value = value; } @@ -52,8 +62,8 @@ public String toString() { } @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { + public static ResponseTypeEnum fromValue(String value) { + for (ResponseTypeEnum b : ResponseTypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -62,71 +72,50 @@ public static TypeEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_TYPE = "type"; - @jakarta.annotation.Nonnull private TypeEnum type; + public static final String JSON_PROPERTY_RESPONSE_TYPE = "responseType"; + @jakarta.annotation.Nonnull private ResponseTypeEnum responseType; - public static final String JSON_PROPERTY_PAYLOAD = "payload"; - @jakarta.annotation.Nonnull private AllocationWithdrawPayload payload; - - public CantonCallAllocationWithdraw() {} + public OfferResponseAllocationWithdraw() {} @JsonCreator - public CantonCallAllocationWithdraw( - @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, - @JsonProperty(value = JSON_PROPERTY_PAYLOAD, required = true) - AllocationWithdrawPayload payload) { - this.type = type; - this.payload = payload; + public OfferResponseAllocationWithdraw( + @JsonProperty(value = JSON_PROPERTY_RESPONSE_TYPE, required = true) + ResponseTypeEnum responseType) { + this.responseType = responseType; } - public CantonCallAllocationWithdraw type(@jakarta.annotation.Nonnull TypeEnum type) { - this.type = type; + public OfferResponseAllocationWithdraw responseType( + @jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; return this; } /** - * Which call to make. Selects the shape of `payload`. + * How you are answering the offer. Must be one of the values listed in the transaction's + * `cantonDetails.offerResponse.availableResponses` — TOP-LEVEL on the transaction, + * not nested under an `additionalInfo` envelope, which does not exist on + * `TransactionResponse`. `availableResponses` states what this offer TYPE + * accepts. It is set when the offer arrives and does not change, so it does NOT tell you + * whether the offer is still answerable — check `expiresAt` and the transaction's + * status for that, and expect this endpoint to be the authority: it re-checks state and expiry + * on every call and answers 409 when either has moved. * - * @return type + * @return responseType */ @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TypeEnum getType() { - return type; + public ResponseTypeEnum getResponseType() { + return responseType; } - @JsonProperty(JSON_PROPERTY_TYPE) + @JsonProperty(JSON_PROPERTY_RESPONSE_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(@jakarta.annotation.Nonnull TypeEnum type) { - this.type = type; - } - - public CantonCallAllocationWithdraw payload( - @jakarta.annotation.Nonnull AllocationWithdrawPayload payload) { - this.payload = payload; - return this; + public void setResponseType(@jakarta.annotation.Nonnull ResponseTypeEnum responseType) { + this.responseType = responseType; } - /** - * Get payload - * - * @return payload - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PAYLOAD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AllocationWithdrawPayload getPayload() { - return payload; - } - - @JsonProperty(JSON_PROPERTY_PAYLOAD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPayload(@jakarta.annotation.Nonnull AllocationWithdrawPayload payload) { - this.payload = payload; - } - - /** Return true if this CantonCallAllocationWithdraw object is equal to o. */ + /** Return true if this OfferResponseAllocationWithdraw object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -135,23 +124,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CantonCallAllocationWithdraw cantonCallAllocationWithdraw = - (CantonCallAllocationWithdraw) o; - return Objects.equals(this.type, cantonCallAllocationWithdraw.type) - && Objects.equals(this.payload, cantonCallAllocationWithdraw.payload); + OfferResponseAllocationWithdraw offerResponseAllocationWithdraw = + (OfferResponseAllocationWithdraw) o; + return Objects.equals(this.responseType, offerResponseAllocationWithdraw.responseType); } @Override public int hashCode() { - return Objects.hash(type, payload); + return Objects.hash(responseType); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CantonCallAllocationWithdraw {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); + sb.append("class OfferResponseAllocationWithdraw {\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -199,19 +186,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `type` to the URL query string - if (getType() != null) { + // add `responseType` to the URL query string + if (getResponseType() != null) { joiner.add( String.format( - "%stype%s=%s", + "%sresponseType%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getType())))); - } - - // add `payload` to the URL query string - if (getPayload() != null) { - joiner.add(getPayload().toUrlQueryString(prefix + "payload" + suffix)); + ApiClient.urlEncode(ApiClient.valueToString(getResponseType())))); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/ParticipantOnboardingPayload.java b/src/main/java/com/fireblocks/sdk/model/ParticipantOnboardingPayload.java index ba9febba..c8f26050 100644 --- a/src/main/java/com/fireblocks/sdk/model/ParticipantOnboardingPayload.java +++ b/src/main/java/com/fireblocks/sdk/model/ParticipantOnboardingPayload.java @@ -13,20 +13,19 @@ 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.fasterxml.jackson.annotation.JsonValue; import com.fireblocks.sdk.ApiClient; import java.time.OffsetDateTime; import java.util.Objects; import java.util.StringJoiner; -/** ParticipantOnboardingPayload */ +/** + * Optional, and so is every field in it: omit `payload` entirely to onboard with + * DTCC's published parties for the blockchain and the default expiry. + */ @JsonPropertyOrder({ - ParticipantOnboardingPayload.JSON_PROPERTY_VAULT_ACCOUNT_ID, - ParticipantOnboardingPayload.JSON_PROPERTY_BLOCKCHAIN_ID, ParticipantOnboardingPayload.JSON_PROPERTY_EXPIRES_AT, ParticipantOnboardingPayload.JSON_PROPERTY_OPERATOR, ParticipantOnboardingPayload.JSON_PROPERTY_COMPLIANCE, @@ -38,136 +37,26 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class ParticipantOnboardingPayload { - public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; - @jakarta.annotation.Nonnull private String vaultAccountId; - - /** - * The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. - */ - public enum BlockchainIdEnum { - CANTON(String.valueOf("CANTON")), - - CANTON_TEST(String.valueOf("CANTON_TEST")); - - private String value; - - BlockchainIdEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static BlockchainIdEnum fromValue(String value) { - for (BlockchainIdEnum b : BlockchainIdEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; - @jakarta.annotation.Nonnull private BlockchainIdEnum blockchainId; - public static final String JSON_PROPERTY_EXPIRES_AT = "expiresAt"; @jakarta.annotation.Nullable private OffsetDateTime expiresAt; public static final String JSON_PROPERTY_OPERATOR = "operator"; - @jakarta.annotation.Nonnull private String operator; + @jakarta.annotation.Nullable private String operator; public static final String JSON_PROPERTY_COMPLIANCE = "compliance"; - @jakarta.annotation.Nonnull private String compliance; + @jakarta.annotation.Nullable private String compliance; public static final String JSON_PROPERTY_REGISTRAR = "registrar"; - @jakarta.annotation.Nonnull private String registrar; + @jakarta.annotation.Nullable private String registrar; public static final String JSON_PROPERTY_CLIENT_ONBOARDER = "clientOnboarder"; - @jakarta.annotation.Nonnull private String clientOnboarder; + @jakarta.annotation.Nullable private String clientOnboarder; public static final String JSON_PROPERTY_UPGRADER = "upgrader"; - @jakarta.annotation.Nonnull private String upgrader; + @jakarta.annotation.Nullable private String upgrader; public ParticipantOnboardingPayload() {} - @JsonCreator - public ParticipantOnboardingPayload( - @JsonProperty(value = JSON_PROPERTY_VAULT_ACCOUNT_ID, required = true) - String vaultAccountId, - @JsonProperty(value = JSON_PROPERTY_BLOCKCHAIN_ID, required = true) - BlockchainIdEnum blockchainId, - @JsonProperty(value = JSON_PROPERTY_OPERATOR, required = true) String operator, - @JsonProperty(value = JSON_PROPERTY_COMPLIANCE, required = true) String compliance, - @JsonProperty(value = JSON_PROPERTY_REGISTRAR, required = true) String registrar, - @JsonProperty(value = JSON_PROPERTY_CLIENT_ONBOARDER, required = true) - String clientOnboarder, - @JsonProperty(value = JSON_PROPERTY_UPGRADER, required = true) String upgrader) { - this.vaultAccountId = vaultAccountId; - this.blockchainId = blockchainId; - this.operator = operator; - this.compliance = compliance; - this.registrar = registrar; - this.clientOnboarder = clientOnboarder; - this.upgrader = upgrader; - } - - public ParticipantOnboardingPayload vaultAccountId( - @jakarta.annotation.Nonnull String vaultAccountId) { - this.vaultAccountId = vaultAccountId; - return this; - } - - /** - * The vault account that acts as the participant. Its Canton party is derived for you. - * - * @return vaultAccountId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getVaultAccountId() { - return vaultAccountId; - } - - @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVaultAccountId(@jakarta.annotation.Nonnull String vaultAccountId) { - this.vaultAccountId = vaultAccountId; - } - - public ParticipantOnboardingPayload blockchainId( - @jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { - this.blockchainId = blockchainId; - return this; - } - - /** - * The blockchain this party is connected to — `CANTON` or `CANTON_TEST`. - * - * @return blockchainId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BlockchainIdEnum getBlockchainId() { - return blockchainId; - } - - @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBlockchainId(@jakarta.annotation.Nonnull BlockchainIdEnum blockchainId) { - this.blockchainId = blockchainId; - } - public ParticipantOnboardingPayload expiresAt( @jakarta.annotation.Nullable OffsetDateTime expiresAt) { this.expiresAt = expiresAt; @@ -192,120 +81,123 @@ public void setExpiresAt(@jakarta.annotation.Nullable OffsetDateTime expiresAt) this.expiresAt = expiresAt; } - public ParticipantOnboardingPayload operator(@jakarta.annotation.Nonnull String operator) { + public ParticipantOnboardingPayload operator(@jakarta.annotation.Nullable String operator) { this.operator = operator; return this; } /** - * DTCC infra operator party id. + * DTCC infra operator party id. Optional — overrides the service's default for the + * blockchain. * * @return operator */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_OPERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getOperator() { return operator; } @JsonProperty(JSON_PROPERTY_OPERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOperator(@jakarta.annotation.Nonnull String operator) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOperator(@jakarta.annotation.Nullable String operator) { this.operator = operator; } - public ParticipantOnboardingPayload compliance(@jakarta.annotation.Nonnull String compliance) { + public ParticipantOnboardingPayload compliance(@jakarta.annotation.Nullable String compliance) { this.compliance = compliance; return this; } /** - * DTCC compliance party id. + * DTCC compliance party id. Optional — overrides the service's default for the blockchain. * * @return compliance */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_COMPLIANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getCompliance() { return compliance; } @JsonProperty(JSON_PROPERTY_COMPLIANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCompliance(@jakarta.annotation.Nonnull String compliance) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompliance(@jakarta.annotation.Nullable String compliance) { this.compliance = compliance; } - public ParticipantOnboardingPayload registrar(@jakarta.annotation.Nonnull String registrar) { + public ParticipantOnboardingPayload registrar(@jakarta.annotation.Nullable String registrar) { this.registrar = registrar; return this; } /** - * DTCC registrar party id — co-signs the accept. + * DTCC registrar party id — co-signs the accept. Optional — overrides the service's default + * for the blockchain. * * @return registrar */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_REGISTRAR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getRegistrar() { return registrar; } @JsonProperty(JSON_PROPERTY_REGISTRAR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRegistrar(@jakarta.annotation.Nonnull String registrar) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRegistrar(@jakarta.annotation.Nullable String registrar) { this.registrar = registrar; } public ParticipantOnboardingPayload clientOnboarder( - @jakarta.annotation.Nonnull String clientOnboarder) { + @jakarta.annotation.Nullable String clientOnboarder) { this.clientOnboarder = clientOnboarder; return this; } /** - * DTCC client onboarder party id — co-signs the accept. + * DTCC client onboarder party id — co-signs the accept. Optional — overrides the service's + * default for the blockchain. * * @return clientOnboarder */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ONBOARDER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getClientOnboarder() { return clientOnboarder; } @JsonProperty(JSON_PROPERTY_CLIENT_ONBOARDER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientOnboarder(@jakarta.annotation.Nonnull String clientOnboarder) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientOnboarder(@jakarta.annotation.Nullable String clientOnboarder) { this.clientOnboarder = clientOnboarder; } - public ParticipantOnboardingPayload upgrader(@jakarta.annotation.Nonnull String upgrader) { + public ParticipantOnboardingPayload upgrader(@jakarta.annotation.Nullable String upgrader) { this.upgrader = upgrader; return this; } /** - * DTCC upgrader party id — the Model Upgrade Tool authority. Supplied by DTCC during the - * off-chain registration, alongside the other party ids. + * DTCC upgrader party id — the Model Upgrade Tool authority. Optional — overrides the + * service's default for the blockchain. * * @return upgrader */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_UPGRADER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getUpgrader() { return upgrader; } @JsonProperty(JSON_PROPERTY_UPGRADER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUpgrader(@jakarta.annotation.Nonnull String upgrader) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpgrader(@jakarta.annotation.Nullable String upgrader) { this.upgrader = upgrader; } @@ -320,9 +212,7 @@ public boolean equals(Object o) { } ParticipantOnboardingPayload participantOnboardingPayload = (ParticipantOnboardingPayload) o; - return Objects.equals(this.vaultAccountId, participantOnboardingPayload.vaultAccountId) - && Objects.equals(this.blockchainId, participantOnboardingPayload.blockchainId) - && Objects.equals(this.expiresAt, participantOnboardingPayload.expiresAt) + return Objects.equals(this.expiresAt, participantOnboardingPayload.expiresAt) && Objects.equals(this.operator, participantOnboardingPayload.operator) && Objects.equals(this.compliance, participantOnboardingPayload.compliance) && Objects.equals(this.registrar, participantOnboardingPayload.registrar) @@ -333,23 +223,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash( - vaultAccountId, - blockchainId, - expiresAt, - operator, - compliance, - registrar, - clientOnboarder, - upgrader); + return Objects.hash(expiresAt, operator, compliance, registrar, clientOnboarder, upgrader); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ParticipantOnboardingPayload {\n"); - sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); - sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); sb.append(" compliance: ").append(toIndentedString(compliance)).append("\n"); @@ -403,26 +283,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `vaultAccountId` to the URL query string - if (getVaultAccountId() != null) { - joiner.add( - String.format( - "%svaultAccountId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getVaultAccountId())))); - } - - // add `blockchainId` to the URL query string - if (getBlockchainId() != null) { - joiner.add( - String.format( - "%sblockchainId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getBlockchainId())))); - } - // add `expiresAt` to the URL query string if (getExpiresAt() != null) { joiner.add( diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index e77e0df4..3a35aef2 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -712,11 +712,11 @@ public void testGetTrLinkApi() { } @Test - public void testGetTradingBetaApi() { + public void testGetTradingApi() { setupFireblocks(true, null, null); - TradingBetaApi tradingBeta = fireblocks.tradingBeta(); - Assert.assertNotNull(tradingBeta); - Assert.assertSame(tradingBeta, fireblocks.tradingBeta()); + TradingApi trading = fireblocks.trading(); + Assert.assertNotNull(trading); + Assert.assertSame(trading, fireblocks.trading()); } @Test diff --git a/src/test/java/com/fireblocks/sdk/LifecycleWarningTest.java b/src/test/java/com/fireblocks/sdk/LifecycleWarningTest.java new file mode 100644 index 00000000..5fdbd319 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/LifecycleWarningTest.java @@ -0,0 +1,469 @@ + +import com.fireblocks.sdk.LifecycleWarning; +import java.net.http.HttpHeaders; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Handler; +import java.util.logging.Level; +import java.util.logging.LogRecord; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Assert; +import org.junit.Assume; +import org.junit.Before; +import org.junit.Test; + +public class LifecycleWarningTest { + + private static final String SUNSET = "Fri, 15 Jan 2027 00:00:00 GMT"; + private static final String MIGRATION_GUIDE = + "https://developer.fireblocks.com/docs/v2-migration"; + private static final String SUCCESSOR = "https://api.fireblocks.io/v1/transactions_v2"; + + private Logger lifecycleLogger; + private List records; + private Handler captureHandler; + private boolean previousUseParentHandlers; + + @Before + public void setUp() { + records = new ArrayList<>(); + captureHandler = + new Handler() { + @Override + public void publish(LogRecord record) { + records.add(record); + } + + @Override + public void flush() {} + + @Override + public void close() {} + }; + lifecycleLogger = Logger.getLogger(LifecycleWarning.LOGGER_NAME); + previousUseParentHandlers = lifecycleLogger.getUseParentHandlers(); + lifecycleLogger.setUseParentHandlers(false); + lifecycleLogger.addHandler(captureHandler); + lifecycleLogger.setLevel(Level.ALL); + } + + @After + public void tearDown() { + lifecycleLogger.removeHandler(captureHandler); + lifecycleLogger.setUseParentHandlers(previousUseParentHandlers); + lifecycleLogger.setLevel(null); + } + + private static HttpHeaders headers(Map> values) { + return HttpHeaders.of(values, (k, v) -> true); + } + + private static HttpHeaders headersOf(String state, String sunset, String link) { + Map> values = new LinkedHashMap<>(); + if (state != null) { + values.put(LifecycleWarning.LIFECYCLE_STATE_HEADER, Collections.singletonList(state)); + } + if (sunset != null) { + values.put(LifecycleWarning.SUNSET_HEADER, Collections.singletonList(sunset)); + } + if (link != null) { + values.put(LifecycleWarning.LINK_HEADER, Collections.singletonList(link)); + } + return headers(values); + } + + private static HttpHeaders state(String value) { + return headersOf(value, null, null); + } + + /** + * A JVM cannot clear environment variables, so a developer who exported + * FIREBLOCKS_SDK_SUPPRESS_LIFECYCLE_WARNING in their shell would see the tests that expect a + * logged warning fail. Skip those instead. + */ + private static void assumeSuppressionNotSet() { + Assume.assumeFalse( + "FIREBLOCKS_SDK_SUPPRESS_LIFECYCLE_WARNING is set in this environment", + LifecycleWarning.isSuppressed(System.getenv(LifecycleWarning.SUPPRESS_ENV_VAR))); + } + + /** Most tests do not care about the status; 200 is a plain success. */ + private static String buildMessage(HttpHeaders headers, String operationId) { + return LifecycleWarning.buildMessage(headers, operationId, 200); + } + + private static void warn(HttpHeaders headers, String operationId) { + LifecycleWarning.warn(headers, operationId, 200); + } + + // --- emission ----------------------------------------------------------- + + @Test + public void emitsOneWarningForNonGaState() { + assumeSuppressionNotSet(); + warn(state("beta"), "createTransaction"); + Assert.assertEquals(1, records.size()); + Assert.assertTrue(records.get(0).getMessage().contains("createTransaction")); + Assert.assertTrue(records.get(0).getMessage().contains("beta")); + Assert.assertEquals(Level.WARNING, records.get(0).getLevel()); + } + + @Test + public void emitsPerExecutionNotOncePerOperation() { + assumeSuppressionNotSet(); + warn(state("beta"), "createTransaction"); + warn(state("beta"), "createTransaction"); + Assert.assertEquals(2, records.size()); + } + + @Test + public void emitsForEachDistinctOperation() { + assumeSuppressionNotSet(); + warn(state("beta"), "createTransaction"); + LifecycleWarning.warn(state("closed"), "getVaultAccount", 200); + Assert.assertEquals(2, records.size()); + } + + // --- silence ------------------------------------------------------------ + + @Test + public void staysSilentForGaAndUnrecognisedStates() { + String[] silent = { + "ga", + "internal", + "unlisted", + "private_beta", + "quantum_preview", + "", + " ", + "private beta", + "private-beta", + "