diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 76e071bf..0f4e27aa 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -346,7 +346,7 @@ docs/CreateVaultAccountConnectionRequest.md docs/CreateVaultAccountRequest.md docs/CreateVaultAssetResponse.md docs/CreateWalletRequest.md -docs/CreateWebhookOAuthRequest.md +docs/CreateWebhookOauthRequest.md docs/CreateWebhookRequest.md docs/CreateWorkflowExecutionRequestParamsInner.md docs/CustomRoutingDest.md @@ -360,7 +360,7 @@ docs/DelegationBlockchainPositionInfo.md docs/DelegationSummary.md docs/DeleteNetworkConnectionResponse.md docs/DeleteNetworkIdResponse.md -docs/DeleteWebhookOAuthResponse.md +docs/DeleteWebhookOauthResponse.md docs/DeployLayerZeroAdaptersRequest.md docs/DeployableAddressResponse.md docs/DeployedContractNotFoundError.md @@ -1236,6 +1236,8 @@ docs/UpdateAutomationSettingsRequest.md docs/UpdateBlockchainResponse.md docs/UpdateCallbackHandlerRequest.md docs/UpdateCallbackHandlerResponse.md +docs/UpdateConnectedAccountCredentialsRequest.md +docs/UpdateConnectedAccountCredentialsResponse.md docs/UpdateCounterpartyGroupRequest.md docs/UpdateDraftRequest.md docs/UpdateFindingExternalRequest.md @@ -1244,7 +1246,7 @@ docs/UpdateTagRequest.md docs/UpdateTokenOwnershipStatusDto.md docs/UpdateVaultAccountAssetAddressRequest.md docs/UpdateVaultAccountRequest.md -docs/UpdateWebhookOAuthRequest.md +docs/UpdateWebhookOauthRequest.md docs/UpdateWebhookRequest.md docs/UsWirePaymentInfo.md docs/UsdcGatewayWalletAsset.md @@ -1294,9 +1296,7 @@ docs/WebhookEvent.md docs/WebhookMetric.md docs/WebhookMtls.md docs/WebhookMtlsCsrResponse.md -docs/WebhookOAuth.md -docs/WebhookOAuthCredentials.md -docs/WebhookOAuthResponse.md +docs/WebhookOauthCredentials.md docs/WebhookPaginatedResponse.md docs/WebhooksApi.md docs/WebhooksV2Api.md @@ -1711,7 +1711,7 @@ fireblocks/models/create_vault_account_connection_request.py fireblocks/models/create_vault_account_request.py fireblocks/models/create_vault_asset_response.py fireblocks/models/create_wallet_request.py -fireblocks/models/create_webhook_o_auth_request.py +fireblocks/models/create_webhook_oauth_request.py fireblocks/models/create_webhook_request.py fireblocks/models/create_workflow_execution_request_params_inner.py fireblocks/models/custom_routing_dest.py @@ -1723,7 +1723,7 @@ fireblocks/models/delegation_blockchain_position_info.py fireblocks/models/delegation_summary.py fireblocks/models/delete_network_connection_response.py fireblocks/models/delete_network_id_response.py -fireblocks/models/delete_webhook_o_auth_response.py +fireblocks/models/delete_webhook_oauth_response.py fireblocks/models/deploy_layer_zero_adapters_request.py fireblocks/models/deployable_address_response.py fireblocks/models/deployed_contract_not_found_error.py @@ -2567,6 +2567,8 @@ fireblocks/models/update_automation_settings_request.py fireblocks/models/update_blockchain_response.py fireblocks/models/update_callback_handler_request.py fireblocks/models/update_callback_handler_response.py +fireblocks/models/update_connected_account_credentials_request.py +fireblocks/models/update_connected_account_credentials_response.py fireblocks/models/update_counterparty_group_request.py fireblocks/models/update_draft_request.py fireblocks/models/update_finding_external_request.py @@ -2575,7 +2577,7 @@ fireblocks/models/update_tag_request.py fireblocks/models/update_token_ownership_status_dto.py fireblocks/models/update_vault_account_asset_address_request.py fireblocks/models/update_vault_account_request.py -fireblocks/models/update_webhook_o_auth_request.py +fireblocks/models/update_webhook_oauth_request.py fireblocks/models/update_webhook_request.py fireblocks/models/us_wire_address.py fireblocks/models/us_wire_destination.py @@ -2623,9 +2625,7 @@ fireblocks/models/webhook_event.py fireblocks/models/webhook_metric.py fireblocks/models/webhook_mtls.py fireblocks/models/webhook_mtls_csr_response.py -fireblocks/models/webhook_o_auth.py -fireblocks/models/webhook_o_auth_credentials.py -fireblocks/models/webhook_o_auth_response.py +fireblocks/models/webhook_oauth_credentials.py fireblocks/models/webhook_paginated_response.py fireblocks/models/withdraw_request.py fireblocks/models/workflow_config_status.py @@ -3005,7 +3005,7 @@ test/test_create_vault_account_connection_request.py test/test_create_vault_account_request.py test/test_create_vault_asset_response.py test/test_create_wallet_request.py -test/test_create_webhook_o_auth_request.py +test/test_create_webhook_oauth_request.py test/test_create_webhook_request.py test/test_create_workflow_execution_request_params_inner.py test/test_custom_routing_dest.py @@ -3017,7 +3017,7 @@ test/test_delegation_blockchain_position_info.py test/test_delegation_summary.py test/test_delete_network_connection_response.py test/test_delete_network_id_response.py -test/test_delete_webhook_o_auth_response.py +test/test_delete_webhook_oauth_response.py test/test_deploy_layer_zero_adapters_request.py test/test_deployable_address_response.py test/test_deployed_contract_not_found_error.py @@ -3892,6 +3892,8 @@ test/test_update_automation_settings_request.py test/test_update_blockchain_response.py test/test_update_callback_handler_request.py test/test_update_callback_handler_response.py +test/test_update_connected_account_credentials_request.py +test/test_update_connected_account_credentials_response.py test/test_update_counterparty_group_request.py test/test_update_draft_request.py test/test_update_finding_external_request.py @@ -3900,7 +3902,7 @@ test/test_update_tag_request.py test/test_update_token_ownership_status_dto.py test/test_update_vault_account_asset_address_request.py test/test_update_vault_account_request.py -test/test_update_webhook_o_auth_request.py +test/test_update_webhook_oauth_request.py test/test_update_webhook_request.py test/test_us_wire_address.py test/test_us_wire_destination.py @@ -3953,9 +3955,7 @@ test/test_webhook_event.py test/test_webhook_metric.py test/test_webhook_mtls.py test/test_webhook_mtls_csr_response.py -test/test_webhook_o_auth.py -test/test_webhook_o_auth_credentials.py -test/test_webhook_o_auth_response.py +test/test_webhook_oauth_credentials.py test/test_webhook_paginated_response.py test/test_webhooks_api.py test/test_webhooks_v2_api.py diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 51ae562f..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,290 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v30.0.0](https://github.com/fireblocks/py-sdk/compare/v24.0.0...v30.0.0) - 2026-09-08 - -### Merged - -- Generated SDK #2829319317 [`#159`](https://github.com/fireblocks/py-sdk/pull/159) - -## [v24.0.0](https://github.com/fireblocks/py-sdk/compare/v23.0.0...v24.0.0) - 2026-07-23 - -### Merged - -- Generated SDK #2700459745 (major) [`#146`](https://github.com/fireblocks/py-sdk/pull/146) - -## [v23.0.0](https://github.com/fireblocks/py-sdk/compare/v22.0.0...v23.0.0) - 2026-07-01 - -### Merged - -- Generated SDK #1180 [`#145`](https://github.com/fireblocks/py-sdk/pull/145) - -## [v22.0.0](https://github.com/fireblocks/py-sdk/compare/v21.0.0...v22.0.0) - 2026-06-28 - -### Merged - -- Generated SDK #5347 [`#144`](https://github.com/fireblocks/py-sdk/pull/144) - -## [v21.0.0](https://github.com/fireblocks/py-sdk/compare/v20.0.0...v21.0.0) - 2026-06-11 - -### Merged - -- Generated SDK #5364 [`#142`](https://github.com/fireblocks/py-sdk/pull/142) - -## [v20.0.0](https://github.com/fireblocks/py-sdk/compare/v19.1.0...v20.0.0) - 2026-06-02 - -### Merged - -- Generated SDK #2839 (major) [`#141`](https://github.com/fireblocks/py-sdk/pull/141) - -## [v19.1.0](https://github.com/fireblocks/py-sdk/compare/v19.0.0...v19.1.0) - 2026-05-27 - -### Merged - -- Generated SDK #2710 (minor) [`#140`](https://github.com/fireblocks/py-sdk/pull/140) - -## [v19.0.0](https://github.com/fireblocks/py-sdk/compare/v18.0.0...v19.0.0) - 2026-05-17 - -### Merged - -- Generated SDK #7742 (major) [`#139`](https://github.com/fireblocks/py-sdk/pull/139) - -## [v18.0.0](https://github.com/fireblocks/py-sdk/compare/v17.0.0...v18.0.0) - 2026-05-07 - -### Merged - -- Generated SDK #3222 (major) [`#138`](https://github.com/fireblocks/py-sdk/pull/138) - -## [v17.0.0](https://github.com/fireblocks/py-sdk/compare/v16.0.0...v17.0.0) - 2026-04-20 - -### Merged - -- Generated SDK #9605 (major) [`#137`](https://github.com/fireblocks/py-sdk/pull/137) - -## [v16.0.0](https://github.com/fireblocks/py-sdk/compare/v15.0.0...v16.0.0) - 2026-04-06 - -### Merged - -- Generated SDK #3331 [`#135`](https://github.com/fireblocks/py-sdk/pull/135) - -## [v15.0.0](https://github.com/fireblocks/py-sdk/compare/v14.1.0...v15.0.0) - 2026-03-15 - -### Merged - -- Generated SDK #3733 (major) [`#129`](https://github.com/fireblocks/py-sdk/pull/129) - -## [v14.1.0](https://github.com/fireblocks/py-sdk/compare/v14.0.0...v14.1.0) - 2026-02-26 - -### Merged - -- Generated SDK #2167 [`#127`](https://github.com/fireblocks/py-sdk/pull/127) - -## [v14.0.0](https://github.com/fireblocks/py-sdk/compare/v13.0.0...v14.0.0) - 2026-02-03 - -### Merged - -- Generated SDK #4746 [`#123`](https://github.com/fireblocks/py-sdk/pull/123) - -## [v13.0.0](https://github.com/fireblocks/py-sdk/compare/v12.1.2...v13.0.0) - 2025-11-13 - -### Merged - -- Generated SDK #5834 [`#121`](https://github.com/fireblocks/py-sdk/pull/121) - -## [v12.1.2](https://github.com/fireblocks/py-sdk/compare/v12.1.1...v12.1.2) - 2025-10-22 - -### Merged - -- Generated SDK #8293 [`#120`](https://github.com/fireblocks/py-sdk/pull/120) - -## [v12.1.1](https://github.com/fireblocks/py-sdk/compare/v12.1.0...v12.1.1) - 2025-09-29 - -### Merged - -- Generated SDK #6061 [`#119`](https://github.com/fireblocks/py-sdk/pull/119) - -## [v12.1.0](https://github.com/fireblocks/py-sdk/compare/v12.0.0...v12.1.0) - 2025-09-09 - -### Merged - -- Generated SDK #4521 [`#118`](https://github.com/fireblocks/py-sdk/pull/118) - -## [v12.0.0](https://github.com/fireblocks/py-sdk/compare/v11.2.0...v12.0.0) - 2025-09-01 - -### Merged - -- Generated SDK #7741 [`#117`](https://github.com/fireblocks/py-sdk/pull/117) - -## [v11.2.0](https://github.com/fireblocks/py-sdk/compare/v11.1.0...v11.2.0) - 2025-08-18 - -### Merged - -- Generated SDK #3302 [`#116`](https://github.com/fireblocks/py-sdk/pull/116) - -## [v11.1.0](https://github.com/fireblocks/py-sdk/compare/v11.0.0...v11.1.0) - 2025-08-11 - -### Merged - -- Generated SDK #1782 [`#115`](https://github.com/fireblocks/py-sdk/pull/115) - -## [v11.0.0](https://github.com/fireblocks/py-sdk/compare/v10.4.0...v11.0.0) - 2025-07-15 - -### Merged - -- Generated SDK #5610 [`#114`](https://github.com/fireblocks/py-sdk/pull/114) - -## [v10.4.0](https://github.com/fireblocks/py-sdk/compare/v10.3.0...v10.4.0) - 2025-06-29 - -### Merged - -- Generated SDK #1492 [`#113`](https://github.com/fireblocks/py-sdk/pull/113) - -## [v10.3.0](https://github.com/fireblocks/py-sdk/compare/v10.2.0...v10.3.0) - 2025-06-18 - -### Merged - -- Generated SDK #4009 [`#112`](https://github.com/fireblocks/py-sdk/pull/112) - -## [v10.2.0](https://github.com/fireblocks/py-sdk/compare/v10.1.1...v10.2.0) - 2025-06-04 - -### Merged - -- Generated SDK #8912 [`#111`](https://github.com/fireblocks/py-sdk/pull/111) - -## [v10.1.1](https://github.com/fireblocks/py-sdk/compare/v10.1.0...v10.1.1) - 2025-05-18 - -### Merged - -- Generated SDK #5019 [`#110`](https://github.com/fireblocks/py-sdk/pull/110) - -## [v10.1.0](https://github.com/fireblocks/py-sdk/compare/v10.0.0...v10.1.0) - 2025-05-07 - -### Merged - -- Generated SDK #7076 [`#107`](https://github.com/fireblocks/py-sdk/pull/107) - -## [v10.0.0](https://github.com/fireblocks/py-sdk/compare/v9.0.1...v10.0.0) - 2025-04-20 - -### Merged - -- Generated SDK #4794 [`#105`](https://github.com/fireblocks/py-sdk/pull/105) - -## [v9.0.1](https://github.com/fireblocks/py-sdk/compare/v9.0.0...v9.0.1) - 2025-04-07 - -### Merged - -- Generated SDK #3065 [`#104`](https://github.com/fireblocks/py-sdk/pull/104) - -## [v9.0.0](https://github.com/fireblocks/py-sdk/compare/v8.0.0...v9.0.0) - 2025-03-27 - -### Merged - -- Generated SDK #619 [`#102`](https://github.com/fireblocks/py-sdk/pull/102) - -## [v8.0.0](https://github.com/fireblocks/py-sdk/compare/v7.1.0...v8.0.0) - 2025-03-17 - -### Merged - -- Generated SDK #645 [`#101`](https://github.com/fireblocks/py-sdk/pull/101) -- Generated SDK #726 [`#99`](https://github.com/fireblocks/py-sdk/pull/99) - -## [v7.1.0](https://github.com/fireblocks/py-sdk/compare/v7.0.1...v7.1.0) - 2025-02-25 - -### Merged - -- Generated SDK #9833 [`#96`](https://github.com/fireblocks/py-sdk/pull/96) - -## [v7.0.1](https://github.com/fireblocks/py-sdk/compare/v7.0.0...v7.0.1) - 2025-02-12 - -### Merged - -- Generated SDK #4262 [`#95`](https://github.com/fireblocks/py-sdk/pull/95) - -## [v7.0.0](https://github.com/fireblocks/py-sdk/compare/v6.0.0...v7.0.0) - 2025-02-02 - -### Merged - -- Generated SDK #538 [`#92`](https://github.com/fireblocks/py-sdk/pull/92) - -## [v6.0.0](https://github.com/fireblocks/py-sdk/compare/v5.0.0...v6.0.0) - 2025-01-08 - -### Merged - -- Generated SDK #8699 [`#89`](https://github.com/fireblocks/py-sdk/pull/89) - -## [v5.0.0](https://github.com/fireblocks/py-sdk/compare/v4.0.0...v5.0.0) - 2024-12-05 - -### Merged - -- Generated SDK #1430 [`#85`](https://github.com/fireblocks/py-sdk/pull/85) -- Update python-package.yml, deprecate macos-12 [`#86`](https://github.com/fireblocks/py-sdk/pull/86) - -## [v4.0.0](https://github.com/fireblocks/py-sdk/compare/v3.0.0...v4.0.0) - 2024-10-31 - -### Merged - -- Generated SDK #5184 [`#82`](https://github.com/fireblocks/py-sdk/pull/82) - -## [v3.0.0](https://github.com/fireblocks/py-sdk/compare/v2.1.0...v3.0.0) - 2024-09-17 - -### Merged - -- Generated SDK #237 [`#81`](https://github.com/fireblocks/py-sdk/pull/81) - -## [v2.1.0](https://github.com/fireblocks/py-sdk/compare/v2.0.0...v2.1.0) - 2024-07-25 - -### Merged - -- Generated SDK #6749 [`#78`](https://github.com/fireblocks/py-sdk/pull/78) - -## [v2.0.0](https://github.com/fireblocks/py-sdk/compare/v1.0.4...v2.0.0) - 2024-07-17 - -### Merged - -- Generated SDK #6152 [`#76`](https://github.com/fireblocks/py-sdk/pull/76) -- Generated SDK #7647 [`#73`](https://github.com/fireblocks/py-sdk/pull/73) -- Generated SDK #7984 [`#70`](https://github.com/fireblocks/py-sdk/pull/70) - -## [v1.0.4](https://github.com/fireblocks/py-sdk/compare/v1.0.3...v1.0.4) - 2024-06-26 - -### Merged - -- Generated SDK #5779 [`#69`](https://github.com/fireblocks/py-sdk/pull/69) -- Generated SDK #913 [`#68`](https://github.com/fireblocks/py-sdk/pull/68) -- Generated SDK #1353 [`#67`](https://github.com/fireblocks/py-sdk/pull/67) -- Generated SDK #9982 [`#66`](https://github.com/fireblocks/py-sdk/pull/66) -- Generated SDK #1362 [`#65`](https://github.com/fireblocks/py-sdk/pull/65) -- Generated SDK #3652 [`#64`](https://github.com/fireblocks/py-sdk/pull/64) - -## [v1.0.3](https://github.com/fireblocks/py-sdk/compare/v1.0.2...v1.0.3) - 2024-06-06 - -### Merged - -- Generated SDK #2648 [`#30`](https://github.com/fireblocks/py-sdk/pull/30) - -## [v1.0.2](https://github.com/fireblocks/py-sdk/compare/v0.0.2-beta...v1.0.2) - 2024-06-04 - -### Merged - -- version 1.0.2 [`#25`](https://github.com/fireblocks/py-sdk/pull/25) -- version 1.0.0 [`#24`](https://github.com/fireblocks/py-sdk/pull/24) - -## v0.0.2-beta - 2024-05-30 - -### Merged - -- version 0.0.2-beta [`#23`](https://github.com/fireblocks/py-sdk/pull/23) -- Update .bumpversion.cfg [`#14`](https://github.com/fireblocks/py-sdk/pull/14) -- Update setup.py [`#13`](https://github.com/fireblocks/py-sdk/pull/13) -- Bug Fixes [`#12`](https://github.com/fireblocks/py-sdk/pull/12) -- update support for beta in bumpversion [`#11`](https://github.com/fireblocks/py-sdk/pull/11) -- Update setup.py [`#10`](https://github.com/fireblocks/py-sdk/pull/10) -- Update setup.py [`#9`](https://github.com/fireblocks/py-sdk/pull/9) -- Added Idempotency & NCW headers support [`#7`](https://github.com/fireblocks/py-sdk/pull/7) -- Added Idempotency & NCW headers support [`#8`](https://github.com/fireblocks/py-sdk/pull/8) -- Update setup.py [`#5`](https://github.com/fireblocks/py-sdk/pull/5) -- API Support Updates [`#4`](https://github.com/fireblocks/py-sdk/pull/4) diff --git a/README.md b/README.md index 925e219a..7f799af7 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,7 @@ Class | Method | HTTP request | Description *ApiUserApi* | [**issue_api_user_pairing_token**](docs/ApiUserApi.md#issue_api_user_pairing_token) | **POST** /management/api_users/{userId}/pairing_token | Issue API user pairing token *ApprovalsBetaApi* | [**get_approval_by_id**](docs/ApprovalsBetaApi.md#get_approval_by_id) | **GET** /approvals/{requestId} | Get a single approval request *ApprovalsBetaApi* | [**get_approvals**](docs/ApprovalsBetaApi.md#get_approvals) | **GET** /approvals | List approval requests +*ApprovalsBetaApi* | [**reject_approval**](docs/ApprovalsBetaApi.md#reject_approval) | **POST** /approvals/{requestId}/reject | Reject an approval request *AuditLogsApi* | [**get_audit_logs**](docs/AuditLogsApi.md#get_audit_logs) | **GET** /management/audit_logs | Get audit logs *BlockchainLinkBetaApi* | [**activate_blockchain_link_chain**](docs/BlockchainLinkBetaApi.md#activate_blockchain_link_chain) | **POST** /blockchain_link/blockchains/{blockchainId}/activate | Activate a blockchain (triggers activation workflow) *BlockchainLinkBetaApi* | [**create_blockchain_link_chain**](docs/BlockchainLinkBetaApi.md#create_blockchain_link_chain) | **POST** /blockchain_link/blockchains | Create a new blockchain @@ -310,6 +311,7 @@ Class | Method | HTTP request | Description *ConnectedAccountsBetaApi* | [**get_connected_accounts_credentials_public_key**](docs/ConnectedAccountsBetaApi.md#get_connected_accounts_credentials_public_key) | **GET** /connected_accounts/credentials/public_key | Get public key to encrypt connected account credentials *ConnectedAccountsBetaApi* | [**rename_connected_account**](docs/ConnectedAccountsBetaApi.md#rename_connected_account) | **POST** /connected_accounts/{accountId}/rename | Rename Connected Account *ConnectedAccountsBetaApi* | [**sync_connected_account_allowlist**](docs/ConnectedAccountsBetaApi.md#sync_connected_account_allowlist) | **POST** /connected_accounts/{accountId}/allowlist/sync | Sync allowlist for connected account +*ConnectedAccountsBetaApi* | [**update_connected_account_credentials**](docs/ConnectedAccountsBetaApi.md#update_connected_account_credentials) | **POST** /connected_accounts/{accountId}/credentials | Update connected account credentials *ConsoleUserApi* | [**create_console_user**](docs/ConsoleUserApi.md#create_console_user) | **POST** /management/users | Create console user *ConsoleUserApi* | [**get_console_users**](docs/ConsoleUserApi.md#get_console_users) | **GET** /management/users | Get console users *ContactsApi* | [**get_contacts**](docs/ContactsApi.md#get_contacts) | **GET** /contacts | List contacts @@ -672,9 +674,9 @@ Class | Method | HTTP request | Description *WebhooksApi* | [**resend_transaction_webhooks**](docs/WebhooksApi.md#resend_transaction_webhooks) | **POST** /webhooks/resend/{txId} | Resend webhooks for a transaction by ID *WebhooksApi* | [**resend_webhooks**](docs/WebhooksApi.md#resend_webhooks) | **POST** /webhooks/resend | Resend failed webhooks *WebhooksV2Api* | [**create_webhook**](docs/WebhooksV2Api.md#create_webhook) | **POST** /webhooks | Create a new webhook -*WebhooksV2Api* | [**create_webhook_o_auth**](docs/WebhooksV2Api.md#create_webhook_o_auth) | **POST** /webhooks_settings/oauth | Create OAuth credentials +*WebhooksV2Api* | [**create_webhook_oauth**](docs/WebhooksV2Api.md#create_webhook_oauth) | **POST** /webhooks_settings/oauth | Create OAuth credentials *WebhooksV2Api* | [**delete_webhook**](docs/WebhooksV2Api.md#delete_webhook) | **DELETE** /webhooks/{webhookId} | Delete webhook -*WebhooksV2Api* | [**delete_webhook_o_auth**](docs/WebhooksV2Api.md#delete_webhook_o_auth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials +*WebhooksV2Api* | [**delete_webhook_oauth**](docs/WebhooksV2Api.md#delete_webhook_oauth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials *WebhooksV2Api* | [**get_metrics**](docs/WebhooksV2Api.md#get_metrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics *WebhooksV2Api* | [**get_mtls_csr**](docs/WebhooksV2Api.md#get_mtls_csr) | **GET** /webhooks/mtls/csr | Get mTLS CSR *WebhooksV2Api* | [**get_notification**](docs/WebhooksV2Api.md#get_notification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id @@ -683,15 +685,15 @@ Class | Method | HTTP request | Description *WebhooksV2Api* | [**get_resend_by_query_job_status**](docs/WebhooksV2Api.md#get_resend_by_query_job_status) | **GET** /webhooks/{webhookId}/notifications/resend_by_query/jobs/{jobId} | Get resend by query job status *WebhooksV2Api* | [**get_resend_job_status**](docs/WebhooksV2Api.md#get_resend_job_status) | **GET** /webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId} | Get resend job status *WebhooksV2Api* | [**get_webhook**](docs/WebhooksV2Api.md#get_webhook) | **GET** /webhooks/{webhookId} | Get webhook by id -*WebhooksV2Api* | [**get_webhook_o_auth**](docs/WebhooksV2Api.md#get_webhook_o_auth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id -*WebhooksV2Api* | [**get_webhook_o_auths**](docs/WebhooksV2Api.md#get_webhook_o_auths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials +*WebhooksV2Api* | [**get_webhook_oauth**](docs/WebhooksV2Api.md#get_webhook_oauth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id +*WebhooksV2Api* | [**get_webhook_oauths**](docs/WebhooksV2Api.md#get_webhook_oauths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials *WebhooksV2Api* | [**get_webhooks**](docs/WebhooksV2Api.md#get_webhooks) | **GET** /webhooks | Get all webhooks *WebhooksV2Api* | [**resend_failed_notifications**](docs/WebhooksV2Api.md#resend_failed_notifications) | **POST** /webhooks/{webhookId}/notifications/resend_failed | Resend failed notifications *WebhooksV2Api* | [**resend_notification_by_id**](docs/WebhooksV2Api.md#resend_notification_by_id) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id *WebhooksV2Api* | [**resend_notifications_by_query**](docs/WebhooksV2Api.md#resend_notifications_by_query) | **POST** /webhooks/{webhookId}/notifications/resend_by_query | Resend notifications by query *WebhooksV2Api* | [**resend_notifications_by_resource_id**](docs/WebhooksV2Api.md#resend_notifications_by_resource_id) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id *WebhooksV2Api* | [**update_webhook**](docs/WebhooksV2Api.md#update_webhook) | **PATCH** /webhooks/{webhookId} | Update webhook -*WebhooksV2Api* | [**update_webhook_o_auth**](docs/WebhooksV2Api.md#update_webhook_o_auth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials +*WebhooksV2Api* | [**update_webhook_oauth**](docs/WebhooksV2Api.md#update_webhook_oauth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials *WorkspaceApi* | [**get_workspace**](docs/WorkspaceApi.md#get_workspace) | **GET** /workspace | Get workspace *WorkspaceStatusBetaApi* | [**get_workspace_status**](docs/WorkspaceStatusBetaApi.md#get_workspace_status) | **GET** /management/workspace_status | Returns current workspace status *WhitelistIpAddressesApi* | [**get_whitelist_ip_addresses**](docs/WhitelistIpAddressesApi.md#get_whitelist_ip_addresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Get whitelisted ip addresses for an API Key @@ -1029,7 +1031,7 @@ Class | Method | HTTP request | Description - [CreateVaultAccountRequest](docs/CreateVaultAccountRequest.md) - [CreateVaultAssetResponse](docs/CreateVaultAssetResponse.md) - [CreateWalletRequest](docs/CreateWalletRequest.md) - - [CreateWebhookOAuthRequest](docs/CreateWebhookOAuthRequest.md) + - [CreateWebhookOauthRequest](docs/CreateWebhookOauthRequest.md) - [CreateWebhookRequest](docs/CreateWebhookRequest.md) - [CreateWorkflowExecutionRequestParamsInner](docs/CreateWorkflowExecutionRequestParamsInner.md) - [CustomRoutingDest](docs/CustomRoutingDest.md) @@ -1043,7 +1045,7 @@ Class | Method | HTTP request | Description - [DelegationSummary](docs/DelegationSummary.md) - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) - - [DeleteWebhookOAuthResponse](docs/DeleteWebhookOAuthResponse.md) + - [DeleteWebhookOauthResponse](docs/DeleteWebhookOauthResponse.md) - [DeployLayerZeroAdaptersRequest](docs/DeployLayerZeroAdaptersRequest.md) - [DeployableAddressResponse](docs/DeployableAddressResponse.md) - [DeployedContractNotFoundError](docs/DeployedContractNotFoundError.md) @@ -1887,6 +1889,8 @@ Class | Method | HTTP request | Description - [UpdateBlockchainResponse](docs/UpdateBlockchainResponse.md) - [UpdateCallbackHandlerRequest](docs/UpdateCallbackHandlerRequest.md) - [UpdateCallbackHandlerResponse](docs/UpdateCallbackHandlerResponse.md) + - [UpdateConnectedAccountCredentialsRequest](docs/UpdateConnectedAccountCredentialsRequest.md) + - [UpdateConnectedAccountCredentialsResponse](docs/UpdateConnectedAccountCredentialsResponse.md) - [UpdateCounterpartyGroupRequest](docs/UpdateCounterpartyGroupRequest.md) - [UpdateDraftRequest](docs/UpdateDraftRequest.md) - [UpdateFindingExternalRequest](docs/UpdateFindingExternalRequest.md) @@ -1895,7 +1899,7 @@ Class | Method | HTTP request | Description - [UpdateTokenOwnershipStatusDto](docs/UpdateTokenOwnershipStatusDto.md) - [UpdateVaultAccountAssetAddressRequest](docs/UpdateVaultAccountAssetAddressRequest.md) - [UpdateVaultAccountRequest](docs/UpdateVaultAccountRequest.md) - - [UpdateWebhookOAuthRequest](docs/UpdateWebhookOAuthRequest.md) + - [UpdateWebhookOauthRequest](docs/UpdateWebhookOauthRequest.md) - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) - [UsWirePaymentInfo](docs/UsWirePaymentInfo.md) - [UsdcGatewayWalletAsset](docs/UsdcGatewayWalletAsset.md) @@ -1941,9 +1945,7 @@ Class | Method | HTTP request | Description - [WebhookMetric](docs/WebhookMetric.md) - [WebhookMtls](docs/WebhookMtls.md) - [WebhookMtlsCsrResponse](docs/WebhookMtlsCsrResponse.md) - - [WebhookOAuth](docs/WebhookOAuth.md) - - [WebhookOAuthCredentials](docs/WebhookOAuthCredentials.md) - - [WebhookOAuthResponse](docs/WebhookOAuthResponse.md) + - [WebhookOauthCredentials](docs/WebhookOauthCredentials.md) - [WebhookPaginatedResponse](docs/WebhookPaginatedResponse.md) - [WithdrawRequest](docs/WithdrawRequest.md) - [WorkflowConfigStatus](docs/WorkflowConfigStatus.md) diff --git a/docs/ApprovalsBetaApi.md b/docs/ApprovalsBetaApi.md index 3f1950fb..d3077df9 100644 --- a/docs/ApprovalsBetaApi.md +++ b/docs/ApprovalsBetaApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**get_approval_by_id**](ApprovalsBetaApi.md#get_approval_by_id) | **GET** /approvals/{requestId} | Get a single approval request [**get_approvals**](ApprovalsBetaApi.md#get_approvals) | **GET** /approvals | List approval requests +[**reject_approval**](ApprovalsBetaApi.md#reject_approval) | **POST** /approvals/{requestId}/reject | Reject an approval request # **get_approval_by_id** @@ -182,3 +183,77 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **reject_approval** +> reject_approval(request_id, idempotency_key=idempotency_key) + +Reject an approval request + +Reject a pending approval request as the authenticated API user. No signature is required (unlike approve). The caller must be eligible to act on the request; rejecting finalizes the request as rejected per the approval policy. + +Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. + +### Example + + +```python +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + request_id = '18055' # str | The approval request ID. + idempotency_key = 'idempotency_key_example' # str | 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) + + try: + # Reject an approval request + fireblocks.approvals_beta.reject_approval(request_id, idempotency_key=idempotency_key).result() + except Exception as e: + print("Exception when calling ApprovalsBetaApi->reject_approval: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_id** | **str**| The approval request ID. | + **idempotency_key** | **str**| 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 + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The approval request was rejected. | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ConnectedAccountsBetaApi.md b/docs/ConnectedAccountsBetaApi.md index b5c79b14..68765bc1 100644 --- a/docs/ConnectedAccountsBetaApi.md +++ b/docs/ConnectedAccountsBetaApi.md @@ -16,6 +16,7 @@ Method | HTTP request | Description [**get_connected_accounts_credentials_public_key**](ConnectedAccountsBetaApi.md#get_connected_accounts_credentials_public_key) | **GET** /connected_accounts/credentials/public_key | Get public key to encrypt connected account credentials [**rename_connected_account**](ConnectedAccountsBetaApi.md#rename_connected_account) | **POST** /connected_accounts/{accountId}/rename | Rename Connected Account [**sync_connected_account_allowlist**](ConnectedAccountsBetaApi.md#sync_connected_account_allowlist) | **POST** /connected_accounts/{accountId}/allowlist/sync | Sync allowlist for connected account +[**update_connected_account_credentials**](ConnectedAccountsBetaApi.md#update_connected_account_credentials) | **POST** /connected_accounts/{accountId}/credentials | Update connected account credentials # **add_connected_account** @@ -997,3 +998,103 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **update_connected_account_credentials** +> UpdateConnectedAccountCredentialsResponse update_connected_account_credentials(account_id, update_connected_account_credentials_request, idempotency_key=idempotency_key) + +Update connected account credentials + +Replace the API credentials (secret + API key) of a connected account. + +Credentials belong to an API key, which can back a single account or an entire hierarchy. +Updating them affects all accounts sharing that key, so the endpoint returns an array of modified accounts. + +The `creds` field must be a Base64-encoded RSA-encrypted credential blob; use +`GET /connected_accounts/credentials/public_key` to retrieve the public key for encryption. +Both `creds` and `apiKey` are mandatory. + +Validation against the exchange is synchronous, but the update itself is **pending mobile +approval** — the existing credentials stay live until the change is approved, so none of the +affected accounts are disconnected in the meantime. + +Endpoint Permission: Admin, Non-Signing Admin. + +**Note:** This endpoint is currently in beta and might be subject to changes. + + +### Example + + +```python +from fireblocks.models.update_connected_account_credentials_request import UpdateConnectedAccountCredentialsRequest +from fireblocks.models.update_connected_account_credentials_response import UpdateConnectedAccountCredentialsResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + account_id = '2c96e3aa-07ca-4524-a026-75579d25e24a' # str | The unique identifier of the connected account whose API key credentials are being replaced. + update_connected_account_credentials_request = fireblocks.UpdateConnectedAccountCredentialsRequest() # UpdateConnectedAccountCredentialsRequest | + idempotency_key = 'idempotency_key_example' # str | 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) + + try: + # Update connected account credentials + api_response = fireblocks.connected_accounts_beta.update_connected_account_credentials(account_id, update_connected_account_credentials_request, idempotency_key=idempotency_key).result() + print("The response of ConnectedAccountsBetaApi->update_connected_account_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectedAccountsBetaApi->update_connected_account_credentials: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **str**| The unique identifier of the connected account whose API key credentials are being replaced. | + **update_connected_account_credentials_request** | [**UpdateConnectedAccountCredentialsRequest**](UpdateConnectedAccountCredentialsRequest.md)| | + **idempotency_key** | **str**| 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 + +[**UpdateConnectedAccountCredentialsResponse**](UpdateConnectedAccountCredentialsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Credential update initiated (pending approval). | * X-Request-ID -
| +**400** | Bad request — credentials cannot be updated on a sub-account, or missing creds / apiKey. | - | +**403** | Insufficient permissions, or feature not enabled for this tenant. | - | +**404** | Connected account not found. | - | +**409** | Account is not in an updatable state, or the credentials belong to a different account. | - | +**422** | The provided credentials were rejected by the exchange. | - | +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CreateWebhookOAuthRequest.md b/docs/CreateWebhookOauthRequest.md similarity index 75% rename from docs/CreateWebhookOAuthRequest.md rename to docs/CreateWebhookOauthRequest.md index bfacaf29..acb4eee0 100644 --- a/docs/CreateWebhookOAuthRequest.md +++ b/docs/CreateWebhookOauthRequest.md @@ -1,4 +1,4 @@ -# CreateWebhookOAuthRequest +# CreateWebhookOauthRequest A new reusable OAuth 2.0 client credential set. Attach it to a webhook by passing the returned id as that webhook's `webhookOauthId`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. @@ -11,27 +11,27 @@ Name | Type | Description | Notes **client_secret** | **str** | OAuth client secret. Write-only — never returned. Limited to 480 bytes UTF-8 encoded. With `client_secret_jwt` it signs the assertion rather than being sent. | **url** | **str** | Token endpoint URL. HTTPS on port 443 only, and the host must resolve publicly — localhost and private, link-local or loopback addresses are rejected. | **auth_method** | **str** | How the client credentials reach the token endpoint. `client_secret_basic` uses an HTTP Basic header, `client_secret_post` uses form fields in the body, and `client_secret_jwt` sends a JWT assertion signed with the secret, so the secret itself is never transmitted. Defaults to `client_secret_basic`. | [optional] [default to 'client_secret_basic'] -**custom_jwt_claims** | **Dict[str, object]** | Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOAuthCustomJwtClaimsUpdate`. | [optional] -**custom_body_params** | **Dict[str, str]** | Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`. | [optional] -**custom_headers** | **Dict[str, str]** | Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Authorization`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. The whole object must be under 16 KB. Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOAuthCustomHeadersUpdate`. | [optional] +**custom_jwt_claims** | **Dict[str, object]** | Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOauthCustomJwtClaimsUpdate`. | [optional] +**custom_body_params** | **Dict[str, str]** | Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOauthCustomBodyParamsUpdate`. | [optional] +**custom_headers** | **Dict[str, str]** | Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. `Authorization` is not sent when `authMethod` is `client_secret_basic`. Values have no length limit of their own; the whole object must be under 16 KB when serialized as UTF-8. Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOauthCustomHeadersUpdate`. | [optional] **mtls_client_signed_cert** | **str** | PEM-encoded client certificate for mTLS when fetching tokens. Must be a valid X.509 certificate inside its validity window. | [optional] ## Example ```python -from fireblocks.models.create_webhook_o_auth_request import CreateWebhookOAuthRequest +from fireblocks.models.create_webhook_oauth_request import CreateWebhookOauthRequest # TODO update the JSON string below json = "{}" -# create an instance of CreateWebhookOAuthRequest from a JSON string -create_webhook_o_auth_request_instance = CreateWebhookOAuthRequest.from_json(json) +# create an instance of CreateWebhookOauthRequest from a JSON string +create_webhook_oauth_request_instance = CreateWebhookOauthRequest.from_json(json) # print the JSON string representation of the object -print(CreateWebhookOAuthRequest.to_json()) +print(CreateWebhookOauthRequest.to_json()) # convert the object into a dict -create_webhook_o_auth_request_dict = create_webhook_o_auth_request_instance.to_dict() -# create an instance of CreateWebhookOAuthRequest from a dict -create_webhook_o_auth_request_from_dict = CreateWebhookOAuthRequest.from_dict(create_webhook_o_auth_request_dict) +create_webhook_oauth_request_dict = create_webhook_oauth_request_instance.to_dict() +# create an instance of CreateWebhookOauthRequest from a dict +create_webhook_oauth_request_from_dict = CreateWebhookOauthRequest.from_dict(create_webhook_oauth_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateWebhookRequest.md b/docs/CreateWebhookRequest.md index d282ca72..6cd390eb 100644 --- a/docs/CreateWebhookRequest.md +++ b/docs/CreateWebhookRequest.md @@ -10,8 +10,8 @@ Name | Type | Description | Notes **events** | [**List[WebhookEvent]**](WebhookEvent.md) | event types the webhook will subscribe to | **enabled** | **bool** | The status of the webhook. If false, the webhook will not receive notifications. | [optional] [default to True] **mtls** | [**WebhookMtls**](WebhookMtls.md) | | [optional] -**oauth** | [**WebhookOAuth**](WebhookOAuth.md) | | [optional] -**custom_headers** | **Dict[str, object]** | Custom HTTP headers attached to every notification delivered by this webhook. A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. Values are at most 1024 characters and may be empty. Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`, `Authorization`. `Authorization` is reserved whether or not this webhook has OAuth credentials attached, because Fireblocks sets it once it does. Values are write-only; responses return only the header names. | [optional] +**webhook_oauth_id** | **str** | The id of the OAuth credentials this webhook authenticates with, from `/v1/webhooks_settings/oauth`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. Send `null` to stop using OAuth for this webhook. | [optional] +**custom_headers** | **Dict[str, object]** | Custom HTTP headers attached to every notification delivered by this webhook. A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. A value may be empty and has no length limit of its own; the whole object must be under 16 KB when serialized as UTF-8. A value that large may still be refused by your own endpoint, since web servers commonly cap the whole request header block at around 8 KB. Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`. When this webhook has OAuth credentials attached, an `Authorization` value you set and the bearer token are both sent as separate header lines. Values are write-only; responses return only the header names. | [optional] ## Example diff --git a/docs/DeleteWebhookOAuthResponse.md b/docs/DeleteWebhookOauthResponse.md similarity index 82% rename from docs/DeleteWebhookOAuthResponse.md rename to docs/DeleteWebhookOauthResponse.md index bf28f10c..094e6daa 100644 --- a/docs/DeleteWebhookOAuthResponse.md +++ b/docs/DeleteWebhookOauthResponse.md @@ -1,4 +1,4 @@ -# DeleteWebhookOAuthResponse +# DeleteWebhookOauthResponse The deleted OAuth credential set, plus the ids of any webhooks the delete detached from it. Webhooks are only detached by `forceDelete=true`; without it a delete is refused with `409` while anything still references the credentials. @@ -22,19 +22,19 @@ Name | Type | Description | Notes ## Example ```python -from fireblocks.models.delete_webhook_o_auth_response import DeleteWebhookOAuthResponse +from fireblocks.models.delete_webhook_oauth_response import DeleteWebhookOauthResponse # TODO update the JSON string below json = "{}" -# create an instance of DeleteWebhookOAuthResponse from a JSON string -delete_webhook_o_auth_response_instance = DeleteWebhookOAuthResponse.from_json(json) +# create an instance of DeleteWebhookOauthResponse from a JSON string +delete_webhook_oauth_response_instance = DeleteWebhookOauthResponse.from_json(json) # print the JSON string representation of the object -print(DeleteWebhookOAuthResponse.to_json()) +print(DeleteWebhookOauthResponse.to_json()) # convert the object into a dict -delete_webhook_o_auth_response_dict = delete_webhook_o_auth_response_instance.to_dict() -# create an instance of DeleteWebhookOAuthResponse from a dict -delete_webhook_o_auth_response_from_dict = DeleteWebhookOAuthResponse.from_dict(delete_webhook_o_auth_response_dict) +delete_webhook_oauth_response_dict = delete_webhook_oauth_response_instance.to_dict() +# create an instance of DeleteWebhookOauthResponse from a dict +delete_webhook_oauth_response_from_dict = DeleteWebhookOauthResponse.from_dict(delete_webhook_oauth_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FiatAccountType.md b/docs/FiatAccountType.md index c29dfcba..c884fb11 100644 --- a/docs/FiatAccountType.md +++ b/docs/FiatAccountType.md @@ -1,10 +1,57 @@ # FiatAccountType +OTHER indicates the underlying provider isn't representable by this API version's enum (e.g. a newly onboarded provider, or one removed from this list) — it does not identify a specific provider, so it should not be used to key any client-side logic. ## Enum * `BLINC` (value: `'BLINC'`) +* `BLINC_TEST` (value: `'BLINC_TEST'`) + +* `CROSSRIVER` (value: `'CROSSRIVER'`) + +* `CROSSRIVER_TEST` (value: `'CROSSRIVER_TEST'`) + +* `CUSTOMERSBANK` (value: `'CUSTOMERSBANK'`) + +* `CUSTOMERSBANK_TEST` (value: `'CUSTOMERSBANK_TEST'`) + +* `FIFTHTHIRD` (value: `'FIFTHTHIRD'`) + +* `FIFTHTHIRD_TEST` (value: `'FIFTHTHIRD_TEST'`) + +* `KINGDOM_BANK` (value: `'KINGDOM_BANK'`) + +* `KINGDOM_BANK_TESTNET` (value: `'KINGDOM_BANK_TESTNET'`) + +* `LYNQ` (value: `'LYNQ'`) + +* `LYNQ_DEV` (value: `'LYNQ_DEV'`) + +* `LYNQ_QA` (value: `'LYNQ_QA'`) + +* `LYNQ_UAT` (value: `'LYNQ_UAT'`) + +* `N3XT` (value: `'N3XT'`) + +* `N3_XT_ALPHA` (value: `'N3XT_ALPHA'`) + +* `N3_XT_BETA` (value: `'N3XT_BETA'`) + +* `N3_XT_OMEGA` (value: `'N3XT_OMEGA'`) + +* `SYGNUM_CONNECT` (value: `'SYGNUM_CONNECT'`) + +* `SYGNUM_CONNECT_STAGING` (value: `'SYGNUM_CONNECT_STAGING'`) + +* `TRANSFERO` (value: `'TRANSFERO'`) + +* `TRANSFERO_STAGING` (value: `'TRANSFERO_STAGING'`) + +* `ZENUS_DEV` (value: `'ZENUS_DEV'`) + +* `OTHER` (value: `'OTHER'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateConnectedAccountCredentialsRequest.md b/docs/UpdateConnectedAccountCredentialsRequest.md new file mode 100644 index 00000000..57e5bd2d --- /dev/null +++ b/docs/UpdateConnectedAccountCredentialsRequest.md @@ -0,0 +1,30 @@ +# UpdateConnectedAccountCredentialsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creds** | **bytearray** | Base64-encoded RSA-encrypted credential blob (the new secret). Encrypt using the public key from GET /connected_accounts/credentials/public_key. | +**api_key** | **str** | The new account-level API key. Mandatory for credential update. | + +## Example + +```python +from fireblocks.models.update_connected_account_credentials_request import UpdateConnectedAccountCredentialsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateConnectedAccountCredentialsRequest from a JSON string +update_connected_account_credentials_request_instance = UpdateConnectedAccountCredentialsRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateConnectedAccountCredentialsRequest.to_json()) + +# convert the object into a dict +update_connected_account_credentials_request_dict = update_connected_account_credentials_request_instance.to_dict() +# create an instance of UpdateConnectedAccountCredentialsRequest from a dict +update_connected_account_credentials_request_from_dict = UpdateConnectedAccountCredentialsRequest.from_dict(update_connected_account_credentials_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateConnectedAccountCredentialsResponse.md b/docs/UpdateConnectedAccountCredentialsResponse.md new file mode 100644 index 00000000..8e3660a9 --- /dev/null +++ b/docs/UpdateConnectedAccountCredentialsResponse.md @@ -0,0 +1,29 @@ +# UpdateConnectedAccountCredentialsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accounts** | [**List[AddedConnectedAccountItem]**](AddedConnectedAccountItem.md) | The account whose credentials are pending update (status WAITING_FOR_APPROVAL). Old credentials stay live until the change is approved. | + +## Example + +```python +from fireblocks.models.update_connected_account_credentials_response import UpdateConnectedAccountCredentialsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateConnectedAccountCredentialsResponse from a JSON string +update_connected_account_credentials_response_instance = UpdateConnectedAccountCredentialsResponse.from_json(json) +# print the JSON string representation of the object +print(UpdateConnectedAccountCredentialsResponse.to_json()) + +# convert the object into a dict +update_connected_account_credentials_response_dict = update_connected_account_credentials_response_instance.to_dict() +# create an instance of UpdateConnectedAccountCredentialsResponse from a dict +update_connected_account_credentials_response_from_dict = UpdateConnectedAccountCredentialsResponse.from_dict(update_connected_account_credentials_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateWebhookOAuthRequest.md b/docs/UpdateWebhookOauthRequest.md similarity index 86% rename from docs/UpdateWebhookOAuthRequest.md rename to docs/UpdateWebhookOauthRequest.md index 4b6b4985..12f3c065 100644 --- a/docs/UpdateWebhookOAuthRequest.md +++ b/docs/UpdateWebhookOauthRequest.md @@ -1,4 +1,4 @@ -# UpdateWebhookOAuthRequest +# UpdateWebhookOauthRequest A partial update. Every field is optional and an omitted field is left as it is, so `{ \"clientSecret\": \"new-secret\" }` rotates the secret and changes nothing else. A rotation applies to every webhook referencing these credentials. The three custom maps merge: a key with a value is upserted, a key with `null` is deleted, a key you leave out is untouched. Because `null` inside a map means delete, none of the three is nullable as a whole — `customJwtClaims: null` and friends are rejected with a `400`. Clear a map by naming each key with a `null` value. `mtlsClientSignedCert` is a scalar, so `null` there does remove it. @@ -13,25 +13,25 @@ Name | Type | Description | Notes **auth_method** | **str** | `client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Omit to leave it unchanged — it does not revert to the default. | [optional] **custom_jwt_claims** | **Dict[str, object]** | A delta applied to the JWT assertion claims. A claim with a value is added or replaced, a claim with `null` is deleted, and a claim you leave out is untouched. So `{ \"aud\": \"https://auth.example.com\", \"resource\": null }` sets `aud`, drops `resource`, and changes nothing else. Send `customJwtClaims: null` to clear every claim in one call. That does not collide with a `null` value on a name: one names the claim to delete, the other names the whole field. Same rules as on create: any JSON type except `null`, `iss`/`sub`/`jti`/`iat`/`exp` reserved, names case-sensitive, resulting set under 16 KB, values write-only. | [optional] **custom_body_params** | **Dict[str, Optional[str]]** | A delta applied to the token request body parameters. A parameter with a value is added or replaced, a parameter with `null` is deleted, and one you leave out is untouched. So `{ \"scope\": \"payments.read\", \"audience\": null }` sets `scope`, drops `audience`, and changes nothing else. Send `customBodyParams: null` to clear every parameter in one call. That does not collide with a `null` value on a name: one names the parameter to delete, the other names the whole field. Same rules as on create: string values only, `grant_type`/`client_id`/`client_secret`/ `client_assertion`/`client_assertion_type` reserved, names case-sensitive, resulting set under 16 KB, values write-only. | [optional] -**custom_headers** | **Dict[str, Optional[str]]** | A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ \"X-Api-Key\": \"new-key\", \"X-Tenant\": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. Same rules as on create: string values only, `Content-Type`/`Authorization`/ `Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. | [optional] +**custom_headers** | **Dict[str, Optional[str]]** | A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ \"X-Api-Key\": \"new-key\", \"X-Tenant\": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. Same rules as on create: string values only, `Content-Type`/`Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only. | [optional] **mtls_client_signed_cert** | **str** | PEM-encoded client certificate for mTLS. Must be a valid X.509 certificate inside its validity window. Omit to leave it unchanged, or send `null` to remove it. | [optional] ## Example ```python -from fireblocks.models.update_webhook_o_auth_request import UpdateWebhookOAuthRequest +from fireblocks.models.update_webhook_oauth_request import UpdateWebhookOauthRequest # TODO update the JSON string below json = "{}" -# create an instance of UpdateWebhookOAuthRequest from a JSON string -update_webhook_o_auth_request_instance = UpdateWebhookOAuthRequest.from_json(json) +# create an instance of UpdateWebhookOauthRequest from a JSON string +update_webhook_oauth_request_instance = UpdateWebhookOauthRequest.from_json(json) # print the JSON string representation of the object -print(UpdateWebhookOAuthRequest.to_json()) +print(UpdateWebhookOauthRequest.to_json()) # convert the object into a dict -update_webhook_o_auth_request_dict = update_webhook_o_auth_request_instance.to_dict() -# create an instance of UpdateWebhookOAuthRequest from a dict -update_webhook_o_auth_request_from_dict = UpdateWebhookOAuthRequest.from_dict(update_webhook_o_auth_request_dict) +update_webhook_oauth_request_dict = update_webhook_oauth_request_instance.to_dict() +# create an instance of UpdateWebhookOauthRequest from a dict +update_webhook_oauth_request_from_dict = UpdateWebhookOauthRequest.from_dict(update_webhook_oauth_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateWebhookRequest.md b/docs/UpdateWebhookRequest.md index bffbf3ea..3477f4f6 100644 --- a/docs/UpdateWebhookRequest.md +++ b/docs/UpdateWebhookRequest.md @@ -10,8 +10,8 @@ Name | Type | Description | Notes **events** | [**List[WebhookEvent]**](WebhookEvent.md) | The events that the webhook will be subscribed to | [optional] **enabled** | **bool** | The status of the webhook | [optional] **mtls** | [**WebhookMtls**](WebhookMtls.md) | | [optional] -**oauth** | [**WebhookOAuth**](WebhookOAuth.md) | | [optional] -**custom_headers** | **Dict[str, object]** | A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another. Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. | [optional] +**webhook_oauth_id** | **str** | The id of the OAuth credentials this webhook authenticates with, from `/v1/webhooks_settings/oauth`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. Send `null` to stop using OAuth for this webhook. | [optional] +**custom_headers** | **Dict[str, object]** | A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another. Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total and under 16 KB in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit. | [optional] ## Example diff --git a/docs/Webhook.md b/docs/Webhook.md index d501b55d..f3b594b5 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **created_at** | **int** | The date and time the webhook was created in milliseconds | **updated_at** | **int** | The date and time the webhook was last updated in milliseconds | **mtls** | [**WebhookMtls**](WebhookMtls.md) | | [optional] -**oauth** | [**WebhookOAuthResponse**](WebhookOAuthResponse.md) | | [optional] +**webhook_oauth_id** | **str** | The id of the OAuth credentials this webhook authenticates with. Absent when the webhook does not use OAuth. Read the credentials themselves from `/v1/webhooks_settings/oauth/{webhookOauthId}`. | [optional] **custom_headers** | **List[str]** | Names of the custom headers configured for this webhook. Header values are never returned. | [optional] ## Example diff --git a/docs/WebhookEvent.md b/docs/WebhookEvent.md index 91c888b7..9a317f80 100644 --- a/docs/WebhookEvent.md +++ b/docs/WebhookEvent.md @@ -69,6 +69,10 @@ * `CONNECTED_ACCOUNT_DOT_CONNECTED` (value: `'connected_account.connected'`) +* `EXCHANGE_ACCOUNT_DOT_CREDENTIALS_REPLACED` (value: `'exchange_account.credentials_replaced'`) + +* `CONNECTED_ACCOUNT_DOT_CREDENTIALS_REPLACED` (value: `'connected_account.credentials_replaced'`) + * `TICKET_DOT_CREATED` (value: `'ticket.created'`) * `TICKET_DOT_SUBMITTED` (value: `'ticket.submitted'`) diff --git a/docs/WebhookOAuth.md b/docs/WebhookOAuth.md deleted file mode 100644 index 58302338..00000000 --- a/docs/WebhookOAuth.md +++ /dev/null @@ -1,33 +0,0 @@ -# WebhookOAuth - -OAuth 2.0 client credentials configuration for the webhook. When set, the webhook dispatcher fetches a bearer token from the configured token endpoint before each delivery and attaches it as `Authorization: Bearer {token}`. Send `null` to remove OAuth configuration entirely. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_id** | **str** | OAuth client ID used to authenticate with the token endpoint. | -**client_secret** | **str** | OAuth client secret. Write-only — never returned in responses. | -**url** | **str** | Token endpoint URL. Must be HTTPS. | -**mtls_client_signed_cert** | **str** | Signed client certificate PEM used for mTLS when connecting to the token endpoint. Same format as the webhook mTLS certificate. Send `null` to remove. | [optional] - -## Example - -```python -from fireblocks.models.webhook_o_auth import WebhookOAuth - -# TODO update the JSON string below -json = "{}" -# create an instance of WebhookOAuth from a JSON string -webhook_o_auth_instance = WebhookOAuth.from_json(json) -# print the JSON string representation of the object -print(WebhookOAuth.to_json()) - -# convert the object into a dict -webhook_o_auth_dict = webhook_o_auth_instance.to_dict() -# create an instance of WebhookOAuth from a dict -webhook_o_auth_from_dict = WebhookOAuth.from_dict(webhook_o_auth_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/WebhookOAuthResponse.md b/docs/WebhookOAuthResponse.md deleted file mode 100644 index 6548a9ec..00000000 --- a/docs/WebhookOAuthResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# WebhookOAuthResponse - -OAuth 2.0 client credentials configuration for the webhook. Present only when OAuth is configured. The `clientSecret` is write-only and is never returned. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_id** | **str** | OAuth client ID used to authenticate with the token endpoint. | -**url** | **str** | Token endpoint URL. | -**mtls_client_signed_cert** | **str** | Signed client certificate PEM used for mTLS when connecting to the token endpoint. | [optional] - -## Example - -```python -from fireblocks.models.webhook_o_auth_response import WebhookOAuthResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of WebhookOAuthResponse from a JSON string -webhook_o_auth_response_instance = WebhookOAuthResponse.from_json(json) -# print the JSON string representation of the object -print(WebhookOAuthResponse.to_json()) - -# convert the object into a dict -webhook_o_auth_response_dict = webhook_o_auth_response_instance.to_dict() -# create an instance of WebhookOAuthResponse from a dict -webhook_o_auth_response_from_dict = WebhookOAuthResponse.from_dict(webhook_o_auth_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/WebhookOAuthCredentials.md b/docs/WebhookOauthCredentials.md similarity index 83% rename from docs/WebhookOAuthCredentials.md rename to docs/WebhookOauthCredentials.md index 8f41c66c..ed080254 100644 --- a/docs/WebhookOAuthCredentials.md +++ b/docs/WebhookOauthCredentials.md @@ -1,4 +1,4 @@ -# WebhookOAuthCredentials +# WebhookOauthCredentials A stored OAuth 2.0 client credential set, referenced by webhooks through their `webhookOauthId`. When a webhook references one, the dispatcher fetches a bearer token from `url` before each delivery and attaches it as `Authorization: Bearer {token}`. Secret material is never returned: `clientSecret` is absent from this schema entirely, and the `customJwtClaims`, `customBodyParams` and `customHeaders` fields are reduced to their names, without the configured values. @@ -21,19 +21,19 @@ Name | Type | Description | Notes ## Example ```python -from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +from fireblocks.models.webhook_oauth_credentials import WebhookOauthCredentials # TODO update the JSON string below json = "{}" -# create an instance of WebhookOAuthCredentials from a JSON string -webhook_o_auth_credentials_instance = WebhookOAuthCredentials.from_json(json) +# create an instance of WebhookOauthCredentials from a JSON string +webhook_oauth_credentials_instance = WebhookOauthCredentials.from_json(json) # print the JSON string representation of the object -print(WebhookOAuthCredentials.to_json()) +print(WebhookOauthCredentials.to_json()) # convert the object into a dict -webhook_o_auth_credentials_dict = webhook_o_auth_credentials_instance.to_dict() -# create an instance of WebhookOAuthCredentials from a dict -webhook_o_auth_credentials_from_dict = WebhookOAuthCredentials.from_dict(webhook_o_auth_credentials_dict) +webhook_oauth_credentials_dict = webhook_oauth_credentials_instance.to_dict() +# create an instance of WebhookOauthCredentials from a dict +webhook_oauth_credentials_from_dict = WebhookOauthCredentials.from_dict(webhook_oauth_credentials_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhooksV2Api.md b/docs/WebhooksV2Api.md index d385d60e..0adeacc0 100644 --- a/docs/WebhooksV2Api.md +++ b/docs/WebhooksV2Api.md @@ -5,9 +5,9 @@ All URIs are relative to *https://api.fireblocks.io/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_webhook**](WebhooksV2Api.md#create_webhook) | **POST** /webhooks | Create a new webhook -[**create_webhook_o_auth**](WebhooksV2Api.md#create_webhook_o_auth) | **POST** /webhooks_settings/oauth | Create OAuth credentials +[**create_webhook_oauth**](WebhooksV2Api.md#create_webhook_oauth) | **POST** /webhooks_settings/oauth | Create OAuth credentials [**delete_webhook**](WebhooksV2Api.md#delete_webhook) | **DELETE** /webhooks/{webhookId} | Delete webhook -[**delete_webhook_o_auth**](WebhooksV2Api.md#delete_webhook_o_auth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials +[**delete_webhook_oauth**](WebhooksV2Api.md#delete_webhook_oauth) | **DELETE** /webhooks_settings/oauth/{webhookOauthId} | Delete OAuth credentials [**get_metrics**](WebhooksV2Api.md#get_metrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics [**get_mtls_csr**](WebhooksV2Api.md#get_mtls_csr) | **GET** /webhooks/mtls/csr | Get mTLS CSR [**get_notification**](WebhooksV2Api.md#get_notification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id @@ -16,15 +16,15 @@ Method | HTTP request | Description [**get_resend_by_query_job_status**](WebhooksV2Api.md#get_resend_by_query_job_status) | **GET** /webhooks/{webhookId}/notifications/resend_by_query/jobs/{jobId} | Get resend by query job status [**get_resend_job_status**](WebhooksV2Api.md#get_resend_job_status) | **GET** /webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId} | Get resend job status [**get_webhook**](WebhooksV2Api.md#get_webhook) | **GET** /webhooks/{webhookId} | Get webhook by id -[**get_webhook_o_auth**](WebhooksV2Api.md#get_webhook_o_auth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id -[**get_webhook_o_auths**](WebhooksV2Api.md#get_webhook_o_auths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials +[**get_webhook_oauth**](WebhooksV2Api.md#get_webhook_oauth) | **GET** /webhooks_settings/oauth/{webhookOauthId} | Get OAuth credentials by id +[**get_webhook_oauths**](WebhooksV2Api.md#get_webhook_oauths) | **GET** /webhooks_settings/oauth | Get all OAuth credentials [**get_webhooks**](WebhooksV2Api.md#get_webhooks) | **GET** /webhooks | Get all webhooks [**resend_failed_notifications**](WebhooksV2Api.md#resend_failed_notifications) | **POST** /webhooks/{webhookId}/notifications/resend_failed | Resend failed notifications [**resend_notification_by_id**](WebhooksV2Api.md#resend_notification_by_id) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id [**resend_notifications_by_query**](WebhooksV2Api.md#resend_notifications_by_query) | **POST** /webhooks/{webhookId}/notifications/resend_by_query | Resend notifications by query [**resend_notifications_by_resource_id**](WebhooksV2Api.md#resend_notifications_by_resource_id) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id [**update_webhook**](WebhooksV2Api.md#update_webhook) | **PATCH** /webhooks/{webhookId} | Update webhook -[**update_webhook_o_auth**](WebhooksV2Api.md#update_webhook_o_auth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials +[**update_webhook_oauth**](WebhooksV2Api.md#update_webhook_oauth) | **PATCH** /webhooks_settings/oauth/{webhookOauthId} | Update OAuth credentials # **create_webhook** @@ -107,8 +107,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **create_webhook_o_auth** -> WebhookOAuthCredentials create_webhook_o_auth(create_webhook_o_auth_request, idempotency_key=idempotency_key) +# **create_webhook_oauth** +> WebhookOauthCredentials create_webhook_oauth(create_webhook_oauth_request, idempotency_key=idempotency_key) Create OAuth credentials @@ -121,8 +121,8 @@ Creates a reusable OAuth client credential set. Attach it to a webhook by passin ```python -from fireblocks.models.create_webhook_o_auth_request import CreateWebhookOAuthRequest -from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +from fireblocks.models.create_webhook_oauth_request import CreateWebhookOauthRequest +from fireblocks.models.webhook_oauth_credentials import WebhookOauthCredentials from fireblocks.client import Fireblocks from fireblocks.client_configuration import ClientConfiguration from fireblocks.exceptions import ApiException @@ -143,16 +143,16 @@ configuration = ClientConfiguration( # Enter a context with an instance of the API client with Fireblocks(configuration) as fireblocks: - create_webhook_o_auth_request = fireblocks.CreateWebhookOAuthRequest() # CreateWebhookOAuthRequest | + create_webhook_oauth_request = fireblocks.CreateWebhookOauthRequest() # CreateWebhookOauthRequest | idempotency_key = 'idempotency_key_example' # str | 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) try: # Create OAuth credentials - api_response = fireblocks.webhooks_v2.create_webhook_o_auth(create_webhook_o_auth_request, idempotency_key=idempotency_key).result() - print("The response of WebhooksV2Api->create_webhook_o_auth:\n") + api_response = fireblocks.webhooks_v2.create_webhook_oauth(create_webhook_oauth_request, idempotency_key=idempotency_key).result() + print("The response of WebhooksV2Api->create_webhook_oauth:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebhooksV2Api->create_webhook_o_auth: %s\n" % e) + print("Exception when calling WebhooksV2Api->create_webhook_oauth: %s\n" % e) ``` @@ -162,12 +162,12 @@ with Fireblocks(configuration) as fireblocks: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_webhook_o_auth_request** | [**CreateWebhookOAuthRequest**](CreateWebhookOAuthRequest.md)| | + **create_webhook_oauth_request** | [**CreateWebhookOauthRequest**](CreateWebhookOauthRequest.md)| | **idempotency_key** | **str**| 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 -[**WebhookOAuthCredentials**](WebhookOAuthCredentials.md) +[**WebhookOauthCredentials**](WebhookOauthCredentials.md) ### Authorization @@ -264,8 +264,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **delete_webhook_o_auth** -> DeleteWebhookOAuthResponse delete_webhook_o_auth(webhook_oauth_id, force_delete=force_delete) +# **delete_webhook_oauth** +> DeleteWebhookOauthResponse delete_webhook_oauth(webhook_oauth_id, force_delete=force_delete) Delete OAuth credentials @@ -282,7 +282,7 @@ When nothing references the credentials the delete succeeds either way, and `det ```python -from fireblocks.models.delete_webhook_o_auth_response import DeleteWebhookOAuthResponse +from fireblocks.models.delete_webhook_oauth_response import DeleteWebhookOauthResponse from fireblocks.client import Fireblocks from fireblocks.client_configuration import ClientConfiguration from fireblocks.exceptions import ApiException @@ -308,11 +308,11 @@ with Fireblocks(configuration) as fireblocks: try: # Delete OAuth credentials - api_response = fireblocks.webhooks_v2.delete_webhook_o_auth(webhook_oauth_id, force_delete=force_delete).result() - print("The response of WebhooksV2Api->delete_webhook_o_auth:\n") + api_response = fireblocks.webhooks_v2.delete_webhook_oauth(webhook_oauth_id, force_delete=force_delete).result() + print("The response of WebhooksV2Api->delete_webhook_oauth:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebhooksV2Api->delete_webhook_o_auth: %s\n" % e) + print("Exception when calling WebhooksV2Api->delete_webhook_oauth: %s\n" % e) ``` @@ -327,7 +327,7 @@ Name | Type | Description | Notes ### Return type -[**DeleteWebhookOAuthResponse**](DeleteWebhookOAuthResponse.md) +[**DeleteWebhookOauthResponse**](DeleteWebhookOauthResponse.md) ### Authorization @@ -980,8 +980,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_webhook_o_auth** -> WebhookOAuthCredentials get_webhook_o_auth(webhook_oauth_id) +# **get_webhook_oauth** +> WebhookOauthCredentials get_webhook_oauth(webhook_oauth_id) Get OAuth credentials by id @@ -992,7 +992,7 @@ Retrieve an OAuth credential set by its id. The client secret is never returned. ```python -from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +from fireblocks.models.webhook_oauth_credentials import WebhookOauthCredentials from fireblocks.client import Fireblocks from fireblocks.client_configuration import ClientConfiguration from fireblocks.exceptions import ApiException @@ -1017,11 +1017,11 @@ with Fireblocks(configuration) as fireblocks: try: # Get OAuth credentials by id - api_response = fireblocks.webhooks_v2.get_webhook_o_auth(webhook_oauth_id).result() - print("The response of WebhooksV2Api->get_webhook_o_auth:\n") + api_response = fireblocks.webhooks_v2.get_webhook_oauth(webhook_oauth_id).result() + print("The response of WebhooksV2Api->get_webhook_oauth:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebhooksV2Api->get_webhook_o_auth: %s\n" % e) + print("Exception when calling WebhooksV2Api->get_webhook_oauth: %s\n" % e) ``` @@ -1035,7 +1035,7 @@ Name | Type | Description | Notes ### Return type -[**WebhookOAuthCredentials**](WebhookOAuthCredentials.md) +[**WebhookOauthCredentials**](WebhookOauthCredentials.md) ### Authorization @@ -1055,8 +1055,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_webhook_o_auths** -> List[WebhookOAuthCredentials] get_webhook_o_auths() +# **get_webhook_oauths** +> List[WebhookOauthCredentials] get_webhook_oauths() Get all OAuth credentials @@ -1067,7 +1067,7 @@ Lists every OAuth credential set for the workspace. Client secrets are never ret ```python -from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +from fireblocks.models.webhook_oauth_credentials import WebhookOauthCredentials from fireblocks.client import Fireblocks from fireblocks.client_configuration import ClientConfiguration from fireblocks.exceptions import ApiException @@ -1091,11 +1091,11 @@ with Fireblocks(configuration) as fireblocks: try: # Get all OAuth credentials - api_response = fireblocks.webhooks_v2.get_webhook_o_auths().result() - print("The response of WebhooksV2Api->get_webhook_o_auths:\n") + api_response = fireblocks.webhooks_v2.get_webhook_oauths().result() + print("The response of WebhooksV2Api->get_webhook_oauths:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebhooksV2Api->get_webhook_o_auths: %s\n" % e) + print("Exception when calling WebhooksV2Api->get_webhook_oauths: %s\n" % e) ``` @@ -1106,7 +1106,7 @@ This endpoint does not need any parameter. ### Return type -[**List[WebhookOAuthCredentials]**](WebhookOAuthCredentials.md) +[**List[WebhookOauthCredentials]**](WebhookOauthCredentials.md) ### Authorization @@ -1606,8 +1606,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **update_webhook_o_auth** -> WebhookOAuthCredentials update_webhook_o_auth(webhook_oauth_id, update_webhook_o_auth_request) +# **update_webhook_oauth** +> WebhookOauthCredentials update_webhook_oauth(webhook_oauth_id, update_webhook_oauth_request) Update OAuth credentials @@ -1622,8 +1622,8 @@ Updates only the fields present in the request; anything omitted is left as it i ```python -from fireblocks.models.update_webhook_o_auth_request import UpdateWebhookOAuthRequest -from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +from fireblocks.models.update_webhook_oauth_request import UpdateWebhookOauthRequest +from fireblocks.models.webhook_oauth_credentials import WebhookOauthCredentials from fireblocks.client import Fireblocks from fireblocks.client_configuration import ClientConfiguration from fireblocks.exceptions import ApiException @@ -1645,15 +1645,15 @@ configuration = ClientConfiguration( # Enter a context with an instance of the API client with Fireblocks(configuration) as fireblocks: webhook_oauth_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the OAuth credentials - update_webhook_o_auth_request = fireblocks.UpdateWebhookOAuthRequest() # UpdateWebhookOAuthRequest | + update_webhook_oauth_request = fireblocks.UpdateWebhookOauthRequest() # UpdateWebhookOauthRequest | try: # Update OAuth credentials - api_response = fireblocks.webhooks_v2.update_webhook_o_auth(webhook_oauth_id, update_webhook_o_auth_request).result() - print("The response of WebhooksV2Api->update_webhook_o_auth:\n") + api_response = fireblocks.webhooks_v2.update_webhook_oauth(webhook_oauth_id, update_webhook_oauth_request).result() + print("The response of WebhooksV2Api->update_webhook_oauth:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebhooksV2Api->update_webhook_o_auth: %s\n" % e) + print("Exception when calling WebhooksV2Api->update_webhook_oauth: %s\n" % e) ``` @@ -1664,11 +1664,11 @@ with Fireblocks(configuration) as fireblocks: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **webhook_oauth_id** | **str**| The unique identifier of the OAuth credentials | - **update_webhook_o_auth_request** | [**UpdateWebhookOAuthRequest**](UpdateWebhookOAuthRequest.md)| | + **update_webhook_oauth_request** | [**UpdateWebhookOauthRequest**](UpdateWebhookOauthRequest.md)| | ### Return type -[**WebhookOAuthCredentials**](WebhookOAuthCredentials.md) +[**WebhookOauthCredentials**](WebhookOauthCredentials.md) ### Authorization diff --git a/fireblocks/__init__.py b/fireblocks/__init__.py index f7c322cd..30b545b4 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -14,7 +14,7 @@ Do not edit the class manually. """ # noqa: E501 -__version__ = "30.0.0" +__version__ = "0.0.0" # import apis into sdk package from fireblocks.api.api_user_api import ApiUserApi @@ -585,7 +585,7 @@ from fireblocks.models.create_vault_account_request import CreateVaultAccountRequest from fireblocks.models.create_vault_asset_response import CreateVaultAssetResponse from fireblocks.models.create_wallet_request import CreateWalletRequest -from fireblocks.models.create_webhook_o_auth_request import CreateWebhookOAuthRequest +from fireblocks.models.create_webhook_oauth_request import CreateWebhookOauthRequest from fireblocks.models.create_webhook_request import CreateWebhookRequest from fireblocks.models.create_workflow_execution_request_params_inner import ( CreateWorkflowExecutionRequestParamsInner, @@ -605,7 +605,7 @@ DeleteNetworkConnectionResponse, ) from fireblocks.models.delete_network_id_response import DeleteNetworkIdResponse -from fireblocks.models.delete_webhook_o_auth_response import DeleteWebhookOAuthResponse +from fireblocks.models.delete_webhook_oauth_response import DeleteWebhookOauthResponse from fireblocks.models.deploy_layer_zero_adapters_request import ( DeployLayerZeroAdaptersRequest, ) @@ -1925,6 +1925,12 @@ from fireblocks.models.update_callback_handler_response import ( UpdateCallbackHandlerResponse, ) +from fireblocks.models.update_connected_account_credentials_request import ( + UpdateConnectedAccountCredentialsRequest, +) +from fireblocks.models.update_connected_account_credentials_response import ( + UpdateConnectedAccountCredentialsResponse, +) from fireblocks.models.update_counterparty_group_request import ( UpdateCounterpartyGroupRequest, ) @@ -1941,7 +1947,7 @@ UpdateVaultAccountAssetAddressRequest, ) from fireblocks.models.update_vault_account_request import UpdateVaultAccountRequest -from fireblocks.models.update_webhook_o_auth_request import UpdateWebhookOAuthRequest +from fireblocks.models.update_webhook_oauth_request import UpdateWebhookOauthRequest from fireblocks.models.update_webhook_request import UpdateWebhookRequest from fireblocks.models.us_wire_payment_info import UsWirePaymentInfo from fireblocks.models.usdc_gateway_wallet_asset import UsdcGatewayWalletAsset @@ -2005,9 +2011,7 @@ from fireblocks.models.webhook_metric import WebhookMetric from fireblocks.models.webhook_mtls import WebhookMtls from fireblocks.models.webhook_mtls_csr_response import WebhookMtlsCsrResponse -from fireblocks.models.webhook_o_auth import WebhookOAuth -from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials -from fireblocks.models.webhook_o_auth_response import WebhookOAuthResponse +from fireblocks.models.webhook_oauth_credentials import WebhookOauthCredentials from fireblocks.models.webhook_paginated_response import WebhookPaginatedResponse from fireblocks.models.withdraw_request import WithdrawRequest from fireblocks.models.workflow_config_status import WorkflowConfigStatus diff --git a/fireblocks/api/approvals_beta_api.py b/fireblocks/api/approvals_beta_api.py index 7d0bd9da..4f462974 100644 --- a/fireblocks/api/approvals_beta_api.py +++ b/fireblocks/api/approvals_beta_api.py @@ -363,3 +363,139 @@ def _get_approvals_serialize( ) + + + @validate_call + def reject_approval( + self, + request_id: Annotated[StrictStr, Field(description="The approval request ID.")], + idempotency_key: Annotated[Optional[StrictStr], Field(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.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[None]]: + """Reject an approval request + + Reject a pending approval request as the authenticated API user. No signature is required (unlike approve). The caller must be eligible to act on the request; rejecting finalizes the request as rejected per the approval policy. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. + + :param request_id: The approval request ID. (required) + :type request_id: str + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="reject_approval", param_name="request_id", param_value=request_id) + + _param = self._reject_approval_serialize( + request_id=request_id, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _reject_approval_serialize( + self, + request_id, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if request_id is not None: + _path_params['requestId'] = request_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/approvals/{requestId}/reject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/fireblocks/api/connected_accounts_beta_api.py b/fireblocks/api/connected_accounts_beta_api.py index 932ea7dc..bdb30938 100644 --- a/fireblocks/api/connected_accounts_beta_api.py +++ b/fireblocks/api/connected_accounts_beta_api.py @@ -34,6 +34,8 @@ from fireblocks.models.get_connected_accounts_credentials_public_key_response import GetConnectedAccountsCredentialsPublicKeyResponse from fireblocks.models.rename_connected_account_request import RenameConnectedAccountRequest from fireblocks.models.rename_connected_account_response import RenameConnectedAccountResponse +from fireblocks.models.update_connected_account_credentials_request import UpdateConnectedAccountCredentialsRequest +from fireblocks.models.update_connected_account_credentials_response import UpdateConnectedAccountCredentialsResponse from fireblocks.api_client import ApiClient, RequestSerialized from fireblocks.api_response import ApiResponse @@ -1803,3 +1805,164 @@ def _sync_connected_account_allowlist_serialize( ) + + + @validate_call + def update_connected_account_credentials( + self, + account_id: Annotated[str, Field(min_length=1, strict=True, description="The unique identifier of the connected account whose API key credentials are being replaced.")], + update_connected_account_credentials_request: UpdateConnectedAccountCredentialsRequest, + idempotency_key: Annotated[Optional[StrictStr], Field(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.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[UpdateConnectedAccountCredentialsResponse]]: + """Update connected account credentials + + Replace the API credentials (secret + API key) of a connected account. Credentials belong to an API key, which can back a single account or an entire hierarchy. Updating them affects all accounts sharing that key, so the endpoint returns an array of modified accounts. The `creds` field must be a Base64-encoded RSA-encrypted credential blob; use `GET /connected_accounts/credentials/public_key` to retrieve the public key for encryption. Both `creds` and `apiKey` are mandatory. Validation against the exchange is synchronous, but the update itself is **pending mobile approval** — the existing credentials stay live until the change is approved, so none of the affected accounts are disconnected in the meantime. Endpoint Permission: Admin, Non-Signing Admin. **Note:** This endpoint is currently in beta and might be subject to changes. + + :param account_id: The unique identifier of the connected account whose API key credentials are being replaced. (required) + :type account_id: str + :param update_connected_account_credentials_request: (required) + :type update_connected_account_credentials_request: UpdateConnectedAccountCredentialsRequest + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="update_connected_account_credentials", param_name="account_id", param_value=account_id) + + _param = self._update_connected_account_credentials_serialize( + account_id=account_id, + update_connected_account_credentials_request=update_connected_account_credentials_request, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "UpdateConnectedAccountCredentialsResponse", + '400': "ConnectedAccountErrorResponse", + '403': "ConnectedAccountErrorResponse", + '404': "ConnectedAccountErrorResponse", + '409': "ConnectedAccountErrorResponse", + '422': "ConnectedAccountErrorResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _update_connected_account_credentials_serialize( + self, + account_id, + update_connected_account_credentials_request, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params['accountId'] = account_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if update_connected_account_credentials_request is not None: + _body_params = update_connected_account_credentials_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/connected_accounts/{accountId}/credentials', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/fireblocks/api/webhooks_v2_api.py b/fireblocks/api/webhooks_v2_api.py index 861986a5..9b9f11a5 100644 --- a/fireblocks/api/webhooks_v2_api.py +++ b/fireblocks/api/webhooks_v2_api.py @@ -21,9 +21,9 @@ from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import List, Optional, Union from typing_extensions import Annotated -from fireblocks.models.create_webhook_o_auth_request import CreateWebhookOAuthRequest +from fireblocks.models.create_webhook_oauth_request import CreateWebhookOauthRequest from fireblocks.models.create_webhook_request import CreateWebhookRequest -from fireblocks.models.delete_webhook_o_auth_response import DeleteWebhookOAuthResponse +from fireblocks.models.delete_webhook_oauth_response import DeleteWebhookOauthResponse from fireblocks.models.notification_attempts_paginated_response import NotificationAttemptsPaginatedResponse from fireblocks.models.notification_paginated_response import NotificationPaginatedResponse from fireblocks.models.notification_status import NotificationStatus @@ -34,13 +34,13 @@ from fireblocks.models.resend_failed_notifications_request import ResendFailedNotificationsRequest from fireblocks.models.resend_failed_notifications_response import ResendFailedNotificationsResponse from fireblocks.models.resend_notifications_by_resource_id_request import ResendNotificationsByResourceIdRequest -from fireblocks.models.update_webhook_o_auth_request import UpdateWebhookOAuthRequest +from fireblocks.models.update_webhook_oauth_request import UpdateWebhookOauthRequest from fireblocks.models.update_webhook_request import UpdateWebhookRequest from fireblocks.models.webhook import Webhook from fireblocks.models.webhook_event import WebhookEvent from fireblocks.models.webhook_metric import WebhookMetric from fireblocks.models.webhook_mtls_csr_response import WebhookMtlsCsrResponse -from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +from fireblocks.models.webhook_oauth_credentials import WebhookOauthCredentials from fireblocks.models.webhook_paginated_response import WebhookPaginatedResponse from fireblocks.api_client import ApiClient, RequestSerialized @@ -211,9 +211,9 @@ def _create_webhook_serialize( @validate_call - def create_webhook_o_auth( + def create_webhook_oauth( self, - create_webhook_o_auth_request: CreateWebhookOAuthRequest, + create_webhook_oauth_request: CreateWebhookOauthRequest, idempotency_key: Annotated[Optional[StrictStr], Field(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.")] = None, _request_timeout: Union[ None, @@ -227,13 +227,13 @@ def create_webhook_o_auth( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[WebhookOAuthCredentials]]: + ) -> Future[ApiResponse[WebhookOauthCredentials]]: """Create OAuth credentials Creates a reusable OAuth client credential set. Attach it to a webhook by passing the returned id as that webhook's `webhookOauthId`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. The client secret is write-only and is never returned. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. - :param create_webhook_o_auth_request: (required) - :type create_webhook_o_auth_request: CreateWebhookOAuthRequest + :param create_webhook_oauth_request: (required) + :type create_webhook_oauth_request: CreateWebhookOauthRequest :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. :type idempotency_key: str :param _request_timeout: timeout setting for this request. If one @@ -259,8 +259,8 @@ def create_webhook_o_auth( """ # noqa: E501 - _param = self._create_webhook_o_auth_serialize( - create_webhook_o_auth_request=create_webhook_o_auth_request, + _param = self._create_webhook_oauth_serialize( + create_webhook_oauth_request=create_webhook_oauth_request, idempotency_key=idempotency_key, _request_auth=_request_auth, _content_type=_content_type, @@ -269,7 +269,7 @@ def create_webhook_o_auth( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "WebhookOAuthCredentials", + '201': "WebhookOauthCredentials", 'default': "ErrorSchema", } @@ -279,9 +279,9 @@ def create_webhook_o_auth( _response_types_map=_response_types_map, ) - def _create_webhook_o_auth_serialize( + def _create_webhook_oauth_serialize( self, - create_webhook_o_auth_request, + create_webhook_oauth_request, idempotency_key, _request_auth, _content_type, @@ -310,8 +310,8 @@ def _create_webhook_o_auth_serialize( _header_params['Idempotency-Key'] = idempotency_key # process the form parameters # process the body parameter - if create_webhook_o_auth_request is not None: - _body_params = create_webhook_o_auth_request + if create_webhook_oauth_request is not None: + _body_params = create_webhook_oauth_request # set the HTTP header `Accept` @@ -488,7 +488,7 @@ def _delete_webhook_serialize( @validate_call - def delete_webhook_o_auth( + def delete_webhook_oauth( self, webhook_oauth_id: Annotated[StrictStr, Field(description="The unique identifier of the OAuth credentials")], force_delete: Annotated[Optional[StrictBool], Field(description="Delete the credentials even while webhooks still reference them, detaching those webhooks instead of refusing. Leave it unset, or `false`, to get a `409 Conflict` whenever anything still references the credentials.")] = None, @@ -504,7 +504,7 @@ def delete_webhook_o_auth( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[DeleteWebhookOAuthResponse]]: + ) -> Future[ApiResponse[DeleteWebhookOauthResponse]]: """Delete OAuth credentials Deletes an OAuth credential set. By default the delete is refused while the credentials are still in use: if any webhook references them, nothing is deleted and the request fails with `409 Conflict`, naming the reason and listing the ids of the referencing webhooks. This protects a shared credential set from being removed out from under the webhooks that depend on it, since several webhooks may reference the same one. Pass `forceDelete=true` to delete anyway. That detaches every referencing webhook — it clears each webhook's `webhookOauthId`, it does **not** delete the webhook — then deletes the credential set and returns the deleted resource together with `detachedWebhookIds`. The detached webhooks keep delivering notifications, but without an `Authorization` header, so their endpoints will see unauthenticated deliveries from that point on. When nothing references the credentials the delete succeeds either way, and `detachedWebhookIds` comes back empty. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. @@ -535,9 +535,9 @@ def delete_webhook_o_auth( :return: Returns the result object. """ # noqa: E501 - validate_not_empty_string(function_name="delete_webhook_o_auth", param_name="webhook_oauth_id", param_value=webhook_oauth_id) + validate_not_empty_string(function_name="delete_webhook_oauth", param_name="webhook_oauth_id", param_value=webhook_oauth_id) - _param = self._delete_webhook_o_auth_serialize( + _param = self._delete_webhook_oauth_serialize( webhook_oauth_id=webhook_oauth_id, force_delete=force_delete, _request_auth=_request_auth, @@ -547,7 +547,7 @@ def delete_webhook_o_auth( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteWebhookOAuthResponse", + '200': "DeleteWebhookOauthResponse", '409': "ErrorSchema", 'default': "ErrorSchema", } @@ -558,7 +558,7 @@ def delete_webhook_o_auth( _response_types_map=_response_types_map, ) - def _delete_webhook_o_auth_serialize( + def _delete_webhook_oauth_serialize( self, webhook_oauth_id, force_delete, @@ -1801,7 +1801,7 @@ def _get_webhook_serialize( @validate_call - def get_webhook_o_auth( + def get_webhook_oauth( self, webhook_oauth_id: Annotated[StrictStr, Field(description="The unique identifier of the OAuth credentials")], _request_timeout: Union[ @@ -1816,7 +1816,7 @@ def get_webhook_o_auth( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[WebhookOAuthCredentials]]: + ) -> Future[ApiResponse[WebhookOauthCredentials]]: """Get OAuth credentials by id Retrieve an OAuth credential set by its id. The client secret is never returned. @@ -1845,9 +1845,9 @@ def get_webhook_o_auth( :return: Returns the result object. """ # noqa: E501 - validate_not_empty_string(function_name="get_webhook_o_auth", param_name="webhook_oauth_id", param_value=webhook_oauth_id) + validate_not_empty_string(function_name="get_webhook_oauth", param_name="webhook_oauth_id", param_value=webhook_oauth_id) - _param = self._get_webhook_o_auth_serialize( + _param = self._get_webhook_oauth_serialize( webhook_oauth_id=webhook_oauth_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1856,7 +1856,7 @@ def get_webhook_o_auth( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebhookOAuthCredentials", + '200': "WebhookOauthCredentials", 'default': "ErrorSchema", } @@ -1866,7 +1866,7 @@ def get_webhook_o_auth( _response_types_map=_response_types_map, ) - def _get_webhook_o_auth_serialize( + def _get_webhook_oauth_serialize( self, webhook_oauth_id, _request_auth, @@ -1930,7 +1930,7 @@ def _get_webhook_o_auth_serialize( @validate_call - def get_webhook_o_auths( + def get_webhook_oauths( self, _request_timeout: Union[ None, @@ -1944,7 +1944,7 @@ def get_webhook_o_auths( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[List[WebhookOAuthCredentials]]]: + ) -> Future[ApiResponse[List[WebhookOauthCredentials]]]: """Get all OAuth credentials Lists every OAuth credential set for the workspace. Client secrets are never returned. @@ -1972,7 +1972,7 @@ def get_webhook_o_auths( """ # noqa: E501 - _param = self._get_webhook_o_auths_serialize( + _param = self._get_webhook_oauths_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1980,7 +1980,7 @@ def get_webhook_o_auths( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[WebhookOAuthCredentials]", + '200': "List[WebhookOauthCredentials]", 'default': "ErrorSchema", } @@ -1990,7 +1990,7 @@ def get_webhook_o_auths( _response_types_map=_response_types_map, ) - def _get_webhook_o_auths_serialize( + def _get_webhook_oauths_serialize( self, _request_auth, _content_type, @@ -2962,10 +2962,10 @@ def _update_webhook_serialize( @validate_call - def update_webhook_o_auth( + def update_webhook_oauth( self, webhook_oauth_id: Annotated[StrictStr, Field(description="The unique identifier of the OAuth credentials")], - update_webhook_o_auth_request: UpdateWebhookOAuthRequest, + update_webhook_oauth_request: UpdateWebhookOauthRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2978,15 +2978,15 @@ def update_webhook_o_auth( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[WebhookOAuthCredentials]]: + ) -> Future[ApiResponse[WebhookOauthCredentials]]: """Update OAuth credentials Updates only the fields present in the request; anything omitted is left as it is. Sending `clientSecret` on its own rotates the secret for every webhook using these credentials. `customJwtClaims`, `customBodyParams` and `customHeaders` are all merged key by key rather than replaced, the same way a webhook's own `customHeaders` behaves: a key sent with a value is added or overwritten, a key sent with a `null` value is deleted, and a key you omit is left alone. Since a `null` inside a map is the delete mechanism, none of the three accepts `null` for the whole field — `customJwtClaims: null`, `customBodyParams: null` or `customHeaders: null` is rejected with a `400` rather than ignored. Clear a map by listing each of its keys with a `null` value. Because `null` is spent on deletion, a claim cannot be set to JSON `null` either, on this endpoint or on create. `mtlsClientSignedCert` is a scalar rather than a map, so `null` there does remove it. **Endpoint Permissions:** Owner, Admin, Non-Signing Admin. :param webhook_oauth_id: The unique identifier of the OAuth credentials (required) :type webhook_oauth_id: str - :param update_webhook_o_auth_request: (required) - :type update_webhook_o_auth_request: UpdateWebhookOAuthRequest + :param update_webhook_oauth_request: (required) + :type update_webhook_oauth_request: UpdateWebhookOauthRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3009,11 +3009,11 @@ def update_webhook_o_auth( :return: Returns the result object. """ # noqa: E501 - validate_not_empty_string(function_name="update_webhook_o_auth", param_name="webhook_oauth_id", param_value=webhook_oauth_id) + validate_not_empty_string(function_name="update_webhook_oauth", param_name="webhook_oauth_id", param_value=webhook_oauth_id) - _param = self._update_webhook_o_auth_serialize( + _param = self._update_webhook_oauth_serialize( webhook_oauth_id=webhook_oauth_id, - update_webhook_o_auth_request=update_webhook_o_auth_request, + update_webhook_oauth_request=update_webhook_oauth_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3021,7 +3021,7 @@ def update_webhook_o_auth( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebhookOAuthCredentials", + '200': "WebhookOauthCredentials", 'default': "ErrorSchema", } @@ -3031,10 +3031,10 @@ def update_webhook_o_auth( _response_types_map=_response_types_map, ) - def _update_webhook_o_auth_serialize( + def _update_webhook_oauth_serialize( self, webhook_oauth_id, - update_webhook_o_auth_request, + update_webhook_oauth_request, _request_auth, _content_type, _headers, @@ -3062,8 +3062,8 @@ def _update_webhook_o_auth_serialize( # process the header parameters # process the form parameters # process the body parameter - if update_webhook_o_auth_request is not None: - _body_params = update_webhook_o_auth_request + if update_webhook_oauth_request is not None: + _body_params = update_webhook_oauth_request # set the HTTP header `Accept` diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py index 30b20ae4..c1a025c0 100644 --- a/fireblocks/configuration.py +++ b/fireblocks/configuration.py @@ -550,7 +550,7 @@ def to_debug_report(self) -> str: "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.6.2\n" - "SDK Package Version: 30.0.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 0.0.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self) -> List[HostSetting]: diff --git a/fireblocks/models/__init__.py b/fireblocks/models/__init__.py index 4ffb2efc..b18f1ede 100644 --- a/fireblocks/models/__init__.py +++ b/fireblocks/models/__init__.py @@ -345,7 +345,7 @@ from fireblocks.models.create_vault_account_request import CreateVaultAccountRequest from fireblocks.models.create_vault_asset_response import CreateVaultAssetResponse from fireblocks.models.create_wallet_request import CreateWalletRequest -from fireblocks.models.create_webhook_o_auth_request import CreateWebhookOAuthRequest +from fireblocks.models.create_webhook_oauth_request import CreateWebhookOauthRequest from fireblocks.models.create_webhook_request import CreateWebhookRequest from fireblocks.models.create_workflow_execution_request_params_inner import CreateWorkflowExecutionRequestParamsInner from fireblocks.models.custom_routing_dest import CustomRoutingDest @@ -359,7 +359,7 @@ from fireblocks.models.delegation_summary import DelegationSummary from fireblocks.models.delete_network_connection_response import DeleteNetworkConnectionResponse from fireblocks.models.delete_network_id_response import DeleteNetworkIdResponse -from fireblocks.models.delete_webhook_o_auth_response import DeleteWebhookOAuthResponse +from fireblocks.models.delete_webhook_oauth_response import DeleteWebhookOauthResponse from fireblocks.models.deploy_layer_zero_adapters_request import DeployLayerZeroAdaptersRequest from fireblocks.models.deployable_address_response import DeployableAddressResponse from fireblocks.models.deployed_contract_not_found_error import DeployedContractNotFoundError @@ -1203,6 +1203,8 @@ from fireblocks.models.update_blockchain_response import UpdateBlockchainResponse from fireblocks.models.update_callback_handler_request import UpdateCallbackHandlerRequest from fireblocks.models.update_callback_handler_response import UpdateCallbackHandlerResponse +from fireblocks.models.update_connected_account_credentials_request import UpdateConnectedAccountCredentialsRequest +from fireblocks.models.update_connected_account_credentials_response import UpdateConnectedAccountCredentialsResponse from fireblocks.models.update_counterparty_group_request import UpdateCounterpartyGroupRequest from fireblocks.models.update_draft_request import UpdateDraftRequest from fireblocks.models.update_finding_external_request import UpdateFindingExternalRequest @@ -1211,7 +1213,7 @@ from fireblocks.models.update_token_ownership_status_dto import UpdateTokenOwnershipStatusDto from fireblocks.models.update_vault_account_asset_address_request import UpdateVaultAccountAssetAddressRequest from fireblocks.models.update_vault_account_request import UpdateVaultAccountRequest -from fireblocks.models.update_webhook_o_auth_request import UpdateWebhookOAuthRequest +from fireblocks.models.update_webhook_oauth_request import UpdateWebhookOauthRequest from fireblocks.models.update_webhook_request import UpdateWebhookRequest from fireblocks.models.us_wire_payment_info import UsWirePaymentInfo from fireblocks.models.usdc_gateway_wallet_asset import UsdcGatewayWalletAsset @@ -1257,9 +1259,7 @@ from fireblocks.models.webhook_metric import WebhookMetric from fireblocks.models.webhook_mtls import WebhookMtls from fireblocks.models.webhook_mtls_csr_response import WebhookMtlsCsrResponse -from fireblocks.models.webhook_o_auth import WebhookOAuth -from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials -from fireblocks.models.webhook_o_auth_response import WebhookOAuthResponse +from fireblocks.models.webhook_oauth_credentials import WebhookOauthCredentials from fireblocks.models.webhook_paginated_response import WebhookPaginatedResponse from fireblocks.models.withdraw_request import WithdrawRequest from fireblocks.models.workflow_config_status import WorkflowConfigStatus diff --git a/fireblocks/models/create_webhook_o_auth_request.py b/fireblocks/models/create_webhook_oauth_request.py similarity index 90% rename from fireblocks/models/create_webhook_o_auth_request.py rename to fireblocks/models/create_webhook_oauth_request.py index e73e23cb..0726d133 100644 --- a/fireblocks/models/create_webhook_o_auth_request.py +++ b/fireblocks/models/create_webhook_oauth_request.py @@ -24,7 +24,7 @@ from typing import Optional, Set from typing_extensions import Self -class CreateWebhookOAuthRequest(BaseModel): +class CreateWebhookOauthRequest(BaseModel): """ A new reusable OAuth 2.0 client credential set. Attach it to a webhook by passing the returned id as that webhook's `webhookOauthId`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. """ # noqa: E501 @@ -33,9 +33,9 @@ class CreateWebhookOAuthRequest(BaseModel): client_secret: Annotated[str, Field(min_length=1, strict=True, max_length=480)] = Field(description="OAuth client secret. Write-only — never returned. Limited to 480 bytes UTF-8 encoded. With `client_secret_jwt` it signs the assertion rather than being sent.", alias="clientSecret") url: Annotated[str, Field(strict=True, max_length=2048)] = Field(description="Token endpoint URL. HTTPS on port 443 only, and the host must resolve publicly — localhost and private, link-local or loopback addresses are rejected.") auth_method: Optional[StrictStr] = Field(default='client_secret_basic', description="How the client credentials reach the token endpoint. `client_secret_basic` uses an HTTP Basic header, `client_secret_post` uses form fields in the body, and `client_secret_jwt` sends a JWT assertion signed with the secret, so the secret itself is never transmitted. Defaults to `client_secret_basic`.", alias="authMethod") - custom_jwt_claims: Optional[Dict[str, Any]] = Field(default=None, description="Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOAuthCustomJwtClaimsUpdate`.", alias="customJwtClaims") - custom_body_params: Optional[Dict[str, StrictStr]] = Field(default=None, description="Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOAuthCustomBodyParamsUpdate`.", alias="customBodyParams") - custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Authorization`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. The whole object must be under 16 KB. Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOAuthCustomHeadersUpdate`.", alias="customHeaders") + custom_jwt_claims: Optional[Dict[str, Any]] = Field(default=None, description="Extra claims for the JWT assertion. Used only when `authMethod` is `client_secret_jwt`. The usual one to set is `aud`, which defaults to the token endpoint URL; some authorization servers expect their own identifier instead. A value may be any JSON type except `null` — `null` is reserved for deleting a claim on update. `iss`, `sub`, `jti`, `iat` and `exp` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the claim names. On update this merges claim by claim rather than replacing — see `WebhookOauthCustomJwtClaimsUpdate`.", alias="customJwtClaims") + custom_body_params: Optional[Dict[str, StrictStr]] = Field(default=None, description="Extra parameters for the token request body — `scope` most commonly, sometimes `audience` or `resource`. Applies to every authentication method. Values must be strings, because the token request body is form-encoded rather than JSON. An empty string is allowed. `grant_type`, `client_id`, `client_secret`, `client_assertion` and `client_assertion_type` are set by Fireblocks and cannot be overridden. Names are case-sensitive. The whole object must be under 16 KB. Values are write-only; responses return only the parameter names. On update this merges key by key rather than replacing — see `WebhookOauthCustomBodyParamsUpdate`.", alias="customBodyParams") + custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Extra HTTP headers for **the token request to your authorization server** — not for the webhook delivery, which has its own separate `customHeaders`. A gateway API key is the usual case. Applies to every authentication method. Values must be strings; an empty string is allowed. Names are matched case-insensitively, so two names differing only in case are a duplicate. Names are stored and returned lowercased, so `X-Api-Key` comes back as `x-api-key`. `Content-Type`, `Content-Length` and `Host` are set by Fireblocks and cannot be overridden. `Authorization` is not sent when `authMethod` is `client_secret_basic`. Values have no length limit of their own; the whole object must be under 16 KB when serialized as UTF-8. Values are write-only; responses return only the header names. On update this merges name by name rather than replacing — see `WebhookOauthCustomHeadersUpdate`.", alias="customHeaders") mtls_client_signed_cert: Optional[StrictStr] = Field(default=None, description="PEM-encoded client certificate for mTLS when fetching tokens. Must be a valid X.509 certificate inside its validity window.", alias="mtlsClientSignedCert") __properties: ClassVar[List[str]] = ["name", "clientId", "clientSecret", "url", "authMethod", "customJwtClaims", "customBodyParams", "customHeaders", "mtlsClientSignedCert"] @@ -64,7 +64,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateWebhookOAuthRequest from a JSON string""" + """Create an instance of CreateWebhookOauthRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -104,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateWebhookOAuthRequest from a dict""" + """Create an instance of CreateWebhookOauthRequest from a dict""" if obj is None: return None diff --git a/fireblocks/models/create_webhook_request.py b/fireblocks/models/create_webhook_request.py index 22c2d78c..6390df44 100644 --- a/fireblocks/models/create_webhook_request.py +++ b/fireblocks/models/create_webhook_request.py @@ -18,12 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from fireblocks.models.webhook_event import WebhookEvent from fireblocks.models.webhook_mtls import WebhookMtls -from fireblocks.models.webhook_o_auth import WebhookOAuth from typing import Optional, Set from typing_extensions import Self @@ -36,9 +35,9 @@ class CreateWebhookRequest(BaseModel): events: List[WebhookEvent] = Field(description="event types the webhook will subscribe to") enabled: Optional[StrictBool] = Field(default=True, description="The status of the webhook. If false, the webhook will not receive notifications.") mtls: Optional[WebhookMtls] = None - oauth: Optional[WebhookOAuth] = None - custom_headers: Optional[Dict[str, Any]] = Field(default=None, description="Custom HTTP headers attached to every notification delivered by this webhook. A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. Values are at most 1024 characters and may be empty. Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`, `Authorization`. `Authorization` is reserved whether or not this webhook has OAuth credentials attached, because Fireblocks sets it once it does. Values are write-only; responses return only the header names.", alias="customHeaders") - __properties: ClassVar[List[str]] = ["url", "description", "events", "enabled", "mtls", "oauth", "customHeaders"] + webhook_oauth_id: Optional[StrictStr] = Field(default=None, description="The id of the OAuth credentials this webhook authenticates with, from `/v1/webhooks_settings/oauth`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. Send `null` to stop using OAuth for this webhook.", alias="webhookOauthId") + custom_headers: Optional[Dict[str, Any]] = Field(default=None, description="Custom HTTP headers attached to every notification delivered by this webhook. A value is a string, sent as one header line, or an array of strings, sent as one header line per element under the same name. `Cookie` accepts only a string. An empty array is rejected — leave the name out instead. At most 10 header lines in total, counted per array element rather than per name. Names must be valid HTTP header tokens, are case-insensitive, and are at most 128 characters. A value may be empty and has no length limit of its own; the whole object must be under 16 KB when serialized as UTF-8. A value that large may still be refused by your own endpoint, since web servers commonly cap the whole request header block at around 8 KB. Reserved names: `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`, `Accept-Encoding`, `Fireblocks-Signature`, `Fireblocks-Webhook-Signature`. When this webhook has OAuth credentials attached, an `Authorization` value you set and the bearer token are both sent as separate header lines. Values are write-only; responses return only the header names.", alias="customHeaders") + __properties: ClassVar[List[str]] = ["url", "description", "events", "enabled", "mtls", "webhookOauthId", "customHeaders"] model_config = ConfigDict( populate_by_name=True, @@ -82,18 +81,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of mtls if self.mtls: _dict['mtls'] = self.mtls.to_dict() - # override the default output from pydantic by calling `to_dict()` of oauth - if self.oauth: - _dict['oauth'] = self.oauth.to_dict() # set to None if mtls (nullable) is None # and model_fields_set contains the field if self.mtls is None and "mtls" in self.model_fields_set: _dict['mtls'] = None - # set to None if oauth (nullable) is None + # set to None if webhook_oauth_id (nullable) is None # and model_fields_set contains the field - if self.oauth is None and "oauth" in self.model_fields_set: - _dict['oauth'] = None + if self.webhook_oauth_id is None and "webhook_oauth_id" in self.model_fields_set: + _dict['webhookOauthId'] = None return _dict @@ -112,7 +108,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "events": obj.get("events"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, "mtls": WebhookMtls.from_dict(obj["mtls"]) if obj.get("mtls") is not None else None, - "oauth": WebhookOAuth.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, + "webhookOauthId": obj.get("webhookOauthId"), "customHeaders": obj.get("customHeaders") }) return _obj diff --git a/fireblocks/models/delete_webhook_o_auth_response.py b/fireblocks/models/delete_webhook_oauth_response.py similarity index 97% rename from fireblocks/models/delete_webhook_o_auth_response.py rename to fireblocks/models/delete_webhook_oauth_response.py index b1630453..e806e087 100644 --- a/fireblocks/models/delete_webhook_o_auth_response.py +++ b/fireblocks/models/delete_webhook_oauth_response.py @@ -23,7 +23,7 @@ from typing import Optional, Set from typing_extensions import Self -class DeleteWebhookOAuthResponse(BaseModel): +class DeleteWebhookOauthResponse(BaseModel): """ The deleted OAuth credential set, plus the ids of any webhooks the delete detached from it. Webhooks are only detached by `forceDelete=true`; without it a delete is refused with `409` while anything still references the credentials. """ # noqa: E501 @@ -59,7 +59,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DeleteWebhookOAuthResponse from a JSON string""" + """Create an instance of DeleteWebhookOauthResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DeleteWebhookOAuthResponse from a dict""" + """Create an instance of DeleteWebhookOauthResponse from a dict""" if obj is None: return None diff --git a/fireblocks/models/fiat_account_type.py b/fireblocks/models/fiat_account_type.py index 4eeb0b3e..a91469f1 100644 --- a/fireblocks/models/fiat_account_type.py +++ b/fireblocks/models/fiat_account_type.py @@ -21,13 +21,36 @@ class FiatAccountType(str, Enum): """ - FiatAccountType + OTHER indicates the underlying provider isn't representable by this API version's enum (e.g. a newly onboarded provider, or one removed from this list) — it does not identify a specific provider, so it should not be used to key any client-side logic. """ """ allowed enum values """ BLINC = 'BLINC' + BLINC_TEST = 'BLINC_TEST' + CROSSRIVER = 'CROSSRIVER' + CROSSRIVER_TEST = 'CROSSRIVER_TEST' + CUSTOMERSBANK = 'CUSTOMERSBANK' + CUSTOMERSBANK_TEST = 'CUSTOMERSBANK_TEST' + FIFTHTHIRD = 'FIFTHTHIRD' + FIFTHTHIRD_TEST = 'FIFTHTHIRD_TEST' + KINGDOM_BANK = 'KINGDOM_BANK' + KINGDOM_BANK_TESTNET = 'KINGDOM_BANK_TESTNET' + LYNQ = 'LYNQ' + LYNQ_DEV = 'LYNQ_DEV' + LYNQ_QA = 'LYNQ_QA' + LYNQ_UAT = 'LYNQ_UAT' + N3XT = 'N3XT' + N3_XT_ALPHA = 'N3XT_ALPHA' + N3_XT_BETA = 'N3XT_BETA' + N3_XT_OMEGA = 'N3XT_OMEGA' + SYGNUM_CONNECT = 'SYGNUM_CONNECT' + SYGNUM_CONNECT_STAGING = 'SYGNUM_CONNECT_STAGING' + TRANSFERO = 'TRANSFERO' + TRANSFERO_STAGING = 'TRANSFERO_STAGING' + ZENUS_DEV = 'ZENUS_DEV' + OTHER = 'OTHER' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/fireblocks/models/webhook_o_auth_response.py b/fireblocks/models/update_connected_account_credentials_request.py similarity index 63% rename from fireblocks/models/webhook_o_auth_response.py rename to fireblocks/models/update_connected_account_credentials_request.py index 421c3d30..c9f5dff5 100644 --- a/fireblocks/models/webhook_o_auth_response.py +++ b/fireblocks/models/update_connected_account_credentials_request.py @@ -18,19 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self -class WebhookOAuthResponse(BaseModel): +class UpdateConnectedAccountCredentialsRequest(BaseModel): """ - OAuth 2.0 client credentials configuration for the webhook. Present only when OAuth is configured. The `clientSecret` is write-only and is never returned. + UpdateConnectedAccountCredentialsRequest """ # noqa: E501 - client_id: StrictStr = Field(description="OAuth client ID used to authenticate with the token endpoint.", alias="clientId") - url: StrictStr = Field(description="Token endpoint URL.") - mtls_client_signed_cert: Optional[StrictStr] = Field(default=None, description="Signed client certificate PEM used for mTLS when connecting to the token endpoint.", alias="mtlsClientSignedCert") - __properties: ClassVar[List[str]] = ["clientId", "url", "mtlsClientSignedCert"] + creds: Union[StrictBytes, StrictStr] = Field(description="Base64-encoded RSA-encrypted credential blob (the new secret). Encrypt using the public key from GET /connected_accounts/credentials/public_key.") + api_key: StrictStr = Field(description="The new account-level API key. Mandatory for credential update.", alias="apiKey") + __properties: ClassVar[List[str]] = ["creds", "apiKey"] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebhookOAuthResponse from a JSON string""" + """Create an instance of UpdateConnectedAccountCredentialsRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,16 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if mtls_client_signed_cert (nullable) is None - # and model_fields_set contains the field - if self.mtls_client_signed_cert is None and "mtls_client_signed_cert" in self.model_fields_set: - _dict['mtlsClientSignedCert'] = None - return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebhookOAuthResponse from a dict""" + """Create an instance of UpdateConnectedAccountCredentialsRequest from a dict""" if obj is None: return None @@ -88,9 +82,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "clientId": obj.get("clientId"), - "url": obj.get("url"), - "mtlsClientSignedCert": obj.get("mtlsClientSignedCert") + "creds": obj.get("creds"), + "apiKey": obj.get("apiKey") }) return _obj diff --git a/fireblocks/models/webhook_o_auth.py b/fireblocks/models/update_connected_account_credentials_response.py similarity index 51% rename from fireblocks/models/webhook_o_auth.py rename to fireblocks/models/update_connected_account_credentials_response.py index b3b84c42..f349c221 100644 --- a/fireblocks/models/webhook_o_auth.py +++ b/fireblocks/models/update_connected_account_credentials_response.py @@ -18,28 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from fireblocks.models.added_connected_account_item import AddedConnectedAccountItem from typing import Optional, Set from typing_extensions import Self -class WebhookOAuth(BaseModel): +class UpdateConnectedAccountCredentialsResponse(BaseModel): """ - OAuth 2.0 client credentials configuration for the webhook. When set, the webhook dispatcher fetches a bearer token from the configured token endpoint before each delivery and attaches it as `Authorization: Bearer {token}`. Send `null` to remove OAuth configuration entirely. + UpdateConnectedAccountCredentialsResponse """ # noqa: E501 - client_id: Annotated[str, Field(strict=True, max_length=255)] = Field(description="OAuth client ID used to authenticate with the token endpoint.", alias="clientId") - client_secret: Annotated[str, Field(strict=True, max_length=480)] = Field(description="OAuth client secret. Write-only — never returned in responses.", alias="clientSecret") - url: Annotated[str, Field(strict=True, max_length=2048)] = Field(description="Token endpoint URL. Must be HTTPS.") - mtls_client_signed_cert: Optional[StrictStr] = Field(default=None, description="Signed client certificate PEM used for mTLS when connecting to the token endpoint. Same format as the webhook mTLS certificate. Send `null` to remove.", alias="mtlsClientSignedCert") - __properties: ClassVar[List[str]] = ["clientId", "clientSecret", "url", "mtlsClientSignedCert"] - - @field_validator('url') - def url_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^https:\/\/", value): - raise ValueError(r"must validate the regular expression /^https:\/\//") - return value + accounts: List[AddedConnectedAccountItem] = Field(description="The account whose credentials are pending update (status WAITING_FOR_APPROVAL). Old credentials stay live until the change is approved.") + __properties: ClassVar[List[str]] = ["accounts"] model_config = ConfigDict( populate_by_name=True, @@ -59,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebhookOAuth from a JSON string""" + """Create an instance of UpdateConnectedAccountCredentialsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -80,16 +70,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if mtls_client_signed_cert (nullable) is None - # and model_fields_set contains the field - if self.mtls_client_signed_cert is None and "mtls_client_signed_cert" in self.model_fields_set: - _dict['mtlsClientSignedCert'] = None - + # override the default output from pydantic by calling `to_dict()` of each item in accounts (list) + _items = [] + if self.accounts: + for _item_accounts in self.accounts: + if _item_accounts: + _items.append(_item_accounts.to_dict()) + _dict['accounts'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebhookOAuth from a dict""" + """Create an instance of UpdateConnectedAccountCredentialsResponse from a dict""" if obj is None: return None @@ -97,10 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "clientId": obj.get("clientId"), - "clientSecret": obj.get("clientSecret"), - "url": obj.get("url"), - "mtlsClientSignedCert": obj.get("mtlsClientSignedCert") + "accounts": [AddedConnectedAccountItem.from_dict(_item) for _item in obj["accounts"]] if obj.get("accounts") is not None else None }) return _obj diff --git a/fireblocks/models/update_webhook_o_auth_request.py b/fireblocks/models/update_webhook_oauth_request.py similarity index 96% rename from fireblocks/models/update_webhook_o_auth_request.py rename to fireblocks/models/update_webhook_oauth_request.py index 62b9c3a1..ba31eb42 100644 --- a/fireblocks/models/update_webhook_o_auth_request.py +++ b/fireblocks/models/update_webhook_oauth_request.py @@ -24,7 +24,7 @@ from typing import Optional, Set from typing_extensions import Self -class UpdateWebhookOAuthRequest(BaseModel): +class UpdateWebhookOauthRequest(BaseModel): """ A partial update. Every field is optional and an omitted field is left as it is, so `{ \"clientSecret\": \"new-secret\" }` rotates the secret and changes nothing else. A rotation applies to every webhook referencing these credentials. The three custom maps merge: a key with a value is upserted, a key with `null` is deleted, a key you leave out is untouched. Because `null` inside a map means delete, none of the three is nullable as a whole — `customJwtClaims: null` and friends are rejected with a `400`. Clear a map by naming each key with a `null` value. `mtlsClientSignedCert` is a scalar, so `null` there does remove it. """ # noqa: E501 @@ -35,7 +35,7 @@ class UpdateWebhookOAuthRequest(BaseModel): auth_method: Optional[StrictStr] = Field(default=None, description="`client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Omit to leave it unchanged — it does not revert to the default.", alias="authMethod") custom_jwt_claims: Optional[Dict[str, Any]] = Field(default=None, description="A delta applied to the JWT assertion claims. A claim with a value is added or replaced, a claim with `null` is deleted, and a claim you leave out is untouched. So `{ \"aud\": \"https://auth.example.com\", \"resource\": null }` sets `aud`, drops `resource`, and changes nothing else. Send `customJwtClaims: null` to clear every claim in one call. That does not collide with a `null` value on a name: one names the claim to delete, the other names the whole field. Same rules as on create: any JSON type except `null`, `iss`/`sub`/`jti`/`iat`/`exp` reserved, names case-sensitive, resulting set under 16 KB, values write-only.", alias="customJwtClaims") custom_body_params: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A delta applied to the token request body parameters. A parameter with a value is added or replaced, a parameter with `null` is deleted, and one you leave out is untouched. So `{ \"scope\": \"payments.read\", \"audience\": null }` sets `scope`, drops `audience`, and changes nothing else. Send `customBodyParams: null` to clear every parameter in one call. That does not collide with a `null` value on a name: one names the parameter to delete, the other names the whole field. Same rules as on create: string values only, `grant_type`/`client_id`/`client_secret`/ `client_assertion`/`client_assertion_type` reserved, names case-sensitive, resulting set under 16 KB, values write-only.", alias="customBodyParams") - custom_headers: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ \"X-Api-Key\": \"new-key\", \"X-Tenant\": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. Same rules as on create: string values only, `Content-Type`/`Authorization`/ `Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only.", alias="customHeaders") + custom_headers: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A delta applied to the token request headers — not the webhook delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. So `{ \"X-Api-Key\": \"new-key\", \"X-Tenant\": null }` rotates `X-Api-Key`, drops `X-Tenant`, and changes nothing else. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another, and names are stored and returned lowercased. Same rules as on create: string values only, `Content-Type`/`Content-Length`/`Host` reserved, resulting set under 16 KB, values write-only.", alias="customHeaders") mtls_client_signed_cert: Optional[StrictStr] = Field(default=None, description="PEM-encoded client certificate for mTLS. Must be a valid X.509 certificate inside its validity window. Omit to leave it unchanged, or send `null` to remove it.", alias="mtlsClientSignedCert") __properties: ClassVar[List[str]] = ["name", "clientId", "clientSecret", "url", "authMethod", "customJwtClaims", "customBodyParams", "customHeaders", "mtlsClientSignedCert"] @@ -67,7 +67,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpdateWebhookOAuthRequest from a JSON string""" + """Create an instance of UpdateWebhookOauthRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -112,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpdateWebhookOAuthRequest from a dict""" + """Create an instance of UpdateWebhookOauthRequest from a dict""" if obj is None: return None diff --git a/fireblocks/models/update_webhook_request.py b/fireblocks/models/update_webhook_request.py index 9265635f..e6a58fd3 100644 --- a/fireblocks/models/update_webhook_request.py +++ b/fireblocks/models/update_webhook_request.py @@ -18,12 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from fireblocks.models.webhook_event import WebhookEvent from fireblocks.models.webhook_mtls import WebhookMtls -from fireblocks.models.webhook_o_auth import WebhookOAuth from typing import Optional, Set from typing_extensions import Self @@ -36,9 +35,9 @@ class UpdateWebhookRequest(BaseModel): events: Optional[List[WebhookEvent]] = Field(default=None, description="The events that the webhook will be subscribed to") enabled: Optional[StrictBool] = Field(default=None, description="The status of the webhook") mtls: Optional[WebhookMtls] = None - oauth: Optional[WebhookOAuth] = None - custom_headers: Optional[Dict[str, Any]] = Field(default=None, description="A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another. Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit.", alias="customHeaders") - __properties: ClassVar[List[str]] = ["url", "description", "events", "enabled", "mtls", "oauth", "customHeaders"] + webhook_oauth_id: Optional[StrictStr] = Field(default=None, description="The id of the OAuth credentials this webhook authenticates with, from `/v1/webhooks_settings/oauth`. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. Send `null` to stop using OAuth for this webhook.", alias="webhookOauthId") + custom_headers: Optional[Dict[str, Any]] = Field(default=None, description="A delta applied to the delivery headers. A header with a value is added or replaced, a header with `null` is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send `customHeaders: null` to clear every header in one call. That does not collide with a `null` value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a `null` under one casing deletes a header stored under another. Same rules as on create: string or non-empty array, `Cookie` string-only, 10 lines total and under 16 KB in the resulting set, the same reserved names, and values write-only. Entries set to `null` do not count towards the limit.", alias="customHeaders") + __properties: ClassVar[List[str]] = ["url", "description", "events", "enabled", "mtls", "webhookOauthId", "customHeaders"] model_config = ConfigDict( populate_by_name=True, @@ -82,18 +81,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of mtls if self.mtls: _dict['mtls'] = self.mtls.to_dict() - # override the default output from pydantic by calling `to_dict()` of oauth - if self.oauth: - _dict['oauth'] = self.oauth.to_dict() # set to None if mtls (nullable) is None # and model_fields_set contains the field if self.mtls is None and "mtls" in self.model_fields_set: _dict['mtls'] = None - # set to None if oauth (nullable) is None + # set to None if webhook_oauth_id (nullable) is None # and model_fields_set contains the field - if self.oauth is None and "oauth" in self.model_fields_set: - _dict['oauth'] = None + if self.webhook_oauth_id is None and "webhook_oauth_id" in self.model_fields_set: + _dict['webhookOauthId'] = None # set to None if custom_headers (nullable) is None # and model_fields_set contains the field @@ -117,7 +113,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "events": obj.get("events"), "enabled": obj.get("enabled"), "mtls": WebhookMtls.from_dict(obj["mtls"]) if obj.get("mtls") is not None else None, - "oauth": WebhookOAuth.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, + "webhookOauthId": obj.get("webhookOauthId"), "customHeaders": obj.get("customHeaders") }) return _obj diff --git a/fireblocks/models/webhook.py b/fireblocks/models/webhook.py index 643a82af..f060f489 100644 --- a/fireblocks/models/webhook.py +++ b/fireblocks/models/webhook.py @@ -23,7 +23,6 @@ from typing_extensions import Annotated from fireblocks.models.webhook_event import WebhookEvent from fireblocks.models.webhook_mtls import WebhookMtls -from fireblocks.models.webhook_o_auth_response import WebhookOAuthResponse from typing import Optional, Set from typing_extensions import Self @@ -39,9 +38,9 @@ class Webhook(BaseModel): created_at: StrictInt = Field(description="The date and time the webhook was created in milliseconds", alias="createdAt") updated_at: StrictInt = Field(description="The date and time the webhook was last updated in milliseconds", alias="updatedAt") mtls: Optional[WebhookMtls] = None - oauth: Optional[WebhookOAuthResponse] = None + webhook_oauth_id: Optional[StrictStr] = Field(default=None, description="The id of the OAuth credentials this webhook authenticates with. Absent when the webhook does not use OAuth. Read the credentials themselves from `/v1/webhooks_settings/oauth/{webhookOauthId}`.", alias="webhookOauthId") custom_headers: Optional[List[StrictStr]] = Field(default=None, description="Names of the custom headers configured for this webhook. Header values are never returned.", alias="customHeaders") - __properties: ClassVar[List[str]] = ["id", "url", "description", "events", "status", "createdAt", "updatedAt", "mtls", "oauth", "customHeaders"] + __properties: ClassVar[List[str]] = ["id", "url", "description", "events", "status", "createdAt", "updatedAt", "mtls", "webhookOauthId", "customHeaders"] @field_validator('status') def status_validate_enum(cls, value): @@ -92,9 +91,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of mtls if self.mtls: _dict['mtls'] = self.mtls.to_dict() - # override the default output from pydantic by calling `to_dict()` of oauth - if self.oauth: - _dict['oauth'] = self.oauth.to_dict() # set to None if mtls (nullable) is None # and model_fields_set contains the field if self.mtls is None and "mtls" in self.model_fields_set: @@ -120,7 +116,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "createdAt": obj.get("createdAt"), "updatedAt": obj.get("updatedAt"), "mtls": WebhookMtls.from_dict(obj["mtls"]) if obj.get("mtls") is not None else None, - "oauth": WebhookOAuthResponse.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, + "webhookOauthId": obj.get("webhookOauthId"), "customHeaders": obj.get("customHeaders") }) return _obj diff --git a/fireblocks/models/webhook_event.py b/fireblocks/models/webhook_event.py index 19986786..b522f5bf 100644 --- a/fireblocks/models/webhook_event.py +++ b/fireblocks/models/webhook_event.py @@ -60,6 +60,8 @@ class WebhookEvent(str, Enum): EXCHANGE_ACCOUNT_DOT_CONNECTED = 'exchange_account.connected' FIAT_ACCOUNT_DOT_CONNECTED = 'fiat_account.connected' CONNECTED_ACCOUNT_DOT_CONNECTED = 'connected_account.connected' + EXCHANGE_ACCOUNT_DOT_CREDENTIALS_REPLACED = 'exchange_account.credentials_replaced' + CONNECTED_ACCOUNT_DOT_CREDENTIALS_REPLACED = 'connected_account.credentials_replaced' TICKET_DOT_CREATED = 'ticket.created' TICKET_DOT_SUBMITTED = 'ticket.submitted' TICKET_DOT_EXPIRED = 'ticket.expired' diff --git a/fireblocks/models/webhook_o_auth_credentials.py b/fireblocks/models/webhook_oauth_credentials.py similarity index 97% rename from fireblocks/models/webhook_o_auth_credentials.py rename to fireblocks/models/webhook_oauth_credentials.py index 8df37d30..ad006d1a 100644 --- a/fireblocks/models/webhook_o_auth_credentials.py +++ b/fireblocks/models/webhook_oauth_credentials.py @@ -23,7 +23,7 @@ from typing import Optional, Set from typing_extensions import Self -class WebhookOAuthCredentials(BaseModel): +class WebhookOauthCredentials(BaseModel): """ A stored OAuth 2.0 client credential set, referenced by webhooks through their `webhookOauthId`. When a webhook references one, the dispatcher fetches a bearer token from `url` before each delivery and attaches it as `Authorization: Bearer {token}`. Secret material is never returned: `clientSecret` is absent from this schema entirely, and the `customJwtClaims`, `customBodyParams` and `customHeaders` fields are reduced to their names, without the configured values. """ # noqa: E501 @@ -58,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebhookOAuthCredentials from a JSON string""" + """Create an instance of WebhookOauthCredentials from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -83,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebhookOAuthCredentials from a dict""" + """Create an instance of WebhookOauthCredentials from a dict""" if obj is None: return None diff --git a/pyproject.toml b/pyproject.toml index 1fb3052c..08a27f53 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireblocks" -version = "30.0.0" +version = "0.0.0" description = "Fireblocks API" authors = ["Fireblocks "] license = "MIT License" diff --git a/setup.py b/setup.py index 6b5affa8..8e55f57b 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "fireblocks" -VERSION = "30.0.0" +VERSION = "0.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 2.1.0, < 3.0.0", diff --git a/test/test_add_connected_account_request.py b/test/test_add_connected_account_request.py index 04867011..656f669b 100644 --- a/test/test_add_connected_account_request.py +++ b/test/test_add_connected_account_request.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> AddConnectedAccountRequest: return AddConnectedAccountRequest( provider_id = 'BINANCE', display_name = 'My Binance Account', - creds = '[B@30b8743a', + creds = '[B@75a2dbb3', api_key = 'api_key_abc123', main_account_id = 'acc-parent-001', account_id = 'provider-acc-001', @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> AddConnectedAccountRequest: else: return AddConnectedAccountRequest( provider_id = 'BINANCE', - creds = '[B@30b8743a', + creds = '[B@75a2dbb3', api_key = 'api_key_abc123', ) """ diff --git a/test/test_approvals_beta_api.py b/test/test_approvals_beta_api.py index 0acf62b6..60e636a4 100644 --- a/test/test_approvals_beta_api.py +++ b/test/test_approvals_beta_api.py @@ -40,6 +40,13 @@ def test_get_approvals(self) -> None: """ pass + def test_reject_approval(self) -> None: + """Test case for reject_approval + + Reject an approval request + """ + pass + if __name__ == "__main__": unittest.main() diff --git a/test/test_connected_accounts_beta_api.py b/test/test_connected_accounts_beta_api.py index a09f098c..c0b3cda0 100644 --- a/test/test_connected_accounts_beta_api.py +++ b/test/test_connected_accounts_beta_api.py @@ -110,6 +110,13 @@ def test_sync_connected_account_allowlist(self) -> None: """ pass + def test_update_connected_account_credentials(self) -> None: + """Test case for update_connected_account_credentials + + Update connected account credentials + """ + pass + if __name__ == "__main__": unittest.main() diff --git a/test/test_create_webhook_o_auth_request.py b/test/test_create_webhook_oauth_request.py similarity index 78% rename from test/test_create_webhook_o_auth_request.py rename to test/test_create_webhook_oauth_request.py index db37aa48..d09654bd 100644 --- a/test/test_create_webhook_o_auth_request.py +++ b/test/test_create_webhook_oauth_request.py @@ -14,11 +14,11 @@ import unittest -from fireblocks.models.create_webhook_o_auth_request import CreateWebhookOAuthRequest +from fireblocks.models.create_webhook_oauth_request import CreateWebhookOauthRequest -class TestCreateWebhookOAuthRequest(unittest.TestCase): - """CreateWebhookOAuthRequest unit test stubs""" +class TestCreateWebhookOauthRequest(unittest.TestCase): + """CreateWebhookOauthRequest unit test stubs""" def setUp(self): pass @@ -26,16 +26,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateWebhookOAuthRequest: - """Test CreateWebhookOAuthRequest + def make_instance(self, include_optional) -> CreateWebhookOauthRequest: + """Test CreateWebhookOauthRequest include_optional is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `CreateWebhookOAuthRequest` + # uncomment below to create an instance of `CreateWebhookOauthRequest` """ - model = CreateWebhookOAuthRequest() + model = CreateWebhookOauthRequest() if include_optional: - return CreateWebhookOAuthRequest( + return CreateWebhookOauthRequest( name = 'Production treasury gateway', client_id = 'my-client-id', client_secret = 'my-client-secret', @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> CreateWebhookOAuthRequest: -----END CERTIFICATE-----' ) else: - return CreateWebhookOAuthRequest( + return CreateWebhookOauthRequest( name = 'Production treasury gateway', client_id = 'my-client-id', client_secret = 'my-client-secret', @@ -57,8 +57,8 @@ def make_instance(self, include_optional) -> CreateWebhookOAuthRequest: ) """ - def testCreateWebhookOAuthRequest(self): - """Test CreateWebhookOAuthRequest""" + def testCreateWebhookOauthRequest(self): + """Test CreateWebhookOauthRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_create_webhook_request.py b/test/test_create_webhook_request.py index 42848341..a8761e4a 100644 --- a/test/test_create_webhook_request.py +++ b/test/test_create_webhook_request.py @@ -44,13 +44,7 @@ def make_instance(self, include_optional) -> CreateWebhookRequest: client_signed_cert = '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----', ), - oauth = fireblocks.models.webhook_o_auth.WebhookOAuth( - client_id = 'my-client-id', - client_secret = 'my-client-secret', - url = 'https://auth.example.com/oauth/token', - mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- -... ------END CERTIFICATE-----', ), + webhook_oauth_id = '123e4567-e89b-12d3-a456-426614174000', custom_headers = {"X-Gateway-Key":"abc123","X-Region-Tag":"eu","X-Forwarded-For":["203.0.113.7","198.51.100.4"]} ) else: diff --git a/test/test_delete_webhook_o_auth_response.py b/test/test_delete_webhook_oauth_response.py similarity index 80% rename from test/test_delete_webhook_o_auth_response.py rename to test/test_delete_webhook_oauth_response.py index 8488e42d..cdb4160c 100644 --- a/test/test_delete_webhook_o_auth_response.py +++ b/test/test_delete_webhook_oauth_response.py @@ -14,11 +14,11 @@ import unittest -from fireblocks.models.delete_webhook_o_auth_response import DeleteWebhookOAuthResponse +from fireblocks.models.delete_webhook_oauth_response import DeleteWebhookOauthResponse -class TestDeleteWebhookOAuthResponse(unittest.TestCase): - """DeleteWebhookOAuthResponse unit test stubs""" +class TestDeleteWebhookOauthResponse(unittest.TestCase): + """DeleteWebhookOauthResponse unit test stubs""" def setUp(self): pass @@ -26,16 +26,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> DeleteWebhookOAuthResponse: - """Test DeleteWebhookOAuthResponse + def make_instance(self, include_optional) -> DeleteWebhookOauthResponse: + """Test DeleteWebhookOauthResponse include_optional is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `DeleteWebhookOAuthResponse` + # uncomment below to create an instance of `DeleteWebhookOauthResponse` """ - model = DeleteWebhookOAuthResponse() + model = DeleteWebhookOauthResponse() if include_optional: - return DeleteWebhookOAuthResponse( + return DeleteWebhookOauthResponse( id = '123e4567-e89b-12d3-a456-426614174000', name = 'Production treasury gateway', client_id = 'my-client-id', @@ -52,7 +52,7 @@ def make_instance(self, include_optional) -> DeleteWebhookOAuthResponse: detached_webhook_ids = ["44fcead0-7053-4831-a53a-df7fb90d440f"] ) else: - return DeleteWebhookOAuthResponse( + return DeleteWebhookOauthResponse( id = '123e4567-e89b-12d3-a456-426614174000', name = 'Production treasury gateway', client_id = 'my-client-id', @@ -64,8 +64,8 @@ def make_instance(self, include_optional) -> DeleteWebhookOAuthResponse: ) """ - def testDeleteWebhookOAuthResponse(self): - """Test DeleteWebhookOAuthResponse""" + def testDeleteWebhookOauthResponse(self): + """Test DeleteWebhookOauthResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_webhook_o_auth_response.py b/test/test_update_connected_account_credentials_request.py similarity index 52% rename from test/test_webhook_o_auth_response.py rename to test/test_update_connected_account_credentials_request.py index d08511b6..5509a7a1 100644 --- a/test/test_webhook_o_auth_response.py +++ b/test/test_update_connected_account_credentials_request.py @@ -14,11 +14,13 @@ import unittest -from fireblocks.models.webhook_o_auth_response import WebhookOAuthResponse +from fireblocks.models.update_connected_account_credentials_request import ( + UpdateConnectedAccountCredentialsRequest, +) -class TestWebhookOAuthResponse(unittest.TestCase): - """WebhookOAuthResponse unit test stubs""" +class TestUpdateConnectedAccountCredentialsRequest(unittest.TestCase): + """UpdateConnectedAccountCredentialsRequest unit test stubs""" def setUp(self): pass @@ -26,31 +28,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> WebhookOAuthResponse: - """Test WebhookOAuthResponse + def make_instance( + self, include_optional + ) -> UpdateConnectedAccountCredentialsRequest: + """Test UpdateConnectedAccountCredentialsRequest include_optional is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `WebhookOAuthResponse` + # uncomment below to create an instance of `UpdateConnectedAccountCredentialsRequest` """ - model = WebhookOAuthResponse() + model = UpdateConnectedAccountCredentialsRequest() if include_optional: - return WebhookOAuthResponse( - client_id = 'my-client-id', - url = 'https://auth.example.com/oauth/token', - mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- -... ------END CERTIFICATE-----' + return UpdateConnectedAccountCredentialsRequest( + creds = '[B@1cad7fc4', + api_key = 'api_key_new_abc123' ) else: - return WebhookOAuthResponse( - client_id = 'my-client-id', - url = 'https://auth.example.com/oauth/token', + return UpdateConnectedAccountCredentialsRequest( + creds = '[B@1cad7fc4', + api_key = 'api_key_new_abc123', ) """ - def testWebhookOAuthResponse(self): - """Test WebhookOAuthResponse""" + def testUpdateConnectedAccountCredentialsRequest(self): + """Test UpdateConnectedAccountCredentialsRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_webhook_o_auth.py b/test/test_update_connected_account_credentials_response.py similarity index 50% rename from test/test_webhook_o_auth.py rename to test/test_update_connected_account_credentials_response.py index 6791c088..e862f899 100644 --- a/test/test_webhook_o_auth.py +++ b/test/test_update_connected_account_credentials_response.py @@ -14,11 +14,13 @@ import unittest -from fireblocks.models.webhook_o_auth import WebhookOAuth +from fireblocks.models.update_connected_account_credentials_response import ( + UpdateConnectedAccountCredentialsResponse, +) -class TestWebhookOAuth(unittest.TestCase): - """WebhookOAuth unit test stubs""" +class TestUpdateConnectedAccountCredentialsResponse(unittest.TestCase): + """UpdateConnectedAccountCredentialsResponse unit test stubs""" def setUp(self): pass @@ -26,33 +28,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> WebhookOAuth: - """Test WebhookOAuth + def make_instance( + self, include_optional + ) -> UpdateConnectedAccountCredentialsResponse: + """Test UpdateConnectedAccountCredentialsResponse include_optional is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `WebhookOAuth` + # uncomment below to create an instance of `UpdateConnectedAccountCredentialsResponse` """ - model = WebhookOAuth() + model = UpdateConnectedAccountCredentialsResponse() if include_optional: - return WebhookOAuth( - client_id = 'my-client-id', - client_secret = 'my-client-secret', - url = 'https://auth.example.com/oauth/token', - mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- -... ------END CERTIFICATE-----' + return UpdateConnectedAccountCredentialsResponse( + accounts = [{"accountId":"acc-789012","name":"My Exchange Account","status":"WAITING_FOR_APPROVAL"}] ) else: - return WebhookOAuth( - client_id = 'my-client-id', - client_secret = 'my-client-secret', - url = 'https://auth.example.com/oauth/token', + return UpdateConnectedAccountCredentialsResponse( + accounts = [{"accountId":"acc-789012","name":"My Exchange Account","status":"WAITING_FOR_APPROVAL"}], ) """ - def testWebhookOAuth(self): - """Test WebhookOAuth""" + def testUpdateConnectedAccountCredentialsResponse(self): + """Test UpdateConnectedAccountCredentialsResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_update_webhook_o_auth_request.py b/test/test_update_webhook_oauth_request.py similarity index 76% rename from test/test_update_webhook_o_auth_request.py rename to test/test_update_webhook_oauth_request.py index 09f3c2da..edd7af10 100644 --- a/test/test_update_webhook_o_auth_request.py +++ b/test/test_update_webhook_oauth_request.py @@ -14,11 +14,11 @@ import unittest -from fireblocks.models.update_webhook_o_auth_request import UpdateWebhookOAuthRequest +from fireblocks.models.update_webhook_oauth_request import UpdateWebhookOauthRequest -class TestUpdateWebhookOAuthRequest(unittest.TestCase): - """UpdateWebhookOAuthRequest unit test stubs""" +class TestUpdateWebhookOauthRequest(unittest.TestCase): + """UpdateWebhookOauthRequest unit test stubs""" def setUp(self): pass @@ -26,16 +26,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> UpdateWebhookOAuthRequest: - """Test UpdateWebhookOAuthRequest + def make_instance(self, include_optional) -> UpdateWebhookOauthRequest: + """Test UpdateWebhookOauthRequest include_optional is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `UpdateWebhookOAuthRequest` + # uncomment below to create an instance of `UpdateWebhookOauthRequest` """ - model = UpdateWebhookOAuthRequest() + model = UpdateWebhookOauthRequest() if include_optional: - return UpdateWebhookOAuthRequest( + return UpdateWebhookOauthRequest( name = 'Production treasury gateway', client_id = 'my-client-id', client_secret = 'my-new-client-secret', @@ -49,12 +49,12 @@ def make_instance(self, include_optional) -> UpdateWebhookOAuthRequest: -----END CERTIFICATE-----' ) else: - return UpdateWebhookOAuthRequest( + return UpdateWebhookOauthRequest( ) """ - def testUpdateWebhookOAuthRequest(self): - """Test UpdateWebhookOAuthRequest""" + def testUpdateWebhookOauthRequest(self): + """Test UpdateWebhookOauthRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_update_webhook_request.py b/test/test_update_webhook_request.py index a4df7fac..07e4186e 100644 --- a/test/test_update_webhook_request.py +++ b/test/test_update_webhook_request.py @@ -44,13 +44,7 @@ def make_instance(self, include_optional) -> UpdateWebhookRequest: client_signed_cert = '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----', ), - oauth = fireblocks.models.webhook_o_auth.WebhookOAuth( - client_id = 'my-client-id', - client_secret = 'my-client-secret', - url = 'https://auth.example.com/oauth/token', - mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- -... ------END CERTIFICATE-----', ), + webhook_oauth_id = '123e4567-e89b-12d3-a456-426614174000', custom_headers = {"X-Gateway-Key":"abc123","X-Forwarded-For":["203.0.113.7","198.51.100.4"],"X-Region-Tag":null} ) else: diff --git a/test/test_webhook.py b/test/test_webhook.py index 468760af..5e2e0bb6 100644 --- a/test/test_webhook.py +++ b/test/test_webhook.py @@ -47,12 +47,7 @@ def make_instance(self, include_optional) -> Webhook: client_signed_cert = '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----', ), - oauth = fireblocks.models.webhook_o_auth_response.WebhookOAuthResponse( - client_id = 'my-client-id', - url = 'https://auth.example.com/oauth/token', - mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- -... ------END CERTIFICATE-----', ), + webhook_oauth_id = '123e4567-e89b-12d3-a456-426614174000', custom_headers = ["x-gateway-key","x-region-tag"] ) else: diff --git a/test/test_webhook_o_auth_credentials.py b/test/test_webhook_oauth_credentials.py similarity index 78% rename from test/test_webhook_o_auth_credentials.py rename to test/test_webhook_oauth_credentials.py index 295b26d9..5b6cfa0e 100644 --- a/test/test_webhook_o_auth_credentials.py +++ b/test/test_webhook_oauth_credentials.py @@ -14,11 +14,11 @@ import unittest -from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +from fireblocks.models.webhook_oauth_credentials import WebhookOauthCredentials -class TestWebhookOAuthCredentials(unittest.TestCase): - """WebhookOAuthCredentials unit test stubs""" +class TestWebhookOauthCredentials(unittest.TestCase): + """WebhookOauthCredentials unit test stubs""" def setUp(self): pass @@ -26,16 +26,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> WebhookOAuthCredentials: - """Test WebhookOAuthCredentials + def make_instance(self, include_optional) -> WebhookOauthCredentials: + """Test WebhookOauthCredentials include_optional is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `WebhookOAuthCredentials` + # uncomment below to create an instance of `WebhookOauthCredentials` """ - model = WebhookOAuthCredentials() + model = WebhookOauthCredentials() if include_optional: - return WebhookOAuthCredentials( + return WebhookOauthCredentials( id = '123e4567-e89b-12d3-a456-426614174000', name = 'Production treasury gateway', client_id = 'my-client-id', @@ -51,7 +51,7 @@ def make_instance(self, include_optional) -> WebhookOAuthCredentials: updated_at = 1625097600000 ) else: - return WebhookOAuthCredentials( + return WebhookOauthCredentials( id = '123e4567-e89b-12d3-a456-426614174000', name = 'Production treasury gateway', client_id = 'my-client-id', @@ -62,8 +62,8 @@ def make_instance(self, include_optional) -> WebhookOAuthCredentials: ) """ - def testWebhookOAuthCredentials(self): - """Test WebhookOAuthCredentials""" + def testWebhookOauthCredentials(self): + """Test WebhookOauthCredentials""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_webhook_paginated_response.py b/test/test_webhook_paginated_response.py index 7772925a..489a7785 100644 --- a/test/test_webhook_paginated_response.py +++ b/test/test_webhook_paginated_response.py @@ -49,12 +49,7 @@ def make_instance(self, include_optional) -> WebhookPaginatedResponse: client_signed_cert = '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----', ), - oauth = fireblocks.models.webhook_o_auth_response.WebhookOAuthResponse( - client_id = 'my-client-id', - url = 'https://auth.example.com/oauth/token', - mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- -... ------END CERTIFICATE-----', ), + webhook_oauth_id = '123e4567-e89b-12d3-a456-426614174000', custom_headers = ["x-gateway-key","x-region-tag"], ) ], next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9' @@ -74,12 +69,7 @@ def make_instance(self, include_optional) -> WebhookPaginatedResponse: client_signed_cert = '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----', ), - oauth = fireblocks.models.webhook_o_auth_response.WebhookOAuthResponse( - client_id = 'my-client-id', - url = 'https://auth.example.com/oauth/token', - mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- -... ------END CERTIFICATE-----', ), + webhook_oauth_id = '123e4567-e89b-12d3-a456-426614174000', custom_headers = ["x-gateway-key","x-region-tag"], ) ], ) diff --git a/test/test_webhooks_v2_api.py b/test/test_webhooks_v2_api.py index 766b7fd6..605bdec7 100644 --- a/test/test_webhooks_v2_api.py +++ b/test/test_webhooks_v2_api.py @@ -33,8 +33,8 @@ def test_create_webhook(self) -> None: """ pass - def test_create_webhook_o_auth(self) -> None: - """Test case for create_webhook_o_auth + def test_create_webhook_oauth(self) -> None: + """Test case for create_webhook_oauth Create OAuth credentials """ @@ -47,8 +47,8 @@ def test_delete_webhook(self) -> None: """ pass - def test_delete_webhook_o_auth(self) -> None: - """Test case for delete_webhook_o_auth + def test_delete_webhook_oauth(self) -> None: + """Test case for delete_webhook_oauth Delete OAuth credentials """ @@ -110,15 +110,15 @@ def test_get_webhook(self) -> None: """ pass - def test_get_webhook_o_auth(self) -> None: - """Test case for get_webhook_o_auth + def test_get_webhook_oauth(self) -> None: + """Test case for get_webhook_oauth Get OAuth credentials by id """ pass - def test_get_webhook_o_auths(self) -> None: - """Test case for get_webhook_o_auths + def test_get_webhook_oauths(self) -> None: + """Test case for get_webhook_oauths Get all OAuth credentials """ @@ -166,8 +166,8 @@ def test_update_webhook(self) -> None: """ pass - def test_update_webhook_o_auth(self) -> None: - """Test case for update_webhook_o_auth + def test_update_webhook_oauth(self) -> None: + """Test case for update_webhook_oauth Update OAuth credentials """