diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f3aa5ad8..76e071bf 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -11,8 +11,10 @@ docs/AccessRegistryCurrentStateResponse.md docs/AccessRegistryCurrentStateResponse2.md docs/AccessRegistrySummaryResponse.md docs/AccessType.md +docs/AccessTypeResponse.md docs/Account.md docs/AccountAccess.md +docs/AccountAccessResponse.md docs/AccountBase.md docs/AccountBasedAccessProvider.md docs/AccountBasedAccessProviderInfo.md @@ -65,6 +67,11 @@ docs/AddressReverseLookupResponse.md docs/AddressesFilters.md docs/AlertExposureTypeEnum.md docs/AlertLevelEnum.md +docs/AllocationResponse.md +docs/AllocationResponseAccept.md +docs/AllocationResponseReject.md +docs/AllocationWithdrawPayload.md +docs/AllowListPayload.md docs/AllowlistEntry.md docs/AllowlistEntryResponse.md docs/AllowlistEntryStatus.md @@ -92,6 +99,8 @@ docs/ApiKey.md docs/ApiKeysPaginatedResponse.md docs/ApiUserApi.md docs/ApprovalRequest.md +docs/ApprovalRequestItem.md +docs/ApprovalsBetaApi.md docs/ApproversConfig.md docs/ApproversConfigApprovalGroupsInner.md docs/Apy.md @@ -171,9 +180,19 @@ docs/ByorkVerdictEnum.md docs/ByorkVerdictRequest.md docs/ByorkVerdictResponse.md docs/ByorkVerdictResponseStatusEnum.md +docs/CallAccepted.md docs/CallbackHandler.md docs/CallbackHandlerRequest.md docs/CancelTransactionResponse.md +docs/CantonCall.md +docs/CantonCallAllocationWithdraw.md +docs/CantonCallAllowListAdd.md +docs/CantonCallAllowListRemove.md +docs/CantonCallEndInvestorInvite.md +docs/CantonCallEndInvestorInviteCancel.md +docs/CantonCallEndInvestorOffboard.md +docs/CantonCallParticipantOnboarding.md +docs/CantonCallTransferWithdraw.md docs/ChainDescriptor.md docs/ChainInfoResponse.md docs/ChannelDvnConfigWithConfirmations.md @@ -327,6 +346,7 @@ docs/CreateVaultAccountConnectionRequest.md docs/CreateVaultAccountRequest.md docs/CreateVaultAssetResponse.md docs/CreateWalletRequest.md +docs/CreateWebhookOAuthRequest.md docs/CreateWebhookRequest.md docs/CreateWorkflowExecutionRequestParamsInner.md docs/CustomRoutingDest.md @@ -340,6 +360,7 @@ docs/DelegationBlockchainPositionInfo.md docs/DelegationSummary.md docs/DeleteNetworkConnectionResponse.md docs/DeleteNetworkIdResponse.md +docs/DeleteWebhookOAuthResponse.md docs/DeployLayerZeroAdaptersRequest.md docs/DeployableAddressResponse.md docs/DeployedContractNotFoundError.md @@ -356,6 +377,8 @@ docs/DestinationTransferPeerPathResponse.md docs/DirectAccess.md docs/DirectAccessProvider.md docs/DirectAccessProviderInfo.md +docs/DirectAccessResponse.md +docs/DirectAccessResponseInfo.md docs/DisbursementAmountInstruction.md docs/DisbursementConfigOperation.md docs/DisbursementInstruction.md @@ -408,6 +431,7 @@ docs/EmbeddedWalletSetupStatusResponse.md docs/EmbeddedWalletsApi.md docs/EnableDevice.md docs/EnableWallet.md +docs/EndInvestorPayload.md docs/ErrorResponse.md docs/ErrorResponseError.md docs/ErrorSchema.md @@ -587,6 +611,7 @@ docs/LegacySrcOrDestAttributesInner.md docs/LegalEntityRegistration.md docs/LeiStatus.md docs/LinkedTokensCount.md +docs/ListApprovalsResponse.md docs/ListAssetsResponse.md docs/ListBlockchainsResponse.md docs/ListBlockchainsResponse2.md @@ -647,7 +672,17 @@ docs/NotificationWithData.md docs/OTABetaApi.md docs/OffExchangesApi.md docs/Offer.md +docs/OfferResponse.md +docs/OfferResponseAccepted.md +docs/OfferResponseAllocation.md +docs/OfferResponseOnboarding.md +docs/OfferResponseTransfer.md docs/OffersResponse.md +docs/OnboardingResponse.md +docs/OnboardingResponseDtccAccept.md +docs/OnboardingResponseDtccReject.md +docs/OnboardingResponseTradewebAccept.md +docs/OnboardingResponseTradewebReject.md docs/OnchainDataApi.md docs/OnchainTransaction.md docs/OnchainTransactionsPagedResponse.md @@ -678,6 +713,7 @@ docs/PairApiKeyRequest.md docs/PairApiKeyResponse.md docs/Parameter.md docs/ParameterWithValue.md +docs/ParticipantOnboardingPayload.md docs/ParticipantRelationshipType.md docs/ParticipantsIdentification.md docs/ParticipantsIdentificationPolicy.md @@ -752,6 +788,13 @@ docs/ProvidersListResponse.md docs/PublicKeyInformation.md docs/PublishDraftRequest.md docs/PublishResult.md +docs/QuorumApprovalState.md +docs/QuorumGroup.md +docs/QuorumRequestState.md +docs/QuorumRuleset.md +docs/QuorumStatus.md +docs/QuorumStatusQuorum.md +docs/QuorumUser.md docs/Quote.md docs/QuoteExecutionRequestDetails.md docs/QuoteExecutionStep.md @@ -820,6 +863,7 @@ docs/RewardsInfo.md docs/RoleDetails.md docs/RoleDetails2.md docs/RoleGrantee.md +docs/RulesetQuorum.md docs/SEPAAddress.md docs/SEPADestination.md docs/SOLAccount.md @@ -894,6 +938,7 @@ docs/Side.md docs/SignedMessage.md docs/SignedMessageSignature.md docs/SigningKeyDto.md +docs/SimpleQuorum.md docs/SmartTransferApi.md docs/SmartTransferApproveTerm.md docs/SmartTransferBadRequestResponse.md @@ -1119,7 +1164,11 @@ docs/TransferPeerTypeEnum.md docs/TransferPeerTypeEnum2.md docs/TransferRail.md docs/TransferReceipt.md +docs/TransferResponse.md +docs/TransferResponseAccept.md +docs/TransferResponseReject.md docs/TransferValidationFailure.md +docs/TransferWithdrawPayload.md docs/TravelRuleActionEnum.md docs/TravelRuleAddress.md docs/TravelRuleApi.md @@ -1195,6 +1244,7 @@ docs/UpdateTagRequest.md docs/UpdateTokenOwnershipStatusDto.md docs/UpdateVaultAccountAssetAddressRequest.md docs/UpdateVaultAccountRequest.md +docs/UpdateWebhookOAuthRequest.md docs/UpdateWebhookRequest.md docs/UsWirePaymentInfo.md docs/UsdcGatewayWalletAsset.md @@ -1245,6 +1295,7 @@ docs/WebhookMetric.md docs/WebhookMtls.md docs/WebhookMtlsCsrResponse.md docs/WebhookOAuth.md +docs/WebhookOAuthCredentials.md docs/WebhookOAuthResponse.md docs/WebhookPaginatedResponse.md docs/WebhooksApi.md @@ -1265,6 +1316,7 @@ fireblocks/__init__.py fireblocks/additional_options.py fireblocks/api/__init__.py fireblocks/api/api_user_api.py +fireblocks/api/approvals_beta_api.py fireblocks/api/audit_logs_api.py fireblocks/api/blockchain_link_beta_api.py fireblocks/api/blockchains_assets_api.py @@ -1319,12 +1371,14 @@ fireblocks/api/whitelist_ip_addresses_api.py fireblocks/api/workspace_api.py fireblocks/api/workspace_status_beta_api.py fireblocks/api_client.py +fireblocks/api_client_configuration.py fireblocks/api_response.py fireblocks/base_path.py fireblocks/bearer_token_provider.py fireblocks/client.py fireblocks/client_configuration.py fireblocks/configuration.py +fireblocks/connection_pool.py fireblocks/exceptions.py fireblocks/models/__init__.py fireblocks/models/aba_payment_info.py @@ -1335,8 +1389,10 @@ fireblocks/models/access_registry_current_state_response.py fireblocks/models/access_registry_current_state_response2.py fireblocks/models/access_registry_summary_response.py fireblocks/models/access_type.py +fireblocks/models/access_type_response.py fireblocks/models/account.py fireblocks/models/account_access.py +fireblocks/models/account_access_response.py fireblocks/models/account_base.py fireblocks/models/account_based_access_provider.py fireblocks/models/account_based_access_provider_info.py @@ -1389,6 +1445,11 @@ fireblocks/models/address_reverse_lookup_response.py fireblocks/models/addresses_filters.py fireblocks/models/alert_exposure_type_enum.py fireblocks/models/alert_level_enum.py +fireblocks/models/allocation_response.py +fireblocks/models/allocation_response_accept.py +fireblocks/models/allocation_response_reject.py +fireblocks/models/allocation_withdraw_payload.py +fireblocks/models/allow_list_payload.py fireblocks/models/allowlist_entry.py fireblocks/models/allowlist_entry_response.py fireblocks/models/allowlist_entry_status.py @@ -1416,6 +1477,7 @@ fireblocks/models/api_key.py fireblocks/models/api_keys_paginated_response.py fireblocks/models/api_user.py fireblocks/models/approval_request.py +fireblocks/models/approval_request_item.py fireblocks/models/approvers_config.py fireblocks/models/approvers_config_approval_groups_inner.py fireblocks/models/apy.py @@ -1492,9 +1554,19 @@ fireblocks/models/byork_verdict_enum.py fireblocks/models/byork_verdict_request.py fireblocks/models/byork_verdict_response.py fireblocks/models/byork_verdict_response_status_enum.py +fireblocks/models/call_accepted.py fireblocks/models/callback_handler.py fireblocks/models/callback_handler_request.py fireblocks/models/cancel_transaction_response.py +fireblocks/models/canton_call.py +fireblocks/models/canton_call_allocation_withdraw.py +fireblocks/models/canton_call_allow_list_add.py +fireblocks/models/canton_call_allow_list_remove.py +fireblocks/models/canton_call_end_investor_invite.py +fireblocks/models/canton_call_end_investor_invite_cancel.py +fireblocks/models/canton_call_end_investor_offboard.py +fireblocks/models/canton_call_participant_onboarding.py +fireblocks/models/canton_call_transfer_withdraw.py fireblocks/models/chain_descriptor.py fireblocks/models/chain_info_response.py fireblocks/models/channel_dvn_config_with_confirmations.py @@ -1639,6 +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_request.py fireblocks/models/create_workflow_execution_request_params_inner.py fireblocks/models/custom_routing_dest.py @@ -1650,6 +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/deploy_layer_zero_adapters_request.py fireblocks/models/deployable_address_response.py fireblocks/models/deployed_contract_not_found_error.py @@ -1665,6 +1739,8 @@ fireblocks/models/destination_transfer_peer_path_response.py fireblocks/models/direct_access.py fireblocks/models/direct_access_provider.py fireblocks/models/direct_access_provider_info.py +fireblocks/models/direct_access_response.py +fireblocks/models/direct_access_response_info.py fireblocks/models/disbursement_amount_instruction.py fireblocks/models/disbursement_config_operation.py fireblocks/models/disbursement_instruction.py @@ -1716,6 +1792,7 @@ fireblocks/models/embedded_wallet_set_up_status.py fireblocks/models/embedded_wallet_setup_status_response.py fireblocks/models/enable_device.py fireblocks/models/enable_wallet.py +fireblocks/models/end_investor_payload.py fireblocks/models/error_response.py fireblocks/models/error_response_error.py fireblocks/models/error_schema.py @@ -1888,6 +1965,7 @@ fireblocks/models/legacy_src_or_dest_attributes_inner.py fireblocks/models/legal_entity_registration.py fireblocks/models/lei_status.py fireblocks/models/linked_tokens_count.py +fireblocks/models/list_approvals_response.py fireblocks/models/list_assets_response.py fireblocks/models/list_blockchains_response.py fireblocks/models/list_blockchains_response2.py @@ -1944,7 +2022,17 @@ fireblocks/models/notification_paginated_response.py fireblocks/models/notification_status.py fireblocks/models/notification_with_data.py fireblocks/models/offer.py +fireblocks/models/offer_response.py +fireblocks/models/offer_response_accepted.py +fireblocks/models/offer_response_allocation.py +fireblocks/models/offer_response_onboarding.py +fireblocks/models/offer_response_transfer.py fireblocks/models/offers_response.py +fireblocks/models/onboarding_response.py +fireblocks/models/onboarding_response_dtcc_accept.py +fireblocks/models/onboarding_response_dtcc_reject.py +fireblocks/models/onboarding_response_tradeweb_accept.py +fireblocks/models/onboarding_response_tradeweb_reject.py fireblocks/models/onchain_transaction.py fireblocks/models/onchain_transactions_paged_response.py fireblocks/models/onchain_transactions_paged_response2.py @@ -1974,6 +2062,7 @@ fireblocks/models/pair_api_key_request.py fireblocks/models/pair_api_key_response.py fireblocks/models/parameter.py fireblocks/models/parameter_with_value.py +fireblocks/models/participant_onboarding_payload.py fireblocks/models/participant_relationship_type.py fireblocks/models/participants_identification.py fireblocks/models/participants_identification_policy.py @@ -2044,6 +2133,13 @@ fireblocks/models/providers_list_response.py fireblocks/models/public_key_information.py fireblocks/models/publish_draft_request.py fireblocks/models/publish_result.py +fireblocks/models/quorum_approval_state.py +fireblocks/models/quorum_group.py +fireblocks/models/quorum_request_state.py +fireblocks/models/quorum_ruleset.py +fireblocks/models/quorum_status.py +fireblocks/models/quorum_status_quorum.py +fireblocks/models/quorum_user.py fireblocks/models/quote.py fireblocks/models/quote_execution_request_details.py fireblocks/models/quote_execution_step.py @@ -2110,6 +2206,7 @@ fireblocks/models/rewards_info.py fireblocks/models/role_details.py fireblocks/models/role_details2.py fireblocks/models/role_grantee.py +fireblocks/models/ruleset_quorum.py fireblocks/models/save_automation_settings_response.py fireblocks/models/scope_item.py fireblocks/models/scope_item_failure.py @@ -2181,6 +2278,7 @@ fireblocks/models/side.py fireblocks/models/signed_message.py fireblocks/models/signed_message_signature.py fireblocks/models/signing_key_dto.py +fireblocks/models/simple_quorum.py fireblocks/models/smart_transfer_approve_term.py fireblocks/models/smart_transfer_bad_request_response.py fireblocks/models/smart_transfer_coin_statistic.py @@ -2401,7 +2499,11 @@ fireblocks/models/transfer_peer_type_enum.py fireblocks/models/transfer_peer_type_enum2.py fireblocks/models/transfer_rail.py fireblocks/models/transfer_receipt.py +fireblocks/models/transfer_response.py +fireblocks/models/transfer_response_accept.py +fireblocks/models/transfer_response_reject.py fireblocks/models/transfer_validation_failure.py +fireblocks/models/transfer_withdraw_payload.py fireblocks/models/travel_rule_action_enum.py fireblocks/models/travel_rule_address.py fireblocks/models/travel_rule_create_transaction_request.py @@ -2473,6 +2575,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_request.py fireblocks/models/us_wire_address.py fireblocks/models/us_wire_destination.py @@ -2521,6 +2624,7 @@ 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_paginated_response.py fireblocks/models/withdraw_request.py @@ -2548,9 +2652,11 @@ test/__init__.py test/fireblocks/__init__.py test/fireblocks/dummy_test_key.txt test/fireblocks/test_additional_options.py +test/fireblocks/test_api_client_configuration.py test/fireblocks/test_bearer_token_provider.py test/fireblocks/test_client.py test/fireblocks/test_client_configuration.py +test/fireblocks/test_connection_pool.py test/fireblocks/test_threaded_api_client.py test/fireblocks/test_unknown_model.py test/fireblocks/test_user_agent_util.py @@ -2563,8 +2669,10 @@ test/test_access_registry_current_state_response.py test/test_access_registry_current_state_response2.py test/test_access_registry_summary_response.py test/test_access_type.py +test/test_access_type_response.py test/test_account.py test/test_account_access.py +test/test_account_access_response.py test/test_account_base.py test/test_account_based_access_provider.py test/test_account_based_access_provider_info.py @@ -2617,6 +2725,11 @@ test/test_address_reverse_lookup_response.py test/test_addresses_filters.py test/test_alert_exposure_type_enum.py test/test_alert_level_enum.py +test/test_allocation_response.py +test/test_allocation_response_accept.py +test/test_allocation_response_reject.py +test/test_allocation_withdraw_payload.py +test/test_allow_list_payload.py test/test_allowlist_entry.py test/test_allowlist_entry_response.py test/test_allowlist_entry_status.py @@ -2645,6 +2758,8 @@ test/test_api_keys_paginated_response.py test/test_api_user.py test/test_api_user_api.py test/test_approval_request.py +test/test_approval_request_item.py +test/test_approvals_beta_api.py test/test_approvers_config.py test/test_approvers_config_approval_groups_inner.py test/test_apy.py @@ -2724,9 +2839,19 @@ test/test_byork_verdict_enum.py test/test_byork_verdict_request.py test/test_byork_verdict_response.py test/test_byork_verdict_response_status_enum.py +test/test_call_accepted.py test/test_callback_handler.py test/test_callback_handler_request.py test/test_cancel_transaction_response.py +test/test_canton_call.py +test/test_canton_call_allocation_withdraw.py +test/test_canton_call_allow_list_add.py +test/test_canton_call_allow_list_remove.py +test/test_canton_call_end_investor_invite.py +test/test_canton_call_end_investor_invite_cancel.py +test/test_canton_call_end_investor_offboard.py +test/test_canton_call_participant_onboarding.py +test/test_canton_call_transfer_withdraw.py test/test_chain_descriptor.py test/test_chain_info_response.py test/test_channel_dvn_config_with_confirmations.py @@ -2880,6 +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_request.py test/test_create_workflow_execution_request_params_inner.py test/test_custom_routing_dest.py @@ -2891,6 +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_deploy_layer_zero_adapters_request.py test/test_deployable_address_response.py test/test_deployed_contract_not_found_error.py @@ -2907,6 +3034,8 @@ test/test_destination_transfer_peer_path_response.py test/test_direct_access.py test/test_direct_access_provider.py test/test_direct_access_provider_info.py +test/test_direct_access_response.py +test/test_direct_access_response_info.py test/test_disbursement_amount_instruction.py test/test_disbursement_config_operation.py test/test_disbursement_instruction.py @@ -2960,6 +3089,7 @@ test/test_embedded_wallet_setup_status_response.py test/test_embedded_wallets_api.py test/test_enable_device.py test/test_enable_wallet.py +test/test_end_investor_payload.py test/test_error_response.py test/test_error_response_error.py test/test_error_schema.py @@ -3140,6 +3270,7 @@ test/test_legacy_src_or_dest_attributes_inner.py test/test_legal_entity_registration.py test/test_lei_status.py test/test_linked_tokens_count.py +test/test_list_approvals_response.py test/test_list_assets_response.py test/test_list_blockchains_response.py test/test_list_blockchains_response2.py @@ -3199,7 +3330,17 @@ test/test_notification_status.py test/test_notification_with_data.py test/test_off_exchanges_api.py test/test_offer.py +test/test_offer_response.py +test/test_offer_response_accepted.py +test/test_offer_response_allocation.py +test/test_offer_response_onboarding.py +test/test_offer_response_transfer.py test/test_offers_response.py +test/test_onboarding_response.py +test/test_onboarding_response_dtcc_accept.py +test/test_onboarding_response_dtcc_reject.py +test/test_onboarding_response_tradeweb_accept.py +test/test_onboarding_response_tradeweb_reject.py test/test_onchain_data_api.py test/test_onchain_transaction.py test/test_onchain_transactions_paged_response.py @@ -3231,6 +3372,7 @@ test/test_pair_api_key_request.py test/test_pair_api_key_response.py test/test_parameter.py test/test_parameter_with_value.py +test/test_participant_onboarding_payload.py test/test_participant_relationship_type.py test/test_participants_identification.py test/test_participants_identification_policy.py @@ -3305,6 +3447,13 @@ test/test_providers_list_response.py test/test_public_key_information.py test/test_publish_draft_request.py test/test_publish_result.py +test/test_quorum_approval_state.py +test/test_quorum_group.py +test/test_quorum_request_state.py +test/test_quorum_ruleset.py +test/test_quorum_status.py +test/test_quorum_status_quorum.py +test/test_quorum_user.py test/test_quote.py test/test_quote_execution_request_details.py test/test_quote_execution_step.py @@ -3373,6 +3522,7 @@ test/test_rewards_info.py test/test_role_details.py test/test_role_details2.py test/test_role_grantee.py +test/test_ruleset_quorum.py test/test_save_automation_settings_response.py test/test_scope_item.py test/test_scope_item_failure.py @@ -3445,6 +3595,7 @@ test/test_side.py test/test_signed_message.py test/test_signed_message_signature.py test/test_signing_key_dto.py +test/test_simple_quorum.py test/test_smart_transfer_api.py test/test_smart_transfer_approve_term.py test/test_smart_transfer_bad_request_response.py @@ -3672,7 +3823,11 @@ test/test_transfer_peer_type_enum.py test/test_transfer_peer_type_enum2.py test/test_transfer_rail.py test/test_transfer_receipt.py +test/test_transfer_response.py +test/test_transfer_response_accept.py +test/test_transfer_response_reject.py test/test_transfer_validation_failure.py +test/test_transfer_withdraw_payload.py test/test_travel_rule_action_enum.py test/test_travel_rule_address.py test/test_travel_rule_api.py @@ -3745,6 +3900,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_request.py test/test_us_wire_address.py test/test_us_wire_destination.py @@ -3798,6 +3954,7 @@ 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_paginated_response.py test/test_webhooks_api.py diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 0c3b9e15..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). - -## [v29.0.0](https://github.com/fireblocks/py-sdk/compare/v24.0.0...v29.0.0) - 2026-09-01 - -### Merged - -- Generated SDK #2809037023 [`#158`](https://github.com/fireblocks/py-sdk/pull/158) - -## [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 8241741a..925e219a 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,8 @@ Class | Method | HTTP request | Description *ApiUserApi* | [**create_api_user**](docs/ApiUserApi.md#create_api_user) | **POST** /management/api_users | Create API Key *ApiUserApi* | [**get_api_users**](docs/ApiUserApi.md#get_api_users) | **GET** /management/api_users | Get API Keys *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 *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 @@ -670,7 +672,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* | [**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* | [**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 @@ -679,12 +683,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_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 *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 @@ -701,8 +708,10 @@ Class | Method | HTTP request | Description - [AccessRegistryCurrentStateResponse2](docs/AccessRegistryCurrentStateResponse2.md) - [AccessRegistrySummaryResponse](docs/AccessRegistrySummaryResponse.md) - [AccessType](docs/AccessType.md) + - [AccessTypeResponse](docs/AccessTypeResponse.md) - [Account](docs/Account.md) - [AccountAccess](docs/AccountAccess.md) + - [AccountAccessResponse](docs/AccountAccessResponse.md) - [AccountBase](docs/AccountBase.md) - [AccountBasedAccessProvider](docs/AccountBasedAccessProvider.md) - [AccountBasedAccessProviderInfo](docs/AccountBasedAccessProviderInfo.md) @@ -755,6 +764,11 @@ Class | Method | HTTP request | Description - [AddressesFilters](docs/AddressesFilters.md) - [AlertExposureTypeEnum](docs/AlertExposureTypeEnum.md) - [AlertLevelEnum](docs/AlertLevelEnum.md) + - [AllocationResponse](docs/AllocationResponse.md) + - [AllocationResponseAccept](docs/AllocationResponseAccept.md) + - [AllocationResponseReject](docs/AllocationResponseReject.md) + - [AllocationWithdrawPayload](docs/AllocationWithdrawPayload.md) + - [AllowListPayload](docs/AllowListPayload.md) - [AllowlistEntry](docs/AllowlistEntry.md) - [AllowlistEntryResponse](docs/AllowlistEntryResponse.md) - [AllowlistEntryStatus](docs/AllowlistEntryStatus.md) @@ -781,6 +795,7 @@ Class | Method | HTTP request | Description - [ApiKey](docs/ApiKey.md) - [ApiKeysPaginatedResponse](docs/ApiKeysPaginatedResponse.md) - [ApprovalRequest](docs/ApprovalRequest.md) + - [ApprovalRequestItem](docs/ApprovalRequestItem.md) - [ApproversConfig](docs/ApproversConfig.md) - [ApproversConfigApprovalGroupsInner](docs/ApproversConfigApprovalGroupsInner.md) - [Apy](docs/Apy.md) @@ -857,9 +872,19 @@ Class | Method | HTTP request | Description - [ByorkVerdictRequest](docs/ByorkVerdictRequest.md) - [ByorkVerdictResponse](docs/ByorkVerdictResponse.md) - [ByorkVerdictResponseStatusEnum](docs/ByorkVerdictResponseStatusEnum.md) + - [CallAccepted](docs/CallAccepted.md) - [CallbackHandler](docs/CallbackHandler.md) - [CallbackHandlerRequest](docs/CallbackHandlerRequest.md) - [CancelTransactionResponse](docs/CancelTransactionResponse.md) + - [CantonCall](docs/CantonCall.md) + - [CantonCallAllocationWithdraw](docs/CantonCallAllocationWithdraw.md) + - [CantonCallAllowListAdd](docs/CantonCallAllowListAdd.md) + - [CantonCallAllowListRemove](docs/CantonCallAllowListRemove.md) + - [CantonCallEndInvestorInvite](docs/CantonCallEndInvestorInvite.md) + - [CantonCallEndInvestorInviteCancel](docs/CantonCallEndInvestorInviteCancel.md) + - [CantonCallEndInvestorOffboard](docs/CantonCallEndInvestorOffboard.md) + - [CantonCallParticipantOnboarding](docs/CantonCallParticipantOnboarding.md) + - [CantonCallTransferWithdraw](docs/CantonCallTransferWithdraw.md) - [ChainDescriptor](docs/ChainDescriptor.md) - [ChainInfoResponse](docs/ChainInfoResponse.md) - [ChannelDvnConfigWithConfirmations](docs/ChannelDvnConfigWithConfirmations.md) @@ -1004,6 +1029,7 @@ Class | Method | HTTP request | Description - [CreateVaultAccountRequest](docs/CreateVaultAccountRequest.md) - [CreateVaultAssetResponse](docs/CreateVaultAssetResponse.md) - [CreateWalletRequest](docs/CreateWalletRequest.md) + - [CreateWebhookOAuthRequest](docs/CreateWebhookOAuthRequest.md) - [CreateWebhookRequest](docs/CreateWebhookRequest.md) - [CreateWorkflowExecutionRequestParamsInner](docs/CreateWorkflowExecutionRequestParamsInner.md) - [CustomRoutingDest](docs/CustomRoutingDest.md) @@ -1017,6 +1043,7 @@ Class | Method | HTTP request | Description - [DelegationSummary](docs/DelegationSummary.md) - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) + - [DeleteWebhookOAuthResponse](docs/DeleteWebhookOAuthResponse.md) - [DeployLayerZeroAdaptersRequest](docs/DeployLayerZeroAdaptersRequest.md) - [DeployableAddressResponse](docs/DeployableAddressResponse.md) - [DeployedContractNotFoundError](docs/DeployedContractNotFoundError.md) @@ -1032,6 +1059,8 @@ Class | Method | HTTP request | Description - [DirectAccess](docs/DirectAccess.md) - [DirectAccessProvider](docs/DirectAccessProvider.md) - [DirectAccessProviderInfo](docs/DirectAccessProviderInfo.md) + - [DirectAccessResponse](docs/DirectAccessResponse.md) + - [DirectAccessResponseInfo](docs/DirectAccessResponseInfo.md) - [DisbursementAmountInstruction](docs/DisbursementAmountInstruction.md) - [DisbursementConfigOperation](docs/DisbursementConfigOperation.md) - [DisbursementInstruction](docs/DisbursementInstruction.md) @@ -1082,6 +1111,7 @@ Class | Method | HTTP request | Description - [EmbeddedWalletSetupStatusResponse](docs/EmbeddedWalletSetupStatusResponse.md) - [EnableDevice](docs/EnableDevice.md) - [EnableWallet](docs/EnableWallet.md) + - [EndInvestorPayload](docs/EndInvestorPayload.md) - [ErrorResponse](docs/ErrorResponse.md) - [ErrorResponseError](docs/ErrorResponseError.md) - [ErrorSchema](docs/ErrorSchema.md) @@ -1253,6 +1283,7 @@ Class | Method | HTTP request | Description - [LegalEntityRegistration](docs/LegalEntityRegistration.md) - [LeiStatus](docs/LeiStatus.md) - [LinkedTokensCount](docs/LinkedTokensCount.md) + - [ListApprovalsResponse](docs/ListApprovalsResponse.md) - [ListAssetsResponse](docs/ListAssetsResponse.md) - [ListBlockchainsResponse](docs/ListBlockchainsResponse.md) - [ListBlockchainsResponse2](docs/ListBlockchainsResponse2.md) @@ -1309,7 +1340,17 @@ Class | Method | HTTP request | Description - [NotificationStatus](docs/NotificationStatus.md) - [NotificationWithData](docs/NotificationWithData.md) - [Offer](docs/Offer.md) + - [OfferResponse](docs/OfferResponse.md) + - [OfferResponseAccepted](docs/OfferResponseAccepted.md) + - [OfferResponseAllocation](docs/OfferResponseAllocation.md) + - [OfferResponseOnboarding](docs/OfferResponseOnboarding.md) + - [OfferResponseTransfer](docs/OfferResponseTransfer.md) - [OffersResponse](docs/OffersResponse.md) + - [OnboardingResponse](docs/OnboardingResponse.md) + - [OnboardingResponseDtccAccept](docs/OnboardingResponseDtccAccept.md) + - [OnboardingResponseDtccReject](docs/OnboardingResponseDtccReject.md) + - [OnboardingResponseTradewebAccept](docs/OnboardingResponseTradewebAccept.md) + - [OnboardingResponseTradewebReject](docs/OnboardingResponseTradewebReject.md) - [OnchainTransaction](docs/OnchainTransaction.md) - [OnchainTransactionsPagedResponse](docs/OnchainTransactionsPagedResponse.md) - [OnchainTransactionsPagedResponse2](docs/OnchainTransactionsPagedResponse2.md) @@ -1339,6 +1380,7 @@ Class | Method | HTTP request | Description - [PairApiKeyResponse](docs/PairApiKeyResponse.md) - [Parameter](docs/Parameter.md) - [ParameterWithValue](docs/ParameterWithValue.md) + - [ParticipantOnboardingPayload](docs/ParticipantOnboardingPayload.md) - [ParticipantRelationshipType](docs/ParticipantRelationshipType.md) - [ParticipantsIdentification](docs/ParticipantsIdentification.md) - [ParticipantsIdentificationPolicy](docs/ParticipantsIdentificationPolicy.md) @@ -1409,6 +1451,13 @@ Class | Method | HTTP request | Description - [PublicKeyInformation](docs/PublicKeyInformation.md) - [PublishDraftRequest](docs/PublishDraftRequest.md) - [PublishResult](docs/PublishResult.md) + - [QuorumApprovalState](docs/QuorumApprovalState.md) + - [QuorumGroup](docs/QuorumGroup.md) + - [QuorumRequestState](docs/QuorumRequestState.md) + - [QuorumRuleset](docs/QuorumRuleset.md) + - [QuorumStatus](docs/QuorumStatus.md) + - [QuorumStatusQuorum](docs/QuorumStatusQuorum.md) + - [QuorumUser](docs/QuorumUser.md) - [Quote](docs/Quote.md) - [QuoteExecutionRequestDetails](docs/QuoteExecutionRequestDetails.md) - [QuoteExecutionStep](docs/QuoteExecutionStep.md) @@ -1475,6 +1524,7 @@ Class | Method | HTTP request | Description - [RoleDetails](docs/RoleDetails.md) - [RoleDetails2](docs/RoleDetails2.md) - [RoleGrantee](docs/RoleGrantee.md) + - [RulesetQuorum](docs/RulesetQuorum.md) - [SEPAAddress](docs/SEPAAddress.md) - [SEPADestination](docs/SEPADestination.md) - [SOLAccount](docs/SOLAccount.md) @@ -1548,6 +1598,7 @@ Class | Method | HTTP request | Description - [SignedMessage](docs/SignedMessage.md) - [SignedMessageSignature](docs/SignedMessageSignature.md) - [SigningKeyDto](docs/SigningKeyDto.md) + - [SimpleQuorum](docs/SimpleQuorum.md) - [SmartTransferApproveTerm](docs/SmartTransferApproveTerm.md) - [SmartTransferBadRequestResponse](docs/SmartTransferBadRequestResponse.md) - [SmartTransferCoinStatistic](docs/SmartTransferCoinStatistic.md) @@ -1766,7 +1817,11 @@ Class | Method | HTTP request | Description - [TransferPeerTypeEnum2](docs/TransferPeerTypeEnum2.md) - [TransferRail](docs/TransferRail.md) - [TransferReceipt](docs/TransferReceipt.md) + - [TransferResponse](docs/TransferResponse.md) + - [TransferResponseAccept](docs/TransferResponseAccept.md) + - [TransferResponseReject](docs/TransferResponseReject.md) - [TransferValidationFailure](docs/TransferValidationFailure.md) + - [TransferWithdrawPayload](docs/TransferWithdrawPayload.md) - [TravelRuleActionEnum](docs/TravelRuleActionEnum.md) - [TravelRuleAddress](docs/TravelRuleAddress.md) - [TravelRuleCreateTransactionRequest](docs/TravelRuleCreateTransactionRequest.md) @@ -1840,6 +1895,7 @@ Class | Method | HTTP request | Description - [UpdateTokenOwnershipStatusDto](docs/UpdateTokenOwnershipStatusDto.md) - [UpdateVaultAccountAssetAddressRequest](docs/UpdateVaultAccountAssetAddressRequest.md) - [UpdateVaultAccountRequest](docs/UpdateVaultAccountRequest.md) + - [UpdateWebhookOAuthRequest](docs/UpdateWebhookOAuthRequest.md) - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) - [UsWirePaymentInfo](docs/UsWirePaymentInfo.md) - [UsdcGatewayWalletAsset](docs/UsdcGatewayWalletAsset.md) @@ -1886,6 +1942,7 @@ Class | Method | HTTP request | Description - [WebhookMtls](docs/WebhookMtls.md) - [WebhookMtlsCsrResponse](docs/WebhookMtlsCsrResponse.md) - [WebhookOAuth](docs/WebhookOAuth.md) + - [WebhookOAuthCredentials](docs/WebhookOAuthCredentials.md) - [WebhookOAuthResponse](docs/WebhookOAuthResponse.md) - [WebhookPaginatedResponse](docs/WebhookPaginatedResponse.md) - [WithdrawRequest](docs/WithdrawRequest.md) diff --git a/docs/AccessTypeResponse.md b/docs/AccessTypeResponse.md new file mode 100644 index 00000000..b412bab8 --- /dev/null +++ b/docs/AccessTypeResponse.md @@ -0,0 +1,33 @@ +# AccessTypeResponse + +Response-only counterpart of AccessType. Used by the `via` field of response schemas (Quote, Rate, OrderDetails, OrderSummary — and therefore QuoteOffer, RateOffer and Offer) so that the PROVIDER variant can expose `subProviders` without that field ever becoming reachable from a request body. Request schemas (CreateOrderRequest.via) keep using AccessType. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Indicates this uses account-based access | +**provider_id** | **str** | The ID of the provider | +**account_id** | **str** | The ID of the account | +**sub_providers** | **List[str]** | The underlying providers or tools that this direct-access route is composed of, in execution order. Response-only: this field is populated by the server and is never accepted from client requests. | [optional] + +## Example + +```python +from fireblocks.models.access_type_response import AccessTypeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AccessTypeResponse from a JSON string +access_type_response_instance = AccessTypeResponse.from_json(json) +# print the JSON string representation of the object +print(AccessTypeResponse.to_json()) + +# convert the object into a dict +access_type_response_dict = access_type_response_instance.to_dict() +# create an instance of AccessTypeResponse from a dict +access_type_response_from_dict = AccessTypeResponse.from_dict(access_type_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/AccountAccessResponse.md b/docs/AccountAccessResponse.md new file mode 100644 index 00000000..e9134966 --- /dev/null +++ b/docs/AccountAccessResponse.md @@ -0,0 +1,32 @@ +# AccountAccessResponse + +Response-only counterpart of AccountAccess. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Indicates this uses account-based access | +**provider_id** | **str** | The ID of the provider | [optional] +**account_id** | **str** | The ID of the account | + +## Example + +```python +from fireblocks.models.account_access_response import AccountAccessResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountAccessResponse from a JSON string +account_access_response_instance = AccountAccessResponse.from_json(json) +# print the JSON string representation of the object +print(AccountAccessResponse.to_json()) + +# convert the object into a dict +account_access_response_dict = account_access_response_instance.to_dict() +# create an instance of AccountAccessResponse from a dict +account_access_response_from_dict = AccountAccessResponse.from_dict(account_access_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/AllocationResponse.md b/docs/AllocationResponse.md new file mode 100644 index 00000000..c7deb219 --- /dev/null +++ b/docs/AllocationResponse.md @@ -0,0 +1,29 @@ +# AllocationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the allocation request. | + +## Example + +```python +from fireblocks.models.allocation_response import AllocationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AllocationResponse from a JSON string +allocation_response_instance = AllocationResponse.from_json(json) +# print the JSON string representation of the object +print(AllocationResponse.to_json()) + +# convert the object into a dict +allocation_response_dict = allocation_response_instance.to_dict() +# create an instance of AllocationResponse from a dict +allocation_response_from_dict = AllocationResponse.from_dict(allocation_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/AllocationResponseAccept.md b/docs/AllocationResponseAccept.md new file mode 100644 index 00000000..8e68b38e --- /dev/null +++ b/docs/AllocationResponseAccept.md @@ -0,0 +1,30 @@ +# AllocationResponseAccept + +Accept a CIP-56 allocation request. Carries no arguments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the allocation request. | + +## Example + +```python +from fireblocks.models.allocation_response_accept import AllocationResponseAccept + +# TODO update the JSON string below +json = "{}" +# create an instance of AllocationResponseAccept from a JSON string +allocation_response_accept_instance = AllocationResponseAccept.from_json(json) +# print the JSON string representation of the object +print(AllocationResponseAccept.to_json()) + +# convert the object into a dict +allocation_response_accept_dict = allocation_response_accept_instance.to_dict() +# create an instance of AllocationResponseAccept from a dict +allocation_response_accept_from_dict = AllocationResponseAccept.from_dict(allocation_response_accept_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/AllocationResponseReject.md b/docs/AllocationResponseReject.md new file mode 100644 index 00000000..ddf97c4d --- /dev/null +++ b/docs/AllocationResponseReject.md @@ -0,0 +1,30 @@ +# AllocationResponseReject + +Reject a CIP-56 allocation request. Carries no arguments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the allocation request. | + +## Example + +```python +from fireblocks.models.allocation_response_reject import AllocationResponseReject + +# TODO update the JSON string below +json = "{}" +# create an instance of AllocationResponseReject from a JSON string +allocation_response_reject_instance = AllocationResponseReject.from_json(json) +# print the JSON string representation of the object +print(AllocationResponseReject.to_json()) + +# convert the object into a dict +allocation_response_reject_dict = allocation_response_reject_instance.to_dict() +# create an instance of AllocationResponseReject from a dict +allocation_response_reject_from_dict = AllocationResponseReject.from_dict(allocation_response_reject_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/AllocationWithdrawPayload.md b/docs/AllocationWithdrawPayload.md new file mode 100644 index 00000000..4ae3e76f --- /dev/null +++ b/docs/AllocationWithdrawPayload.md @@ -0,0 +1,31 @@ +# AllocationWithdrawPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vault_account_id** | **str** | The vault account whose Canton wallet acts here. | +**asset** | **str** | Chain asset — `CANTON` or `CANTON_TEST`. | +**allocation_transaction_id** | **str** | The Fireblocks transaction id of the outgoing response that created the allocation. The allocation is resolved from it — Canton contract ids are never accepted here. | + +## Example + +```python +from fireblocks.models.allocation_withdraw_payload import AllocationWithdrawPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of AllocationWithdrawPayload from a JSON string +allocation_withdraw_payload_instance = AllocationWithdrawPayload.from_json(json) +# print the JSON string representation of the object +print(AllocationWithdrawPayload.to_json()) + +# convert the object into a dict +allocation_withdraw_payload_dict = allocation_withdraw_payload_instance.to_dict() +# create an instance of AllocationWithdrawPayload from a dict +allocation_withdraw_payload_from_dict = AllocationWithdrawPayload.from_dict(allocation_withdraw_payload_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/AllowListPayload.md b/docs/AllowListPayload.md new file mode 100644 index 00000000..7dbc8e66 --- /dev/null +++ b/docs/AllowListPayload.md @@ -0,0 +1,31 @@ +# AllowListPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vault_account_id** | **str** | The vault account whose Canton wallet acts here. | +**asset** | **str** | Chain asset — `CANTON` or `CANTON_TEST`. | +**wallets** | **List[str]** | Canton party ids to add or remove. | + +## Example + +```python +from fireblocks.models.allow_list_payload import AllowListPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of AllowListPayload from a JSON string +allow_list_payload_instance = AllowListPayload.from_json(json) +# print the JSON string representation of the object +print(AllowListPayload.to_json()) + +# convert the object into a dict +allow_list_payload_dict = allow_list_payload_instance.to_dict() +# create an instance of AllowListPayload from a dict +allow_list_payload_from_dict = AllowListPayload.from_dict(allow_list_payload_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/ApprovalRequestItem.md b/docs/ApprovalRequestItem.md new file mode 100644 index 00000000..76fafc80 --- /dev/null +++ b/docs/ApprovalRequestItem.md @@ -0,0 +1,32 @@ +# ApprovalRequestItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_payload** | **str** | The pending approval request as a JSON string, exactly as produced by the backend — this is the precise string to sign in order to approve the request (sign it as-is; do not re-serialize). The JSON has the shape { requestId, requestType, requestTimestamp (epoch ms), expiresAt (epoch seconds), requestData }, where requestData is the request-type-specific payload. | +**request_signature** | **str** | Signature over the requestPayload. Empty until request signing is implemented. | [optional] +**user_status** | **str** | The authenticated user's approval status for this request. | +**quorum_status** | [**QuorumStatus**](QuorumStatus.md) | | [optional] + +## Example + +```python +from fireblocks.models.approval_request_item import ApprovalRequestItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ApprovalRequestItem from a JSON string +approval_request_item_instance = ApprovalRequestItem.from_json(json) +# print the JSON string representation of the object +print(ApprovalRequestItem.to_json()) + +# convert the object into a dict +approval_request_item_dict = approval_request_item_instance.to_dict() +# create an instance of ApprovalRequestItem from a dict +approval_request_item_from_dict = ApprovalRequestItem.from_dict(approval_request_item_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/ApprovalsBetaApi.md b/docs/ApprovalsBetaApi.md new file mode 100644 index 00000000..3f1950fb --- /dev/null +++ b/docs/ApprovalsBetaApi.md @@ -0,0 +1,184 @@ +# fireblocks.ApprovalsBetaApi + +All URIs are relative to *https://api.fireblocks.io/v1* + +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 + + +# **get_approval_by_id** +> ApprovalRequestItem get_approval_by_id(request_id, user_id=user_id, quorum_status_mode=quorum_status_mode) + +Get a single approval request + +Retrieve full detail for a single approval request by ID, including the payload to sign and, when requested, the request's `quorumStatus`. + +Because this endpoint addresses one request, it accepts `quorumStatusMode=FULL`, which adds the participating approvers and their individual approval state. + +`userStatus` reflects the authenticated user by default. Pass `userId` to report it for another user instead. + +Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. + +### Example + + +```python +from fireblocks.models.approval_request_item import ApprovalRequestItem +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: + request_id = 'request_id_example' # str | The approval request ID. + user_id = '8f3c1a2e-4b7d-4c91-a0e5-2d6f8b1c3a94' # str | Report `userStatus` for this user instead of the authenticated user. This selects whose approval state is returned; it does not change which requests can be fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. (optional) + quorum_status_mode = NONE # str | How much quorum detail to include in `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` adds `users` and the per-group `members` indexes identifying who may approve and who already has. Any other value is rejected with 400; the parameter is case-sensitive. (optional) (default to NONE) + + try: + # Get a single approval request + api_response = fireblocks.approvals_beta.get_approval_by_id(request_id, user_id=user_id, quorum_status_mode=quorum_status_mode).result() + print("The response of ApprovalsBetaApi->get_approval_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApprovalsBetaApi->get_approval_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_id** | **str**| The approval request ID. | + **user_id** | **str**| Report `userStatus` for this user instead of the authenticated user. This selects whose approval state is returned; it does not change which requests can be fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. | [optional] + **quorum_status_mode** | **str**| How much quorum detail to include in `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` adds `users` and the per-group `members` indexes identifying who may approve and who already has. Any other value is rejected with 400; the parameter is case-sensitive. | [optional] [default to NONE] + +### Return type + +[**ApprovalRequestItem**](ApprovalRequestItem.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The requested approval request. | * 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) + +# **get_approvals** +> ListApprovalsResponse get_approvals(include_user_approved=include_user_approved, user_id=user_id, include_all_users=include_all_users, quorum_status_mode=quorum_status_mode, page_size=page_size, page_cursor=page_cursor) + +List approval requests + +Retrieve the pending approval requests the authenticated API user is eligible to act on, including requests the user has already approved that are still pending overall. + +The response is scoped to the authenticated user by default. Pass `userId` to read another user's queue, or `includeAllUsers=true` to read every pending request in the workspace. Both require an Admin, Non-Signing Admin, Security Admin or Security Auditor role and are rejected with 403 otherwise. + +Set `quorumStatusMode=SUMMARY` to include each request's approval thresholds and counts. The per-approver breakdown is available only when fetching a single request — see `GET /approvals/{requestId}`. + +Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. + +### Example + + +```python +from fireblocks.models.list_approvals_response import ListApprovalsResponse +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: + include_user_approved = True # bool | When true, also include requests the authenticated user has already approved that are still pending overall. Defaults to false (only requests the user has not yet acted on). (optional) + user_id = '8f3c1a2e-4b7d-4c91-a0e5-2d6f8b1c3a94' # str | Return the pending requests for this user instead of the authenticated user. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. Cannot be combined with `includeAllUsers=true` — sending both is rejected with 400. (optional) + include_all_users = False # bool | When true, return every pending request in the workspace instead of a single user's queue. Defaults to false. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the response is not scoped to one user, and `includeUserApproved` has no effect. Cannot be combined with `userId`. (optional) (default to False) + quorum_status_mode = NONE # str | How much quorum detail to include in each request's `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` is rejected with 400 on this endpoint because the per-approver breakdown requires a single request — use `GET /approvals/{requestId}` for it. Any other value is rejected with 400; the parameter is case-sensitive. (optional) (default to NONE) + page_size = 20 # int | Number of results per page. Maximum 30. Defaults to 20. (optional) (default to 20) + page_cursor = 'page_cursor_example' # str | Cursor returned from the previous response (the `next` field) to fetch the next page. (optional) + + try: + # List approval requests + api_response = fireblocks.approvals_beta.get_approvals(include_user_approved=include_user_approved, user_id=user_id, include_all_users=include_all_users, quorum_status_mode=quorum_status_mode, page_size=page_size, page_cursor=page_cursor).result() + print("The response of ApprovalsBetaApi->get_approvals:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApprovalsBetaApi->get_approvals: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **include_user_approved** | **bool**| When true, also include requests the authenticated user has already approved that are still pending overall. Defaults to false (only requests the user has not yet acted on). | [optional] + **user_id** | **str**| Return the pending requests for this user instead of the authenticated user. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. Cannot be combined with `includeAllUsers=true` — sending both is rejected with 400. | [optional] + **include_all_users** | **bool**| When true, return every pending request in the workspace instead of a single user's queue. Defaults to false. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the response is not scoped to one user, and `includeUserApproved` has no effect. Cannot be combined with `userId`. | [optional] [default to False] + **quorum_status_mode** | **str**| How much quorum detail to include in each request's `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` is rejected with 400 on this endpoint because the per-approver breakdown requires a single request — use `GET /approvals/{requestId}` for it. Any other value is rejected with 400; the parameter is case-sensitive. | [optional] [default to NONE] + **page_size** | **int**| Number of results per page. Maximum 30. Defaults to 20. | [optional] [default to 20] + **page_cursor** | **str**| Cursor returned from the previous response (the `next` field) to fetch the next page. | [optional] + +### Return type + +[**ListApprovalsResponse**](ListApprovalsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Approval requests the authenticated user is eligible to act on. | * 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/CallAccepted.md b/docs/CallAccepted.md new file mode 100644 index 00000000..e8f401f5 --- /dev/null +++ b/docs/CallAccepted.md @@ -0,0 +1,31 @@ +# CallAccepted + +The outgoing transaction that carries the call. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_id** | **str** | The outgoing transaction that carries the call. | +**status** | **str** | The transaction's status at the time of this response — `SUBMITTED`. | + +## Example + +```python +from fireblocks.models.call_accepted import CallAccepted + +# TODO update the JSON string below +json = "{}" +# create an instance of CallAccepted from a JSON string +call_accepted_instance = CallAccepted.from_json(json) +# print the JSON string representation of the object +print(CallAccepted.to_json()) + +# convert the object into a dict +call_accepted_dict = call_accepted_instance.to_dict() +# create an instance of CallAccepted from a dict +call_accepted_from_dict = CallAccepted.from_dict(call_accepted_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/CantonCall.md b/docs/CantonCall.md new file mode 100644 index 00000000..dd5c3492 --- /dev/null +++ b/docs/CantonCall.md @@ -0,0 +1,30 @@ +# CantonCall + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Which call to make. Selects the shape of `payload`. | +**payload** | [**TransferWithdrawPayload**](TransferWithdrawPayload.md) | | + +## Example + +```python +from fireblocks.models.canton_call import CantonCall + +# TODO update the JSON string below +json = "{}" +# create an instance of CantonCall from a JSON string +canton_call_instance = CantonCall.from_json(json) +# print the JSON string representation of the object +print(CantonCall.to_json()) + +# convert the object into a dict +canton_call_dict = canton_call_instance.to_dict() +# create an instance of CantonCall from a dict +canton_call_from_dict = CantonCall.from_dict(canton_call_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/CantonCallAllocationWithdraw.md b/docs/CantonCallAllocationWithdraw.md new file mode 100644 index 00000000..8a0e74c9 --- /dev/null +++ b/docs/CantonCallAllocationWithdraw.md @@ -0,0 +1,30 @@ +# CantonCallAllocationWithdraw + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Which call to make. Selects the shape of `payload`. | +**payload** | [**AllocationWithdrawPayload**](AllocationWithdrawPayload.md) | | + +## Example + +```python +from fireblocks.models.canton_call_allocation_withdraw import CantonCallAllocationWithdraw + +# TODO update the JSON string below +json = "{}" +# create an instance of CantonCallAllocationWithdraw from a JSON string +canton_call_allocation_withdraw_instance = CantonCallAllocationWithdraw.from_json(json) +# print the JSON string representation of the object +print(CantonCallAllocationWithdraw.to_json()) + +# convert the object into a dict +canton_call_allocation_withdraw_dict = canton_call_allocation_withdraw_instance.to_dict() +# create an instance of CantonCallAllocationWithdraw from a dict +canton_call_allocation_withdraw_from_dict = CantonCallAllocationWithdraw.from_dict(canton_call_allocation_withdraw_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/CantonCallAllowListAdd.md b/docs/CantonCallAllowListAdd.md new file mode 100644 index 00000000..1dabef9f --- /dev/null +++ b/docs/CantonCallAllowListAdd.md @@ -0,0 +1,30 @@ +# CantonCallAllowListAdd + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Which call to make. Selects the shape of `payload`. | +**payload** | [**AllowListPayload**](AllowListPayload.md) | | + +## Example + +```python +from fireblocks.models.canton_call_allow_list_add import CantonCallAllowListAdd + +# TODO update the JSON string below +json = "{}" +# create an instance of CantonCallAllowListAdd from a JSON string +canton_call_allow_list_add_instance = CantonCallAllowListAdd.from_json(json) +# print the JSON string representation of the object +print(CantonCallAllowListAdd.to_json()) + +# convert the object into a dict +canton_call_allow_list_add_dict = canton_call_allow_list_add_instance.to_dict() +# create an instance of CantonCallAllowListAdd from a dict +canton_call_allow_list_add_from_dict = CantonCallAllowListAdd.from_dict(canton_call_allow_list_add_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/CantonCallAllowListRemove.md b/docs/CantonCallAllowListRemove.md new file mode 100644 index 00000000..b43e3f95 --- /dev/null +++ b/docs/CantonCallAllowListRemove.md @@ -0,0 +1,30 @@ +# CantonCallAllowListRemove + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Which call to make. Selects the shape of `payload`. | +**payload** | [**AllowListPayload**](AllowListPayload.md) | | + +## Example + +```python +from fireblocks.models.canton_call_allow_list_remove import CantonCallAllowListRemove + +# TODO update the JSON string below +json = "{}" +# create an instance of CantonCallAllowListRemove from a JSON string +canton_call_allow_list_remove_instance = CantonCallAllowListRemove.from_json(json) +# print the JSON string representation of the object +print(CantonCallAllowListRemove.to_json()) + +# convert the object into a dict +canton_call_allow_list_remove_dict = canton_call_allow_list_remove_instance.to_dict() +# create an instance of CantonCallAllowListRemove from a dict +canton_call_allow_list_remove_from_dict = CantonCallAllowListRemove.from_dict(canton_call_allow_list_remove_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/CantonCallEndInvestorInvite.md b/docs/CantonCallEndInvestorInvite.md new file mode 100644 index 00000000..1e3262a0 --- /dev/null +++ b/docs/CantonCallEndInvestorInvite.md @@ -0,0 +1,30 @@ +# CantonCallEndInvestorInvite + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Which call to make. Selects the shape of `payload`. | +**payload** | [**EndInvestorPayload**](EndInvestorPayload.md) | | + +## Example + +```python +from fireblocks.models.canton_call_end_investor_invite import CantonCallEndInvestorInvite + +# TODO update the JSON string below +json = "{}" +# create an instance of CantonCallEndInvestorInvite from a JSON string +canton_call_end_investor_invite_instance = CantonCallEndInvestorInvite.from_json(json) +# print the JSON string representation of the object +print(CantonCallEndInvestorInvite.to_json()) + +# convert the object into a dict +canton_call_end_investor_invite_dict = canton_call_end_investor_invite_instance.to_dict() +# create an instance of CantonCallEndInvestorInvite from a dict +canton_call_end_investor_invite_from_dict = CantonCallEndInvestorInvite.from_dict(canton_call_end_investor_invite_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/CantonCallEndInvestorInviteCancel.md b/docs/CantonCallEndInvestorInviteCancel.md new file mode 100644 index 00000000..b8711bed --- /dev/null +++ b/docs/CantonCallEndInvestorInviteCancel.md @@ -0,0 +1,30 @@ +# CantonCallEndInvestorInviteCancel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Which call to make. Selects the shape of `payload`. | +**payload** | [**EndInvestorPayload**](EndInvestorPayload.md) | | + +## Example + +```python +from fireblocks.models.canton_call_end_investor_invite_cancel import CantonCallEndInvestorInviteCancel + +# TODO update the JSON string below +json = "{}" +# create an instance of CantonCallEndInvestorInviteCancel from a JSON string +canton_call_end_investor_invite_cancel_instance = CantonCallEndInvestorInviteCancel.from_json(json) +# print the JSON string representation of the object +print(CantonCallEndInvestorInviteCancel.to_json()) + +# convert the object into a dict +canton_call_end_investor_invite_cancel_dict = canton_call_end_investor_invite_cancel_instance.to_dict() +# create an instance of CantonCallEndInvestorInviteCancel from a dict +canton_call_end_investor_invite_cancel_from_dict = CantonCallEndInvestorInviteCancel.from_dict(canton_call_end_investor_invite_cancel_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/CantonCallEndInvestorOffboard.md b/docs/CantonCallEndInvestorOffboard.md new file mode 100644 index 00000000..f9732f49 --- /dev/null +++ b/docs/CantonCallEndInvestorOffboard.md @@ -0,0 +1,30 @@ +# CantonCallEndInvestorOffboard + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Which call to make. Selects the shape of `payload`. | +**payload** | [**EndInvestorPayload**](EndInvestorPayload.md) | | + +## Example + +```python +from fireblocks.models.canton_call_end_investor_offboard import CantonCallEndInvestorOffboard + +# TODO update the JSON string below +json = "{}" +# create an instance of CantonCallEndInvestorOffboard from a JSON string +canton_call_end_investor_offboard_instance = CantonCallEndInvestorOffboard.from_json(json) +# print the JSON string representation of the object +print(CantonCallEndInvestorOffboard.to_json()) + +# convert the object into a dict +canton_call_end_investor_offboard_dict = canton_call_end_investor_offboard_instance.to_dict() +# create an instance of CantonCallEndInvestorOffboard from a dict +canton_call_end_investor_offboard_from_dict = CantonCallEndInvestorOffboard.from_dict(canton_call_end_investor_offboard_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/CantonCallParticipantOnboarding.md b/docs/CantonCallParticipantOnboarding.md new file mode 100644 index 00000000..16e22aae --- /dev/null +++ b/docs/CantonCallParticipantOnboarding.md @@ -0,0 +1,30 @@ +# CantonCallParticipantOnboarding + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Which call to make. Selects the shape of `payload`. | +**payload** | [**ParticipantOnboardingPayload**](ParticipantOnboardingPayload.md) | | + +## Example + +```python +from fireblocks.models.canton_call_participant_onboarding import CantonCallParticipantOnboarding + +# TODO update the JSON string below +json = "{}" +# create an instance of CantonCallParticipantOnboarding from a JSON string +canton_call_participant_onboarding_instance = CantonCallParticipantOnboarding.from_json(json) +# print the JSON string representation of the object +print(CantonCallParticipantOnboarding.to_json()) + +# convert the object into a dict +canton_call_participant_onboarding_dict = canton_call_participant_onboarding_instance.to_dict() +# create an instance of CantonCallParticipantOnboarding from a dict +canton_call_participant_onboarding_from_dict = CantonCallParticipantOnboarding.from_dict(canton_call_participant_onboarding_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/CantonCallTransferWithdraw.md b/docs/CantonCallTransferWithdraw.md new file mode 100644 index 00000000..325d7fb1 --- /dev/null +++ b/docs/CantonCallTransferWithdraw.md @@ -0,0 +1,30 @@ +# CantonCallTransferWithdraw + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Which call to make. Selects the shape of `payload`. | +**payload** | [**TransferWithdrawPayload**](TransferWithdrawPayload.md) | | + +## Example + +```python +from fireblocks.models.canton_call_transfer_withdraw import CantonCallTransferWithdraw + +# TODO update the JSON string below +json = "{}" +# create an instance of CantonCallTransferWithdraw from a JSON string +canton_call_transfer_withdraw_instance = CantonCallTransferWithdraw.from_json(json) +# print the JSON string representation of the object +print(CantonCallTransferWithdraw.to_json()) + +# convert the object into a dict +canton_call_transfer_withdraw_dict = canton_call_transfer_withdraw_instance.to_dict() +# create an instance of CantonCallTransferWithdraw from a dict +canton_call_transfer_withdraw_from_dict = CantonCallTransferWithdraw.from_dict(canton_call_transfer_withdraw_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/CreateWebhookOAuthRequest.md b/docs/CreateWebhookOAuthRequest.md new file mode 100644 index 00000000..bfacaf29 --- /dev/null +++ b/docs/CreateWebhookOAuthRequest.md @@ -0,0 +1,38 @@ +# 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. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A label for this credential set, shown when listing them. | +**client_id** | **str** | OAuth client ID used to authenticate with the token endpoint. | +**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] +**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 + +# 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) +# print the JSON string representation of the object +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) +``` +[[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 58f99239..d282ca72 100644 --- a/docs/CreateWebhookRequest.md +++ b/docs/CreateWebhookRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **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, str]** | Custom HTTP headers attached to every notification delivered by this webhook (max 10). Header names must be valid RFC 7230 tokens (printable ASCII, no separators), are treated case-insensitively (duplicate names differing only in case are rejected), and may not exceed 128 characters. The following names are reserved and cannot be used: Host, Content-Type, Content-Length, Transfer-Encoding, Connection, User-Agent, Accept, Accept-Encoding, Fireblocks-Signature, Fireblocks-Webhook-Signature. Header values are write-only — never returned in responses. | [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] ## Example diff --git a/docs/DeleteWebhookOAuthResponse.md b/docs/DeleteWebhookOAuthResponse.md new file mode 100644 index 00000000..bf28f10c --- /dev/null +++ b/docs/DeleteWebhookOAuthResponse.md @@ -0,0 +1,41 @@ +# 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. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The id of the OAuth credentials. Pass this as a webhook's `webhookOauthId` to attach them. | +**name** | **str** | The label given to this credential set. | +**client_id** | **str** | OAuth client ID used to authenticate with the token endpoint. | +**url** | **str** | Token endpoint URL. | +**auth_method** | **str** | How the client credentials are presented to the token endpoint: `client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Credentials created without this field report `client_secret_basic`, which is what they use. | [default to 'client_secret_basic'] +**custom_jwt_claims** | **List[str]** | Names of the additional claims placed in the JWT assertion. Claim values are write-only and are never returned. Absent when no custom claims are configured. | [optional] +**custom_body_params** | **List[str]** | Names of the additional parameters added to the token request body. Parameter values are write-only and are never returned. Absent when no custom parameters are configured. | [optional] +**custom_headers** | **List[str]** | Names of the additional HTTP headers added to **the token request sent to the authorization server** — not to the webhook delivery, which has its own separate `customHeaders`. Header values are write-only and are never returned. Absent when no custom headers are configured. | [optional] +**mtls_client_signed_cert** | **str** | PEM-encoded client certificate used for mTLS when fetching OAuth tokens. | [optional] +**created_at** | **int** | The date and time the OAuth credentials were created, in milliseconds. | +**updated_at** | **int** | The date and time the OAuth credentials were last updated, in milliseconds. | +**detached_webhook_ids** | **List[str]** | Webhooks whose `webhookOauthId` was cleared. The webhooks themselves are not deleted and keep delivering, just without an `Authorization` header. Empty unless `forceDelete=true` detached something. | + +## Example + +```python +from fireblocks.models.delete_webhook_o_auth_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) +# print the JSON string representation of the object +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) +``` +[[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/DirectAccessResponse.md b/docs/DirectAccessResponse.md new file mode 100644 index 00000000..bbc29301 --- /dev/null +++ b/docs/DirectAccessResponse.md @@ -0,0 +1,32 @@ +# DirectAccessResponse + +Response-only counterpart of DirectAccess. Adds the server-populated `subProviders` field. Never use this schema in a request body — requests must keep using DirectAccess (via AccessType). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Indicates this uses direct provider access | +**provider_id** | **str** | The ID of the provider | +**sub_providers** | **List[str]** | The underlying providers or tools that this direct-access route is composed of, in execution order. Response-only: this field is populated by the server and is never accepted from client requests. | [optional] + +## Example + +```python +from fireblocks.models.direct_access_response import DirectAccessResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DirectAccessResponse from a JSON string +direct_access_response_instance = DirectAccessResponse.from_json(json) +# print the JSON string representation of the object +print(DirectAccessResponse.to_json()) + +# convert the object into a dict +direct_access_response_dict = direct_access_response_instance.to_dict() +# create an instance of DirectAccessResponse from a dict +direct_access_response_from_dict = DirectAccessResponse.from_dict(direct_access_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/DirectAccessResponseInfo.md b/docs/DirectAccessResponseInfo.md new file mode 100644 index 00000000..17f15cbd --- /dev/null +++ b/docs/DirectAccessResponseInfo.md @@ -0,0 +1,29 @@ +# DirectAccessResponseInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sub_providers** | **List[str]** | The underlying providers or tools that this direct-access route is composed of, in execution order. Response-only: this field is populated by the server and is never accepted from client requests. | [optional] + +## Example + +```python +from fireblocks.models.direct_access_response_info import DirectAccessResponseInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of DirectAccessResponseInfo from a JSON string +direct_access_response_info_instance = DirectAccessResponseInfo.from_json(json) +# print the JSON string representation of the object +print(DirectAccessResponseInfo.to_json()) + +# convert the object into a dict +direct_access_response_info_dict = direct_access_response_info_instance.to_dict() +# create an instance of DirectAccessResponseInfo from a dict +direct_access_response_info_from_dict = DirectAccessResponseInfo.from_dict(direct_access_response_info_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/EndInvestorPayload.md b/docs/EndInvestorPayload.md new file mode 100644 index 00000000..f41516d8 --- /dev/null +++ b/docs/EndInvestorPayload.md @@ -0,0 +1,32 @@ +# EndInvestorPayload + +Shared by invite / invite-cancel / offboard — identical wire shape, different verb. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vault_account_id** | **str** | The vault account whose Canton wallet acts here. | +**asset** | **str** | Chain asset — `CANTON` or `CANTON_TEST`. | +**end_investor** | **str** | The end investor's Canton party id. | + +## Example + +```python +from fireblocks.models.end_investor_payload import EndInvestorPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of EndInvestorPayload from a JSON string +end_investor_payload_instance = EndInvestorPayload.from_json(json) +# print the JSON string representation of the object +print(EndInvestorPayload.to_json()) + +# convert the object into a dict +end_investor_payload_dict = end_investor_payload_instance.to_dict() +# create an instance of EndInvestorPayload from a dict +end_investor_payload_from_dict = EndInvestorPayload.from_dict(end_investor_payload_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/GetFindingsExternalResponse.md b/docs/GetFindingsExternalResponse.md index ed0cd060..008813b7 100644 --- a/docs/GetFindingsExternalResponse.md +++ b/docs/GetFindingsExternalResponse.md @@ -1,6 +1,5 @@ # GetFindingsExternalResponse -A paginated list of FSPM findings ## Properties diff --git a/docs/ListApprovalsResponse.md b/docs/ListApprovalsResponse.md new file mode 100644 index 00000000..b31c1552 --- /dev/null +++ b/docs/ListApprovalsResponse.md @@ -0,0 +1,30 @@ +# ListApprovalsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[ApprovalRequestItem]**](ApprovalRequestItem.md) | The approval requests the authenticated user is eligible to act on. | +**next** | **str** | Cursor for the next page of results. Pass it back as the `pageCursor` query param to fetch the next page. Empty or absent when this is the last page. | [optional] + +## Example + +```python +from fireblocks.models.list_approvals_response import ListApprovalsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListApprovalsResponse from a JSON string +list_approvals_response_instance = ListApprovalsResponse.from_json(json) +# print the JSON string representation of the object +print(ListApprovalsResponse.to_json()) + +# convert the object into a dict +list_approvals_response_dict = list_approvals_response_instance.to_dict() +# create an instance of ListApprovalsResponse from a dict +list_approvals_response_from_dict = ListApprovalsResponse.from_dict(list_approvals_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/Offer.md b/docs/Offer.md index 54e95f1e..1a25c0b0 100644 --- a/docs/Offer.md +++ b/docs/Offer.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**via** | [**AccessType**](AccessType.md) | | +**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | **base_asset_id** | **str** | The source asset identifier. | **base_asset_rail** | [**TransferRail**](TransferRail.md) | | [optional] **quote_asset_id** | **str** | The target asset identifier. | diff --git a/docs/OfferResponse.md b/docs/OfferResponse.md new file mode 100644 index 00000000..a9416d3e --- /dev/null +++ b/docs/OfferResponse.md @@ -0,0 +1,30 @@ +# OfferResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | Which offer domain this response belongs to. Selects the shape of `response`. | +**response** | [**TransferResponse**](TransferResponse.md) | | + +## Example + +```python +from fireblocks.models.offer_response import OfferResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of OfferResponse from a JSON string +offer_response_instance = OfferResponse.from_json(json) +# print the JSON string representation of the object +print(OfferResponse.to_json()) + +# convert the object into a dict +offer_response_dict = offer_response_instance.to_dict() +# create an instance of OfferResponse from a dict +offer_response_from_dict = OfferResponse.from_dict(offer_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/OfferResponseAccepted.md b/docs/OfferResponseAccepted.md new file mode 100644 index 00000000..916d522b --- /dev/null +++ b/docs/OfferResponseAccepted.md @@ -0,0 +1,32 @@ +# OfferResponseAccepted + +The outgoing transaction that carries the response. Its on-chain outcome arrives by webhook as a status update on this transaction. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_id** | **str** | The outgoing response transaction. | +**status** | **str** | The transaction's status at the time of this response — `SUBMITTED`. | +**response_type** | **str** | The response type you sent, echoed back so you can correlate without re-reading. | + +## Example + +```python +from fireblocks.models.offer_response_accepted import OfferResponseAccepted + +# TODO update the JSON string below +json = "{}" +# create an instance of OfferResponseAccepted from a JSON string +offer_response_accepted_instance = OfferResponseAccepted.from_json(json) +# print the JSON string representation of the object +print(OfferResponseAccepted.to_json()) + +# convert the object into a dict +offer_response_accepted_dict = offer_response_accepted_instance.to_dict() +# create an instance of OfferResponseAccepted from a dict +offer_response_accepted_from_dict = OfferResponseAccepted.from_dict(offer_response_accepted_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/OfferResponseAllocation.md b/docs/OfferResponseAllocation.md new file mode 100644 index 00000000..e594b1d6 --- /dev/null +++ b/docs/OfferResponseAllocation.md @@ -0,0 +1,30 @@ +# OfferResponseAllocation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | Which offer domain this response belongs to. Selects the shape of `response`. | +**response** | [**AllocationResponse**](AllocationResponse.md) | | + +## Example + +```python +from fireblocks.models.offer_response_allocation import OfferResponseAllocation + +# TODO update the JSON string below +json = "{}" +# create an instance of OfferResponseAllocation from a JSON string +offer_response_allocation_instance = OfferResponseAllocation.from_json(json) +# print the JSON string representation of the object +print(OfferResponseAllocation.to_json()) + +# convert the object into a dict +offer_response_allocation_dict = offer_response_allocation_instance.to_dict() +# create an instance of OfferResponseAllocation from a dict +offer_response_allocation_from_dict = OfferResponseAllocation.from_dict(offer_response_allocation_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/OfferResponseOnboarding.md b/docs/OfferResponseOnboarding.md new file mode 100644 index 00000000..1cb5e82a --- /dev/null +++ b/docs/OfferResponseOnboarding.md @@ -0,0 +1,30 @@ +# OfferResponseOnboarding + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | Which offer domain this response belongs to. Selects the shape of `response`. | +**response** | [**OnboardingResponse**](OnboardingResponse.md) | | + +## Example + +```python +from fireblocks.models.offer_response_onboarding import OfferResponseOnboarding + +# TODO update the JSON string below +json = "{}" +# create an instance of OfferResponseOnboarding from a JSON string +offer_response_onboarding_instance = OfferResponseOnboarding.from_json(json) +# print the JSON string representation of the object +print(OfferResponseOnboarding.to_json()) + +# convert the object into a dict +offer_response_onboarding_dict = offer_response_onboarding_instance.to_dict() +# create an instance of OfferResponseOnboarding from a dict +offer_response_onboarding_from_dict = OfferResponseOnboarding.from_dict(offer_response_onboarding_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/OfferResponseTransfer.md b/docs/OfferResponseTransfer.md new file mode 100644 index 00000000..af9ab952 --- /dev/null +++ b/docs/OfferResponseTransfer.md @@ -0,0 +1,30 @@ +# OfferResponseTransfer + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | Which offer domain this response belongs to. Selects the shape of `response`. | +**response** | [**TransferResponse**](TransferResponse.md) | | + +## Example + +```python +from fireblocks.models.offer_response_transfer import OfferResponseTransfer + +# TODO update the JSON string below +json = "{}" +# create an instance of OfferResponseTransfer from a JSON string +offer_response_transfer_instance = OfferResponseTransfer.from_json(json) +# print the JSON string representation of the object +print(OfferResponseTransfer.to_json()) + +# convert the object into a dict +offer_response_transfer_dict = offer_response_transfer_instance.to_dict() +# create an instance of OfferResponseTransfer from a dict +offer_response_transfer_from_dict = OfferResponseTransfer.from_dict(offer_response_transfer_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/OnboardingResponse.md b/docs/OnboardingResponse.md new file mode 100644 index 00000000..92e7763e --- /dev/null +++ b/docs/OnboardingResponse.md @@ -0,0 +1,30 @@ +# OnboardingResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. | +**reason** | **str** | Why the offer is being rejected. Recorded on-chain, where the counterparty can read it. | + +## Example + +```python +from fireblocks.models.onboarding_response import OnboardingResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of OnboardingResponse from a JSON string +onboarding_response_instance = OnboardingResponse.from_json(json) +# print the JSON string representation of the object +print(OnboardingResponse.to_json()) + +# convert the object into a dict +onboarding_response_dict = onboarding_response_instance.to_dict() +# create an instance of OnboardingResponse from a dict +onboarding_response_from_dict = OnboardingResponse.from_dict(onboarding_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/OnboardingResponseDtccAccept.md b/docs/OnboardingResponseDtccAccept.md new file mode 100644 index 00000000..511b8821 --- /dev/null +++ b/docs/OnboardingResponseDtccAccept.md @@ -0,0 +1,30 @@ +# OnboardingResponseDtccAccept + +Accept a DTCC end-investor onboarding offer. Carries no arguments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. | + +## Example + +```python +from fireblocks.models.onboarding_response_dtcc_accept import OnboardingResponseDtccAccept + +# TODO update the JSON string below +json = "{}" +# create an instance of OnboardingResponseDtccAccept from a JSON string +onboarding_response_dtcc_accept_instance = OnboardingResponseDtccAccept.from_json(json) +# print the JSON string representation of the object +print(OnboardingResponseDtccAccept.to_json()) + +# convert the object into a dict +onboarding_response_dtcc_accept_dict = onboarding_response_dtcc_accept_instance.to_dict() +# create an instance of OnboardingResponseDtccAccept from a dict +onboarding_response_dtcc_accept_from_dict = OnboardingResponseDtccAccept.from_dict(onboarding_response_dtcc_accept_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/OnboardingResponseDtccReject.md b/docs/OnboardingResponseDtccReject.md new file mode 100644 index 00000000..c1a6afdd --- /dev/null +++ b/docs/OnboardingResponseDtccReject.md @@ -0,0 +1,31 @@ +# OnboardingResponseDtccReject + +Reject a DTCC end-investor onboarding offer. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. | +**reason** | **str** | Why the offer is being rejected. Recorded on-chain, where the counterparty can read it. | + +## Example + +```python +from fireblocks.models.onboarding_response_dtcc_reject import OnboardingResponseDtccReject + +# TODO update the JSON string below +json = "{}" +# create an instance of OnboardingResponseDtccReject from a JSON string +onboarding_response_dtcc_reject_instance = OnboardingResponseDtccReject.from_json(json) +# print the JSON string representation of the object +print(OnboardingResponseDtccReject.to_json()) + +# convert the object into a dict +onboarding_response_dtcc_reject_dict = onboarding_response_dtcc_reject_instance.to_dict() +# create an instance of OnboardingResponseDtccReject from a dict +onboarding_response_dtcc_reject_from_dict = OnboardingResponseDtccReject.from_dict(onboarding_response_dtcc_reject_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/OnboardingResponseTradewebAccept.md b/docs/OnboardingResponseTradewebAccept.md new file mode 100644 index 00000000..11024d8c --- /dev/null +++ b/docs/OnboardingResponseTradewebAccept.md @@ -0,0 +1,30 @@ +# OnboardingResponseTradewebAccept + +Accept a Tradeweb co-signing delegation offer. Carries no arguments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. | + +## Example + +```python +from fireblocks.models.onboarding_response_tradeweb_accept import OnboardingResponseTradewebAccept + +# TODO update the JSON string below +json = "{}" +# create an instance of OnboardingResponseTradewebAccept from a JSON string +onboarding_response_tradeweb_accept_instance = OnboardingResponseTradewebAccept.from_json(json) +# print the JSON string representation of the object +print(OnboardingResponseTradewebAccept.to_json()) + +# convert the object into a dict +onboarding_response_tradeweb_accept_dict = onboarding_response_tradeweb_accept_instance.to_dict() +# create an instance of OnboardingResponseTradewebAccept from a dict +onboarding_response_tradeweb_accept_from_dict = OnboardingResponseTradewebAccept.from_dict(onboarding_response_tradeweb_accept_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/OnboardingResponseTradewebReject.md b/docs/OnboardingResponseTradewebReject.md new file mode 100644 index 00000000..a2917dc4 --- /dev/null +++ b/docs/OnboardingResponseTradewebReject.md @@ -0,0 +1,30 @@ +# OnboardingResponseTradewebReject + +Reject a Tradeweb co-signing delegation offer. Carries no arguments — the DAR has nowhere on-ledger to record a reason, so none is accepted. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`. | + +## Example + +```python +from fireblocks.models.onboarding_response_tradeweb_reject import OnboardingResponseTradewebReject + +# TODO update the JSON string below +json = "{}" +# create an instance of OnboardingResponseTradewebReject from a JSON string +onboarding_response_tradeweb_reject_instance = OnboardingResponseTradewebReject.from_json(json) +# print the JSON string representation of the object +print(OnboardingResponseTradewebReject.to_json()) + +# convert the object into a dict +onboarding_response_tradeweb_reject_dict = onboarding_response_tradeweb_reject_instance.to_dict() +# create an instance of OnboardingResponseTradewebReject from a dict +onboarding_response_tradeweb_reject_from_dict = OnboardingResponseTradewebReject.from_dict(onboarding_response_tradeweb_reject_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/OrderDetails.md b/docs/OrderDetails.md index afef4a91..c8556112 100644 --- a/docs/OrderDetails.md +++ b/docs/OrderDetails.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | -**via** | [**AccessType**](AccessType.md) | | +**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | **status** | [**OrderStatus**](OrderStatus.md) | | **created_at** | **datetime** | | **updated_at** | **datetime** | | [optional] diff --git a/docs/OrderSummary.md b/docs/OrderSummary.md index dbd2faf6..dc3f2f21 100644 --- a/docs/OrderSummary.md +++ b/docs/OrderSummary.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | -**via** | [**AccessType**](AccessType.md) | | +**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | **side** | [**Side**](Side.md) | | **base_amount** | **str** | | **quote_amount** | **str** | | [optional] diff --git a/docs/ParticipantOnboardingPayload.md b/docs/ParticipantOnboardingPayload.md new file mode 100644 index 00000000..16055988 --- /dev/null +++ b/docs/ParticipantOnboardingPayload.md @@ -0,0 +1,36 @@ +# ParticipantOnboardingPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vault_account_id** | **str** | The vault account that acts as the participant. Its Canton party is derived for you. | +**asset** | **str** | Chain asset — CANTON or CANTON_TEST. | +**expires_at** | **datetime** | When the onboarding request expires if it has not been answered. RFC 3339. | [optional] +**operator** | **str** | DTCC infra operator party id. | +**provider** | **str** | DTCC provider party id. | +**compliance** | **str** | DTCC compliance party id. | +**registrar** | **str** | DTCC registrar party id — co-signs the accept. | +**client_onboarder** | **str** | DTCC client onboarder party id — co-signs the accept. | + +## Example + +```python +from fireblocks.models.participant_onboarding_payload import ParticipantOnboardingPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of ParticipantOnboardingPayload from a JSON string +participant_onboarding_payload_instance = ParticipantOnboardingPayload.from_json(json) +# print the JSON string representation of the object +print(ParticipantOnboardingPayload.to_json()) + +# convert the object into a dict +participant_onboarding_payload_dict = participant_onboarding_payload_instance.to_dict() +# create an instance of ParticipantOnboardingPayload from a dict +participant_onboarding_payload_from_dict = ParticipantOnboardingPayload.from_dict(participant_onboarding_payload_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/PositionRelatedTransaction.md b/docs/PositionRelatedTransaction.md index b8c6c1b3..09a86b4a 100644 --- a/docs/PositionRelatedTransaction.md +++ b/docs/PositionRelatedTransaction.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **status** | **str** | Transaction outcome. | **amount** | **str** | Portion of position amount this transaction moved (native units). Absent on legacy rows. | [optional] **tx_note** | **str** | User-provided note from the transfer request. Omitted when not set. | [optional] +**completion_time** | **datetime** | ISO timestamp when Cosmos unbonding is scheduled to end. Absent on other chains. | [optional] ## Example diff --git a/docs/QuorumApprovalState.md b/docs/QuorumApprovalState.md new file mode 100644 index 00000000..9ac82f09 --- /dev/null +++ b/docs/QuorumApprovalState.md @@ -0,0 +1,13 @@ +# QuorumApprovalState + +Whether an approval requirement has been met. Treat this as authoritative rather than comparing the counts yourself: a group can show `currentApprovalCount` equal to `threshold` and still be `PENDING` when the request additionally requires the workspace owner's approval. + +## Enum + +* `APPROVED` (value: `'APPROVED'`) + +* `PENDING` (value: `'PENDING'`) + +[[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/QuorumGroup.md b/docs/QuorumGroup.md new file mode 100644 index 00000000..190a5e76 --- /dev/null +++ b/docs/QuorumGroup.md @@ -0,0 +1,33 @@ +# QuorumGroup + +A single tier of a ruleset: a threshold and the approvals collected toward it. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**threshold** | **int** | Number of approvals this tier requires. | +**current_approval_count** | **int** | Approvals collected so far toward `threshold`. | +**status** | [**QuorumApprovalState**](QuorumApprovalState.md) | | +**members** | **List[int]** | Indexes into the top-level `users` array identifying the users who belong to this tier. Returned only for `quorumStatusMode=FULL`; omitted otherwise. | [optional] + +## Example + +```python +from fireblocks.models.quorum_group import QuorumGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of QuorumGroup from a JSON string +quorum_group_instance = QuorumGroup.from_json(json) +# print the JSON string representation of the object +print(QuorumGroup.to_json()) + +# convert the object into a dict +quorum_group_dict = quorum_group_instance.to_dict() +# create an instance of QuorumGroup from a dict +quorum_group_from_dict = QuorumGroup.from_dict(quorum_group_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/QuorumRequestState.md b/docs/QuorumRequestState.md new file mode 100644 index 00000000..8daf4156 --- /dev/null +++ b/docs/QuorumRequestState.md @@ -0,0 +1,21 @@ +# QuorumRequestState + +The approval request's overall state. Anything other than `PENDING` means the request is no longer awaiting approvals. + +## Enum + +* `PENDING` (value: `'PENDING'`) + +* `APPROVED` (value: `'APPROVED'`) + +* `REJECTED` (value: `'REJECTED'`) + +* `CANCELLED` (value: `'CANCELLED'`) + +* `TIMED_OUT` (value: `'TIMED_OUT'`) + +* `FAILED` (value: `'FAILED'`) + +[[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/QuorumRuleset.md b/docs/QuorumRuleset.md new file mode 100644 index 00000000..4a9a5884 --- /dev/null +++ b/docs/QuorumRuleset.md @@ -0,0 +1,32 @@ +# QuorumRuleset + +One sub-request of the approval criteria, made up of one or more tiers. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_match** | **str** | Whether every tier in `groups` must be satisfied (`ALL`) or any single one of them (`ANY`). | +**status** | [**QuorumApprovalState**](QuorumApprovalState.md) | | +**groups** | [**List[QuorumGroup]**](QuorumGroup.md) | The tiers of this sub-request, evaluated according to `groupMatch`. | + +## Example + +```python +from fireblocks.models.quorum_ruleset import QuorumRuleset + +# TODO update the JSON string below +json = "{}" +# create an instance of QuorumRuleset from a JSON string +quorum_ruleset_instance = QuorumRuleset.from_json(json) +# print the JSON string representation of the object +print(QuorumRuleset.to_json()) + +# convert the object into a dict +quorum_ruleset_dict = quorum_ruleset_instance.to_dict() +# create an instance of QuorumRuleset from a dict +quorum_ruleset_from_dict = QuorumRuleset.from_dict(quorum_ruleset_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/QuorumStatus.md b/docs/QuorumStatus.md new file mode 100644 index 00000000..9e5426f3 --- /dev/null +++ b/docs/QuorumStatus.md @@ -0,0 +1,32 @@ +# QuorumStatus + +The approval quorum's structure and progress for this request. `null` when `quorumStatusMode` is omitted or `NONE`. Also `null` on an otherwise successful response when the quorum cannot be reported faithfully — a multi-tier request in a workspace that does not maintain per-tier approval counts — so absence here does not imply the request has no quorum. The object may carry additional backend-defined fields beyond those documented. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_status** | [**QuorumRequestState**](QuorumRequestState.md) | | +**users** | [**List[QuorumUser]**](QuorumUser.md) | Every user participating in this request's quorum. Returned only for `quorumStatusMode=FULL`; omitted otherwise. | [optional] +**quorum** | [**QuorumStatusQuorum**](QuorumStatusQuorum.md) | | + +## Example + +```python +from fireblocks.models.quorum_status import QuorumStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of QuorumStatus from a JSON string +quorum_status_instance = QuorumStatus.from_json(json) +# print the JSON string representation of the object +print(QuorumStatus.to_json()) + +# convert the object into a dict +quorum_status_dict = quorum_status_instance.to_dict() +# create an instance of QuorumStatus from a dict +quorum_status_from_dict = QuorumStatus.from_dict(quorum_status_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/QuorumStatusQuorum.md b/docs/QuorumStatusQuorum.md new file mode 100644 index 00000000..a35c99a0 --- /dev/null +++ b/docs/QuorumStatusQuorum.md @@ -0,0 +1,37 @@ +# QuorumStatusQuorum + +The approval criteria and how far they have been met. `type` discriminates the two shapes: `SIMPLE` flattens the common single-tier case, `RULESET` is the general multi-tier form. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Discriminator identifying the flattened single-tier shape. | +**threshold** | **int** | Number of approvals this request requires. | +**current_approval_count** | **int** | Approvals collected so far toward `threshold`. | +**status** | [**QuorumApprovalState**](QuorumApprovalState.md) | | +**is_mandatory_owner_approved** | **bool** | Present only when this request additionally requires the workspace owner's approval. `false` means the owner has not approved yet. Absent when no owner approval is required. | [optional] +**members** | **List[int]** | Indexes into the top-level `users` array identifying the users who may approve. Returned only for `quorumStatusMode=FULL`; omitted otherwise. | [optional] +**ruleset_match** | **str** | Whether every sub-request in `rulesets` must be satisfied (`ALL`) or any single one of them (`ANY`). | +**rulesets** | [**List[QuorumRuleset]**](QuorumRuleset.md) | The sub-requests of the approval criteria, evaluated according to `rulesetMatch`. | + +## Example + +```python +from fireblocks.models.quorum_status_quorum import QuorumStatusQuorum + +# TODO update the JSON string below +json = "{}" +# create an instance of QuorumStatusQuorum from a JSON string +quorum_status_quorum_instance = QuorumStatusQuorum.from_json(json) +# print the JSON string representation of the object +print(QuorumStatusQuorum.to_json()) + +# convert the object into a dict +quorum_status_quorum_dict = quorum_status_quorum_instance.to_dict() +# create an instance of QuorumStatusQuorum from a dict +quorum_status_quorum_from_dict = QuorumStatusQuorum.from_dict(quorum_status_quorum_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/QuorumUser.md b/docs/QuorumUser.md new file mode 100644 index 00000000..ea99cdd0 --- /dev/null +++ b/docs/QuorumUser.md @@ -0,0 +1,33 @@ +# QuorumUser + +A user who participates in this request's approval quorum, and their approval state. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **int** | Zero-based position of this user within the `users` array. The `members` arrays elsewhere in the document reference users by this index rather than repeating the user ID. | +**user_id** | **str** | The participating user's ID. | +**status** | [**QuorumApprovalState**](QuorumApprovalState.md) | | +**is_mandatory_owner** | **bool** | Present and `true` only for the workspace owner, when this request additionally requires the owner's approval. Absent for every other participant. | [optional] + +## Example + +```python +from fireblocks.models.quorum_user import QuorumUser + +# TODO update the JSON string below +json = "{}" +# create an instance of QuorumUser from a JSON string +quorum_user_instance = QuorumUser.from_json(json) +# print the JSON string representation of the object +print(QuorumUser.to_json()) + +# convert the object into a dict +quorum_user_dict = quorum_user_instance.to_dict() +# create an instance of QuorumUser from a dict +quorum_user_from_dict = QuorumUser.from_dict(quorum_user_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/Quote.md b/docs/Quote.md index 9a43dcb3..334f9682 100644 --- a/docs/Quote.md +++ b/docs/Quote.md @@ -6,7 +6,7 @@ A committed executable quote for a trading pair. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**via** | [**AccessType**](AccessType.md) | | +**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | **id** | **str** | The unique identifier of the quote. | **quote_asset_id** | **str** | The target asset identifier. | **quote_asset_rail** | [**TransferRail**](TransferRail.md) | | [optional] diff --git a/docs/QuoteOffer.md b/docs/QuoteOffer.md index f6f24b21..66140326 100644 --- a/docs/QuoteOffer.md +++ b/docs/QuoteOffer.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**via** | [**AccessType**](AccessType.md) | | +**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | **id** | **str** | The unique identifier of the quote. | **quote_asset_id** | **str** | The target asset identifier. | **quote_asset_rail** | [**TransferRail**](TransferRail.md) | | [optional] diff --git a/docs/Rate.md b/docs/Rate.md index ba8804e5..ea6f36fe 100644 --- a/docs/Rate.md +++ b/docs/Rate.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**via** | [**AccessType**](AccessType.md) | | +**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | **base_asset_id** | **str** | The source asset identifier | **base_asset_rail** | [**TransferRail**](TransferRail.md) | | [optional] **quote_asset_id** | **str** | The target asset identifier | diff --git a/docs/RateOffer.md b/docs/RateOffer.md index 9aabbe44..8a10555b 100644 --- a/docs/RateOffer.md +++ b/docs/RateOffer.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**via** | [**AccessType**](AccessType.md) | | +**via** | [**AccessTypeResponse**](AccessTypeResponse.md) | | **base_asset_id** | **str** | The source asset identifier | **base_asset_rail** | [**TransferRail**](TransferRail.md) | | [optional] **quote_asset_id** | **str** | The target asset identifier | diff --git a/docs/RulesetQuorum.md b/docs/RulesetQuorum.md new file mode 100644 index 00000000..17c930c4 --- /dev/null +++ b/docs/RulesetQuorum.md @@ -0,0 +1,34 @@ +# RulesetQuorum + +The general shape, used when the request has more than one sub-request or a sub-request with more than one tier. Each entry in `rulesets` is a sub-request; each of its `groups` is a tier. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Discriminator identifying the multi-tier shape. | +**ruleset_match** | **str** | Whether every sub-request in `rulesets` must be satisfied (`ALL`) or any single one of them (`ANY`). | +**status** | [**QuorumApprovalState**](QuorumApprovalState.md) | | +**is_mandatory_owner_approved** | **bool** | Present only when this request additionally requires the workspace owner's approval. `false` means the owner has not approved yet. Absent when no owner approval is required. | [optional] +**rulesets** | [**List[QuorumRuleset]**](QuorumRuleset.md) | The sub-requests of the approval criteria, evaluated according to `rulesetMatch`. | + +## Example + +```python +from fireblocks.models.ruleset_quorum import RulesetQuorum + +# TODO update the JSON string below +json = "{}" +# create an instance of RulesetQuorum from a JSON string +ruleset_quorum_instance = RulesetQuorum.from_json(json) +# print the JSON string representation of the object +print(RulesetQuorum.to_json()) + +# convert the object into a dict +ruleset_quorum_dict = ruleset_quorum_instance.to_dict() +# create an instance of RulesetQuorum from a dict +ruleset_quorum_from_dict = RulesetQuorum.from_dict(ruleset_quorum_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/SecurityFindingDetailed.md b/docs/SecurityFindingDetailed.md index 88e6e6e1..23f6467d 100644 --- a/docs/SecurityFindingDetailed.md +++ b/docs/SecurityFindingDetailed.md @@ -1,6 +1,5 @@ # SecurityFindingDetailed -A single FSPM finding, redacted to the public field set ## Properties diff --git a/docs/SecurityPostureManagementApi.md b/docs/SecurityPostureManagementApi.md index 8cc6c8fe..a0417ee5 100644 --- a/docs/SecurityPostureManagementApi.md +++ b/docs/SecurityPostureManagementApi.md @@ -17,6 +17,8 @@ Get a FSPM security finding by ID Returns a single FSPM security finding for the workspace, redacted to the public field set. Endpoint Roles: Security Admin, Security Auditor. +**Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. + ### Example @@ -93,6 +95,8 @@ Get FSPM security findings Returns a paginated list of FSPM security findings for the workspace. Endpoint Roles: Security Admin, Security Auditor. +**Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. + ### Example @@ -183,6 +187,8 @@ Accepts or reopens a finding for the workspace. When accepting a finding (`status: "ACCEPTED"`), `statusUpdatedReason` is required. Endpoint Roles: Security Admin. +**Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. + ### Example diff --git a/docs/SimpleQuorum.md b/docs/SimpleQuorum.md new file mode 100644 index 00000000..c795d841 --- /dev/null +++ b/docs/SimpleQuorum.md @@ -0,0 +1,35 @@ +# SimpleQuorum + +The flattened shape used when the request has a single sub-request with a single tier, which is the common case. The threshold and approval count sit directly on the quorum object instead of inside `rulesets`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Discriminator identifying the flattened single-tier shape. | +**threshold** | **int** | Number of approvals this request requires. | +**current_approval_count** | **int** | Approvals collected so far toward `threshold`. | +**status** | [**QuorumApprovalState**](QuorumApprovalState.md) | | +**is_mandatory_owner_approved** | **bool** | Present only when this request additionally requires the workspace owner's approval. `false` means the owner has not approved yet, which is why `status` can remain `PENDING` even once `currentApprovalCount` reaches `threshold`. Absent when no owner approval is required. | [optional] +**members** | **List[int]** | Indexes into the top-level `users` array identifying the users who may approve. Returned only for `quorumStatusMode=FULL`; omitted otherwise. | [optional] + +## Example + +```python +from fireblocks.models.simple_quorum import SimpleQuorum + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleQuorum from a JSON string +simple_quorum_instance = SimpleQuorum.from_json(json) +# print the JSON string representation of the object +print(SimpleQuorum.to_json()) + +# convert the object into a dict +simple_quorum_dict = simple_quorum_instance.to_dict() +# create an instance of SimpleQuorum from a dict +simple_quorum_from_dict = SimpleQuorum.from_dict(simple_quorum_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/TransactionRequest.md b/docs/TransactionRequest.md index 9482cc72..c37e21b1 100644 --- a/docs/TransactionRequest.md +++ b/docs/TransactionRequest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **destinations** | [**List[TransactionRequestDestination]**](TransactionRequestDestination.md) | For UTXO based blockchains, you can send a single transaction to multiple destinations. | [optional] **amount** | [**TransactionRequestAmount**](TransactionRequestAmount.md) | | [optional] **treat_as_gross_amount** | **bool** | \"When set to `true`, the fee will be deducted from the requested amount.\" **Note**: This parameter can only be considered if a transaction’s asset is a base asset, such as ETH or MATIC. If the asset can’t be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account. | [optional] -**force_sweep** | **bool** | For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. **Note:** If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation. | [optional] +**force_sweep** | **bool** | For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. **Note:** If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation. **Note:** `forceSweep` and `treatAsGrossAmount` can also be used to empty a TON/GRAM wallet. | [optional] **fee_level** | **str** | For UTXO, EVM-based, or Solana blockchains only. Defines the blockchain fee level which will be payed for the transaction. Alternatively, specific fee estimation parameters exist below. | [optional] **fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | [optional] **priority_fee** | [**TransactionRequestPriorityFee**](TransactionRequestPriorityFee.md) | | [optional] diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index ea591a36..38614f71 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -28,6 +28,7 @@ Name | Type | Description | Notes **treat_as_gross_amount** | **bool** | For transactions initiated via this Fireblocks workspace, when set to `true`, the fee is deducted from the requested amount. **Note**: This parameter can only be considered if a transaction's asset is a base asset, such as ETH or MATIC. If the asset can't be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account. | [optional] **fee_info** | [**FeeInfo**](FeeInfo.md) | | [optional] **fee_currency** | **str** | The asset which was withdrawn to pay the transaction fee, for example ETH for EVM-based blockchains, BTC for Tether Omni. | [optional] +**requested_fee_currency** | **str** | The fee-paying asset requested at transaction creation via the `feeCurrency` field, if any. | [optional] **network_records** | [**List[NetworkRecord]**](NetworkRecord.md) | In case a single transaction resulted with multiple transfers, for example a result of a contract call, then this parameter specifies each transfer that took place on the blockchain. In case of a single transfer transaction, this parameter is empty. | [optional] **created_at** | **float** | The transaction’s creation date and time, in unix timestamp. | [optional] **last_updated** | **float** | The transaction’s last update date and time, in unix timestamp. | [optional] diff --git a/docs/TransferResponse.md b/docs/TransferResponse.md new file mode 100644 index 00000000..ca02e2be --- /dev/null +++ b/docs/TransferResponse.md @@ -0,0 +1,29 @@ +# TransferResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the transfer offer. | + +## Example + +```python +from fireblocks.models.transfer_response import TransferResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TransferResponse from a JSON string +transfer_response_instance = TransferResponse.from_json(json) +# print the JSON string representation of the object +print(TransferResponse.to_json()) + +# convert the object into a dict +transfer_response_dict = transfer_response_instance.to_dict() +# create an instance of TransferResponse from a dict +transfer_response_from_dict = TransferResponse.from_dict(transfer_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/TransferResponseAccept.md b/docs/TransferResponseAccept.md new file mode 100644 index 00000000..3173b822 --- /dev/null +++ b/docs/TransferResponseAccept.md @@ -0,0 +1,30 @@ +# TransferResponseAccept + +Accept an inbound 2-step transfer offer. Carries no arguments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the transfer offer. | + +## Example + +```python +from fireblocks.models.transfer_response_accept import TransferResponseAccept + +# TODO update the JSON string below +json = "{}" +# create an instance of TransferResponseAccept from a JSON string +transfer_response_accept_instance = TransferResponseAccept.from_json(json) +# print the JSON string representation of the object +print(TransferResponseAccept.to_json()) + +# convert the object into a dict +transfer_response_accept_dict = transfer_response_accept_instance.to_dict() +# create an instance of TransferResponseAccept from a dict +transfer_response_accept_from_dict = TransferResponseAccept.from_dict(transfer_response_accept_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/TransferResponseReject.md b/docs/TransferResponseReject.md new file mode 100644 index 00000000..90038f7e --- /dev/null +++ b/docs/TransferResponseReject.md @@ -0,0 +1,30 @@ +# TransferResponseReject + +Reject an inbound 2-step transfer offer. Carries no arguments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_type** | **str** | How you are answering the transfer offer. | + +## Example + +```python +from fireblocks.models.transfer_response_reject import TransferResponseReject + +# TODO update the JSON string below +json = "{}" +# create an instance of TransferResponseReject from a JSON string +transfer_response_reject_instance = TransferResponseReject.from_json(json) +# print the JSON string representation of the object +print(TransferResponseReject.to_json()) + +# convert the object into a dict +transfer_response_reject_dict = transfer_response_reject_instance.to_dict() +# create an instance of TransferResponseReject from a dict +transfer_response_reject_from_dict = TransferResponseReject.from_dict(transfer_response_reject_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/TransferWithdrawPayload.md b/docs/TransferWithdrawPayload.md new file mode 100644 index 00000000..d93a10b8 --- /dev/null +++ b/docs/TransferWithdrawPayload.md @@ -0,0 +1,31 @@ +# TransferWithdrawPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vault_account_id** | **str** | The vault account whose Canton wallet acts here. | +**asset** | **str** | Chain asset — `CANTON` or `CANTON_TEST`. | +**offer_transaction_id** | **str** | The Fireblocks transaction id of the OUTGOING transfer offer being withdrawn. | + +## Example + +```python +from fireblocks.models.transfer_withdraw_payload import TransferWithdrawPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of TransferWithdrawPayload from a JSON string +transfer_withdraw_payload_instance = TransferWithdrawPayload.from_json(json) +# print the JSON string representation of the object +print(TransferWithdrawPayload.to_json()) + +# convert the object into a dict +transfer_withdraw_payload_dict = transfer_withdraw_payload_instance.to_dict() +# create an instance of TransferWithdrawPayload from a dict +transfer_withdraw_payload_from_dict = TransferWithdrawPayload.from_dict(transfer_withdraw_payload_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 new file mode 100644 index 00000000..4b6b4985 --- /dev/null +++ b/docs/UpdateWebhookOAuthRequest.md @@ -0,0 +1,38 @@ +# 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. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A label for this credential set. Omit to leave it unchanged. | [optional] +**client_id** | **str** | OAuth client ID. Omit to leave it unchanged. | [optional] +**client_secret** | **str** | A new OAuth client secret. Limited to 480 bytes when UTF-8 encoded, so a secret using non-ASCII characters fits fewer than 480 of them. Write-only — never returned in any response. Send this on its own to rotate the secret without changing anything else. Omit to leave it unchanged. | [optional] +**url** | **str** | Token endpoint URL. HTTPS on port 443 only, and the host must resolve publicly. Omit to leave it unchanged. | [optional] +**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] +**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 + +# 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) +# print the JSON string representation of the object +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) +``` +[[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 7ac4e33a..bffbf3ea 100644 --- a/docs/UpdateWebhookRequest.md +++ b/docs/UpdateWebhookRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **enabled** | **bool** | The status of the webhook | [optional] **mtls** | [**WebhookMtls**](WebhookMtls.md) | | [optional] **oauth** | [**WebhookOAuth**](WebhookOAuth.md) | | [optional] -**custom_headers** | **Dict[str, Optional[str]]** | Custom headers delta: entries with a string value are added or updated, entries with a `null` value delete that header (no-op if absent), and header names omitted from the payload are left untouched. The resulting set is limited to 10 headers. Header names are case-insensitive, up to 128 characters, and limited to valid HTTP header name characters. Some system header names are reserved and cannot be used. Values are write-only — never returned in responses. | [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] ## Example diff --git a/docs/UtxoOutput.md b/docs/UtxoOutput.md index 6aa8b0f7..9a01dffb 100644 --- a/docs/UtxoOutput.md +++ b/docs/UtxoOutput.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **created_at** | **datetime** | The timestamp when this UTXO was created | [optional] **updated_at** | **datetime** | The timestamp when this UTXO was last updated | [optional] **labels** | **List[str]** | Labels attached to this UTXO | [optional] +**has_native_assets** | **bool** | Whether this UTXO carries Cardano native assets (tokens) | [optional] ## Example diff --git a/docs/VaultsApi.md b/docs/VaultsApi.md index 1cd86e46..92b9db8c 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -50,7 +50,7 @@ Method | HTTP request | Description Activate a wallet in a vault account Initiates activation for a wallet in a vault account. -Activation is required for tokens that need an on-chain transaction for creation (XLM tokens, SOL tokens etc). +Activation is required for tokens that need an on-chain transaction for creation. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. ### Example diff --git a/docs/WebhookEvent.md b/docs/WebhookEvent.md index cf8c12af..91c888b7 100644 --- a/docs/WebhookEvent.md +++ b/docs/WebhookEvent.md @@ -11,6 +11,8 @@ * `TRANSACTION_DOT_NETWORK_RECORDS_DOT_PROCESSING_COMPLETED` (value: `'transaction.network_records.processing_completed'`) +* `TRANSACTION_DOT_ALERT_DOT_STUCK` (value: `'transaction.alert.stuck'`) + * `EXTERNAL_WALLET_DOT_ASSET_DOT_ADDED` (value: `'external_wallet.asset.added'`) * `EXTERNAL_WALLET_DOT_ASSET_DOT_REMOVED` (value: `'external_wallet.asset.removed'`) @@ -31,6 +33,14 @@ * `VAULT_ACCOUNT_DOT_NFT_DOT_BALANCE_UPDATED` (value: `'vault_account.nft.balance_updated'`) +* `VAULT_ACCOUNT_DOT_BULK_CREATE_JOB_STARTED` (value: `'vault_account.bulk_create_job_started'`) + +* `VAULT_ACCOUNT_DOT_BULK_CREATE_JOB_ENDED` (value: `'vault_account.bulk_create_job_ended'`) + +* `VAULT_ACCOUNT_DOT_ASSET_DOT_BULK_ADD_JOB_STARTED` (value: `'vault_account.asset.bulk_add_job_started'`) + +* `VAULT_ACCOUNT_DOT_ASSET_DOT_BULK_ADD_JOB_ENDED` (value: `'vault_account.asset.bulk_add_job_ended'`) + * `EMBEDDED_WALLET_DOT_STATUS_DOT_UPDATED` (value: `'embedded_wallet.status.updated'`) * `EMBEDDED_WALLET_DOT_CREATED` (value: `'embedded_wallet.created'`) diff --git a/docs/WebhookOAuthCredentials.md b/docs/WebhookOAuthCredentials.md new file mode 100644 index 00000000..8f41c66c --- /dev/null +++ b/docs/WebhookOAuthCredentials.md @@ -0,0 +1,40 @@ +# 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. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The id of the OAuth credentials. Pass this as a webhook's `webhookOauthId` to attach them. | +**name** | **str** | The label given to this credential set. | +**client_id** | **str** | OAuth client ID used to authenticate with the token endpoint. | +**url** | **str** | Token endpoint URL. | +**auth_method** | **str** | How the client credentials are presented to the token endpoint: `client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Credentials created without this field report `client_secret_basic`, which is what they use. | [default to 'client_secret_basic'] +**custom_jwt_claims** | **List[str]** | Names of the additional claims placed in the JWT assertion. Claim values are write-only and are never returned. Absent when no custom claims are configured. | [optional] +**custom_body_params** | **List[str]** | Names of the additional parameters added to the token request body. Parameter values are write-only and are never returned. Absent when no custom parameters are configured. | [optional] +**custom_headers** | **List[str]** | Names of the additional HTTP headers added to **the token request sent to the authorization server** — not to the webhook delivery, which has its own separate `customHeaders`. Header values are write-only and are never returned. Absent when no custom headers are configured. | [optional] +**mtls_client_signed_cert** | **str** | PEM-encoded client certificate used for mTLS when fetching OAuth tokens. | [optional] +**created_at** | **int** | The date and time the OAuth credentials were created, in milliseconds. | +**updated_at** | **int** | The date and time the OAuth credentials were last updated, in milliseconds. | + +## Example + +```python +from fireblocks.models.webhook_o_auth_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) +# print the JSON string representation of the object +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) +``` +[[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 45e1885f..d385d60e 100644 --- a/docs/WebhooksV2Api.md +++ b/docs/WebhooksV2Api.md @@ -5,7 +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 [**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 [**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 @@ -14,12 +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_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 # **create_webhook** @@ -102,6 +107,86 @@ 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 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. + + +### Example + + +```python +from fireblocks.models.create_webhook_o_auth_request import CreateWebhookOAuthRequest +from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +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: + create_webhook_o_auth_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") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2Api->create_webhook_o_auth: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_webhook_o_auth_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) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | created the OAuth credentials successfully | * 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) + # **delete_webhook** > Webhook delete_webhook(webhook_id) @@ -179,6 +264,90 @@ 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 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. + + +### Example + + +```python +from fireblocks.models.delete_webhook_o_auth_response import DeleteWebhookOAuthResponse +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: + webhook_oauth_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the OAuth credentials + force_delete = False # bool | 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. (optional) (default to False) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2Api->delete_webhook_o_auth: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_oauth_id** | **str**| The unique identifier of the OAuth credentials | + **force_delete** | **bool**| 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. | [optional] [default to False] + +### Return type + +[**DeleteWebhookOAuthResponse**](DeleteWebhookOAuthResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The deleted OAuth credentials, plus the ids of any webhooks that were detached from them | * X-Request-ID -
| +**409** | Webhooks still reference these credentials and `forceDelete` was not set. Nothing was deleted. The error message names the reason and the ids of the referencing webhooks — detach or delete those webhooks, or retry with `forceDelete=true`. | * 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) + # **get_metrics** > WebhookMetric get_metrics(webhook_id, metric_name) @@ -811,6 +980,152 @@ 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 OAuth credentials by id + +Retrieve an OAuth credential set by its id. The client secret is never returned. + + +### Example + + +```python +from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +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: + webhook_oauth_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the OAuth credentials + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2Api->get_webhook_o_auth: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_oauth_id** | **str**| The unique identifier of the OAuth credentials | + +### Return type + +[**WebhookOAuthCredentials**](WebhookOAuthCredentials.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An OAuth credentials object | * 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) + +# **get_webhook_o_auths** +> List[WebhookOAuthCredentials] get_webhook_o_auths() + +Get all OAuth credentials + +Lists every OAuth credential set for the workspace. Client secrets are never returned. + + +### Example + + +```python +from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +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: + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2Api->get_webhook_o_auths: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[WebhookOAuthCredentials]**](WebhookOAuthCredentials.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The workspace's OAuth credentials | * 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) + # **get_webhooks** > WebhookPaginatedResponse get_webhooks(order=order, page_cursor=page_cursor, page_size=page_size) @@ -1291,3 +1606,85 @@ 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 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. + + +### Example + + +```python +from fireblocks.models.update_webhook_o_auth_request import UpdateWebhookOAuthRequest +from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials +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: + webhook_oauth_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the OAuth credentials + update_webhook_o_auth_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") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2Api->update_webhook_o_auth: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_oauth_id** | **str**| The unique identifier of the OAuth credentials | + **update_webhook_o_auth_request** | [**UpdateWebhookOAuthRequest**](UpdateWebhookOAuthRequest.md)| | + +### Return type + +[**WebhookOAuthCredentials**](WebhookOAuthCredentials.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated OAuth credentials object | * 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/fireblocks/__init__.py b/fireblocks/__init__.py index fb7b47e6..9ad7d4bb 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -14,10 +14,11 @@ Do not edit the class manually. """ # noqa: E501 -__version__ = "29.0.0" +__version__ = "0.0.0" # import apis into sdk package from fireblocks.api.api_user_api import ApiUserApi +from fireblocks.api.approvals_beta_api import ApprovalsBetaApi from fireblocks.api.audit_logs_api import AuditLogsApi from fireblocks.api.blockchain_link_beta_api import BlockchainLinkBetaApi from fireblocks.api.blockchains_assets_api import BlockchainsAssetsApi @@ -103,8 +104,10 @@ AccessRegistrySummaryResponse, ) from fireblocks.models.access_type import AccessType +from fireblocks.models.access_type_response import AccessTypeResponse from fireblocks.models.account import Account from fireblocks.models.account_access import AccountAccess +from fireblocks.models.account_access_response import AccountAccessResponse from fireblocks.models.account_base import AccountBase from fireblocks.models.account_based_access_provider import AccountBasedAccessProvider from fireblocks.models.account_based_access_provider_info import ( @@ -189,6 +192,11 @@ from fireblocks.models.addresses_filters import AddressesFilters from fireblocks.models.alert_exposure_type_enum import AlertExposureTypeEnum from fireblocks.models.alert_level_enum import AlertLevelEnum +from fireblocks.models.allocation_response import AllocationResponse +from fireblocks.models.allocation_response_accept import AllocationResponseAccept +from fireblocks.models.allocation_response_reject import AllocationResponseReject +from fireblocks.models.allocation_withdraw_payload import AllocationWithdrawPayload +from fireblocks.models.allow_list_payload import AllowListPayload from fireblocks.models.allowlist_entry import AllowlistEntry from fireblocks.models.allowlist_entry_response import AllowlistEntryResponse from fireblocks.models.allowlist_entry_status import AllowlistEntryStatus @@ -217,6 +225,7 @@ from fireblocks.models.api_key import ApiKey from fireblocks.models.api_keys_paginated_response import ApiKeysPaginatedResponse from fireblocks.models.approval_request import ApprovalRequest +from fireblocks.models.approval_request_item import ApprovalRequestItem from fireblocks.models.approvers_config import ApproversConfig from fireblocks.models.approvers_config_approval_groups_inner import ( ApproversConfigApprovalGroupsInner, @@ -319,9 +328,29 @@ from fireblocks.models.byork_verdict_response_status_enum import ( ByorkVerdictResponseStatusEnum, ) +from fireblocks.models.call_accepted import CallAccepted from fireblocks.models.callback_handler import CallbackHandler from fireblocks.models.callback_handler_request import CallbackHandlerRequest from fireblocks.models.cancel_transaction_response import CancelTransactionResponse +from fireblocks.models.canton_call import CantonCall +from fireblocks.models.canton_call_allocation_withdraw import ( + CantonCallAllocationWithdraw, +) +from fireblocks.models.canton_call_allow_list_add import CantonCallAllowListAdd +from fireblocks.models.canton_call_allow_list_remove import CantonCallAllowListRemove +from fireblocks.models.canton_call_end_investor_invite import ( + CantonCallEndInvestorInvite, +) +from fireblocks.models.canton_call_end_investor_invite_cancel import ( + CantonCallEndInvestorInviteCancel, +) +from fireblocks.models.canton_call_end_investor_offboard import ( + CantonCallEndInvestorOffboard, +) +from fireblocks.models.canton_call_participant_onboarding import ( + CantonCallParticipantOnboarding, +) +from fireblocks.models.canton_call_transfer_withdraw import CantonCallTransferWithdraw from fireblocks.models.chain_descriptor import ChainDescriptor from fireblocks.models.chain_info_response import ChainInfoResponse from fireblocks.models.channel_dvn_config_with_confirmations import ( @@ -556,6 +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_request import CreateWebhookRequest from fireblocks.models.create_workflow_execution_request_params_inner import ( CreateWorkflowExecutionRequestParamsInner, @@ -575,6 +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.deploy_layer_zero_adapters_request import ( DeployLayerZeroAdaptersRequest, ) @@ -600,6 +631,8 @@ from fireblocks.models.direct_access import DirectAccess from fireblocks.models.direct_access_provider import DirectAccessProvider from fireblocks.models.direct_access_provider_info import DirectAccessProviderInfo +from fireblocks.models.direct_access_response import DirectAccessResponse +from fireblocks.models.direct_access_response_info import DirectAccessResponseInfo from fireblocks.models.disbursement_amount_instruction import ( DisbursementAmountInstruction, ) @@ -702,6 +735,7 @@ ) from fireblocks.models.enable_device import EnableDevice from fireblocks.models.enable_wallet import EnableWallet +from fireblocks.models.end_investor_payload import EndInvestorPayload from fireblocks.models.error_response import ErrorResponse from fireblocks.models.error_response_error import ErrorResponseError from fireblocks.models.error_schema import ErrorSchema @@ -955,6 +989,7 @@ from fireblocks.models.legal_entity_registration import LegalEntityRegistration from fireblocks.models.lei_status import LeiStatus from fireblocks.models.linked_tokens_count import LinkedTokensCount +from fireblocks.models.list_approvals_response import ListApprovalsResponse from fireblocks.models.list_assets_response import ListAssetsResponse from fireblocks.models.list_blockchains_response import ListBlockchainsResponse from fireblocks.models.list_blockchains_response2 import ListBlockchainsResponse2 @@ -1033,7 +1068,25 @@ from fireblocks.models.notification_status import NotificationStatus from fireblocks.models.notification_with_data import NotificationWithData from fireblocks.models.offer import Offer +from fireblocks.models.offer_response import OfferResponse +from fireblocks.models.offer_response_accepted import OfferResponseAccepted +from fireblocks.models.offer_response_allocation import OfferResponseAllocation +from fireblocks.models.offer_response_onboarding import OfferResponseOnboarding +from fireblocks.models.offer_response_transfer import OfferResponseTransfer from fireblocks.models.offers_response import OffersResponse +from fireblocks.models.onboarding_response import OnboardingResponse +from fireblocks.models.onboarding_response_dtcc_accept import ( + OnboardingResponseDtccAccept, +) +from fireblocks.models.onboarding_response_dtcc_reject import ( + OnboardingResponseDtccReject, +) +from fireblocks.models.onboarding_response_tradeweb_accept import ( + OnboardingResponseTradewebAccept, +) +from fireblocks.models.onboarding_response_tradeweb_reject import ( + OnboardingResponseTradewebReject, +) from fireblocks.models.onchain_transaction import OnchainTransaction from fireblocks.models.onchain_transactions_paged_response import ( OnchainTransactionsPagedResponse, @@ -1077,6 +1130,9 @@ from fireblocks.models.pair_api_key_response import PairApiKeyResponse from fireblocks.models.parameter import Parameter from fireblocks.models.parameter_with_value import ParameterWithValue +from fireblocks.models.participant_onboarding_payload import ( + ParticipantOnboardingPayload, +) from fireblocks.models.participant_relationship_type import ParticipantRelationshipType from fireblocks.models.participants_identification import ParticipantsIdentification from fireblocks.models.participants_identification_policy import ( @@ -1153,6 +1209,13 @@ from fireblocks.models.public_key_information import PublicKeyInformation from fireblocks.models.publish_draft_request import PublishDraftRequest from fireblocks.models.publish_result import PublishResult +from fireblocks.models.quorum_approval_state import QuorumApprovalState +from fireblocks.models.quorum_group import QuorumGroup +from fireblocks.models.quorum_request_state import QuorumRequestState +from fireblocks.models.quorum_ruleset import QuorumRuleset +from fireblocks.models.quorum_status import QuorumStatus +from fireblocks.models.quorum_status_quorum import QuorumStatusQuorum +from fireblocks.models.quorum_user import QuorumUser from fireblocks.models.quote import Quote from fireblocks.models.quote_execution_request_details import ( QuoteExecutionRequestDetails, @@ -1257,6 +1320,7 @@ from fireblocks.models.role_details import RoleDetails from fireblocks.models.role_details2 import RoleDetails2 from fireblocks.models.role_grantee import RoleGrantee +from fireblocks.models.ruleset_quorum import RulesetQuorum from fireblocks.models.sepa_address import SEPAAddress from fireblocks.models.sepa_destination import SEPADestination from fireblocks.models.sol_account import SOLAccount @@ -1372,6 +1436,7 @@ from fireblocks.models.signed_message import SignedMessage from fireblocks.models.signed_message_signature import SignedMessageSignature from fireblocks.models.signing_key_dto import SigningKeyDto +from fireblocks.models.simple_quorum import SimpleQuorum from fireblocks.models.smart_transfer_approve_term import SmartTransferApproveTerm from fireblocks.models.smart_transfer_bad_request_response import ( SmartTransferBadRequestResponse, @@ -1722,7 +1787,11 @@ from fireblocks.models.transfer_peer_type_enum2 import TransferPeerTypeEnum2 from fireblocks.models.transfer_rail import TransferRail from fireblocks.models.transfer_receipt import TransferReceipt +from fireblocks.models.transfer_response import TransferResponse +from fireblocks.models.transfer_response_accept import TransferResponseAccept +from fireblocks.models.transfer_response_reject import TransferResponseReject from fireblocks.models.transfer_validation_failure import TransferValidationFailure +from fireblocks.models.transfer_withdraw_payload import TransferWithdrawPayload from fireblocks.models.travel_rule_action_enum import TravelRuleActionEnum from fireblocks.models.travel_rule_address import TravelRuleAddress from fireblocks.models.travel_rule_create_transaction_request import ( @@ -1872,6 +1941,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_request import UpdateWebhookRequest from fireblocks.models.us_wire_payment_info import UsWirePaymentInfo from fireblocks.models.usdc_gateway_wallet_asset import UsdcGatewayWalletAsset @@ -1936,6 +2006,7 @@ 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_paginated_response import WebhookPaginatedResponse from fireblocks.models.withdraw_request import WithdrawRequest diff --git a/fireblocks/additional_options.py b/fireblocks/additional_options.py index 12b71da1..a835cd77 100644 --- a/fireblocks/additional_options.py +++ b/fireblocks/additional_options.py @@ -13,10 +13,16 @@ from pydantic import Field, BaseModel from typing import Optional +from fireblocks.connection_pool import ( + DEFAULT_IDLE_TIMEOUT_SECONDS, + MAX_IDLE_TIMEOUT_SECONDS, +) + """This class contains additional options for the Fireblocks API client. :param is_anonymous_platform: If set to true, the platform will be anonymous. :param user_agent: The user agent to use for the client. :param thread_pool_size: The number of threads to use for the client. +:param connection_idle_timeout_sec: How long a pooled connection may sit idle before it is discarded. """ @@ -32,3 +38,14 @@ class AdditionalOptions(BaseModel): None, description="The number of threads to use in the thread pool for the client", ) + connection_idle_timeout_sec: Optional[float] = Field( + DEFAULT_IDLE_TIMEOUT_SECONDS, + le=MAX_IDLE_TIMEOUT_SECONDS, + # Built from the constants so the text cannot drift from the behaviour. + description=( + f"How long a pooled connection may sit idle before it is discarded." + f" Defaults to {DEFAULT_IDLE_TIMEOUT_SECONDS}s, maximum" + f" {MAX_IDLE_TIMEOUT_SECONDS}s." + f" -1 disables eviction (not recommended, risks connection issues)." + ), + ) diff --git a/fireblocks/api/__init__.py b/fireblocks/api/__init__.py index f3c62d44..bcb11c4e 100644 --- a/fireblocks/api/__init__.py +++ b/fireblocks/api/__init__.py @@ -2,6 +2,7 @@ # import apis into api package from fireblocks.api.api_user_api import ApiUserApi +from fireblocks.api.approvals_beta_api import ApprovalsBetaApi from fireblocks.api.audit_logs_api import AuditLogsApi from fireblocks.api.blockchain_link_beta_api import BlockchainLinkBetaApi from fireblocks.api.blockchains_assets_api import BlockchainsAssetsApi diff --git a/fireblocks/api/approvals_beta_api.py b/fireblocks/api/approvals_beta_api.py new file mode 100644 index 00000000..7d0bd9da --- /dev/null +++ b/fireblocks/api/approvals_beta_api.py @@ -0,0 +1,365 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from concurrent.futures import Future +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from fireblocks.models.approval_request_item import ApprovalRequestItem +from fireblocks.models.list_approvals_response import ListApprovalsResponse + +from fireblocks.api_client import ApiClient, RequestSerialized +from fireblocks.api_response import ApiResponse +from fireblocks.rest import RESTResponseType +from fireblocks.validation_utils import validate_not_empty_string + + +class ApprovalsBetaApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_approval_by_id( + self, + request_id: Annotated[StrictStr, Field(description="The approval request ID.")], + user_id: Annotated[Optional[StrictStr], Field(description="Report `userStatus` for this user instead of the authenticated user. This selects whose approval state is returned; it does not change which requests can be fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403.")] = None, + quorum_status_mode: Annotated[Optional[StrictStr], Field(description="How much quorum detail to include in `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` adds `users` and the per-group `members` indexes identifying who may approve and who already has. Any other value is rejected with 400; the parameter is case-sensitive.")] = 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[ApprovalRequestItem]]: + """Get a single approval request + + Retrieve full detail for a single approval request by ID, including the payload to sign and, when requested, the request's `quorumStatus`. Because this endpoint addresses one request, it accepts `quorumStatusMode=FULL`, which adds the participating approvers and their individual approval state. `userStatus` reflects the authenticated user by default. Pass `userId` to report it for another user instead. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. + + :param request_id: The approval request ID. (required) + :type request_id: str + :param user_id: Report `userStatus` for this user instead of the authenticated user. This selects whose approval state is returned; it does not change which requests can be fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. + :type user_id: str + :param quorum_status_mode: How much quorum detail to include in `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` adds `users` and the per-group `members` indexes identifying who may approve and who already has. Any other value is rejected with 400; the parameter is case-sensitive. + :type quorum_status_mode: 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="get_approval_by_id", param_name="request_id", param_value=request_id) + + _param = self._get_approval_by_id_serialize( + request_id=request_id, + user_id=user_id, + quorum_status_mode=quorum_status_mode, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApprovalRequestItem", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_approval_by_id_serialize( + self, + request_id, + user_id, + quorum_status_mode, + _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 + if user_id is not None: + + _query_params.append(('userId', user_id)) + + if quorum_status_mode is not None: + + _query_params.append(('quorumStatusMode', quorum_status_mode)) + + # process the header parameters + # 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='GET', + resource_path='/approvals/{requestId}', + 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 + ) + + + + + @validate_call + def get_approvals( + self, + include_user_approved: Annotated[Optional[StrictBool], Field(description="When true, also include requests the authenticated user has already approved that are still pending overall. Defaults to false (only requests the user has not yet acted on).")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="Return the pending requests for this user instead of the authenticated user. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. Cannot be combined with `includeAllUsers=true` — sending both is rejected with 400.")] = None, + include_all_users: Annotated[Optional[StrictBool], Field(description="When true, return every pending request in the workspace instead of a single user's queue. Defaults to false. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the response is not scoped to one user, and `includeUserApproved` has no effect. Cannot be combined with `userId`.")] = None, + quorum_status_mode: Annotated[Optional[StrictStr], Field(description="How much quorum detail to include in each request's `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` is rejected with 400 on this endpoint because the per-approver breakdown requires a single request — use `GET /approvals/{requestId}` for it. Any other value is rejected with 400; the parameter is case-sensitive.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=30, strict=True, ge=1)]], Field(description="Number of results per page. Maximum 30. Defaults to 20.")] = None, + page_cursor: Annotated[Optional[StrictStr], Field(description="Cursor returned from the previous response (the `next` field) to fetch the next page.")] = 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[ListApprovalsResponse]]: + """List approval requests + + Retrieve the pending approval requests the authenticated API user is eligible to act on, including requests the user has already approved that are still pending overall. The response is scoped to the authenticated user by default. Pass `userId` to read another user's queue, or `includeAllUsers=true` to read every pending request in the workspace. Both require an Admin, Non-Signing Admin, Security Admin or Security Auditor role and are rejected with 403 otherwise. Set `quorumStatusMode=SUMMARY` to include each request's approval thresholds and counts. The per-approver breakdown is available only when fetching a single request — see `GET /approvals/{requestId}`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. + + :param include_user_approved: When true, also include requests the authenticated user has already approved that are still pending overall. Defaults to false (only requests the user has not yet acted on). + :type include_user_approved: bool + :param user_id: Return the pending requests for this user instead of the authenticated user. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. Cannot be combined with `includeAllUsers=true` — sending both is rejected with 400. + :type user_id: str + :param include_all_users: When true, return every pending request in the workspace instead of a single user's queue. Defaults to false. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the response is not scoped to one user, and `includeUserApproved` has no effect. Cannot be combined with `userId`. + :type include_all_users: bool + :param quorum_status_mode: How much quorum detail to include in each request's `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` is rejected with 400 on this endpoint because the per-approver breakdown requires a single request — use `GET /approvals/{requestId}` for it. Any other value is rejected with 400; the parameter is case-sensitive. + :type quorum_status_mode: str + :param page_size: Number of results per page. Maximum 30. Defaults to 20. + :type page_size: int + :param page_cursor: Cursor returned from the previous response (the `next` field) to fetch the next page. + :type page_cursor: 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 + + + _param = self._get_approvals_serialize( + include_user_approved=include_user_approved, + user_id=user_id, + include_all_users=include_all_users, + quorum_status_mode=quorum_status_mode, + page_size=page_size, + page_cursor=page_cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListApprovalsResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_approvals_serialize( + self, + include_user_approved, + user_id, + include_all_users, + quorum_status_mode, + page_size, + page_cursor, + _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 + # process the query parameters + if include_user_approved is not None: + + _query_params.append(('includeUserApproved', include_user_approved)) + + if user_id is not None: + + _query_params.append(('userId', user_id)) + + if include_all_users is not None: + + _query_params.append(('includeAllUsers', include_all_users)) + + if quorum_status_mode is not None: + + _query_params.append(('quorumStatusMode', quorum_status_mode)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if page_cursor is not None: + + _query_params.append(('pageCursor', page_cursor)) + + # process the header parameters + # 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='GET', + resource_path='/approvals', + 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/security_posture_management_api.py b/fireblocks/api/security_posture_management_api.py index b0e618c4..5a18577d 100644 --- a/fireblocks/api/security_posture_management_api.py +++ b/fireblocks/api/security_posture_management_api.py @@ -63,7 +63,7 @@ def get_security_finding_by_id( ) -> Future[ApiResponse[SecurityFindingDetailed]]: """Get a FSPM security finding by ID - Returns a single FSPM security finding for the workspace, redacted to the public field set. Endpoint Roles: Security Admin, Security Auditor. + Returns a single FSPM security finding for the workspace, redacted to the public field set. Endpoint Roles: Security Admin, Security Auditor. **Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. :param id: Unique identifier of the finding (required) :type id: str @@ -196,7 +196,7 @@ def get_security_findings( ) -> Future[ApiResponse[GetFindingsExternalResponse]]: """Get FSPM security findings - Returns a paginated list of FSPM security findings for the workspace. Endpoint Roles: Security Admin, Security Auditor. + Returns a paginated list of FSPM security findings for the workspace. Endpoint Roles: Security Admin, Security Auditor. **Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. :param page_cursor: Cursor indicating the page position. Omit to fetch the first page. :type page_cursor: str @@ -365,7 +365,7 @@ def update_security_finding_by_id( ) -> Future[ApiResponse[SecurityFindingDetailed]]: """Update a FSPM security finding by ID - Accepts or reopens a finding for the workspace. When accepting a finding (`status: \"ACCEPTED\"`), `statusUpdatedReason` is required. Endpoint Roles: Security Admin. + Accepts or reopens a finding for the workspace. When accepting a finding (`status: \"ACCEPTED\"`), `statusUpdatedReason` is required. Endpoint Roles: Security Admin. **Note:** This endpoint is available only for the FSPM Pro package. It is not available for FSPM Basic. :param id: Unique identifier of the finding (required) :type id: str diff --git a/fireblocks/api/vaults_api.py b/fireblocks/api/vaults_api.py index 2aca4c82..73beddb1 100644 --- a/fireblocks/api/vaults_api.py +++ b/fireblocks/api/vaults_api.py @@ -99,7 +99,7 @@ def activate_asset_for_vault_account( ) -> Future[ApiResponse[CreateVaultAssetResponse]]: """Activate a wallet in a vault account - Initiates activation for a wallet in a vault account. Activation is required for tokens that need an on-chain transaction for creation (XLM tokens, SOL tokens etc). Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + Initiates activation for a wallet in a vault account. Activation is required for tokens that need an on-chain transaction for creation. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. :param vault_account_id: The ID of the vault account to return, or 'default' for the default vault account (required) :type vault_account_id: str diff --git a/fireblocks/api/webhooks_v2_api.py b/fireblocks/api/webhooks_v2_api.py index 09cbe5ee..861986a5 100644 --- a/fireblocks/api/webhooks_v2_api.py +++ b/fireblocks/api/webhooks_v2_api.py @@ -21,7 +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_request import CreateWebhookRequest +from fireblocks.models.delete_webhook_o_auth_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 @@ -32,11 +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_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_paginated_response import WebhookPaginatedResponse from fireblocks.api_client import ApiClient, RequestSerialized @@ -206,6 +210,154 @@ def _create_webhook_serialize( + @validate_call + def create_webhook_o_auth( + self, + create_webhook_o_auth_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, + 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[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 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 + + + _param = self._create_webhook_o_auth_serialize( + create_webhook_o_auth_request=create_webhook_o_auth_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': "WebhookOAuthCredentials", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _create_webhook_o_auth_serialize( + self, + create_webhook_o_auth_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 + # 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 create_webhook_o_auth_request is not None: + _body_params = create_webhook_o_auth_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='/webhooks_settings/oauth', + 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 + ) + + + + @validate_call def delete_webhook( self, @@ -335,6 +487,145 @@ def _delete_webhook_serialize( + @validate_call + def delete_webhook_o_auth( + 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, + _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[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. + + :param webhook_oauth_id: The unique identifier of the OAuth credentials (required) + :type webhook_oauth_id: str + :param force_delete: 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. + :type force_delete: bool + :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="delete_webhook_o_auth", param_name="webhook_oauth_id", param_value=webhook_oauth_id) + + _param = self._delete_webhook_o_auth_serialize( + webhook_oauth_id=webhook_oauth_id, + force_delete=force_delete, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeleteWebhookOAuthResponse", + '409': "ErrorSchema", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _delete_webhook_o_auth_serialize( + self, + webhook_oauth_id, + force_delete, + _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 webhook_oauth_id is not None: + _path_params['webhookOauthId'] = webhook_oauth_id + # process the query parameters + if force_delete is not None: + + _query_params.append(('forceDelete', force_delete)) + + # process the header parameters + # 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='DELETE', + resource_path='/webhooks_settings/oauth/{webhookOauthId}', + 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 + ) + + + + @validate_call def get_metrics( self, @@ -1510,11 +1801,9 @@ def _get_webhook_serialize( @validate_call - def get_webhooks( + def get_webhook_o_auth( self, - order: Annotated[Optional[StrictStr], Field(description="ASC / DESC ordering (default DESC)")] = None, - page_cursor: Annotated[Optional[StrictStr], Field(description="Cursor of the required page")] = None, - page_size: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="Maximum number of items in the page")] = None, + webhook_oauth_id: Annotated[StrictStr, Field(description="The unique identifier of the OAuth credentials")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1527,12 +1816,264 @@ def get_webhooks( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[WebhookPaginatedResponse]]: - """Get all webhooks + ) -> Future[ApiResponse[WebhookOAuthCredentials]]: + """Get OAuth credentials by id - Get all webhooks (paginated). + Retrieve an OAuth credential set by its id. The client secret is never returned. - :param order: ASC / DESC ordering (default DESC) + :param webhook_oauth_id: The unique identifier of the OAuth credentials (required) + :type webhook_oauth_id: 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="get_webhook_o_auth", param_name="webhook_oauth_id", param_value=webhook_oauth_id) + + _param = self._get_webhook_o_auth_serialize( + webhook_oauth_id=webhook_oauth_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOAuthCredentials", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_webhook_o_auth_serialize( + self, + webhook_oauth_id, + _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 webhook_oauth_id is not None: + _path_params['webhookOauthId'] = webhook_oauth_id + # process the query parameters + # process the header parameters + # 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='GET', + resource_path='/webhooks_settings/oauth/{webhookOauthId}', + 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 + ) + + + + + @validate_call + def get_webhook_o_auths( + self, + _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[List[WebhookOAuthCredentials]]]: + """Get all OAuth credentials + + Lists every OAuth credential set for the workspace. Client secrets are never returned. + + :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 + + + _param = self._get_webhook_o_auths_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[WebhookOAuthCredentials]", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_webhook_o_auths_serialize( + self, + _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 + # process the query parameters + # process the header parameters + # 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='GET', + resource_path='/webhooks_settings/oauth', + 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 + ) + + + + + @validate_call + def get_webhooks( + self, + order: Annotated[Optional[StrictStr], Field(description="ASC / DESC ordering (default DESC)")] = None, + page_cursor: Annotated[Optional[StrictStr], Field(description="Cursor of the required page")] = None, + page_size: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="Maximum number of items in the page")] = 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[WebhookPaginatedResponse]]: + """Get all webhooks + + Get all webhooks (paginated). + + :param order: ASC / DESC ordering (default DESC) :type order: str :param page_cursor: Cursor of the required page :type page_cursor: str @@ -2418,3 +2959,152 @@ def _update_webhook_serialize( ) + + + @validate_call + def update_webhook_o_auth( + self, + webhook_oauth_id: Annotated[StrictStr, Field(description="The unique identifier of the OAuth credentials")], + update_webhook_o_auth_request: UpdateWebhookOAuthRequest, + _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[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 _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_webhook_o_auth", param_name="webhook_oauth_id", param_value=webhook_oauth_id) + + _param = self._update_webhook_o_auth_serialize( + webhook_oauth_id=webhook_oauth_id, + update_webhook_o_auth_request=update_webhook_o_auth_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOAuthCredentials", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _update_webhook_o_auth_serialize( + self, + webhook_oauth_id, + update_webhook_o_auth_request, + _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 webhook_oauth_id is not None: + _path_params['webhookOauthId'] = webhook_oauth_id + # process the query parameters + # 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 + + + # 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='PATCH', + resource_path='/webhooks_settings/oauth/{webhookOauthId}', + 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_client_configuration.py b/fireblocks/api_client_configuration.py new file mode 100644 index 00000000..66cb4475 --- /dev/null +++ b/fireblocks/api_client_configuration.py @@ -0,0 +1,33 @@ +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from typing import Optional + +from fireblocks.configuration import Configuration + +"""This class is the Configuration handed to ApiClient, extended with the +Fireblocks-specific transport settings that the generated Configuration does not +declare. Mirrors the layering of the public configuration: Fireblocks takes a +ClientConfiguration, ApiClient takes an ApiClientConfiguration. +:param connection_idle_timeout_sec: Seconds a pooled connection may sit idle before it is discarded. +""" + + +class ApiClientConfiguration(Configuration): + + def __init__( + self, *args, connection_idle_timeout_sec: Optional[float] = None, **kwargs + ) -> None: + super().__init__(*args, **kwargs) + # Read by rest.py when it builds the connection pool manager. None means + # "not configured"; connection_pool.py applies the SDK default. + self.connection_idle_timeout_sec = connection_idle_timeout_sec diff --git a/fireblocks/client.py b/fireblocks/client.py index d04f1068..fc961d79 100644 --- a/fireblocks/client.py +++ b/fireblocks/client.py @@ -15,6 +15,7 @@ from fireblocks.client_configuration import ClientConfiguration from fireblocks.api.api_user_api import ApiUserApi +from fireblocks.api.approvals_beta_api import ApprovalsBetaApi from fireblocks.api.audit_logs_api import AuditLogsApi from fireblocks.api.blockchain_link_beta_api import BlockchainLinkBetaApi from fireblocks.api.blockchains_assets_api import BlockchainsAssetsApi @@ -82,6 +83,7 @@ def __init__(self, configuration: ClientConfiguration = None): # APIs self._api_user = None + self._approvals_beta = None self._audit_logs = None self._blockchain_link_beta = None self._blockchains_assets = None @@ -151,6 +153,12 @@ def api_user(self) -> ApiUserApi: self._api_user = ApiUserApi(self._api_client) return self._api_user + @property + def approvals_beta(self) -> ApprovalsBetaApi: + if self._approvals_beta is None: + self._approvals_beta = ApprovalsBetaApi(self._api_client) + return self._approvals_beta + @property def audit_logs(self) -> AuditLogsApi: if self._audit_logs is None: diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py index 0a85bba9..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: 29.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/connection_pool.py b/fireblocks/connection_pool.py new file mode 100644 index 00000000..94880a07 --- /dev/null +++ b/fireblocks/connection_pool.py @@ -0,0 +1,164 @@ +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +"""Idle-connection eviction for the urllib3 connection pool. + +urllib3 keeps pooled connections indefinitely, so a connection that a proxy has +already dropped can still be handed out, failing the request with +``ConnectionResetError``. This module discards any connection that has been idle +longer than the configured limit and lets urllib3 reconnect transparently. + +Configure it through ``AdditionalOptions``:: + + ClientConfiguration( + ..., + additional_options=AdditionalOptions(connection_idle_timeout_sec=60), + ) + +Leave it unset for :data:`DEFAULT_IDLE_TIMEOUT_SECONDS`, use ``0`` to open a fresh +connection for every request, or ``-1`` for no limit. +""" + +import logging +import time + +import urllib3 + +log = logging.getLogger(__name__) + +DEFAULT_IDLE_TIMEOUT_SECONDS = 30 +"""Seconds a pooled connection may sit idle. Matches the Fireblocks Java SDK.""" + +MAX_IDLE_TIMEOUT_SECONDS = 60 +"""Largest accepted idle timeout, well inside the idle window of the edge.""" + +_IDLE_SINCE_ATTR = "_fireblocks_idle_since" + + +def normalize_idle_timeout_sec(value): + """Resolve a configured idle timeout to seconds, or ``None`` for no limit. + + ``None`` means "not configured" and yields :data:`DEFAULT_IDLE_TIMEOUT_SECONDS`. + A negative value means no limit (not recommended, risks connection issues). + Anything above :data:`MAX_IDLE_TIMEOUT_SECONDS` is capped. + """ + if value is None: + return DEFAULT_IDLE_TIMEOUT_SECONDS + + try: + seconds = float(value) + except (TypeError, ValueError): + log.warning( + "Ignoring invalid connection_idle_timeout_sec=%r; using default of %ss", + value, + DEFAULT_IDLE_TIMEOUT_SECONDS, + ) + return DEFAULT_IDLE_TIMEOUT_SECONDS + + if seconds < 0: + return None + + if seconds > MAX_IDLE_TIMEOUT_SECONDS: + # AdditionalOptions rejects this outright; reaching here means a + # Configuration was built directly, so cap rather than raise -- pools are + # created during a request, where an exception would read as a transport + # failure rather than a bad setting. + log.warning( + "Capping connection_idle_timeout_sec=%s at the maximum of %ss", + seconds, + MAX_IDLE_TIMEOUT_SECONDS, + ) + return float(MAX_IDLE_TIMEOUT_SECONDS) + + return seconds + + +class _IdleAwarePoolMixin: + """Discards pooled connections that have been idle for too long. + + urllib3 may gain this natively as ``idle_timeout`` (PR #3275); if it does, + these classes can be dropped in favour of it. + """ + + def __init__(self, *args, idle_timeout_sec=None, **kwargs): + # Consumed here so urllib3 never sees an unknown keyword. + super().__init__(*args, **kwargs) + self.idle_timeout_sec = normalize_idle_timeout_sec(idle_timeout_sec) + + def _put_conn(self, conn): + # conn is None when urllib3 discarded a failed connection. + if conn is not None: + conn._fireblocks_idle_since = time.monotonic() + super()._put_conn(conn) + + def _get_conn(self, timeout=None): + conn = super()._get_conn(timeout=timeout) + + # Tested against the sentinel: a configured 0 is falsy but is a real limit. + if conn is None or self.idle_timeout_sec is None: + return conn + + idle_since = getattr(conn, _IDLE_SINCE_ATTR, None) + if idle_since is None: + # Never pooled, so not idle. + return conn + + idle_for = time.monotonic() - idle_since + if idle_for > self.idle_timeout_sec: + log.debug( + "Discarding connection to %s:%s idle for %.1fs (limit %ss)", + self.host, + self.port, + idle_for, + self.idle_timeout_sec, + ) + # _validate_conn reconnects before the request is sent. + conn.close() + + return conn + + +class IdleAwareHTTPConnectionPool(_IdleAwarePoolMixin, urllib3.HTTPConnectionPool): + """``urllib3.HTTPConnectionPool`` that evicts connections idle too long.""" + + +class IdleAwareHTTPSConnectionPool(_IdleAwarePoolMixin, urllib3.HTTPSConnectionPool): + """``urllib3.HTTPSConnectionPool`` that evicts connections idle too long.""" + + +class _IdleAwareManagerMixin: + """Makes a pool manager hand out the idle-aware pools above.""" + + def __init__(self, *args, idle_timeout_sec=None, **kwargs): + # Kept off connection_pool_kw, which urllib3 turns into PoolKey fields. + super().__init__(*args, **kwargs) + self._idle_timeout_sec = idle_timeout_sec + # PoolManager.__init__ assigns urllib3's shared mapping, so replace it here + # with a fresh dict of our own. + self.pool_classes_by_scheme = { + "http": IdleAwareHTTPConnectionPool, + "https": IdleAwareHTTPSConnectionPool, + } + + def _new_pool(self, scheme, host, port, request_context=None): + if request_context is None: + request_context = self.connection_pool_kw + request_context = dict(request_context, idle_timeout_sec=self._idle_timeout_sec) + return super()._new_pool(scheme, host, port, request_context) + + +class IdleAwarePoolManager(_IdleAwareManagerMixin, urllib3.PoolManager): + """``urllib3.PoolManager`` whose pools evict connections idle too long.""" + + +class IdleAwareProxyManager(_IdleAwareManagerMixin, urllib3.ProxyManager): + """``urllib3.ProxyManager`` whose pools evict connections idle too long.""" diff --git a/fireblocks/models/__init__.py b/fireblocks/models/__init__.py index b4f8ac5e..4ffb2efc 100644 --- a/fireblocks/models/__init__.py +++ b/fireblocks/models/__init__.py @@ -24,8 +24,10 @@ from fireblocks.models.access_registry_current_state_response2 import AccessRegistryCurrentStateResponse2 from fireblocks.models.access_registry_summary_response import AccessRegistrySummaryResponse from fireblocks.models.access_type import AccessType +from fireblocks.models.access_type_response import AccessTypeResponse from fireblocks.models.account import Account from fireblocks.models.account_access import AccountAccess +from fireblocks.models.account_access_response import AccountAccessResponse from fireblocks.models.account_base import AccountBase from fireblocks.models.account_based_access_provider import AccountBasedAccessProvider from fireblocks.models.account_based_access_provider_info import AccountBasedAccessProviderInfo @@ -78,6 +80,11 @@ from fireblocks.models.addresses_filters import AddressesFilters from fireblocks.models.alert_exposure_type_enum import AlertExposureTypeEnum from fireblocks.models.alert_level_enum import AlertLevelEnum +from fireblocks.models.allocation_response import AllocationResponse +from fireblocks.models.allocation_response_accept import AllocationResponseAccept +from fireblocks.models.allocation_response_reject import AllocationResponseReject +from fireblocks.models.allocation_withdraw_payload import AllocationWithdrawPayload +from fireblocks.models.allow_list_payload import AllowListPayload from fireblocks.models.allowlist_entry import AllowlistEntry from fireblocks.models.allowlist_entry_response import AllowlistEntryResponse from fireblocks.models.allowlist_entry_status import AllowlistEntryStatus @@ -104,6 +111,7 @@ from fireblocks.models.api_key import ApiKey from fireblocks.models.api_keys_paginated_response import ApiKeysPaginatedResponse from fireblocks.models.approval_request import ApprovalRequest +from fireblocks.models.approval_request_item import ApprovalRequestItem from fireblocks.models.approvers_config import ApproversConfig from fireblocks.models.approvers_config_approval_groups_inner import ApproversConfigApprovalGroupsInner from fireblocks.models.apy import Apy @@ -180,9 +188,19 @@ from fireblocks.models.byork_verdict_request import ByorkVerdictRequest from fireblocks.models.byork_verdict_response import ByorkVerdictResponse from fireblocks.models.byork_verdict_response_status_enum import ByorkVerdictResponseStatusEnum +from fireblocks.models.call_accepted import CallAccepted from fireblocks.models.callback_handler import CallbackHandler from fireblocks.models.callback_handler_request import CallbackHandlerRequest from fireblocks.models.cancel_transaction_response import CancelTransactionResponse +from fireblocks.models.canton_call import CantonCall +from fireblocks.models.canton_call_allocation_withdraw import CantonCallAllocationWithdraw +from fireblocks.models.canton_call_allow_list_add import CantonCallAllowListAdd +from fireblocks.models.canton_call_allow_list_remove import CantonCallAllowListRemove +from fireblocks.models.canton_call_end_investor_invite import CantonCallEndInvestorInvite +from fireblocks.models.canton_call_end_investor_invite_cancel import CantonCallEndInvestorInviteCancel +from fireblocks.models.canton_call_end_investor_offboard import CantonCallEndInvestorOffboard +from fireblocks.models.canton_call_participant_onboarding import CantonCallParticipantOnboarding +from fireblocks.models.canton_call_transfer_withdraw import CantonCallTransferWithdraw from fireblocks.models.chain_descriptor import ChainDescriptor from fireblocks.models.chain_info_response import ChainInfoResponse from fireblocks.models.channel_dvn_config_with_confirmations import ChannelDvnConfigWithConfirmations @@ -327,6 +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_request import CreateWebhookRequest from fireblocks.models.create_workflow_execution_request_params_inner import CreateWorkflowExecutionRequestParamsInner from fireblocks.models.custom_routing_dest import CustomRoutingDest @@ -340,6 +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.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 @@ -355,6 +375,8 @@ from fireblocks.models.direct_access import DirectAccess from fireblocks.models.direct_access_provider import DirectAccessProvider from fireblocks.models.direct_access_provider_info import DirectAccessProviderInfo +from fireblocks.models.direct_access_response import DirectAccessResponse +from fireblocks.models.direct_access_response_info import DirectAccessResponseInfo from fireblocks.models.disbursement_amount_instruction import DisbursementAmountInstruction from fireblocks.models.disbursement_config_operation import DisbursementConfigOperation from fireblocks.models.disbursement_instruction import DisbursementInstruction @@ -405,6 +427,7 @@ from fireblocks.models.embedded_wallet_setup_status_response import EmbeddedWalletSetupStatusResponse from fireblocks.models.enable_device import EnableDevice from fireblocks.models.enable_wallet import EnableWallet +from fireblocks.models.end_investor_payload import EndInvestorPayload from fireblocks.models.error_response import ErrorResponse from fireblocks.models.error_response_error import ErrorResponseError from fireblocks.models.error_schema import ErrorSchema @@ -576,6 +599,7 @@ from fireblocks.models.legal_entity_registration import LegalEntityRegistration from fireblocks.models.lei_status import LeiStatus from fireblocks.models.linked_tokens_count import LinkedTokensCount +from fireblocks.models.list_approvals_response import ListApprovalsResponse from fireblocks.models.list_assets_response import ListAssetsResponse from fireblocks.models.list_blockchains_response import ListBlockchainsResponse from fireblocks.models.list_blockchains_response2 import ListBlockchainsResponse2 @@ -632,7 +656,17 @@ from fireblocks.models.notification_status import NotificationStatus from fireblocks.models.notification_with_data import NotificationWithData from fireblocks.models.offer import Offer +from fireblocks.models.offer_response import OfferResponse +from fireblocks.models.offer_response_accepted import OfferResponseAccepted +from fireblocks.models.offer_response_allocation import OfferResponseAllocation +from fireblocks.models.offer_response_onboarding import OfferResponseOnboarding +from fireblocks.models.offer_response_transfer import OfferResponseTransfer from fireblocks.models.offers_response import OffersResponse +from fireblocks.models.onboarding_response import OnboardingResponse +from fireblocks.models.onboarding_response_dtcc_accept import OnboardingResponseDtccAccept +from fireblocks.models.onboarding_response_dtcc_reject import OnboardingResponseDtccReject +from fireblocks.models.onboarding_response_tradeweb_accept import OnboardingResponseTradewebAccept +from fireblocks.models.onboarding_response_tradeweb_reject import OnboardingResponseTradewebReject from fireblocks.models.onchain_transaction import OnchainTransaction from fireblocks.models.onchain_transactions_paged_response import OnchainTransactionsPagedResponse from fireblocks.models.onchain_transactions_paged_response2 import OnchainTransactionsPagedResponse2 @@ -662,6 +696,7 @@ from fireblocks.models.pair_api_key_response import PairApiKeyResponse from fireblocks.models.parameter import Parameter from fireblocks.models.parameter_with_value import ParameterWithValue +from fireblocks.models.participant_onboarding_payload import ParticipantOnboardingPayload from fireblocks.models.participant_relationship_type import ParticipantRelationshipType from fireblocks.models.participants_identification import ParticipantsIdentification from fireblocks.models.participants_identification_policy import ParticipantsIdentificationPolicy @@ -732,6 +767,13 @@ from fireblocks.models.public_key_information import PublicKeyInformation from fireblocks.models.publish_draft_request import PublishDraftRequest from fireblocks.models.publish_result import PublishResult +from fireblocks.models.quorum_approval_state import QuorumApprovalState +from fireblocks.models.quorum_group import QuorumGroup +from fireblocks.models.quorum_request_state import QuorumRequestState +from fireblocks.models.quorum_ruleset import QuorumRuleset +from fireblocks.models.quorum_status import QuorumStatus +from fireblocks.models.quorum_status_quorum import QuorumStatusQuorum +from fireblocks.models.quorum_user import QuorumUser from fireblocks.models.quote import Quote from fireblocks.models.quote_execution_request_details import QuoteExecutionRequestDetails from fireblocks.models.quote_execution_step import QuoteExecutionStep @@ -798,6 +840,7 @@ from fireblocks.models.role_details import RoleDetails from fireblocks.models.role_details2 import RoleDetails2 from fireblocks.models.role_grantee import RoleGrantee +from fireblocks.models.ruleset_quorum import RulesetQuorum from fireblocks.models.sepa_address import SEPAAddress from fireblocks.models.sepa_destination import SEPADestination from fireblocks.models.sol_account import SOLAccount @@ -871,6 +914,7 @@ from fireblocks.models.signed_message import SignedMessage from fireblocks.models.signed_message_signature import SignedMessageSignature from fireblocks.models.signing_key_dto import SigningKeyDto +from fireblocks.models.simple_quorum import SimpleQuorum from fireblocks.models.smart_transfer_approve_term import SmartTransferApproveTerm from fireblocks.models.smart_transfer_bad_request_response import SmartTransferBadRequestResponse from fireblocks.models.smart_transfer_coin_statistic import SmartTransferCoinStatistic @@ -1089,7 +1133,11 @@ from fireblocks.models.transfer_peer_type_enum2 import TransferPeerTypeEnum2 from fireblocks.models.transfer_rail import TransferRail from fireblocks.models.transfer_receipt import TransferReceipt +from fireblocks.models.transfer_response import TransferResponse +from fireblocks.models.transfer_response_accept import TransferResponseAccept +from fireblocks.models.transfer_response_reject import TransferResponseReject from fireblocks.models.transfer_validation_failure import TransferValidationFailure +from fireblocks.models.transfer_withdraw_payload import TransferWithdrawPayload from fireblocks.models.travel_rule_action_enum import TravelRuleActionEnum from fireblocks.models.travel_rule_address import TravelRuleAddress from fireblocks.models.travel_rule_create_transaction_request import TravelRuleCreateTransactionRequest @@ -1163,6 +1211,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_request import UpdateWebhookRequest from fireblocks.models.us_wire_payment_info import UsWirePaymentInfo from fireblocks.models.usdc_gateway_wallet_asset import UsdcGatewayWalletAsset @@ -1209,6 +1258,7 @@ 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_paginated_response import WebhookPaginatedResponse from fireblocks.models.withdraw_request import WithdrawRequest diff --git a/fireblocks/models/access_type_response.py b/fireblocks/models/access_type_response.py new file mode 100644 index 00000000..57f4c589 --- /dev/null +++ b/fireblocks/models/access_type_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from fireblocks.models.account_access_response import AccountAccessResponse +from fireblocks.models.direct_access_response import DirectAccessResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ACCESSTYPERESPONSE_ONE_OF_SCHEMAS = ["AccountAccessResponse", "DirectAccessResponse"] + +class AccessTypeResponse(BaseModel): + """ + Response-only counterpart of AccessType. Used by the `via` field of response schemas (Quote, Rate, OrderDetails, OrderSummary — and therefore QuoteOffer, RateOffer and Offer) so that the PROVIDER variant can expose `subProviders` without that field ever becoming reachable from a request body. Request schemas (CreateOrderRequest.via) keep using AccessType. + """ + # data type: AccountAccessResponse + oneof_schema_1_validator: Optional[AccountAccessResponse] = None + # data type: DirectAccessResponse + oneof_schema_2_validator: Optional[DirectAccessResponse] = None + actual_instance: Optional[Union[AccountAccessResponse, DirectAccessResponse]] = None + one_of_schemas: Set[str] = { "AccountAccessResponse", "DirectAccessResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AccessTypeResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: AccountAccessResponse + if not isinstance(v, AccountAccessResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `AccountAccessResponse`") + else: + match += 1 + # validate data type: DirectAccessResponse + if not isinstance(v, DirectAccessResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `DirectAccessResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AccessTypeResponse with oneOf schemas: AccountAccessResponse, DirectAccessResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AccessTypeResponse with oneOf schemas: AccountAccessResponse, DirectAccessResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AccountAccessResponse + try: + instance.actual_instance = AccountAccessResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DirectAccessResponse + try: + instance.actual_instance = DirectAccessResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AccessTypeResponse with oneOf schemas: AccountAccessResponse, DirectAccessResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AccessTypeResponse with oneOf schemas: AccountAccessResponse, DirectAccessResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AccountAccessResponse, DirectAccessResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/fireblocks/models/account_access_response.py b/fireblocks/models/account_access_response.py new file mode 100644 index 00000000..45715040 --- /dev/null +++ b/fireblocks/models/account_access_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +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 import Optional, Set +from typing_extensions import Self + +class AccountAccessResponse(BaseModel): + """ + Response-only counterpart of AccountAccess. + """ # noqa: E501 + type: StrictStr = Field(description="Indicates this uses account-based access") + provider_id: Optional[StrictStr] = Field(default=None, description="The ID of the provider", alias="providerId") + account_id: StrictStr = Field(description="The ID of the account", alias="accountId") + __properties: ClassVar[List[str]] = ["type", "providerId", "accountId"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['PROVIDER_ACCOUNT']): + raise ValueError("must be one of enum values ('PROVIDER_ACCOUNT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountAccessResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountAccessResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "providerId": obj.get("providerId"), + "accountId": obj.get("accountId") + }) + return _obj + + diff --git a/fireblocks/models/allocation_response.py b/fireblocks/models/allocation_response.py new file mode 100644 index 00000000..b26f294d --- /dev/null +++ b/fireblocks/models/allocation_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from fireblocks.models.allocation_response_accept import AllocationResponseAccept +from fireblocks.models.allocation_response_reject import AllocationResponseReject +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ALLOCATIONRESPONSE_ONE_OF_SCHEMAS = ["AllocationResponseAccept", "AllocationResponseReject"] + +class AllocationResponse(BaseModel): + """ + AllocationResponse + """ + # data type: AllocationResponseAccept + oneof_schema_1_validator: Optional[AllocationResponseAccept] = None + # data type: AllocationResponseReject + oneof_schema_2_validator: Optional[AllocationResponseReject] = None + actual_instance: Optional[Union[AllocationResponseAccept, AllocationResponseReject]] = None + one_of_schemas: Set[str] = { "AllocationResponseAccept", "AllocationResponseReject" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AllocationResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: AllocationResponseAccept + if not isinstance(v, AllocationResponseAccept): + error_messages.append(f"Error! Input type `{type(v)}` is not `AllocationResponseAccept`") + else: + match += 1 + # validate data type: AllocationResponseReject + if not isinstance(v, AllocationResponseReject): + error_messages.append(f"Error! Input type `{type(v)}` is not `AllocationResponseReject`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AllocationResponse with oneOf schemas: AllocationResponseAccept, AllocationResponseReject. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AllocationResponse with oneOf schemas: AllocationResponseAccept, AllocationResponseReject. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AllocationResponseAccept + try: + instance.actual_instance = AllocationResponseAccept.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AllocationResponseReject + try: + instance.actual_instance = AllocationResponseReject.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AllocationResponse with oneOf schemas: AllocationResponseAccept, AllocationResponseReject. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AllocationResponse with oneOf schemas: AllocationResponseAccept, AllocationResponseReject. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AllocationResponseAccept, AllocationResponseReject]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/fireblocks/models/allocation_response_accept.py b/fireblocks/models/allocation_response_accept.py new file mode 100644 index 00000000..20269fa0 --- /dev/null +++ b/fireblocks/models/allocation_response_accept.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AllocationResponseAccept(BaseModel): + """ + Accept a CIP-56 allocation request. Carries no arguments. + """ # noqa: E501 + response_type: StrictStr = Field(description="How you are answering the allocation request.", alias="responseType") + __properties: ClassVar[List[str]] = ["responseType"] + + @field_validator('response_type') + def response_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALLOCATION_ACCEPT']): + raise ValueError("must be one of enum values ('ALLOCATION_ACCEPT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AllocationResponseAccept from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllocationResponseAccept from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "responseType": obj.get("responseType") + }) + return _obj + + diff --git a/fireblocks/models/allocation_response_reject.py b/fireblocks/models/allocation_response_reject.py new file mode 100644 index 00000000..12cbc591 --- /dev/null +++ b/fireblocks/models/allocation_response_reject.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AllocationResponseReject(BaseModel): + """ + Reject a CIP-56 allocation request. Carries no arguments. + """ # noqa: E501 + response_type: StrictStr = Field(description="How you are answering the allocation request.", alias="responseType") + __properties: ClassVar[List[str]] = ["responseType"] + + @field_validator('response_type') + def response_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALLOCATION_REJECT']): + raise ValueError("must be one of enum values ('ALLOCATION_REJECT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AllocationResponseReject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllocationResponseReject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "responseType": obj.get("responseType") + }) + return _obj + + diff --git a/fireblocks/models/allocation_withdraw_payload.py b/fireblocks/models/allocation_withdraw_payload.py new file mode 100644 index 00000000..a0e84035 --- /dev/null +++ b/fireblocks/models/allocation_withdraw_payload.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AllocationWithdrawPayload(BaseModel): + """ + AllocationWithdrawPayload + """ # noqa: E501 + vault_account_id: StrictStr = Field(description="The vault account whose Canton wallet acts here.", alias="vaultAccountId") + asset: StrictStr = Field(description="Chain asset — `CANTON` or `CANTON_TEST`.") + allocation_transaction_id: StrictStr = Field(description="The Fireblocks transaction id of the outgoing response that created the allocation. The allocation is resolved from it — Canton contract ids are never accepted here.", alias="allocationTransactionId") + __properties: ClassVar[List[str]] = ["vaultAccountId", "asset", "allocationTransactionId"] + + @field_validator('asset') + def asset_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CANTON', 'CANTON_TEST']): + raise ValueError("must be one of enum values ('CANTON', 'CANTON_TEST')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AllocationWithdrawPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllocationWithdrawPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vaultAccountId": obj.get("vaultAccountId"), + "asset": obj.get("asset"), + "allocationTransactionId": obj.get("allocationTransactionId") + }) + return _obj + + diff --git a/fireblocks/models/allow_list_payload.py b/fireblocks/models/allow_list_payload.py new file mode 100644 index 00000000..d86d0f41 --- /dev/null +++ b/fireblocks/models/allow_list_payload.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AllowListPayload(BaseModel): + """ + AllowListPayload + """ # noqa: E501 + vault_account_id: StrictStr = Field(description="The vault account whose Canton wallet acts here.", alias="vaultAccountId") + asset: StrictStr = Field(description="Chain asset — `CANTON` or `CANTON_TEST`.") + wallets: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Canton party ids to add or remove.") + __properties: ClassVar[List[str]] = ["vaultAccountId", "asset", "wallets"] + + @field_validator('asset') + def asset_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CANTON', 'CANTON_TEST']): + raise ValueError("must be one of enum values ('CANTON', 'CANTON_TEST')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AllowListPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllowListPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vaultAccountId": obj.get("vaultAccountId"), + "asset": obj.get("asset"), + "wallets": obj.get("wallets") + }) + return _obj + + diff --git a/fireblocks/models/approval_request_item.py b/fireblocks/models/approval_request_item.py new file mode 100644 index 00000000..43858067 --- /dev/null +++ b/fireblocks/models/approval_request_item.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.quorum_status import QuorumStatus +from typing import Optional, Set +from typing_extensions import Self + +class ApprovalRequestItem(BaseModel): + """ + ApprovalRequestItem + """ # noqa: E501 + request_payload: StrictStr = Field(description="The pending approval request as a JSON string, exactly as produced by the backend — this is the precise string to sign in order to approve the request (sign it as-is; do not re-serialize). The JSON has the shape { requestId, requestType, requestTimestamp (epoch ms), expiresAt (epoch seconds), requestData }, where requestData is the request-type-specific payload.", alias="requestPayload") + request_signature: Optional[StrictStr] = Field(default=None, description="Signature over the requestPayload. Empty until request signing is implemented.", alias="requestSignature") + user_status: StrictStr = Field(description="The authenticated user's approval status for this request.", alias="userStatus") + quorum_status: Optional[QuorumStatus] = Field(default=None, alias="quorumStatus") + __properties: ClassVar[List[str]] = ["requestPayload", "requestSignature", "userStatus", "quorumStatus"] + + @field_validator('user_status') + def user_status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['USER_STATUS_NOT_APPLICABLE', 'USER_NOT_ELIGIBLE_TO_APPROVE', 'USER_NOT_APPROVED', 'USER_APPROVED']): + raise ValueError("must be one of enum values ('USER_STATUS_NOT_APPLICABLE', 'USER_NOT_ELIGIBLE_TO_APPROVE', 'USER_NOT_APPROVED', 'USER_APPROVED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApprovalRequestItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of quorum_status + if self.quorum_status: + _dict['quorumStatus'] = self.quorum_status.to_dict() + # set to None if quorum_status (nullable) is None + # and model_fields_set contains the field + if self.quorum_status is None and "quorum_status" in self.model_fields_set: + _dict['quorumStatus'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApprovalRequestItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": obj.get("requestPayload"), + "requestSignature": obj.get("requestSignature"), + "userStatus": obj.get("userStatus"), + "quorumStatus": QuorumStatus.from_dict(obj["quorumStatus"]) if obj.get("quorumStatus") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/call_accepted.py b/fireblocks/models/call_accepted.py new file mode 100644 index 00000000..64056f31 --- /dev/null +++ b/fireblocks/models/call_accepted.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CallAccepted(BaseModel): + """ + The outgoing transaction that carries the call. + """ # noqa: E501 + transaction_id: StrictStr = Field(description="The outgoing transaction that carries the call.", alias="transactionId") + status: StrictStr = Field(description="The transaction's status at the time of this response — `SUBMITTED`.") + __properties: ClassVar[List[str]] = ["transactionId", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CallAccepted from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallAccepted from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "transactionId": obj.get("transactionId"), + "status": obj.get("status") + }) + return _obj + + diff --git a/fireblocks/models/canton_call.py b/fireblocks/models/canton_call.py new file mode 100644 index 00000000..9ad28b3c --- /dev/null +++ b/fireblocks/models/canton_call.py @@ -0,0 +1,225 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from fireblocks.models.canton_call_allocation_withdraw import CantonCallAllocationWithdraw +from fireblocks.models.canton_call_allow_list_add import CantonCallAllowListAdd +from fireblocks.models.canton_call_allow_list_remove import CantonCallAllowListRemove +from fireblocks.models.canton_call_end_investor_invite import CantonCallEndInvestorInvite +from fireblocks.models.canton_call_end_investor_invite_cancel import CantonCallEndInvestorInviteCancel +from fireblocks.models.canton_call_end_investor_offboard import CantonCallEndInvestorOffboard +from fireblocks.models.canton_call_participant_onboarding import CantonCallParticipantOnboarding +from fireblocks.models.canton_call_transfer_withdraw import CantonCallTransferWithdraw +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CANTONCALL_ONE_OF_SCHEMAS = ["CantonCallAllocationWithdraw", "CantonCallAllowListAdd", "CantonCallAllowListRemove", "CantonCallEndInvestorInvite", "CantonCallEndInvestorInviteCancel", "CantonCallEndInvestorOffboard", "CantonCallParticipantOnboarding", "CantonCallTransferWithdraw"] + +class CantonCall(BaseModel): + """ + CantonCall + """ + # data type: CantonCallParticipantOnboarding + oneof_schema_1_validator: Optional[CantonCallParticipantOnboarding] = None + # data type: CantonCallEndInvestorInvite + oneof_schema_2_validator: Optional[CantonCallEndInvestorInvite] = None + # data type: CantonCallEndInvestorInviteCancel + oneof_schema_3_validator: Optional[CantonCallEndInvestorInviteCancel] = None + # data type: CantonCallEndInvestorOffboard + oneof_schema_4_validator: Optional[CantonCallEndInvestorOffboard] = None + # data type: CantonCallAllowListAdd + oneof_schema_5_validator: Optional[CantonCallAllowListAdd] = None + # data type: CantonCallAllowListRemove + oneof_schema_6_validator: Optional[CantonCallAllowListRemove] = None + # data type: CantonCallAllocationWithdraw + oneof_schema_7_validator: Optional[CantonCallAllocationWithdraw] = None + # data type: CantonCallTransferWithdraw + oneof_schema_8_validator: Optional[CantonCallTransferWithdraw] = None + actual_instance: Optional[Union[CantonCallAllocationWithdraw, CantonCallAllowListAdd, CantonCallAllowListRemove, CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding, CantonCallTransferWithdraw]] = None + one_of_schemas: Set[str] = { "CantonCallAllocationWithdraw", "CantonCallAllowListAdd", "CantonCallAllowListRemove", "CantonCallEndInvestorInvite", "CantonCallEndInvestorInviteCancel", "CantonCallEndInvestorOffboard", "CantonCallParticipantOnboarding", "CantonCallTransferWithdraw" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = CantonCall.model_construct() + error_messages = [] + match = 0 + # validate data type: CantonCallParticipantOnboarding + if not isinstance(v, CantonCallParticipantOnboarding): + error_messages.append(f"Error! Input type `{type(v)}` is not `CantonCallParticipantOnboarding`") + else: + match += 1 + # validate data type: CantonCallEndInvestorInvite + if not isinstance(v, CantonCallEndInvestorInvite): + error_messages.append(f"Error! Input type `{type(v)}` is not `CantonCallEndInvestorInvite`") + else: + match += 1 + # validate data type: CantonCallEndInvestorInviteCancel + if not isinstance(v, CantonCallEndInvestorInviteCancel): + error_messages.append(f"Error! Input type `{type(v)}` is not `CantonCallEndInvestorInviteCancel`") + else: + match += 1 + # validate data type: CantonCallEndInvestorOffboard + if not isinstance(v, CantonCallEndInvestorOffboard): + error_messages.append(f"Error! Input type `{type(v)}` is not `CantonCallEndInvestorOffboard`") + else: + match += 1 + # validate data type: CantonCallAllowListAdd + if not isinstance(v, CantonCallAllowListAdd): + error_messages.append(f"Error! Input type `{type(v)}` is not `CantonCallAllowListAdd`") + else: + match += 1 + # validate data type: CantonCallAllowListRemove + if not isinstance(v, CantonCallAllowListRemove): + error_messages.append(f"Error! Input type `{type(v)}` is not `CantonCallAllowListRemove`") + else: + match += 1 + # validate data type: CantonCallAllocationWithdraw + if not isinstance(v, CantonCallAllocationWithdraw): + error_messages.append(f"Error! Input type `{type(v)}` is not `CantonCallAllocationWithdraw`") + else: + match += 1 + # validate data type: CantonCallTransferWithdraw + if not isinstance(v, CantonCallTransferWithdraw): + error_messages.append(f"Error! Input type `{type(v)}` is not `CantonCallTransferWithdraw`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in CantonCall with oneOf schemas: CantonCallAllocationWithdraw, CantonCallAllowListAdd, CantonCallAllowListRemove, CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding, CantonCallTransferWithdraw. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in CantonCall with oneOf schemas: CantonCallAllocationWithdraw, CantonCallAllowListAdd, CantonCallAllowListRemove, CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding, CantonCallTransferWithdraw. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CantonCallParticipantOnboarding + try: + instance.actual_instance = CantonCallParticipantOnboarding.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CantonCallEndInvestorInvite + try: + instance.actual_instance = CantonCallEndInvestorInvite.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CantonCallEndInvestorInviteCancel + try: + instance.actual_instance = CantonCallEndInvestorInviteCancel.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CantonCallEndInvestorOffboard + try: + instance.actual_instance = CantonCallEndInvestorOffboard.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CantonCallAllowListAdd + try: + instance.actual_instance = CantonCallAllowListAdd.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CantonCallAllowListRemove + try: + instance.actual_instance = CantonCallAllowListRemove.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CantonCallAllocationWithdraw + try: + instance.actual_instance = CantonCallAllocationWithdraw.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CantonCallTransferWithdraw + try: + instance.actual_instance = CantonCallTransferWithdraw.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into CantonCall with oneOf schemas: CantonCallAllocationWithdraw, CantonCallAllowListAdd, CantonCallAllowListRemove, CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding, CantonCallTransferWithdraw. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into CantonCall with oneOf schemas: CantonCallAllocationWithdraw, CantonCallAllowListAdd, CantonCallAllowListRemove, CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding, CantonCallTransferWithdraw. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CantonCallAllocationWithdraw, CantonCallAllowListAdd, CantonCallAllowListRemove, CantonCallEndInvestorInvite, CantonCallEndInvestorInviteCancel, CantonCallEndInvestorOffboard, CantonCallParticipantOnboarding, CantonCallTransferWithdraw]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/fireblocks/models/canton_call_allocation_withdraw.py b/fireblocks/models/canton_call_allocation_withdraw.py new file mode 100644 index 00000000..3d1398ee --- /dev/null +++ b/fireblocks/models/canton_call_allocation_withdraw.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.allocation_withdraw_payload import AllocationWithdrawPayload +from typing import Optional, Set +from typing_extensions import Self + +class CantonCallAllocationWithdraw(BaseModel): + """ + CantonCallAllocationWithdraw + """ # noqa: E501 + type: StrictStr = Field(description="Which call to make. Selects the shape of `payload`.") + payload: AllocationWithdrawPayload + __properties: ClassVar[List[str]] = ["type", "payload"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALLOCATION_WITHDRAW']): + raise ValueError("must be one of enum values ('ALLOCATION_WITHDRAW')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CantonCallAllocationWithdraw from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payload + if self.payload: + _dict['payload'] = self.payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CantonCallAllocationWithdraw from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "payload": AllocationWithdrawPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/canton_call_allow_list_add.py b/fireblocks/models/canton_call_allow_list_add.py new file mode 100644 index 00000000..44a19a31 --- /dev/null +++ b/fireblocks/models/canton_call_allow_list_add.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.allow_list_payload import AllowListPayload +from typing import Optional, Set +from typing_extensions import Self + +class CantonCallAllowListAdd(BaseModel): + """ + CantonCallAllowListAdd + """ # noqa: E501 + type: StrictStr = Field(description="Which call to make. Selects the shape of `payload`.") + payload: AllowListPayload + __properties: ClassVar[List[str]] = ["type", "payload"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DTCC_ALLOW_LIST_ADD']): + raise ValueError("must be one of enum values ('DTCC_ALLOW_LIST_ADD')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CantonCallAllowListAdd from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payload + if self.payload: + _dict['payload'] = self.payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CantonCallAllowListAdd from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "payload": AllowListPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/canton_call_allow_list_remove.py b/fireblocks/models/canton_call_allow_list_remove.py new file mode 100644 index 00000000..6a8a91ae --- /dev/null +++ b/fireblocks/models/canton_call_allow_list_remove.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.allow_list_payload import AllowListPayload +from typing import Optional, Set +from typing_extensions import Self + +class CantonCallAllowListRemove(BaseModel): + """ + CantonCallAllowListRemove + """ # noqa: E501 + type: StrictStr = Field(description="Which call to make. Selects the shape of `payload`.") + payload: AllowListPayload + __properties: ClassVar[List[str]] = ["type", "payload"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DTCC_ALLOW_LIST_REMOVE']): + raise ValueError("must be one of enum values ('DTCC_ALLOW_LIST_REMOVE')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CantonCallAllowListRemove from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payload + if self.payload: + _dict['payload'] = self.payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CantonCallAllowListRemove from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "payload": AllowListPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/canton_call_end_investor_invite.py b/fireblocks/models/canton_call_end_investor_invite.py new file mode 100644 index 00000000..ae0009e4 --- /dev/null +++ b/fireblocks/models/canton_call_end_investor_invite.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.end_investor_payload import EndInvestorPayload +from typing import Optional, Set +from typing_extensions import Self + +class CantonCallEndInvestorInvite(BaseModel): + """ + CantonCallEndInvestorInvite + """ # noqa: E501 + type: StrictStr = Field(description="Which call to make. Selects the shape of `payload`.") + payload: EndInvestorPayload + __properties: ClassVar[List[str]] = ["type", "payload"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DTCC_END_INVESTOR_INVITE']): + raise ValueError("must be one of enum values ('DTCC_END_INVESTOR_INVITE')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CantonCallEndInvestorInvite from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payload + if self.payload: + _dict['payload'] = self.payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CantonCallEndInvestorInvite from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "payload": EndInvestorPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/canton_call_end_investor_invite_cancel.py b/fireblocks/models/canton_call_end_investor_invite_cancel.py new file mode 100644 index 00000000..da7b63fe --- /dev/null +++ b/fireblocks/models/canton_call_end_investor_invite_cancel.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.end_investor_payload import EndInvestorPayload +from typing import Optional, Set +from typing_extensions import Self + +class CantonCallEndInvestorInviteCancel(BaseModel): + """ + CantonCallEndInvestorInviteCancel + """ # noqa: E501 + type: StrictStr = Field(description="Which call to make. Selects the shape of `payload`.") + payload: EndInvestorPayload + __properties: ClassVar[List[str]] = ["type", "payload"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DTCC_END_INVESTOR_INVITE_CANCEL']): + raise ValueError("must be one of enum values ('DTCC_END_INVESTOR_INVITE_CANCEL')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CantonCallEndInvestorInviteCancel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payload + if self.payload: + _dict['payload'] = self.payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CantonCallEndInvestorInviteCancel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "payload": EndInvestorPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/canton_call_end_investor_offboard.py b/fireblocks/models/canton_call_end_investor_offboard.py new file mode 100644 index 00000000..2d8c342f --- /dev/null +++ b/fireblocks/models/canton_call_end_investor_offboard.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.end_investor_payload import EndInvestorPayload +from typing import Optional, Set +from typing_extensions import Self + +class CantonCallEndInvestorOffboard(BaseModel): + """ + CantonCallEndInvestorOffboard + """ # noqa: E501 + type: StrictStr = Field(description="Which call to make. Selects the shape of `payload`.") + payload: EndInvestorPayload + __properties: ClassVar[List[str]] = ["type", "payload"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DTCC_END_INVESTOR_OFFBOARD']): + raise ValueError("must be one of enum values ('DTCC_END_INVESTOR_OFFBOARD')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CantonCallEndInvestorOffboard from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payload + if self.payload: + _dict['payload'] = self.payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CantonCallEndInvestorOffboard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "payload": EndInvestorPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/canton_call_participant_onboarding.py b/fireblocks/models/canton_call_participant_onboarding.py new file mode 100644 index 00000000..d49de55c --- /dev/null +++ b/fireblocks/models/canton_call_participant_onboarding.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.participant_onboarding_payload import ParticipantOnboardingPayload +from typing import Optional, Set +from typing_extensions import Self + +class CantonCallParticipantOnboarding(BaseModel): + """ + CantonCallParticipantOnboarding + """ # noqa: E501 + type: StrictStr = Field(description="Which call to make. Selects the shape of `payload`.") + payload: ParticipantOnboardingPayload + __properties: ClassVar[List[str]] = ["type", "payload"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DTCC_PARTICIPANT_ONBOARDING']): + raise ValueError("must be one of enum values ('DTCC_PARTICIPANT_ONBOARDING')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CantonCallParticipantOnboarding from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payload + if self.payload: + _dict['payload'] = self.payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CantonCallParticipantOnboarding from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "payload": ParticipantOnboardingPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/canton_call_transfer_withdraw.py b/fireblocks/models/canton_call_transfer_withdraw.py new file mode 100644 index 00000000..44f0ccdc --- /dev/null +++ b/fireblocks/models/canton_call_transfer_withdraw.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.transfer_withdraw_payload import TransferWithdrawPayload +from typing import Optional, Set +from typing_extensions import Self + +class CantonCallTransferWithdraw(BaseModel): + """ + CantonCallTransferWithdraw + """ # noqa: E501 + type: StrictStr = Field(description="Which call to make. Selects the shape of `payload`.") + payload: TransferWithdrawPayload + __properties: ClassVar[List[str]] = ["type", "payload"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['TRANSFER_WITHDRAW']): + raise ValueError("must be one of enum values ('TRANSFER_WITHDRAW')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CantonCallTransferWithdraw from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payload + if self.payload: + _dict['payload'] = self.payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CantonCallTransferWithdraw from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "payload": TransferWithdrawPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/create_webhook_o_auth_request.py b/fireblocks/models/create_webhook_o_auth_request.py new file mode 100644 index 00000000..e73e23cb --- /dev/null +++ b/fireblocks/models/create_webhook_o_auth_request.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +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 typing import Optional, Set +from typing_extensions import Self + +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 + name: Annotated[str, Field(min_length=1, strict=True, max_length=128)] = Field(description="A label for this credential set, shown when listing them.") + client_id: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="OAuth client ID used to authenticate with the token endpoint.", alias="clientId") + 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") + 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"] + + @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 + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateWebhookOAuthRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if custom_jwt_claims (nullable) is None + # and model_fields_set contains the field + if self.custom_jwt_claims is None and "custom_jwt_claims" in self.model_fields_set: + _dict['customJwtClaims'] = None + + # set to None if custom_body_params (nullable) is None + # and model_fields_set contains the field + if self.custom_body_params is None and "custom_body_params" in self.model_fields_set: + _dict['customBodyParams'] = None + + # set to None if custom_headers (nullable) is None + # and model_fields_set contains the field + if self.custom_headers is None and "custom_headers" in self.model_fields_set: + _dict['customHeaders'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateWebhookOAuthRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "url": obj.get("url"), + "authMethod": obj.get("authMethod") if obj.get("authMethod") is not None else 'client_secret_basic', + "customJwtClaims": obj.get("customJwtClaims"), + "customBodyParams": obj.get("customBodyParams"), + "customHeaders": obj.get("customHeaders"), + "mtlsClientSignedCert": obj.get("mtlsClientSignedCert") + }) + return _obj + + diff --git a/fireblocks/models/create_webhook_request.py b/fireblocks/models/create_webhook_request.py index 6552bc99..22c2d78c 100644 --- a/fireblocks/models/create_webhook_request.py +++ b/fireblocks/models/create_webhook_request.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from fireblocks.models.webhook_event import WebhookEvent @@ -37,7 +37,7 @@ class CreateWebhookRequest(BaseModel): 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, Annotated[str, Field(min_length=1, strict=True, max_length=1024)]]] = Field(default=None, description="Custom HTTP headers attached to every notification delivered by this webhook (max 10). Header names must be valid RFC 7230 tokens (printable ASCII, no separators), are treated case-insensitively (duplicate names differing only in case are rejected), and may not exceed 128 characters. The following names are reserved and cannot be used: Host, Content-Type, Content-Length, Transfer-Encoding, Connection, User-Agent, Accept, Accept-Encoding, Fireblocks-Signature, Fireblocks-Webhook-Signature. Header values are write-only — never returned in responses.", alias="customHeaders") + 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"] model_config = ConfigDict( diff --git a/fireblocks/models/delete_webhook_o_auth_response.py b/fireblocks/models/delete_webhook_o_auth_response.py new file mode 100644 index 00000000..b1630453 --- /dev/null +++ b/fireblocks/models/delete_webhook_o_auth_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +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 + id: StrictStr = Field(description="The id of the OAuth credentials. Pass this as a webhook's `webhookOauthId` to attach them.") + name: StrictStr = Field(description="The label given to this credential set.") + client_id: StrictStr = Field(description="OAuth client ID used to authenticate with the token endpoint.", alias="clientId") + url: StrictStr = Field(description="Token endpoint URL.") + auth_method: StrictStr = Field(description="How the client credentials are presented to the token endpoint: `client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Credentials created without this field report `client_secret_basic`, which is what they use.", alias="authMethod") + custom_jwt_claims: Optional[List[StrictStr]] = Field(default=None, description="Names of the additional claims placed in the JWT assertion. Claim values are write-only and are never returned. Absent when no custom claims are configured.", alias="customJwtClaims") + custom_body_params: Optional[List[StrictStr]] = Field(default=None, description="Names of the additional parameters added to the token request body. Parameter values are write-only and are never returned. Absent when no custom parameters are configured.", alias="customBodyParams") + custom_headers: Optional[List[StrictStr]] = Field(default=None, description="Names of the additional HTTP headers added to **the token request sent to the authorization server** — not to the webhook delivery, which has its own separate `customHeaders`. Header values are write-only and are never returned. Absent when no custom headers are configured.", alias="customHeaders") + mtls_client_signed_cert: Optional[StrictStr] = Field(default=None, description="PEM-encoded client certificate used for mTLS when fetching OAuth tokens.", alias="mtlsClientSignedCert") + created_at: StrictInt = Field(description="The date and time the OAuth credentials were created, in milliseconds.", alias="createdAt") + updated_at: StrictInt = Field(description="The date and time the OAuth credentials were last updated, in milliseconds.", alias="updatedAt") + detached_webhook_ids: List[StrictStr] = Field(description="Webhooks whose `webhookOauthId` was cleared. The webhooks themselves are not deleted and keep delivering, just without an `Authorization` header. Empty unless `forceDelete=true` detached something.", alias="detachedWebhookIds") + __properties: ClassVar[List[str]] = ["id", "name", "clientId", "url", "authMethod", "customJwtClaims", "customBodyParams", "customHeaders", "mtlsClientSignedCert", "createdAt", "updatedAt", "detachedWebhookIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteWebhookOAuthResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteWebhookOAuthResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "clientId": obj.get("clientId"), + "url": obj.get("url"), + "authMethod": obj.get("authMethod") if obj.get("authMethod") is not None else 'client_secret_basic', + "customJwtClaims": obj.get("customJwtClaims"), + "customBodyParams": obj.get("customBodyParams"), + "customHeaders": obj.get("customHeaders"), + "mtlsClientSignedCert": obj.get("mtlsClientSignedCert"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "detachedWebhookIds": obj.get("detachedWebhookIds") + }) + return _obj + + diff --git a/fireblocks/models/direct_access_response.py b/fireblocks/models/direct_access_response.py new file mode 100644 index 00000000..24579224 --- /dev/null +++ b/fireblocks/models/direct_access_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +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 import Optional, Set +from typing_extensions import Self + +class DirectAccessResponse(BaseModel): + """ + Response-only counterpart of DirectAccess. Adds the server-populated `subProviders` field. Never use this schema in a request body — requests must keep using DirectAccess (via AccessType). + """ # noqa: E501 + type: StrictStr = Field(description="Indicates this uses direct provider access") + provider_id: StrictStr = Field(description="The ID of the provider", alias="providerId") + sub_providers: Optional[List[StrictStr]] = Field(default=None, description="The underlying providers or tools that this direct-access route is composed of, in execution order. Response-only: this field is populated by the server and is never accepted from client requests.", alias="subProviders") + __properties: ClassVar[List[str]] = ["type", "providerId", "subProviders"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['PROVIDER']): + raise ValueError("must be one of enum values ('PROVIDER')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DirectAccessResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DirectAccessResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "providerId": obj.get("providerId"), + "subProviders": obj.get("subProviders") + }) + return _obj + + diff --git a/fireblocks/models/direct_access_response_info.py b/fireblocks/models/direct_access_response_info.py new file mode 100644 index 00000000..1d31bece --- /dev/null +++ b/fireblocks/models/direct_access_response_info.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DirectAccessResponseInfo(BaseModel): + """ + DirectAccessResponseInfo + """ # noqa: E501 + sub_providers: Optional[List[StrictStr]] = Field(default=None, description="The underlying providers or tools that this direct-access route is composed of, in execution order. Response-only: this field is populated by the server and is never accepted from client requests.", alias="subProviders") + __properties: ClassVar[List[str]] = ["subProviders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DirectAccessResponseInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DirectAccessResponseInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "subProviders": obj.get("subProviders") + }) + return _obj + + diff --git a/fireblocks/models/end_investor_payload.py b/fireblocks/models/end_investor_payload.py new file mode 100644 index 00000000..606a6f5f --- /dev/null +++ b/fireblocks/models/end_investor_payload.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class EndInvestorPayload(BaseModel): + """ + Shared by invite / invite-cancel / offboard — identical wire shape, different verb. + """ # noqa: E501 + vault_account_id: StrictStr = Field(description="The vault account whose Canton wallet acts here.", alias="vaultAccountId") + asset: StrictStr = Field(description="Chain asset — `CANTON` or `CANTON_TEST`.") + end_investor: StrictStr = Field(description="The end investor's Canton party id.", alias="endInvestor") + __properties: ClassVar[List[str]] = ["vaultAccountId", "asset", "endInvestor"] + + @field_validator('asset') + def asset_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CANTON', 'CANTON_TEST']): + raise ValueError("must be one of enum values ('CANTON', 'CANTON_TEST')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndInvestorPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndInvestorPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vaultAccountId": obj.get("vaultAccountId"), + "asset": obj.get("asset"), + "endInvestor": obj.get("endInvestor") + }) + return _obj + + diff --git a/fireblocks/models/get_findings_external_response.py b/fireblocks/models/get_findings_external_response.py index 0d87d1a4..5015fb9e 100644 --- a/fireblocks/models/get_findings_external_response.py +++ b/fireblocks/models/get_findings_external_response.py @@ -26,7 +26,7 @@ class GetFindingsExternalResponse(BaseModel): """ - A paginated list of FSPM findings + GetFindingsExternalResponse """ # noqa: E501 data: List[SecurityFinding] = Field(description="List of FSPM findings for the current page.") total: StrictInt = Field(description="Total number of findings matching the query.") diff --git a/fireblocks/models/list_approvals_response.py b/fireblocks/models/list_approvals_response.py new file mode 100644 index 00000000..1fa01d1c --- /dev/null +++ b/fireblocks/models/list_approvals_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.approval_request_item import ApprovalRequestItem +from typing import Optional, Set +from typing_extensions import Self + +class ListApprovalsResponse(BaseModel): + """ + ListApprovalsResponse + """ # noqa: E501 + data: List[ApprovalRequestItem] = Field(description="The approval requests the authenticated user is eligible to act on.") + next: Optional[StrictStr] = Field(default=None, description="Cursor for the next page of results. Pass it back as the `pageCursor` query param to fetch the next page. Empty or absent when this is the last page.") + __properties: ClassVar[List[str]] = ["data", "next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListApprovalsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListApprovalsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ApprovalRequestItem.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "next": obj.get("next") + }) + return _obj + + diff --git a/fireblocks/models/offer_response.py b/fireblocks/models/offer_response.py new file mode 100644 index 00000000..2c34d3fc --- /dev/null +++ b/fireblocks/models/offer_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from fireblocks.models.offer_response_allocation import OfferResponseAllocation +from fireblocks.models.offer_response_onboarding import OfferResponseOnboarding +from fireblocks.models.offer_response_transfer import OfferResponseTransfer +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +OFFERRESPONSE_ONE_OF_SCHEMAS = ["OfferResponseAllocation", "OfferResponseOnboarding", "OfferResponseTransfer"] + +class OfferResponse(BaseModel): + """ + OfferResponse + """ + # data type: OfferResponseOnboarding + oneof_schema_1_validator: Optional[OfferResponseOnboarding] = None + # data type: OfferResponseAllocation + oneof_schema_2_validator: Optional[OfferResponseAllocation] = None + # data type: OfferResponseTransfer + oneof_schema_3_validator: Optional[OfferResponseTransfer] = None + actual_instance: Optional[Union[OfferResponseAllocation, OfferResponseOnboarding, OfferResponseTransfer]] = None + one_of_schemas: Set[str] = { "OfferResponseAllocation", "OfferResponseOnboarding", "OfferResponseTransfer" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OfferResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: OfferResponseOnboarding + if not isinstance(v, OfferResponseOnboarding): + error_messages.append(f"Error! Input type `{type(v)}` is not `OfferResponseOnboarding`") + else: + match += 1 + # validate data type: OfferResponseAllocation + if not isinstance(v, OfferResponseAllocation): + error_messages.append(f"Error! Input type `{type(v)}` is not `OfferResponseAllocation`") + else: + match += 1 + # validate data type: OfferResponseTransfer + if not isinstance(v, OfferResponseTransfer): + error_messages.append(f"Error! Input type `{type(v)}` is not `OfferResponseTransfer`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OfferResponse with oneOf schemas: OfferResponseAllocation, OfferResponseOnboarding, OfferResponseTransfer. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OfferResponse with oneOf schemas: OfferResponseAllocation, OfferResponseOnboarding, OfferResponseTransfer. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into OfferResponseOnboarding + try: + instance.actual_instance = OfferResponseOnboarding.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OfferResponseAllocation + try: + instance.actual_instance = OfferResponseAllocation.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OfferResponseTransfer + try: + instance.actual_instance = OfferResponseTransfer.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OfferResponse with oneOf schemas: OfferResponseAllocation, OfferResponseOnboarding, OfferResponseTransfer. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OfferResponse with oneOf schemas: OfferResponseAllocation, OfferResponseOnboarding, OfferResponseTransfer. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OfferResponseAllocation, OfferResponseOnboarding, OfferResponseTransfer]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/fireblocks/models/offer_response_accepted.py b/fireblocks/models/offer_response_accepted.py new file mode 100644 index 00000000..139a202e --- /dev/null +++ b/fireblocks/models/offer_response_accepted.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OfferResponseAccepted(BaseModel): + """ + The outgoing transaction that carries the response. Its on-chain outcome arrives by webhook as a status update on this transaction. + """ # noqa: E501 + transaction_id: StrictStr = Field(description="The outgoing response transaction.", alias="transactionId") + status: StrictStr = Field(description="The transaction's status at the time of this response — `SUBMITTED`.") + response_type: StrictStr = Field(description="The response type you sent, echoed back so you can correlate without re-reading.", alias="responseType") + __properties: ClassVar[List[str]] = ["transactionId", "status", "responseType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OfferResponseAccepted from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OfferResponseAccepted from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "transactionId": obj.get("transactionId"), + "status": obj.get("status"), + "responseType": obj.get("responseType") + }) + return _obj + + diff --git a/fireblocks/models/offer_response_allocation.py b/fireblocks/models/offer_response_allocation.py new file mode 100644 index 00000000..779affbf --- /dev/null +++ b/fireblocks/models/offer_response_allocation.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.allocation_response import AllocationResponse +from typing import Optional, Set +from typing_extensions import Self + +class OfferResponseAllocation(BaseModel): + """ + OfferResponseAllocation + """ # noqa: E501 + domain: StrictStr = Field(description="Which offer domain this response belongs to. Selects the shape of `response`.") + response: AllocationResponse + __properties: ClassVar[List[str]] = ["domain", "response"] + + @field_validator('domain') + def domain_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALLOCATIONS']): + raise ValueError("must be one of enum values ('ALLOCATIONS')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OfferResponseAllocation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OfferResponseAllocation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "response": AllocationResponse.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/offer_response_onboarding.py b/fireblocks/models/offer_response_onboarding.py new file mode 100644 index 00000000..99794531 --- /dev/null +++ b/fireblocks/models/offer_response_onboarding.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.onboarding_response import OnboardingResponse +from typing import Optional, Set +from typing_extensions import Self + +class OfferResponseOnboarding(BaseModel): + """ + OfferResponseOnboarding + """ # noqa: E501 + domain: StrictStr = Field(description="Which offer domain this response belongs to. Selects the shape of `response`.") + response: OnboardingResponse + __properties: ClassVar[List[str]] = ["domain", "response"] + + @field_validator('domain') + def domain_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ONBOARDING']): + raise ValueError("must be one of enum values ('ONBOARDING')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OfferResponseOnboarding from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OfferResponseOnboarding from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "response": OnboardingResponse.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/offer_response_transfer.py b/fireblocks/models/offer_response_transfer.py new file mode 100644 index 00000000..2a753fb3 --- /dev/null +++ b/fireblocks/models/offer_response_transfer.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.transfer_response import TransferResponse +from typing import Optional, Set +from typing_extensions import Self + +class OfferResponseTransfer(BaseModel): + """ + OfferResponseTransfer + """ # noqa: E501 + domain: StrictStr = Field(description="Which offer domain this response belongs to. Selects the shape of `response`.") + response: TransferResponse + __properties: ClassVar[List[str]] = ["domain", "response"] + + @field_validator('domain') + def domain_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['TRANSFERS']): + raise ValueError("must be one of enum values ('TRANSFERS')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OfferResponseTransfer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OfferResponseTransfer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "response": TransferResponse.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/onboarding_response.py b/fireblocks/models/onboarding_response.py new file mode 100644 index 00000000..4eb58c87 --- /dev/null +++ b/fireblocks/models/onboarding_response.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from fireblocks.models.onboarding_response_dtcc_accept import OnboardingResponseDtccAccept +from fireblocks.models.onboarding_response_dtcc_reject import OnboardingResponseDtccReject +from fireblocks.models.onboarding_response_tradeweb_accept import OnboardingResponseTradewebAccept +from fireblocks.models.onboarding_response_tradeweb_reject import OnboardingResponseTradewebReject +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ONBOARDINGRESPONSE_ONE_OF_SCHEMAS = ["OnboardingResponseDtccAccept", "OnboardingResponseDtccReject", "OnboardingResponseTradewebAccept", "OnboardingResponseTradewebReject"] + +class OnboardingResponse(BaseModel): + """ + OnboardingResponse + """ + # data type: OnboardingResponseDtccAccept + oneof_schema_1_validator: Optional[OnboardingResponseDtccAccept] = None + # data type: OnboardingResponseDtccReject + oneof_schema_2_validator: Optional[OnboardingResponseDtccReject] = None + # data type: OnboardingResponseTradewebAccept + oneof_schema_3_validator: Optional[OnboardingResponseTradewebAccept] = None + # data type: OnboardingResponseTradewebReject + oneof_schema_4_validator: Optional[OnboardingResponseTradewebReject] = None + actual_instance: Optional[Union[OnboardingResponseDtccAccept, OnboardingResponseDtccReject, OnboardingResponseTradewebAccept, OnboardingResponseTradewebReject]] = None + one_of_schemas: Set[str] = { "OnboardingResponseDtccAccept", "OnboardingResponseDtccReject", "OnboardingResponseTradewebAccept", "OnboardingResponseTradewebReject" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OnboardingResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: OnboardingResponseDtccAccept + if not isinstance(v, OnboardingResponseDtccAccept): + error_messages.append(f"Error! Input type `{type(v)}` is not `OnboardingResponseDtccAccept`") + else: + match += 1 + # validate data type: OnboardingResponseDtccReject + if not isinstance(v, OnboardingResponseDtccReject): + error_messages.append(f"Error! Input type `{type(v)}` is not `OnboardingResponseDtccReject`") + else: + match += 1 + # validate data type: OnboardingResponseTradewebAccept + if not isinstance(v, OnboardingResponseTradewebAccept): + error_messages.append(f"Error! Input type `{type(v)}` is not `OnboardingResponseTradewebAccept`") + else: + match += 1 + # validate data type: OnboardingResponseTradewebReject + if not isinstance(v, OnboardingResponseTradewebReject): + error_messages.append(f"Error! Input type `{type(v)}` is not `OnboardingResponseTradewebReject`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OnboardingResponse with oneOf schemas: OnboardingResponseDtccAccept, OnboardingResponseDtccReject, OnboardingResponseTradewebAccept, OnboardingResponseTradewebReject. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OnboardingResponse with oneOf schemas: OnboardingResponseDtccAccept, OnboardingResponseDtccReject, OnboardingResponseTradewebAccept, OnboardingResponseTradewebReject. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into OnboardingResponseDtccAccept + try: + instance.actual_instance = OnboardingResponseDtccAccept.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OnboardingResponseDtccReject + try: + instance.actual_instance = OnboardingResponseDtccReject.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OnboardingResponseTradewebAccept + try: + instance.actual_instance = OnboardingResponseTradewebAccept.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OnboardingResponseTradewebReject + try: + instance.actual_instance = OnboardingResponseTradewebReject.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OnboardingResponse with oneOf schemas: OnboardingResponseDtccAccept, OnboardingResponseDtccReject, OnboardingResponseTradewebAccept, OnboardingResponseTradewebReject. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OnboardingResponse with oneOf schemas: OnboardingResponseDtccAccept, OnboardingResponseDtccReject, OnboardingResponseTradewebAccept, OnboardingResponseTradewebReject. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OnboardingResponseDtccAccept, OnboardingResponseDtccReject, OnboardingResponseTradewebAccept, OnboardingResponseTradewebReject]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/fireblocks/models/onboarding_response_dtcc_accept.py b/fireblocks/models/onboarding_response_dtcc_accept.py new file mode 100644 index 00000000..20291092 --- /dev/null +++ b/fireblocks/models/onboarding_response_dtcc_accept.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OnboardingResponseDtccAccept(BaseModel): + """ + Accept a DTCC end-investor onboarding offer. Carries no arguments. + """ # noqa: E501 + response_type: StrictStr = Field(description="How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`.", alias="responseType") + __properties: ClassVar[List[str]] = ["responseType"] + + @field_validator('response_type') + def response_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DTCC_END_INVESTOR_ONBOARDING_ACCEPT']): + raise ValueError("must be one of enum values ('DTCC_END_INVESTOR_ONBOARDING_ACCEPT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OnboardingResponseDtccAccept from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OnboardingResponseDtccAccept from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "responseType": obj.get("responseType") + }) + return _obj + + diff --git a/fireblocks/models/onboarding_response_dtcc_reject.py b/fireblocks/models/onboarding_response_dtcc_reject.py new file mode 100644 index 00000000..96206a6a --- /dev/null +++ b/fireblocks/models/onboarding_response_dtcc_reject.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class OnboardingResponseDtccReject(BaseModel): + """ + Reject a DTCC end-investor onboarding offer. + """ # noqa: E501 + response_type: StrictStr = Field(description="How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`.", alias="responseType") + reason: Annotated[str, Field(min_length=1, strict=True, max_length=512)] = Field(description="Why the offer is being rejected. Recorded on-chain, where the counterparty can read it.") + __properties: ClassVar[List[str]] = ["responseType", "reason"] + + @field_validator('response_type') + def response_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DTCC_END_INVESTOR_ONBOARDING_REJECT']): + raise ValueError("must be one of enum values ('DTCC_END_INVESTOR_ONBOARDING_REJECT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OnboardingResponseDtccReject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OnboardingResponseDtccReject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "responseType": obj.get("responseType"), + "reason": obj.get("reason") + }) + return _obj + + diff --git a/fireblocks/models/onboarding_response_tradeweb_accept.py b/fireblocks/models/onboarding_response_tradeweb_accept.py new file mode 100644 index 00000000..7437283f --- /dev/null +++ b/fireblocks/models/onboarding_response_tradeweb_accept.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OnboardingResponseTradewebAccept(BaseModel): + """ + Accept a Tradeweb co-signing delegation offer. Carries no arguments. + """ # noqa: E501 + response_type: StrictStr = Field(description="How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`.", alias="responseType") + __properties: ClassVar[List[str]] = ["responseType"] + + @field_validator('response_type') + def response_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['TRADEWEB_COSIGNING_DELEGATION_ACCEPT']): + raise ValueError("must be one of enum values ('TRADEWEB_COSIGNING_DELEGATION_ACCEPT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OnboardingResponseTradewebAccept from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OnboardingResponseTradewebAccept from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "responseType": obj.get("responseType") + }) + return _obj + + diff --git a/fireblocks/models/onboarding_response_tradeweb_reject.py b/fireblocks/models/onboarding_response_tradeweb_reject.py new file mode 100644 index 00000000..eae7985c --- /dev/null +++ b/fireblocks/models/onboarding_response_tradeweb_reject.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OnboardingResponseTradewebReject(BaseModel): + """ + Reject a Tradeweb co-signing delegation offer. Carries no arguments — the DAR has nowhere on-ledger to record a reason, so none is accepted. + """ # noqa: E501 + response_type: StrictStr = Field(description="How you are answering the offer. Must be one of the values currently listed in the transaction's `additionalInfo.cantonDetails.offerResponse.availableResponses`.", alias="responseType") + __properties: ClassVar[List[str]] = ["responseType"] + + @field_validator('response_type') + def response_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['TRADEWEB_COSIGNING_DELEGATION_REJECT']): + raise ValueError("must be one of enum values ('TRADEWEB_COSIGNING_DELEGATION_REJECT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OnboardingResponseTradewebReject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OnboardingResponseTradewebReject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "responseType": obj.get("responseType") + }) + return _obj + + diff --git a/fireblocks/models/order_details.py b/fireblocks/models/order_details.py index bc991dd8..92404ca3 100644 --- a/fireblocks/models/order_details.py +++ b/fireblocks/models/order_details.py @@ -22,7 +22,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from fireblocks.models.access_type import AccessType +from fireblocks.models.access_type_response import AccessTypeResponse from fireblocks.models.execution_response_details import ExecutionResponseDetails from fireblocks.models.failure import Failure from fireblocks.models.fee import Fee @@ -40,7 +40,7 @@ class OrderDetails(BaseModel): OrderDetails """ # noqa: E501 id: StrictStr - via: AccessType + via: AccessTypeResponse status: OrderStatus created_at: datetime = Field(alias="createdAt") updated_at: Optional[datetime] = Field(default=None, alias="updatedAt") @@ -149,7 +149,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "via": AccessType.from_dict(obj["via"]) if obj.get("via") is not None else None, + "via": AccessTypeResponse.from_dict(obj["via"]) if obj.get("via") is not None else None, "status": obj.get("status"), "createdAt": obj.get("createdAt"), "updatedAt": obj.get("updatedAt"), diff --git a/fireblocks/models/order_summary.py b/fireblocks/models/order_summary.py index e1072ce8..8642ee07 100644 --- a/fireblocks/models/order_summary.py +++ b/fireblocks/models/order_summary.py @@ -21,7 +21,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from fireblocks.models.access_type import AccessType +from fireblocks.models.access_type_response import AccessTypeResponse from fireblocks.models.account_reference import AccountReference from fireblocks.models.order_status import OrderStatus from fireblocks.models.settlement_source_account import SettlementSourceAccount @@ -34,7 +34,7 @@ class OrderSummary(BaseModel): OrderSummary """ # noqa: E501 id: StrictStr - via: AccessType + via: AccessTypeResponse side: Side base_amount: StrictStr = Field(alias="baseAmount") quote_amount: Optional[StrictStr] = Field(default=None, alias="quoteAmount") @@ -107,7 +107,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "via": AccessType.from_dict(obj["via"]) if obj.get("via") is not None else None, + "via": AccessTypeResponse.from_dict(obj["via"]) if obj.get("via") is not None else None, "side": obj.get("side"), "baseAmount": obj.get("baseAmount"), "quoteAmount": obj.get("quoteAmount"), diff --git a/fireblocks/models/participant_onboarding_payload.py b/fireblocks/models/participant_onboarding_payload.py new file mode 100644 index 00000000..3d27c2a1 --- /dev/null +++ b/fireblocks/models/participant_onboarding_payload.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ParticipantOnboardingPayload(BaseModel): + """ + ParticipantOnboardingPayload + """ # noqa: E501 + vault_account_id: StrictStr = Field(description="The vault account that acts as the participant. Its Canton party is derived for you.", alias="vaultAccountId") + asset: StrictStr = Field(description="Chain asset — CANTON or CANTON_TEST.") + expires_at: Optional[datetime] = Field(default=None, description="When the onboarding request expires if it has not been answered. RFC 3339.", alias="expiresAt") + operator: StrictStr = Field(description="DTCC infra operator party id.") + provider: StrictStr = Field(description="DTCC provider party id.") + compliance: StrictStr = Field(description="DTCC compliance party id.") + registrar: StrictStr = Field(description="DTCC registrar party id — co-signs the accept.") + client_onboarder: StrictStr = Field(description="DTCC client onboarder party id — co-signs the accept.", alias="clientOnboarder") + __properties: ClassVar[List[str]] = ["vaultAccountId", "asset", "expiresAt", "operator", "provider", "compliance", "registrar", "clientOnboarder"] + + @field_validator('asset') + def asset_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CANTON', 'CANTON_TEST']): + raise ValueError("must be one of enum values ('CANTON', 'CANTON_TEST')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ParticipantOnboardingPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ParticipantOnboardingPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vaultAccountId": obj.get("vaultAccountId"), + "asset": obj.get("asset"), + "expiresAt": obj.get("expiresAt"), + "operator": obj.get("operator"), + "provider": obj.get("provider"), + "compliance": obj.get("compliance"), + "registrar": obj.get("registrar"), + "clientOnboarder": obj.get("clientOnboarder") + }) + return _obj + + diff --git a/fireblocks/models/position_related_transaction.py b/fireblocks/models/position_related_transaction.py index f87646a0..09b0015f 100644 --- a/fireblocks/models/position_related_transaction.py +++ b/fireblocks/models/position_related_transaction.py @@ -35,7 +35,8 @@ class PositionRelatedTransaction(BaseModel): status: StrictStr = Field(description="Transaction outcome.") amount: Optional[StrictStr] = Field(default=None, description="Portion of position amount this transaction moved (native units). Absent on legacy rows.") tx_note: Optional[StrictStr] = Field(default=None, description="User-provided note from the transfer request. Omitted when not set.", alias="txNote") - __properties: ClassVar[List[str]] = ["txId", "txHash", "stakingOperation", "timestamp", "status", "amount", "txNote"] + completion_time: Optional[datetime] = Field(default=None, description="ISO timestamp when Cosmos unbonding is scheduled to end. Absent on other chains.", alias="completionTime") + __properties: ClassVar[List[str]] = ["txId", "txHash", "stakingOperation", "timestamp", "status", "amount", "txNote", "completionTime"] @field_validator('staking_operation') def staking_operation_validate_enum(cls, value): @@ -111,7 +112,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "timestamp": obj.get("timestamp"), "status": obj.get("status"), "amount": obj.get("amount"), - "txNote": obj.get("txNote") + "txNote": obj.get("txNote"), + "completionTime": obj.get("completionTime") }) return _obj diff --git a/fireblocks/models/quorum_approval_state.py b/fireblocks/models/quorum_approval_state.py new file mode 100644 index 00000000..0caa925c --- /dev/null +++ b/fireblocks/models/quorum_approval_state.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class QuorumApprovalState(str, Enum): + """ + Whether an approval requirement has been met. Treat this as authoritative rather than comparing the counts yourself: a group can show `currentApprovalCount` equal to `threshold` and still be `PENDING` when the request additionally requires the workspace owner's approval. + """ + + """ + allowed enum values + """ + APPROVED = 'APPROVED' + PENDING = 'PENDING' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of QuorumApprovalState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/fireblocks/models/quorum_group.py b/fireblocks/models/quorum_group.py new file mode 100644 index 00000000..b6ee63b2 --- /dev/null +++ b/fireblocks/models/quorum_group.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.quorum_approval_state import QuorumApprovalState +from typing import Optional, Set +from typing_extensions import Self + +class QuorumGroup(BaseModel): + """ + A single tier of a ruleset: a threshold and the approvals collected toward it. + """ # noqa: E501 + threshold: StrictInt = Field(description="Number of approvals this tier requires.") + current_approval_count: StrictInt = Field(description="Approvals collected so far toward `threshold`.", alias="currentApprovalCount") + status: QuorumApprovalState + members: Optional[List[StrictInt]] = Field(default=None, description="Indexes into the top-level `users` array identifying the users who belong to this tier. Returned only for `quorumStatusMode=FULL`; omitted otherwise.") + __properties: ClassVar[List[str]] = ["threshold", "currentApprovalCount", "status", "members"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuorumGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuorumGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "threshold": obj.get("threshold"), + "currentApprovalCount": obj.get("currentApprovalCount"), + "status": obj.get("status"), + "members": obj.get("members") + }) + return _obj + + diff --git a/fireblocks/models/quorum_request_state.py b/fireblocks/models/quorum_request_state.py new file mode 100644 index 00000000..dc821ca6 --- /dev/null +++ b/fireblocks/models/quorum_request_state.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class QuorumRequestState(str, Enum): + """ + The approval request's overall state. Anything other than `PENDING` means the request is no longer awaiting approvals. + """ + + """ + allowed enum values + """ + PENDING = 'PENDING' + APPROVED = 'APPROVED' + REJECTED = 'REJECTED' + CANCELLED = 'CANCELLED' + TIMED_OUT = 'TIMED_OUT' + FAILED = 'FAILED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of QuorumRequestState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/fireblocks/models/quorum_ruleset.py b/fireblocks/models/quorum_ruleset.py new file mode 100644 index 00000000..55ef9f00 --- /dev/null +++ b/fireblocks/models/quorum_ruleset.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from fireblocks.models.quorum_approval_state import QuorumApprovalState +from fireblocks.models.quorum_group import QuorumGroup +from typing import Optional, Set +from typing_extensions import Self + +class QuorumRuleset(BaseModel): + """ + One sub-request of the approval criteria, made up of one or more tiers. + """ # noqa: E501 + group_match: StrictStr = Field(description="Whether every tier in `groups` must be satisfied (`ALL`) or any single one of them (`ANY`).", alias="groupMatch") + status: QuorumApprovalState + groups: List[QuorumGroup] = Field(description="The tiers of this sub-request, evaluated according to `groupMatch`.") + __properties: ClassVar[List[str]] = ["groupMatch", "status", "groups"] + + @field_validator('group_match') + def group_match_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALL', 'ANY']): + raise ValueError("must be one of enum values ('ALL', 'ANY')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuorumRuleset from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in groups (list) + _items = [] + if self.groups: + for _item_groups in self.groups: + if _item_groups: + _items.append(_item_groups.to_dict()) + _dict['groups'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuorumRuleset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "groupMatch": obj.get("groupMatch"), + "status": obj.get("status"), + "groups": [QuorumGroup.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/quorum_status.py b/fireblocks/models/quorum_status.py new file mode 100644 index 00000000..269fc32f --- /dev/null +++ b/fireblocks/models/quorum_status.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.quorum_request_state import QuorumRequestState +from fireblocks.models.quorum_status_quorum import QuorumStatusQuorum +from fireblocks.models.quorum_user import QuorumUser +from typing import Optional, Set +from typing_extensions import Self + +class QuorumStatus(BaseModel): + """ + The approval quorum's structure and progress for this request. `null` when `quorumStatusMode` is omitted or `NONE`. Also `null` on an otherwise successful response when the quorum cannot be reported faithfully — a multi-tier request in a workspace that does not maintain per-tier approval counts — so absence here does not imply the request has no quorum. The object may carry additional backend-defined fields beyond those documented. + """ # noqa: E501 + request_status: QuorumRequestState = Field(alias="requestStatus") + users: Optional[List[QuorumUser]] = Field(default=None, description="Every user participating in this request's quorum. Returned only for `quorumStatusMode=FULL`; omitted otherwise.") + quorum: QuorumStatusQuorum + __properties: ClassVar[List[str]] = ["requestStatus", "users", "quorum"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuorumStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + # override the default output from pydantic by calling `to_dict()` of quorum + if self.quorum: + _dict['quorum'] = self.quorum.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuorumStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestStatus": obj.get("requestStatus"), + "users": [QuorumUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "quorum": QuorumStatusQuorum.from_dict(obj["quorum"]) if obj.get("quorum") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/quorum_status_quorum.py b/fireblocks/models/quorum_status_quorum.py new file mode 100644 index 00000000..c8cae051 --- /dev/null +++ b/fireblocks/models/quorum_status_quorum.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from fireblocks.models.ruleset_quorum import RulesetQuorum +from fireblocks.models.simple_quorum import SimpleQuorum +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +QUORUMSTATUSQUORUM_ONE_OF_SCHEMAS = ["RulesetQuorum", "SimpleQuorum"] + +class QuorumStatusQuorum(BaseModel): + """ + The approval criteria and how far they have been met. `type` discriminates the two shapes: `SIMPLE` flattens the common single-tier case, `RULESET` is the general multi-tier form. + """ + # data type: SimpleQuorum + oneof_schema_1_validator: Optional[SimpleQuorum] = None + # data type: RulesetQuorum + oneof_schema_2_validator: Optional[RulesetQuorum] = None + actual_instance: Optional[Union[RulesetQuorum, SimpleQuorum]] = None + one_of_schemas: Set[str] = { "RulesetQuorum", "SimpleQuorum" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = QuorumStatusQuorum.model_construct() + error_messages = [] + match = 0 + # validate data type: SimpleQuorum + if not isinstance(v, SimpleQuorum): + error_messages.append(f"Error! Input type `{type(v)}` is not `SimpleQuorum`") + else: + match += 1 + # validate data type: RulesetQuorum + if not isinstance(v, RulesetQuorum): + error_messages.append(f"Error! Input type `{type(v)}` is not `RulesetQuorum`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in QuorumStatusQuorum with oneOf schemas: RulesetQuorum, SimpleQuorum. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in QuorumStatusQuorum with oneOf schemas: RulesetQuorum, SimpleQuorum. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into SimpleQuorum + try: + instance.actual_instance = SimpleQuorum.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RulesetQuorum + try: + instance.actual_instance = RulesetQuorum.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into QuorumStatusQuorum with oneOf schemas: RulesetQuorum, SimpleQuorum. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into QuorumStatusQuorum with oneOf schemas: RulesetQuorum, SimpleQuorum. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], RulesetQuorum, SimpleQuorum]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/fireblocks/models/quorum_user.py b/fireblocks/models/quorum_user.py new file mode 100644 index 00000000..5b1e9977 --- /dev/null +++ b/fireblocks/models/quorum_user.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.quorum_approval_state import QuorumApprovalState +from typing import Optional, Set +from typing_extensions import Self + +class QuorumUser(BaseModel): + """ + A user who participates in this request's approval quorum, and their approval state. + """ # noqa: E501 + index: StrictInt = Field(description="Zero-based position of this user within the `users` array. The `members` arrays elsewhere in the document reference users by this index rather than repeating the user ID.") + user_id: StrictStr = Field(description="The participating user's ID.", alias="userId") + status: QuorumApprovalState + is_mandatory_owner: Optional[StrictBool] = Field(default=None, description="Present and `true` only for the workspace owner, when this request additionally requires the owner's approval. Absent for every other participant.", alias="isMandatoryOwner") + __properties: ClassVar[List[str]] = ["index", "userId", "status", "isMandatoryOwner"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuorumUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuorumUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index"), + "userId": obj.get("userId"), + "status": obj.get("status"), + "isMandatoryOwner": obj.get("isMandatoryOwner") + }) + return _obj + + diff --git a/fireblocks/models/quote.py b/fireblocks/models/quote.py index a5943c8b..b8dee1c0 100644 --- a/fireblocks/models/quote.py +++ b/fireblocks/models/quote.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from fireblocks.models.access_type import AccessType +from fireblocks.models.access_type_response import AccessTypeResponse from fireblocks.models.fee import Fee from fireblocks.models.quote_execution_step import QuoteExecutionStep from fireblocks.models.side import Side @@ -32,7 +32,7 @@ class Quote(BaseModel): """ A committed executable quote for a trading pair. """ # noqa: E501 - via: AccessType + via: AccessTypeResponse id: StrictStr = Field(description="The unique identifier of the quote.") quote_asset_id: StrictStr = Field(description="The target asset identifier.", alias="quoteAssetId") quote_asset_rail: Optional[TransferRail] = Field(default=None, alias="quoteAssetRail") @@ -126,7 +126,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "via": AccessType.from_dict(obj["via"]) if obj.get("via") is not None else None, + "via": AccessTypeResponse.from_dict(obj["via"]) if obj.get("via") is not None else None, "id": obj.get("id"), "quoteAssetId": obj.get("quoteAssetId"), "quoteAssetRail": obj.get("quoteAssetRail"), diff --git a/fireblocks/models/quote_offer.py b/fireblocks/models/quote_offer.py index 45aa9c61..edd2d5eb 100644 --- a/fireblocks/models/quote_offer.py +++ b/fireblocks/models/quote_offer.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from fireblocks.models.access_type import AccessType +from fireblocks.models.access_type_response import AccessTypeResponse from fireblocks.models.fee import Fee from fireblocks.models.quote_execution_step import QuoteExecutionStep from fireblocks.models.side import Side @@ -32,7 +32,7 @@ class QuoteOffer(BaseModel): """ QuoteOffer """ # noqa: E501 - via: AccessType + via: AccessTypeResponse id: StrictStr = Field(description="The unique identifier of the quote.") quote_asset_id: StrictStr = Field(description="The target asset identifier.", alias="quoteAssetId") quote_asset_rail: Optional[TransferRail] = Field(default=None, alias="quoteAssetRail") @@ -134,7 +134,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "via": AccessType.from_dict(obj["via"]) if obj.get("via") is not None else None, + "via": AccessTypeResponse.from_dict(obj["via"]) if obj.get("via") is not None else None, "id": obj.get("id"), "quoteAssetId": obj.get("quoteAssetId"), "quoteAssetRail": obj.get("quoteAssetRail"), diff --git a/fireblocks/models/rate.py b/fireblocks/models/rate.py index 56888287..930048e6 100644 --- a/fireblocks/models/rate.py +++ b/fireblocks/models/rate.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from fireblocks.models.access_type import AccessType +from fireblocks.models.access_type_response import AccessTypeResponse from fireblocks.models.transfer_rail import TransferRail from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class Rate(BaseModel): """ Rate """ # noqa: E501 - via: AccessType + via: AccessTypeResponse base_asset_id: StrictStr = Field(description="The source asset identifier", alias="baseAssetId") base_asset_rail: Optional[TransferRail] = Field(default=None, alias="baseAssetRail") quote_asset_id: StrictStr = Field(description="The target asset identifier", alias="quoteAssetId") @@ -99,7 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "via": AccessType.from_dict(obj["via"]) if obj.get("via") is not None else None, + "via": AccessTypeResponse.from_dict(obj["via"]) if obj.get("via") is not None else None, "baseAssetId": obj.get("baseAssetId"), "baseAssetRail": obj.get("baseAssetRail"), "quoteAssetId": obj.get("quoteAssetId"), diff --git a/fireblocks/models/rate_offer.py b/fireblocks/models/rate_offer.py index 92d96a0a..0bed2332 100644 --- a/fireblocks/models/rate_offer.py +++ b/fireblocks/models/rate_offer.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from fireblocks.models.access_type import AccessType +from fireblocks.models.access_type_response import AccessTypeResponse from fireblocks.models.transfer_rail import TransferRail from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class RateOffer(BaseModel): """ RateOffer """ # noqa: E501 - via: AccessType + via: AccessTypeResponse base_asset_id: StrictStr = Field(description="The source asset identifier", alias="baseAssetId") base_asset_rail: Optional[TransferRail] = Field(default=None, alias="baseAssetRail") quote_asset_id: StrictStr = Field(description="The target asset identifier", alias="quoteAssetId") @@ -107,7 +107,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "via": AccessType.from_dict(obj["via"]) if obj.get("via") is not None else None, + "via": AccessTypeResponse.from_dict(obj["via"]) if obj.get("via") is not None else None, "baseAssetId": obj.get("baseAssetId"), "baseAssetRail": obj.get("baseAssetRail"), "quoteAssetId": obj.get("quoteAssetId"), diff --git a/fireblocks/models/ruleset_quorum.py b/fireblocks/models/ruleset_quorum.py new file mode 100644 index 00000000..b05bc589 --- /dev/null +++ b/fireblocks/models/ruleset_quorum.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.quorum_approval_state import QuorumApprovalState +from fireblocks.models.quorum_ruleset import QuorumRuleset +from typing import Optional, Set +from typing_extensions import Self + +class RulesetQuorum(BaseModel): + """ + The general shape, used when the request has more than one sub-request or a sub-request with more than one tier. Each entry in `rulesets` is a sub-request; each of its `groups` is a tier. + """ # noqa: E501 + type: StrictStr = Field(description="Discriminator identifying the multi-tier shape.") + ruleset_match: StrictStr = Field(description="Whether every sub-request in `rulesets` must be satisfied (`ALL`) or any single one of them (`ANY`).", alias="rulesetMatch") + status: QuorumApprovalState + is_mandatory_owner_approved: Optional[StrictBool] = Field(default=None, description="Present only when this request additionally requires the workspace owner's approval. `false` means the owner has not approved yet. Absent when no owner approval is required.", alias="isMandatoryOwnerApproved") + rulesets: List[QuorumRuleset] = Field(description="The sub-requests of the approval criteria, evaluated according to `rulesetMatch`.") + __properties: ClassVar[List[str]] = ["type", "rulesetMatch", "status", "isMandatoryOwnerApproved", "rulesets"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RULESET']): + raise ValueError("must be one of enum values ('RULESET')") + return value + + @field_validator('ruleset_match') + def ruleset_match_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALL', 'ANY']): + raise ValueError("must be one of enum values ('ALL', 'ANY')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RulesetQuorum from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rulesets (list) + _items = [] + if self.rulesets: + for _item_rulesets in self.rulesets: + if _item_rulesets: + _items.append(_item_rulesets.to_dict()) + _dict['rulesets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RulesetQuorum from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "rulesetMatch": obj.get("rulesetMatch"), + "status": obj.get("status"), + "isMandatoryOwnerApproved": obj.get("isMandatoryOwnerApproved"), + "rulesets": [QuorumRuleset.from_dict(_item) for _item in obj["rulesets"]] if obj.get("rulesets") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/security_finding_detailed.py b/fireblocks/models/security_finding_detailed.py index 511a5451..0a435f46 100644 --- a/fireblocks/models/security_finding_detailed.py +++ b/fireblocks/models/security_finding_detailed.py @@ -27,7 +27,7 @@ class SecurityFindingDetailed(BaseModel): """ - A single FSPM finding, redacted to the public field set + SecurityFindingDetailed """ # noqa: E501 id: StrictStr = Field(description="Unique identifier of the finding") status: StrictStr = Field(description="Current status of the finding") diff --git a/fireblocks/models/simple_quorum.py b/fireblocks/models/simple_quorum.py new file mode 100644 index 00000000..13d74338 --- /dev/null +++ b/fireblocks/models/simple_quorum.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.quorum_approval_state import QuorumApprovalState +from typing import Optional, Set +from typing_extensions import Self + +class SimpleQuorum(BaseModel): + """ + The flattened shape used when the request has a single sub-request with a single tier, which is the common case. The threshold and approval count sit directly on the quorum object instead of inside `rulesets`. + """ # noqa: E501 + type: StrictStr = Field(description="Discriminator identifying the flattened single-tier shape.") + threshold: StrictInt = Field(description="Number of approvals this request requires.") + current_approval_count: StrictInt = Field(description="Approvals collected so far toward `threshold`.", alias="currentApprovalCount") + status: QuorumApprovalState + is_mandatory_owner_approved: Optional[StrictBool] = Field(default=None, description="Present only when this request additionally requires the workspace owner's approval. `false` means the owner has not approved yet, which is why `status` can remain `PENDING` even once `currentApprovalCount` reaches `threshold`. Absent when no owner approval is required.", alias="isMandatoryOwnerApproved") + members: Optional[List[StrictInt]] = Field(default=None, description="Indexes into the top-level `users` array identifying the users who may approve. Returned only for `quorumStatusMode=FULL`; omitted otherwise.") + __properties: ClassVar[List[str]] = ["type", "threshold", "currentApprovalCount", "status", "isMandatoryOwnerApproved", "members"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SIMPLE']): + raise ValueError("must be one of enum values ('SIMPLE')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SimpleQuorum from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SimpleQuorum from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "threshold": obj.get("threshold"), + "currentApprovalCount": obj.get("currentApprovalCount"), + "status": obj.get("status"), + "isMandatoryOwnerApproved": obj.get("isMandatoryOwnerApproved"), + "members": obj.get("members") + }) + return _obj + + diff --git a/fireblocks/models/transaction_request.py b/fireblocks/models/transaction_request.py index b2971111..3979c6b5 100644 --- a/fireblocks/models/transaction_request.py +++ b/fireblocks/models/transaction_request.py @@ -52,7 +52,7 @@ class TransactionRequest(BaseModel): destinations: Optional[List[TransactionRequestDestination]] = Field(default=None, description="For UTXO based blockchains, you can send a single transaction to multiple destinations.") amount: Optional[TransactionRequestAmount] = None treat_as_gross_amount: Optional[StrictBool] = Field(default=None, description="\"When set to `true`, the fee will be deducted from the requested amount.\" **Note**: This parameter can only be considered if a transaction’s asset is a base asset, such as ETH or MATIC. If the asset can’t be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account.", alias="treatAsGrossAmount") - force_sweep: Optional[StrictBool] = Field(default=None, description="For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. **Note:** If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation.", alias="forceSweep") + force_sweep: Optional[StrictBool] = Field(default=None, description="For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. **Note:** If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation. **Note:** `forceSweep` and `treatAsGrossAmount` can also be used to empty a TON/GRAM wallet.", alias="forceSweep") fee_level: Optional[StrictStr] = Field(default=None, description="For UTXO, EVM-based, or Solana blockchains only. Defines the blockchain fee level which will be payed for the transaction. Alternatively, specific fee estimation parameters exist below.", alias="feeLevel") fee: Optional[TransactionRequestFee] = None priority_fee: Optional[TransactionRequestPriorityFee] = Field(default=None, alias="priorityFee") diff --git a/fireblocks/models/transaction_response.py b/fireblocks/models/transaction_response.py index 8856bcff..49e7cf30 100644 --- a/fireblocks/models/transaction_response.py +++ b/fireblocks/models/transaction_response.py @@ -69,6 +69,7 @@ class TransactionResponse(BaseModel): treat_as_gross_amount: Optional[StrictBool] = Field(default=None, description="For transactions initiated via this Fireblocks workspace, when set to `true`, the fee is deducted from the requested amount. **Note**: This parameter can only be considered if a transaction's asset is a base asset, such as ETH or MATIC. If the asset can't be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account.", alias="treatAsGrossAmount") fee_info: Optional[FeeInfo] = Field(default=None, alias="feeInfo") fee_currency: Optional[StrictStr] = Field(default=None, description="The asset which was withdrawn to pay the transaction fee, for example ETH for EVM-based blockchains, BTC for Tether Omni.", alias="feeCurrency") + requested_fee_currency: Optional[StrictStr] = Field(default=None, description="The fee-paying asset requested at transaction creation via the `feeCurrency` field, if any.", alias="requestedFeeCurrency") network_records: Optional[List[NetworkRecord]] = Field(default=None, description="In case a single transaction resulted with multiple transfers, for example a result of a contract call, then this parameter specifies each transfer that took place on the blockchain. In case of a single transfer transaction, this parameter is empty.", alias="networkRecords") created_at: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The transaction’s creation date and time, in unix timestamp.", alias="createdAt") last_updated: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The transaction’s last update date and time, in unix timestamp.", alias="lastUpdated") @@ -108,7 +109,7 @@ class TransactionResponse(BaseModel): replaced_tx_hash: Optional[StrictStr] = Field(default=None, description="if the transaction is a replace by fee (RBF) transaction, this is the hash of the transsaction that was replaced", alias="replacedTxHash") nonce: Optional[StrictStr] = Field(default=None, description="blockchain nonce for the transaction") blockchain_info: Optional[Dict[str, Any]] = Field(default=None, description="A JSON used to store additional data that is blockchain-specific.", alias="blockchainInfo") - __properties: ClassVar[List[str]] = ["id", "externalTxId", "status", "subStatus", "txHash", "operation", "note", "assetId", "assetType", "source", "sourceAddress", "tag", "destination", "destinations", "destinationAddress", "destinationAddressDescription", "destinationTag", "contractCallDecodedData", "programCallDecodedData", "amountInfo", "treatAsGrossAmount", "feeInfo", "feeCurrency", "networkRecords", "createdAt", "lastUpdated", "expiresAt", "createdBy", "signedBy", "rejectedBy", "authorizationInfo", "exchangeTxId", "customerRefId", "travelRuleMessageId", "amlScreeningResult", "complianceResults", "notBroadcastByFireblocks", "dappUrl", "gasLimit", "blockchainIndex", "paidRent", "extraParameters", "signedMessages", "numOfConfirmations", "blockInfo", "index", "rewardInfo", "feePayerInfo", "gaslessInfo", "systemMessages", "addressType", "requestedAmount", "amount", "netAmount", "amountUSD", "serviceFee", "fee", "networkFee", "errorDescription", "replacedTxHash", "nonce", "blockchainInfo"] + __properties: ClassVar[List[str]] = ["id", "externalTxId", "status", "subStatus", "txHash", "operation", "note", "assetId", "assetType", "source", "sourceAddress", "tag", "destination", "destinations", "destinationAddress", "destinationAddressDescription", "destinationTag", "contractCallDecodedData", "programCallDecodedData", "amountInfo", "treatAsGrossAmount", "feeInfo", "feeCurrency", "requestedFeeCurrency", "networkRecords", "createdAt", "lastUpdated", "expiresAt", "createdBy", "signedBy", "rejectedBy", "authorizationInfo", "exchangeTxId", "customerRefId", "travelRuleMessageId", "amlScreeningResult", "complianceResults", "notBroadcastByFireblocks", "dappUrl", "gasLimit", "blockchainIndex", "paidRent", "extraParameters", "signedMessages", "numOfConfirmations", "blockInfo", "index", "rewardInfo", "feePayerInfo", "gaslessInfo", "systemMessages", "addressType", "requestedAmount", "amount", "netAmount", "amountUSD", "serviceFee", "fee", "networkFee", "errorDescription", "replacedTxHash", "nonce", "blockchainInfo"] @field_validator('address_type') def address_type_validate_enum(cls, value): @@ -273,6 +274,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "treatAsGrossAmount": obj.get("treatAsGrossAmount"), "feeInfo": FeeInfo.from_dict(obj["feeInfo"]) if obj.get("feeInfo") is not None else None, "feeCurrency": obj.get("feeCurrency"), + "requestedFeeCurrency": obj.get("requestedFeeCurrency"), "networkRecords": [NetworkRecord.from_dict(_item) for _item in obj["networkRecords"]] if obj.get("networkRecords") is not None else None, "createdAt": obj.get("createdAt"), "lastUpdated": obj.get("lastUpdated"), diff --git a/fireblocks/models/transfer_response.py b/fireblocks/models/transfer_response.py new file mode 100644 index 00000000..9a5aa0f7 --- /dev/null +++ b/fireblocks/models/transfer_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from fireblocks.models.transfer_response_accept import TransferResponseAccept +from fireblocks.models.transfer_response_reject import TransferResponseReject +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +TRANSFERRESPONSE_ONE_OF_SCHEMAS = ["TransferResponseAccept", "TransferResponseReject"] + +class TransferResponse(BaseModel): + """ + TransferResponse + """ + # data type: TransferResponseAccept + oneof_schema_1_validator: Optional[TransferResponseAccept] = None + # data type: TransferResponseReject + oneof_schema_2_validator: Optional[TransferResponseReject] = None + actual_instance: Optional[Union[TransferResponseAccept, TransferResponseReject]] = None + one_of_schemas: Set[str] = { "TransferResponseAccept", "TransferResponseReject" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = TransferResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: TransferResponseAccept + if not isinstance(v, TransferResponseAccept): + error_messages.append(f"Error! Input type `{type(v)}` is not `TransferResponseAccept`") + else: + match += 1 + # validate data type: TransferResponseReject + if not isinstance(v, TransferResponseReject): + error_messages.append(f"Error! Input type `{type(v)}` is not `TransferResponseReject`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in TransferResponse with oneOf schemas: TransferResponseAccept, TransferResponseReject. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in TransferResponse with oneOf schemas: TransferResponseAccept, TransferResponseReject. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into TransferResponseAccept + try: + instance.actual_instance = TransferResponseAccept.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TransferResponseReject + try: + instance.actual_instance = TransferResponseReject.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into TransferResponse with oneOf schemas: TransferResponseAccept, TransferResponseReject. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into TransferResponse with oneOf schemas: TransferResponseAccept, TransferResponseReject. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], TransferResponseAccept, TransferResponseReject]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/fireblocks/models/transfer_response_accept.py b/fireblocks/models/transfer_response_accept.py new file mode 100644 index 00000000..2b9e44b5 --- /dev/null +++ b/fireblocks/models/transfer_response_accept.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TransferResponseAccept(BaseModel): + """ + Accept an inbound 2-step transfer offer. Carries no arguments. + """ # noqa: E501 + response_type: StrictStr = Field(description="How you are answering the transfer offer.", alias="responseType") + __properties: ClassVar[List[str]] = ["responseType"] + + @field_validator('response_type') + def response_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['TRANSFER_ACCEPT']): + raise ValueError("must be one of enum values ('TRANSFER_ACCEPT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TransferResponseAccept from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TransferResponseAccept from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "responseType": obj.get("responseType") + }) + return _obj + + diff --git a/fireblocks/models/transfer_response_reject.py b/fireblocks/models/transfer_response_reject.py new file mode 100644 index 00000000..ea774b79 --- /dev/null +++ b/fireblocks/models/transfer_response_reject.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TransferResponseReject(BaseModel): + """ + Reject an inbound 2-step transfer offer. Carries no arguments. + """ # noqa: E501 + response_type: StrictStr = Field(description="How you are answering the transfer offer.", alias="responseType") + __properties: ClassVar[List[str]] = ["responseType"] + + @field_validator('response_type') + def response_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['TRANSFER_REJECT']): + raise ValueError("must be one of enum values ('TRANSFER_REJECT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TransferResponseReject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TransferResponseReject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "responseType": obj.get("responseType") + }) + return _obj + + diff --git a/fireblocks/models/transfer_withdraw_payload.py b/fireblocks/models/transfer_withdraw_payload.py new file mode 100644 index 00000000..4b51b221 --- /dev/null +++ b/fireblocks/models/transfer_withdraw_payload.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TransferWithdrawPayload(BaseModel): + """ + TransferWithdrawPayload + """ # noqa: E501 + vault_account_id: StrictStr = Field(description="The vault account whose Canton wallet acts here.", alias="vaultAccountId") + asset: StrictStr = Field(description="Chain asset — `CANTON` or `CANTON_TEST`.") + offer_transaction_id: StrictStr = Field(description="The Fireblocks transaction id of the OUTGOING transfer offer being withdrawn.", alias="offerTransactionId") + __properties: ClassVar[List[str]] = ["vaultAccountId", "asset", "offerTransactionId"] + + @field_validator('asset') + def asset_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CANTON', 'CANTON_TEST']): + raise ValueError("must be one of enum values ('CANTON', 'CANTON_TEST')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TransferWithdrawPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TransferWithdrawPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vaultAccountId": obj.get("vaultAccountId"), + "asset": obj.get("asset"), + "offerTransactionId": obj.get("offerTransactionId") + }) + return _obj + + diff --git a/fireblocks/models/update_webhook_o_auth_request.py b/fireblocks/models/update_webhook_o_auth_request.py new file mode 100644 index 00000000..62b9c3a1 --- /dev/null +++ b/fireblocks/models/update_webhook_o_auth_request.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +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 typing import Optional, Set +from typing_extensions import Self + +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 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=128)]] = Field(default=None, description="A label for this credential set. Omit to leave it unchanged.") + client_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="OAuth client ID. Omit to leave it unchanged.", alias="clientId") + client_secret: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=480)]] = Field(default=None, description="A new OAuth client secret. Limited to 480 bytes when UTF-8 encoded, so a secret using non-ASCII characters fits fewer than 480 of them. Write-only — never returned in any response. Send this on its own to rotate the secret without changing anything else. Omit to leave it unchanged.", alias="clientSecret") + url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Token endpoint URL. HTTPS on port 443 only, and the host must resolve publicly. Omit to leave it unchanged.") + 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") + 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"] + + @field_validator('url') + def url_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^https:\/\/", value): + raise ValueError(r"must validate the regular expression /^https:\/\//") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateWebhookOAuthRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if custom_jwt_claims (nullable) is None + # and model_fields_set contains the field + if self.custom_jwt_claims is None and "custom_jwt_claims" in self.model_fields_set: + _dict['customJwtClaims'] = None + + # set to None if custom_body_params (nullable) is None + # and model_fields_set contains the field + if self.custom_body_params is None and "custom_body_params" in self.model_fields_set: + _dict['customBodyParams'] = None + + # set to None if custom_headers (nullable) is None + # and model_fields_set contains the field + if self.custom_headers is None and "custom_headers" in self.model_fields_set: + _dict['customHeaders'] = None + + # 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 UpdateWebhookOAuthRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "url": obj.get("url"), + "authMethod": obj.get("authMethod"), + "customJwtClaims": obj.get("customJwtClaims"), + "customBodyParams": obj.get("customBodyParams"), + "customHeaders": obj.get("customHeaders"), + "mtlsClientSignedCert": obj.get("mtlsClientSignedCert") + }) + return _obj + + diff --git a/fireblocks/models/update_webhook_request.py b/fireblocks/models/update_webhook_request.py index 9ff348e2..9265635f 100644 --- a/fireblocks/models/update_webhook_request.py +++ b/fireblocks/models/update_webhook_request.py @@ -37,7 +37,7 @@ class UpdateWebhookRequest(BaseModel): 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, Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1024)]]]] = Field(default=None, description="Custom headers delta: entries with a string value are added or updated, entries with a `null` value delete that header (no-op if absent), and header names omitted from the payload are left untouched. The resulting set is limited to 10 headers. Header names are case-insensitive, up to 128 characters, and limited to valid HTTP header name characters. Some system header names are reserved and cannot be used. Values are write-only — never returned in responses.", alias="customHeaders") + 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"] model_config = ConfigDict( @@ -95,6 +95,11 @@ def to_dict(self) -> Dict[str, Any]: if self.oauth is None and "oauth" in self.model_fields_set: _dict['oauth'] = None + # set to None if custom_headers (nullable) is None + # and model_fields_set contains the field + if self.custom_headers is None and "custom_headers" in self.model_fields_set: + _dict['customHeaders'] = None + return _dict @classmethod diff --git a/fireblocks/models/utxo_output.py b/fireblocks/models/utxo_output.py index b207bf90..b1b31f4e 100644 --- a/fireblocks/models/utxo_output.py +++ b/fireblocks/models/utxo_output.py @@ -44,7 +44,8 @@ class UtxoOutput(BaseModel): created_at: Optional[datetime] = Field(default=None, description="The timestamp when this UTXO was created", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="The timestamp when this UTXO was last updated", alias="updatedAt") labels: Optional[List[StrictStr]] = Field(default=None, description="Labels attached to this UTXO") - __properties: ClassVar[List[str]] = ["input", "utxoId", "address", "amount", "confirmations", "status", "isChange", "isCoinbase", "fbTxId", "createdByHash", "spentByFbTxId", "createdByHeight", "createdAt", "updatedAt", "labels"] + has_native_assets: Optional[StrictBool] = Field(default=None, description="Whether this UTXO carries Cardano native assets (tokens)", alias="hasNativeAssets") + __properties: ClassVar[List[str]] = ["input", "utxoId", "address", "amount", "confirmations", "status", "isChange", "isCoinbase", "fbTxId", "createdByHash", "spentByFbTxId", "createdByHeight", "createdAt", "updatedAt", "labels", "hasNativeAssets"] @field_validator('status') def status_validate_enum(cls, value): @@ -121,7 +122,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "createdByHeight": obj.get("createdByHeight"), "createdAt": obj.get("createdAt"), "updatedAt": obj.get("updatedAt"), - "labels": obj.get("labels") + "labels": obj.get("labels"), + "hasNativeAssets": obj.get("hasNativeAssets") }) return _obj diff --git a/fireblocks/models/webhook_event.py b/fireblocks/models/webhook_event.py index 7e2ade7e..19986786 100644 --- a/fireblocks/models/webhook_event.py +++ b/fireblocks/models/webhook_event.py @@ -31,6 +31,7 @@ class WebhookEvent(str, Enum): TRANSACTION_DOT_STATUS_DOT_UPDATED = 'transaction.status.updated' TRANSACTION_DOT_APPROVAL_STATUS_DOT_UPDATED = 'transaction.approval_status.updated' TRANSACTION_DOT_NETWORK_RECORDS_DOT_PROCESSING_COMPLETED = 'transaction.network_records.processing_completed' + TRANSACTION_DOT_ALERT_DOT_STUCK = 'transaction.alert.stuck' EXTERNAL_WALLET_DOT_ASSET_DOT_ADDED = 'external_wallet.asset.added' EXTERNAL_WALLET_DOT_ASSET_DOT_REMOVED = 'external_wallet.asset.removed' INTERNAL_WALLET_DOT_ASSET_DOT_ADDED = 'internal_wallet.asset.added' @@ -41,6 +42,10 @@ class WebhookEvent(str, Enum): VAULT_ACCOUNT_DOT_ASSET_DOT_ADDED = 'vault_account.asset.added' VAULT_ACCOUNT_DOT_ASSET_DOT_BALANCE_UPDATED = 'vault_account.asset.balance_updated' VAULT_ACCOUNT_DOT_NFT_DOT_BALANCE_UPDATED = 'vault_account.nft.balance_updated' + VAULT_ACCOUNT_DOT_BULK_CREATE_JOB_STARTED = 'vault_account.bulk_create_job_started' + VAULT_ACCOUNT_DOT_BULK_CREATE_JOB_ENDED = 'vault_account.bulk_create_job_ended' + VAULT_ACCOUNT_DOT_ASSET_DOT_BULK_ADD_JOB_STARTED = 'vault_account.asset.bulk_add_job_started' + VAULT_ACCOUNT_DOT_ASSET_DOT_BULK_ADD_JOB_ENDED = 'vault_account.asset.bulk_add_job_ended' EMBEDDED_WALLET_DOT_STATUS_DOT_UPDATED = 'embedded_wallet.status.updated' EMBEDDED_WALLET_DOT_CREATED = 'embedded_wallet.created' EMBEDDED_WALLET_DOT_ASSET_DOT_BALANCE_UPDATED = 'embedded_wallet.asset.balance_updated' diff --git a/fireblocks/models/webhook_o_auth_credentials.py b/fireblocks/models/webhook_o_auth_credentials.py new file mode 100644 index 00000000..8df37d30 --- /dev/null +++ b/fireblocks/models/webhook_o_auth_credentials.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +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 + id: StrictStr = Field(description="The id of the OAuth credentials. Pass this as a webhook's `webhookOauthId` to attach them.") + name: StrictStr = Field(description="The label given to this credential set.") + client_id: StrictStr = Field(description="OAuth client ID used to authenticate with the token endpoint.", alias="clientId") + url: StrictStr = Field(description="Token endpoint URL.") + auth_method: StrictStr = Field(description="How the client credentials are presented to the token endpoint: `client_secret_basic`, `client_secret_post` or `client_secret_jwt`. Credentials created without this field report `client_secret_basic`, which is what they use.", alias="authMethod") + custom_jwt_claims: Optional[List[StrictStr]] = Field(default=None, description="Names of the additional claims placed in the JWT assertion. Claim values are write-only and are never returned. Absent when no custom claims are configured.", alias="customJwtClaims") + custom_body_params: Optional[List[StrictStr]] = Field(default=None, description="Names of the additional parameters added to the token request body. Parameter values are write-only and are never returned. Absent when no custom parameters are configured.", alias="customBodyParams") + custom_headers: Optional[List[StrictStr]] = Field(default=None, description="Names of the additional HTTP headers added to **the token request sent to the authorization server** — not to the webhook delivery, which has its own separate `customHeaders`. Header values are write-only and are never returned. Absent when no custom headers are configured.", alias="customHeaders") + mtls_client_signed_cert: Optional[StrictStr] = Field(default=None, description="PEM-encoded client certificate used for mTLS when fetching OAuth tokens.", alias="mtlsClientSignedCert") + created_at: StrictInt = Field(description="The date and time the OAuth credentials were created, in milliseconds.", alias="createdAt") + updated_at: StrictInt = Field(description="The date and time the OAuth credentials were last updated, in milliseconds.", alias="updatedAt") + __properties: ClassVar[List[str]] = ["id", "name", "clientId", "url", "authMethod", "customJwtClaims", "customBodyParams", "customHeaders", "mtlsClientSignedCert", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookOAuthCredentials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookOAuthCredentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "clientId": obj.get("clientId"), + "url": obj.get("url"), + "authMethod": obj.get("authMethod") if obj.get("authMethod") is not None else 'client_secret_basic', + "customJwtClaims": obj.get("customJwtClaims"), + "customBodyParams": obj.get("customBodyParams"), + "customHeaders": obj.get("customHeaders"), + "mtlsClientSignedCert": obj.get("mtlsClientSignedCert"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/fireblocks/rest.py b/fireblocks/rest.py index 0f84fe64..e48d577b 100644 --- a/fireblocks/rest.py +++ b/fireblocks/rest.py @@ -19,6 +19,10 @@ import urllib3 +from fireblocks.connection_pool import ( + IdleAwarePoolManager, + IdleAwareProxyManager, +) from fireblocks.exceptions import ApiException, ApiValueError SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} @@ -93,6 +97,9 @@ def __init__(self, configuration) -> None: if configuration.connection_pool_maxsize is not None: pool_args["maxsize"] = configuration.connection_pool_maxsize + # Absent when Configuration is built directly; the pool applies the default. + idle_timeout_sec = getattr(configuration, "connection_idle_timeout_sec", None) + # https pool manager self.pool_manager: urllib3.PoolManager @@ -102,13 +109,18 @@ def __init__(self, configuration) -> None: pool_args["proxy_url"] = configuration.proxy pool_args["headers"] = configuration.proxy_headers + # SOCKSProxyManager installs its own pool classes. self.pool_manager = SOCKSProxyManager(**pool_args) else: pool_args["proxy_url"] = configuration.proxy pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) + self.pool_manager = IdleAwareProxyManager( + idle_timeout_sec=idle_timeout_sec, **pool_args + ) else: - self.pool_manager = urllib3.PoolManager(**pool_args) + self.pool_manager = IdleAwarePoolManager( + idle_timeout_sec=idle_timeout_sec, **pool_args + ) def request( self, diff --git a/fireblocks/threaded_api_client.py b/fireblocks/threaded_api_client.py index 58a011eb..8c876aa9 100644 --- a/fireblocks/threaded_api_client.py +++ b/fireblocks/threaded_api_client.py @@ -16,7 +16,7 @@ from typing import Tuple, Optional, List, Dict, Union, Any from urllib.parse import urlparse from fireblocks.api_response import ApiResponse, T as ApiResponseT -from fireblocks.configuration import Configuration +from fireblocks.api_client_configuration import ApiClientConfiguration from fireblocks.api_client import ApiClient from fireblocks.bearer_token_provider import BearerTokenProvider from fireblocks.client_configuration import ClientConfiguration @@ -52,7 +52,11 @@ def __init__(self, configuration: ClientConfiguration): "basePath is required either in the configuration or as environment variable FIREBLOCKS_BASE_PATH" ) - super().__init__(configuration=Configuration(host=base_path)) + api_configuration = ApiClientConfiguration( + host=base_path, + connection_idle_timeout_sec=client_configuration.additional_options.connection_idle_timeout_sec, + ) + super().__init__(configuration=api_configuration) self.token_provider = BearerTokenProvider(self._api_key, secret_key) diff --git a/pyproject.toml b/pyproject.toml index f3e478f7..08a27f53 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireblocks" -version = "29.0.0" +version = "0.0.0" description = "Fireblocks API" authors = ["Fireblocks "] license = "MIT License" diff --git a/setup.py b/setup.py index c11e80c5..8e55f57b 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "fireblocks" -VERSION = "29.0.0" +VERSION = "0.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 2.1.0, < 3.0.0", diff --git a/test/fireblocks/test_additional_options.py b/test/fireblocks/test_additional_options.py index ca30ce94..714855d2 100644 --- a/test/fireblocks/test_additional_options.py +++ b/test/fireblocks/test_additional_options.py @@ -11,7 +11,14 @@ """ # noqa: E501 +import pytest +from pydantic import ValidationError + from fireblocks.additional_options import AdditionalOptions +from fireblocks.connection_pool import ( + DEFAULT_IDLE_TIMEOUT_SECONDS, + MAX_IDLE_TIMEOUT_SECONDS, +) def test_is_anonymous_platform_real_value(): options = AdditionalOptions(is_anonymous_platform=True) @@ -36,3 +43,38 @@ def test_thread_pool_size_real_value(): def test_thread_pool_size_default_value(): options = AdditionalOptions() assert options.thread_pool_size == None + +def test_connection_idle_timeout_sec_real_value(): + options = AdditionalOptions(connection_idle_timeout_sec=60) + assert options.connection_idle_timeout_sec == 60 + +def test_connection_idle_timeout_sec_default_value(): + # Declared on the field rather than left as None, so the value shows up in the + # generated docs, IDE hints and the JSON schema. + options = AdditionalOptions() + assert options.connection_idle_timeout_sec == DEFAULT_IDLE_TIMEOUT_SECONDS + +def test_connection_idle_timeout_sec_none_is_still_accepted(): + # The pool treats None as "not configured" and applies the default, so passing + # it explicitly stays safe rather than silently disabling eviction. + assert AdditionalOptions(connection_idle_timeout_sec=None).connection_idle_timeout_sec is None + +def test_connection_idle_timeout_sec_accepts_the_maximum(): + options = AdditionalOptions(connection_idle_timeout_sec=MAX_IDLE_TIMEOUT_SECONDS) + assert options.connection_idle_timeout_sec == MAX_IDLE_TIMEOUT_SECONDS + +def test_connection_idle_timeout_sec_above_the_maximum_is_rejected(): + with pytest.raises(ValidationError): + AdditionalOptions(connection_idle_timeout_sec=MAX_IDLE_TIMEOUT_SECONDS + 1) + +def test_the_maximum_does_not_block_disabling(): + # -1 is below the ceiling, so the cap bounds the positive range without taking + # away the escape hatch. + assert AdditionalOptions(connection_idle_timeout_sec=-1).connection_idle_timeout_sec == -1 + +def test_connection_idle_timeout_sec_zero_is_a_real_value(): + # 0 means "open a fresh connection every request", not "disabled". + assert AdditionalOptions(connection_idle_timeout_sec=0).connection_idle_timeout_sec == 0 + +def test_connection_idle_timeout_sec_negative_means_no_limit(): + assert AdditionalOptions(connection_idle_timeout_sec=-1).connection_idle_timeout_sec == -1 diff --git a/test/fireblocks/test_api_client_configuration.py b/test/fireblocks/test_api_client_configuration.py new file mode 100644 index 00000000..139d1aa0 --- /dev/null +++ b/test/fireblocks/test_api_client_configuration.py @@ -0,0 +1,49 @@ +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy + +from fireblocks.api_client_configuration import ApiClientConfiguration +from fireblocks.configuration import Configuration + +HOST = "https://api.example.com/v1" + + +def test_is_a_configuration(): + # ApiClient and rest.py expect the generated Configuration contract. + assert isinstance(ApiClientConfiguration(host=HOST), Configuration) + + +def test_connection_idle_timeout_sec_defaults_to_not_configured(): + # None means "caller expressed no preference"; connection_pool.py resolves the + # effective default of 30s. + assert ApiClientConfiguration(host=HOST).connection_idle_timeout_sec is None + + +def test_connection_idle_timeout_sec_round_trips(): + assert ApiClientConfiguration(host=HOST, connection_idle_timeout_sec=17).connection_idle_timeout_sec == 17 + assert ApiClientConfiguration(host=HOST, connection_idle_timeout_sec=0).connection_idle_timeout_sec == 0 + assert ApiClientConfiguration(host=HOST, connection_idle_timeout_sec=-1).connection_idle_timeout_sec == -1 + + +def test_host_and_other_settings_still_work(): + config = ApiClientConfiguration(host=HOST) + assert config.host == HOST + assert config.retries is None + + +def test_survives_deepcopy(): + # Configuration.__deepcopy__ iterates __dict__, so the field must come along. + config = ApiClientConfiguration(host=HOST, connection_idle_timeout_sec=42) + + assert copy.deepcopy(config).connection_idle_timeout_sec == 42 diff --git a/test/fireblocks/test_client.py b/test/fireblocks/test_client.py index 2ef0e66b..9d57db9b 100644 --- a/test/fireblocks/test_client.py +++ b/test/fireblocks/test_client.py @@ -17,6 +17,7 @@ from fireblocks.client_configuration import ClientConfiguration from fireblocks.threaded_api_client import ThreadedApiClient from fireblocks.api.api_user_api import ApiUserApi +from fireblocks.api.approvals_beta_api import ApprovalsBetaApi from fireblocks.api.audit_logs_api import AuditLogsApi from fireblocks.api.blockchain_link_beta_api import BlockchainLinkBetaApi from fireblocks.api.blockchains_assets_api import BlockchainsAssetsApi @@ -87,6 +88,9 @@ def test_fireblocks_construction(fireblocks_instance): def test_get_api_user(fireblocks_instance): assert isinstance(fireblocks_instance.api_user, ApiUserApi) +def test_get_approvals_beta(fireblocks_instance): + assert isinstance(fireblocks_instance.approvals_beta, ApprovalsBetaApi) + def test_get_audit_logs(fireblocks_instance): assert isinstance(fireblocks_instance.audit_logs, AuditLogsApi) diff --git a/test/fireblocks/test_connection_pool.py b/test/fireblocks/test_connection_pool.py new file mode 100644 index 00000000..a24a39e6 --- /dev/null +++ b/test/fireblocks/test_connection_pool.py @@ -0,0 +1,379 @@ +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import logging +import time +from types import SimpleNamespace + +import pytest +import urllib3 + +from fireblocks import connection_pool +from fireblocks.connection_pool import ( + DEFAULT_IDLE_TIMEOUT_SECONDS, + IdleAwareHTTPConnectionPool, + IdleAwareHTTPSConnectionPool, + IdleAwarePoolManager, + IdleAwareProxyManager, + MAX_IDLE_TIMEOUT_SECONDS, + normalize_idle_timeout_sec, +) + +IDLE_LIMIT = 30 +IDLE_SINCE_ATTR = "_fireblocks_idle_since" + + +class FakeConnection: + """Minimal stand-in for a urllib3 connection. + + Deliberately a real object rather than a ``MagicMock``: a mock auto-creates + every attribute that is read, which would silently defeat the cases asserting + that a connection carries *no* idle stamp. + """ + + def __init__(self): + self.is_connected = True # urllib3's own liveness check reads this + self.close_calls = 0 + + def close(self): + self.close_calls += 1 + + +def new_pool(pool_cls=IdleAwareHTTPSConnectionPool, **kwargs): + """Build a pool with room to put connections into. + + urllib3 pre-fills the pool's ``LifoQueue`` with ``maxsize`` ``None`` + placeholders, so a freshly built pool is already "full" and ``_put_conn`` + would discard (and close) the connection instead of storing it. Draining the + placeholders reproduces the steady state a live pool reaches after its first + request. + """ + kwargs.setdefault("idle_timeout_sec", IDLE_LIMIT) + pool = pool_cls("api.example.com", maxsize=4, **kwargs) + while not pool.pool.empty(): + pool.pool.get_nowait() + return pool + + +@pytest.fixture +def pool(): + return new_pool(port=443) + + +@pytest.fixture +def conn(): + return FakeConnection() + + +def age_by(connection, seconds): + """Backdate the idle stamp, avoiding any need to control the clock.""" + setattr(connection, IDLE_SINCE_ATTR, time.monotonic() - seconds) + + +def freeze_clock(mocker, at): + """Pin ``time.monotonic`` as seen by the module under test only.""" + mocker.patch.object(connection_pool, "time", SimpleNamespace(monotonic=lambda: at)) + + +# --- stamping ----------------------------------------------------------------- + +def test_put_conn_stamps_the_idle_moment(pool, conn): + before = time.monotonic() + pool._put_conn(conn) + after = time.monotonic() + + assert before <= getattr(conn, IDLE_SINCE_ATTR) <= after + + +def test_put_conn_accepts_none_without_raising(pool): + # urllib3 closes a failed connection and hands None to _put_conn. This is the + # path taken when a request black-holes, so it must not raise. + pool._put_conn(None) + + +def test_a_failed_connection_is_never_stamped(pool, conn): + # The invariant the design rests on: only connections that were successfully + # released carry a stamp, so a failed one cannot poison the pool with a + # misleading idle time. + pool._put_conn(None) + + assert not hasattr(conn, IDLE_SINCE_ATTR) + + +# --- eviction on checkout ----------------------------------------------------- + +def test_connection_idle_under_the_limit_is_reused(pool, conn): + pool._put_conn(conn) + age_by(conn, IDLE_LIMIT - 1) + + assert pool._get_conn() is conn + assert conn.close_calls == 0 + + +def test_connection_idle_over_the_limit_is_closed(pool, conn): + pool._put_conn(conn) + age_by(conn, IDLE_LIMIT + 1) + + # The connection is still handed back; urllib3's _validate_conn reconnects it + # before the request is sent, which is the same idiom urllib3 uses for its own + # dropped-connection path. + assert pool._get_conn() is conn + assert conn.close_calls == 1 + + +def test_limit_is_exclusive_so_exactly_at_the_limit_is_reused(pool, conn, mocker): + pool._put_conn(conn) + stamped_at = getattr(conn, IDLE_SINCE_ATTR) + freeze_clock(mocker, stamped_at + IDLE_LIMIT) + + pool._get_conn() + + assert conn.close_calls == 0 + + +def test_one_second_past_the_limit_is_closed(pool, conn, mocker): + pool._put_conn(conn) + stamped_at = getattr(conn, IDLE_SINCE_ATTR) + freeze_clock(mocker, stamped_at + IDLE_LIMIT + 1) + + pool._get_conn() + + assert conn.close_calls == 1 + + +def test_unstamped_connection_is_never_closed(pool, conn): + # A connection straight from _new_conn() has never been pooled, so it is not + # idle and must not be discarded. + assert not hasattr(conn, IDLE_SINCE_ATTR) + pool.pool.put_nowait(conn) + + assert pool._get_conn() is conn + assert conn.close_calls == 0 + + +def test_no_limit_keeps_even_a_very_stale_connection(conn): + pool = new_pool(idle_timeout_sec=-1) + pool._put_conn(conn) + age_by(conn, 86400) + + assert pool._get_conn() is conn + assert conn.close_calls == 0 + + +def test_zero_discards_every_pooled_connection(conn): + # 0 is a real limit, not a disable switch: a connection is stale the instant it + # is released. Regression test for the `not self.idle_timeout_sec` guard, which was + # falsy for 0 and silently turned this into "never evict". + pool = new_pool(idle_timeout_sec=0) + pool._put_conn(conn) + + pool._get_conn() + + assert conn.close_calls == 1 + + +def test_http_pool_evicts_too(conn): + http_pool = new_pool(IdleAwareHTTPConnectionPool, port=80) + http_pool._put_conn(conn) + age_by(conn, IDLE_LIMIT + 1) + + http_pool._get_conn() + + assert conn.close_calls == 1 + + +def test_reusable_connection_is_re_stamped_on_release(pool, conn): + # A connection that keeps being used must not accumulate age across requests. + pool._put_conn(conn) + age_by(conn, IDLE_LIMIT - 1) + pool._get_conn() + pool._put_conn(conn) + + assert time.monotonic() - getattr(conn, IDLE_SINCE_ATTR) < 1 + assert conn.close_calls == 0 + + +# --- pool managers ------------------------------------------------------------ + +def test_pool_manager_registers_the_idle_aware_pool_classes(): + manager = IdleAwarePoolManager(idle_timeout_sec=IDLE_LIMIT) + + assert manager.pool_classes_by_scheme["https"] is IdleAwareHTTPSConnectionPool + assert manager.pool_classes_by_scheme["http"] is IdleAwareHTTPConnectionPool + + +def test_proxy_manager_registers_the_idle_aware_pool_classes(): + manager = IdleAwareProxyManager("http://proxy.example.com:3128", idle_timeout_sec=IDLE_LIMIT) + + assert manager.pool_classes_by_scheme["https"] is IdleAwareHTTPSConnectionPool + assert manager.pool_classes_by_scheme["http"] is IdleAwareHTTPConnectionPool + + +def test_manager_does_not_mutate_the_shared_module_level_mapping(): + # PoolManager.__init__ assigns urllib3's module-level dict by reference, so + # mutating it in place would leak into every other PoolManager in the process. + IdleAwarePoolManager(idle_timeout_sec=IDLE_LIMIT) + + assert ( + urllib3.poolmanager.pool_classes_by_scheme["https"] + is urllib3.HTTPSConnectionPool + ) + assert urllib3.PoolManager().pool_classes_by_scheme["https"] is urllib3.HTTPSConnectionPool + + +def test_pools_handed_out_by_the_manager_are_idle_aware(): + # Guards the __init__ ordering trap: PoolManager.__init__ overwrites any class + # attribute, so the mapping must be installed after super().__init__(). + manager = IdleAwarePoolManager(idle_timeout_sec=IDLE_LIMIT) + + assert isinstance( + manager.connection_from_url("https://api.example.com"), + IdleAwareHTTPSConnectionPool, + ) + assert isinstance( + manager.connection_from_url("http://api.example.com"), + IdleAwareHTTPConnectionPool, + ) + + +def test_pool_manager_still_forwards_connection_pool_kwargs(): + # The mixin must not swallow the kwargs rest.py passes through as pool_args. + manager = IdleAwarePoolManager(maxsize=7, retries=False, idle_timeout_sec=IDLE_LIMIT) + created = manager.connection_from_url("https://api.example.com") + + assert created.pool.maxsize == 7 + # urllib3 normalises retries=False into Retry(total=False), so check total. + assert created.retries.total is False + + +def test_manager_pools_actually_evict(conn): + # End-to-end through the manager rather than a hand-built pool. + manager = IdleAwarePoolManager(idle_timeout_sec=IDLE_LIMIT) + created = manager.connection_from_url("https://api.example.com") + while not created.pool.empty(): + created.pool.get_nowait() + + created._put_conn(conn) + age_by(conn, IDLE_LIMIT + 1) + created._get_conn() + + assert conn.close_calls == 1 + + +# --- configuration ------------------------------------------------------------ + +def test_default_idle_timeout_sec_matches_the_java_sdk(): + # The Java SDK inherits the JDK's jdk.httpclient.keepalive.timeout of 30s. + # Keeping the two SDKs aligned is deliberate, not incidental. + assert DEFAULT_IDLE_TIMEOUT_SECONDS == 30 + + +def test_pool_defaults_to_the_sdk_default_when_not_configured(): + assert IdleAwareHTTPSConnectionPool("api.example.com").idle_timeout_sec == 30 + + +def test_manager_propagates_its_timeout_to_the_pools_it_creates(): + manager = IdleAwarePoolManager(idle_timeout_sec=12.5) + + assert manager.connection_from_url("https://api.example.com").idle_timeout_sec == 12.5 + + +def test_manager_propagates_no_limit_to_the_pools_it_creates(): + manager = IdleAwarePoolManager(idle_timeout_sec=-1) + + assert manager.connection_from_url("https://api.example.com").idle_timeout_sec is None + + +def test_manager_propagates_zero_to_the_pools_it_creates(): + # Must survive the trip as 0, not collapse to the None sentinel. + manager = IdleAwarePoolManager(idle_timeout_sec=0) + + assert manager.connection_from_url("https://api.example.com").idle_timeout_sec == 0 + + +@pytest.mark.parametrize("value,expected", [ + (60, 60.0), + (12.5, 12.5), + ("45", 45.0), +]) +def test_normalize_accepts_positive_values(value, expected): + assert normalize_idle_timeout_sec(value) == expected + + +def test_normalize_treats_none_as_not_configured(): + assert normalize_idle_timeout_sec(None) == DEFAULT_IDLE_TIMEOUT_SECONDS + + +def test_normalize_keeps_zero_as_a_real_limit(): + assert normalize_idle_timeout_sec(0) == 0 + + +@pytest.mark.parametrize("value", [-1, -30]) +def test_normalize_treats_negative_as_no_limit(value): + assert normalize_idle_timeout_sec(value) is None + + +def test_normalize_falls_back_to_the_default_on_garbage(): + # Better to keep the protection than silently disable it. + assert normalize_idle_timeout_sec("not-a-number") == DEFAULT_IDLE_TIMEOUT_SECONDS + + +def test_normalize_keeps_the_maximum_itself(): + assert normalize_idle_timeout_sec(MAX_IDLE_TIMEOUT_SECONDS) == MAX_IDLE_TIMEOUT_SECONDS + + +def test_normalize_caps_values_above_the_maximum(): + # Only reachable through a directly built Configuration; AdditionalOptions + # rejects these before they get here. + assert normalize_idle_timeout_sec(600) == MAX_IDLE_TIMEOUT_SECONDS + + +def test_normalize_warns_when_it_caps(caplog): + with caplog.at_level(logging.WARNING, logger="fireblocks.connection_pool"): + normalize_idle_timeout_sec(600) + assert "Capping" in caplog.text + + +def test_capping_does_not_apply_to_no_limit(): + # -1 is not "a very small number", it is the disable switch, so the ceiling + # must not turn it into MAX. + assert normalize_idle_timeout_sec(-1) is None + + +# --- end-to-end wiring through the SDK ----------------------------------------- + +def test_rest_client_builds_an_idle_aware_manager_from_configuration(): + from fireblocks.client import Fireblocks + from fireblocks.client_configuration import ClientConfiguration + from fireblocks.additional_options import AdditionalOptions + + client = Fireblocks(ClientConfiguration( + api_key="k", secret_key="s", base_path="https://api.example.com/v1", + additional_options=AdditionalOptions(connection_idle_timeout_sec=17), + )) + manager = client._api_client.rest_client.pool_manager + + assert isinstance(manager, IdleAwarePoolManager) + assert manager.connection_from_url("https://api.example.com").idle_timeout_sec == 17 + + +def test_rest_client_uses_the_default_when_no_option_is_given(): + from fireblocks.client import Fireblocks + from fireblocks.client_configuration import ClientConfiguration + + client = Fireblocks(ClientConfiguration( + api_key="k", secret_key="s", base_path="https://api.example.com/v1", + )) + manager = client._api_client.rest_client.pool_manager + + assert manager.connection_from_url("https://api.example.com").idle_timeout_sec == 30 diff --git a/test/test_access_type_response.py b/test/test_access_type_response.py new file mode 100644 index 00000000..cafe3576 --- /dev/null +++ b/test/test_access_type_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.access_type_response import AccessTypeResponse + + +class TestAccessTypeResponse(unittest.TestCase): + """AccessTypeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccessTypeResponse: + """Test AccessTypeResponse + 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 `AccessTypeResponse` + """ + model = AccessTypeResponse() + if include_optional: + return AccessTypeResponse( + type = 'PROVIDER_ACCOUNT', + provider_id = '', + account_id = '', + sub_providers = [lifi-relay, uniswap-v3] + ) + else: + return AccessTypeResponse( + type = 'PROVIDER_ACCOUNT', + provider_id = '', + account_id = '', + ) + """ + + def testAccessTypeResponse(self): + """Test AccessTypeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_account_access_response.py b/test/test_account_access_response.py new file mode 100644 index 00000000..be94d858 --- /dev/null +++ b/test/test_account_access_response.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.account_access_response import AccountAccessResponse + + +class TestAccountAccessResponse(unittest.TestCase): + """AccountAccessResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountAccessResponse: + """Test AccountAccessResponse + 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 `AccountAccessResponse` + """ + model = AccountAccessResponse() + if include_optional: + return AccountAccessResponse( + type = 'PROVIDER_ACCOUNT', + provider_id = '', + account_id = '' + ) + else: + return AccountAccessResponse( + type = 'PROVIDER_ACCOUNT', + account_id = '', + ) + """ + + def testAccountAccessResponse(self): + """Test AccountAccessResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_add_connected_account_request.py b/test/test_add_connected_account_request.py index 2e6017b2..04867011 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@595629ea', + creds = '[B@30b8743a', 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@595629ea', + creds = '[B@30b8743a', api_key = 'api_key_abc123', ) """ diff --git a/test/test_allocation_response.py b/test/test_allocation_response.py new file mode 100644 index 00000000..2547bde5 --- /dev/null +++ b/test/test_allocation_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.allocation_response import AllocationResponse + + +class TestAllocationResponse(unittest.TestCase): + """AllocationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AllocationResponse: + """Test AllocationResponse + 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 `AllocationResponse` + """ + model = AllocationResponse() + if include_optional: + return AllocationResponse( + response_type = 'ALLOCATION_REJECT' + ) + else: + return AllocationResponse( + response_type = 'ALLOCATION_REJECT', + ) + """ + + def testAllocationResponse(self): + """Test AllocationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_allocation_response_accept.py b/test/test_allocation_response_accept.py new file mode 100644 index 00000000..709bb30b --- /dev/null +++ b/test/test_allocation_response_accept.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.allocation_response_accept import AllocationResponseAccept + + +class TestAllocationResponseAccept(unittest.TestCase): + """AllocationResponseAccept unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AllocationResponseAccept: + """Test AllocationResponseAccept + 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 `AllocationResponseAccept` + """ + model = AllocationResponseAccept() + if include_optional: + return AllocationResponseAccept( + response_type = 'ALLOCATION_ACCEPT' + ) + else: + return AllocationResponseAccept( + response_type = 'ALLOCATION_ACCEPT', + ) + """ + + def testAllocationResponseAccept(self): + """Test AllocationResponseAccept""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_allocation_response_reject.py b/test/test_allocation_response_reject.py new file mode 100644 index 00000000..5de975d1 --- /dev/null +++ b/test/test_allocation_response_reject.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.allocation_response_reject import AllocationResponseReject + + +class TestAllocationResponseReject(unittest.TestCase): + """AllocationResponseReject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AllocationResponseReject: + """Test AllocationResponseReject + 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 `AllocationResponseReject` + """ + model = AllocationResponseReject() + if include_optional: + return AllocationResponseReject( + response_type = 'ALLOCATION_REJECT' + ) + else: + return AllocationResponseReject( + response_type = 'ALLOCATION_REJECT', + ) + """ + + def testAllocationResponseReject(self): + """Test AllocationResponseReject""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_allocation_withdraw_payload.py b/test/test_allocation_withdraw_payload.py new file mode 100644 index 00000000..02337ae1 --- /dev/null +++ b/test/test_allocation_withdraw_payload.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.allocation_withdraw_payload import AllocationWithdrawPayload + + +class TestAllocationWithdrawPayload(unittest.TestCase): + """AllocationWithdrawPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AllocationWithdrawPayload: + """Test AllocationWithdrawPayload + 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 `AllocationWithdrawPayload` + """ + model = AllocationWithdrawPayload() + if include_optional: + return AllocationWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + allocation_transaction_id = '5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21' + ) + else: + return AllocationWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + allocation_transaction_id = '5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21', + ) + """ + + def testAllocationWithdrawPayload(self): + """Test AllocationWithdrawPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_allow_list_payload.py b/test/test_allow_list_payload.py new file mode 100644 index 00000000..8371823f --- /dev/null +++ b/test/test_allow_list_payload.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.allow_list_payload import AllowListPayload + + +class TestAllowListPayload(unittest.TestCase): + """AllowListPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AllowListPayload: + """Test AllowListPayload + 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 `AllowListPayload` + """ + model = AllowListPayload() + if include_optional: + return AllowListPayload( + vault_account_id = '12', + asset = 'CANTON', + wallets = ["investor-party::1220abc…"] + ) + else: + return AllowListPayload( + vault_account_id = '12', + asset = 'CANTON', + wallets = ["investor-party::1220abc…"], + ) + """ + + def testAllowListPayload(self): + """Test AllowListPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_approval_request_item.py b/test/test_approval_request_item.py new file mode 100644 index 00000000..813076d0 --- /dev/null +++ b/test/test_approval_request_item.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.approval_request_item import ApprovalRequestItem + + +class TestApprovalRequestItem(unittest.TestCase): + """ApprovalRequestItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApprovalRequestItem: + """Test ApprovalRequestItem + 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 `ApprovalRequestItem` + """ + model = ApprovalRequestItem() + if include_optional: + return ApprovalRequestItem( + request_payload = '{"requestId":"ccr-1f2e3d4c","requestType":"ADD_USER","requestTimestamp":1750000000000,"expiresAt":1750600000,"requestData":{"type":"ADD_USER","creator":"user-1f2e3d4c","id":"ccr-1f2e3d4c"}}', + request_signature = '', + user_status = 'USER_NOT_APPROVED', + quorum_status = fireblocks.models.quorum_status.QuorumStatus( + request_status = 'PENDING', + users = [{"index":0,"userId":"6073c3d2-9f4b-4c1a-8f7d-2b1e5a9c4d80","status":"APPROVED"},{"index":1,"userId":"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d","status":"PENDING","isMandatoryOwner":true}], + quorum = {"type":"SIMPLE","threshold":2,"currentApprovalCount":1,"status":"PENDING","isMandatoryOwnerApproved":false,"members":[0,1]}, ) + ) + else: + return ApprovalRequestItem( + request_payload = '{"requestId":"ccr-1f2e3d4c","requestType":"ADD_USER","requestTimestamp":1750000000000,"expiresAt":1750600000,"requestData":{"type":"ADD_USER","creator":"user-1f2e3d4c","id":"ccr-1f2e3d4c"}}', + user_status = 'USER_NOT_APPROVED', + ) + """ + + def testApprovalRequestItem(self): + """Test ApprovalRequestItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_approvals_beta_api.py b/test/test_approvals_beta_api.py new file mode 100644 index 00000000..0acf62b6 --- /dev/null +++ b/test/test_approvals_beta_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.api.approvals_beta_api import ApprovalsBetaApi + + +class TestApprovalsBetaApi(unittest.TestCase): + """ApprovalsBetaApi unit test stubs""" + + def setUp(self) -> None: + self.api = ApprovalsBetaApi() + + def tearDown(self) -> None: + pass + + def test_get_approval_by_id(self) -> None: + """Test case for get_approval_by_id + + Get a single approval request + """ + pass + + def test_get_approvals(self) -> None: + """Test case for get_approvals + + List approval requests + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_attach_detach_utxo_labels_response.py b/test/test_attach_detach_utxo_labels_response.py index ec3b85a9..ced9b0c5 100644 --- a/test/test_attach_detach_utxo_labels_response.py +++ b/test/test_attach_detach_utxo_labels_response.py @@ -56,7 +56,8 @@ def make_instance(self, include_optional) -> AttachDetachUtxoLabelsResponse: created_by_height = 800100, created_at = '2025-01-16T15:45Z', updated_at = '2025-01-16T15:45Z', - labels = ["cold-storage","vip"], ) + labels = ["cold-storage","vip"], + has_native_assets = True, ) ] ) else: diff --git a/test/test_call_accepted.py b/test/test_call_accepted.py new file mode 100644 index 00000000..cb2daced --- /dev/null +++ b/test/test_call_accepted.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.call_accepted import CallAccepted + + +class TestCallAccepted(unittest.TestCase): + """CallAccepted unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CallAccepted: + """Test CallAccepted + 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 `CallAccepted` + """ + model = CallAccepted() + if include_optional: + return CallAccepted( + transaction_id = '5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21', + status = 'SUBMITTED' + ) + else: + return CallAccepted( + transaction_id = '5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21', + status = 'SUBMITTED', + ) + """ + + def testCallAccepted(self): + """Test CallAccepted""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_canton_call.py b/test/test_canton_call.py new file mode 100644 index 00000000..6f90c95f --- /dev/null +++ b/test/test_canton_call.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.canton_call import CantonCall + + +class TestCantonCall(unittest.TestCase): + """CantonCall unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CantonCall: + """Test CantonCall + 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 `CantonCall` + """ + model = CantonCall() + if include_optional: + return CantonCall( + type = 'DTCC_PARTICIPANT_ONBOARDING', + payload = fireblocks.models.transfer_withdraw_payload.TransferWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + offer_transaction_id = '2d47ae90-31bb-4f6c-8a17-7e0c5b9f2d63', ) + ) + else: + return CantonCall( + type = 'DTCC_PARTICIPANT_ONBOARDING', + payload = fireblocks.models.transfer_withdraw_payload.TransferWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + offer_transaction_id = '2d47ae90-31bb-4f6c-8a17-7e0c5b9f2d63', ), + ) + """ + + def testCantonCall(self): + """Test CantonCall""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_canton_call_allocation_withdraw.py b/test/test_canton_call_allocation_withdraw.py new file mode 100644 index 00000000..6419d914 --- /dev/null +++ b/test/test_canton_call_allocation_withdraw.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.canton_call_allocation_withdraw import ( + CantonCallAllocationWithdraw, +) + + +class TestCantonCallAllocationWithdraw(unittest.TestCase): + """CantonCallAllocationWithdraw unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CantonCallAllocationWithdraw: + """Test CantonCallAllocationWithdraw + 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 `CantonCallAllocationWithdraw` + """ + model = CantonCallAllocationWithdraw() + if include_optional: + return CantonCallAllocationWithdraw( + type = 'ALLOCATION_WITHDRAW', + payload = fireblocks.models.allocation_withdraw_payload.AllocationWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + allocation_transaction_id = '5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21', ) + ) + else: + return CantonCallAllocationWithdraw( + type = 'ALLOCATION_WITHDRAW', + payload = fireblocks.models.allocation_withdraw_payload.AllocationWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + allocation_transaction_id = '5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21', ), + ) + """ + + def testCantonCallAllocationWithdraw(self): + """Test CantonCallAllocationWithdraw""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_canton_call_allow_list_add.py b/test/test_canton_call_allow_list_add.py new file mode 100644 index 00000000..05aa6812 --- /dev/null +++ b/test/test_canton_call_allow_list_add.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.canton_call_allow_list_add import CantonCallAllowListAdd + + +class TestCantonCallAllowListAdd(unittest.TestCase): + """CantonCallAllowListAdd unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CantonCallAllowListAdd: + """Test CantonCallAllowListAdd + 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 `CantonCallAllowListAdd` + """ + model = CantonCallAllowListAdd() + if include_optional: + return CantonCallAllowListAdd( + type = 'DTCC_ALLOW_LIST_ADD', + payload = fireblocks.models.allow_list_payload.AllowListPayload( + vault_account_id = '12', + asset = 'CANTON', + wallets = ["investor-party::1220abc…"], ) + ) + else: + return CantonCallAllowListAdd( + type = 'DTCC_ALLOW_LIST_ADD', + payload = fireblocks.models.allow_list_payload.AllowListPayload( + vault_account_id = '12', + asset = 'CANTON', + wallets = ["investor-party::1220abc…"], ), + ) + """ + + def testCantonCallAllowListAdd(self): + """Test CantonCallAllowListAdd""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_canton_call_allow_list_remove.py b/test/test_canton_call_allow_list_remove.py new file mode 100644 index 00000000..7dbcdb7a --- /dev/null +++ b/test/test_canton_call_allow_list_remove.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.canton_call_allow_list_remove import CantonCallAllowListRemove + + +class TestCantonCallAllowListRemove(unittest.TestCase): + """CantonCallAllowListRemove unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CantonCallAllowListRemove: + """Test CantonCallAllowListRemove + 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 `CantonCallAllowListRemove` + """ + model = CantonCallAllowListRemove() + if include_optional: + return CantonCallAllowListRemove( + type = 'DTCC_ALLOW_LIST_REMOVE', + payload = fireblocks.models.allow_list_payload.AllowListPayload( + vault_account_id = '12', + asset = 'CANTON', + wallets = ["investor-party::1220abc…"], ) + ) + else: + return CantonCallAllowListRemove( + type = 'DTCC_ALLOW_LIST_REMOVE', + payload = fireblocks.models.allow_list_payload.AllowListPayload( + vault_account_id = '12', + asset = 'CANTON', + wallets = ["investor-party::1220abc…"], ), + ) + """ + + def testCantonCallAllowListRemove(self): + """Test CantonCallAllowListRemove""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_canton_call_end_investor_invite.py b/test/test_canton_call_end_investor_invite.py new file mode 100644 index 00000000..4e05076e --- /dev/null +++ b/test/test_canton_call_end_investor_invite.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.canton_call_end_investor_invite import ( + CantonCallEndInvestorInvite, +) + + +class TestCantonCallEndInvestorInvite(unittest.TestCase): + """CantonCallEndInvestorInvite unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CantonCallEndInvestorInvite: + """Test CantonCallEndInvestorInvite + 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 `CantonCallEndInvestorInvite` + """ + model = CantonCallEndInvestorInvite() + if include_optional: + return CantonCallEndInvestorInvite( + type = 'DTCC_END_INVESTOR_INVITE', + payload = fireblocks.models.end_investor_payload.EndInvestorPayload( + vault_account_id = '12', + asset = 'CANTON', + end_investor = 'investor-party::1220abc…', ) + ) + else: + return CantonCallEndInvestorInvite( + type = 'DTCC_END_INVESTOR_INVITE', + payload = fireblocks.models.end_investor_payload.EndInvestorPayload( + vault_account_id = '12', + asset = 'CANTON', + end_investor = 'investor-party::1220abc…', ), + ) + """ + + def testCantonCallEndInvestorInvite(self): + """Test CantonCallEndInvestorInvite""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_canton_call_end_investor_invite_cancel.py b/test/test_canton_call_end_investor_invite_cancel.py new file mode 100644 index 00000000..bbef7913 --- /dev/null +++ b/test/test_canton_call_end_investor_invite_cancel.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.canton_call_end_investor_invite_cancel import ( + CantonCallEndInvestorInviteCancel, +) + + +class TestCantonCallEndInvestorInviteCancel(unittest.TestCase): + """CantonCallEndInvestorInviteCancel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CantonCallEndInvestorInviteCancel: + """Test CantonCallEndInvestorInviteCancel + 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 `CantonCallEndInvestorInviteCancel` + """ + model = CantonCallEndInvestorInviteCancel() + if include_optional: + return CantonCallEndInvestorInviteCancel( + type = 'DTCC_END_INVESTOR_INVITE_CANCEL', + payload = fireblocks.models.end_investor_payload.EndInvestorPayload( + vault_account_id = '12', + asset = 'CANTON', + end_investor = 'investor-party::1220abc…', ) + ) + else: + return CantonCallEndInvestorInviteCancel( + type = 'DTCC_END_INVESTOR_INVITE_CANCEL', + payload = fireblocks.models.end_investor_payload.EndInvestorPayload( + vault_account_id = '12', + asset = 'CANTON', + end_investor = 'investor-party::1220abc…', ), + ) + """ + + def testCantonCallEndInvestorInviteCancel(self): + """Test CantonCallEndInvestorInviteCancel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_canton_call_end_investor_offboard.py b/test/test_canton_call_end_investor_offboard.py new file mode 100644 index 00000000..ffbc0547 --- /dev/null +++ b/test/test_canton_call_end_investor_offboard.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.canton_call_end_investor_offboard import ( + CantonCallEndInvestorOffboard, +) + + +class TestCantonCallEndInvestorOffboard(unittest.TestCase): + """CantonCallEndInvestorOffboard unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CantonCallEndInvestorOffboard: + """Test CantonCallEndInvestorOffboard + 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 `CantonCallEndInvestorOffboard` + """ + model = CantonCallEndInvestorOffboard() + if include_optional: + return CantonCallEndInvestorOffboard( + type = 'DTCC_END_INVESTOR_OFFBOARD', + payload = fireblocks.models.end_investor_payload.EndInvestorPayload( + vault_account_id = '12', + asset = 'CANTON', + end_investor = 'investor-party::1220abc…', ) + ) + else: + return CantonCallEndInvestorOffboard( + type = 'DTCC_END_INVESTOR_OFFBOARD', + payload = fireblocks.models.end_investor_payload.EndInvestorPayload( + vault_account_id = '12', + asset = 'CANTON', + end_investor = 'investor-party::1220abc…', ), + ) + """ + + def testCantonCallEndInvestorOffboard(self): + """Test CantonCallEndInvestorOffboard""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_canton_call_participant_onboarding.py b/test/test_canton_call_participant_onboarding.py new file mode 100644 index 00000000..6dc74956 --- /dev/null +++ b/test/test_canton_call_participant_onboarding.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.canton_call_participant_onboarding import ( + CantonCallParticipantOnboarding, +) + + +class TestCantonCallParticipantOnboarding(unittest.TestCase): + """CantonCallParticipantOnboarding unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CantonCallParticipantOnboarding: + """Test CantonCallParticipantOnboarding + 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 `CantonCallParticipantOnboarding` + """ + model = CantonCallParticipantOnboarding() + if include_optional: + return CantonCallParticipantOnboarding( + type = 'DTCC_PARTICIPANT_ONBOARDING', + payload = fireblocks.models.participant_onboarding_payload.ParticipantOnboardingPayload( + vault_account_id = '12', + asset = 'CANTON', + expires_at = '2026-12-31T23:59:59Z', + operator = 'dtcc-operator::1220abc…', + provider = 'dtcc-provider::1220abc…', + compliance = 'dtcc-compliance::1220abc…', + registrar = 'dtcc-registrar::1220abc…', + client_onboarder = 'dtcc-onboarder::1220abc…', ) + ) + else: + return CantonCallParticipantOnboarding( + type = 'DTCC_PARTICIPANT_ONBOARDING', + payload = fireblocks.models.participant_onboarding_payload.ParticipantOnboardingPayload( + vault_account_id = '12', + asset = 'CANTON', + expires_at = '2026-12-31T23:59:59Z', + operator = 'dtcc-operator::1220abc…', + provider = 'dtcc-provider::1220abc…', + compliance = 'dtcc-compliance::1220abc…', + registrar = 'dtcc-registrar::1220abc…', + client_onboarder = 'dtcc-onboarder::1220abc…', ), + ) + """ + + def testCantonCallParticipantOnboarding(self): + """Test CantonCallParticipantOnboarding""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_canton_call_transfer_withdraw.py b/test/test_canton_call_transfer_withdraw.py new file mode 100644 index 00000000..4604078a --- /dev/null +++ b/test/test_canton_call_transfer_withdraw.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.canton_call_transfer_withdraw import CantonCallTransferWithdraw + + +class TestCantonCallTransferWithdraw(unittest.TestCase): + """CantonCallTransferWithdraw unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CantonCallTransferWithdraw: + """Test CantonCallTransferWithdraw + 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 `CantonCallTransferWithdraw` + """ + model = CantonCallTransferWithdraw() + if include_optional: + return CantonCallTransferWithdraw( + type = 'TRANSFER_WITHDRAW', + payload = fireblocks.models.transfer_withdraw_payload.TransferWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + offer_transaction_id = '2d47ae90-31bb-4f6c-8a17-7e0c5b9f2d63', ) + ) + else: + return CantonCallTransferWithdraw( + type = 'TRANSFER_WITHDRAW', + payload = fireblocks.models.transfer_withdraw_payload.TransferWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + offer_transaction_id = '2d47ae90-31bb-4f6c-8a17-7e0c5b9f2d63', ), + ) + """ + + def testCantonCallTransferWithdraw(self): + """Test CantonCallTransferWithdraw""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_create_webhook_o_auth_request.py b/test/test_create_webhook_o_auth_request.py new file mode 100644 index 00000000..db37aa48 --- /dev/null +++ b/test/test_create_webhook_o_auth_request.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.create_webhook_o_auth_request import CreateWebhookOAuthRequest + + +class TestCreateWebhookOAuthRequest(unittest.TestCase): + """CreateWebhookOAuthRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + 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` + """ + model = CreateWebhookOAuthRequest() + if include_optional: + return CreateWebhookOAuthRequest( + name = 'Production treasury gateway', + client_id = 'my-client-id', + client_secret = 'my-client-secret', + url = 'https://auth.example.com/oauth/token', + auth_method = 'client_secret_basic', + custom_jwt_claims = {"aud":"https://auth.example.com","email_verified":true}, + custom_body_params = {"scope":"payments.read payments.write"}, + custom_headers = {"x-api-key":"gateway-key"}, + mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- +... +-----END CERTIFICATE-----' + ) + else: + return CreateWebhookOAuthRequest( + name = 'Production treasury gateway', + client_id = 'my-client-id', + client_secret = 'my-client-secret', + url = 'https://auth.example.com/oauth/token', + ) + """ + + def testCreateWebhookOAuthRequest(self): + """Test CreateWebhookOAuthRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_create_webhook_request.py b/test/test_create_webhook_request.py index 7a2612b3..42848341 100644 --- a/test/test_create_webhook_request.py +++ b/test/test_create_webhook_request.py @@ -51,7 +51,7 @@ def make_instance(self, include_optional) -> CreateWebhookRequest: mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----', ), - custom_headers = {"X-Gateway-Key":"abc123","X-Region-Tag":"eu"} + custom_headers = {"X-Gateway-Key":"abc123","X-Region-Tag":"eu","X-Forwarded-For":["203.0.113.7","198.51.100.4"]} ) else: return CreateWebhookRequest( diff --git a/test/test_delete_webhook_o_auth_response.py b/test/test_delete_webhook_o_auth_response.py new file mode 100644 index 00000000..8488e42d --- /dev/null +++ b/test/test_delete_webhook_o_auth_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.delete_webhook_o_auth_response import DeleteWebhookOAuthResponse + + +class TestDeleteWebhookOAuthResponse(unittest.TestCase): + """DeleteWebhookOAuthResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + 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` + """ + model = DeleteWebhookOAuthResponse() + if include_optional: + return DeleteWebhookOAuthResponse( + id = '123e4567-e89b-12d3-a456-426614174000', + name = 'Production treasury gateway', + client_id = 'my-client-id', + url = 'https://auth.example.com/oauth/token', + auth_method = 'client_secret_basic', + custom_jwt_claims = [aud, resource], + custom_body_params = [scope], + custom_headers = [X-Api-Key], + mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- +... +-----END CERTIFICATE-----', + created_at = 1625097600000, + updated_at = 1625097600000, + detached_webhook_ids = ["44fcead0-7053-4831-a53a-df7fb90d440f"] + ) + else: + return DeleteWebhookOAuthResponse( + id = '123e4567-e89b-12d3-a456-426614174000', + name = 'Production treasury gateway', + client_id = 'my-client-id', + url = 'https://auth.example.com/oauth/token', + auth_method = 'client_secret_basic', + created_at = 1625097600000, + updated_at = 1625097600000, + detached_webhook_ids = ["44fcead0-7053-4831-a53a-df7fb90d440f"], + ) + """ + + def testDeleteWebhookOAuthResponse(self): + """Test DeleteWebhookOAuthResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_direct_access_response.py b/test/test_direct_access_response.py new file mode 100644 index 00000000..9c23e0ed --- /dev/null +++ b/test/test_direct_access_response.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.direct_access_response import DirectAccessResponse + + +class TestDirectAccessResponse(unittest.TestCase): + """DirectAccessResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DirectAccessResponse: + """Test DirectAccessResponse + 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 `DirectAccessResponse` + """ + model = DirectAccessResponse() + if include_optional: + return DirectAccessResponse( + type = 'PROVIDER', + provider_id = '', + sub_providers = [lifi-relay, uniswap-v3] + ) + else: + return DirectAccessResponse( + type = 'PROVIDER', + provider_id = '', + ) + """ + + def testDirectAccessResponse(self): + """Test DirectAccessResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_direct_access_response_info.py b/test/test_direct_access_response_info.py new file mode 100644 index 00000000..50028266 --- /dev/null +++ b/test/test_direct_access_response_info.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.direct_access_response_info import DirectAccessResponseInfo + + +class TestDirectAccessResponseInfo(unittest.TestCase): + """DirectAccessResponseInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DirectAccessResponseInfo: + """Test DirectAccessResponseInfo + 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 `DirectAccessResponseInfo` + """ + model = DirectAccessResponseInfo() + if include_optional: + return DirectAccessResponseInfo( + sub_providers = ["lifi-relay","uniswap-v3"] + ) + else: + return DirectAccessResponseInfo( + ) + """ + + def testDirectAccessResponseInfo(self): + """Test DirectAccessResponseInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_end_investor_payload.py b/test/test_end_investor_payload.py new file mode 100644 index 00000000..38473d5d --- /dev/null +++ b/test/test_end_investor_payload.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.end_investor_payload import EndInvestorPayload + + +class TestEndInvestorPayload(unittest.TestCase): + """EndInvestorPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndInvestorPayload: + """Test EndInvestorPayload + 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 `EndInvestorPayload` + """ + model = EndInvestorPayload() + if include_optional: + return EndInvestorPayload( + vault_account_id = '12', + asset = 'CANTON', + end_investor = 'investor-party::1220abc…' + ) + else: + return EndInvestorPayload( + vault_account_id = '12', + asset = 'CANTON', + end_investor = 'investor-party::1220abc…', + ) + """ + + def testEndInvestorPayload(self): + """Test EndInvestorPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_get_findings_external_response.py b/test/test_get_findings_external_response.py index 3a65cff4..534501cd 100644 --- a/test/test_get_findings_external_response.py +++ b/test/test_get_findings_external_response.py @@ -36,13 +36,13 @@ def make_instance(self, include_optional) -> GetFindingsExternalResponse: model = GetFindingsExternalResponse() if include_optional: return GetFindingsExternalResponse( - data = [], + data = [{"id":"d7ca3131-a35e-3a9c-36c1-38bd697e0cd2","status":"OPEN","severity":"HIGH","category":"USER_MANAGEMENT","createdAt":"2026-07-28T11:37:05.000Z","title":"The API user 'Admin API' is missing an IP allowlist"},{"id":"2f6a9c13-7b2d-4158-9a2f-6c3d8b4e0f37","status":"RESOLVED","severity":"HIGH","category":"USER_MANAGEMENT","createdAt":"2026-08-30T13:36:35.000Z","title":"The API user 'admin api callback' is paired with a co-signer and has no callback"}], total = 42, next = 'eyJzZXZlcml0eVJhbmsiOjMsImNyZWF0ZWRBdCI6IjIwMjYtMDctMTRUMTA6MDU6NTYuMDAwWiIsImlkIjoiYjJmZTkwYjItMWZlMy00ZTczLTg1YTItNjZlMTlmN2RhYzY2In0=' ) else: return GetFindingsExternalResponse( - data = [], + data = [{"id":"d7ca3131-a35e-3a9c-36c1-38bd697e0cd2","status":"OPEN","severity":"HIGH","category":"USER_MANAGEMENT","createdAt":"2026-07-28T11:37:05.000Z","title":"The API user 'Admin API' is missing an IP allowlist"},{"id":"2f6a9c13-7b2d-4158-9a2f-6c3d8b4e0f37","status":"RESOLVED","severity":"HIGH","category":"USER_MANAGEMENT","createdAt":"2026-08-30T13:36:35.000Z","title":"The API user 'admin api callback' is paired with a co-signer and has no callback"}], total = 42, ) """ diff --git a/test/test_list_approvals_response.py b/test/test_list_approvals_response.py new file mode 100644 index 00000000..0b09e2fb --- /dev/null +++ b/test/test_list_approvals_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.list_approvals_response import ListApprovalsResponse + + +class TestListApprovalsResponse(unittest.TestCase): + """ListApprovalsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListApprovalsResponse: + """Test ListApprovalsResponse + 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 `ListApprovalsResponse` + """ + model = ListApprovalsResponse() + if include_optional: + return ListApprovalsResponse( + data = [{"requestPayload":{"requestId":"ccr-1f2e3d4c","requestType":"ADD_USER","requestTimestamp":1750000000000,"expiresAt":1750600000,"requestData":{"type":"ADD_USER","creator":"user-1f2e3d4c","id":"ccr-1f2e3d4c"}},"userStatus":"USER_NOT_APPROVED"}], + next = 'cursor for the next page' + ) + else: + return ListApprovalsResponse( + data = [{"requestPayload":{"requestId":"ccr-1f2e3d4c","requestType":"ADD_USER","requestTimestamp":1750000000000,"expiresAt":1750600000,"requestData":{"type":"ADD_USER","creator":"user-1f2e3d4c","id":"ccr-1f2e3d4c"}},"userStatus":"USER_NOT_APPROVED"}], + ) + """ + + def testListApprovalsResponse(self): + """Test ListApprovalsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_list_utxos_response.py b/test/test_list_utxos_response.py index 1961ae7e..bd50711b 100644 --- a/test/test_list_utxos_response.py +++ b/test/test_list_utxos_response.py @@ -54,7 +54,8 @@ def make_instance(self, include_optional) -> ListUtxosResponse: created_by_height = 800100, created_at = '2025-01-16T15:45Z', updated_at = '2025-01-16T15:45Z', - labels = ["cold-storage","vip"], ) + labels = ["cold-storage","vip"], + has_native_assets = True, ) ], next = 'MjAyNS0wNy0wOSAxMDo1MzoxMy40NTI=:NA==' ) @@ -78,7 +79,8 @@ def make_instance(self, include_optional) -> ListUtxosResponse: created_by_height = 800100, created_at = '2025-01-16T15:45Z', updated_at = '2025-01-16T15:45Z', - labels = ["cold-storage","vip"], ) + labels = ["cold-storage","vip"], + has_native_assets = True, ) ], ) """ diff --git a/test/test_offer_response.py b/test/test_offer_response.py new file mode 100644 index 00000000..6019cc60 --- /dev/null +++ b/test/test_offer_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.offer_response import OfferResponse + + +class TestOfferResponse(unittest.TestCase): + """OfferResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OfferResponse: + """Test OfferResponse + 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 `OfferResponse` + """ + model = OfferResponse() + if include_optional: + return OfferResponse( + domain = 'TRANSFERS', + response = None + ) + else: + return OfferResponse( + domain = 'TRANSFERS', + response = None, + ) + """ + + def testOfferResponse(self): + """Test OfferResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_offer_response_accepted.py b/test/test_offer_response_accepted.py new file mode 100644 index 00000000..1bb2d096 --- /dev/null +++ b/test/test_offer_response_accepted.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.offer_response_accepted import OfferResponseAccepted + + +class TestOfferResponseAccepted(unittest.TestCase): + """OfferResponseAccepted unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OfferResponseAccepted: + """Test OfferResponseAccepted + 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 `OfferResponseAccepted` + """ + model = OfferResponseAccepted() + if include_optional: + return OfferResponseAccepted( + transaction_id = '5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21', + status = 'SUBMITTED', + response_type = 'DTCC_END_INVESTOR_ONBOARDING_REJECT' + ) + else: + return OfferResponseAccepted( + transaction_id = '5a1d8b0f-2c31-4c7e-9d0a-118e7b6c4a21', + status = 'SUBMITTED', + response_type = 'DTCC_END_INVESTOR_ONBOARDING_REJECT', + ) + """ + + def testOfferResponseAccepted(self): + """Test OfferResponseAccepted""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_offer_response_allocation.py b/test/test_offer_response_allocation.py new file mode 100644 index 00000000..bef81fd4 --- /dev/null +++ b/test/test_offer_response_allocation.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.offer_response_allocation import OfferResponseAllocation + + +class TestOfferResponseAllocation(unittest.TestCase): + """OfferResponseAllocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OfferResponseAllocation: + """Test OfferResponseAllocation + 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 `OfferResponseAllocation` + """ + model = OfferResponseAllocation() + if include_optional: + return OfferResponseAllocation( + domain = 'ALLOCATIONS', + response = None + ) + else: + return OfferResponseAllocation( + domain = 'ALLOCATIONS', + response = None, + ) + """ + + def testOfferResponseAllocation(self): + """Test OfferResponseAllocation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_offer_response_onboarding.py b/test/test_offer_response_onboarding.py new file mode 100644 index 00000000..f6f0ebb7 --- /dev/null +++ b/test/test_offer_response_onboarding.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.offer_response_onboarding import OfferResponseOnboarding + + +class TestOfferResponseOnboarding(unittest.TestCase): + """OfferResponseOnboarding unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OfferResponseOnboarding: + """Test OfferResponseOnboarding + 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 `OfferResponseOnboarding` + """ + model = OfferResponseOnboarding() + if include_optional: + return OfferResponseOnboarding( + domain = 'ONBOARDING', + response = None + ) + else: + return OfferResponseOnboarding( + domain = 'ONBOARDING', + response = None, + ) + """ + + def testOfferResponseOnboarding(self): + """Test OfferResponseOnboarding""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_offer_response_transfer.py b/test/test_offer_response_transfer.py new file mode 100644 index 00000000..8161f9b5 --- /dev/null +++ b/test/test_offer_response_transfer.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.offer_response_transfer import OfferResponseTransfer + + +class TestOfferResponseTransfer(unittest.TestCase): + """OfferResponseTransfer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OfferResponseTransfer: + """Test OfferResponseTransfer + 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 `OfferResponseTransfer` + """ + model = OfferResponseTransfer() + if include_optional: + return OfferResponseTransfer( + domain = 'TRANSFERS', + response = None + ) + else: + return OfferResponseTransfer( + domain = 'TRANSFERS', + response = None, + ) + """ + + def testOfferResponseTransfer(self): + """Test OfferResponseTransfer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_onboarding_response.py b/test/test_onboarding_response.py new file mode 100644 index 00000000..4a0ecd0f --- /dev/null +++ b/test/test_onboarding_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.onboarding_response import OnboardingResponse + + +class TestOnboardingResponse(unittest.TestCase): + """OnboardingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OnboardingResponse: + """Test OnboardingResponse + 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 `OnboardingResponse` + """ + model = OnboardingResponse() + if include_optional: + return OnboardingResponse( + response_type = 'TRADEWEB_COSIGNING_DELEGATION_REJECT', + reason = 'KYC not completed' + ) + else: + return OnboardingResponse( + response_type = 'TRADEWEB_COSIGNING_DELEGATION_REJECT', + reason = 'KYC not completed', + ) + """ + + def testOnboardingResponse(self): + """Test OnboardingResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_onboarding_response_dtcc_accept.py b/test/test_onboarding_response_dtcc_accept.py new file mode 100644 index 00000000..49924e9f --- /dev/null +++ b/test/test_onboarding_response_dtcc_accept.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.onboarding_response_dtcc_accept import ( + OnboardingResponseDtccAccept, +) + + +class TestOnboardingResponseDtccAccept(unittest.TestCase): + """OnboardingResponseDtccAccept unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OnboardingResponseDtccAccept: + """Test OnboardingResponseDtccAccept + 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 `OnboardingResponseDtccAccept` + """ + model = OnboardingResponseDtccAccept() + if include_optional: + return OnboardingResponseDtccAccept( + response_type = 'DTCC_END_INVESTOR_ONBOARDING_ACCEPT' + ) + else: + return OnboardingResponseDtccAccept( + response_type = 'DTCC_END_INVESTOR_ONBOARDING_ACCEPT', + ) + """ + + def testOnboardingResponseDtccAccept(self): + """Test OnboardingResponseDtccAccept""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_onboarding_response_dtcc_reject.py b/test/test_onboarding_response_dtcc_reject.py new file mode 100644 index 00000000..e75d2be3 --- /dev/null +++ b/test/test_onboarding_response_dtcc_reject.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.onboarding_response_dtcc_reject import ( + OnboardingResponseDtccReject, +) + + +class TestOnboardingResponseDtccReject(unittest.TestCase): + """OnboardingResponseDtccReject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OnboardingResponseDtccReject: + """Test OnboardingResponseDtccReject + 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 `OnboardingResponseDtccReject` + """ + model = OnboardingResponseDtccReject() + if include_optional: + return OnboardingResponseDtccReject( + response_type = 'DTCC_END_INVESTOR_ONBOARDING_REJECT', + reason = 'KYC not completed' + ) + else: + return OnboardingResponseDtccReject( + response_type = 'DTCC_END_INVESTOR_ONBOARDING_REJECT', + reason = 'KYC not completed', + ) + """ + + def testOnboardingResponseDtccReject(self): + """Test OnboardingResponseDtccReject""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_onboarding_response_tradeweb_accept.py b/test/test_onboarding_response_tradeweb_accept.py new file mode 100644 index 00000000..32b75b94 --- /dev/null +++ b/test/test_onboarding_response_tradeweb_accept.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.onboarding_response_tradeweb_accept import ( + OnboardingResponseTradewebAccept, +) + + +class TestOnboardingResponseTradewebAccept(unittest.TestCase): + """OnboardingResponseTradewebAccept unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OnboardingResponseTradewebAccept: + """Test OnboardingResponseTradewebAccept + 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 `OnboardingResponseTradewebAccept` + """ + model = OnboardingResponseTradewebAccept() + if include_optional: + return OnboardingResponseTradewebAccept( + response_type = 'TRADEWEB_COSIGNING_DELEGATION_ACCEPT' + ) + else: + return OnboardingResponseTradewebAccept( + response_type = 'TRADEWEB_COSIGNING_DELEGATION_ACCEPT', + ) + """ + + def testOnboardingResponseTradewebAccept(self): + """Test OnboardingResponseTradewebAccept""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_onboarding_response_tradeweb_reject.py b/test/test_onboarding_response_tradeweb_reject.py new file mode 100644 index 00000000..564802c1 --- /dev/null +++ b/test/test_onboarding_response_tradeweb_reject.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.onboarding_response_tradeweb_reject import ( + OnboardingResponseTradewebReject, +) + + +class TestOnboardingResponseTradewebReject(unittest.TestCase): + """OnboardingResponseTradewebReject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OnboardingResponseTradewebReject: + """Test OnboardingResponseTradewebReject + 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 `OnboardingResponseTradewebReject` + """ + model = OnboardingResponseTradewebReject() + if include_optional: + return OnboardingResponseTradewebReject( + response_type = 'TRADEWEB_COSIGNING_DELEGATION_REJECT' + ) + else: + return OnboardingResponseTradewebReject( + response_type = 'TRADEWEB_COSIGNING_DELEGATION_REJECT', + ) + """ + + def testOnboardingResponseTradewebReject(self): + """Test OnboardingResponseTradewebReject""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_participant_onboarding_payload.py b/test/test_participant_onboarding_payload.py new file mode 100644 index 00000000..e69da056 --- /dev/null +++ b/test/test_participant_onboarding_payload.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.participant_onboarding_payload import ( + ParticipantOnboardingPayload, +) + + +class TestParticipantOnboardingPayload(unittest.TestCase): + """ParticipantOnboardingPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ParticipantOnboardingPayload: + """Test ParticipantOnboardingPayload + 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 `ParticipantOnboardingPayload` + """ + model = ParticipantOnboardingPayload() + if include_optional: + return ParticipantOnboardingPayload( + vault_account_id = '12', + asset = 'CANTON', + expires_at = '2026-12-31T23:59:59Z', + operator = 'dtcc-operator::1220abc…', + provider = 'dtcc-provider::1220abc…', + compliance = 'dtcc-compliance::1220abc…', + registrar = 'dtcc-registrar::1220abc…', + client_onboarder = 'dtcc-onboarder::1220abc…' + ) + else: + return ParticipantOnboardingPayload( + vault_account_id = '12', + asset = 'CANTON', + operator = 'dtcc-operator::1220abc…', + provider = 'dtcc-provider::1220abc…', + compliance = 'dtcc-compliance::1220abc…', + registrar = 'dtcc-registrar::1220abc…', + client_onboarder = 'dtcc-onboarder::1220abc…', + ) + """ + + def testParticipantOnboardingPayload(self): + """Test ParticipantOnboardingPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_position_related_transaction.py b/test/test_position_related_transaction.py index 53f6fb27..93575e67 100644 --- a/test/test_position_related_transaction.py +++ b/test/test_position_related_transaction.py @@ -42,7 +42,8 @@ def make_instance(self, include_optional) -> PositionRelatedTransaction: timestamp = '2024-01-15T10:30Z', status = 'COMPLETED', amount = '32', - tx_note = 'stake request of 32ETH created on 02.04.23' + tx_note = 'stake request of 32ETH created on 02.04.23', + completion_time = '2026-08-09T03:05:06.122864244Z' ) else: return PositionRelatedTransaction( diff --git a/test/test_quorum_approval_state.py b/test/test_quorum_approval_state.py new file mode 100644 index 00000000..b4dcab0a --- /dev/null +++ b/test/test_quorum_approval_state.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.quorum_approval_state import QuorumApprovalState + + +class TestQuorumApprovalState(unittest.TestCase): + """QuorumApprovalState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testQuorumApprovalState(self): + """Test QuorumApprovalState""" + # inst = QuorumApprovalState() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_quorum_group.py b/test/test_quorum_group.py new file mode 100644 index 00000000..bd24568d --- /dev/null +++ b/test/test_quorum_group.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.quorum_group import QuorumGroup + + +class TestQuorumGroup(unittest.TestCase): + """QuorumGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuorumGroup: + """Test QuorumGroup + 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 `QuorumGroup` + """ + model = QuorumGroup() + if include_optional: + return QuorumGroup( + threshold = 2, + current_approval_count = 1, + status = 'PENDING', + members = [0,1] + ) + else: + return QuorumGroup( + threshold = 2, + current_approval_count = 1, + status = 'PENDING', + ) + """ + + def testQuorumGroup(self): + """Test QuorumGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_quorum_request_state.py b/test/test_quorum_request_state.py new file mode 100644 index 00000000..6873a642 --- /dev/null +++ b/test/test_quorum_request_state.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.quorum_request_state import QuorumRequestState + + +class TestQuorumRequestState(unittest.TestCase): + """QuorumRequestState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testQuorumRequestState(self): + """Test QuorumRequestState""" + # inst = QuorumRequestState() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_quorum_ruleset.py b/test/test_quorum_ruleset.py new file mode 100644 index 00000000..cdb816fa --- /dev/null +++ b/test/test_quorum_ruleset.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.quorum_ruleset import QuorumRuleset + + +class TestQuorumRuleset(unittest.TestCase): + """QuorumRuleset unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuorumRuleset: + """Test QuorumRuleset + 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 `QuorumRuleset` + """ + model = QuorumRuleset() + if include_optional: + return QuorumRuleset( + group_match = 'ALL', + status = 'PENDING', + groups = [{"threshold":1,"currentApprovalCount":1,"status":"APPROVED"},{"threshold":2,"currentApprovalCount":1,"status":"PENDING"}] + ) + else: + return QuorumRuleset( + group_match = 'ALL', + status = 'PENDING', + groups = [{"threshold":1,"currentApprovalCount":1,"status":"APPROVED"},{"threshold":2,"currentApprovalCount":1,"status":"PENDING"}], + ) + """ + + def testQuorumRuleset(self): + """Test QuorumRuleset""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_quorum_status.py b/test/test_quorum_status.py new file mode 100644 index 00000000..fc42a5de --- /dev/null +++ b/test/test_quorum_status.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.quorum_status import QuorumStatus + + +class TestQuorumStatus(unittest.TestCase): + """QuorumStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuorumStatus: + """Test QuorumStatus + 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 `QuorumStatus` + """ + model = QuorumStatus() + if include_optional: + return QuorumStatus( + request_status = 'PENDING', + users = [{"index":0,"userId":"6073c3d2-9f4b-4c1a-8f7d-2b1e5a9c4d80","status":"APPROVED"},{"index":1,"userId":"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d","status":"PENDING","isMandatoryOwner":true}], + quorum = {"type":"SIMPLE","threshold":2,"currentApprovalCount":1,"status":"PENDING","isMandatoryOwnerApproved":false,"members":[0,1]} + ) + else: + return QuorumStatus( + request_status = 'PENDING', + quorum = {"type":"SIMPLE","threshold":2,"currentApprovalCount":1,"status":"PENDING","isMandatoryOwnerApproved":false,"members":[0,1]}, + ) + """ + + def testQuorumStatus(self): + """Test QuorumStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_quorum_status_quorum.py b/test/test_quorum_status_quorum.py new file mode 100644 index 00000000..9e410817 --- /dev/null +++ b/test/test_quorum_status_quorum.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.quorum_status_quorum import QuorumStatusQuorum + + +class TestQuorumStatusQuorum(unittest.TestCase): + """QuorumStatusQuorum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuorumStatusQuorum: + """Test QuorumStatusQuorum + 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 `QuorumStatusQuorum` + """ + model = QuorumStatusQuorum() + if include_optional: + return QuorumStatusQuorum( + type = 'SIMPLE', + threshold = 2, + current_approval_count = 1, + status = 'PENDING', + is_mandatory_owner_approved = False, + members = [0, 1], + ruleset_match = 'ALL', + rulesets = [{groupMatch=ALL, status=PENDING, groups=[{threshold=1, currentApprovalCount=1, status=APPROVED}, {threshold=2, currentApprovalCount=1, status=PENDING}]}] + ) + else: + return QuorumStatusQuorum( + type = 'SIMPLE', + threshold = 2, + current_approval_count = 1, + status = 'PENDING', + ruleset_match = 'ALL', + rulesets = [{groupMatch=ALL, status=PENDING, groups=[{threshold=1, currentApprovalCount=1, status=APPROVED}, {threshold=2, currentApprovalCount=1, status=PENDING}]}], + ) + """ + + def testQuorumStatusQuorum(self): + """Test QuorumStatusQuorum""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_quorum_user.py b/test/test_quorum_user.py new file mode 100644 index 00000000..309012b4 --- /dev/null +++ b/test/test_quorum_user.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.quorum_user import QuorumUser + + +class TestQuorumUser(unittest.TestCase): + """QuorumUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuorumUser: + """Test QuorumUser + 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 `QuorumUser` + """ + model = QuorumUser() + if include_optional: + return QuorumUser( + index = 0, + user_id = '6073c3d2-9f4b-4c1a-8f7d-2b1e5a9c4d80', + status = 'PENDING', + is_mandatory_owner = True + ) + else: + return QuorumUser( + index = 0, + user_id = '6073c3d2-9f4b-4c1a-8f7d-2b1e5a9c4d80', + status = 'PENDING', + ) + """ + + def testQuorumUser(self): + """Test QuorumUser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_ruleset_quorum.py b/test/test_ruleset_quorum.py new file mode 100644 index 00000000..428bfd9c --- /dev/null +++ b/test/test_ruleset_quorum.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.ruleset_quorum import RulesetQuorum + + +class TestRulesetQuorum(unittest.TestCase): + """RulesetQuorum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RulesetQuorum: + """Test RulesetQuorum + 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 `RulesetQuorum` + """ + model = RulesetQuorum() + if include_optional: + return RulesetQuorum( + type = 'RULESET', + ruleset_match = 'ALL', + status = 'PENDING', + is_mandatory_owner_approved = False, + rulesets = [{"groupMatch":"ALL","status":"PENDING","groups":[{"threshold":1,"currentApprovalCount":1,"status":"APPROVED"},{"threshold":2,"currentApprovalCount":1,"status":"PENDING"}]}] + ) + else: + return RulesetQuorum( + type = 'RULESET', + ruleset_match = 'ALL', + status = 'PENDING', + rulesets = [{"groupMatch":"ALL","status":"PENDING","groups":[{"threshold":1,"currentApprovalCount":1,"status":"APPROVED"},{"threshold":2,"currentApprovalCount":1,"status":"PENDING"}]}], + ) + """ + + def testRulesetQuorum(self): + """Test RulesetQuorum""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_security_finding_detailed.py b/test/test_security_finding_detailed.py index 7fac96eb..5ce8684f 100644 --- a/test/test_security_finding_detailed.py +++ b/test/test_security_finding_detailed.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> SecurityFindingDetailed: if include_optional: return SecurityFindingDetailed( id = '2f8a132e-623d-3a97-841f-2c5d9b7a3e60', - status = 'OPEN', + status = 'ACCEPTED', severity = 'MEDIUM', category = 'USER_MANAGEMENT', created_at = '2026-07-21T07:49:28Z', @@ -46,20 +46,20 @@ def make_instance(self, include_optional) -> SecurityFindingDetailed: status_updated_by_user_id = '7c2e3a4f-144d-4f23-932c-518b3d7f1a09', status_updated_reason = 'False positive, the API user only ever connects from a fixed, trusted network', info = {"id":"2a6f3c4e-9d33-437e-8f2a-2c9b4d3e1f35","createdAt":"2026-05-12T12:06:26.242Z","email":"","enabled":true,"firstName":"Admin API","isWhitelisted":false,"lastName":"testd6","role":"ADMIN","status":"READY","tenantId":"6d13843c-4e2b-4a22-2c6f-3b8e3d4a7f52","userType":"API"}, - compliance_reqs = [], + compliance_reqs = [{"id":"8a1e6f19-1c4b-2d7e-2f1a-2b6c8d2e4f50","standard":"SOC 2","criteria":"CC6.2","description":"Access provisioning and credential lifecycle"},{"id":"5e2b8e47-ea9c-ef36-8e2d-ea4b9c3e6f18","standard":"SOC 2","criteria":"CC6.3","description":"Least privilege and attack surface, roles and SoD"}], risk_explanation = 'This API user has no IP allowlist, so it can be accessed from anywhere, increasing the risk of unauthorized activity.', mitigation_guidance = 'Go to Developer Center > API Users, click the actions button (3 dots) next to the API user, and select 'Allowlist IP address'.' ) else: return SecurityFindingDetailed( id = '2f8a132e-623d-3a97-841f-2c5d9b7a3e60', - status = 'OPEN', + status = 'ACCEPTED', severity = 'MEDIUM', category = 'USER_MANAGEMENT', created_at = '2026-07-21T07:49:28Z', title = 'The API user 'Admin API' is missing an IP allowlist', info = {"id":"2a6f3c4e-9d33-437e-8f2a-2c9b4d3e1f35","createdAt":"2026-05-12T12:06:26.242Z","email":"","enabled":true,"firstName":"Admin API","isWhitelisted":false,"lastName":"testd6","role":"ADMIN","status":"READY","tenantId":"6d13843c-4e2b-4a22-2c6f-3b8e3d4a7f52","userType":"API"}, - compliance_reqs = [], + compliance_reqs = [{"id":"8a1e6f19-1c4b-2d7e-2f1a-2b6c8d2e4f50","standard":"SOC 2","criteria":"CC6.2","description":"Access provisioning and credential lifecycle"},{"id":"5e2b8e47-ea9c-ef36-8e2d-ea4b9c3e6f18","standard":"SOC 2","criteria":"CC6.3","description":"Least privilege and attack surface, roles and SoD"}], risk_explanation = 'This API user has no IP allowlist, so it can be accessed from anywhere, increasing the risk of unauthorized activity.', mitigation_guidance = 'Go to Developer Center > API Users, click the actions button (3 dots) next to the API user, and select 'Allowlist IP address'.', ) diff --git a/test/test_simple_quorum.py b/test/test_simple_quorum.py new file mode 100644 index 00000000..adb8441f --- /dev/null +++ b/test/test_simple_quorum.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.simple_quorum import SimpleQuorum + + +class TestSimpleQuorum(unittest.TestCase): + """SimpleQuorum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleQuorum: + """Test SimpleQuorum + 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 `SimpleQuorum` + """ + model = SimpleQuorum() + if include_optional: + return SimpleQuorum( + type = 'SIMPLE', + threshold = 2, + current_approval_count = 1, + status = 'PENDING', + is_mandatory_owner_approved = False, + members = [0,1] + ) + else: + return SimpleQuorum( + type = 'SIMPLE', + threshold = 2, + current_approval_count = 1, + status = 'PENDING', + ) + """ + + def testSimpleQuorum(self): + """Test SimpleQuorum""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_transaction_response.py b/test/test_transaction_response.py index f0c0d1a8..9d0696d3 100644 --- a/test/test_transaction_response.py +++ b/test/test_transaction_response.py @@ -144,6 +144,7 @@ def make_instance(self, include_optional) -> TransactionResponse: relay_name = 'Tenant Name', fee_usd = '0.0013', ), fee_currency = '', + requested_fee_currency = 'PATH_USD', network_records = [ fireblocks.models.network_record.NetworkRecord( source = fireblocks.models.source_transfer_peer_path_response.SourceTransferPeerPathResponse( diff --git a/test/test_transfer_response.py b/test/test_transfer_response.py new file mode 100644 index 00000000..9c48ad0a --- /dev/null +++ b/test/test_transfer_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.transfer_response import TransferResponse + + +class TestTransferResponse(unittest.TestCase): + """TransferResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TransferResponse: + """Test TransferResponse + 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 `TransferResponse` + """ + model = TransferResponse() + if include_optional: + return TransferResponse( + response_type = 'TRANSFER_REJECT' + ) + else: + return TransferResponse( + response_type = 'TRANSFER_REJECT', + ) + """ + + def testTransferResponse(self): + """Test TransferResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_transfer_response_accept.py b/test/test_transfer_response_accept.py new file mode 100644 index 00000000..71d30a7d --- /dev/null +++ b/test/test_transfer_response_accept.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.transfer_response_accept import TransferResponseAccept + + +class TestTransferResponseAccept(unittest.TestCase): + """TransferResponseAccept unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TransferResponseAccept: + """Test TransferResponseAccept + 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 `TransferResponseAccept` + """ + model = TransferResponseAccept() + if include_optional: + return TransferResponseAccept( + response_type = 'TRANSFER_ACCEPT' + ) + else: + return TransferResponseAccept( + response_type = 'TRANSFER_ACCEPT', + ) + """ + + def testTransferResponseAccept(self): + """Test TransferResponseAccept""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_transfer_response_reject.py b/test/test_transfer_response_reject.py new file mode 100644 index 00000000..7800112a --- /dev/null +++ b/test/test_transfer_response_reject.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.transfer_response_reject import TransferResponseReject + + +class TestTransferResponseReject(unittest.TestCase): + """TransferResponseReject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TransferResponseReject: + """Test TransferResponseReject + 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 `TransferResponseReject` + """ + model = TransferResponseReject() + if include_optional: + return TransferResponseReject( + response_type = 'TRANSFER_REJECT' + ) + else: + return TransferResponseReject( + response_type = 'TRANSFER_REJECT', + ) + """ + + def testTransferResponseReject(self): + """Test TransferResponseReject""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_transfer_withdraw_payload.py b/test/test_transfer_withdraw_payload.py new file mode 100644 index 00000000..0741c556 --- /dev/null +++ b/test/test_transfer_withdraw_payload.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.transfer_withdraw_payload import TransferWithdrawPayload + + +class TestTransferWithdrawPayload(unittest.TestCase): + """TransferWithdrawPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TransferWithdrawPayload: + """Test TransferWithdrawPayload + 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 `TransferWithdrawPayload` + """ + model = TransferWithdrawPayload() + if include_optional: + return TransferWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + offer_transaction_id = '2d47ae90-31bb-4f6c-8a17-7e0c5b9f2d63' + ) + else: + return TransferWithdrawPayload( + vault_account_id = '12', + asset = 'CANTON', + offer_transaction_id = '2d47ae90-31bb-4f6c-8a17-7e0c5b9f2d63', + ) + """ + + def testTransferWithdrawPayload(self): + """Test TransferWithdrawPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_webhook_o_auth_request.py b/test/test_update_webhook_o_auth_request.py new file mode 100644 index 00000000..09f3c2da --- /dev/null +++ b/test/test_update_webhook_o_auth_request.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.update_webhook_o_auth_request import UpdateWebhookOAuthRequest + + +class TestUpdateWebhookOAuthRequest(unittest.TestCase): + """UpdateWebhookOAuthRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + 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` + """ + model = UpdateWebhookOAuthRequest() + if include_optional: + return UpdateWebhookOAuthRequest( + name = 'Production treasury gateway', + client_id = 'my-client-id', + client_secret = 'my-new-client-secret', + url = 'https://auth.example.com/oauth/token', + auth_method = 'client_secret_jwt', + custom_jwt_claims = {"aud":"https://auth.example.com","resource":null}, + custom_body_params = {"scope":"payments.read payments.write","audience":null}, + custom_headers = {"x-api-key":"gateway-key","x-tenant":null}, + mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- +... +-----END CERTIFICATE-----' + ) + else: + return 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) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_webhook_request.py b/test/test_update_webhook_request.py index 81bd152f..a4df7fac 100644 --- a/test/test_update_webhook_request.py +++ b/test/test_update_webhook_request.py @@ -51,7 +51,7 @@ def make_instance(self, include_optional) -> UpdateWebhookRequest: mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----', ), - custom_headers = {"X-Gateway-Key":"abc123","X-Region-Tag":null} + custom_headers = {"X-Gateway-Key":"abc123","X-Forwarded-For":["203.0.113.7","198.51.100.4"],"X-Region-Tag":null} ) else: return UpdateWebhookRequest( diff --git a/test/test_utxo_output.py b/test/test_utxo_output.py index 7ded1c41..b478c82c 100644 --- a/test/test_utxo_output.py +++ b/test/test_utxo_output.py @@ -52,7 +52,8 @@ def make_instance(self, include_optional) -> UtxoOutput: created_by_height = 800100, created_at = '2025-01-16T15:45Z', updated_at = '2025-01-16T15:45Z', - labels = ["cold-storage","vip"] + labels = ["cold-storage","vip"], + has_native_assets = True ) else: return UtxoOutput( diff --git a/test/test_webhook_o_auth_credentials.py b/test/test_webhook_o_auth_credentials.py new file mode 100644 index 00000000..295b26d9 --- /dev/null +++ b/test/test_webhook_o_auth_credentials.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.webhook_o_auth_credentials import WebhookOAuthCredentials + + +class TestWebhookOAuthCredentials(unittest.TestCase): + """WebhookOAuthCredentials unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + 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` + """ + model = WebhookOAuthCredentials() + if include_optional: + return WebhookOAuthCredentials( + id = '123e4567-e89b-12d3-a456-426614174000', + name = 'Production treasury gateway', + client_id = 'my-client-id', + url = 'https://auth.example.com/oauth/token', + auth_method = 'client_secret_basic', + custom_jwt_claims = ["aud","resource"], + custom_body_params = ["scope"], + custom_headers = ["X-Api-Key"], + mtls_client_signed_cert = '-----BEGIN CERTIFICATE----- +... +-----END CERTIFICATE-----', + created_at = 1625097600000, + updated_at = 1625097600000 + ) + else: + return WebhookOAuthCredentials( + id = '123e4567-e89b-12d3-a456-426614174000', + name = 'Production treasury gateway', + client_id = 'my-client-id', + url = 'https://auth.example.com/oauth/token', + auth_method = 'client_secret_basic', + created_at = 1625097600000, + updated_at = 1625097600000, + ) + """ + + def testWebhookOAuthCredentials(self): + """Test WebhookOAuthCredentials""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_webhooks_v2_api.py b/test/test_webhooks_v2_api.py index 1f85e29f..766b7fd6 100644 --- a/test/test_webhooks_v2_api.py +++ b/test/test_webhooks_v2_api.py @@ -33,6 +33,13 @@ def test_create_webhook(self) -> None: """ pass + def test_create_webhook_o_auth(self) -> None: + """Test case for create_webhook_o_auth + + Create OAuth credentials + """ + pass + def test_delete_webhook(self) -> None: """Test case for delete_webhook @@ -40,6 +47,13 @@ def test_delete_webhook(self) -> None: """ pass + def test_delete_webhook_o_auth(self) -> None: + """Test case for delete_webhook_o_auth + + Delete OAuth credentials + """ + pass + def test_get_metrics(self) -> None: """Test case for get_metrics @@ -96,6 +110,20 @@ def test_get_webhook(self) -> None: """ pass + def test_get_webhook_o_auth(self) -> None: + """Test case for get_webhook_o_auth + + Get OAuth credentials by id + """ + pass + + def test_get_webhook_o_auths(self) -> None: + """Test case for get_webhook_o_auths + + Get all OAuth credentials + """ + pass + def test_get_webhooks(self) -> None: """Test case for get_webhooks @@ -138,6 +166,13 @@ def test_update_webhook(self) -> None: """ pass + def test_update_webhook_o_auth(self) -> None: + """Test case for update_webhook_o_auth + + Update OAuth credentials + """ + pass + if __name__ == "__main__": unittest.main()