From b949cdc7f2fef5e9a4f9ba7f9594fcbf1dc7ed8a Mon Sep 17 00:00:00 2001 From: Ethan Konkolowicz Date: Wed, 3 Jun 2026 13:53:57 -0400 Subject: [PATCH] chore: release for v2026.6.0 Mono API --- CHANGELOG.md | 5 + turnkey_client/lib/turnkey_client.rb | 122 + .../lib/turnkey_client/api/default_api.rb | 46 + .../turnkey_client/api/ip_allowlist_api.rb | 193 + .../turnkey_client/api/organizations_api.rb | 290 + .../lib/turnkey_client/api/signing_api.rb | 232 + .../lib/turnkey_client/api/tvc_api.rb | 773 + .../lib/turnkey_client/api/wallets_api.rb | 8 +- .../lib/turnkey_client/configuration.rb | 7 + .../models/activate_billing_tier_intent.rb | 18 +- .../turnkey_client/models/activity_type.rb | 21 + .../turnkey_client/models/address_format.rb | 2 + .../lib/turnkey_client/models/app_status.rb | 243 + .../lib/turnkey_client/models/boot_proof.rb | 23 +- .../create_oauth_providers_intent_v2.rb | 228 + .../models/create_oauth_providers_request.rb | 4 +- .../create_oauth_providers_result_v2.rb | 213 + .../create_read_write_session_intent_v2.rb | 2 +- .../create_sub_organization_intent_v8.rb | 316 + .../models/create_sub_organization_request.rb | 4 +- .../create_sub_organization_result_v8.rb | 230 + .../models/create_tvc_app_intent.rb | 18 +- .../models/create_tvc_app_request.rb | 288 + .../models/create_tvc_deployment_intent.rb | 93 +- .../models/create_tvc_deployment_request.rb | 288 + .../create_tvc_manifest_approvals_request.rb | 288 + .../models/create_users_intent_v4.rb | 213 + .../models/create_users_request.rb | 4 +- .../models/create_webhook_endpoint_intent.rb | 238 + .../models/create_webhook_endpoint_request.rb | 298 + .../models/create_webhook_endpoint_result.rb | 225 + .../delete_tvc_app_and_deployments_intent.rb | 211 + .../delete_tvc_app_and_deployments_request.rb | 298 + .../delete_tvc_app_and_deployments_result.rb | 211 + .../models/delete_tvc_deployment_intent.rb | 211 + .../models/delete_tvc_deployment_request.rb | 298 + .../models/delete_tvc_deployment_result.rb | 211 + .../models/delete_webhook_endpoint_intent.rb | 211 + .../models/delete_webhook_endpoint_request.rb | 298 + .../models/delete_webhook_endpoint_result.rb | 211 + .../models/deployment_status.rb | 255 + .../models/eth_failure_details.rb | 208 + .../models/eth_send_transaction_intent.rb | 13 +- .../lib/turnkey_client/models/feature_name.rb | 1 + .../models/get_app_status_request.rb | 226 + .../models/get_app_status_response.rb | 210 + .../models/get_ip_allowlist_request.rb | 222 + .../models/get_ip_allowlist_response.rb | 210 + .../get_send_transaction_status_response.rb | 11 +- .../models/get_tvc_app_deployments_request.rb | 226 + .../get_tvc_app_deployments_response.rb | 213 + .../models/get_tvc_app_request.rb | 226 + .../models/get_tvc_app_response.rb | 210 + .../models/get_tvc_apps_request.rb | 211 + .../models/get_tvc_apps_response.rb | 213 + .../models/get_tvc_deployment_request.rb | 226 + .../models/get_tvc_deployment_response.rb | 210 + .../get_wallet_address_balances_request.rb | 8 +- .../models/init_otp_auth_intent.rb | 2 +- .../models/init_otp_auth_intent_v2.rb | 2 +- .../models/init_otp_intent_v3.rb | 336 + .../turnkey_client/models/init_otp_request.rb | 4 +- .../models/init_otp_result_v2.rb | 226 + .../lib/turnkey_client/models/intent.rb | 197 +- .../lib/turnkey_client/models/ip_allowlist.rb | 261 + .../models/ip_allowlist_intent_rule.rb | 222 + .../models/ip_allowlist_rule.rb | 232 + .../models/list_supported_assets_request.rb | 6 +- .../models/list_webhook_endpoints_request.rb | 211 + .../models/list_webhook_endpoints_response.rb | 212 + .../lib/turnkey_client/models/login_usage.rb | 211 + .../models/noop_codegen_anchor_response.rb | 219 + .../models/oauth2_authenticate_intent.rb | 8 +- .../models/oauth_provider_params_v2.rb | 230 + .../lib/turnkey_client/models/oidc_claims.rb | 241 + .../models/otp_login_intent_v2.rb | 262 + .../models/otp_login_request.rb | 4 +- .../post_tvc_quorum_key_share_intent.rb | 240 + .../post_tvc_quorum_key_share_result.rb | 211 + .../quorum_key_share_approval_bundle.rb | 241 + .../models/remove_ip_allowlist_intent.rb | 207 + .../models/remove_ip_allowlist_request.rb | 298 + .../models/remove_ip_allowlist_result.rb | 196 + .../models/restore_tvc_deployment_intent.rb | 211 + .../models/restore_tvc_deployment_request.rb | 298 + .../models/restore_tvc_deployment_result.rb | 211 + .../lib/turnkey_client/models/result.rb | 170 +- .../models/root_user_params_v5.rb | 284 + .../models/set_ip_allowlist_intent.rb | 241 + .../models/set_ip_allowlist_request.rb | 298 + .../models/set_ip_allowlist_result.rb | 196 + .../lib/turnkey_client/models/signup_usage.rb | 249 + .../turnkey_client/models/signup_usage_v2.rb | 249 + .../models/sol_send_transaction_intent.rb | 6 +- .../turnkey_client/models/solana_config.rb | 207 + .../models/solana_failure_details.rb | 273 + .../models/solana_send_transaction_status.rb | 207 + .../turnkey_client/models/spark_claim_leaf.rb | 241 + .../models/spark_claim_package.rb | 275 + .../models/spark_claim_transfer_intent.rb | 225 + .../models/spark_claim_transfer_request.rb | 288 + .../models/spark_claim_transfer_result.rb | 230 + .../models/spark_deposit_derivation.rb | 196 + .../spark_encrypted_operator_package.rb | 226 + .../models/spark_frost_commitment.rb | 241 + .../models/spark_htlc_preimage_derivation.rb | 196 + .../models/spark_identity_derivation.rb | 196 + .../models/spark_key_derivation.rb | 241 + .../models/spark_leaf_public_key.rb | 226 + .../models/spark_lightning_receive_package.rb | 228 + .../models/spark_operator_recipient.rb | 226 + .../models/spark_partial_signature.rb | 241 + .../spark_prepare_lightning_receive_intent.rb | 225 + ...spark_prepare_lightning_receive_request.rb | 288 + .../spark_prepare_lightning_receive_result.rb | 228 + .../models/spark_prepare_transfer_intent.rb | 225 + .../models/spark_prepare_transfer_request.rb | 288 + .../models/spark_prepare_transfer_result.rb | 245 + .../models/spark_sign_frost_intent.rb | 228 + .../models/spark_sign_frost_request.rb | 288 + .../models/spark_sign_frost_result.rb | 213 + .../models/spark_signature_request.rb | 268 + .../models/spark_signing_leaf_derivation.rb | 211 + .../models/spark_static_deposit_derivation.rb | 211 + .../models/spark_transfer_leaf.rb | 272 + .../models/spark_transfer_package.rb | 275 + .../lib/turnkey_client/models/token_usage.rb | 252 + .../lib/turnkey_client/models/tvc_app.rb | 353 + .../models/tvc_container_spec.rb | 302 + .../turnkey_client/models/tvc_deployment.rb | 372 + .../models/tvc_health_check_type.rb | 27 + .../lib/turnkey_client/models/tvc_manifest.rb | 254 + .../lib/turnkey_client/models/tvc_operator.rb | 269 + .../models/tvc_operator_approval.rb | 283 + .../turnkey_client/models/tvc_operator_set.rb | 301 + .../lib/turnkey_client/models/tx_error.rb | 26 +- .../models/update_auth_proxy_config_intent.rb | 22 +- .../models/update_organization_name_intent.rb | 211 + .../update_organization_name_request.rb | 298 + .../models/update_organization_name_result.rb | 226 + .../update_tvc_app_live_deployment_intent.rb | 211 + .../update_tvc_app_live_deployment_request.rb | 298 + .../update_tvc_app_live_deployment_result.rb | 196 + .../models/update_webhook_endpoint_intent.rb | 244 + .../models/update_webhook_endpoint_request.rb | 298 + .../models/update_webhook_endpoint_result.rb | 225 + .../models/upsert_gas_usage_config_intent.rb | 21 +- .../lib/turnkey_client/models/usage_type.rb | 27 + .../turnkey_client/models/user_params_v4.rb | 301 + .../models/validate_tvc_image_request.rb | 237 + .../models/validate_tvc_image_response.rb | 205 + .../models/verify_otp_intent_v2.rb | 237 + .../models/verify_otp_request.rb | 4 +- .../turnkey_client/models/web_authn_stamp.rb | 256 + .../models/webhook_endpoint_data.rb | 283 + .../models/webhook_subscription_params.rb | 233 + turnkey_client/lib/turnkey_client/version.rb | 2 +- turnkey_client_inputs/config.json | 2 +- turnkey_client_inputs/public_api.swagger.json | 15098 ++++++++++------ 159 files changed, 40260 insertions(+), 6026 deletions(-) create mode 100644 turnkey_client/lib/turnkey_client/api/ip_allowlist_api.rb create mode 100644 turnkey_client/lib/turnkey_client/api/tvc_api.rb create mode 100644 turnkey_client/lib/turnkey_client/models/app_status.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_oauth_providers_intent_v2.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_oauth_providers_result_v2.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_sub_organization_intent_v8.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_sub_organization_result_v8.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_tvc_app_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_tvc_deployment_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_users_intent_v4.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/deployment_status.rb create mode 100644 turnkey_client/lib/turnkey_client/models/eth_failure_details.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_app_status_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_app_status_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_ip_allowlist_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_ip_allowlist_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_tvc_app_deployments_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_tvc_app_deployments_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_tvc_app_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_tvc_app_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_tvc_apps_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_tvc_apps_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_tvc_deployment_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_tvc_deployment_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/init_otp_intent_v3.rb create mode 100644 turnkey_client/lib/turnkey_client/models/init_otp_result_v2.rb create mode 100644 turnkey_client/lib/turnkey_client/models/ip_allowlist.rb create mode 100644 turnkey_client/lib/turnkey_client/models/ip_allowlist_intent_rule.rb create mode 100644 turnkey_client/lib/turnkey_client/models/ip_allowlist_rule.rb create mode 100644 turnkey_client/lib/turnkey_client/models/list_webhook_endpoints_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/list_webhook_endpoints_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/login_usage.rb create mode 100644 turnkey_client/lib/turnkey_client/models/noop_codegen_anchor_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/oauth_provider_params_v2.rb create mode 100644 turnkey_client/lib/turnkey_client/models/oidc_claims.rb create mode 100644 turnkey_client/lib/turnkey_client/models/otp_login_intent_v2.rb create mode 100644 turnkey_client/lib/turnkey_client/models/post_tvc_quorum_key_share_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/post_tvc_quorum_key_share_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/quorum_key_share_approval_bundle.rb create mode 100644 turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/root_user_params_v5.rb create mode 100644 turnkey_client/lib/turnkey_client/models/set_ip_allowlist_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/set_ip_allowlist_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/set_ip_allowlist_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/signup_usage.rb create mode 100644 turnkey_client/lib/turnkey_client/models/signup_usage_v2.rb create mode 100644 turnkey_client/lib/turnkey_client/models/solana_config.rb create mode 100644 turnkey_client/lib/turnkey_client/models/solana_failure_details.rb create mode 100644 turnkey_client/lib/turnkey_client/models/solana_send_transaction_status.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_claim_leaf.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_claim_package.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_claim_transfer_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_claim_transfer_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_claim_transfer_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_deposit_derivation.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_encrypted_operator_package.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_frost_commitment.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_htlc_preimage_derivation.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_identity_derivation.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_key_derivation.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_leaf_public_key.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_lightning_receive_package.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_operator_recipient.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_partial_signature.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_sign_frost_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_sign_frost_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_sign_frost_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_signature_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_signing_leaf_derivation.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_static_deposit_derivation.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_transfer_leaf.rb create mode 100644 turnkey_client/lib/turnkey_client/models/spark_transfer_package.rb create mode 100644 turnkey_client/lib/turnkey_client/models/token_usage.rb create mode 100644 turnkey_client/lib/turnkey_client/models/tvc_app.rb create mode 100644 turnkey_client/lib/turnkey_client/models/tvc_container_spec.rb create mode 100644 turnkey_client/lib/turnkey_client/models/tvc_deployment.rb create mode 100644 turnkey_client/lib/turnkey_client/models/tvc_health_check_type.rb create mode 100644 turnkey_client/lib/turnkey_client/models/tvc_manifest.rb create mode 100644 turnkey_client/lib/turnkey_client/models/tvc_operator.rb create mode 100644 turnkey_client/lib/turnkey_client/models/tvc_operator_approval.rb create mode 100644 turnkey_client/lib/turnkey_client/models/tvc_operator_set.rb create mode 100644 turnkey_client/lib/turnkey_client/models/update_organization_name_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/update_organization_name_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/update_organization_name_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_intent.rb create mode 100644 turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_result.rb create mode 100644 turnkey_client/lib/turnkey_client/models/usage_type.rb create mode 100644 turnkey_client/lib/turnkey_client/models/user_params_v4.rb create mode 100644 turnkey_client/lib/turnkey_client/models/validate_tvc_image_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/validate_tvc_image_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/verify_otp_intent_v2.rb create mode 100644 turnkey_client/lib/turnkey_client/models/web_authn_stamp.rb create mode 100644 turnkey_client/lib/turnkey_client/models/webhook_endpoint_data.rb create mode 100644 turnkey_client/lib/turnkey_client/models/webhook_subscription_params.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index a7afc98..e9a2210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.0.19 -- 2026-06-03 + +### Patch Changes +- API sync for Mono `v2026.6.0` + ## 0.0.18 -- 2026-02-20 ### Patch Changes diff --git a/turnkey_client/lib/turnkey_client.rb b/turnkey_client/lib/turnkey_client.rb index 36d7da8..f8025b0 100644 --- a/turnkey_client/lib/turnkey_client.rb +++ b/turnkey_client/lib/turnkey_client.rb @@ -35,6 +35,7 @@ require 'turnkey_client/models/api_key_params_v2' require 'turnkey_client/models/api_only_user_params' require 'turnkey_client/models/app_proof' +require 'turnkey_client/models/app_status' require 'turnkey_client/models/approve_activity_intent' require 'turnkey_client/models/approve_activity_request' require 'turnkey_client/models/asset_balance' @@ -72,8 +73,10 @@ require 'turnkey_client/models/create_oauth2_credential_request' require 'turnkey_client/models/create_oauth2_credential_result' require 'turnkey_client/models/create_oauth_providers_intent' +require 'turnkey_client/models/create_oauth_providers_intent_v2' require 'turnkey_client/models/create_oauth_providers_request' require 'turnkey_client/models/create_oauth_providers_result' +require 'turnkey_client/models/create_oauth_providers_result_v2' require 'turnkey_client/models/create_organization_intent' require 'turnkey_client/models/create_organization_intent_v2' require 'turnkey_client/models/create_organization_result' @@ -111,6 +114,7 @@ require 'turnkey_client/models/create_sub_organization_intent_v5' require 'turnkey_client/models/create_sub_organization_intent_v6' require 'turnkey_client/models/create_sub_organization_intent_v7' +require 'turnkey_client/models/create_sub_organization_intent_v8' require 'turnkey_client/models/create_sub_organization_request' require 'turnkey_client/models/create_sub_organization_result' require 'turnkey_client/models/create_sub_organization_result_v3' @@ -118,11 +122,15 @@ require 'turnkey_client/models/create_sub_organization_result_v5' require 'turnkey_client/models/create_sub_organization_result_v6' require 'turnkey_client/models/create_sub_organization_result_v7' +require 'turnkey_client/models/create_sub_organization_result_v8' require 'turnkey_client/models/create_tvc_app_intent' +require 'turnkey_client/models/create_tvc_app_request' require 'turnkey_client/models/create_tvc_app_result' require 'turnkey_client/models/create_tvc_deployment_intent' +require 'turnkey_client/models/create_tvc_deployment_request' require 'turnkey_client/models/create_tvc_deployment_result' require 'turnkey_client/models/create_tvc_manifest_approvals_intent' +require 'turnkey_client/models/create_tvc_manifest_approvals_request' require 'turnkey_client/models/create_tvc_manifest_approvals_result' require 'turnkey_client/models/create_user_tag_intent' require 'turnkey_client/models/create_user_tag_request' @@ -130,6 +138,7 @@ require 'turnkey_client/models/create_users_intent' require 'turnkey_client/models/create_users_intent_v2' require 'turnkey_client/models/create_users_intent_v3' +require 'turnkey_client/models/create_users_intent_v4' require 'turnkey_client/models/create_users_request' require 'turnkey_client/models/create_users_result' require 'turnkey_client/models/create_wallet_accounts_intent' @@ -138,6 +147,9 @@ require 'turnkey_client/models/create_wallet_intent' require 'turnkey_client/models/create_wallet_request' require 'turnkey_client/models/create_wallet_result' +require 'turnkey_client/models/create_webhook_endpoint_intent' +require 'turnkey_client/models/create_webhook_endpoint_request' +require 'turnkey_client/models/create_webhook_endpoint_result' require 'turnkey_client/models/cred_props_authentication_extensions_client_outputs' require 'turnkey_client/models/credential_type' require 'turnkey_client/models/curve' @@ -185,6 +197,12 @@ require 'turnkey_client/models/delete_sub_organization_intent' require 'turnkey_client/models/delete_sub_organization_request' require 'turnkey_client/models/delete_sub_organization_result' +require 'turnkey_client/models/delete_tvc_app_and_deployments_intent' +require 'turnkey_client/models/delete_tvc_app_and_deployments_request' +require 'turnkey_client/models/delete_tvc_app_and_deployments_result' +require 'turnkey_client/models/delete_tvc_deployment_intent' +require 'turnkey_client/models/delete_tvc_deployment_request' +require 'turnkey_client/models/delete_tvc_deployment_result' require 'turnkey_client/models/delete_user_tags_intent' require 'turnkey_client/models/delete_user_tags_request' require 'turnkey_client/models/delete_user_tags_result' @@ -197,6 +215,10 @@ require 'turnkey_client/models/delete_wallets_intent' require 'turnkey_client/models/delete_wallets_request' require 'turnkey_client/models/delete_wallets_result' +require 'turnkey_client/models/delete_webhook_endpoint_intent' +require 'turnkey_client/models/delete_webhook_endpoint_request' +require 'turnkey_client/models/delete_webhook_endpoint_result' +require 'turnkey_client/models/deployment_status' require 'turnkey_client/models/disable_auth_proxy_intent' require 'turnkey_client/models/disable_auth_proxy_result' require 'turnkey_client/models/disable_private_key_intent' @@ -212,6 +234,7 @@ require 'turnkey_client/models/email_customization_params_v2' require 'turnkey_client/models/enable_auth_proxy_intent' require 'turnkey_client/models/enable_auth_proxy_result' +require 'turnkey_client/models/eth_failure_details' require 'turnkey_client/models/eth_send_raw_transaction_intent' require 'turnkey_client/models/eth_send_raw_transaction_result' require 'turnkey_client/models/eth_send_transaction_intent' @@ -247,6 +270,8 @@ require 'turnkey_client/models/get_api_keys_response' require 'turnkey_client/models/get_app_proofs_request' require 'turnkey_client/models/get_app_proofs_response' +require 'turnkey_client/models/get_app_status_request' +require 'turnkey_client/models/get_app_status_response' require 'turnkey_client/models/get_authenticator_request' require 'turnkey_client/models/get_authenticator_response' require 'turnkey_client/models/get_authenticators_request' @@ -254,6 +279,8 @@ require 'turnkey_client/models/get_boot_proof_request' require 'turnkey_client/models/get_gas_usage_request' require 'turnkey_client/models/get_gas_usage_response' +require 'turnkey_client/models/get_ip_allowlist_request' +require 'turnkey_client/models/get_ip_allowlist_response' require 'turnkey_client/models/get_latest_boot_proof_request' require 'turnkey_client/models/get_nonces_request' require 'turnkey_client/models/get_nonces_response' @@ -283,6 +310,14 @@ require 'turnkey_client/models/get_smart_contract_interfaces_response' require 'turnkey_client/models/get_sub_org_ids_request' require 'turnkey_client/models/get_sub_org_ids_response' +require 'turnkey_client/models/get_tvc_app_deployments_request' +require 'turnkey_client/models/get_tvc_app_deployments_response' +require 'turnkey_client/models/get_tvc_app_request' +require 'turnkey_client/models/get_tvc_app_response' +require 'turnkey_client/models/get_tvc_apps_request' +require 'turnkey_client/models/get_tvc_apps_response' +require 'turnkey_client/models/get_tvc_deployment_request' +require 'turnkey_client/models/get_tvc_deployment_response' require 'turnkey_client/models/get_user_request' require 'turnkey_client/models/get_user_response' require 'turnkey_client/models/get_users_request' @@ -325,14 +360,19 @@ require 'turnkey_client/models/init_otp_auth_result_v2' require 'turnkey_client/models/init_otp_intent' require 'turnkey_client/models/init_otp_intent_v2' +require 'turnkey_client/models/init_otp_intent_v3' require 'turnkey_client/models/init_otp_request' require 'turnkey_client/models/init_otp_result' +require 'turnkey_client/models/init_otp_result_v2' require 'turnkey_client/models/init_user_email_recovery_intent' require 'turnkey_client/models/init_user_email_recovery_intent_v2' require 'turnkey_client/models/init_user_email_recovery_request' require 'turnkey_client/models/init_user_email_recovery_result' require 'turnkey_client/models/intent' require 'turnkey_client/models/invitation_params' +require 'turnkey_client/models/ip_allowlist' +require 'turnkey_client/models/ip_allowlist_intent_rule' +require 'turnkey_client/models/ip_allowlist_rule' require 'turnkey_client/models/list_fiat_on_ramp_credentials_request' require 'turnkey_client/models/list_fiat_on_ramp_credentials_response' require 'turnkey_client/models/list_oauth2_credentials_request' @@ -343,7 +383,11 @@ require 'turnkey_client/models/list_supported_assets_response' require 'turnkey_client/models/list_user_tags_request' require 'turnkey_client/models/list_user_tags_response' +require 'turnkey_client/models/list_webhook_endpoints_request' +require 'turnkey_client/models/list_webhook_endpoints_response' +require 'turnkey_client/models/login_usage' require 'turnkey_client/models/mnemonic_language' +require 'turnkey_client/models/noop_codegen_anchor_response' require 'turnkey_client/models/native_revert_error' require 'turnkey_client/models/oauth2_authenticate_intent' require 'turnkey_client/models/oauth2_authenticate_request' @@ -356,13 +400,16 @@ require 'turnkey_client/models/oauth_login_result' require 'turnkey_client/models/oauth_provider' require 'turnkey_client/models/oauth_provider_params' +require 'turnkey_client/models/oauth_provider_params_v2' require 'turnkey_client/models/oauth_request' require 'turnkey_client/models/oauth_result' +require 'turnkey_client/models/oidc_claims' require 'turnkey_client/models/operator' require 'turnkey_client/models/otp_auth_intent' require 'turnkey_client/models/otp_auth_request' require 'turnkey_client/models/otp_auth_result' require 'turnkey_client/models/otp_login_intent' +require 'turnkey_client/models/otp_login_intent_v2' require 'turnkey_client/models/otp_login_request' require 'turnkey_client/models/otp_login_result' require 'turnkey_client/models/outcome' @@ -370,26 +417,39 @@ require 'turnkey_client/models/path_format' require 'turnkey_client/models/payload_encoding' require 'turnkey_client/models/policy' +require 'turnkey_client/models/post_tvc_quorum_key_share_intent' +require 'turnkey_client/models/post_tvc_quorum_key_share_result' require 'turnkey_client/models/private_key' require 'turnkey_client/models/private_key_params' require 'turnkey_client/models/private_key_result' require 'turnkey_client/models/public_key_credential_with_attestation' +require 'turnkey_client/models/quorum_key_share_approval_bundle' require 'turnkey_client/models/recover_user_intent' require 'turnkey_client/models/recover_user_request' require 'turnkey_client/models/recover_user_result' require 'turnkey_client/models/reject_activity_intent' require 'turnkey_client/models/reject_activity_request' +require 'turnkey_client/models/remove_ip_allowlist_intent' +require 'turnkey_client/models/remove_ip_allowlist_request' +require 'turnkey_client/models/remove_ip_allowlist_result' require 'turnkey_client/models/remove_organization_feature_intent' require 'turnkey_client/models/remove_organization_feature_request' require 'turnkey_client/models/remove_organization_feature_result' +require 'turnkey_client/models/restore_tvc_deployment_intent' +require 'turnkey_client/models/restore_tvc_deployment_request' +require 'turnkey_client/models/restore_tvc_deployment_result' require 'turnkey_client/models/result' require 'turnkey_client/models/revert_chain_entry' require 'turnkey_client/models/root_user_params' require 'turnkey_client/models/root_user_params_v2' require 'turnkey_client/models/root_user_params_v3' require 'turnkey_client/models/root_user_params_v4' +require 'turnkey_client/models/root_user_params_v5' require 'turnkey_client/models/selector' require 'turnkey_client/models/selector_v2' +require 'turnkey_client/models/set_ip_allowlist_intent' +require 'turnkey_client/models/set_ip_allowlist_request' +require 'turnkey_client/models/set_ip_allowlist_result' require 'turnkey_client/models/set_organization_feature_intent' require 'turnkey_client/models/set_organization_feature_request' require 'turnkey_client/models/set_organization_feature_result' @@ -407,20 +467,63 @@ require 'turnkey_client/models/sign_transaction_intent_v2' require 'turnkey_client/models/sign_transaction_request' require 'turnkey_client/models/sign_transaction_result' +require 'turnkey_client/models/signup_usage' +require 'turnkey_client/models/signup_usage_v2' require 'turnkey_client/models/simple_client_extension_results' require 'turnkey_client/models/smart_contract_interface_type' require 'turnkey_client/models/sms_customization_params' require 'turnkey_client/models/sol_send_transaction_intent' require 'turnkey_client/models/sol_send_transaction_request' require 'turnkey_client/models/sol_send_transaction_result' +require 'turnkey_client/models/solana_config' +require 'turnkey_client/models/solana_failure_details' +require 'turnkey_client/models/solana_send_transaction_status' +require 'turnkey_client/models/spark_claim_leaf' +require 'turnkey_client/models/spark_claim_package' +require 'turnkey_client/models/spark_claim_transfer_intent' +require 'turnkey_client/models/spark_claim_transfer_request' +require 'turnkey_client/models/spark_claim_transfer_result' +require 'turnkey_client/models/spark_deposit_derivation' +require 'turnkey_client/models/spark_encrypted_operator_package' +require 'turnkey_client/models/spark_frost_commitment' +require 'turnkey_client/models/spark_htlc_preimage_derivation' +require 'turnkey_client/models/spark_identity_derivation' +require 'turnkey_client/models/spark_key_derivation' +require 'turnkey_client/models/spark_leaf_public_key' +require 'turnkey_client/models/spark_lightning_receive_package' +require 'turnkey_client/models/spark_operator_recipient' +require 'turnkey_client/models/spark_partial_signature' +require 'turnkey_client/models/spark_prepare_lightning_receive_intent' +require 'turnkey_client/models/spark_prepare_lightning_receive_request' +require 'turnkey_client/models/spark_prepare_lightning_receive_result' +require 'turnkey_client/models/spark_prepare_transfer_intent' +require 'turnkey_client/models/spark_prepare_transfer_request' +require 'turnkey_client/models/spark_prepare_transfer_result' +require 'turnkey_client/models/spark_sign_frost_intent' +require 'turnkey_client/models/spark_sign_frost_request' +require 'turnkey_client/models/spark_sign_frost_result' +require 'turnkey_client/models/spark_signature_request' +require 'turnkey_client/models/spark_signing_leaf_derivation' +require 'turnkey_client/models/spark_static_deposit_derivation' +require 'turnkey_client/models/spark_transfer_leaf' +require 'turnkey_client/models/spark_transfer_package' require 'turnkey_client/models/stamp_login_intent' require 'turnkey_client/models/stamp_login_request' require 'turnkey_client/models/stamp_login_result' require 'turnkey_client/models/status' require 'turnkey_client/models/tag_type' +require 'turnkey_client/models/token_usage' require 'turnkey_client/models/transaction_type' +require 'turnkey_client/models/tvc_app' +require 'turnkey_client/models/tvc_container_spec' +require 'turnkey_client/models/tvc_deployment' +require 'turnkey_client/models/tvc_health_check_type' +require 'turnkey_client/models/tvc_manifest' require 'turnkey_client/models/tvc_manifest_approval' +require 'turnkey_client/models/tvc_operator' +require 'turnkey_client/models/tvc_operator_approval' require 'turnkey_client/models/tvc_operator_params' +require 'turnkey_client/models/tvc_operator_set' require 'turnkey_client/models/tvc_operator_set_params' require 'turnkey_client/models/tx_error' require 'turnkey_client/models/unknown_revert_error' @@ -434,6 +537,9 @@ require 'turnkey_client/models/update_oauth2_credential_intent' require 'turnkey_client/models/update_oauth2_credential_request' require 'turnkey_client/models/update_oauth2_credential_result' +require 'turnkey_client/models/update_organization_name_intent' +require 'turnkey_client/models/update_organization_name_request' +require 'turnkey_client/models/update_organization_name_result' require 'turnkey_client/models/update_policy_intent' require 'turnkey_client/models/update_policy_intent_v2' require 'turnkey_client/models/update_policy_request' @@ -445,6 +551,9 @@ require 'turnkey_client/models/update_root_quorum_intent' require 'turnkey_client/models/update_root_quorum_request' require 'turnkey_client/models/update_root_quorum_result' +require 'turnkey_client/models/update_tvc_app_live_deployment_intent' +require 'turnkey_client/models/update_tvc_app_live_deployment_request' +require 'turnkey_client/models/update_tvc_app_live_deployment_result' require 'turnkey_client/models/update_user_email_intent' require 'turnkey_client/models/update_user_email_request' require 'turnkey_client/models/update_user_email_result' @@ -463,14 +572,22 @@ require 'turnkey_client/models/update_wallet_intent' require 'turnkey_client/models/update_wallet_request' require 'turnkey_client/models/update_wallet_result' +require 'turnkey_client/models/update_webhook_endpoint_intent' +require 'turnkey_client/models/update_webhook_endpoint_request' +require 'turnkey_client/models/update_webhook_endpoint_result' require 'turnkey_client/models/upsert_gas_usage_config_intent' require 'turnkey_client/models/upsert_gas_usage_config_result' +require 'turnkey_client/models/usage_type' require 'turnkey_client/models/user' require 'turnkey_client/models/user_params' require 'turnkey_client/models/user_params_v2' require 'turnkey_client/models/user_params_v3' +require 'turnkey_client/models/user_params_v4' require 'turnkey_client/models/v1_tag' +require 'turnkey_client/models/validate_tvc_image_request' +require 'turnkey_client/models/validate_tvc_image_response' require 'turnkey_client/models/verify_otp_intent' +require 'turnkey_client/models/verify_otp_intent_v2' require 'turnkey_client/models/verify_otp_request' require 'turnkey_client/models/verify_otp_result' require 'turnkey_client/models/vote' @@ -480,6 +597,9 @@ require 'turnkey_client/models/wallet_kit_settings_params' require 'turnkey_client/models/wallet_params' require 'turnkey_client/models/wallet_result' +require 'turnkey_client/models/web_authn_stamp' +require 'turnkey_client/models/webhook_endpoint_data' +require 'turnkey_client/models/webhook_subscription_params' # APIs require 'turnkey_client/api/api_keys_api' @@ -491,6 +611,7 @@ require 'turnkey_client/api/consensus_api' require 'turnkey_client/api/default_api' require 'turnkey_client/api/features_api' +require 'turnkey_client/api/ip_allowlist_api' require 'turnkey_client/api/invitations_api' require 'turnkey_client/api/on_ramp_api' require 'turnkey_client/api/organizations_api' @@ -500,6 +621,7 @@ require 'turnkey_client/api/send_transactions_api' require 'turnkey_client/api/sessions_api' require 'turnkey_client/api/signing_api' +require 'turnkey_client/api/tvc_api' require 'turnkey_client/api/user_auth_api' require 'turnkey_client/api/user_recovery_api' require 'turnkey_client/api/user_tags_api' diff --git a/turnkey_client/lib/turnkey_client/api/default_api.rb b/turnkey_client/lib/turnkey_client/api/default_api.rb index e458b15..1385a09 100644 --- a/turnkey_client/lib/turnkey_client/api/default_api.rb +++ b/turnkey_client/lib/turnkey_client/api/default_api.rb @@ -73,5 +73,51 @@ def get_oauth2_credential_with_http_info(body, opts = {}) end return data, status_code, headers end + # @param [Hash] opts the optional parameters + # @return [NOOPCodegenAnchorResponse] + def n_oop_codegen_anchor(opts = {}) + data, _status_code, _headers = n_oop_codegen_anchor_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @return [Array<(NOOPCodegenAnchorResponse, Integer, Hash)>] NOOPCodegenAnchorResponse data, response status code and response headers + def n_oop_codegen_anchor_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.n_oop_codegen_anchor ...' + end + # resource path + local_var_path = '/tkhq/api/v1/noop-codegen-anchor' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + return_type = opts[:return_type] || 'NOOPCodegenAnchorResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#n_oop_codegen_anchor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/turnkey_client/lib/turnkey_client/api/ip_allowlist_api.rb b/turnkey_client/lib/turnkey_client/api/ip_allowlist_api.rb new file mode 100644 index 0000000..74f70ab --- /dev/null +++ b/turnkey_client/lib/turnkey_client/api/ip_allowlist_api.rb @@ -0,0 +1,193 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +module TurnkeyClient + class IPAllowlistApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get IP Allowlist + # Get IP allowlist and rules for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [GetIpAllowlistResponse] + def get_ip_allowlist(body, opts = {}) + data, _status_code, _headers = get_ip_allowlist_with_http_info(body, opts) + data + end + + # Get IP Allowlist + # Get IP allowlist and rules for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetIpAllowlistResponse, Integer, Hash)>] GetIpAllowlistResponse data, response status code and response headers + def get_ip_allowlist_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IPAllowlistApi.get_ip_allowlist ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling IPAllowlistApi.get_ip_allowlist" + end + # resource path + local_var_path = '/public/v1/query/get_ip_allowlist' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetIpAllowlistResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IPAllowlistApi#get_ip_allowlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Remove IP Allowlist + # Delete IP allowlist and all associated rules for organization or API key. After removal, access will be determined by organization-level allowlist (for API keys) or allowed from all IPs (for organizations). + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def remove_ip_allowlist(body, opts = {}) + data, _status_code, _headers = remove_ip_allowlist_with_http_info(body, opts) + data + end + + # Remove IP Allowlist + # Delete IP allowlist and all associated rules for organization or API key. After removal, access will be determined by organization-level allowlist (for API keys) or allowed from all IPs (for organizations). + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def remove_ip_allowlist_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IPAllowlistApi.remove_ip_allowlist ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling IPAllowlistApi.remove_ip_allowlist" + end + # resource path + local_var_path = '/public/v1/submit/remove_ip_allowlist' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IPAllowlistApi#remove_ip_allowlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Set IP Allowlist + # Create or update IP allowlist and rules for organization or API key. The IP allowlist restricts API access to specific CIDR blocks. Organization-level allowlists apply to all API keys unless overridden by a key-specific allowlist. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def set_ip_allowlist(body, opts = {}) + data, _status_code, _headers = set_ip_allowlist_with_http_info(body, opts) + data + end + + # Set IP Allowlist + # Create or update IP allowlist and rules for organization or API key. The IP allowlist restricts API access to specific CIDR blocks. Organization-level allowlists apply to all API keys unless overridden by a key-specific allowlist. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def set_ip_allowlist_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IPAllowlistApi.set_ip_allowlist ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling IPAllowlistApi.set_ip_allowlist" + end + # resource path + local_var_path = '/public/v1/submit/set_ip_allowlist' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IPAllowlistApi#set_ip_allowlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/turnkey_client/lib/turnkey_client/api/organizations_api.rb b/turnkey_client/lib/turnkey_client/api/organizations_api.rb index 5e21839..c47fe38 100644 --- a/turnkey_client/lib/turnkey_client/api/organizations_api.rb +++ b/turnkey_client/lib/turnkey_client/api/organizations_api.rb @@ -73,6 +73,64 @@ def create_sub_organization_with_http_info(body, opts = {}) end return data, status_code, headers end + # Create webhook endpoint + # Create a webhook endpoint for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def create_webhook_endpoint(body, opts = {}) + data, _status_code, _headers = create_webhook_endpoint_with_http_info(body, opts) + data + end + + # Create webhook endpoint + # Create a webhook endpoint for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def create_webhook_endpoint_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_webhook_endpoint ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationsApi.create_webhook_endpoint" + end + # resource path + local_var_path = '/public/v1/submit/create_webhook_endpoint' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrganizationsApi#create_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Delete sub-organization # Delete a sub-organization. # @param body @@ -131,6 +189,64 @@ def delete_sub_organization_with_http_info(body, opts = {}) end return data, status_code, headers end + # Delete webhook endpoint + # Delete a webhook endpoint for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def delete_webhook_endpoint(body, opts = {}) + data, _status_code, _headers = delete_webhook_endpoint_with_http_info(body, opts) + data + end + + # Delete webhook endpoint + # Delete a webhook endpoint for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def delete_webhook_endpoint_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_webhook_endpoint ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationsApi.delete_webhook_endpoint" + end + # resource path + local_var_path = '/public/v1/submit/delete_webhook_endpoint' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrganizationsApi#delete_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Get configs # Get quorum settings and features for an organization. # @param body @@ -305,6 +421,122 @@ def get_verified_sub_org_ids_with_http_info(body, opts = {}) end return data, status_code, headers end + # List webhook endpoints + # List webhook endpoints within an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [ListWebhookEndpointsResponse] + def list_webhook_endpoints(body, opts = {}) + data, _status_code, _headers = list_webhook_endpoints_with_http_info(body, opts) + data + end + + # List webhook endpoints + # List webhook endpoints within an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ListWebhookEndpointsResponse, Integer, Hash)>] ListWebhookEndpointsResponse data, response status code and response headers + def list_webhook_endpoints_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_webhook_endpoints ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationsApi.list_webhook_endpoints" + end + # resource path + local_var_path = '/public/v1/query/list_webhook_endpoints' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ListWebhookEndpointsResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrganizationsApi#list_webhook_endpoints\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update organization name + # Update the name of an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def update_organization_name(body, opts = {}) + data, _status_code, _headers = update_organization_name_with_http_info(body, opts) + data + end + + # Update organization name + # Update the name of an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def update_organization_name_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_name ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationsApi.update_organization_name" + end + # resource path + local_var_path = '/public/v1/submit/update_organization_name' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Update root quorum # Set the threshold and members of the root quorum. This activity must be approved by the current root quorum. # @param body @@ -363,5 +595,63 @@ def update_root_quorum_with_http_info(body, opts = {}) end return data, status_code, headers end + # Update webhook endpoint + # Update a webhook endpoint for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def update_webhook_endpoint(body, opts = {}) + data, _status_code, _headers = update_webhook_endpoint_with_http_info(body, opts) + data + end + + # Update webhook endpoint + # Update a webhook endpoint for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def update_webhook_endpoint_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_webhook_endpoint ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationsApi.update_webhook_endpoint" + end + # resource path + local_var_path = '/public/v1/submit/update_webhook_endpoint' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrganizationsApi#update_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/turnkey_client/lib/turnkey_client/api/signing_api.rb b/turnkey_client/lib/turnkey_client/api/signing_api.rb index e6db5d4..5ceddd1 100644 --- a/turnkey_client/lib/turnkey_client/api/signing_api.rb +++ b/turnkey_client/lib/turnkey_client/api/signing_api.rb @@ -189,5 +189,237 @@ def sign_transaction_with_http_info(body, opts = {}) end return data, status_code, headers end + # Claim Spark transfer + # Construct receiver-side encrypted operator packages to claim a Spark transfer. Does not perform FROST signing. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def spark_claim_transfer(body, opts = {}) + data, _status_code, _headers = spark_claim_transfer_with_http_info(body, opts) + data + end + + # Claim Spark transfer + # Construct receiver-side encrypted operator packages to claim a Spark transfer. Does not perform FROST signing. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def spark_claim_transfer_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SigningApi.spark_claim_transfer ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling SigningApi.spark_claim_transfer" + end + # resource path + local_var_path = '/public/v1/submit/spark_claim_transfer' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SigningApi#spark_claim_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Spark prepare Lightning receive + # Generate a Lightning preimage and distribute Feldman shares to operators for a Spark Lightning receive. Does not perform FROST signing. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def spark_prepare_lightning_receive(body, opts = {}) + data, _status_code, _headers = spark_prepare_lightning_receive_with_http_info(body, opts) + data + end + + # Spark prepare Lightning receive + # Generate a Lightning preimage and distribute Feldman shares to operators for a Spark Lightning receive. Does not perform FROST signing. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def spark_prepare_lightning_receive_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SigningApi.spark_prepare_lightning_receive ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling SigningApi.spark_prepare_lightning_receive" + end + # resource path + local_var_path = '/public/v1/submit/spark_prepare_lightning_receive' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SigningApi#spark_prepare_lightning_receive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Prepare Spark transfer + # Construct sender-side encrypted operator packages for a Spark BTC transfer. Does not perform FROST signing. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def spark_prepare_transfer(body, opts = {}) + data, _status_code, _headers = spark_prepare_transfer_with_http_info(body, opts) + data + end + + # Prepare Spark transfer + # Construct sender-side encrypted operator packages for a Spark BTC transfer. Does not perform FROST signing. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def spark_prepare_transfer_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SigningApi.spark_prepare_transfer ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling SigningApi.spark_prepare_transfer" + end + # resource path + local_var_path = '/public/v1/submit/spark_prepare_transfer' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SigningApi#spark_prepare_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Sign Frost Spark + # Perform pure FROST partial signing for a Spark wallet. Produces partial signatures without constructing operator packages. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def spark_sign_frost(body, opts = {}) + data, _status_code, _headers = spark_sign_frost_with_http_info(body, opts) + data + end + + # Sign Frost Spark + # Perform pure FROST partial signing for a Spark wallet. Produces partial signatures without constructing operator packages. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def spark_sign_frost_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SigningApi.spark_sign_frost ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling SigningApi.spark_sign_frost" + end + # resource path + local_var_path = '/public/v1/submit/spark_sign_frost' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SigningApi#spark_sign_frost\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/turnkey_client/lib/turnkey_client/api/tvc_api.rb b/turnkey_client/lib/turnkey_client/api/tvc_api.rb new file mode 100644 index 0000000..0c82ae5 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/api/tvc_api.rb @@ -0,0 +1,773 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +module TurnkeyClient + class TVCApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create a TVC App + # Create a new TVC application + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def create_tvc_app(body, opts = {}) + data, _status_code, _headers = create_tvc_app_with_http_info(body, opts) + data + end + + # Create a TVC App + # Create a new TVC application + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def create_tvc_app_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.create_tvc_app ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.create_tvc_app" + end + # resource path + local_var_path = '/public/v1/submit/create_tvc_app' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#create_tvc_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a TVC Deployment + # Create a new TVC Deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def create_tvc_deployment(body, opts = {}) + data, _status_code, _headers = create_tvc_deployment_with_http_info(body, opts) + data + end + + # Create a TVC Deployment + # Create a new TVC Deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def create_tvc_deployment_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.create_tvc_deployment ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.create_tvc_deployment" + end + # resource path + local_var_path = '/public/v1/submit/create_tvc_deployment' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#create_tvc_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create TVC Manifest Approvals + # Post one or more manifest approvals for a TVC Manifest + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def create_tvc_manifest_approvals(body, opts = {}) + data, _status_code, _headers = create_tvc_manifest_approvals_with_http_info(body, opts) + data + end + + # Create TVC Manifest Approvals + # Post one or more manifest approvals for a TVC Manifest + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def create_tvc_manifest_approvals_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.create_tvc_manifest_approvals ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.create_tvc_manifest_approvals" + end + # resource path + local_var_path = '/public/v1/submit/create_tvc_manifest_approvals' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#create_tvc_manifest_approvals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a TVC App and all of its deployments + # Delete a TVC App and all of its deployments + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def delete_tvc_app_and_deployments(body, opts = {}) + data, _status_code, _headers = delete_tvc_app_and_deployments_with_http_info(body, opts) + data + end + + # Delete a TVC App and all of its deployments + # Delete a TVC App and all of its deployments + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def delete_tvc_app_and_deployments_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.delete_tvc_app_and_deployments ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.delete_tvc_app_and_deployments" + end + # resource path + local_var_path = '/public/v1/submit/delete_tvc_app_and_deployments' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#delete_tvc_app_and_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a TVC Deployment + # Delete a TVC Deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def delete_tvc_deployment(body, opts = {}) + data, _status_code, _headers = delete_tvc_deployment_with_http_info(body, opts) + data + end + + # Delete a TVC Deployment + # Delete a TVC Deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def delete_tvc_deployment_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.delete_tvc_deployment ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.delete_tvc_deployment" + end + # resource path + local_var_path = '/public/v1/submit/delete_tvc_deployment' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#delete_tvc_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get TVC App status + # Get live runtime status for a TVC App from the cluster. + # @param body + # @param [Hash] opts the optional parameters + # @return [GetAppStatusResponse] + def get_app_status(body, opts = {}) + data, _status_code, _headers = get_app_status_with_http_info(body, opts) + data + end + + # Get TVC App status + # Get live runtime status for a TVC App from the cluster. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetAppStatusResponse, Integer, Hash)>] GetAppStatusResponse data, response status code and response headers + def get_app_status_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.get_app_status ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.get_app_status" + end + # resource path + local_var_path = '/public/v1/query/get_app_status' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetAppStatusResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#get_app_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get TVC App + # Get details about a single TVC App + # @param body + # @param [Hash] opts the optional parameters + # @return [GetTvcAppResponse] + def get_tvc_app(body, opts = {}) + data, _status_code, _headers = get_tvc_app_with_http_info(body, opts) + data + end + + # Get TVC App + # Get details about a single TVC App + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetTvcAppResponse, Integer, Hash)>] GetTvcAppResponse data, response status code and response headers + def get_tvc_app_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.get_tvc_app ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.get_tvc_app" + end + # resource path + local_var_path = '/public/v1/query/get_tvc_app' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetTvcAppResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#get_tvc_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List TVC Deployments + # List all deployments for a given TVC App + # @param body + # @param [Hash] opts the optional parameters + # @return [GetTvcAppDeploymentsResponse] + def get_tvc_app_deployments(body, opts = {}) + data, _status_code, _headers = get_tvc_app_deployments_with_http_info(body, opts) + data + end + + # List TVC Deployments + # List all deployments for a given TVC App + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetTvcAppDeploymentsResponse, Integer, Hash)>] GetTvcAppDeploymentsResponse data, response status code and response headers + def get_tvc_app_deployments_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.get_tvc_app_deployments ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.get_tvc_app_deployments" + end + # resource path + local_var_path = '/public/v1/query/list_tvc_app_deployments' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetTvcAppDeploymentsResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#get_tvc_app_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List TVC Apps + # List all TVC Apps within an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [GetTvcAppsResponse] + def get_tvc_apps(body, opts = {}) + data, _status_code, _headers = get_tvc_apps_with_http_info(body, opts) + data + end + + # List TVC Apps + # List all TVC Apps within an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetTvcAppsResponse, Integer, Hash)>] GetTvcAppsResponse data, response status code and response headers + def get_tvc_apps_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.get_tvc_apps ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.get_tvc_apps" + end + # resource path + local_var_path = '/public/v1/query/list_tvc_apps' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetTvcAppsResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#get_tvc_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get TVC Deployment + # Get details about a single TVC Deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [GetTvcDeploymentResponse] + def get_tvc_deployment(body, opts = {}) + data, _status_code, _headers = get_tvc_deployment_with_http_info(body, opts) + data + end + + # Get TVC Deployment + # Get details about a single TVC Deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetTvcDeploymentResponse, Integer, Hash)>] GetTvcDeploymentResponse data, response status code and response headers + def get_tvc_deployment_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.get_tvc_deployment ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.get_tvc_deployment" + end + # resource path + local_var_path = '/public/v1/query/get_tvc_deployment' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetTvcDeploymentResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#get_tvc_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Restore a TVC Deployment + # Restore a deleted TVC Deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def restore_tvc_deployment(body, opts = {}) + data, _status_code, _headers = restore_tvc_deployment_with_http_info(body, opts) + data + end + + # Restore a TVC Deployment + # Restore a deleted TVC Deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def restore_tvc_deployment_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.restore_tvc_deployment ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.restore_tvc_deployment" + end + # resource path + local_var_path = '/public/v1/submit/restore_tvc_deployment' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#restore_tvc_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Set TVC App live deployment + # Set the live deployment for a TVC App + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def update_tvc_app_live_deployment(body, opts = {}) + data, _status_code, _headers = update_tvc_app_live_deployment_with_http_info(body, opts) + data + end + + # Set TVC App live deployment + # Set the live deployment for a TVC App + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def update_tvc_app_live_deployment_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.update_tvc_app_live_deployment ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.update_tvc_app_live_deployment" + end + # resource path + local_var_path = '/public/v1/submit/set_tvc_app_live_deployment' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#update_tvc_app_live_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Validate Container Image for TVC + # Validate a container image URL and pull secret for TVC deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [ValidateTvcImageResponse] + def validate_tvc_image(body, opts = {}) + data, _status_code, _headers = validate_tvc_image_with_http_info(body, opts) + data + end + + # Validate Container Image for TVC + # Validate a container image URL and pull secret for TVC deployment + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ValidateTvcImageResponse, Integer, Hash)>] ValidateTvcImageResponse data, response status code and response headers + def validate_tvc_image_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TVCApi.validate_tvc_image ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TVCApi.validate_tvc_image" + end + # resource path + local_var_path = '/public/v1/query/validate_tvc_image' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ValidateTvcImageResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TVCApi#validate_tvc_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/turnkey_client/lib/turnkey_client/api/wallets_api.rb b/turnkey_client/lib/turnkey_client/api/wallets_api.rb index 167851d..d749885 100644 --- a/turnkey_client/lib/turnkey_client/api/wallets_api.rb +++ b/turnkey_client/lib/turnkey_client/api/wallets_api.rb @@ -538,7 +538,7 @@ def get_wallet_accounts_with_http_info(body, opts = {}) return data, status_code, headers end # Get balances - # Get balances of supported assets for an address on the specified network. Only non-zero balances are returned. This feature is in beta - please contact support for access. + # Get balances of supported assets for an address on the specified network. Only non-zero balances are returned. # @param body # @param [Hash] opts the optional parameters # @return [GetWalletAddressBalancesResponse] @@ -548,7 +548,7 @@ def get_wallet_address_balances(body, opts = {}) end # Get balances - # Get balances of supported assets for an address on the specified network. Only non-zero balances are returned. This feature is in beta - please contact support for access. + # Get balances of supported assets for an address on the specified network. Only non-zero balances are returned. # @param body # @param [Hash] opts the optional parameters # @return [Array<(GetWalletAddressBalancesResponse, Integer, Hash)>] GetWalletAddressBalancesResponse data, response status code and response headers @@ -770,7 +770,7 @@ def init_import_wallet_with_http_info(body, opts = {}) return data, status_code, headers end # List supported assets - # List supported assets for the specified network. This feature is in beta - please contact support for access. + # List supported assets for the specified network. # @param body # @param [Hash] opts the optional parameters # @return [ListSupportedAssetsResponse] @@ -780,7 +780,7 @@ def list_supported_assets(body, opts = {}) end # List supported assets - # List supported assets for the specified network. This feature is in beta - please contact support for access. + # List supported assets for the specified network. # @param body # @param [Hash] opts the optional parameters # @return [Array<(ListSupportedAssetsResponse, Integer, Hash)>] ListSupportedAssetsResponse data, response status code and response headers diff --git a/turnkey_client/lib/turnkey_client/configuration.rb b/turnkey_client/lib/turnkey_client/configuration.rb index ff8d14e..49c8a7b 100644 --- a/turnkey_client/lib/turnkey_client/configuration.rb +++ b/turnkey_client/lib/turnkey_client/configuration.rb @@ -202,6 +202,13 @@ def auth_settings key: 'X-Stamp', value: api_key_with_prefix('X-Stamp') }, + 'AttestedAuth' => + { + type: 'api_key', + in: 'header', + key: 'X-Stamp-Attested', + value: api_key_with_prefix('X-Stamp-Attested') + }, 'AuthenticatorAuth' => { type: 'api_key', diff --git a/turnkey_client/lib/turnkey_client/models/activate_billing_tier_intent.rb b/turnkey_client/lib/turnkey_client/models/activate_billing_tier_intent.rb index ca81d32..deb6398 100644 --- a/turnkey_client/lib/turnkey_client/models/activate_billing_tier_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/activate_billing_tier_intent.rb @@ -15,23 +15,28 @@ class ActivateBillingTierIntent # The product that the customer wants to subscribe to. attr_accessor :product_id + attr_accessor :orb_plan_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'product_id' => :'productId' + :'product_id' => :'productId', + :'orb_plan_id' => :'orbPlanId' } end # Attribute type mapping. def self.openapi_types { - :'product_id' => :'Object' + :'product_id' => :'Object', + :'orb_plan_id' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'orb_plan_id' ]) end @@ -53,6 +58,10 @@ def initialize(attributes = {}) if attributes.key?(:'product_id') self.product_id = attributes[:'product_id'] end + + if attributes.key?(:'orb_plan_id') + self.orb_plan_id = attributes[:'orb_plan_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -78,7 +87,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - product_id == o.product_id + product_id == o.product_id && + orb_plan_id == o.orb_plan_id end # @see the `==` method @@ -90,7 +100,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [product_id].hash + [product_id, orb_plan_id].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/activity_type.rb b/turnkey_client/lib/turnkey_client/models/activity_type.rb index 8a4efdb..cce070f 100644 --- a/turnkey_client/lib/turnkey_client/models/activity_type.rb +++ b/turnkey_client/lib/turnkey_client/models/activity_type.rb @@ -129,6 +129,27 @@ class ActivityType CREATE_TVC_DEPLOYMENT = 'ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT'.freeze CREATE_TVC_MANIFEST_APPROVALS = 'ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS'.freeze SOL_SEND_TRANSACTION = 'ACTIVITY_TYPE_SOL_SEND_TRANSACTION'.freeze + INIT_OTP_V3 = 'ACTIVITY_TYPE_INIT_OTP_V3'.freeze + VERIFY_OTP_V2 = 'ACTIVITY_TYPE_VERIFY_OTP_V2'.freeze + OTP_LOGIN_V2 = 'ACTIVITY_TYPE_OTP_LOGIN_V2'.freeze + UPDATE_ORGANIZATION_NAME = 'ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME'.freeze + CREATE_SUB_ORGANIZATION_V8 = 'ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8'.freeze + CREATE_OAUTH_PROVIDERS_V2 = 'ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2'.freeze + CREATE_USERS_V4 = 'ACTIVITY_TYPE_CREATE_USERS_V4'.freeze + CREATE_WEBHOOK_ENDPOINT = 'ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT'.freeze + UPDATE_WEBHOOK_ENDPOINT = 'ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT'.freeze + DELETE_WEBHOOK_ENDPOINT = 'ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT'.freeze + SET_IP_ALLOWLIST = 'ACTIVITY_TYPE_SET_IP_ALLOWLIST'.freeze + REMOVE_IP_ALLOWLIST = 'ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST'.freeze + UPDATE_TVC_APP_LIVE_DEPLOYMENT = 'ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT'.freeze + DELETE_TVC_DEPLOYMENT = 'ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT'.freeze + DELETE_TVC_APP_AND_DEPLOYMENTS = 'ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS'.freeze + RESTORE_TVC_DEPLOYMENT = 'ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT'.freeze + SPARK_SIGN_FROST = 'ACTIVITY_TYPE_SPARK_SIGN_FROST'.freeze + SPARK_PREPARE_TRANSFER = 'ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER'.freeze + SPARK_CLAIM_TRANSFER = 'ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER'.freeze + SPARK_PREPARE_LIGHTNING_RECEIVE = 'ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE'.freeze + POST_TVC_QUORUM_KEY_SHARE = 'ACTIVITY_TYPE_POST_TVC_QUORUM_KEY_SHARE'.freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/turnkey_client/lib/turnkey_client/models/address_format.rb b/turnkey_client/lib/turnkey_client/models/address_format.rb index 00d0b78..64c9b0b 100644 --- a/turnkey_client/lib/turnkey_client/models/address_format.rb +++ b/turnkey_client/lib/turnkey_client/models/address_format.rb @@ -48,6 +48,8 @@ class AddressFormat TON_V4_R2 = 'ADDRESS_FORMAT_TON_V4R2'.freeze TON_V5_R1 = 'ADDRESS_FORMAT_TON_V5R1'.freeze XRP = 'ADDRESS_FORMAT_XRP'.freeze + SPARK_MAINNET = 'ADDRESS_FORMAT_SPARK_MAINNET'.freeze + SPARK_REGTEST = 'ADDRESS_FORMAT_SPARK_REGTEST'.freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/turnkey_client/lib/turnkey_client/models/app_status.rb b/turnkey_client/lib/turnkey_client/models/app_status.rb new file mode 100644 index 0000000..211bb9b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/app_status.rb @@ -0,0 +1,243 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class AppStatus + # Unique identifier for this TVC App + attr_accessor :app_id + + # List of deployment statuses for this app + attr_accessor :deployments + + # The deployment ID currently serving traffic for this app + attr_accessor :targeted_deployment_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_id' => :'appId', + :'deployments' => :'deployments', + :'targeted_deployment_id' => :'targetedDeploymentId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_id' => :'Object', + :'deployments' => :'Object', + :'targeted_deployment_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::AppStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::AppStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'deployments') + if (value = attributes[:'deployments']).is_a?(Array) + self.deployments = value + end + end + + if attributes.key?(:'targeted_deployment_id') + self.targeted_deployment_id = attributes[:'targeted_deployment_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + if @deployments.nil? + invalid_properties.push('invalid value for "deployments", deployments cannot be nil.') + end + + if @targeted_deployment_id.nil? + invalid_properties.push('invalid value for "targeted_deployment_id", targeted_deployment_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_id.nil? + return false if @deployments.nil? + return false if @targeted_deployment_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_id == o.app_id && + deployments == o.deployments && + targeted_deployment_id == o.targeted_deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_id, deployments, targeted_deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/boot_proof.rb b/turnkey_client/lib/turnkey_client/models/boot_proof.rb index 7111157..5ee1a64 100644 --- a/turnkey_client/lib/turnkey_client/models/boot_proof.rb +++ b/turnkey_client/lib/turnkey_client/models/boot_proof.rb @@ -18,10 +18,10 @@ class BootProof # The DER encoded COSE Sign1 struct Attestation doc. attr_accessor :aws_attestation_doc_b64 - # The borsch serialized base64 encoded Manifest. + # The base64 encoded QOS manifest. Encoding depends on qos_manifest_version. attr_accessor :qos_manifest_b64 - # The borsch serialized base64 encoded Manifest Envelope. + # The base64 encoded QOS manifest envelope. Encoding depends on qos_manifest_version. attr_accessor :qos_manifest_envelope_b64 # The label under which the enclave app was deployed. @@ -35,6 +35,9 @@ class BootProof attr_accessor :created_at + # QOS manifest schema version. + attr_accessor :qos_manifest_version + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -45,7 +48,8 @@ def self.attribute_map :'deployment_label' => :'deploymentLabel', :'enclave_app' => :'enclaveApp', :'owner' => :'owner', - :'created_at' => :'createdAt' + :'created_at' => :'createdAt', + :'qos_manifest_version' => :'qosManifestVersion' } end @@ -59,13 +63,15 @@ def self.openapi_types :'deployment_label' => :'Object', :'enclave_app' => :'Object', :'owner' => :'Object', - :'created_at' => :'Object' + :'created_at' => :'Object', + :'qos_manifest_version' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'qos_manifest_version' ]) end @@ -115,6 +121,10 @@ def initialize(attributes = {}) if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end + + if attributes.key?(:'qos_manifest_version') + self.qos_manifest_version = attributes[:'qos_manifest_version'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -182,7 +192,8 @@ def ==(o) deployment_label == o.deployment_label && enclave_app == o.enclave_app && owner == o.owner && - created_at == o.created_at + created_at == o.created_at && + qos_manifest_version == o.qos_manifest_version end # @see the `==` method @@ -194,7 +205,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [ephemeral_public_key_hex, aws_attestation_doc_b64, qos_manifest_b64, qos_manifest_envelope_b64, deployment_label, enclave_app, owner, created_at].hash + [ephemeral_public_key_hex, aws_attestation_doc_b64, qos_manifest_b64, qos_manifest_envelope_b64, deployment_label, enclave_app, owner, created_at, qos_manifest_version].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_oauth_providers_intent_v2.rb b/turnkey_client/lib/turnkey_client/models/create_oauth_providers_intent_v2.rb new file mode 100644 index 0000000..236026f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_oauth_providers_intent_v2.rb @@ -0,0 +1,228 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateOauthProvidersIntentV2 + # The ID of the User to add an Oauth provider to + attr_accessor :user_id + + # A list of Oauth providers. + attr_accessor :oauth_providers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'oauth_providers' => :'oauthProviders' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'Object', + :'oauth_providers' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateOauthProvidersIntentV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateOauthProvidersIntentV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'oauth_providers') + if (value = attributes[:'oauth_providers']).is_a?(Array) + self.oauth_providers = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @oauth_providers.nil? + invalid_properties.push('invalid value for "oauth_providers", oauth_providers cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @user_id.nil? + return false if @oauth_providers.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + oauth_providers == o.oauth_providers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, oauth_providers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_oauth_providers_request.rb b/turnkey_client/lib/turnkey_client/models/create_oauth_providers_request.rb index ea88cbd..4f3afb1 100644 --- a/turnkey_client/lib/turnkey_client/models/create_oauth_providers_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_oauth_providers_request.rb @@ -138,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -149,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/create_oauth_providers_result_v2.rb b/turnkey_client/lib/turnkey_client/models/create_oauth_providers_result_v2.rb new file mode 100644 index 0000000..afff33f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_oauth_providers_result_v2.rb @@ -0,0 +1,213 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateOauthProvidersResultV2 + # A list of unique identifiers for Oauth Providers + attr_accessor :provider_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'provider_ids' => :'providerIds' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'provider_ids' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateOauthProvidersResultV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateOauthProvidersResultV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'provider_ids') + if (value = attributes[:'provider_ids']).is_a?(Array) + self.provider_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @provider_ids.nil? + invalid_properties.push('invalid value for "provider_ids", provider_ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @provider_ids.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + provider_ids == o.provider_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [provider_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_read_write_session_intent_v2.rb b/turnkey_client/lib/turnkey_client/models/create_read_write_session_intent_v2.rb index 31fe1de..e826dc9 100644 --- a/turnkey_client/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +++ b/turnkey_client/lib/turnkey_client/models/create_read_write_session_intent_v2.rb @@ -15,7 +15,7 @@ class CreateReadWriteSessionIntentV2 # Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted. attr_accessor :target_public_key - # Unique identifier for a given User. + # Optional unique identifier for a given User. If none provided, the read write session will be created for the user who is making the request. attr_accessor :user_id # Optional human-readable name for an API Key. If none provided, default to Read Write Session - diff --git a/turnkey_client/lib/turnkey_client/models/create_sub_organization_intent_v8.rb b/turnkey_client/lib/turnkey_client/models/create_sub_organization_intent_v8.rb new file mode 100644 index 0000000..843e996 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_sub_organization_intent_v8.rb @@ -0,0 +1,316 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateSubOrganizationIntentV8 + # Name for this sub-organization + attr_accessor :sub_organization_name + + # Root users to create within this sub-organization + attr_accessor :root_users + + # The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users + attr_accessor :root_quorum_threshold + + attr_accessor :wallet + + # Disable email recovery for the sub-organization + attr_accessor :disable_email_recovery + + # Disable email auth for the sub-organization + attr_accessor :disable_email_auth + + # Disable OTP SMS auth for the sub-organization + attr_accessor :disable_sms_auth + + # Disable OTP email auth for the sub-organization + attr_accessor :disable_otp_email_auth + + # Signed JWT containing a unique id, expiry, verification type, contact + attr_accessor :verification_token + + attr_accessor :client_signature + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sub_organization_name' => :'subOrganizationName', + :'root_users' => :'rootUsers', + :'root_quorum_threshold' => :'rootQuorumThreshold', + :'wallet' => :'wallet', + :'disable_email_recovery' => :'disableEmailRecovery', + :'disable_email_auth' => :'disableEmailAuth', + :'disable_sms_auth' => :'disableSmsAuth', + :'disable_otp_email_auth' => :'disableOtpEmailAuth', + :'verification_token' => :'verificationToken', + :'client_signature' => :'clientSignature' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'sub_organization_name' => :'Object', + :'root_users' => :'Object', + :'root_quorum_threshold' => :'Object', + :'wallet' => :'Object', + :'disable_email_recovery' => :'Object', + :'disable_email_auth' => :'Object', + :'disable_sms_auth' => :'Object', + :'disable_otp_email_auth' => :'Object', + :'verification_token' => :'Object', + :'client_signature' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'disable_email_recovery', + :'disable_email_auth', + :'disable_sms_auth', + :'disable_otp_email_auth', + :'verification_token', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateSubOrganizationIntentV8` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateSubOrganizationIntentV8`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sub_organization_name') + self.sub_organization_name = attributes[:'sub_organization_name'] + end + + if attributes.key?(:'root_users') + if (value = attributes[:'root_users']).is_a?(Array) + self.root_users = value + end + end + + if attributes.key?(:'root_quorum_threshold') + self.root_quorum_threshold = attributes[:'root_quorum_threshold'] + end + + if attributes.key?(:'wallet') + self.wallet = attributes[:'wallet'] + end + + if attributes.key?(:'disable_email_recovery') + self.disable_email_recovery = attributes[:'disable_email_recovery'] + end + + if attributes.key?(:'disable_email_auth') + self.disable_email_auth = attributes[:'disable_email_auth'] + end + + if attributes.key?(:'disable_sms_auth') + self.disable_sms_auth = attributes[:'disable_sms_auth'] + end + + if attributes.key?(:'disable_otp_email_auth') + self.disable_otp_email_auth = attributes[:'disable_otp_email_auth'] + end + + if attributes.key?(:'verification_token') + self.verification_token = attributes[:'verification_token'] + end + + if attributes.key?(:'client_signature') + self.client_signature = attributes[:'client_signature'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @sub_organization_name.nil? + invalid_properties.push('invalid value for "sub_organization_name", sub_organization_name cannot be nil.') + end + + if @root_users.nil? + invalid_properties.push('invalid value for "root_users", root_users cannot be nil.') + end + + if @root_quorum_threshold.nil? + invalid_properties.push('invalid value for "root_quorum_threshold", root_quorum_threshold cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @sub_organization_name.nil? + return false if @root_users.nil? + return false if @root_quorum_threshold.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sub_organization_name == o.sub_organization_name && + root_users == o.root_users && + root_quorum_threshold == o.root_quorum_threshold && + wallet == o.wallet && + disable_email_recovery == o.disable_email_recovery && + disable_email_auth == o.disable_email_auth && + disable_sms_auth == o.disable_sms_auth && + disable_otp_email_auth == o.disable_otp_email_auth && + verification_token == o.verification_token && + client_signature == o.client_signature + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sub_organization_name, root_users, root_quorum_threshold, wallet, disable_email_recovery, disable_email_auth, disable_sms_auth, disable_otp_email_auth, verification_token, client_signature].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_sub_organization_request.rb b/turnkey_client/lib/turnkey_client/models/create_sub_organization_request.rb index af4dbcf..2e0a71a 100644 --- a/turnkey_client/lib/turnkey_client/models/create_sub_organization_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_sub_organization_request.rb @@ -138,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -149,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/create_sub_organization_result_v8.rb b/turnkey_client/lib/turnkey_client/models/create_sub_organization_result_v8.rb new file mode 100644 index 0000000..d92323c --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_sub_organization_result_v8.rb @@ -0,0 +1,230 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateSubOrganizationResultV8 + attr_accessor :sub_organization_id + + attr_accessor :wallet + + attr_accessor :root_user_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sub_organization_id' => :'subOrganizationId', + :'wallet' => :'wallet', + :'root_user_ids' => :'rootUserIds' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'sub_organization_id' => :'Object', + :'wallet' => :'Object', + :'root_user_ids' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateSubOrganizationResultV8` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateSubOrganizationResultV8`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sub_organization_id') + self.sub_organization_id = attributes[:'sub_organization_id'] + end + + if attributes.key?(:'wallet') + self.wallet = attributes[:'wallet'] + end + + if attributes.key?(:'root_user_ids') + if (value = attributes[:'root_user_ids']).is_a?(Array) + self.root_user_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @sub_organization_id.nil? + invalid_properties.push('invalid value for "sub_organization_id", sub_organization_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @sub_organization_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sub_organization_id == o.sub_organization_id && + wallet == o.wallet && + root_user_ids == o.root_user_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sub_organization_id, wallet, root_user_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_app_intent.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_app_intent.rb index df9412e..7efbdaf 100644 --- a/turnkey_client/lib/turnkey_client/models/create_tvc_app_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_app_intent.rb @@ -28,8 +28,8 @@ class CreateTvcAppIntent attr_accessor :share_set_params - # Enables external connectivity for this TVC app. Default if not provided: false. - attr_accessor :external_connectivity + # Enables network egress for this TVC app. Default if not provided: false. + attr_accessor :enable_egress # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map @@ -40,7 +40,7 @@ def self.attribute_map :'manifest_set_params' => :'manifestSetParams', :'share_set_id' => :'shareSetId', :'share_set_params' => :'shareSetParams', - :'external_connectivity' => :'externalConnectivity' + :'enable_egress' => :'enableEgress' } end @@ -53,7 +53,7 @@ def self.openapi_types :'manifest_set_params' => :'Object', :'share_set_id' => :'Object', :'share_set_params' => :'Object', - :'external_connectivity' => :'Object' + :'enable_egress' => :'Object' } end @@ -62,7 +62,7 @@ def self.openapi_nullable Set.new([ :'manifest_set_id', :'share_set_id', - :'external_connectivity' + :'enable_egress' ]) end @@ -105,8 +105,8 @@ def initialize(attributes = {}) self.share_set_params = attributes[:'share_set_params'] end - if attributes.key?(:'external_connectivity') - self.external_connectivity = attributes[:'external_connectivity'] + if attributes.key?(:'enable_egress') + self.enable_egress = attributes[:'enable_egress'] end end @@ -144,7 +144,7 @@ def ==(o) manifest_set_params == o.manifest_set_params && share_set_id == o.share_set_id && share_set_params == o.share_set_params && - external_connectivity == o.external_connectivity + enable_egress == o.enable_egress end # @see the `==` method @@ -156,7 +156,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, quorum_public_key, manifest_set_id, manifest_set_params, share_set_id, share_set_params, external_connectivity].hash + [name, quorum_public_key, manifest_set_id, manifest_set_params, share_set_id, share_set_params, enable_egress].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_app_request.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_app_request.rb new file mode 100644 index 0000000..c8e7fcd --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_app_request.rb @@ -0,0 +1,288 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateTvcAppRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcAppRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcAppRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_TVC_APP']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_TVC_APP']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb index cf03f52..075c866 100644 --- a/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb @@ -30,23 +30,22 @@ class CreateTvcDeploymentIntent # Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity. attr_accessor :expected_pivot_digest - # URL of the container containing the host binary - attr_accessor :host_container_image_url - - # Location of the binary inside the host container - attr_accessor :host_path - - # Arguments to pass to the host binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"] - attr_accessor :host_args - # Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds. attr_accessor :nonce # Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty. attr_accessor :pivot_container_encrypted_pull_secret - # Optional encrypted pull secret to authorize Turnkey to pull the host container image. If your image is public, leave this empty. - attr_accessor :host_container_encrypted_pull_secret + # Optional flag to indicate whether to deploy the TVC app in debug mode, which includes additional logging and debugging tools. Default is false. + attr_accessor :debug_mode + + attr_accessor :health_check_type + + # Port to use for health checks. + attr_accessor :health_check_port + + # Port to use for public ingress. + attr_accessor :public_ingress_port # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map @@ -57,12 +56,12 @@ def self.attribute_map :'pivot_path' => :'pivotPath', :'pivot_args' => :'pivotArgs', :'expected_pivot_digest' => :'expectedPivotDigest', - :'host_container_image_url' => :'hostContainerImageUrl', - :'host_path' => :'hostPath', - :'host_args' => :'hostArgs', :'nonce' => :'nonce', :'pivot_container_encrypted_pull_secret' => :'pivotContainerEncryptedPullSecret', - :'host_container_encrypted_pull_secret' => :'hostContainerEncryptedPullSecret' + :'debug_mode' => :'debugMode', + :'health_check_type' => :'healthCheckType', + :'health_check_port' => :'healthCheckPort', + :'public_ingress_port' => :'publicIngressPort' } end @@ -75,12 +74,12 @@ def self.openapi_types :'pivot_path' => :'Object', :'pivot_args' => :'Object', :'expected_pivot_digest' => :'Object', - :'host_container_image_url' => :'Object', - :'host_path' => :'Object', - :'host_args' => :'Object', :'nonce' => :'Object', :'pivot_container_encrypted_pull_secret' => :'Object', - :'host_container_encrypted_pull_secret' => :'Object' + :'debug_mode' => :'Object', + :'health_check_type' => :'Object', + :'health_check_port' => :'Object', + :'public_ingress_port' => :'Object' } end @@ -89,7 +88,7 @@ def self.openapi_nullable Set.new([ :'nonce', :'pivot_container_encrypted_pull_secret', - :'host_container_encrypted_pull_secret' + :'debug_mode', ]) end @@ -134,30 +133,28 @@ def initialize(attributes = {}) self.expected_pivot_digest = attributes[:'expected_pivot_digest'] end - if attributes.key?(:'host_container_image_url') - self.host_container_image_url = attributes[:'host_container_image_url'] + if attributes.key?(:'nonce') + self.nonce = attributes[:'nonce'] end - if attributes.key?(:'host_path') - self.host_path = attributes[:'host_path'] + if attributes.key?(:'pivot_container_encrypted_pull_secret') + self.pivot_container_encrypted_pull_secret = attributes[:'pivot_container_encrypted_pull_secret'] end - if attributes.key?(:'host_args') - if (value = attributes[:'host_args']).is_a?(Array) - self.host_args = value - end + if attributes.key?(:'debug_mode') + self.debug_mode = attributes[:'debug_mode'] end - if attributes.key?(:'nonce') - self.nonce = attributes[:'nonce'] + if attributes.key?(:'health_check_type') + self.health_check_type = attributes[:'health_check_type'] end - if attributes.key?(:'pivot_container_encrypted_pull_secret') - self.pivot_container_encrypted_pull_secret = attributes[:'pivot_container_encrypted_pull_secret'] + if attributes.key?(:'health_check_port') + self.health_check_port = attributes[:'health_check_port'] end - if attributes.key?(:'host_container_encrypted_pull_secret') - self.host_container_encrypted_pull_secret = attributes[:'host_container_encrypted_pull_secret'] + if attributes.key?(:'public_ingress_port') + self.public_ingress_port = attributes[:'public_ingress_port'] end end @@ -189,16 +186,16 @@ def list_invalid_properties invalid_properties.push('invalid value for "expected_pivot_digest", expected_pivot_digest cannot be nil.') end - if @host_container_image_url.nil? - invalid_properties.push('invalid value for "host_container_image_url", host_container_image_url cannot be nil.') + if @health_check_type.nil? + invalid_properties.push('invalid value for "health_check_type", health_check_type cannot be nil.') end - if @host_path.nil? - invalid_properties.push('invalid value for "host_path", host_path cannot be nil.') + if @health_check_port.nil? + invalid_properties.push('invalid value for "health_check_port", health_check_port cannot be nil.') end - if @host_args.nil? - invalid_properties.push('invalid value for "host_args", host_args cannot be nil.') + if @public_ingress_port.nil? + invalid_properties.push('invalid value for "public_ingress_port", public_ingress_port cannot be nil.') end invalid_properties @@ -213,9 +210,9 @@ def valid? return false if @pivot_path.nil? return false if @pivot_args.nil? return false if @expected_pivot_digest.nil? - return false if @host_container_image_url.nil? - return false if @host_path.nil? - return false if @host_args.nil? + return false if @health_check_type.nil? + return false if @health_check_port.nil? + return false if @public_ingress_port.nil? true end @@ -230,12 +227,12 @@ def ==(o) pivot_path == o.pivot_path && pivot_args == o.pivot_args && expected_pivot_digest == o.expected_pivot_digest && - host_container_image_url == o.host_container_image_url && - host_path == o.host_path && - host_args == o.host_args && nonce == o.nonce && pivot_container_encrypted_pull_secret == o.pivot_container_encrypted_pull_secret && - host_container_encrypted_pull_secret == o.host_container_encrypted_pull_secret + debug_mode == o.debug_mode && + health_check_type == o.health_check_type && + health_check_port == o.health_check_port && + public_ingress_port == o.public_ingress_port end # @see the `==` method @@ -247,7 +244,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [app_id, qos_version, pivot_container_image_url, pivot_path, pivot_args, expected_pivot_digest, host_container_image_url, host_path, host_args, nonce, pivot_container_encrypted_pull_secret, host_container_encrypted_pull_secret].hash + [app_id, qos_version, pivot_container_image_url, pivot_path, pivot_args, expected_pivot_digest, nonce, pivot_container_encrypted_pull_secret, debug_mode, health_check_type, health_check_port, public_ingress_port].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_request.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_request.rb new file mode 100644 index 0000000..7ba4929 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_request.rb @@ -0,0 +1,288 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateTvcDeploymentRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcDeploymentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcDeploymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_request.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_request.rb new file mode 100644 index 0000000..06083e1 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_request.rb @@ -0,0 +1,288 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateTvcManifestApprovalsRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcManifestApprovalsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcManifestApprovalsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_users_intent_v4.rb b/turnkey_client/lib/turnkey_client/models/create_users_intent_v4.rb new file mode 100644 index 0000000..be2985b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_users_intent_v4.rb @@ -0,0 +1,213 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateUsersIntentV4 + # A list of Users. + attr_accessor :users + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'users' => :'users' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'users' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateUsersIntentV4` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateUsersIntentV4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @users.nil? + invalid_properties.push('invalid value for "users", users cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @users.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + users == o.users + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [users].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_users_request.rb b/turnkey_client/lib/turnkey_client/models/create_users_request.rb index 3e84270..fea8bab 100644 --- a/turnkey_client/lib/turnkey_client/models/create_users_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_users_request.rb @@ -138,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_USERS_V3']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_USERS_V4']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -149,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_USERS_V3']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_USERS_V4']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_intent.rb b/turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_intent.rb new file mode 100644 index 0000000..d4b68b8 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_intent.rb @@ -0,0 +1,238 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateWebhookEndpointIntent + # The destination URL for webhook delivery. + attr_accessor :url + + # Human-readable name for this webhook endpoint. + attr_accessor :name + + # Event subscriptions to create for this endpoint. + attr_accessor :subscriptions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url' => :'url', + :'name' => :'name', + :'subscriptions' => :'subscriptions' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'url' => :'Object', + :'name' => :'Object', + :'subscriptions' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateWebhookEndpointIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateWebhookEndpointIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'subscriptions') + if (value = attributes[:'subscriptions']).is_a?(Array) + self.subscriptions = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @url.nil? + invalid_properties.push('invalid value for "url", url cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @url.nil? + return false if @name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url == o.url && + name == o.name && + subscriptions == o.subscriptions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url, name, subscriptions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_request.rb b/turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_request.rb new file mode 100644 index 0000000..445ec09 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateWebhookEndpointRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateWebhookEndpointRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateWebhookEndpointRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_result.rb b/turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_result.rb new file mode 100644 index 0000000..6cf7144 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_webhook_endpoint_result.rb @@ -0,0 +1,225 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateWebhookEndpointResult + # Unique identifier of the created webhook endpoint. + attr_accessor :endpoint_id + + attr_accessor :webhook_endpoint + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'endpoint_id' => :'endpointId', + :'webhook_endpoint' => :'webhookEndpoint' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'endpoint_id' => :'Object', + :'webhook_endpoint' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateWebhookEndpointResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateWebhookEndpointResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'endpoint_id') + self.endpoint_id = attributes[:'endpoint_id'] + end + + if attributes.key?(:'webhook_endpoint') + self.webhook_endpoint = attributes[:'webhook_endpoint'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @endpoint_id.nil? + invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.') + end + + if @webhook_endpoint.nil? + invalid_properties.push('invalid value for "webhook_endpoint", webhook_endpoint cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @endpoint_id.nil? + return false if @webhook_endpoint.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + endpoint_id == o.endpoint_id && + webhook_endpoint == o.webhook_endpoint + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [endpoint_id, webhook_endpoint].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_intent.rb b/turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_intent.rb new file mode 100644 index 0000000..f50f691 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_intent.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteTvcAppAndDeploymentsIntent + # The unique identifier of the TVC app to delete. The app and all associated deployments will be removed. + attr_accessor :app_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_id' => :'appId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteTvcAppAndDeploymentsIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteTvcAppAndDeploymentsIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_id == o.app_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_request.rb b/turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_request.rb new file mode 100644 index 0000000..7d6e7af --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteTvcAppAndDeploymentsRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteTvcAppAndDeploymentsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteTvcAppAndDeploymentsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_result.rb b/turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_result.rb new file mode 100644 index 0000000..0ed7d75 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_tvc_app_and_deployments_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteTvcAppAndDeploymentsResult + # The unique identifier of the deleted TVC app. + attr_accessor :app_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_id' => :'appId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteTvcAppAndDeploymentsResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteTvcAppAndDeploymentsResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_id == o.app_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_intent.rb b/turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_intent.rb new file mode 100644 index 0000000..5eac699 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_intent.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteTvcDeploymentIntent + # The unique identifier of the TVC deployment to delete. + attr_accessor :deployment_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deployment_id' => :'deploymentId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'deployment_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteTvcDeploymentIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteTvcDeploymentIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @deployment_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deployment_id == o.deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_request.rb b/turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_request.rb new file mode 100644 index 0000000..4fd38e8 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteTvcDeploymentRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteTvcDeploymentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteTvcDeploymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_result.rb b/turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_result.rb new file mode 100644 index 0000000..f2ec0ea --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_tvc_deployment_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteTvcDeploymentResult + # The unique identifier of the deleted TVC deployment. + attr_accessor :deployment_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deployment_id' => :'deploymentId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'deployment_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteTvcDeploymentResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteTvcDeploymentResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @deployment_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deployment_id == o.deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_intent.rb b/turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_intent.rb new file mode 100644 index 0000000..d60cfd6 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_intent.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteWebhookEndpointIntent + # Unique identifier of the webhook endpoint to delete. + attr_accessor :endpoint_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'endpoint_id' => :'endpointId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'endpoint_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteWebhookEndpointIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteWebhookEndpointIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'endpoint_id') + self.endpoint_id = attributes[:'endpoint_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @endpoint_id.nil? + invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @endpoint_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + endpoint_id == o.endpoint_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [endpoint_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_request.rb b/turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_request.rb new file mode 100644 index 0000000..bc7fb75 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteWebhookEndpointRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteWebhookEndpointRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteWebhookEndpointRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_result.rb b/turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_result.rb new file mode 100644 index 0000000..abe4f6b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_webhook_endpoint_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteWebhookEndpointResult + # Unique identifier of the deleted webhook endpoint. + attr_accessor :endpoint_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'endpoint_id' => :'endpointId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'endpoint_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteWebhookEndpointResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteWebhookEndpointResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'endpoint_id') + self.endpoint_id = attributes[:'endpoint_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @endpoint_id.nil? + invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @endpoint_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + endpoint_id == o.endpoint_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [endpoint_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/deployment_status.rb b/turnkey_client/lib/turnkey_client/models/deployment_status.rb new file mode 100644 index 0000000..7a3b07e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/deployment_status.rb @@ -0,0 +1,255 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeploymentStatus + # Unique identifier for this deployment (corresponds to k8s deployment label) + attr_accessor :deployment_id + + # Number of ready replicas + attr_accessor :ready_replicas + + # Desired number of replicas + attr_accessor :desired_replicas + + attr_accessor :last_updated_time + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deployment_id' => :'deploymentId', + :'ready_replicas' => :'readyReplicas', + :'desired_replicas' => :'desiredReplicas', + :'last_updated_time' => :'lastUpdatedTime' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'deployment_id' => :'Object', + :'ready_replicas' => :'Object', + :'desired_replicas' => :'Object', + :'last_updated_time' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeploymentStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeploymentStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + + if attributes.key?(:'ready_replicas') + self.ready_replicas = attributes[:'ready_replicas'] + end + + if attributes.key?(:'desired_replicas') + self.desired_replicas = attributes[:'desired_replicas'] + end + + if attributes.key?(:'last_updated_time') + self.last_updated_time = attributes[:'last_updated_time'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + if @ready_replicas.nil? + invalid_properties.push('invalid value for "ready_replicas", ready_replicas cannot be nil.') + end + + if @desired_replicas.nil? + invalid_properties.push('invalid value for "desired_replicas", desired_replicas cannot be nil.') + end + + if @last_updated_time.nil? + invalid_properties.push('invalid value for "last_updated_time", last_updated_time cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @deployment_id.nil? + return false if @ready_replicas.nil? + return false if @desired_replicas.nil? + return false if @last_updated_time.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deployment_id == o.deployment_id && + ready_replicas == o.ready_replicas && + desired_replicas == o.desired_replicas && + last_updated_time == o.last_updated_time + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deployment_id, ready_replicas, desired_replicas, last_updated_time].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/eth_failure_details.rb b/turnkey_client/lib/turnkey_client/models/eth_failure_details.rb new file mode 100644 index 0000000..594ada9 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/eth_failure_details.rb @@ -0,0 +1,208 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EthFailureDetails + # Ethereum revert chain, ordered from outermost to innermost. + attr_accessor :revert_chain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'revert_chain' => :'revertChain' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'revert_chain' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EthFailureDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EthFailureDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'revert_chain') + if (value = attributes[:'revert_chain']).is_a?(Array) + self.revert_chain = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + revert_chain == o.revert_chain + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [revert_chain].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/eth_send_transaction_intent.rb b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_intent.rb index 8798651..13d3f44 100644 --- a/turnkey_client/lib/turnkey_client/models/eth_send_transaction_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_intent.rb @@ -42,6 +42,9 @@ class EthSendTransactionIntent # Maximum priority fee (tip) per gas unit in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions. attr_accessor :max_priority_fee_per_gas + # Unix timestamp in seconds for EIP-712 execution deadline. Only used when sponsor=true. + attr_accessor :deadline + # The gas station delegate contract nonce. Only used when sponsor=true. Include this if you want maximal security posture. attr_accessor :gas_station_nonce @@ -80,6 +83,7 @@ def self.attribute_map :'gas_limit' => :'gasLimit', :'max_fee_per_gas' => :'maxFeePerGas', :'max_priority_fee_per_gas' => :'maxPriorityFeePerGas', + :'deadline' => :'deadline', :'gas_station_nonce' => :'gasStationNonce' } end @@ -97,6 +101,7 @@ def self.openapi_types :'gas_limit' => :'Object', :'max_fee_per_gas' => :'Object', :'max_priority_fee_per_gas' => :'Object', + :'deadline' => :'Object', :'gas_station_nonce' => :'Object' } end @@ -111,6 +116,7 @@ def self.openapi_nullable :'gas_limit', :'max_fee_per_gas', :'max_priority_fee_per_gas', + :'deadline', :'gas_station_nonce' ]) end @@ -170,6 +176,10 @@ def initialize(attributes = {}) self.max_priority_fee_per_gas = attributes[:'max_priority_fee_per_gas'] end + if attributes.key?(:'deadline') + self.deadline = attributes[:'deadline'] + end + if attributes.key?(:'gas_station_nonce') self.gas_station_nonce = attributes[:'gas_station_nonce'] end @@ -230,6 +240,7 @@ def ==(o) gas_limit == o.gas_limit && max_fee_per_gas == o.max_fee_per_gas && max_priority_fee_per_gas == o.max_priority_fee_per_gas && + deadline == o.deadline && gas_station_nonce == o.gas_station_nonce end @@ -242,7 +253,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [from, sponsor, caip2, to, value, data, nonce, gas_limit, max_fee_per_gas, max_priority_fee_per_gas, gas_station_nonce].hash + [from, sponsor, caip2, to, value, data, nonce, gas_limit, max_fee_per_gas, max_priority_fee_per_gas, deadline, gas_station_nonce].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/feature_name.rb b/turnkey_client/lib/turnkey_client/models/feature_name.rb index 8a8e560..cfa8fda 100644 --- a/turnkey_client/lib/turnkey_client/models/feature_name.rb +++ b/turnkey_client/lib/turnkey_client/models/feature_name.rb @@ -20,6 +20,7 @@ class FeatureName SMS_AUTH = 'FEATURE_NAME_SMS_AUTH'.freeze OTP_EMAIL_AUTH = 'FEATURE_NAME_OTP_EMAIL_AUTH'.freeze AUTH_PROXY = 'FEATURE_NAME_AUTH_PROXY'.freeze + SOLANA_RENT_PREFUND_ENABLED = 'FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED'.freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/turnkey_client/lib/turnkey_client/models/get_app_status_request.rb b/turnkey_client/lib/turnkey_client/models/get_app_status_request.rb new file mode 100644 index 0000000..219e0c6 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_app_status_request.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetAppStatusRequest + # Unique identifier for a given Organization. + attr_accessor :organization_id + + # Unique identifier for a given TVC App. + attr_accessor :app_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'app_id' => :'appId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'app_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetAppStatusRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetAppStatusRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @app_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + app_id == o.app_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, app_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_app_status_response.rb b/turnkey_client/lib/turnkey_client/models/get_app_status_response.rb new file mode 100644 index 0000000..62a6e88 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_app_status_response.rb @@ -0,0 +1,210 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetAppStatusResponse + attr_accessor :app_status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_status' => :'appStatus' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_status' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetAppStatusResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetAppStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_status') + self.app_status = attributes[:'app_status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_status.nil? + invalid_properties.push('invalid value for "app_status", app_status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_status == o.app_status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_ip_allowlist_request.rb b/turnkey_client/lib/turnkey_client/models/get_ip_allowlist_request.rb new file mode 100644 index 0000000..e22cd6e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_ip_allowlist_request.rb @@ -0,0 +1,222 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetIpAllowlistRequest + # Unique identifier for a given organization. + attr_accessor :organization_id + + # If provided, return only the allowlist for this specific API key. + attr_accessor :public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'public_key' => :'publicKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'public_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'public_key' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetIpAllowlistRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetIpAllowlistRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + public_key == o.public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_ip_allowlist_response.rb b/turnkey_client/lib/turnkey_client/models/get_ip_allowlist_response.rb new file mode 100644 index 0000000..c117bf9 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_ip_allowlist_response.rb @@ -0,0 +1,210 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetIpAllowlistResponse + attr_accessor :allowlist + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'allowlist' => :'allowlist' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'allowlist' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetIpAllowlistResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetIpAllowlistResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'allowlist') + self.allowlist = attributes[:'allowlist'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @allowlist.nil? + invalid_properties.push('invalid value for "allowlist", allowlist cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @allowlist.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + allowlist == o.allowlist + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [allowlist].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_response.rb b/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_response.rb index 8746646..235ce91 100644 --- a/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_response.rb +++ b/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_response.rb @@ -17,6 +17,8 @@ class GetSendTransactionStatusResponse attr_accessor :eth + attr_accessor :solana + # The error encountered when broadcasting or confirming the transaction, if any. attr_accessor :tx_error @@ -27,6 +29,7 @@ def self.attribute_map { :'tx_status' => :'txStatus', :'eth' => :'eth', + :'solana' => :'solana', :'tx_error' => :'txError', :'error' => :'error' } @@ -37,6 +40,7 @@ def self.openapi_types { :'tx_status' => :'Object', :'eth' => :'Object', + :'solana' => :'Object', :'tx_error' => :'Object', :'error' => :'Object' } @@ -72,6 +76,10 @@ def initialize(attributes = {}) self.eth = attributes[:'eth'] end + if attributes.key?(:'solana') + self.solana = attributes[:'solana'] + end + if attributes.key?(:'tx_error') self.tx_error = attributes[:'tx_error'] end @@ -106,6 +114,7 @@ def ==(o) self.class == o.class && tx_status == o.tx_status && eth == o.eth && + solana == o.solana && tx_error == o.tx_error && error == o.error end @@ -119,7 +128,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [tx_status, eth, tx_error, error].hash + [tx_status, eth, solana, tx_error, error].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/get_tvc_app_deployments_request.rb b/turnkey_client/lib/turnkey_client/models/get_tvc_app_deployments_request.rb new file mode 100644 index 0000000..62872a4 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_tvc_app_deployments_request.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetTvcAppDeploymentsRequest + # Unique identifier for a given organization. + attr_accessor :organization_id + + # Unique identifier for a given TVC App. + attr_accessor :app_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'app_id' => :'appId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'app_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcAppDeploymentsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcAppDeploymentsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @app_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + app_id == o.app_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, app_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_tvc_app_deployments_response.rb b/turnkey_client/lib/turnkey_client/models/get_tvc_app_deployments_response.rb new file mode 100644 index 0000000..18207f7 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_tvc_app_deployments_response.rb @@ -0,0 +1,213 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetTvcAppDeploymentsResponse + # List of deployments for this TVC App + attr_accessor :tvc_deployments + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tvc_deployments' => :'tvcDeployments' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'tvc_deployments' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcAppDeploymentsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcAppDeploymentsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tvc_deployments') + if (value = attributes[:'tvc_deployments']).is_a?(Array) + self.tvc_deployments = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @tvc_deployments.nil? + invalid_properties.push('invalid value for "tvc_deployments", tvc_deployments cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @tvc_deployments.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tvc_deployments == o.tvc_deployments + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tvc_deployments].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_tvc_app_request.rb b/turnkey_client/lib/turnkey_client/models/get_tvc_app_request.rb new file mode 100644 index 0000000..bf4a951 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_tvc_app_request.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetTvcAppRequest + # Unique identifier for a given organization. + attr_accessor :organization_id + + # Unique identifier for a given TVC App. + attr_accessor :tvc_app_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'tvc_app_id' => :'tvcAppId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'tvc_app_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcAppRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcAppRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'tvc_app_id') + self.tvc_app_id = attributes[:'tvc_app_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @tvc_app_id.nil? + invalid_properties.push('invalid value for "tvc_app_id", tvc_app_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @tvc_app_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + tvc_app_id == o.tvc_app_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, tvc_app_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_tvc_app_response.rb b/turnkey_client/lib/turnkey_client/models/get_tvc_app_response.rb new file mode 100644 index 0000000..87694ee --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_tvc_app_response.rb @@ -0,0 +1,210 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetTvcAppResponse + attr_accessor :tvc_app + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tvc_app' => :'tvcApp' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'tvc_app' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcAppResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcAppResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tvc_app') + self.tvc_app = attributes[:'tvc_app'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @tvc_app.nil? + invalid_properties.push('invalid value for "tvc_app", tvc_app cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @tvc_app.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tvc_app == o.tvc_app + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tvc_app].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_tvc_apps_request.rb b/turnkey_client/lib/turnkey_client/models/get_tvc_apps_request.rb new file mode 100644 index 0000000..3512579 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_tvc_apps_request.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetTvcAppsRequest + # Unique identifier for a given organization. + attr_accessor :organization_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcAppsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcAppsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_tvc_apps_response.rb b/turnkey_client/lib/turnkey_client/models/get_tvc_apps_response.rb new file mode 100644 index 0000000..ace28b6 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_tvc_apps_response.rb @@ -0,0 +1,213 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetTvcAppsResponse + # A list of TVC Apps. + attr_accessor :tvc_apps + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tvc_apps' => :'tvcApps' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'tvc_apps' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcAppsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcAppsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tvc_apps') + if (value = attributes[:'tvc_apps']).is_a?(Array) + self.tvc_apps = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @tvc_apps.nil? + invalid_properties.push('invalid value for "tvc_apps", tvc_apps cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @tvc_apps.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tvc_apps == o.tvc_apps + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tvc_apps].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_tvc_deployment_request.rb b/turnkey_client/lib/turnkey_client/models/get_tvc_deployment_request.rb new file mode 100644 index 0000000..fc0d4b3 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_tvc_deployment_request.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetTvcDeploymentRequest + # Unique identifier for a given organization. + attr_accessor :organization_id + + # Unique identifier for a given TVC Deployment. + attr_accessor :deployment_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'deployment_id' => :'deploymentId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'deployment_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcDeploymentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcDeploymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @deployment_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + deployment_id == o.deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_tvc_deployment_response.rb b/turnkey_client/lib/turnkey_client/models/get_tvc_deployment_response.rb new file mode 100644 index 0000000..6b90c9b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_tvc_deployment_response.rb @@ -0,0 +1,210 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetTvcDeploymentResponse + attr_accessor :tvc_deployment + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tvc_deployment' => :'tvcDeployment' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'tvc_deployment' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcDeploymentResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcDeploymentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tvc_deployment') + self.tvc_deployment = attributes[:'tvc_deployment'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @tvc_deployment.nil? + invalid_properties.push('invalid value for "tvc_deployment", tvc_deployment cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @tvc_deployment.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tvc_deployment == o.tvc_deployment + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tvc_deployment].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_request.rb b/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_request.rb index d7038b4..f905df7 100644 --- a/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_request.rb +++ b/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_request.rb @@ -15,10 +15,10 @@ class GetWalletAddressBalancesRequest # Unique identifier for a given organization. attr_accessor :organization_id - # Address corresponding to a wallet account. + # Address corresponding to a wallet account. Private key addresses are not supported. attr_accessor :address - # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet). + # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet or 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values. attr_accessor :caip2 class EnumAttributeValidator @@ -120,7 +120,7 @@ def valid? return false if @organization_id.nil? return false if @address.nil? return false if @caip2.nil? - caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002', 'eip155:42161', 'eip155:421614', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1']) return false unless caip2_validator.valid?(@caip2) true end @@ -128,7 +128,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] caip2 Object to be assigned def caip2=(caip2) - validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002', 'eip155:42161', 'eip155:421614', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1']) unless validator.valid?(caip2) fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent.rb b/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent.rb index ec23982..4739f2c 100644 --- a/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent.rb @@ -12,7 +12,7 @@ module TurnkeyClient class InitOtpAuthIntent - # Enum to specifiy whether to send OTP via SMS or email + # Enum to specify whether to send OTP via SMS or email attr_accessor :otp_type # Email or phone number to send the OTP code to diff --git a/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent_v2.rb b/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent_v2.rb index c2200b7..33eaef8 100644 --- a/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +++ b/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent_v2.rb @@ -12,7 +12,7 @@ module TurnkeyClient class InitOtpAuthIntentV2 - # Enum to specifiy whether to send OTP via SMS or email + # Enum to specify whether to send OTP via SMS or email attr_accessor :otp_type # Email or phone number to send the OTP code to diff --git a/turnkey_client/lib/turnkey_client/models/init_otp_intent_v3.rb b/turnkey_client/lib/turnkey_client/models/init_otp_intent_v3.rb new file mode 100644 index 0000000..571b269 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/init_otp_intent_v3.rb @@ -0,0 +1,336 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class InitOtpIntentV3 + # Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL + attr_accessor :otp_type + + # Email or phone number to send the OTP code to + attr_accessor :contact + + # The name of the application. + attr_accessor :app_name + + # Optional length of the OTP code. Default = 9 + attr_accessor :otp_length + + attr_accessor :email_customization + + attr_accessor :sms_customization + + # Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address. + attr_accessor :user_identifier + + # Optional custom email address from which to send the OTP email + attr_accessor :send_from_email_address + + # Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). If set to false, OTP code will only be numeric. Default = true + attr_accessor :alphanumeric + + # Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications' + attr_accessor :send_from_email_sender_name + + # Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes) + attr_accessor :expiration_seconds + + # Optional custom email address to use as reply-to + attr_accessor :reply_to_email_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'otp_type' => :'otpType', + :'contact' => :'contact', + :'app_name' => :'appName', + :'otp_length' => :'otpLength', + :'email_customization' => :'emailCustomization', + :'sms_customization' => :'smsCustomization', + :'user_identifier' => :'userIdentifier', + :'send_from_email_address' => :'sendFromEmailAddress', + :'alphanumeric' => :'alphanumeric', + :'send_from_email_sender_name' => :'sendFromEmailSenderName', + :'expiration_seconds' => :'expirationSeconds', + :'reply_to_email_address' => :'replyToEmailAddress' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'otp_type' => :'Object', + :'contact' => :'Object', + :'app_name' => :'Object', + :'otp_length' => :'Object', + :'email_customization' => :'Object', + :'sms_customization' => :'Object', + :'user_identifier' => :'Object', + :'send_from_email_address' => :'Object', + :'alphanumeric' => :'Object', + :'send_from_email_sender_name' => :'Object', + :'expiration_seconds' => :'Object', + :'reply_to_email_address' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'otp_length', + :'user_identifier', + :'send_from_email_address', + :'alphanumeric', + :'send_from_email_sender_name', + :'expiration_seconds', + :'reply_to_email_address' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::InitOtpIntentV3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::InitOtpIntentV3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp_type') + self.otp_type = attributes[:'otp_type'] + end + + if attributes.key?(:'contact') + self.contact = attributes[:'contact'] + end + + if attributes.key?(:'app_name') + self.app_name = attributes[:'app_name'] + end + + if attributes.key?(:'otp_length') + self.otp_length = attributes[:'otp_length'] + end + + if attributes.key?(:'email_customization') + self.email_customization = attributes[:'email_customization'] + end + + if attributes.key?(:'sms_customization') + self.sms_customization = attributes[:'sms_customization'] + end + + if attributes.key?(:'user_identifier') + self.user_identifier = attributes[:'user_identifier'] + end + + if attributes.key?(:'send_from_email_address') + self.send_from_email_address = attributes[:'send_from_email_address'] + end + + if attributes.key?(:'alphanumeric') + self.alphanumeric = attributes[:'alphanumeric'] + end + + if attributes.key?(:'send_from_email_sender_name') + self.send_from_email_sender_name = attributes[:'send_from_email_sender_name'] + end + + if attributes.key?(:'expiration_seconds') + self.expiration_seconds = attributes[:'expiration_seconds'] + end + + if attributes.key?(:'reply_to_email_address') + self.reply_to_email_address = attributes[:'reply_to_email_address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @otp_type.nil? + invalid_properties.push('invalid value for "otp_type", otp_type cannot be nil.') + end + + if @contact.nil? + invalid_properties.push('invalid value for "contact", contact cannot be nil.') + end + + if @app_name.nil? + invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @otp_type.nil? + return false if @contact.nil? + return false if @app_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + otp_type == o.otp_type && + contact == o.contact && + app_name == o.app_name && + otp_length == o.otp_length && + email_customization == o.email_customization && + sms_customization == o.sms_customization && + user_identifier == o.user_identifier && + send_from_email_address == o.send_from_email_address && + alphanumeric == o.alphanumeric && + send_from_email_sender_name == o.send_from_email_sender_name && + expiration_seconds == o.expiration_seconds && + reply_to_email_address == o.reply_to_email_address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [otp_type, contact, app_name, otp_length, email_customization, sms_customization, user_identifier, send_from_email_address, alphanumeric, send_from_email_sender_name, expiration_seconds, reply_to_email_address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/init_otp_request.rb b/turnkey_client/lib/turnkey_client/models/init_otp_request.rb index 774e109..8432e42 100644 --- a/turnkey_client/lib/turnkey_client/models/init_otp_request.rb +++ b/turnkey_client/lib/turnkey_client/models/init_otp_request.rb @@ -138,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_V2']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_V3']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -149,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_V2']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_V3']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/init_otp_result_v2.rb b/turnkey_client/lib/turnkey_client/models/init_otp_result_v2.rb new file mode 100644 index 0000000..a7a9461 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/init_otp_result_v2.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class InitOtpResultV2 + # Unique identifier for an OTP flow + attr_accessor :otp_id + + # Signed bundle containing a target encryption key to use when submitting OTP codes. + attr_accessor :otp_encryption_target_bundle + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'otp_id' => :'otpId', + :'otp_encryption_target_bundle' => :'otpEncryptionTargetBundle' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'otp_id' => :'Object', + :'otp_encryption_target_bundle' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::InitOtpResultV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::InitOtpResultV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp_id') + self.otp_id = attributes[:'otp_id'] + end + + if attributes.key?(:'otp_encryption_target_bundle') + self.otp_encryption_target_bundle = attributes[:'otp_encryption_target_bundle'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @otp_id.nil? + invalid_properties.push('invalid value for "otp_id", otp_id cannot be nil.') + end + + if @otp_encryption_target_bundle.nil? + invalid_properties.push('invalid value for "otp_encryption_target_bundle", otp_encryption_target_bundle cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @otp_id.nil? + return false if @otp_encryption_target_bundle.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + otp_id == o.otp_id && + otp_encryption_target_bundle == o.otp_encryption_target_bundle + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [otp_id, otp_encryption_target_bundle].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/intent.rb b/turnkey_client/lib/turnkey_client/models/intent.rb index 1891f6b..c147ad2 100644 --- a/turnkey_client/lib/turnkey_client/models/intent.rb +++ b/turnkey_client/lib/turnkey_client/models/intent.rb @@ -246,6 +246,48 @@ class Intent attr_accessor :sol_send_transaction_intent + attr_accessor :init_otp_intent_v3 + + attr_accessor :verify_otp_intent_v2 + + attr_accessor :otp_login_intent_v2 + + attr_accessor :update_organization_name_intent + + attr_accessor :create_sub_organization_intent_v8 + + attr_accessor :create_oauth_providers_intent_v2 + + attr_accessor :create_users_intent_v4 + + attr_accessor :create_webhook_endpoint_intent + + attr_accessor :update_webhook_endpoint_intent + + attr_accessor :delete_webhook_endpoint_intent + + attr_accessor :set_ip_allowlist_intent + + attr_accessor :remove_ip_allowlist_intent + + attr_accessor :update_tvc_app_live_deployment_intent + + attr_accessor :delete_tvc_deployment_intent + + attr_accessor :delete_tvc_app_and_deployments_intent + + attr_accessor :restore_tvc_deployment_intent + + attr_accessor :spark_sign_frost_intent + + attr_accessor :spark_prepare_transfer_intent + + attr_accessor :spark_claim_transfer_intent + + attr_accessor :spark_prepare_lightning_receive_intent + + attr_accessor :post_tvc_quorum_key_share_intent + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -365,7 +407,28 @@ def self.attribute_map :'create_tvc_app_intent' => :'createTvcAppIntent', :'create_tvc_deployment_intent' => :'createTvcDeploymentIntent', :'create_tvc_manifest_approvals_intent' => :'createTvcManifestApprovalsIntent', - :'sol_send_transaction_intent' => :'solSendTransactionIntent' + :'sol_send_transaction_intent' => :'solSendTransactionIntent', + :'init_otp_intent_v3' => :'initOtpIntentV3', + :'verify_otp_intent_v2' => :'verifyOtpIntentV2', + :'otp_login_intent_v2' => :'otpLoginIntentV2', + :'update_organization_name_intent' => :'updateOrganizationNameIntent', + :'create_sub_organization_intent_v8' => :'createSubOrganizationIntentV8', + :'create_oauth_providers_intent_v2' => :'createOauthProvidersIntentV2', + :'create_users_intent_v4' => :'createUsersIntentV4', + :'create_webhook_endpoint_intent' => :'createWebhookEndpointIntent', + :'update_webhook_endpoint_intent' => :'updateWebhookEndpointIntent', + :'delete_webhook_endpoint_intent' => :'deleteWebhookEndpointIntent', + :'set_ip_allowlist_intent' => :'setIpAllowlistIntent', + :'remove_ip_allowlist_intent' => :'removeIpAllowlistIntent', + :'update_tvc_app_live_deployment_intent' => :'updateTvcAppLiveDeploymentIntent', + :'delete_tvc_deployment_intent' => :'deleteTvcDeploymentIntent', + :'delete_tvc_app_and_deployments_intent' => :'deleteTvcAppAndDeploymentsIntent', + :'restore_tvc_deployment_intent' => :'restoreTvcDeploymentIntent', + :'spark_sign_frost_intent' => :'sparkSignFrostIntent', + :'spark_prepare_transfer_intent' => :'sparkPrepareTransferIntent', + :'spark_claim_transfer_intent' => :'sparkClaimTransferIntent', + :'spark_prepare_lightning_receive_intent' => :'sparkPrepareLightningReceiveIntent', + :'post_tvc_quorum_key_share_intent' => :'postTvcQuorumKeyShareIntent' } end @@ -488,7 +551,28 @@ def self.openapi_types :'create_tvc_app_intent' => :'Object', :'create_tvc_deployment_intent' => :'Object', :'create_tvc_manifest_approvals_intent' => :'Object', - :'sol_send_transaction_intent' => :'Object' + :'sol_send_transaction_intent' => :'Object', + :'init_otp_intent_v3' => :'Object', + :'verify_otp_intent_v2' => :'Object', + :'otp_login_intent_v2' => :'Object', + :'update_organization_name_intent' => :'Object', + :'create_sub_organization_intent_v8' => :'Object', + :'create_oauth_providers_intent_v2' => :'Object', + :'create_users_intent_v4' => :'Object', + :'create_webhook_endpoint_intent' => :'Object', + :'update_webhook_endpoint_intent' => :'Object', + :'delete_webhook_endpoint_intent' => :'Object', + :'set_ip_allowlist_intent' => :'Object', + :'remove_ip_allowlist_intent' => :'Object', + :'update_tvc_app_live_deployment_intent' => :'Object', + :'delete_tvc_deployment_intent' => :'Object', + :'delete_tvc_app_and_deployments_intent' => :'Object', + :'restore_tvc_deployment_intent' => :'Object', + :'spark_sign_frost_intent' => :'Object', + :'spark_prepare_transfer_intent' => :'Object', + :'spark_claim_transfer_intent' => :'Object', + :'spark_prepare_lightning_receive_intent' => :'Object', + :'post_tvc_quorum_key_share_intent' => :'Object' } end @@ -980,6 +1064,90 @@ def initialize(attributes = {}) if attributes.key?(:'sol_send_transaction_intent') self.sol_send_transaction_intent = attributes[:'sol_send_transaction_intent'] end + + if attributes.key?(:'init_otp_intent_v3') + self.init_otp_intent_v3 = attributes[:'init_otp_intent_v3'] + end + + if attributes.key?(:'verify_otp_intent_v2') + self.verify_otp_intent_v2 = attributes[:'verify_otp_intent_v2'] + end + + if attributes.key?(:'otp_login_intent_v2') + self.otp_login_intent_v2 = attributes[:'otp_login_intent_v2'] + end + + if attributes.key?(:'update_organization_name_intent') + self.update_organization_name_intent = attributes[:'update_organization_name_intent'] + end + + if attributes.key?(:'create_sub_organization_intent_v8') + self.create_sub_organization_intent_v8 = attributes[:'create_sub_organization_intent_v8'] + end + + if attributes.key?(:'create_oauth_providers_intent_v2') + self.create_oauth_providers_intent_v2 = attributes[:'create_oauth_providers_intent_v2'] + end + + if attributes.key?(:'create_users_intent_v4') + self.create_users_intent_v4 = attributes[:'create_users_intent_v4'] + end + + if attributes.key?(:'create_webhook_endpoint_intent') + self.create_webhook_endpoint_intent = attributes[:'create_webhook_endpoint_intent'] + end + + if attributes.key?(:'update_webhook_endpoint_intent') + self.update_webhook_endpoint_intent = attributes[:'update_webhook_endpoint_intent'] + end + + if attributes.key?(:'delete_webhook_endpoint_intent') + self.delete_webhook_endpoint_intent = attributes[:'delete_webhook_endpoint_intent'] + end + + if attributes.key?(:'set_ip_allowlist_intent') + self.set_ip_allowlist_intent = attributes[:'set_ip_allowlist_intent'] + end + + if attributes.key?(:'remove_ip_allowlist_intent') + self.remove_ip_allowlist_intent = attributes[:'remove_ip_allowlist_intent'] + end + + if attributes.key?(:'update_tvc_app_live_deployment_intent') + self.update_tvc_app_live_deployment_intent = attributes[:'update_tvc_app_live_deployment_intent'] + end + + if attributes.key?(:'delete_tvc_deployment_intent') + self.delete_tvc_deployment_intent = attributes[:'delete_tvc_deployment_intent'] + end + + if attributes.key?(:'delete_tvc_app_and_deployments_intent') + self.delete_tvc_app_and_deployments_intent = attributes[:'delete_tvc_app_and_deployments_intent'] + end + + if attributes.key?(:'restore_tvc_deployment_intent') + self.restore_tvc_deployment_intent = attributes[:'restore_tvc_deployment_intent'] + end + + if attributes.key?(:'spark_sign_frost_intent') + self.spark_sign_frost_intent = attributes[:'spark_sign_frost_intent'] + end + + if attributes.key?(:'spark_prepare_transfer_intent') + self.spark_prepare_transfer_intent = attributes[:'spark_prepare_transfer_intent'] + end + + if attributes.key?(:'spark_claim_transfer_intent') + self.spark_claim_transfer_intent = attributes[:'spark_claim_transfer_intent'] + end + + if attributes.key?(:'spark_prepare_lightning_receive_intent') + self.spark_prepare_lightning_receive_intent = attributes[:'spark_prepare_lightning_receive_intent'] + end + + if attributes.key?(:'post_tvc_quorum_key_share_intent') + self.post_tvc_quorum_key_share_intent = attributes[:'post_tvc_quorum_key_share_intent'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -1116,7 +1284,28 @@ def ==(o) create_tvc_app_intent == o.create_tvc_app_intent && create_tvc_deployment_intent == o.create_tvc_deployment_intent && create_tvc_manifest_approvals_intent == o.create_tvc_manifest_approvals_intent && - sol_send_transaction_intent == o.sol_send_transaction_intent + sol_send_transaction_intent == o.sol_send_transaction_intent && + init_otp_intent_v3 == o.init_otp_intent_v3 && + verify_otp_intent_v2 == o.verify_otp_intent_v2 && + otp_login_intent_v2 == o.otp_login_intent_v2 && + update_organization_name_intent == o.update_organization_name_intent && + create_sub_organization_intent_v8 == o.create_sub_organization_intent_v8 && + create_oauth_providers_intent_v2 == o.create_oauth_providers_intent_v2 && + create_users_intent_v4 == o.create_users_intent_v4 && + create_webhook_endpoint_intent == o.create_webhook_endpoint_intent && + update_webhook_endpoint_intent == o.update_webhook_endpoint_intent && + delete_webhook_endpoint_intent == o.delete_webhook_endpoint_intent && + set_ip_allowlist_intent == o.set_ip_allowlist_intent && + remove_ip_allowlist_intent == o.remove_ip_allowlist_intent && + update_tvc_app_live_deployment_intent == o.update_tvc_app_live_deployment_intent && + delete_tvc_deployment_intent == o.delete_tvc_deployment_intent && + delete_tvc_app_and_deployments_intent == o.delete_tvc_app_and_deployments_intent && + restore_tvc_deployment_intent == o.restore_tvc_deployment_intent && + spark_sign_frost_intent == o.spark_sign_frost_intent && + spark_prepare_transfer_intent == o.spark_prepare_transfer_intent && + spark_claim_transfer_intent == o.spark_claim_transfer_intent && + spark_prepare_lightning_receive_intent == o.spark_prepare_lightning_receive_intent && + post_tvc_quorum_key_share_intent == o.post_tvc_quorum_key_share_intent end # @see the `==` method @@ -1128,7 +1317,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [create_organization_intent, create_authenticators_intent, create_users_intent, create_private_keys_intent, sign_raw_payload_intent, create_invitations_intent, accept_invitation_intent, create_policy_intent, disable_private_key_intent, delete_users_intent, delete_authenticators_intent, delete_invitation_intent, delete_organization_intent, delete_policy_intent, create_user_tag_intent, delete_user_tags_intent, sign_transaction_intent, create_api_keys_intent, delete_api_keys_intent, approve_activity_intent, reject_activity_intent, create_private_key_tag_intent, delete_private_key_tags_intent, create_policy_intent_v2, set_payment_method_intent, activate_billing_tier_intent, delete_payment_method_intent, create_policy_intent_v3, create_api_only_users_intent, update_root_quorum_intent, update_user_tag_intent, update_private_key_tag_intent, create_authenticators_intent_v2, accept_invitation_intent_v2, create_organization_intent_v2, create_users_intent_v2, create_sub_organization_intent, create_sub_organization_intent_v2, update_allowed_origins_intent, create_private_keys_intent_v2, update_user_intent, update_policy_intent, set_payment_method_intent_v2, create_sub_organization_intent_v3, create_wallet_intent, create_wallet_accounts_intent, init_user_email_recovery_intent, recover_user_intent, set_organization_feature_intent, remove_organization_feature_intent, sign_raw_payload_intent_v2, sign_transaction_intent_v2, export_private_key_intent, export_wallet_intent, create_sub_organization_intent_v4, email_auth_intent, export_wallet_account_intent, init_import_wallet_intent, import_wallet_intent, init_import_private_key_intent, import_private_key_intent, create_policies_intent, sign_raw_payloads_intent, create_read_only_session_intent, create_oauth_providers_intent, delete_oauth_providers_intent, create_sub_organization_intent_v5, oauth_intent, create_api_keys_intent_v2, create_read_write_session_intent, email_auth_intent_v2, create_sub_organization_intent_v6, delete_private_keys_intent, delete_wallets_intent, create_read_write_session_intent_v2, delete_sub_organization_intent, init_otp_auth_intent, otp_auth_intent, create_sub_organization_intent_v7, update_wallet_intent, update_policy_intent_v2, create_users_intent_v3, init_otp_auth_intent_v2, init_otp_intent, verify_otp_intent, otp_login_intent, stamp_login_intent, oauth_login_intent, update_user_name_intent, update_user_email_intent, update_user_phone_number_intent, init_fiat_on_ramp_intent, create_smart_contract_interface_intent, delete_smart_contract_interface_intent, enable_auth_proxy_intent, disable_auth_proxy_intent, update_auth_proxy_config_intent, create_oauth2_credential_intent, update_oauth2_credential_intent, delete_oauth2_credential_intent, oauth2_authenticate_intent, delete_wallet_accounts_intent, delete_policies_intent, eth_send_raw_transaction_intent, eth_send_transaction_intent, create_fiat_on_ramp_credential_intent, update_fiat_on_ramp_credential_intent, delete_fiat_on_ramp_credential_intent, email_auth_intent_v3, init_user_email_recovery_intent_v2, init_otp_intent_v2, init_otp_auth_intent_v3, upsert_gas_usage_config_intent, create_tvc_app_intent, create_tvc_deployment_intent, create_tvc_manifest_approvals_intent, sol_send_transaction_intent].hash + [create_organization_intent, create_authenticators_intent, create_users_intent, create_private_keys_intent, sign_raw_payload_intent, create_invitations_intent, accept_invitation_intent, create_policy_intent, disable_private_key_intent, delete_users_intent, delete_authenticators_intent, delete_invitation_intent, delete_organization_intent, delete_policy_intent, create_user_tag_intent, delete_user_tags_intent, sign_transaction_intent, create_api_keys_intent, delete_api_keys_intent, approve_activity_intent, reject_activity_intent, create_private_key_tag_intent, delete_private_key_tags_intent, create_policy_intent_v2, set_payment_method_intent, activate_billing_tier_intent, delete_payment_method_intent, create_policy_intent_v3, create_api_only_users_intent, update_root_quorum_intent, update_user_tag_intent, update_private_key_tag_intent, create_authenticators_intent_v2, accept_invitation_intent_v2, create_organization_intent_v2, create_users_intent_v2, create_sub_organization_intent, create_sub_organization_intent_v2, update_allowed_origins_intent, create_private_keys_intent_v2, update_user_intent, update_policy_intent, set_payment_method_intent_v2, create_sub_organization_intent_v3, create_wallet_intent, create_wallet_accounts_intent, init_user_email_recovery_intent, recover_user_intent, set_organization_feature_intent, remove_organization_feature_intent, sign_raw_payload_intent_v2, sign_transaction_intent_v2, export_private_key_intent, export_wallet_intent, create_sub_organization_intent_v4, email_auth_intent, export_wallet_account_intent, init_import_wallet_intent, import_wallet_intent, init_import_private_key_intent, import_private_key_intent, create_policies_intent, sign_raw_payloads_intent, create_read_only_session_intent, create_oauth_providers_intent, delete_oauth_providers_intent, create_sub_organization_intent_v5, oauth_intent, create_api_keys_intent_v2, create_read_write_session_intent, email_auth_intent_v2, create_sub_organization_intent_v6, delete_private_keys_intent, delete_wallets_intent, create_read_write_session_intent_v2, delete_sub_organization_intent, init_otp_auth_intent, otp_auth_intent, create_sub_organization_intent_v7, update_wallet_intent, update_policy_intent_v2, create_users_intent_v3, init_otp_auth_intent_v2, init_otp_intent, verify_otp_intent, otp_login_intent, stamp_login_intent, oauth_login_intent, update_user_name_intent, update_user_email_intent, update_user_phone_number_intent, init_fiat_on_ramp_intent, create_smart_contract_interface_intent, delete_smart_contract_interface_intent, enable_auth_proxy_intent, disable_auth_proxy_intent, update_auth_proxy_config_intent, create_oauth2_credential_intent, update_oauth2_credential_intent, delete_oauth2_credential_intent, oauth2_authenticate_intent, delete_wallet_accounts_intent, delete_policies_intent, eth_send_raw_transaction_intent, eth_send_transaction_intent, create_fiat_on_ramp_credential_intent, update_fiat_on_ramp_credential_intent, delete_fiat_on_ramp_credential_intent, email_auth_intent_v3, init_user_email_recovery_intent_v2, init_otp_intent_v2, init_otp_auth_intent_v3, upsert_gas_usage_config_intent, create_tvc_app_intent, create_tvc_deployment_intent, create_tvc_manifest_approvals_intent, sol_send_transaction_intent, init_otp_intent_v3, verify_otp_intent_v2, otp_login_intent_v2, update_organization_name_intent, create_sub_organization_intent_v8, create_oauth_providers_intent_v2, create_users_intent_v4, create_webhook_endpoint_intent, update_webhook_endpoint_intent, delete_webhook_endpoint_intent, set_ip_allowlist_intent, remove_ip_allowlist_intent, update_tvc_app_live_deployment_intent, delete_tvc_deployment_intent, delete_tvc_app_and_deployments_intent, restore_tvc_deployment_intent, spark_sign_frost_intent, spark_prepare_transfer_intent, spark_claim_transfer_intent, spark_prepare_lightning_receive_intent, post_tvc_quorum_key_share_intent].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/ip_allowlist.rb b/turnkey_client/lib/turnkey_client/models/ip_allowlist.rb new file mode 100644 index 0000000..f5be1fa --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/ip_allowlist.rb @@ -0,0 +1,261 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class IpAllowlist + # Unique identifier for the organization this allowlist belongs to. + attr_accessor :organization_id + + # List of IP allowlist rules with their metadata. + attr_accessor :rules + + # Public key of the API key this allowlist applies to. Null means the allowlist applies to the entire organization. + attr_accessor :public_key + + # Whether the IP allowlist is enabled. Only present for organization-level allowlists. Null for API key-level allowlists (presence of the allowlist implies enablement). + attr_accessor :enabled + + # Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY. + attr_accessor :on_evaluation_error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'rules' => :'rules', + :'public_key' => :'publicKey', + :'enabled' => :'enabled', + :'on_evaluation_error' => :'onEvaluationError' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'rules' => :'Object', + :'public_key' => :'Object', + :'enabled' => :'Object', + :'on_evaluation_error' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'public_key', + :'enabled', + :'on_evaluation_error' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::IpAllowlist` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::IpAllowlist`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = value + end + end + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'on_evaluation_error') + self.on_evaluation_error = attributes[:'on_evaluation_error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @rules.nil? + invalid_properties.push('invalid value for "rules", rules cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @rules.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + rules == o.rules && + public_key == o.public_key && + enabled == o.enabled && + on_evaluation_error == o.on_evaluation_error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, rules, public_key, enabled, on_evaluation_error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/ip_allowlist_intent_rule.rb b/turnkey_client/lib/turnkey_client/models/ip_allowlist_intent_rule.rb new file mode 100644 index 0000000..5dd186e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/ip_allowlist_intent_rule.rb @@ -0,0 +1,222 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class IpAllowlistIntentRule + # CIDR block (e.g., '192.168.1.0/24', '2001:db8::/32'). + attr_accessor :cidr + + # Optional human-readable label for this rule (e.g., 'Office VPN'). + attr_accessor :label + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cidr' => :'cidr', + :'label' => :'label' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'cidr' => :'Object', + :'label' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'label' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::IpAllowlistIntentRule` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::IpAllowlistIntentRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cidr') + self.cidr = attributes[:'cidr'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @cidr.nil? + invalid_properties.push('invalid value for "cidr", cidr cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @cidr.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cidr == o.cidr && + label == o.label + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cidr, label].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/ip_allowlist_rule.rb b/turnkey_client/lib/turnkey_client/models/ip_allowlist_rule.rb new file mode 100644 index 0000000..33da3ad --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/ip_allowlist_rule.rb @@ -0,0 +1,232 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class IpAllowlistRule + # CIDR block (e.g., '192.168.1.0/24'). + attr_accessor :cidr + + # Optional human-readable label for this rule. + attr_accessor :label + + # Creation timestamp as millisecond epoch string. + attr_accessor :created_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cidr' => :'cidr', + :'label' => :'label', + :'created_at' => :'createdAt' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'cidr' => :'Object', + :'label' => :'Object', + :'created_at' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'label', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::IpAllowlistRule` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::IpAllowlistRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cidr') + self.cidr = attributes[:'cidr'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @cidr.nil? + invalid_properties.push('invalid value for "cidr", cidr cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @cidr.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cidr == o.cidr && + label == o.label && + created_at == o.created_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cidr, label, created_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/list_supported_assets_request.rb b/turnkey_client/lib/turnkey_client/models/list_supported_assets_request.rb index f7ca79a..2fd70fe 100644 --- a/turnkey_client/lib/turnkey_client/models/list_supported_assets_request.rb +++ b/turnkey_client/lib/turnkey_client/models/list_supported_assets_request.rb @@ -15,7 +15,7 @@ class ListSupportedAssetsRequest # Unique identifier for a given organization. attr_accessor :organization_id - # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet). + # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet or 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values. attr_accessor :caip2 class EnumAttributeValidator @@ -106,7 +106,7 @@ def list_invalid_properties def valid? return false if @organization_id.nil? return false if @caip2.nil? - caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002', 'eip155:42161', 'eip155:421614', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1']) return false unless caip2_validator.valid?(@caip2) true end @@ -114,7 +114,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] caip2 Object to be assigned def caip2=(caip2) - validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002', 'eip155:42161', 'eip155:421614', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1']) unless validator.valid?(caip2) fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/list_webhook_endpoints_request.rb b/turnkey_client/lib/turnkey_client/models/list_webhook_endpoints_request.rb new file mode 100644 index 0000000..d08f2fe --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/list_webhook_endpoints_request.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ListWebhookEndpointsRequest + # Unique identifier for a given Organization. + attr_accessor :organization_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ListWebhookEndpointsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ListWebhookEndpointsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/list_webhook_endpoints_response.rb b/turnkey_client/lib/turnkey_client/models/list_webhook_endpoints_response.rb new file mode 100644 index 0000000..ab53774 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/list_webhook_endpoints_response.rb @@ -0,0 +1,212 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ListWebhookEndpointsResponse + attr_accessor :webhook_endpoints + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'webhook_endpoints' => :'webhookEndpoints' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'webhook_endpoints' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ListWebhookEndpointsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ListWebhookEndpointsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'webhook_endpoints') + if (value = attributes[:'webhook_endpoints']).is_a?(Array) + self.webhook_endpoints = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @webhook_endpoints.nil? + invalid_properties.push('invalid value for "webhook_endpoints", webhook_endpoints cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @webhook_endpoints.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + webhook_endpoints == o.webhook_endpoints + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [webhook_endpoints].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/login_usage.rb b/turnkey_client/lib/turnkey_client/models/login_usage.rb new file mode 100644 index 0000000..454b6a6 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/login_usage.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class LoginUsage + # Public key for authentication + attr_accessor :public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'public_key' => :'publicKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'public_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::LoginUsage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::LoginUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @public_key.nil? + invalid_properties.push('invalid value for "public_key", public_key cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @public_key.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + public_key == o.public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/noop_codegen_anchor_response.rb b/turnkey_client/lib/turnkey_client/models/noop_codegen_anchor_response.rb new file mode 100644 index 0000000..2fda843 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/noop_codegen_anchor_response.rb @@ -0,0 +1,219 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class NOOPCodegenAnchorResponse + attr_accessor :stamp + + attr_accessor :token_usage + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'stamp' => :'stamp', + :'token_usage' => :'tokenUsage' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'stamp' => :'Object', + :'token_usage' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::NOOPCodegenAnchorResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::NOOPCodegenAnchorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'stamp') + self.stamp = attributes[:'stamp'] + end + + if attributes.key?(:'token_usage') + self.token_usage = attributes[:'token_usage'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @stamp.nil? + invalid_properties.push('invalid value for "stamp", stamp cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @stamp.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + stamp == o.stamp && + token_usage == o.token_usage + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [stamp, token_usage].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/oauth2_authenticate_intent.rb b/turnkey_client/lib/turnkey_client/models/oauth2_authenticate_intent.rb index 961efdf..4020714 100644 --- a/turnkey_client/lib/turnkey_client/models/oauth2_authenticate_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/oauth2_authenticate_intent.rb @@ -24,7 +24,7 @@ class Oauth2AuthenticateIntent # The code verifier used by OAuth 2.0 PKCE providers attr_accessor :code_verifier - # An optional nonce used by the client to prevent replay/substitution of an ID token + # A nonce value set to sha256(publicKey), used to bind the OIDC token to a specific public key attr_accessor :nonce # An optional P256 public key to which, if provided, the bearer token will be encrypted and returned via the `encrypted_bearer_token` claim of the OIDC Token @@ -57,7 +57,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'nonce', :'bearer_token_target_public_key' ]) end @@ -122,6 +121,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "code_verifier", code_verifier cannot be nil.') end + if @nonce.nil? + invalid_properties.push('invalid value for "nonce", nonce cannot be nil.') + end + invalid_properties end @@ -132,6 +135,7 @@ def valid? return false if @auth_code.nil? return false if @redirect_uri.nil? return false if @code_verifier.nil? + return false if @nonce.nil? true end diff --git a/turnkey_client/lib/turnkey_client/models/oauth_provider_params_v2.rb b/turnkey_client/lib/turnkey_client/models/oauth_provider_params_v2.rb new file mode 100644 index 0000000..1d86b8f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/oauth_provider_params_v2.rb @@ -0,0 +1,230 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class OauthProviderParamsV2 + # Human-readable name to identify a Provider. + attr_accessor :provider_name + + # Base64 encoded OIDC token + attr_accessor :oidc_token + + attr_accessor :oidc_claims + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'provider_name' => :'providerName', + :'oidc_token' => :'oidcToken', + :'oidc_claims' => :'oidcClaims' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'provider_name' => :'Object', + :'oidc_token' => :'Object', + :'oidc_claims' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::OauthProviderParamsV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::OauthProviderParamsV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'provider_name') + self.provider_name = attributes[:'provider_name'] + end + + if attributes.key?(:'oidc_token') + self.oidc_token = attributes[:'oidc_token'] + end + + if attributes.key?(:'oidc_claims') + self.oidc_claims = attributes[:'oidc_claims'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @provider_name.nil? + invalid_properties.push('invalid value for "provider_name", provider_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @provider_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + provider_name == o.provider_name && + oidc_token == o.oidc_token && + oidc_claims == o.oidc_claims + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [provider_name, oidc_token, oidc_claims].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/oidc_claims.rb b/turnkey_client/lib/turnkey_client/models/oidc_claims.rb new file mode 100644 index 0000000..aecf08b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/oidc_claims.rb @@ -0,0 +1,241 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class OidcClaims + # The issuer identifier from the OIDC token (iss claim) + attr_accessor :iss + + # The subject identifier from the OIDC token (sub claim) + attr_accessor :sub + + # The audience from the OIDC token (aud claim) + attr_accessor :aud + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'iss' => :'iss', + :'sub' => :'sub', + :'aud' => :'aud' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'iss' => :'Object', + :'sub' => :'Object', + :'aud' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::OidcClaims` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::OidcClaims`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'iss') + self.iss = attributes[:'iss'] + end + + if attributes.key?(:'sub') + self.sub = attributes[:'sub'] + end + + if attributes.key?(:'aud') + self.aud = attributes[:'aud'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @iss.nil? + invalid_properties.push('invalid value for "iss", iss cannot be nil.') + end + + if @sub.nil? + invalid_properties.push('invalid value for "sub", sub cannot be nil.') + end + + if @aud.nil? + invalid_properties.push('invalid value for "aud", aud cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @iss.nil? + return false if @sub.nil? + return false if @aud.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + iss == o.iss && + sub == o.sub && + aud == o.aud + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [iss, sub, aud].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/otp_login_intent_v2.rb b/turnkey_client/lib/turnkey_client/models/otp_login_intent_v2.rb new file mode 100644 index 0000000..fb72107 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/otp_login_intent_v2.rb @@ -0,0 +1,262 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class OtpLoginIntentV2 + # Signed Verification Token containing a unique id, expiry, verification type, contact + attr_accessor :verification_token + + # Client-side public key generated by the user, used as the session public key upon successful login + attr_accessor :public_key + + attr_accessor :client_signature + + # Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used. + attr_accessor :expiration_seconds + + # Invalidate all other previously generated Login sessions + attr_accessor :invalidate_existing + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verification_token' => :'verificationToken', + :'public_key' => :'publicKey', + :'client_signature' => :'clientSignature', + :'expiration_seconds' => :'expirationSeconds', + :'invalidate_existing' => :'invalidateExisting' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'verification_token' => :'Object', + :'public_key' => :'Object', + :'client_signature' => :'Object', + :'expiration_seconds' => :'Object', + :'invalidate_existing' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'expiration_seconds', + :'invalidate_existing' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::OtpLoginIntentV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::OtpLoginIntentV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verification_token') + self.verification_token = attributes[:'verification_token'] + end + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + + if attributes.key?(:'client_signature') + self.client_signature = attributes[:'client_signature'] + end + + if attributes.key?(:'expiration_seconds') + self.expiration_seconds = attributes[:'expiration_seconds'] + end + + if attributes.key?(:'invalidate_existing') + self.invalidate_existing = attributes[:'invalidate_existing'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @verification_token.nil? + invalid_properties.push('invalid value for "verification_token", verification_token cannot be nil.') + end + + if @public_key.nil? + invalid_properties.push('invalid value for "public_key", public_key cannot be nil.') + end + + if @client_signature.nil? + invalid_properties.push('invalid value for "client_signature", client_signature cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @verification_token.nil? + return false if @public_key.nil? + return false if @client_signature.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verification_token == o.verification_token && + public_key == o.public_key && + client_signature == o.client_signature && + expiration_seconds == o.expiration_seconds && + invalidate_existing == o.invalidate_existing + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verification_token, public_key, client_signature, expiration_seconds, invalidate_existing].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/otp_login_request.rb b/turnkey_client/lib/turnkey_client/models/otp_login_request.rb index 489c657..ab827b3 100644 --- a/turnkey_client/lib/turnkey_client/models/otp_login_request.rb +++ b/turnkey_client/lib/turnkey_client/models/otp_login_request.rb @@ -138,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_OTP_LOGIN']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_OTP_LOGIN_V2']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -149,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_OTP_LOGIN']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_OTP_LOGIN_V2']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/post_tvc_quorum_key_share_intent.rb b/turnkey_client/lib/turnkey_client/models/post_tvc_quorum_key_share_intent.rb new file mode 100644 index 0000000..afec941 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/post_tvc_quorum_key_share_intent.rb @@ -0,0 +1,240 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class PostTvcQuorumKeyShareIntent + # Unique identifier of the TVC deployment receiving quorum key share + attr_accessor :deployment_id + + # Hex-encoded ephemeral public key used to encrypt the quorum key share + attr_accessor :ephemeral_public_key_hex + + attr_accessor :share_approval_bundle + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deployment_id' => :'deploymentId', + :'ephemeral_public_key_hex' => :'ephemeralPublicKeyHex', + :'share_approval_bundle' => :'shareApprovalBundle' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'deployment_id' => :'Object', + :'ephemeral_public_key_hex' => :'Object', + :'share_approval_bundle' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::PostTvcQuorumKeyShareIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::PostTvcQuorumKeyShareIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + + if attributes.key?(:'ephemeral_public_key_hex') + self.ephemeral_public_key_hex = attributes[:'ephemeral_public_key_hex'] + end + + if attributes.key?(:'share_approval_bundle') + self.share_approval_bundle = attributes[:'share_approval_bundle'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + if @ephemeral_public_key_hex.nil? + invalid_properties.push('invalid value for "ephemeral_public_key_hex", ephemeral_public_key_hex cannot be nil.') + end + + if @share_approval_bundle.nil? + invalid_properties.push('invalid value for "share_approval_bundle", share_approval_bundle cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @deployment_id.nil? + return false if @ephemeral_public_key_hex.nil? + return false if @share_approval_bundle.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deployment_id == o.deployment_id && + ephemeral_public_key_hex == o.ephemeral_public_key_hex && + share_approval_bundle == o.share_approval_bundle + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deployment_id, ephemeral_public_key_hex, share_approval_bundle].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/post_tvc_quorum_key_share_result.rb b/turnkey_client/lib/turnkey_client/models/post_tvc_quorum_key_share_result.rb new file mode 100644 index 0000000..4123736 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/post_tvc_quorum_key_share_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class PostTvcQuorumKeyShareResult + # The unique identifier for the provisioning quorum key share + attr_accessor :provisioning_share_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'provisioning_share_id' => :'provisioningShareId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'provisioning_share_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::PostTvcQuorumKeyShareResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::PostTvcQuorumKeyShareResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'provisioning_share_id') + self.provisioning_share_id = attributes[:'provisioning_share_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @provisioning_share_id.nil? + invalid_properties.push('invalid value for "provisioning_share_id", provisioning_share_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @provisioning_share_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + provisioning_share_id == o.provisioning_share_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [provisioning_share_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/quorum_key_share_approval_bundle.rb b/turnkey_client/lib/turnkey_client/models/quorum_key_share_approval_bundle.rb new file mode 100644 index 0000000..643743d --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/quorum_key_share_approval_bundle.rb @@ -0,0 +1,241 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class QuorumKeyShareApprovalBundle + # Unique identifier of the operator providing this quorum key share + attr_accessor :operator_id + + # Hex-encoded re-encrypted quorum key share + attr_accessor :re_encrypted_share_hex + + # Signature from the share set operator approving the manifest + attr_accessor :signature + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'operator_id' => :'operatorId', + :'re_encrypted_share_hex' => :'reEncryptedShareHex', + :'signature' => :'signature' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'operator_id' => :'Object', + :'re_encrypted_share_hex' => :'Object', + :'signature' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::QuorumKeyShareApprovalBundle` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::QuorumKeyShareApprovalBundle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'operator_id') + self.operator_id = attributes[:'operator_id'] + end + + if attributes.key?(:'re_encrypted_share_hex') + self.re_encrypted_share_hex = attributes[:'re_encrypted_share_hex'] + end + + if attributes.key?(:'signature') + self.signature = attributes[:'signature'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @operator_id.nil? + invalid_properties.push('invalid value for "operator_id", operator_id cannot be nil.') + end + + if @re_encrypted_share_hex.nil? + invalid_properties.push('invalid value for "re_encrypted_share_hex", re_encrypted_share_hex cannot be nil.') + end + + if @signature.nil? + invalid_properties.push('invalid value for "signature", signature cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @operator_id.nil? + return false if @re_encrypted_share_hex.nil? + return false if @signature.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + operator_id == o.operator_id && + re_encrypted_share_hex == o.re_encrypted_share_hex && + signature == o.signature + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [operator_id, re_encrypted_share_hex, signature].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_intent.rb b/turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_intent.rb new file mode 100644 index 0000000..822cb16 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_intent.rb @@ -0,0 +1,207 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class RemoveIpAllowlistIntent + # The public component of an API key. If null, removes the organization-level IP allowlist. If set, removes the IP allowlist for this specific API key. + attr_accessor :public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'public_key' => :'publicKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'public_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'public_key' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::RemoveIpAllowlistIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::RemoveIpAllowlistIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + public_key == o.public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_request.rb b/turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_request.rb new file mode 100644 index 0000000..e6aeeaf --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class RemoveIpAllowlistRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::RemoveIpAllowlistRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::RemoveIpAllowlistRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_result.rb b/turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_result.rb new file mode 100644 index 0000000..16b3254 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/remove_ip_allowlist_result.rb @@ -0,0 +1,196 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class RemoveIpAllowlistResult + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.openapi_types + { + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::RemoveIpAllowlistResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::RemoveIpAllowlistResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_intent.rb b/turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_intent.rb new file mode 100644 index 0000000..08e3c5f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_intent.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class RestoreTvcDeploymentIntent + # The unique identifier of the TVC deployment to restore. + attr_accessor :deployment_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deployment_id' => :'deploymentId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'deployment_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::RestoreTvcDeploymentIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::RestoreTvcDeploymentIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @deployment_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deployment_id == o.deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_request.rb b/turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_request.rb new file mode 100644 index 0000000..ca0d8c2 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class RestoreTvcDeploymentRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::RestoreTvcDeploymentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::RestoreTvcDeploymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_result.rb b/turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_result.rb new file mode 100644 index 0000000..73bc6b1 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/restore_tvc_deployment_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class RestoreTvcDeploymentResult + # The unique identifier of the restored TVC deployment. + attr_accessor :deployment_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deployment_id' => :'deploymentId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'deployment_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::RestoreTvcDeploymentResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::RestoreTvcDeploymentResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @deployment_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deployment_id == o.deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/result.rb b/turnkey_client/lib/turnkey_client/models/result.rb index 87bb458..e791e8f 100644 --- a/turnkey_client/lib/turnkey_client/models/result.rb +++ b/turnkey_client/lib/turnkey_client/models/result.rb @@ -208,6 +208,42 @@ class Result attr_accessor :sol_send_transaction_result + attr_accessor :init_otp_result_v2 + + attr_accessor :update_organization_name_result + + attr_accessor :create_sub_organization_result_v8 + + attr_accessor :create_oauth_providers_result_v2 + + attr_accessor :create_webhook_endpoint_result + + attr_accessor :update_webhook_endpoint_result + + attr_accessor :delete_webhook_endpoint_result + + attr_accessor :set_ip_allowlist_result + + attr_accessor :remove_ip_allowlist_result + + attr_accessor :update_tvc_app_live_deployment_result + + attr_accessor :delete_tvc_deployment_result + + attr_accessor :delete_tvc_app_and_deployments_result + + attr_accessor :restore_tvc_deployment_result + + attr_accessor :spark_sign_frost_result + + attr_accessor :spark_prepare_transfer_result + + attr_accessor :spark_claim_transfer_result + + attr_accessor :spark_prepare_lightning_receive_result + + attr_accessor :post_tvc_quorum_key_share_result + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -308,7 +344,25 @@ def self.attribute_map :'create_tvc_app_result' => :'createTvcAppResult', :'create_tvc_deployment_result' => :'createTvcDeploymentResult', :'create_tvc_manifest_approvals_result' => :'createTvcManifestApprovalsResult', - :'sol_send_transaction_result' => :'solSendTransactionResult' + :'sol_send_transaction_result' => :'solSendTransactionResult', + :'init_otp_result_v2' => :'initOtpResultV2', + :'update_organization_name_result' => :'updateOrganizationNameResult', + :'create_sub_organization_result_v8' => :'createSubOrganizationResultV8', + :'create_oauth_providers_result_v2' => :'createOauthProvidersResultV2', + :'create_webhook_endpoint_result' => :'createWebhookEndpointResult', + :'update_webhook_endpoint_result' => :'updateWebhookEndpointResult', + :'delete_webhook_endpoint_result' => :'deleteWebhookEndpointResult', + :'set_ip_allowlist_result' => :'setIpAllowlistResult', + :'remove_ip_allowlist_result' => :'removeIpAllowlistResult', + :'update_tvc_app_live_deployment_result' => :'updateTvcAppLiveDeploymentResult', + :'delete_tvc_deployment_result' => :'deleteTvcDeploymentResult', + :'delete_tvc_app_and_deployments_result' => :'deleteTvcAppAndDeploymentsResult', + :'restore_tvc_deployment_result' => :'restoreTvcDeploymentResult', + :'spark_sign_frost_result' => :'sparkSignFrostResult', + :'spark_prepare_transfer_result' => :'sparkPrepareTransferResult', + :'spark_claim_transfer_result' => :'sparkClaimTransferResult', + :'spark_prepare_lightning_receive_result' => :'sparkPrepareLightningReceiveResult', + :'post_tvc_quorum_key_share_result' => :'postTvcQuorumKeyShareResult' } end @@ -412,7 +466,25 @@ def self.openapi_types :'create_tvc_app_result' => :'Object', :'create_tvc_deployment_result' => :'Object', :'create_tvc_manifest_approvals_result' => :'Object', - :'sol_send_transaction_result' => :'Object' + :'sol_send_transaction_result' => :'Object', + :'init_otp_result_v2' => :'Object', + :'update_organization_name_result' => :'Object', + :'create_sub_organization_result_v8' => :'Object', + :'create_oauth_providers_result_v2' => :'Object', + :'create_webhook_endpoint_result' => :'Object', + :'update_webhook_endpoint_result' => :'Object', + :'delete_webhook_endpoint_result' => :'Object', + :'set_ip_allowlist_result' => :'Object', + :'remove_ip_allowlist_result' => :'Object', + :'update_tvc_app_live_deployment_result' => :'Object', + :'delete_tvc_deployment_result' => :'Object', + :'delete_tvc_app_and_deployments_result' => :'Object', + :'restore_tvc_deployment_result' => :'Object', + :'spark_sign_frost_result' => :'Object', + :'spark_prepare_transfer_result' => :'Object', + :'spark_claim_transfer_result' => :'Object', + :'spark_prepare_lightning_receive_result' => :'Object', + :'post_tvc_quorum_key_share_result' => :'Object' } end @@ -828,6 +900,78 @@ def initialize(attributes = {}) if attributes.key?(:'sol_send_transaction_result') self.sol_send_transaction_result = attributes[:'sol_send_transaction_result'] end + + if attributes.key?(:'init_otp_result_v2') + self.init_otp_result_v2 = attributes[:'init_otp_result_v2'] + end + + if attributes.key?(:'update_organization_name_result') + self.update_organization_name_result = attributes[:'update_organization_name_result'] + end + + if attributes.key?(:'create_sub_organization_result_v8') + self.create_sub_organization_result_v8 = attributes[:'create_sub_organization_result_v8'] + end + + if attributes.key?(:'create_oauth_providers_result_v2') + self.create_oauth_providers_result_v2 = attributes[:'create_oauth_providers_result_v2'] + end + + if attributes.key?(:'create_webhook_endpoint_result') + self.create_webhook_endpoint_result = attributes[:'create_webhook_endpoint_result'] + end + + if attributes.key?(:'update_webhook_endpoint_result') + self.update_webhook_endpoint_result = attributes[:'update_webhook_endpoint_result'] + end + + if attributes.key?(:'delete_webhook_endpoint_result') + self.delete_webhook_endpoint_result = attributes[:'delete_webhook_endpoint_result'] + end + + if attributes.key?(:'set_ip_allowlist_result') + self.set_ip_allowlist_result = attributes[:'set_ip_allowlist_result'] + end + + if attributes.key?(:'remove_ip_allowlist_result') + self.remove_ip_allowlist_result = attributes[:'remove_ip_allowlist_result'] + end + + if attributes.key?(:'update_tvc_app_live_deployment_result') + self.update_tvc_app_live_deployment_result = attributes[:'update_tvc_app_live_deployment_result'] + end + + if attributes.key?(:'delete_tvc_deployment_result') + self.delete_tvc_deployment_result = attributes[:'delete_tvc_deployment_result'] + end + + if attributes.key?(:'delete_tvc_app_and_deployments_result') + self.delete_tvc_app_and_deployments_result = attributes[:'delete_tvc_app_and_deployments_result'] + end + + if attributes.key?(:'restore_tvc_deployment_result') + self.restore_tvc_deployment_result = attributes[:'restore_tvc_deployment_result'] + end + + if attributes.key?(:'spark_sign_frost_result') + self.spark_sign_frost_result = attributes[:'spark_sign_frost_result'] + end + + if attributes.key?(:'spark_prepare_transfer_result') + self.spark_prepare_transfer_result = attributes[:'spark_prepare_transfer_result'] + end + + if attributes.key?(:'spark_claim_transfer_result') + self.spark_claim_transfer_result = attributes[:'spark_claim_transfer_result'] + end + + if attributes.key?(:'spark_prepare_lightning_receive_result') + self.spark_prepare_lightning_receive_result = attributes[:'spark_prepare_lightning_receive_result'] + end + + if attributes.key?(:'post_tvc_quorum_key_share_result') + self.post_tvc_quorum_key_share_result = attributes[:'post_tvc_quorum_key_share_result'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -945,7 +1089,25 @@ def ==(o) create_tvc_app_result == o.create_tvc_app_result && create_tvc_deployment_result == o.create_tvc_deployment_result && create_tvc_manifest_approvals_result == o.create_tvc_manifest_approvals_result && - sol_send_transaction_result == o.sol_send_transaction_result + sol_send_transaction_result == o.sol_send_transaction_result && + init_otp_result_v2 == o.init_otp_result_v2 && + update_organization_name_result == o.update_organization_name_result && + create_sub_organization_result_v8 == o.create_sub_organization_result_v8 && + create_oauth_providers_result_v2 == o.create_oauth_providers_result_v2 && + create_webhook_endpoint_result == o.create_webhook_endpoint_result && + update_webhook_endpoint_result == o.update_webhook_endpoint_result && + delete_webhook_endpoint_result == o.delete_webhook_endpoint_result && + set_ip_allowlist_result == o.set_ip_allowlist_result && + remove_ip_allowlist_result == o.remove_ip_allowlist_result && + update_tvc_app_live_deployment_result == o.update_tvc_app_live_deployment_result && + delete_tvc_deployment_result == o.delete_tvc_deployment_result && + delete_tvc_app_and_deployments_result == o.delete_tvc_app_and_deployments_result && + restore_tvc_deployment_result == o.restore_tvc_deployment_result && + spark_sign_frost_result == o.spark_sign_frost_result && + spark_prepare_transfer_result == o.spark_prepare_transfer_result && + spark_claim_transfer_result == o.spark_claim_transfer_result && + spark_prepare_lightning_receive_result == o.spark_prepare_lightning_receive_result && + post_tvc_quorum_key_share_result == o.post_tvc_quorum_key_share_result end # @see the `==` method @@ -957,7 +1119,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [create_organization_result, create_authenticators_result, create_users_result, create_private_keys_result, create_invitations_result, accept_invitation_result, sign_raw_payload_result, create_policy_result, disable_private_key_result, delete_users_result, delete_authenticators_result, delete_invitation_result, delete_organization_result, delete_policy_result, create_user_tag_result, delete_user_tags_result, sign_transaction_result, delete_api_keys_result, create_api_keys_result, create_private_key_tag_result, delete_private_key_tags_result, set_payment_method_result, activate_billing_tier_result, delete_payment_method_result, create_api_only_users_result, update_root_quorum_result, update_user_tag_result, update_private_key_tag_result, create_sub_organization_result, update_allowed_origins_result, create_private_keys_result_v2, update_user_result, update_policy_result, create_sub_organization_result_v3, create_wallet_result, create_wallet_accounts_result, init_user_email_recovery_result, recover_user_result, set_organization_feature_result, remove_organization_feature_result, export_private_key_result, export_wallet_result, create_sub_organization_result_v4, email_auth_result, export_wallet_account_result, init_import_wallet_result, import_wallet_result, init_import_private_key_result, import_private_key_result, create_policies_result, sign_raw_payloads_result, create_read_only_session_result, create_oauth_providers_result, delete_oauth_providers_result, create_sub_organization_result_v5, oauth_result, create_read_write_session_result, create_sub_organization_result_v6, delete_private_keys_result, delete_wallets_result, create_read_write_session_result_v2, delete_sub_organization_result, init_otp_auth_result, otp_auth_result, create_sub_organization_result_v7, update_wallet_result, update_policy_result_v2, init_otp_auth_result_v2, init_otp_result, verify_otp_result, otp_login_result, stamp_login_result, oauth_login_result, update_user_name_result, update_user_email_result, update_user_phone_number_result, init_fiat_on_ramp_result, create_smart_contract_interface_result, delete_smart_contract_interface_result, enable_auth_proxy_result, disable_auth_proxy_result, update_auth_proxy_config_result, create_oauth2_credential_result, update_oauth2_credential_result, delete_oauth2_credential_result, oauth2_authenticate_result, delete_wallet_accounts_result, delete_policies_result, eth_send_raw_transaction_result, create_fiat_on_ramp_credential_result, update_fiat_on_ramp_credential_result, delete_fiat_on_ramp_credential_result, eth_send_transaction_result, upsert_gas_usage_config_result, create_tvc_app_result, create_tvc_deployment_result, create_tvc_manifest_approvals_result, sol_send_transaction_result].hash + [create_organization_result, create_authenticators_result, create_users_result, create_private_keys_result, create_invitations_result, accept_invitation_result, sign_raw_payload_result, create_policy_result, disable_private_key_result, delete_users_result, delete_authenticators_result, delete_invitation_result, delete_organization_result, delete_policy_result, create_user_tag_result, delete_user_tags_result, sign_transaction_result, delete_api_keys_result, create_api_keys_result, create_private_key_tag_result, delete_private_key_tags_result, set_payment_method_result, activate_billing_tier_result, delete_payment_method_result, create_api_only_users_result, update_root_quorum_result, update_user_tag_result, update_private_key_tag_result, create_sub_organization_result, update_allowed_origins_result, create_private_keys_result_v2, update_user_result, update_policy_result, create_sub_organization_result_v3, create_wallet_result, create_wallet_accounts_result, init_user_email_recovery_result, recover_user_result, set_organization_feature_result, remove_organization_feature_result, export_private_key_result, export_wallet_result, create_sub_organization_result_v4, email_auth_result, export_wallet_account_result, init_import_wallet_result, import_wallet_result, init_import_private_key_result, import_private_key_result, create_policies_result, sign_raw_payloads_result, create_read_only_session_result, create_oauth_providers_result, delete_oauth_providers_result, create_sub_organization_result_v5, oauth_result, create_read_write_session_result, create_sub_organization_result_v6, delete_private_keys_result, delete_wallets_result, create_read_write_session_result_v2, delete_sub_organization_result, init_otp_auth_result, otp_auth_result, create_sub_organization_result_v7, update_wallet_result, update_policy_result_v2, init_otp_auth_result_v2, init_otp_result, verify_otp_result, otp_login_result, stamp_login_result, oauth_login_result, update_user_name_result, update_user_email_result, update_user_phone_number_result, init_fiat_on_ramp_result, create_smart_contract_interface_result, delete_smart_contract_interface_result, enable_auth_proxy_result, disable_auth_proxy_result, update_auth_proxy_config_result, create_oauth2_credential_result, update_oauth2_credential_result, delete_oauth2_credential_result, oauth2_authenticate_result, delete_wallet_accounts_result, delete_policies_result, eth_send_raw_transaction_result, create_fiat_on_ramp_credential_result, update_fiat_on_ramp_credential_result, delete_fiat_on_ramp_credential_result, eth_send_transaction_result, upsert_gas_usage_config_result, create_tvc_app_result, create_tvc_deployment_result, create_tvc_manifest_approvals_result, sol_send_transaction_result, init_otp_result_v2, update_organization_name_result, create_sub_organization_result_v8, create_oauth_providers_result_v2, create_webhook_endpoint_result, update_webhook_endpoint_result, delete_webhook_endpoint_result, set_ip_allowlist_result, remove_ip_allowlist_result, update_tvc_app_live_deployment_result, delete_tvc_deployment_result, delete_tvc_app_and_deployments_result, restore_tvc_deployment_result, spark_sign_frost_result, spark_prepare_transfer_result, spark_claim_transfer_result, spark_prepare_lightning_receive_result, post_tvc_quorum_key_share_result].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/root_user_params_v5.rb b/turnkey_client/lib/turnkey_client/models/root_user_params_v5.rb new file mode 100644 index 0000000..bac9d27 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/root_user_params_v5.rb @@ -0,0 +1,284 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class RootUserParamsV5 + # Human-readable name for a User. + attr_accessor :user_name + + # The user's email address. + attr_accessor :user_email + + # The user's phone number in E.164 format e.g. +13214567890 + attr_accessor :user_phone_number + + # A list of API Key parameters. This field, if not needed, should be an empty array in your request body. + attr_accessor :api_keys + + # A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body. + attr_accessor :authenticators + + # A list of Oauth providers. This field, if not needed, should be an empty array in your request body. + attr_accessor :oauth_providers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_name' => :'userName', + :'user_email' => :'userEmail', + :'user_phone_number' => :'userPhoneNumber', + :'api_keys' => :'apiKeys', + :'authenticators' => :'authenticators', + :'oauth_providers' => :'oauthProviders' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_name' => :'Object', + :'user_email' => :'Object', + :'user_phone_number' => :'Object', + :'api_keys' => :'Object', + :'authenticators' => :'Object', + :'oauth_providers' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'user_email', + :'user_phone_number', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::RootUserParamsV5` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::RootUserParamsV5`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_name') + self.user_name = attributes[:'user_name'] + end + + if attributes.key?(:'user_email') + self.user_email = attributes[:'user_email'] + end + + if attributes.key?(:'user_phone_number') + self.user_phone_number = attributes[:'user_phone_number'] + end + + if attributes.key?(:'api_keys') + if (value = attributes[:'api_keys']).is_a?(Array) + self.api_keys = value + end + end + + if attributes.key?(:'authenticators') + if (value = attributes[:'authenticators']).is_a?(Array) + self.authenticators = value + end + end + + if attributes.key?(:'oauth_providers') + if (value = attributes[:'oauth_providers']).is_a?(Array) + self.oauth_providers = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @user_name.nil? + invalid_properties.push('invalid value for "user_name", user_name cannot be nil.') + end + + if @api_keys.nil? + invalid_properties.push('invalid value for "api_keys", api_keys cannot be nil.') + end + + if @authenticators.nil? + invalid_properties.push('invalid value for "authenticators", authenticators cannot be nil.') + end + + if @oauth_providers.nil? + invalid_properties.push('invalid value for "oauth_providers", oauth_providers cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @user_name.nil? + return false if @api_keys.nil? + return false if @authenticators.nil? + return false if @oauth_providers.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_name == o.user_name && + user_email == o.user_email && + user_phone_number == o.user_phone_number && + api_keys == o.api_keys && + authenticators == o.authenticators && + oauth_providers == o.oauth_providers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_name, user_email, user_phone_number, api_keys, authenticators, oauth_providers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/set_ip_allowlist_intent.rb b/turnkey_client/lib/turnkey_client/models/set_ip_allowlist_intent.rb new file mode 100644 index 0000000..98684df --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/set_ip_allowlist_intent.rb @@ -0,0 +1,241 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SetIpAllowlistIntent + # The public component of an API key. If null, the IP allowlist applies at the organization level. If set, it applies only to this specific API key. + attr_accessor :public_key + + # Whether the IP allowlist is enabled. Only meaningful for organization-level allowlists. Omit for API key-level allowlists. + attr_accessor :enabled + + # List of IP allowlist rules with CIDR blocks and optional labels. + attr_accessor :rules + + # Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY. + attr_accessor :on_evaluation_error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'public_key' => :'publicKey', + :'enabled' => :'enabled', + :'rules' => :'rules', + :'on_evaluation_error' => :'onEvaluationError' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'public_key' => :'Object', + :'enabled' => :'Object', + :'rules' => :'Object', + :'on_evaluation_error' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'public_key', + :'enabled', + :'on_evaluation_error' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SetIpAllowlistIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SetIpAllowlistIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = value + end + end + + if attributes.key?(:'on_evaluation_error') + self.on_evaluation_error = attributes[:'on_evaluation_error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + public_key == o.public_key && + enabled == o.enabled && + rules == o.rules && + on_evaluation_error == o.on_evaluation_error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [public_key, enabled, rules, on_evaluation_error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/set_ip_allowlist_request.rb b/turnkey_client/lib/turnkey_client/models/set_ip_allowlist_request.rb new file mode 100644 index 0000000..56f6f57 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/set_ip_allowlist_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SetIpAllowlistRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SetIpAllowlistRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SetIpAllowlistRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SET_IP_ALLOWLIST']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SET_IP_ALLOWLIST']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/set_ip_allowlist_result.rb b/turnkey_client/lib/turnkey_client/models/set_ip_allowlist_result.rb new file mode 100644 index 0000000..1fe9709 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/set_ip_allowlist_result.rb @@ -0,0 +1,196 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SetIpAllowlistResult + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.openapi_types + { + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SetIpAllowlistResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SetIpAllowlistResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/signup_usage.rb b/turnkey_client/lib/turnkey_client/models/signup_usage.rb new file mode 100644 index 0000000..8c0ae4b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/signup_usage.rb @@ -0,0 +1,249 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SignupUsage + attr_accessor :email + + attr_accessor :phone_number + + attr_accessor :api_keys + + attr_accessor :authenticators + + attr_accessor :oauth_providers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'phone_number' => :'phoneNumber', + :'api_keys' => :'apiKeys', + :'authenticators' => :'authenticators', + :'oauth_providers' => :'oauthProviders' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'Object', + :'phone_number' => :'Object', + :'api_keys' => :'Object', + :'authenticators' => :'Object', + :'oauth_providers' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'email', + :'phone_number', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SignupUsage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SignupUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + end + + if attributes.key?(:'api_keys') + if (value = attributes[:'api_keys']).is_a?(Array) + self.api_keys = value + end + end + + if attributes.key?(:'authenticators') + if (value = attributes[:'authenticators']).is_a?(Array) + self.authenticators = value + end + end + + if attributes.key?(:'oauth_providers') + if (value = attributes[:'oauth_providers']).is_a?(Array) + self.oauth_providers = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + phone_number == o.phone_number && + api_keys == o.api_keys && + authenticators == o.authenticators && + oauth_providers == o.oauth_providers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, phone_number, api_keys, authenticators, oauth_providers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/signup_usage_v2.rb b/turnkey_client/lib/turnkey_client/models/signup_usage_v2.rb new file mode 100644 index 0000000..40a46a7 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/signup_usage_v2.rb @@ -0,0 +1,249 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SignupUsageV2 + attr_accessor :email + + attr_accessor :phone_number + + attr_accessor :api_keys + + attr_accessor :authenticators + + attr_accessor :oauth_providers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'phone_number' => :'phoneNumber', + :'api_keys' => :'apiKeys', + :'authenticators' => :'authenticators', + :'oauth_providers' => :'oauthProviders' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'Object', + :'phone_number' => :'Object', + :'api_keys' => :'Object', + :'authenticators' => :'Object', + :'oauth_providers' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'email', + :'phone_number', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SignupUsageV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SignupUsageV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + end + + if attributes.key?(:'api_keys') + if (value = attributes[:'api_keys']).is_a?(Array) + self.api_keys = value + end + end + + if attributes.key?(:'authenticators') + if (value = attributes[:'authenticators']).is_a?(Array) + self.authenticators = value + end + end + + if attributes.key?(:'oauth_providers') + if (value = attributes[:'oauth_providers']).is_a?(Array) + self.oauth_providers = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + phone_number == o.phone_number && + api_keys == o.api_keys && + authenticators == o.authenticators && + oauth_providers == o.oauth_providers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, phone_number, api_keys, authenticators, oauth_providers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/sol_send_transaction_intent.rb b/turnkey_client/lib/turnkey_client/models/sol_send_transaction_intent.rb index 879a154..9e6aad2 100644 --- a/turnkey_client/lib/turnkey_client/models/sol_send_transaction_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/sol_send_transaction_intent.rb @@ -21,7 +21,7 @@ class SolSendTransactionIntent # Whether to sponsor this transaction via Gas Station. attr_accessor :sponsor - # CAIP-2 chain ID (e.g., 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). + # CAIP-2 chain ID (e.g., 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values. attr_accessor :caip2 # user-provided blockhash for replay protection / deadline control. If omitted and sponsor=true, we fetch a fresh blockhash during execution @@ -140,7 +140,7 @@ def valid? return false if @unsigned_transaction.nil? return false if @sign_with.nil? return false if @caip2.nil? - caip2_validator = EnumAttributeValidator.new('Object', ['solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG', 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY']) + caip2_validator = EnumAttributeValidator.new('Object', ['solana:mainnet', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d', 'solana:devnet', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG']) return false unless caip2_validator.valid?(@caip2) true end @@ -148,7 +148,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] caip2 Object to be assigned def caip2=(caip2) - validator = EnumAttributeValidator.new('Object', ['solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG', 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY']) + validator = EnumAttributeValidator.new('Object', ['solana:mainnet', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d', 'solana:devnet', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG']) unless validator.valid?(caip2) fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/solana_config.rb b/turnkey_client/lib/turnkey_client/models/solana_config.rb new file mode 100644 index 0000000..e1ce2b9 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/solana_config.rb @@ -0,0 +1,207 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SolanaConfig + # Whether Solana rent prefunding is enabled for the organization. When omitted, the existing rent-prefund state is left unchanged. + attr_accessor :rent_prefund_enabled + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'rent_prefund_enabled' => :'rentPrefundEnabled' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'rent_prefund_enabled' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'rent_prefund_enabled' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SolanaConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SolanaConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'rent_prefund_enabled') + self.rent_prefund_enabled = attributes[:'rent_prefund_enabled'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rent_prefund_enabled == o.rent_prefund_enabled + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [rent_prefund_enabled].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/solana_failure_details.rb b/turnkey_client/lib/turnkey_client/models/solana_failure_details.rb new file mode 100644 index 0000000..4614c8f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/solana_failure_details.rb @@ -0,0 +1,273 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SolanaFailureDetails + # Where the Solana failure occurred, such as simulation or preflight. + attr_accessor :source + + # The Solana JSON-RPC error code, if available. + attr_accessor :rpc_code + + # The Solana JSON-RPC error message, if available. + attr_accessor :rpc_message + + # The raw Solana transaction error object serialized as JSON, if available. + attr_accessor :transaction_error_json + + # Program logs returned by Solana simulation or preflight, if available. + attr_accessor :logs + + # Compute units consumed during simulation or preflight, if available. + attr_accessor :units_consumed + + # The raw Solana inner instructions payload serialized as JSON, if available. + attr_accessor :inner_instructions_json + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'source' => :'source', + :'rpc_code' => :'rpcCode', + :'rpc_message' => :'rpcMessage', + :'transaction_error_json' => :'transactionErrorJson', + :'logs' => :'logs', + :'units_consumed' => :'unitsConsumed', + :'inner_instructions_json' => :'innerInstructionsJson' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'source' => :'Object', + :'rpc_code' => :'Object', + :'rpc_message' => :'Object', + :'transaction_error_json' => :'Object', + :'logs' => :'Object', + :'units_consumed' => :'Object', + :'inner_instructions_json' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'rpc_code', + :'rpc_message', + :'transaction_error_json', + :'units_consumed', + :'inner_instructions_json' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SolanaFailureDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SolanaFailureDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'rpc_code') + self.rpc_code = attributes[:'rpc_code'] + end + + if attributes.key?(:'rpc_message') + self.rpc_message = attributes[:'rpc_message'] + end + + if attributes.key?(:'transaction_error_json') + self.transaction_error_json = attributes[:'transaction_error_json'] + end + + if attributes.key?(:'logs') + if (value = attributes[:'logs']).is_a?(Array) + self.logs = value + end + end + + if attributes.key?(:'units_consumed') + self.units_consumed = attributes[:'units_consumed'] + end + + if attributes.key?(:'inner_instructions_json') + self.inner_instructions_json = attributes[:'inner_instructions_json'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + source == o.source && + rpc_code == o.rpc_code && + rpc_message == o.rpc_message && + transaction_error_json == o.transaction_error_json && + logs == o.logs && + units_consumed == o.units_consumed && + inner_instructions_json == o.inner_instructions_json + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [source, rpc_code, rpc_message, transaction_error_json, logs, units_consumed, inner_instructions_json].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/solana_send_transaction_status.rb b/turnkey_client/lib/turnkey_client/models/solana_send_transaction_status.rb new file mode 100644 index 0000000..0b012be --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/solana_send_transaction_status.rb @@ -0,0 +1,207 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SolanaSendTransactionStatus + # The Solana transaction signature, if available. + attr_accessor :signature + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'signature' => :'signature' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'signature' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'signature' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SolanaSendTransactionStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SolanaSendTransactionStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'signature') + self.signature = attributes[:'signature'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + signature == o.signature + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [signature].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_claim_leaf.rb b/turnkey_client/lib/turnkey_client/models/spark_claim_leaf.rb new file mode 100644 index 0000000..2a4d22b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_claim_leaf.rb @@ -0,0 +1,241 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkClaimLeaf + # Leaf identifier (UUID). + attr_accessor :leaf_id + + # ECIES ciphertext (hex-encoded) containing the inbound transfer secret. Decrypted inside the enclave using the wallet's Identity key. + attr_accessor :ciphertext + + # Hex-encoded 64-byte compact ECDSA signature binding (leaf_id, transfer_id, ciphertext) to the sender's identity key. Verified inside the enclave before decryption. + attr_accessor :sender_signature + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'leaf_id' => :'leafId', + :'ciphertext' => :'ciphertext', + :'sender_signature' => :'senderSignature' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'leaf_id' => :'Object', + :'ciphertext' => :'Object', + :'sender_signature' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkClaimLeaf` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkClaimLeaf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'leaf_id') + self.leaf_id = attributes[:'leaf_id'] + end + + if attributes.key?(:'ciphertext') + self.ciphertext = attributes[:'ciphertext'] + end + + if attributes.key?(:'sender_signature') + self.sender_signature = attributes[:'sender_signature'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @leaf_id.nil? + invalid_properties.push('invalid value for "leaf_id", leaf_id cannot be nil.') + end + + if @ciphertext.nil? + invalid_properties.push('invalid value for "ciphertext", ciphertext cannot be nil.') + end + + if @sender_signature.nil? + invalid_properties.push('invalid value for "sender_signature", sender_signature cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @leaf_id.nil? + return false if @ciphertext.nil? + return false if @sender_signature.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + leaf_id == o.leaf_id && + ciphertext == o.ciphertext && + sender_signature == o.sender_signature + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [leaf_id, ciphertext, sender_signature].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_claim_package.rb b/turnkey_client/lib/turnkey_client/models/spark_claim_package.rb new file mode 100644 index 0000000..011045c --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_claim_package.rb @@ -0,0 +1,275 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkClaimPackage + # Leaves being claimed. + attr_accessor :leaves + + # Shamir threshold for reconstructing the per-leaf claim secret. + attr_accessor :threshold + + # Operators that will receive Shamir shares. + attr_accessor :operator_recipients + + # Spark transfer identifier (UUID). Used together with each leaf's sender_signature to verify the sender bound this ciphertext to this transfer. + attr_accessor :transfer_id + + # Sender's compressed secp256k1 identity public key (hex-encoded, 33 bytes). Used to verify the per-leaf sender_signature fields. + attr_accessor :sender_identity_public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'leaves' => :'leaves', + :'threshold' => :'threshold', + :'operator_recipients' => :'operatorRecipients', + :'transfer_id' => :'transferId', + :'sender_identity_public_key' => :'senderIdentityPublicKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'leaves' => :'Object', + :'threshold' => :'Object', + :'operator_recipients' => :'Object', + :'transfer_id' => :'Object', + :'sender_identity_public_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkClaimPackage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkClaimPackage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'leaves') + if (value = attributes[:'leaves']).is_a?(Array) + self.leaves = value + end + end + + if attributes.key?(:'threshold') + self.threshold = attributes[:'threshold'] + end + + if attributes.key?(:'operator_recipients') + if (value = attributes[:'operator_recipients']).is_a?(Array) + self.operator_recipients = value + end + end + + if attributes.key?(:'transfer_id') + self.transfer_id = attributes[:'transfer_id'] + end + + if attributes.key?(:'sender_identity_public_key') + self.sender_identity_public_key = attributes[:'sender_identity_public_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @leaves.nil? + invalid_properties.push('invalid value for "leaves", leaves cannot be nil.') + end + + if @threshold.nil? + invalid_properties.push('invalid value for "threshold", threshold cannot be nil.') + end + + if @operator_recipients.nil? + invalid_properties.push('invalid value for "operator_recipients", operator_recipients cannot be nil.') + end + + if @transfer_id.nil? + invalid_properties.push('invalid value for "transfer_id", transfer_id cannot be nil.') + end + + if @sender_identity_public_key.nil? + invalid_properties.push('invalid value for "sender_identity_public_key", sender_identity_public_key cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @leaves.nil? + return false if @threshold.nil? + return false if @operator_recipients.nil? + return false if @transfer_id.nil? + return false if @sender_identity_public_key.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + leaves == o.leaves && + threshold == o.threshold && + operator_recipients == o.operator_recipients && + transfer_id == o.transfer_id && + sender_identity_public_key == o.sender_identity_public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [leaves, threshold, operator_recipients, transfer_id, sender_identity_public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_claim_transfer_intent.rb b/turnkey_client/lib/turnkey_client/models/spark_claim_transfer_intent.rb new file mode 100644 index 0000000..6893fe3 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_claim_transfer_intent.rb @@ -0,0 +1,225 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkClaimTransferIntent + # A Spark wallet account address identifying the wallet. + attr_accessor :sign_with + + attr_accessor :claim + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sign_with' => :'signWith', + :'claim' => :'claim' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'sign_with' => :'Object', + :'claim' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkClaimTransferIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkClaimTransferIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sign_with') + self.sign_with = attributes[:'sign_with'] + end + + if attributes.key?(:'claim') + self.claim = attributes[:'claim'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @sign_with.nil? + invalid_properties.push('invalid value for "sign_with", sign_with cannot be nil.') + end + + if @claim.nil? + invalid_properties.push('invalid value for "claim", claim cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @sign_with.nil? + return false if @claim.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sign_with == o.sign_with && + claim == o.claim + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sign_with, claim].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_claim_transfer_request.rb b/turnkey_client/lib/turnkey_client/models/spark_claim_transfer_request.rb new file mode 100644 index 0000000..460e3d2 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_claim_transfer_request.rb @@ -0,0 +1,288 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkClaimTransferRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkClaimTransferRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkClaimTransferRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_claim_transfer_result.rb b/turnkey_client/lib/turnkey_client/models/spark_claim_transfer_result.rb new file mode 100644 index 0000000..87e246e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_claim_transfer_result.rb @@ -0,0 +1,230 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkClaimTransferResult + # Per-operator ECIES-encrypted packages. + attr_accessor :operator_packages + + # Newly-derived SigningLeaf public keys, one per leaf, in input order. + attr_accessor :new_leaf_public_keys + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'operator_packages' => :'operatorPackages', + :'new_leaf_public_keys' => :'newLeafPublicKeys' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'operator_packages' => :'Object', + :'new_leaf_public_keys' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkClaimTransferResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkClaimTransferResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'operator_packages') + if (value = attributes[:'operator_packages']).is_a?(Array) + self.operator_packages = value + end + end + + if attributes.key?(:'new_leaf_public_keys') + if (value = attributes[:'new_leaf_public_keys']).is_a?(Array) + self.new_leaf_public_keys = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @operator_packages.nil? + invalid_properties.push('invalid value for "operator_packages", operator_packages cannot be nil.') + end + + if @new_leaf_public_keys.nil? + invalid_properties.push('invalid value for "new_leaf_public_keys", new_leaf_public_keys cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @operator_packages.nil? + return false if @new_leaf_public_keys.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + operator_packages == o.operator_packages && + new_leaf_public_keys == o.new_leaf_public_keys + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [operator_packages, new_leaf_public_keys].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_deposit_derivation.rb b/turnkey_client/lib/turnkey_client/models/spark_deposit_derivation.rb new file mode 100644 index 0000000..fa36bee --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_deposit_derivation.rb @@ -0,0 +1,196 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkDepositDerivation + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.openapi_types + { + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkDepositDerivation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkDepositDerivation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_encrypted_operator_package.rb b/turnkey_client/lib/turnkey_client/models/spark_encrypted_operator_package.rb new file mode 100644 index 0000000..2a0cc8b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_encrypted_operator_package.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkEncryptedOperatorPackage + # Spark operator identifier (UUID). + attr_accessor :operator_id + + # ECIES ciphertext (hex-encoded) opaque to Turnkey after emission. + attr_accessor :encrypted_package + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'operator_id' => :'operatorId', + :'encrypted_package' => :'encryptedPackage' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'operator_id' => :'Object', + :'encrypted_package' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkEncryptedOperatorPackage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkEncryptedOperatorPackage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'operator_id') + self.operator_id = attributes[:'operator_id'] + end + + if attributes.key?(:'encrypted_package') + self.encrypted_package = attributes[:'encrypted_package'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @operator_id.nil? + invalid_properties.push('invalid value for "operator_id", operator_id cannot be nil.') + end + + if @encrypted_package.nil? + invalid_properties.push('invalid value for "encrypted_package", encrypted_package cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @operator_id.nil? + return false if @encrypted_package.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + operator_id == o.operator_id && + encrypted_package == o.encrypted_package + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [operator_id, encrypted_package].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_frost_commitment.rb b/turnkey_client/lib/turnkey_client/models/spark_frost_commitment.rb new file mode 100644 index 0000000..1f37e8a --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_frost_commitment.rb @@ -0,0 +1,241 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkFrostCommitment + # FROST participant identifier, hex-encoded (32-byte scalar). + attr_accessor :id + + # Hiding commitment D, hex-encoded compressed secp256k1 point. + attr_accessor :hiding + + # Binding commitment E, hex-encoded compressed secp256k1 point. + attr_accessor :binding + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'hiding' => :'hiding', + :'binding' => :'binding' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Object', + :'hiding' => :'Object', + :'binding' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkFrostCommitment` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkFrostCommitment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'hiding') + self.hiding = attributes[:'hiding'] + end + + if attributes.key?(:'binding') + self.binding = attributes[:'binding'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @hiding.nil? + invalid_properties.push('invalid value for "hiding", hiding cannot be nil.') + end + + if @binding.nil? + invalid_properties.push('invalid value for "binding", binding cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @hiding.nil? + return false if @binding.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + hiding == o.hiding && + binding == o.binding + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, hiding, binding].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_htlc_preimage_derivation.rb b/turnkey_client/lib/turnkey_client/models/spark_htlc_preimage_derivation.rb new file mode 100644 index 0000000..bb149c6 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_htlc_preimage_derivation.rb @@ -0,0 +1,196 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkHtlcPreimageDerivation + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.openapi_types + { + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkHtlcPreimageDerivation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkHtlcPreimageDerivation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_identity_derivation.rb b/turnkey_client/lib/turnkey_client/models/spark_identity_derivation.rb new file mode 100644 index 0000000..5525b09 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_identity_derivation.rb @@ -0,0 +1,196 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkIdentityDerivation + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.openapi_types + { + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkIdentityDerivation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkIdentityDerivation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_key_derivation.rb b/turnkey_client/lib/turnkey_client/models/spark_key_derivation.rb new file mode 100644 index 0000000..25b87c4 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_key_derivation.rb @@ -0,0 +1,241 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkKeyDerivation + attr_accessor :identity + + attr_accessor :signing_leaf + + attr_accessor :deposit + + attr_accessor :static_deposit + + attr_accessor :htlc_preimage + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identity' => :'identity', + :'signing_leaf' => :'signingLeaf', + :'deposit' => :'deposit', + :'static_deposit' => :'staticDeposit', + :'htlc_preimage' => :'htlcPreimage' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'identity' => :'Object', + :'signing_leaf' => :'Object', + :'deposit' => :'Object', + :'static_deposit' => :'Object', + :'htlc_preimage' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkKeyDerivation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkKeyDerivation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'identity') + self.identity = attributes[:'identity'] + end + + if attributes.key?(:'signing_leaf') + self.signing_leaf = attributes[:'signing_leaf'] + end + + if attributes.key?(:'deposit') + self.deposit = attributes[:'deposit'] + end + + if attributes.key?(:'static_deposit') + self.static_deposit = attributes[:'static_deposit'] + end + + if attributes.key?(:'htlc_preimage') + self.htlc_preimage = attributes[:'htlc_preimage'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + identity == o.identity && + signing_leaf == o.signing_leaf && + deposit == o.deposit && + static_deposit == o.static_deposit && + htlc_preimage == o.htlc_preimage + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [identity, signing_leaf, deposit, static_deposit, htlc_preimage].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_leaf_public_key.rb b/turnkey_client/lib/turnkey_client/models/spark_leaf_public_key.rb new file mode 100644 index 0000000..8b3681e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_leaf_public_key.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkLeafPublicKey + # The Spark leaf_id this public key was derived for. + attr_accessor :leaf_id + + # Hex-encoded compressed secp256k1 point (33 bytes) for the SigningLeaf derivation at leaf_id. + attr_accessor :public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'leaf_id' => :'leafId', + :'public_key' => :'publicKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'leaf_id' => :'Object', + :'public_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkLeafPublicKey` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkLeafPublicKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'leaf_id') + self.leaf_id = attributes[:'leaf_id'] + end + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @leaf_id.nil? + invalid_properties.push('invalid value for "leaf_id", leaf_id cannot be nil.') + end + + if @public_key.nil? + invalid_properties.push('invalid value for "public_key", public_key cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @leaf_id.nil? + return false if @public_key.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + leaf_id == o.leaf_id && + public_key == o.public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [leaf_id, public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_lightning_receive_package.rb b/turnkey_client/lib/turnkey_client/models/spark_lightning_receive_package.rb new file mode 100644 index 0000000..9c2d67c --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_lightning_receive_package.rb @@ -0,0 +1,228 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkLightningReceivePackage + # Feldman VSS threshold for reconstructing the preimage. + attr_accessor :threshold + + # Operators that will receive Feldman shares of the preimage. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list. + attr_accessor :operator_recipients + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'threshold' => :'threshold', + :'operator_recipients' => :'operatorRecipients' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'threshold' => :'Object', + :'operator_recipients' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkLightningReceivePackage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkLightningReceivePackage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'threshold') + self.threshold = attributes[:'threshold'] + end + + if attributes.key?(:'operator_recipients') + if (value = attributes[:'operator_recipients']).is_a?(Array) + self.operator_recipients = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @threshold.nil? + invalid_properties.push('invalid value for "threshold", threshold cannot be nil.') + end + + if @operator_recipients.nil? + invalid_properties.push('invalid value for "operator_recipients", operator_recipients cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @threshold.nil? + return false if @operator_recipients.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + threshold == o.threshold && + operator_recipients == o.operator_recipients + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [threshold, operator_recipients].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_operator_recipient.rb b/turnkey_client/lib/turnkey_client/models/spark_operator_recipient.rb new file mode 100644 index 0000000..94ca406 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_operator_recipient.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkOperatorRecipient + # Spark operator identifier (UUID). + attr_accessor :operator_id + + # Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point). + attr_accessor :encryption_public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'operator_id' => :'operatorId', + :'encryption_public_key' => :'encryptionPublicKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'operator_id' => :'Object', + :'encryption_public_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkOperatorRecipient` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkOperatorRecipient`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'operator_id') + self.operator_id = attributes[:'operator_id'] + end + + if attributes.key?(:'encryption_public_key') + self.encryption_public_key = attributes[:'encryption_public_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @operator_id.nil? + invalid_properties.push('invalid value for "operator_id", operator_id cannot be nil.') + end + + if @encryption_public_key.nil? + invalid_properties.push('invalid value for "encryption_public_key", encryption_public_key cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @operator_id.nil? + return false if @encryption_public_key.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + operator_id == o.operator_id && + encryption_public_key == o.encryption_public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [operator_id, encryption_public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_partial_signature.rb b/turnkey_client/lib/turnkey_client/models/spark_partial_signature.rb new file mode 100644 index 0000000..c673f87 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_partial_signature.rb @@ -0,0 +1,241 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkPartialSignature + # Hex-encoded FROST partial signature. + attr_accessor :signature_share + + # Turnkey's hiding commitment D (hex-encoded compressed secp256k1 point). Forward to the Spark Operator. + attr_accessor :hiding + + # Turnkey's binding commitment E (hex-encoded compressed secp256k1 point). Forward to the Spark Operator. + attr_accessor :binding + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'signature_share' => :'signatureShare', + :'hiding' => :'hiding', + :'binding' => :'binding' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'signature_share' => :'Object', + :'hiding' => :'Object', + :'binding' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkPartialSignature` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkPartialSignature`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'signature_share') + self.signature_share = attributes[:'signature_share'] + end + + if attributes.key?(:'hiding') + self.hiding = attributes[:'hiding'] + end + + if attributes.key?(:'binding') + self.binding = attributes[:'binding'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @signature_share.nil? + invalid_properties.push('invalid value for "signature_share", signature_share cannot be nil.') + end + + if @hiding.nil? + invalid_properties.push('invalid value for "hiding", hiding cannot be nil.') + end + + if @binding.nil? + invalid_properties.push('invalid value for "binding", binding cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @signature_share.nil? + return false if @hiding.nil? + return false if @binding.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + signature_share == o.signature_share && + hiding == o.hiding && + binding == o.binding + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [signature_share, hiding, binding].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_intent.rb b/turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_intent.rb new file mode 100644 index 0000000..0643ce3 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_intent.rb @@ -0,0 +1,225 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkPrepareLightningReceiveIntent + # A Spark wallet account address identifying the wallet. + attr_accessor :sign_with + + attr_accessor :lightning_receive + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sign_with' => :'signWith', + :'lightning_receive' => :'lightningReceive' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'sign_with' => :'Object', + :'lightning_receive' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkPrepareLightningReceiveIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkPrepareLightningReceiveIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sign_with') + self.sign_with = attributes[:'sign_with'] + end + + if attributes.key?(:'lightning_receive') + self.lightning_receive = attributes[:'lightning_receive'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @sign_with.nil? + invalid_properties.push('invalid value for "sign_with", sign_with cannot be nil.') + end + + if @lightning_receive.nil? + invalid_properties.push('invalid value for "lightning_receive", lightning_receive cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @sign_with.nil? + return false if @lightning_receive.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sign_with == o.sign_with && + lightning_receive == o.lightning_receive + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sign_with, lightning_receive].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_request.rb b/turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_request.rb new file mode 100644 index 0000000..aad34b1 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_request.rb @@ -0,0 +1,288 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkPrepareLightningReceiveRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkPrepareLightningReceiveRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkPrepareLightningReceiveRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_result.rb b/turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_result.rb new file mode 100644 index 0000000..48b69dc --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_prepare_lightning_receive_result.rb @@ -0,0 +1,228 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkPrepareLightningReceiveResult + # Per-operator ECIES-encrypted Feldman share packages. + attr_accessor :operator_packages + + # Hex-encoded SHA256(preimage). Forward to the Lightning node. + attr_accessor :payment_hash + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'operator_packages' => :'operatorPackages', + :'payment_hash' => :'paymentHash' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'operator_packages' => :'Object', + :'payment_hash' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkPrepareLightningReceiveResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkPrepareLightningReceiveResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'operator_packages') + if (value = attributes[:'operator_packages']).is_a?(Array) + self.operator_packages = value + end + end + + if attributes.key?(:'payment_hash') + self.payment_hash = attributes[:'payment_hash'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @operator_packages.nil? + invalid_properties.push('invalid value for "operator_packages", operator_packages cannot be nil.') + end + + if @payment_hash.nil? + invalid_properties.push('invalid value for "payment_hash", payment_hash cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @operator_packages.nil? + return false if @payment_hash.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + operator_packages == o.operator_packages && + payment_hash == o.payment_hash + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [operator_packages, payment_hash].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_intent.rb b/turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_intent.rb new file mode 100644 index 0000000..fbf554e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_intent.rb @@ -0,0 +1,225 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkPrepareTransferIntent + # A Spark wallet account address identifying the wallet. + attr_accessor :sign_with + + attr_accessor :transfer + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sign_with' => :'signWith', + :'transfer' => :'transfer' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'sign_with' => :'Object', + :'transfer' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkPrepareTransferIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkPrepareTransferIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sign_with') + self.sign_with = attributes[:'sign_with'] + end + + if attributes.key?(:'transfer') + self.transfer = attributes[:'transfer'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @sign_with.nil? + invalid_properties.push('invalid value for "sign_with", sign_with cannot be nil.') + end + + if @transfer.nil? + invalid_properties.push('invalid value for "transfer", transfer cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @sign_with.nil? + return false if @transfer.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sign_with == o.sign_with && + transfer == o.transfer + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sign_with, transfer].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_request.rb b/turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_request.rb new file mode 100644 index 0000000..2357452 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_request.rb @@ -0,0 +1,288 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkPrepareTransferRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkPrepareTransferRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkPrepareTransferRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_result.rb b/turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_result.rb new file mode 100644 index 0000000..1efd5fc --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_prepare_transfer_result.rb @@ -0,0 +1,245 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkPrepareTransferResult + # Per-operator ECIES-encrypted packages. + attr_accessor :operator_packages + + # Hex-encoded ECDSA-DER signature of the TransferPackage signing payload, signed with the wallet's IDENTITY key. + attr_accessor :transfer_user_signature + + # Newly-derived SigningLeaf public keys, one per leaf, in input order. + attr_accessor :new_leaf_public_keys + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'operator_packages' => :'operatorPackages', + :'transfer_user_signature' => :'transferUserSignature', + :'new_leaf_public_keys' => :'newLeafPublicKeys' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'operator_packages' => :'Object', + :'transfer_user_signature' => :'Object', + :'new_leaf_public_keys' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkPrepareTransferResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkPrepareTransferResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'operator_packages') + if (value = attributes[:'operator_packages']).is_a?(Array) + self.operator_packages = value + end + end + + if attributes.key?(:'transfer_user_signature') + self.transfer_user_signature = attributes[:'transfer_user_signature'] + end + + if attributes.key?(:'new_leaf_public_keys') + if (value = attributes[:'new_leaf_public_keys']).is_a?(Array) + self.new_leaf_public_keys = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @operator_packages.nil? + invalid_properties.push('invalid value for "operator_packages", operator_packages cannot be nil.') + end + + if @transfer_user_signature.nil? + invalid_properties.push('invalid value for "transfer_user_signature", transfer_user_signature cannot be nil.') + end + + if @new_leaf_public_keys.nil? + invalid_properties.push('invalid value for "new_leaf_public_keys", new_leaf_public_keys cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @operator_packages.nil? + return false if @transfer_user_signature.nil? + return false if @new_leaf_public_keys.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + operator_packages == o.operator_packages && + transfer_user_signature == o.transfer_user_signature && + new_leaf_public_keys == o.new_leaf_public_keys + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [operator_packages, transfer_user_signature, new_leaf_public_keys].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_sign_frost_intent.rb b/turnkey_client/lib/turnkey_client/models/spark_sign_frost_intent.rb new file mode 100644 index 0000000..5a9d221 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_sign_frost_intent.rb @@ -0,0 +1,228 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkSignFrostIntent + # A Spark wallet account address identifying the wallet to sign with. + attr_accessor :sign_with + + # Batched sign requests. Each produces a partial signature plus Turnkey's public commitments. + attr_accessor :signatures + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sign_with' => :'signWith', + :'signatures' => :'signatures' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'sign_with' => :'Object', + :'signatures' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkSignFrostIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkSignFrostIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sign_with') + self.sign_with = attributes[:'sign_with'] + end + + if attributes.key?(:'signatures') + if (value = attributes[:'signatures']).is_a?(Array) + self.signatures = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @sign_with.nil? + invalid_properties.push('invalid value for "sign_with", sign_with cannot be nil.') + end + + if @signatures.nil? + invalid_properties.push('invalid value for "signatures", signatures cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @sign_with.nil? + return false if @signatures.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sign_with == o.sign_with && + signatures == o.signatures + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sign_with, signatures].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_sign_frost_request.rb b/turnkey_client/lib/turnkey_client/models/spark_sign_frost_request.rb new file mode 100644 index 0000000..09e8c11 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_sign_frost_request.rb @@ -0,0 +1,288 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkSignFrostRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkSignFrostRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkSignFrostRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SPARK_SIGN_FROST']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SPARK_SIGN_FROST']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_sign_frost_result.rb b/turnkey_client/lib/turnkey_client/models/spark_sign_frost_result.rb new file mode 100644 index 0000000..da830c0 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_sign_frost_result.rb @@ -0,0 +1,213 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkSignFrostResult + # Partial signatures plus Turnkey commitments, one per request, in order. + attr_accessor :signatures + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'signatures' => :'signatures' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'signatures' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkSignFrostResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkSignFrostResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'signatures') + if (value = attributes[:'signatures']).is_a?(Array) + self.signatures = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @signatures.nil? + invalid_properties.push('invalid value for "signatures", signatures cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @signatures.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + signatures == o.signatures + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [signatures].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_signature_request.rb b/turnkey_client/lib/turnkey_client/models/spark_signature_request.rb new file mode 100644 index 0000000..bad18b1 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_signature_request.rb @@ -0,0 +1,268 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkSignatureRequest + attr_accessor :derivation + + # Hex-encoded 32-byte sighash to sign. + attr_accessor :message + + # Aggregate group verifying key (hex-encoded compressed secp256k1 point), computed as P_ops + P_user. Bound into the nonce HMAC. + attr_accessor :verifying_key + + # Commitments for every non-Turnkey participant. MUST NOT include an entry under Turnkey's identifier. Bound into the nonce HMAC. + attr_accessor :operator_commitments + + # Optional adaptor point T (hex-encoded 33-byte compressed secp256k1 pubkey). When set, Turnkey produces a Schnorr adaptor pre-signature with the FROST challenge bound to `R+T` (where `R` is the aggregate group nonce commitment from FROST). The party holding the discrete log `t` completes the pre-sig to a valid BIP-340 signature by adding `t` (or `-t`, for parity) to the signature scalar `s`. This is primarily used by Spark leaves-swap and other adaptor-bound flows; absent or empty leads to plain FROST signing (the typical case). + attr_accessor :adaptor_public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'derivation' => :'derivation', + :'message' => :'message', + :'verifying_key' => :'verifyingKey', + :'operator_commitments' => :'operatorCommitments', + :'adaptor_public_key' => :'adaptorPublicKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'derivation' => :'Object', + :'message' => :'Object', + :'verifying_key' => :'Object', + :'operator_commitments' => :'Object', + :'adaptor_public_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'adaptor_public_key' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkSignatureRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkSignatureRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'derivation') + self.derivation = attributes[:'derivation'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'verifying_key') + self.verifying_key = attributes[:'verifying_key'] + end + + if attributes.key?(:'operator_commitments') + if (value = attributes[:'operator_commitments']).is_a?(Array) + self.operator_commitments = value + end + end + + if attributes.key?(:'adaptor_public_key') + self.adaptor_public_key = attributes[:'adaptor_public_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @derivation.nil? + invalid_properties.push('invalid value for "derivation", derivation cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + if @verifying_key.nil? + invalid_properties.push('invalid value for "verifying_key", verifying_key cannot be nil.') + end + + if @operator_commitments.nil? + invalid_properties.push('invalid value for "operator_commitments", operator_commitments cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @derivation.nil? + return false if @message.nil? + return false if @verifying_key.nil? + return false if @operator_commitments.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + derivation == o.derivation && + message == o.message && + verifying_key == o.verifying_key && + operator_commitments == o.operator_commitments && + adaptor_public_key == o.adaptor_public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [derivation, message, verifying_key, operator_commitments, adaptor_public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_signing_leaf_derivation.rb b/turnkey_client/lib/turnkey_client/models/spark_signing_leaf_derivation.rb new file mode 100644 index 0000000..5d55614 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_signing_leaf_derivation.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkSigningLeafDerivation + # Unique identifier for the Spark signing leaf. + attr_accessor :leaf_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'leaf_id' => :'leafId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'leaf_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkSigningLeafDerivation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkSigningLeafDerivation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'leaf_id') + self.leaf_id = attributes[:'leaf_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @leaf_id.nil? + invalid_properties.push('invalid value for "leaf_id", leaf_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @leaf_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + leaf_id == o.leaf_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [leaf_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_static_deposit_derivation.rb b/turnkey_client/lib/turnkey_client/models/spark_static_deposit_derivation.rb new file mode 100644 index 0000000..62b88c0 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_static_deposit_derivation.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkStaticDepositDerivation + # Index used to derive the static deposit key. + attr_accessor :index + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'index' => :'index' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'index' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkStaticDepositDerivation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkStaticDepositDerivation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'index') + self.index = attributes[:'index'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @index.nil? + invalid_properties.push('invalid value for "index", index cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @index.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + index == o.index + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [index].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_transfer_leaf.rb b/turnkey_client/lib/turnkey_client/models/spark_transfer_leaf.rb new file mode 100644 index 0000000..962b6b1 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_transfer_leaf.rb @@ -0,0 +1,272 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkTransferLeaf + # Leaf identifier (UUID). + attr_accessor :leaf_id + + attr_accessor :old_leaf_derivation + + attr_accessor :new_leaf_derivation + + # Client-produced CPFP refund signature (hex-encoded), passed through verbatim into the per-operator SendLeafKeyTweak. Empty omits the field from the operator package. + attr_accessor :refund_signature + + # Client-produced direct refund signature (hex-encoded). Passed through verbatim. + attr_accessor :direct_refund_signature + + # Client-produced direct-from-CPFP refund signature (hex-encoded). Passed through verbatim. + attr_accessor :direct_from_cpfp_refund_signature + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'leaf_id' => :'leafId', + :'old_leaf_derivation' => :'oldLeafDerivation', + :'new_leaf_derivation' => :'newLeafDerivation', + :'refund_signature' => :'refundSignature', + :'direct_refund_signature' => :'directRefundSignature', + :'direct_from_cpfp_refund_signature' => :'directFromCpfpRefundSignature' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'leaf_id' => :'Object', + :'old_leaf_derivation' => :'Object', + :'new_leaf_derivation' => :'Object', + :'refund_signature' => :'Object', + :'direct_refund_signature' => :'Object', + :'direct_from_cpfp_refund_signature' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'refund_signature', + :'direct_refund_signature', + :'direct_from_cpfp_refund_signature' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkTransferLeaf` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkTransferLeaf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'leaf_id') + self.leaf_id = attributes[:'leaf_id'] + end + + if attributes.key?(:'old_leaf_derivation') + self.old_leaf_derivation = attributes[:'old_leaf_derivation'] + end + + if attributes.key?(:'new_leaf_derivation') + self.new_leaf_derivation = attributes[:'new_leaf_derivation'] + end + + if attributes.key?(:'refund_signature') + self.refund_signature = attributes[:'refund_signature'] + end + + if attributes.key?(:'direct_refund_signature') + self.direct_refund_signature = attributes[:'direct_refund_signature'] + end + + if attributes.key?(:'direct_from_cpfp_refund_signature') + self.direct_from_cpfp_refund_signature = attributes[:'direct_from_cpfp_refund_signature'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @leaf_id.nil? + invalid_properties.push('invalid value for "leaf_id", leaf_id cannot be nil.') + end + + if @old_leaf_derivation.nil? + invalid_properties.push('invalid value for "old_leaf_derivation", old_leaf_derivation cannot be nil.') + end + + if @new_leaf_derivation.nil? + invalid_properties.push('invalid value for "new_leaf_derivation", new_leaf_derivation cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @leaf_id.nil? + return false if @old_leaf_derivation.nil? + return false if @new_leaf_derivation.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + leaf_id == o.leaf_id && + old_leaf_derivation == o.old_leaf_derivation && + new_leaf_derivation == o.new_leaf_derivation && + refund_signature == o.refund_signature && + direct_refund_signature == o.direct_refund_signature && + direct_from_cpfp_refund_signature == o.direct_from_cpfp_refund_signature + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [leaf_id, old_leaf_derivation, new_leaf_derivation, refund_signature, direct_refund_signature, direct_from_cpfp_refund_signature].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/spark_transfer_package.rb b/turnkey_client/lib/turnkey_client/models/spark_transfer_package.rb new file mode 100644 index 0000000..d5183ee --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/spark_transfer_package.rb @@ -0,0 +1,275 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SparkTransferPackage + # Spark transfer identifier (UUID). + attr_accessor :transfer_id + + # Leaves being transferred. + attr_accessor :leaves + + # Feldman VSS threshold for reconstructing the per-leaf tweak scalar. + attr_accessor :threshold + + # Operators that will receive Feldman shares of the per-leaf tweak. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list. + attr_accessor :operator_recipients + + # Recipient's identity pubkey (hex-encoded compressed secp256k1 point). Each leaf's new_priv is ECIES-encrypted to this key and embedded in the per-operator package for claim-time delivery. + attr_accessor :receiver_public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transfer_id' => :'transferId', + :'leaves' => :'leaves', + :'threshold' => :'threshold', + :'operator_recipients' => :'operatorRecipients', + :'receiver_public_key' => :'receiverPublicKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'transfer_id' => :'Object', + :'leaves' => :'Object', + :'threshold' => :'Object', + :'operator_recipients' => :'Object', + :'receiver_public_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SparkTransferPackage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SparkTransferPackage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'transfer_id') + self.transfer_id = attributes[:'transfer_id'] + end + + if attributes.key?(:'leaves') + if (value = attributes[:'leaves']).is_a?(Array) + self.leaves = value + end + end + + if attributes.key?(:'threshold') + self.threshold = attributes[:'threshold'] + end + + if attributes.key?(:'operator_recipients') + if (value = attributes[:'operator_recipients']).is_a?(Array) + self.operator_recipients = value + end + end + + if attributes.key?(:'receiver_public_key') + self.receiver_public_key = attributes[:'receiver_public_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @transfer_id.nil? + invalid_properties.push('invalid value for "transfer_id", transfer_id cannot be nil.') + end + + if @leaves.nil? + invalid_properties.push('invalid value for "leaves", leaves cannot be nil.') + end + + if @threshold.nil? + invalid_properties.push('invalid value for "threshold", threshold cannot be nil.') + end + + if @operator_recipients.nil? + invalid_properties.push('invalid value for "operator_recipients", operator_recipients cannot be nil.') + end + + if @receiver_public_key.nil? + invalid_properties.push('invalid value for "receiver_public_key", receiver_public_key cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @transfer_id.nil? + return false if @leaves.nil? + return false if @threshold.nil? + return false if @operator_recipients.nil? + return false if @receiver_public_key.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transfer_id == o.transfer_id && + leaves == o.leaves && + threshold == o.threshold && + operator_recipients == o.operator_recipients && + receiver_public_key == o.receiver_public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [transfer_id, leaves, threshold, operator_recipients, receiver_public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/token_usage.rb b/turnkey_client/lib/turnkey_client/models/token_usage.rb new file mode 100644 index 0000000..7960534 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/token_usage.rb @@ -0,0 +1,252 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TokenUsage + attr_accessor :type + + # Unique identifier for the verification token + attr_accessor :token_id + + attr_accessor :signup + + attr_accessor :login + + attr_accessor :signup_v2 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'token_id' => :'tokenId', + :'signup' => :'signup', + :'login' => :'login', + :'signup_v2' => :'signupV2' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'token_id' => :'Object', + :'signup' => :'Object', + :'login' => :'Object', + :'signup_v2' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TokenUsage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TokenUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'token_id') + self.token_id = attributes[:'token_id'] + end + + if attributes.key?(:'signup') + self.signup = attributes[:'signup'] + end + + if attributes.key?(:'login') + self.login = attributes[:'login'] + end + + if attributes.key?(:'signup_v2') + self.signup_v2 = attributes[:'signup_v2'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @token_id.nil? + invalid_properties.push('invalid value for "token_id", token_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + return false if @token_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + token_id == o.token_id && + signup == o.signup && + login == o.login && + signup_v2 == o.signup_v2 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, token_id, signup, login, signup_v2].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_app.rb b/turnkey_client/lib/turnkey_client/models/tvc_app.rb new file mode 100644 index 0000000..20d1c93 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_app.rb @@ -0,0 +1,353 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcApp + # Unique Identifier for this TVC App. + attr_accessor :id + + # Unique Identifier of the Organization for this TVC App + attr_accessor :organization_id + + # Name for this TVC App. + attr_accessor :name + + # Public key for the Quorum Key associated with this TVC App + attr_accessor :quorum_public_key + + attr_accessor :manifest_set + + attr_accessor :share_set + + # Whether or not this TVC App has network egress enabled. + attr_accessor :enable_egress + + attr_accessor :created_at + + attr_accessor :updated_at + + # The deployment currently designated to receive traffic. Null if no deployment for this app is deployed. + attr_accessor :live_deployment_id + + # The public domain for ingress to this TVC App (in the format \"app-.turnkey.cloud\"). + attr_accessor :public_domain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'organization_id' => :'organizationId', + :'name' => :'name', + :'quorum_public_key' => :'quorumPublicKey', + :'manifest_set' => :'manifestSet', + :'share_set' => :'shareSet', + :'enable_egress' => :'enableEgress', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'live_deployment_id' => :'liveDeploymentId', + :'public_domain' => :'publicDomain' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Object', + :'organization_id' => :'Object', + :'name' => :'Object', + :'quorum_public_key' => :'Object', + :'manifest_set' => :'Object', + :'share_set' => :'Object', + :'enable_egress' => :'Object', + :'created_at' => :'Object', + :'updated_at' => :'Object', + :'live_deployment_id' => :'Object', + :'public_domain' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'live_deployment_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcApp` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcApp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'quorum_public_key') + self.quorum_public_key = attributes[:'quorum_public_key'] + end + + if attributes.key?(:'manifest_set') + self.manifest_set = attributes[:'manifest_set'] + end + + if attributes.key?(:'share_set') + self.share_set = attributes[:'share_set'] + end + + if attributes.key?(:'enable_egress') + self.enable_egress = attributes[:'enable_egress'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'live_deployment_id') + self.live_deployment_id = attributes[:'live_deployment_id'] + end + + if attributes.key?(:'public_domain') + self.public_domain = attributes[:'public_domain'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @quorum_public_key.nil? + invalid_properties.push('invalid value for "quorum_public_key", quorum_public_key cannot be nil.') + end + + if @manifest_set.nil? + invalid_properties.push('invalid value for "manifest_set", manifest_set cannot be nil.') + end + + if @share_set.nil? + invalid_properties.push('invalid value for "share_set", share_set cannot be nil.') + end + + if @enable_egress.nil? + invalid_properties.push('invalid value for "enable_egress", enable_egress cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + if @public_domain.nil? + invalid_properties.push('invalid value for "public_domain", public_domain cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @organization_id.nil? + return false if @name.nil? + return false if @quorum_public_key.nil? + return false if @manifest_set.nil? + return false if @share_set.nil? + return false if @enable_egress.nil? + return false if @created_at.nil? + return false if @updated_at.nil? + return false if @public_domain.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + organization_id == o.organization_id && + name == o.name && + quorum_public_key == o.quorum_public_key && + manifest_set == o.manifest_set && + share_set == o.share_set && + enable_egress == o.enable_egress && + created_at == o.created_at && + updated_at == o.updated_at && + live_deployment_id == o.live_deployment_id && + public_domain == o.public_domain + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, organization_id, name, quorum_public_key, manifest_set, share_set, enable_egress, created_at, updated_at, live_deployment_id, public_domain].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_container_spec.rb b/turnkey_client/lib/turnkey_client/models/tvc_container_spec.rb new file mode 100644 index 0000000..bccbf4d --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_container_spec.rb @@ -0,0 +1,302 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcContainerSpec + # The URL for this container image. + attr_accessor :container_url + + # The path (in-container) to the executable binary. + attr_accessor :path + + # The arguments to pass to the executable. + attr_accessor :args + + # Whether or not this container requires a pull secret to access. + attr_accessor :has_pull_secret + + attr_accessor :health_check_type + + # The port to use for health checks against this executable. + attr_accessor :health_check_port + + # The port to use for public ingress to this executable. + attr_accessor :public_ingress_port + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'container_url' => :'containerUrl', + :'path' => :'path', + :'args' => :'args', + :'has_pull_secret' => :'hasPullSecret', + :'health_check_type' => :'healthCheckType', + :'health_check_port' => :'healthCheckPort', + :'public_ingress_port' => :'publicIngressPort' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'container_url' => :'Object', + :'path' => :'Object', + :'args' => :'Object', + :'has_pull_secret' => :'Object', + :'health_check_type' => :'Object', + :'health_check_port' => :'Object', + :'public_ingress_port' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcContainerSpec` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcContainerSpec`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'container_url') + self.container_url = attributes[:'container_url'] + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + end + + if attributes.key?(:'args') + if (value = attributes[:'args']).is_a?(Array) + self.args = value + end + end + + if attributes.key?(:'has_pull_secret') + self.has_pull_secret = attributes[:'has_pull_secret'] + end + + if attributes.key?(:'health_check_type') + self.health_check_type = attributes[:'health_check_type'] + end + + if attributes.key?(:'health_check_port') + self.health_check_port = attributes[:'health_check_port'] + end + + if attributes.key?(:'public_ingress_port') + self.public_ingress_port = attributes[:'public_ingress_port'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @container_url.nil? + invalid_properties.push('invalid value for "container_url", container_url cannot be nil.') + end + + if @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + if @args.nil? + invalid_properties.push('invalid value for "args", args cannot be nil.') + end + + if @has_pull_secret.nil? + invalid_properties.push('invalid value for "has_pull_secret", has_pull_secret cannot be nil.') + end + + if @health_check_type.nil? + invalid_properties.push('invalid value for "health_check_type", health_check_type cannot be nil.') + end + + if @health_check_port.nil? + invalid_properties.push('invalid value for "health_check_port", health_check_port cannot be nil.') + end + + if @public_ingress_port.nil? + invalid_properties.push('invalid value for "public_ingress_port", public_ingress_port cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @container_url.nil? + return false if @path.nil? + return false if @args.nil? + return false if @has_pull_secret.nil? + return false if @health_check_type.nil? + return false if @health_check_port.nil? + return false if @public_ingress_port.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + container_url == o.container_url && + path == o.path && + args == o.args && + has_pull_secret == o.has_pull_secret && + health_check_type == o.health_check_type && + health_check_port == o.health_check_port && + public_ingress_port == o.public_ingress_port + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [container_url, path, args, has_pull_secret, health_check_type, health_check_port, public_ingress_port].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_deployment.rb b/turnkey_client/lib/turnkey_client/models/tvc_deployment.rb new file mode 100644 index 0000000..0884d45 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_deployment.rb @@ -0,0 +1,372 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcDeployment + # Unique Identifier for this TVC Deployment. + attr_accessor :id + + # Unique Identifier of the Organization for this TVC Deployment + attr_accessor :organization_id + + # Unique Identifier of the TVC App for this deployment + attr_accessor :app_id + + attr_accessor :manifest_set + + attr_accessor :share_set + + attr_accessor :manifest + + # List of operator approvals for this manifest + attr_accessor :manifest_approvals + + # QOS Version used for this deployment + attr_accessor :qos_version + + attr_accessor :pivot_container + + attr_accessor :created_at + + attr_accessor :updated_at + + # Whether or not the user wants this deployment deleted from the cluster. + attr_accessor :delete + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'organization_id' => :'organizationId', + :'app_id' => :'appId', + :'manifest_set' => :'manifestSet', + :'share_set' => :'shareSet', + :'manifest' => :'manifest', + :'manifest_approvals' => :'manifestApprovals', + :'qos_version' => :'qosVersion', + :'pivot_container' => :'pivotContainer', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'delete' => :'delete' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Object', + :'organization_id' => :'Object', + :'app_id' => :'Object', + :'manifest_set' => :'Object', + :'share_set' => :'Object', + :'manifest' => :'Object', + :'manifest_approvals' => :'Object', + :'qos_version' => :'Object', + :'pivot_container' => :'Object', + :'created_at' => :'Object', + :'updated_at' => :'Object', + :'delete' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcDeployment` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcDeployment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'manifest_set') + self.manifest_set = attributes[:'manifest_set'] + end + + if attributes.key?(:'share_set') + self.share_set = attributes[:'share_set'] + end + + if attributes.key?(:'manifest') + self.manifest = attributes[:'manifest'] + end + + if attributes.key?(:'manifest_approvals') + if (value = attributes[:'manifest_approvals']).is_a?(Array) + self.manifest_approvals = value + end + end + + if attributes.key?(:'qos_version') + self.qos_version = attributes[:'qos_version'] + end + + if attributes.key?(:'pivot_container') + self.pivot_container = attributes[:'pivot_container'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'delete') + self.delete = attributes[:'delete'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + if @manifest_set.nil? + invalid_properties.push('invalid value for "manifest_set", manifest_set cannot be nil.') + end + + if @share_set.nil? + invalid_properties.push('invalid value for "share_set", share_set cannot be nil.') + end + + if @manifest.nil? + invalid_properties.push('invalid value for "manifest", manifest cannot be nil.') + end + + if @manifest_approvals.nil? + invalid_properties.push('invalid value for "manifest_approvals", manifest_approvals cannot be nil.') + end + + if @qos_version.nil? + invalid_properties.push('invalid value for "qos_version", qos_version cannot be nil.') + end + + if @pivot_container.nil? + invalid_properties.push('invalid value for "pivot_container", pivot_container cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + if @delete.nil? + invalid_properties.push('invalid value for "delete", delete cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @organization_id.nil? + return false if @app_id.nil? + return false if @manifest_set.nil? + return false if @share_set.nil? + return false if @manifest.nil? + return false if @manifest_approvals.nil? + return false if @qos_version.nil? + return false if @pivot_container.nil? + return false if @created_at.nil? + return false if @updated_at.nil? + return false if @delete.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + organization_id == o.organization_id && + app_id == o.app_id && + manifest_set == o.manifest_set && + share_set == o.share_set && + manifest == o.manifest && + manifest_approvals == o.manifest_approvals && + qos_version == o.qos_version && + pivot_container == o.pivot_container && + created_at == o.created_at && + updated_at == o.updated_at && + delete == o.delete + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, organization_id, app_id, manifest_set, share_set, manifest, manifest_approvals, qos_version, pivot_container, created_at, updated_at, delete].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_health_check_type.rb b/turnkey_client/lib/turnkey_client/models/tvc_health_check_type.rb new file mode 100644 index 0000000..7f6dcbe --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_health_check_type.rb @@ -0,0 +1,27 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcHealthCheckType + HTTP = 'TVC_HEALTH_CHECK_TYPE_HTTP'.freeze + GRPC = 'TVC_HEALTH_CHECK_TYPE_GRPC'.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = TvcHealthCheckType.constants.select { |c| TvcHealthCheckType::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #TvcHealthCheckType" if constantValues.empty? + value + end + end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_manifest.rb b/turnkey_client/lib/turnkey_client/models/tvc_manifest.rb new file mode 100644 index 0000000..660d360 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_manifest.rb @@ -0,0 +1,254 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcManifest + # Unique Identifier for this TVC Manifest. + attr_accessor :id + + # The manifest content (raw UTF-8 JSON bytes) + attr_accessor :manifest + + attr_accessor :created_at + + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'manifest' => :'manifest', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Object', + :'manifest' => :'Object', + :'created_at' => :'Object', + :'updated_at' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcManifest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcManifest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'manifest') + self.manifest = attributes[:'manifest'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @manifest.nil? + invalid_properties.push('invalid value for "manifest", manifest cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @manifest.nil? + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + manifest == o.manifest && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, manifest, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_operator.rb b/turnkey_client/lib/turnkey_client/models/tvc_operator.rb new file mode 100644 index 0000000..d46b99c --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_operator.rb @@ -0,0 +1,269 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcOperator + # Unique Identifier for this TVC Operator. + attr_accessor :id + + # Name of this TVC Operator. + attr_accessor :name + + # Public key for this TVC Operator. + attr_accessor :public_key + + attr_accessor :created_at + + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'public_key' => :'publicKey', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Object', + :'name' => :'Object', + :'public_key' => :'Object', + :'created_at' => :'Object', + :'updated_at' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcOperator` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcOperator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @public_key.nil? + invalid_properties.push('invalid value for "public_key", public_key cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @name.nil? + return false if @public_key.nil? + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + public_key == o.public_key && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, public_key, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_operator_approval.rb b/turnkey_client/lib/turnkey_client/models/tvc_operator_approval.rb new file mode 100644 index 0000000..5b5a069 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_operator_approval.rb @@ -0,0 +1,283 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcOperatorApproval + # Unique ID for this approval + attr_accessor :id + + # Unique Identifier of the TVC Manifest being approved + attr_accessor :manifest_id + + attr_accessor :operator + + # Signature of the operator over the deployment manifest + attr_accessor :approval + + attr_accessor :created_at + + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'manifest_id' => :'manifestId', + :'operator' => :'operator', + :'approval' => :'approval', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Object', + :'manifest_id' => :'Object', + :'operator' => :'Object', + :'approval' => :'Object', + :'created_at' => :'Object', + :'updated_at' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcOperatorApproval` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcOperatorApproval`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'manifest_id') + self.manifest_id = attributes[:'manifest_id'] + end + + if attributes.key?(:'operator') + self.operator = attributes[:'operator'] + end + + if attributes.key?(:'approval') + self.approval = attributes[:'approval'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @manifest_id.nil? + invalid_properties.push('invalid value for "manifest_id", manifest_id cannot be nil.') + end + + if @operator.nil? + invalid_properties.push('invalid value for "operator", operator cannot be nil.') + end + + if @approval.nil? + invalid_properties.push('invalid value for "approval", approval cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @manifest_id.nil? + return false if @operator.nil? + return false if @approval.nil? + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + manifest_id == o.manifest_id && + operator == o.operator && + approval == o.approval && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, manifest_id, operator, approval, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_operator_set.rb b/turnkey_client/lib/turnkey_client/models/tvc_operator_set.rb new file mode 100644 index 0000000..bbf8732 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_operator_set.rb @@ -0,0 +1,301 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcOperatorSet + # Unique Identifier for this TVC Operator Set. + attr_accessor :id + + # Name of this TVC Operator Set. + attr_accessor :name + + # Unique Identifier of the Organization for this TVC Operator Set + attr_accessor :organization_id + + # List of TVC Operators in this set + attr_accessor :operators + + # Threshold number of operators required for quorum. + attr_accessor :threshold + + attr_accessor :created_at + + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'organization_id' => :'organizationId', + :'operators' => :'operators', + :'threshold' => :'threshold', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Object', + :'name' => :'Object', + :'organization_id' => :'Object', + :'operators' => :'Object', + :'threshold' => :'Object', + :'created_at' => :'Object', + :'updated_at' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcOperatorSet` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcOperatorSet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'operators') + if (value = attributes[:'operators']).is_a?(Array) + self.operators = value + end + end + + if attributes.key?(:'threshold') + self.threshold = attributes[:'threshold'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @operators.nil? + invalid_properties.push('invalid value for "operators", operators cannot be nil.') + end + + if @threshold.nil? + invalid_properties.push('invalid value for "threshold", threshold cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @name.nil? + return false if @organization_id.nil? + return false if @operators.nil? + return false if @threshold.nil? + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + organization_id == o.organization_id && + operators == o.operators && + threshold == o.threshold && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, organization_id, operators, threshold, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tx_error.rb b/turnkey_client/lib/turnkey_client/models/tx_error.rb index bc500d2..b636a33 100644 --- a/turnkey_client/lib/turnkey_client/models/tx_error.rb +++ b/turnkey_client/lib/turnkey_client/models/tx_error.rb @@ -18,11 +18,17 @@ class TxError # Chain of revert errors from nested contract calls, ordered from outermost to innermost. attr_accessor :revert_chain + attr_accessor :solana + + attr_accessor :eth + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'message' => :'message', - :'revert_chain' => :'revertChain' + :'revert_chain' => :'revertChain', + :'solana' => :'solana', + :'eth' => :'eth' } end @@ -30,7 +36,9 @@ def self.attribute_map def self.openapi_types { :'message' => :'Object', - :'revert_chain' => :'Object' + :'revert_chain' => :'Object', + :'solana' => :'Object', + :'eth' => :'Object' } end @@ -64,6 +72,14 @@ def initialize(attributes = {}) self.revert_chain = value end end + + if attributes.key?(:'solana') + self.solana = attributes[:'solana'] + end + + if attributes.key?(:'eth') + self.eth = attributes[:'eth'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -85,7 +101,9 @@ def ==(o) return true if self.equal?(o) self.class == o.class && message == o.message && - revert_chain == o.revert_chain + revert_chain == o.revert_chain && + solana == o.solana && + eth == o.eth end # @see the `==` method @@ -97,7 +115,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [message, revert_chain].hash + [message, revert_chain, solana, eth].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_auth_proxy_config_intent.rb b/turnkey_client/lib/turnkey_client/models/update_auth_proxy_config_intent.rb index 180ebfd..88f09ac 100644 --- a/turnkey_client/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/update_auth_proxy_config_intent.rb @@ -57,6 +57,9 @@ class UpdateAuthProxyConfigIntent # Verification token required for get account with PII (email/phone number). Default false. attr_accessor :verification_token_required_for_get_account_pii + # Whitelisted OAuth client IDs for social account linking. When a user authenticates via a social provider with an email matching an existing account, the accounts will be linked if the client ID is in this list and the issuer is considered a trusted provider. + attr_accessor :social_linking_client_ids + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -75,7 +78,8 @@ def self.attribute_map :'otp_alphanumeric' => :'otpAlphanumeric', :'otp_length' => :'otpLength', :'send_from_email_sender_name' => :'sendFromEmailSenderName', - :'verification_token_required_for_get_account_pii' => :'verificationTokenRequiredForGetAccountPii' + :'verification_token_required_for_get_account_pii' => :'verificationTokenRequiredForGetAccountPii', + :'social_linking_client_ids' => :'socialLinkingClientIds' } end @@ -97,7 +101,8 @@ def self.openapi_types :'otp_alphanumeric' => :'Object', :'otp_length' => :'Object', :'send_from_email_sender_name' => :'Object', - :'verification_token_required_for_get_account_pii' => :'Object' + :'verification_token_required_for_get_account_pii' => :'Object', + :'social_linking_client_ids' => :'Object' } end @@ -114,7 +119,7 @@ def self.openapi_nullable :'otp_alphanumeric', :'otp_length', :'send_from_email_sender_name', - :'verification_token_required_for_get_account_pii' + :'verification_token_required_for_get_account_pii', ]) end @@ -200,6 +205,12 @@ def initialize(attributes = {}) if attributes.key?(:'verification_token_required_for_get_account_pii') self.verification_token_required_for_get_account_pii = attributes[:'verification_token_required_for_get_account_pii'] end + + if attributes.key?(:'social_linking_client_ids') + if (value = attributes[:'social_linking_client_ids']).is_a?(Array) + self.social_linking_client_ids = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -235,7 +246,8 @@ def ==(o) otp_alphanumeric == o.otp_alphanumeric && otp_length == o.otp_length && send_from_email_sender_name == o.send_from_email_sender_name && - verification_token_required_for_get_account_pii == o.verification_token_required_for_get_account_pii + verification_token_required_for_get_account_pii == o.verification_token_required_for_get_account_pii && + social_linking_client_ids == o.social_linking_client_ids end # @see the `==` method @@ -247,7 +259,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [allowed_origins, allowed_auth_methods, send_from_email_address, reply_to_email_address, email_auth_template_id, otp_template_id, email_customization_params, sms_customization_params, wallet_kit_settings, otp_expiration_seconds, verification_token_expiration_seconds, session_expiration_seconds, otp_alphanumeric, otp_length, send_from_email_sender_name, verification_token_required_for_get_account_pii].hash + [allowed_origins, allowed_auth_methods, send_from_email_address, reply_to_email_address, email_auth_template_id, otp_template_id, email_customization_params, sms_customization_params, wallet_kit_settings, otp_expiration_seconds, verification_token_expiration_seconds, session_expiration_seconds, otp_alphanumeric, otp_length, send_from_email_sender_name, verification_token_required_for_get_account_pii, social_linking_client_ids].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_organization_name_intent.rb b/turnkey_client/lib/turnkey_client/models/update_organization_name_intent.rb new file mode 100644 index 0000000..1659b4e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_organization_name_intent.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateOrganizationNameIntent + # New name for the Organization. + attr_accessor :organization_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_name' => :'organizationName' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_name' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateOrganizationNameIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateOrganizationNameIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_name') + self.organization_name = attributes[:'organization_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_name.nil? + invalid_properties.push('invalid value for "organization_name", organization_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_name == o.organization_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_organization_name_request.rb b/turnkey_client/lib/turnkey_client/models/update_organization_name_request.rb new file mode 100644 index 0000000..d45982f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_organization_name_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateOrganizationNameRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateOrganizationNameRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateOrganizationNameRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_organization_name_result.rb b/turnkey_client/lib/turnkey_client/models/update_organization_name_result.rb new file mode 100644 index 0000000..77ecf73 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_organization_name_result.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateOrganizationNameResult + # Unique identifier for the Organization. + attr_accessor :organization_id + + # The updated organization name. + attr_accessor :organization_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'organization_name' => :'organizationName' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'organization_name' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateOrganizationNameResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateOrganizationNameResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'organization_name') + self.organization_name = attributes[:'organization_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @organization_name.nil? + invalid_properties.push('invalid value for "organization_name", organization_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @organization_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + organization_name == o.organization_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, organization_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_intent.rb b/turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_intent.rb new file mode 100644 index 0000000..349ec27 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_intent.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateTvcAppLiveDeploymentIntent + # The unique identifier of the TVC deployment to set as live for the app. + attr_accessor :deployment_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deployment_id' => :'deploymentId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'deployment_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateTvcAppLiveDeploymentIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateTvcAppLiveDeploymentIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @deployment_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deployment_id == o.deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_request.rb b/turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_request.rb new file mode 100644 index 0000000..0beae5a --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateTvcAppLiveDeploymentRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateTvcAppLiveDeploymentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateTvcAppLiveDeploymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_result.rb b/turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_result.rb new file mode 100644 index 0000000..5d867ea --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_tvc_app_live_deployment_result.rb @@ -0,0 +1,196 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateTvcAppLiveDeploymentResult + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.openapi_types + { + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateTvcAppLiveDeploymentResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateTvcAppLiveDeploymentResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_intent.rb b/turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_intent.rb new file mode 100644 index 0000000..24668e0 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_intent.rb @@ -0,0 +1,244 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateWebhookEndpointIntent + # Unique identifier of the webhook endpoint to update. + attr_accessor :endpoint_id + + # Updated destination URL for webhook delivery. + attr_accessor :url + + # Updated human-readable name for this webhook endpoint. + attr_accessor :name + + # Whether this webhook endpoint is active. + attr_accessor :is_active + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'endpoint_id' => :'endpointId', + :'url' => :'url', + :'name' => :'name', + :'is_active' => :'isActive' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'endpoint_id' => :'Object', + :'url' => :'Object', + :'name' => :'Object', + :'is_active' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'url', + :'name', + :'is_active' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateWebhookEndpointIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateWebhookEndpointIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'endpoint_id') + self.endpoint_id = attributes[:'endpoint_id'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'is_active') + self.is_active = attributes[:'is_active'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @endpoint_id.nil? + invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @endpoint_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + endpoint_id == o.endpoint_id && + url == o.url && + name == o.name && + is_active == o.is_active + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [endpoint_id, url, name, is_active].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_request.rb b/turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_request.rb new file mode 100644 index 0000000..0026666 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateWebhookEndpointRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateWebhookEndpointRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateWebhookEndpointRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_result.rb b/turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_result.rb new file mode 100644 index 0000000..a8db8ee --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_webhook_endpoint_result.rb @@ -0,0 +1,225 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateWebhookEndpointResult + # Unique identifier of the updated webhook endpoint. + attr_accessor :endpoint_id + + attr_accessor :webhook_endpoint + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'endpoint_id' => :'endpointId', + :'webhook_endpoint' => :'webhookEndpoint' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'endpoint_id' => :'Object', + :'webhook_endpoint' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateWebhookEndpointResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateWebhookEndpointResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'endpoint_id') + self.endpoint_id = attributes[:'endpoint_id'] + end + + if attributes.key?(:'webhook_endpoint') + self.webhook_endpoint = attributes[:'webhook_endpoint'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @endpoint_id.nil? + invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.') + end + + if @webhook_endpoint.nil? + invalid_properties.push('invalid value for "webhook_endpoint", webhook_endpoint cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @endpoint_id.nil? + return false if @webhook_endpoint.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + endpoint_id == o.endpoint_id && + webhook_endpoint == o.webhook_endpoint + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [endpoint_id, webhook_endpoint].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb b/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb index 09533d3..16f043b 100644 --- a/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb @@ -18,19 +18,22 @@ class UpsertGasUsageConfigIntent # Gas sponsorship USD limit for sub-organizations under the billing organization. attr_accessor :sub_org_window_limit_usd - # Rolling sponsorship window duration, expressed in minutes. + # Rolling sponsorship window duration, expressed in minutes. This value can't exceed 30 days (43200 minutes). attr_accessor :window_duration_minutes # Whether gas sponsorship is enabled for the organization. attr_accessor :enabled + attr_accessor :solana_config + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'org_window_limit_usd' => :'orgWindowLimitUsd', :'sub_org_window_limit_usd' => :'subOrgWindowLimitUsd', :'window_duration_minutes' => :'windowDurationMinutes', - :'enabled' => :'enabled' + :'enabled' => :'enabled', + :'solana_config' => :'solanaConfig' } end @@ -40,14 +43,15 @@ def self.openapi_types :'org_window_limit_usd' => :'Object', :'sub_org_window_limit_usd' => :'Object', :'window_duration_minutes' => :'Object', - :'enabled' => :'Object' + :'enabled' => :'Object', + :'solana_config' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'enabled' + :'enabled', ]) end @@ -81,6 +85,10 @@ def initialize(attributes = {}) if attributes.key?(:'enabled') self.enabled = attributes[:'enabled'] end + + if attributes.key?(:'solana_config') + self.solana_config = attributes[:'solana_config'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -119,7 +127,8 @@ def ==(o) org_window_limit_usd == o.org_window_limit_usd && sub_org_window_limit_usd == o.sub_org_window_limit_usd && window_duration_minutes == o.window_duration_minutes && - enabled == o.enabled + enabled == o.enabled && + solana_config == o.solana_config end # @see the `==` method @@ -131,7 +140,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [org_window_limit_usd, sub_org_window_limit_usd, window_duration_minutes, enabled].hash + [org_window_limit_usd, sub_org_window_limit_usd, window_duration_minutes, enabled, solana_config].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/usage_type.rb b/turnkey_client/lib/turnkey_client/models/usage_type.rb new file mode 100644 index 0000000..ac60d80 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/usage_type.rb @@ -0,0 +1,27 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UsageType + SIGNUP = 'USAGE_TYPE_SIGNUP'.freeze + LOGIN = 'USAGE_TYPE_LOGIN'.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = UsageType.constants.select { |c| UsageType::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #UsageType" if constantValues.empty? + value + end + end +end diff --git a/turnkey_client/lib/turnkey_client/models/user_params_v4.rb b/turnkey_client/lib/turnkey_client/models/user_params_v4.rb new file mode 100644 index 0000000..9e631f0 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/user_params_v4.rb @@ -0,0 +1,301 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UserParamsV4 + # Human-readable name for a User. + attr_accessor :user_name + + # The user's email address. + attr_accessor :user_email + + # The user's phone number in E.164 format e.g. +13214567890 + attr_accessor :user_phone_number + + # A list of API Key parameters. This field, if not needed, should be an empty array in your request body. + attr_accessor :api_keys + + # A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body. + attr_accessor :authenticators + + # A list of Oauth providers. This field, if not needed, should be an empty array in your request body. + attr_accessor :oauth_providers + + # A list of User Tag IDs. This field, if not needed, should be an empty array in your request body. + attr_accessor :user_tags + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_name' => :'userName', + :'user_email' => :'userEmail', + :'user_phone_number' => :'userPhoneNumber', + :'api_keys' => :'apiKeys', + :'authenticators' => :'authenticators', + :'oauth_providers' => :'oauthProviders', + :'user_tags' => :'userTags' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_name' => :'Object', + :'user_email' => :'Object', + :'user_phone_number' => :'Object', + :'api_keys' => :'Object', + :'authenticators' => :'Object', + :'oauth_providers' => :'Object', + :'user_tags' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'user_email', + :'user_phone_number', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UserParamsV4` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UserParamsV4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_name') + self.user_name = attributes[:'user_name'] + end + + if attributes.key?(:'user_email') + self.user_email = attributes[:'user_email'] + end + + if attributes.key?(:'user_phone_number') + self.user_phone_number = attributes[:'user_phone_number'] + end + + if attributes.key?(:'api_keys') + if (value = attributes[:'api_keys']).is_a?(Array) + self.api_keys = value + end + end + + if attributes.key?(:'authenticators') + if (value = attributes[:'authenticators']).is_a?(Array) + self.authenticators = value + end + end + + if attributes.key?(:'oauth_providers') + if (value = attributes[:'oauth_providers']).is_a?(Array) + self.oauth_providers = value + end + end + + if attributes.key?(:'user_tags') + if (value = attributes[:'user_tags']).is_a?(Array) + self.user_tags = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @user_name.nil? + invalid_properties.push('invalid value for "user_name", user_name cannot be nil.') + end + + if @api_keys.nil? + invalid_properties.push('invalid value for "api_keys", api_keys cannot be nil.') + end + + if @authenticators.nil? + invalid_properties.push('invalid value for "authenticators", authenticators cannot be nil.') + end + + if @oauth_providers.nil? + invalid_properties.push('invalid value for "oauth_providers", oauth_providers cannot be nil.') + end + + if @user_tags.nil? + invalid_properties.push('invalid value for "user_tags", user_tags cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @user_name.nil? + return false if @api_keys.nil? + return false if @authenticators.nil? + return false if @oauth_providers.nil? + return false if @user_tags.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_name == o.user_name && + user_email == o.user_email && + user_phone_number == o.user_phone_number && + api_keys == o.api_keys && + authenticators == o.authenticators && + oauth_providers == o.oauth_providers && + user_tags == o.user_tags + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_name, user_email, user_phone_number, api_keys, authenticators, oauth_providers, user_tags].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/validate_tvc_image_request.rb b/turnkey_client/lib/turnkey_client/models/validate_tvc_image_request.rb new file mode 100644 index 0000000..480844a --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/validate_tvc_image_request.rb @@ -0,0 +1,237 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ValidateTvcImageRequest + # Unique identifier for a given Organization. + attr_accessor :organization_id + + # URL of the container image. + attr_accessor :pivot_container_image_url + + # HPKE-encrypted pull secret for private images. + attr_accessor :pivot_container_encrypted_pull_secret + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'pivot_container_image_url' => :'pivotContainerImageUrl', + :'pivot_container_encrypted_pull_secret' => :'pivotContainerEncryptedPullSecret' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'pivot_container_image_url' => :'Object', + :'pivot_container_encrypted_pull_secret' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'pivot_container_encrypted_pull_secret' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ValidateTvcImageRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ValidateTvcImageRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'pivot_container_image_url') + self.pivot_container_image_url = attributes[:'pivot_container_image_url'] + end + + if attributes.key?(:'pivot_container_encrypted_pull_secret') + self.pivot_container_encrypted_pull_secret = attributes[:'pivot_container_encrypted_pull_secret'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @pivot_container_image_url.nil? + invalid_properties.push('invalid value for "pivot_container_image_url", pivot_container_image_url cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @pivot_container_image_url.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + pivot_container_image_url == o.pivot_container_image_url && + pivot_container_encrypted_pull_secret == o.pivot_container_encrypted_pull_secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, pivot_container_image_url, pivot_container_encrypted_pull_secret].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/validate_tvc_image_response.rb b/turnkey_client/lib/turnkey_client/models/validate_tvc_image_response.rb new file mode 100644 index 0000000..3feb23f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/validate_tvc_image_response.rb @@ -0,0 +1,205 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ValidateTvcImageResponse + attr_accessor :resolved_image_digest + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resolved_image_digest' => :'resolvedImageDigest' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'resolved_image_digest' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ValidateTvcImageResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ValidateTvcImageResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resolved_image_digest') + self.resolved_image_digest = attributes[:'resolved_image_digest'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resolved_image_digest == o.resolved_image_digest + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resolved_image_digest].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/verify_otp_intent_v2.rb b/turnkey_client/lib/turnkey_client/models/verify_otp_intent_v2.rb new file mode 100644 index 0000000..fe758c4 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/verify_otp_intent_v2.rb @@ -0,0 +1,237 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class VerifyOtpIntentV2 + # UUID representing an OTP flow. A new UUID is created for each init OTP activity. + attr_accessor :otp_id + + # Encrypted bundle containing the OTP code and a client-generated public key. Turnkey's secure enclaves will decrypt this bundle, verify the OTP code, and issue a new Verification Token. Encrypted using the target encryption key provided in the INIT_OTP activity result. + attr_accessor :encrypted_otp_bundle + + # Expiration window (in seconds) indicating how long the verification token is valid for. If not provided, a default of 1 hour will be used. Maximum value is 86400 seconds (24 hours) + attr_accessor :expiration_seconds + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'otp_id' => :'otpId', + :'encrypted_otp_bundle' => :'encryptedOtpBundle', + :'expiration_seconds' => :'expirationSeconds' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'otp_id' => :'Object', + :'encrypted_otp_bundle' => :'Object', + :'expiration_seconds' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'expiration_seconds' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::VerifyOtpIntentV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::VerifyOtpIntentV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp_id') + self.otp_id = attributes[:'otp_id'] + end + + if attributes.key?(:'encrypted_otp_bundle') + self.encrypted_otp_bundle = attributes[:'encrypted_otp_bundle'] + end + + if attributes.key?(:'expiration_seconds') + self.expiration_seconds = attributes[:'expiration_seconds'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @otp_id.nil? + invalid_properties.push('invalid value for "otp_id", otp_id cannot be nil.') + end + + if @encrypted_otp_bundle.nil? + invalid_properties.push('invalid value for "encrypted_otp_bundle", encrypted_otp_bundle cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @otp_id.nil? + return false if @encrypted_otp_bundle.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + otp_id == o.otp_id && + encrypted_otp_bundle == o.encrypted_otp_bundle && + expiration_seconds == o.expiration_seconds + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [otp_id, encrypted_otp_bundle, expiration_seconds].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/verify_otp_request.rb b/turnkey_client/lib/turnkey_client/models/verify_otp_request.rb index bd5729a..1b0fbdb 100644 --- a/turnkey_client/lib/turnkey_client/models/verify_otp_request.rb +++ b/turnkey_client/lib/turnkey_client/models/verify_otp_request.rb @@ -138,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_VERIFY_OTP']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_VERIFY_OTP_V2']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -149,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_VERIFY_OTP']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_VERIFY_OTP_V2']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/web_authn_stamp.rb b/turnkey_client/lib/turnkey_client/models/web_authn_stamp.rb new file mode 100644 index 0000000..05c0961 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/web_authn_stamp.rb @@ -0,0 +1,256 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class WebAuthnStamp + # A base64 url encoded Unique identifier for a given credential. + attr_accessor :credential_id + + # A base64 encoded payload containing metadata about the signing context and the challenge. + attr_accessor :client_data_json + + # A base64 encoded payload containing metadata about the authenticator. + attr_accessor :authenticator_data + + # The base64 url encoded signature bytes contained within the WebAuthn assertion response. + attr_accessor :signature + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'credential_id' => :'credentialId', + :'client_data_json' => :'clientDataJson', + :'authenticator_data' => :'authenticatorData', + :'signature' => :'signature' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'credential_id' => :'Object', + :'client_data_json' => :'Object', + :'authenticator_data' => :'Object', + :'signature' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::WebAuthnStamp` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::WebAuthnStamp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'credential_id') + self.credential_id = attributes[:'credential_id'] + end + + if attributes.key?(:'client_data_json') + self.client_data_json = attributes[:'client_data_json'] + end + + if attributes.key?(:'authenticator_data') + self.authenticator_data = attributes[:'authenticator_data'] + end + + if attributes.key?(:'signature') + self.signature = attributes[:'signature'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @credential_id.nil? + invalid_properties.push('invalid value for "credential_id", credential_id cannot be nil.') + end + + if @client_data_json.nil? + invalid_properties.push('invalid value for "client_data_json", client_data_json cannot be nil.') + end + + if @authenticator_data.nil? + invalid_properties.push('invalid value for "authenticator_data", authenticator_data cannot be nil.') + end + + if @signature.nil? + invalid_properties.push('invalid value for "signature", signature cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @credential_id.nil? + return false if @client_data_json.nil? + return false if @authenticator_data.nil? + return false if @signature.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credential_id == o.credential_id && + client_data_json == o.client_data_json && + authenticator_data == o.authenticator_data && + signature == o.signature + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [credential_id, client_data_json, authenticator_data, signature].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/webhook_endpoint_data.rb b/turnkey_client/lib/turnkey_client/models/webhook_endpoint_data.rb new file mode 100644 index 0000000..8a37d11 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/webhook_endpoint_data.rb @@ -0,0 +1,283 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class WebhookEndpointData + # Unique identifier of the webhook endpoint. + attr_accessor :endpoint_id + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + # The destination URL for webhook delivery. + attr_accessor :url + + # Human-readable name for this webhook endpoint. + attr_accessor :name + + # Whether this webhook endpoint is active. + attr_accessor :is_active + + # Current subscriptions attached to this endpoint. + attr_accessor :subscriptions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'endpoint_id' => :'endpointId', + :'organization_id' => :'organizationId', + :'url' => :'url', + :'name' => :'name', + :'is_active' => :'isActive', + :'subscriptions' => :'subscriptions' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'endpoint_id' => :'Object', + :'organization_id' => :'Object', + :'url' => :'Object', + :'name' => :'Object', + :'is_active' => :'Object', + :'subscriptions' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::WebhookEndpointData` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::WebhookEndpointData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'endpoint_id') + self.endpoint_id = attributes[:'endpoint_id'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'is_active') + self.is_active = attributes[:'is_active'] + end + + if attributes.key?(:'subscriptions') + if (value = attributes[:'subscriptions']).is_a?(Array) + self.subscriptions = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @endpoint_id.nil? + invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @url.nil? + invalid_properties.push('invalid value for "url", url cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @is_active.nil? + invalid_properties.push('invalid value for "is_active", is_active cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @endpoint_id.nil? + return false if @organization_id.nil? + return false if @url.nil? + return false if @name.nil? + return false if @is_active.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + endpoint_id == o.endpoint_id && + organization_id == o.organization_id && + url == o.url && + name == o.name && + is_active == o.is_active && + subscriptions == o.subscriptions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [endpoint_id, organization_id, url, name, is_active, subscriptions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/webhook_subscription_params.rb b/turnkey_client/lib/turnkey_client/models/webhook_subscription_params.rb new file mode 100644 index 0000000..8bcd40c --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/webhook_subscription_params.rb @@ -0,0 +1,233 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class WebhookSubscriptionParams + # The event type to subscribe to (for example, ACTIVITY_UPDATES, BALANCE_CONFIRMED_UPDATES, or BALANCE_FINALIZED_UPDATES). + attr_accessor :event_type + + # JSON-encoded filter criteria for this subscription. + attr_accessor :filters_json + + # Whether this subscription is active. + attr_accessor :is_active + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'event_type' => :'eventType', + :'filters_json' => :'filtersJson', + :'is_active' => :'isActive' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'event_type' => :'Object', + :'filters_json' => :'Object', + :'is_active' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'filters_json', + :'is_active' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::WebhookSubscriptionParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::WebhookSubscriptionParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'event_type') + self.event_type = attributes[:'event_type'] + end + + if attributes.key?(:'filters_json') + self.filters_json = attributes[:'filters_json'] + end + + if attributes.key?(:'is_active') + self.is_active = attributes[:'is_active'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @event_type.nil? + invalid_properties.push('invalid value for "event_type", event_type cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @event_type.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + event_type == o.event_type && + filters_json == o.filters_json && + is_active == o.is_active + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [event_type, filters_json, is_active].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/version.rb b/turnkey_client/lib/turnkey_client/version.rb index cc6fcf0..58aff95 100644 --- a/turnkey_client/lib/turnkey_client/version.rb +++ b/turnkey_client/lib/turnkey_client/version.rb @@ -9,5 +9,5 @@ =end module TurnkeyClient - VERSION = '0.0.18' + VERSION = '0.0.19' end diff --git a/turnkey_client_inputs/config.json b/turnkey_client_inputs/config.json index bb7cdab..27c9e31 100644 --- a/turnkey_client_inputs/config.json +++ b/turnkey_client_inputs/config.json @@ -6,5 +6,5 @@ "gemAuthor": "Turnkey Engineering", "gemAuthorEmail": "hello@turnkey.com", "moduleName": "TurnkeyClient", - "gemVersion": "0.0.18" + "gemVersion": "0.0.19" } diff --git a/turnkey_client_inputs/public_api.swagger.json b/turnkey_client_inputs/public_api.swagger.json index 48750ba..813907e 100644 --- a/turnkey_client_inputs/public_api.swagger.json +++ b/turnkey_client_inputs/public_api.swagger.json @@ -58,6 +58,10 @@ { "name": "Consensus", "description": "Policies can enforce consensus requirements for Activities. For example, adding a new user requires two admins to approve the request.\n\nActivities that have been proposed, but don't yet meet the Consensus requirements will have the status: `REQUIRES_CONSENSUS`. Activities in this state can be approved or rejected using the unique fingerprint generated when an Activity is created." + }, + { + "name": "IP Allowlist", + "description": "IP Allowlists restrict API access to specific CIDR blocks. They can be configured at the organization level (applying to all API keys) or at the individual API key level (overriding organization-level allowlists).\n\nWhen no IP allowlist is configured, all IP addresses are allowed. Organization-level allowlists can be enabled or disabled, while API key-level allowlists are always enforced when present." } ], "host": "api.turnkey.com", @@ -143,6 +147,32 @@ "tags": ["API keys"] } }, + "/public/v1/query/get_app_status": { + "post": { + "summary": "Get TVC App status", + "description": "Get live runtime status for a TVC App from the cluster.", + "operationId": "GetAppStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetAppStatusResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetAppStatusRequest" + } + } + ], + "tags": ["TVC"] + } + }, "/public/v1/query/get_authenticator": { "post": { "summary": "Get authenticator", @@ -247,6 +277,32 @@ "tags": ["Broadcasting"] } }, + "/public/v1/query/get_ip_allowlist": { + "post": { + "summary": "Get IP Allowlist", + "description": "Get IP allowlist and rules for an organization.", + "operationId": "GetIpAllowlist", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetIpAllowlistResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetIpAllowlistRequest" + } + } + ], + "tags": ["IP Allowlist"] + } + }, "/public/v1/query/get_latest_boot_proof": { "post": { "summary": "Get the latest boot proof for an app", @@ -532,6 +588,58 @@ "tags": ["Policies"] } }, + "/public/v1/query/get_tvc_app": { + "post": { + "summary": "Get TVC App", + "description": "Get details about a single TVC App", + "operationId": "GetTvcApp", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetTvcAppResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetTvcAppRequest" + } + } + ], + "tags": ["TVC"] + } + }, + "/public/v1/query/get_tvc_deployment": { + "post": { + "summary": "Get TVC Deployment", + "description": "Get details about a single TVC Deployment", + "operationId": "GetTvcDeployment", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetTvcDeploymentResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetTvcDeploymentRequest" + } + } + ], + "tags": ["TVC"] + } + }, "/public/v1/query/get_user": { "post": { "summary": "Get user", @@ -613,7 +721,7 @@ "/public/v1/query/get_wallet_address_balances": { "post": { "summary": "Get balances", - "description": "Get balances of supported assets for an address on the specified network. Only non-zero balances are returned. This feature is in beta - please contact support for access.", + "description": "Get balances of supported assets for an address on the specified network. Only non-zero balances are returned.", "operationId": "GetWalletAddressBalances", "responses": { "200": { @@ -873,7 +981,7 @@ "/public/v1/query/list_supported_assets": { "post": { "summary": "List supported assets", - "description": "List supported assets for the specified network. This feature is in beta - please contact support for access.", + "description": "List supported assets for the specified network.", "operationId": "ListSupportedAssets", "responses": { "200": { @@ -896,6 +1004,58 @@ "tags": ["Wallets"] } }, + "/public/v1/query/list_tvc_app_deployments": { + "post": { + "summary": "List TVC Deployments", + "description": "List all deployments for a given TVC App", + "operationId": "GetTvcAppDeployments", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetTvcAppDeploymentsResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetTvcAppDeploymentsRequest" + } + } + ], + "tags": ["TVC"] + } + }, + "/public/v1/query/list_tvc_apps": { + "post": { + "summary": "List TVC Apps", + "description": "List all TVC Apps within an organization.", + "operationId": "GetTvcApps", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetTvcAppsResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetTvcAppsRequest" + } + } + ], + "tags": ["TVC"] + } + }, "/public/v1/query/list_user_tags": { "post": { "summary": "List user tags", @@ -1026,6 +1186,58 @@ "tags": ["Wallets"] } }, + "/public/v1/query/list_webhook_endpoints": { + "post": { + "summary": "List webhook endpoints", + "description": "List webhook endpoints within an organization.", + "operationId": "ListWebhookEndpoints", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListWebhookEndpointsResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ListWebhookEndpointsRequest" + } + } + ], + "tags": ["Organizations"] + } + }, + "/public/v1/query/validate_tvc_image": { + "post": { + "summary": "Validate Container Image for TVC", + "description": "Validate a container image URL and pull secret for TVC deployment", + "operationId": "ValidateTvcImage", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ValidateTvcImageResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ValidateTvcImageRequest" + } + } + ], + "tags": ["TVC"] + } + }, "/public/v1/query/whoami": { "post": { "summary": "Who am I?", @@ -1442,6 +1654,84 @@ "tags": ["Organizations"] } }, + "/public/v1/submit/create_tvc_app": { + "post": { + "summary": "Create a TVC App", + "description": "Create a new TVC application", + "operationId": "CreateTvcApp", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateTvcAppRequest" + } + } + ], + "tags": ["TVC"] + } + }, + "/public/v1/submit/create_tvc_deployment": { + "post": { + "summary": "Create a TVC Deployment", + "description": "Create a new TVC Deployment", + "operationId": "CreateTvcDeployment", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateTvcDeploymentRequest" + } + } + ], + "tags": ["TVC"] + } + }, + "/public/v1/submit/create_tvc_manifest_approvals": { + "post": { + "summary": "Create TVC Manifest Approvals", + "description": "Post one or more manifest approvals for a TVC Manifest", + "operationId": "CreateTvcManifestApprovals", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateTvcManifestApprovalsRequest" + } + } + ], + "tags": ["TVC"] + } + }, "/public/v1/submit/create_user_tag": { "post": { "summary": "Create user tag", @@ -1546,6 +1836,32 @@ "tags": ["Wallets"] } }, + "/public/v1/submit/create_webhook_endpoint": { + "post": { + "summary": "Create webhook endpoint", + "description": "Create a webhook endpoint for an organization.", + "operationId": "CreateWebhookEndpoint", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateWebhookEndpointRequest" + } + } + ], + "tags": ["Organizations"] + } + }, "/public/v1/submit/delete_api_keys": { "post": { "summary": "Delete API keys", @@ -1858,11 +2174,11 @@ "tags": ["Organizations"] } }, - "/public/v1/submit/delete_user_tags": { + "/public/v1/submit/delete_tvc_app_and_deployments": { "post": { - "summary": "Delete user tags", - "description": "Delete user tags within an organization.", - "operationId": "DeleteUserTags", + "summary": "Delete a TVC App and all of its deployments", + "description": "Delete a TVC App and all of its deployments", + "operationId": "DeleteTvcAppAndDeployments", "responses": { "200": { "description": "A successful response.", @@ -1877,18 +2193,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/DeleteUserTagsRequest" + "$ref": "#/definitions/DeleteTvcAppAndDeploymentsRequest" } } ], - "tags": ["User Tags"] + "tags": ["TVC"] } }, - "/public/v1/submit/delete_users": { + "/public/v1/submit/delete_tvc_deployment": { "post": { - "summary": "Delete users", - "description": "Delete users within an organization.", - "operationId": "DeleteUsers", + "summary": "Delete a TVC Deployment", + "description": "Delete a TVC Deployment", + "operationId": "DeleteTvcDeployment", "responses": { "200": { "description": "A successful response.", @@ -1903,18 +2219,70 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/DeleteUsersRequest" + "$ref": "#/definitions/DeleteTvcDeploymentRequest" } } ], - "tags": ["Users"] + "tags": ["TVC"] } }, - "/public/v1/submit/delete_wallet_accounts": { + "/public/v1/submit/delete_user_tags": { "post": { - "summary": "Delete wallet accounts", - "description": "Delete wallet accounts for an organization.", - "operationId": "DeleteWalletAccounts", + "summary": "Delete user tags", + "description": "Delete user tags within an organization.", + "operationId": "DeleteUserTags", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteUserTagsRequest" + } + } + ], + "tags": ["User Tags"] + } + }, + "/public/v1/submit/delete_users": { + "post": { + "summary": "Delete users", + "description": "Delete users within an organization.", + "operationId": "DeleteUsers", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteUsersRequest" + } + } + ], + "tags": ["Users"] + } + }, + "/public/v1/submit/delete_wallet_accounts": { + "post": { + "summary": "Delete wallet accounts", + "description": "Delete wallet accounts for an organization.", + "operationId": "DeleteWalletAccounts", "responses": { "200": { "description": "A successful response.", @@ -1962,6 +2330,32 @@ "tags": ["Wallets"] } }, + "/public/v1/submit/delete_webhook_endpoint": { + "post": { + "summary": "Delete webhook endpoint", + "description": "Delete a webhook endpoint for an organization.", + "operationId": "DeleteWebhookEndpoint", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteWebhookEndpointRequest" + } + } + ], + "tags": ["Organizations"] + } + }, "/public/v1/submit/email_auth": { "post": { "summary": "Perform email auth", @@ -2482,11 +2876,11 @@ "tags": ["Consensus"] } }, - "/public/v1/submit/remove_organization_feature": { + "/public/v1/submit/remove_ip_allowlist": { "post": { - "summary": "Remove organization feature", - "description": "Remove an organization feature. This activity must be approved by the current root quorum.", - "operationId": "RemoveOrganizationFeature", + "summary": "Remove IP Allowlist", + "description": "Delete IP allowlist and all associated rules for organization or API key. After removal, access will be determined by organization-level allowlist (for API keys) or allowed from all IPs (for organizations).", + "operationId": "RemoveIpAllowlist", "responses": { "200": { "description": "A successful response.", @@ -2501,18 +2895,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RemoveOrganizationFeatureRequest" + "$ref": "#/definitions/RemoveIpAllowlistRequest" } } ], - "tags": ["Features"] + "tags": ["IP Allowlist"] } }, - "/public/v1/submit/set_organization_feature": { + "/public/v1/submit/remove_organization_feature": { "post": { - "summary": "Set organization feature", - "description": "Set an organization feature. This activity must be approved by the current root quorum.", - "operationId": "SetOrganizationFeature", + "summary": "Remove organization feature", + "description": "Remove an organization feature. This activity must be approved by the current root quorum.", + "operationId": "RemoveOrganizationFeature", "responses": { "200": { "description": "A successful response.", @@ -2527,18 +2921,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SetOrganizationFeatureRequest" + "$ref": "#/definitions/RemoveOrganizationFeatureRequest" } } ], "tags": ["Features"] } }, - "/public/v1/submit/sign_raw_payload": { + "/public/v1/submit/restore_tvc_deployment": { "post": { - "summary": "Sign raw payload", - "description": "Sign a raw payload.", - "operationId": "SignRawPayload", + "summary": "Restore a TVC Deployment", + "description": "Restore a deleted TVC Deployment", + "operationId": "RestoreTvcDeployment", "responses": { "200": { "description": "A successful response.", @@ -2553,18 +2947,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SignRawPayloadRequest" + "$ref": "#/definitions/RestoreTvcDeploymentRequest" } } ], - "tags": ["Signing"] + "tags": ["TVC"] } }, - "/public/v1/submit/sign_raw_payloads": { + "/public/v1/submit/set_ip_allowlist": { "post": { - "summary": "Sign raw payloads", - "description": "Sign multiple raw payloads with the same signing parameters.", - "operationId": "SignRawPayloads", + "summary": "Set IP Allowlist", + "description": "Create or update IP allowlist and rules for organization or API key. The IP allowlist restricts API access to specific CIDR blocks. Organization-level allowlists apply to all API keys unless overridden by a key-specific allowlist.", + "operationId": "SetIpAllowlist", "responses": { "200": { "description": "A successful response.", @@ -2579,18 +2973,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SignRawPayloadsRequest" + "$ref": "#/definitions/SetIpAllowlistRequest" } } ], - "tags": ["Signing"] + "tags": ["IP Allowlist"] } }, - "/public/v1/submit/sign_transaction": { + "/public/v1/submit/set_organization_feature": { "post": { - "summary": "Sign transaction", - "description": "Sign a transaction.", - "operationId": "SignTransaction", + "summary": "Set organization feature", + "description": "Set an organization feature. This activity must be approved by the current root quorum.", + "operationId": "SetOrganizationFeature", "responses": { "200": { "description": "A successful response.", @@ -2605,18 +2999,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SignTransactionRequest" + "$ref": "#/definitions/SetOrganizationFeatureRequest" } } ], - "tags": ["Signing"] + "tags": ["Features"] } }, - "/public/v1/submit/sol_send_transaction": { + "/public/v1/submit/set_tvc_app_live_deployment": { "post": { - "summary": "Broadcast SVM transaction", - "description": "Submit a transaction intent describing an SVM transaction you would like to broadcast.", - "operationId": "SolSendTransaction", + "summary": "Set TVC App live deployment", + "description": "Set the live deployment for a TVC App", + "operationId": "UpdateTvcAppLiveDeployment", "responses": { "200": { "description": "A successful response.", @@ -2631,18 +3025,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SolSendTransactionRequest" + "$ref": "#/definitions/UpdateTvcAppLiveDeploymentRequest" } } ], - "tags": ["Broadcasting"] + "tags": ["TVC"] } }, - "/public/v1/submit/stamp_login": { + "/public/v1/submit/sign_raw_payload": { "post": { - "summary": "Login with a stamp", - "description": "Create a session for a user through stamping client side (API key, wallet client, or passkey client).", - "operationId": "StampLogin", + "summary": "Sign raw payload", + "description": "Sign a raw payload.", + "operationId": "SignRawPayload", "responses": { "200": { "description": "A successful response.", @@ -2657,18 +3051,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/StampLoginRequest" + "$ref": "#/definitions/SignRawPayloadRequest" } } ], - "tags": ["Sessions"] + "tags": ["Signing"] } }, - "/public/v1/submit/update_fiat_on_ramp_credential": { + "/public/v1/submit/sign_raw_payloads": { "post": { - "summary": "Update a Fiat On Ramp Credential", - "description": "Update a fiat on ramp provider credential", - "operationId": "UpdateFiatOnRampCredential", + "summary": "Sign raw payloads", + "description": "Sign multiple raw payloads with the same signing parameters.", + "operationId": "SignRawPayloads", "responses": { "200": { "description": "A successful response.", @@ -2683,18 +3077,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateFiatOnRampCredentialRequest" + "$ref": "#/definitions/SignRawPayloadsRequest" } } ], - "tags": ["On Ramp"] + "tags": ["Signing"] } }, - "/public/v1/submit/update_oauth2_credential": { + "/public/v1/submit/sign_transaction": { "post": { - "summary": "Update an OAuth 2.0 Credential", - "description": "Update an OAuth 2.0 provider credential", - "operationId": "UpdateOauth2Credential", + "summary": "Sign transaction", + "description": "Sign a transaction.", + "operationId": "SignTransaction", "responses": { "200": { "description": "A successful response.", @@ -2709,18 +3103,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateOauth2CredentialRequest" + "$ref": "#/definitions/SignTransactionRequest" } } ], - "tags": ["User Auth"] + "tags": ["Signing"] } }, - "/public/v1/submit/update_policy": { + "/public/v1/submit/sol_send_transaction": { "post": { - "summary": "Update policy", - "description": "Update an existing policy.", - "operationId": "UpdatePolicy", + "summary": "Broadcast SVM transaction", + "description": "Submit a transaction intent describing an SVM transaction you would like to broadcast.", + "operationId": "SolSendTransaction", "responses": { "200": { "description": "A successful response.", @@ -2735,18 +3129,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdatePolicyRequest" + "$ref": "#/definitions/SolSendTransactionRequest" } } ], - "tags": ["Policies"] + "tags": ["Broadcasting"] } }, - "/public/v1/submit/update_private_key_tag": { + "/public/v1/submit/spark_claim_transfer": { "post": { - "summary": "Update private key tag", - "description": "Update human-readable name or associated private keys. Note that this activity is atomic: all of the updates will succeed at once, or all of them will fail.", - "operationId": "UpdatePrivateKeyTag", + "summary": "Claim Spark transfer", + "description": "Construct receiver-side encrypted operator packages to claim a Spark transfer. Does not perform FROST signing.", + "operationId": "SparkClaimTransfer", "responses": { "200": { "description": "A successful response.", @@ -2761,18 +3155,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdatePrivateKeyTagRequest" + "$ref": "#/definitions/SparkClaimTransferRequest" } } ], - "tags": ["Private Key Tags"] + "tags": ["Signing"] } }, - "/public/v1/submit/update_root_quorum": { + "/public/v1/submit/spark_prepare_lightning_receive": { "post": { - "summary": "Update root quorum", - "description": "Set the threshold and members of the root quorum. This activity must be approved by the current root quorum.", - "operationId": "UpdateRootQuorum", + "summary": "Spark prepare Lightning receive", + "description": "Generate a Lightning preimage and distribute Feldman shares to operators for a Spark Lightning receive. Does not perform FROST signing.", + "operationId": "SparkPrepareLightningReceive", "responses": { "200": { "description": "A successful response.", @@ -2787,18 +3181,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateRootQuorumRequest" + "$ref": "#/definitions/SparkPrepareLightningReceiveRequest" } } ], - "tags": ["Organizations"] + "tags": ["Signing"] } }, - "/public/v1/submit/update_user": { + "/public/v1/submit/spark_prepare_transfer": { "post": { - "summary": "Update user", - "description": "Update a user in an existing organization.", - "operationId": "UpdateUser", + "summary": "Prepare Spark transfer", + "description": "Construct sender-side encrypted operator packages for a Spark BTC transfer. Does not perform FROST signing.", + "operationId": "SparkPrepareTransfer", "responses": { "200": { "description": "A successful response.", @@ -2813,18 +3207,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateUserRequest" + "$ref": "#/definitions/SparkPrepareTransferRequest" } } ], - "tags": ["Users"] + "tags": ["Signing"] } }, - "/public/v1/submit/update_user_email": { + "/public/v1/submit/spark_sign_frost": { "post": { - "summary": "Update user's email", - "description": "Update a user's email in an existing organization.", - "operationId": "UpdateUserEmail", + "summary": "Sign Frost Spark", + "description": "Perform pure FROST partial signing for a Spark wallet. Produces partial signatures without constructing operator packages.", + "operationId": "SparkSignFrost", "responses": { "200": { "description": "A successful response.", @@ -2839,18 +3233,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateUserEmailRequest" + "$ref": "#/definitions/SparkSignFrostRequest" } } ], - "tags": ["Users"] + "tags": ["Signing"] } }, - "/public/v1/submit/update_user_name": { + "/public/v1/submit/stamp_login": { "post": { - "summary": "Update user's name", - "description": "Update a user's name in an existing organization.", - "operationId": "UpdateUserName", + "summary": "Login with a stamp", + "description": "Create a session for a user through stamping client side (API key, wallet client, or passkey client).", + "operationId": "StampLogin", "responses": { "200": { "description": "A successful response.", @@ -2865,18 +3259,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateUserNameRequest" + "$ref": "#/definitions/StampLoginRequest" } } ], - "tags": ["Users"] + "tags": ["Sessions"] } }, - "/public/v1/submit/update_user_phone_number": { + "/public/v1/submit/update_fiat_on_ramp_credential": { "post": { - "summary": "Update user's phone number", - "description": "Update a user's phone number in an existing organization.", - "operationId": "UpdateUserPhoneNumber", + "summary": "Update a Fiat On Ramp Credential", + "description": "Update a fiat on ramp provider credential", + "operationId": "UpdateFiatOnRampCredential", "responses": { "200": { "description": "A successful response.", @@ -2891,18 +3285,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateUserPhoneNumberRequest" + "$ref": "#/definitions/UpdateFiatOnRampCredentialRequest" } } ], - "tags": ["Users"] + "tags": ["On Ramp"] } }, - "/public/v1/submit/update_user_tag": { + "/public/v1/submit/update_oauth2_credential": { "post": { - "summary": "Update user tag", - "description": "Update human-readable name or associated users. Note that this activity is atomic: all of the updates will succeed at once, or all of them will fail.", - "operationId": "UpdateUserTag", + "summary": "Update an OAuth 2.0 Credential", + "description": "Update an OAuth 2.0 provider credential", + "operationId": "UpdateOauth2Credential", "responses": { "200": { "description": "A successful response.", @@ -2917,18 +3311,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateUserTagRequest" + "$ref": "#/definitions/UpdateOauth2CredentialRequest" } } ], - "tags": ["User Tags"] + "tags": ["User Auth"] } }, - "/public/v1/submit/update_wallet": { + "/public/v1/submit/update_organization_name": { "post": { - "summary": "Update wallet", - "description": "Update a wallet for an organization.", - "operationId": "UpdateWallet", + "summary": "Update organization name", + "description": "Update the name of an organization.", + "operationId": "UpdateOrganizationName", "responses": { "200": { "description": "A successful response.", @@ -2943,18 +3337,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateWalletRequest" + "$ref": "#/definitions/UpdateOrganizationNameRequest" } } ], - "tags": ["Wallets"] + "tags": ["Organizations"] } }, - "/public/v1/submit/verify_otp": { + "/public/v1/submit/update_policy": { "post": { - "summary": "Verify generic OTP", - "description": "Verify a generic OTP.", - "operationId": "VerifyOtp", + "summary": "Update policy", + "description": "Update an existing policy.", + "operationId": "UpdatePolicy", "responses": { "200": { "description": "A successful response.", @@ -2969,515 +3363,3287 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/VerifyOtpRequest" + "$ref": "#/definitions/UpdatePolicyRequest" } } ], - "tags": ["User Verification"] + "tags": ["Policies"] } - } - }, - "definitions": { - "AcceptInvitationIntent": { - "type": "object", - "properties": { + }, + "/public/v1/submit/update_private_key_tag": { + "post": { + "summary": "Update private key tag", + "description": "Update human-readable name or associated private keys. Note that this activity is atomic: all of the updates will succeed at once, or all of them will fail.", + "operationId": "UpdatePrivateKeyTag", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdatePrivateKeyTagRequest" + } + } + ], + "tags": ["Private Key Tags"] + } + }, + "/public/v1/submit/update_root_quorum": { + "post": { + "summary": "Update root quorum", + "description": "Set the threshold and members of the root quorum. This activity must be approved by the current root quorum.", + "operationId": "UpdateRootQuorum", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateRootQuorumRequest" + } + } + ], + "tags": ["Organizations"] + } + }, + "/public/v1/submit/update_user": { + "post": { + "summary": "Update user", + "description": "Update a user in an existing organization.", + "operationId": "UpdateUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserRequest" + } + } + ], + "tags": ["Users"] + } + }, + "/public/v1/submit/update_user_email": { + "post": { + "summary": "Update user's email", + "description": "Update a user's email in an existing organization.", + "operationId": "UpdateUserEmail", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserEmailRequest" + } + } + ], + "tags": ["Users"] + } + }, + "/public/v1/submit/update_user_name": { + "post": { + "summary": "Update user's name", + "description": "Update a user's name in an existing organization.", + "operationId": "UpdateUserName", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserNameRequest" + } + } + ], + "tags": ["Users"] + } + }, + "/public/v1/submit/update_user_phone_number": { + "post": { + "summary": "Update user's phone number", + "description": "Update a user's phone number in an existing organization.", + "operationId": "UpdateUserPhoneNumber", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserPhoneNumberRequest" + } + } + ], + "tags": ["Users"] + } + }, + "/public/v1/submit/update_user_tag": { + "post": { + "summary": "Update user tag", + "description": "Update human-readable name or associated users. Note that this activity is atomic: all of the updates will succeed at once, or all of them will fail.", + "operationId": "UpdateUserTag", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserTagRequest" + } + } + ], + "tags": ["User Tags"] + } + }, + "/public/v1/submit/update_wallet": { + "post": { + "summary": "Update wallet", + "description": "Update a wallet for an organization.", + "operationId": "UpdateWallet", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateWalletRequest" + } + } + ], + "tags": ["Wallets"] + } + }, + "/public/v1/submit/update_webhook_endpoint": { + "post": { + "summary": "Update webhook endpoint", + "description": "Update a webhook endpoint for an organization.", + "operationId": "UpdateWebhookEndpoint", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateWebhookEndpointRequest" + } + } + ], + "tags": ["Organizations"] + } + }, + "/public/v1/submit/verify_otp": { + "post": { + "summary": "Verify generic OTP", + "description": "Verify a generic OTP.", + "operationId": "VerifyOtp", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VerifyOtpRequest" + } + } + ], + "tags": ["User Verification"] + } + }, + "/tkhq/api/v1/noop-codegen-anchor": { + "post": { + "operationId": "NOOPCodegenAnchor", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/NOOPCodegenAnchorResponse" + } + } + } + } + } + }, + "definitions": { + "AcceptInvitationIntent": { + "type": "object", + "properties": { + "invitationId": { + "type": "string", + "description": "Unique identifier for a given Invitation object." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + }, + "authenticator": { + "$ref": "#/definitions/AuthenticatorParams", + "description": "WebAuthN hardware devices that can be used to log in to the Turnkey web app." + } + }, + "required": ["invitationId", "userId", "authenticator"] + }, + "AcceptInvitationIntentV2": { + "type": "object", + "properties": { "invitationId": { "type": "string", - "description": "Unique identifier for a given Invitation object." + "description": "Unique identifier for a given Invitation object." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + }, + "authenticator": { + "$ref": "#/definitions/AuthenticatorParamsV2", + "description": "WebAuthN hardware devices that can be used to log in to the Turnkey web app." + } + }, + "required": ["invitationId", "userId", "authenticator"] + }, + "AcceptInvitationResult": { + "type": "object", + "properties": { + "invitationId": { + "type": "string", + "description": "Unique identifier for a given Invitation." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + } + }, + "required": ["invitationId", "userId"] + }, + "AccessType": { + "type": "string", + "enum": ["ACCESS_TYPE_WEB", "ACCESS_TYPE_API", "ACCESS_TYPE_ALL"] + }, + "ActivateBillingTierIntent": { + "type": "object", + "properties": { + "productId": { + "type": "string", + "description": "The product that the customer wants to subscribe to." + }, + "orbPlanId": { + "type": "string", + "x-nullable": true + } + }, + "required": ["productId"] + }, + "ActivateBillingTierResult": { + "type": "object", + "properties": { + "productId": { + "type": "string", + "description": "The id of the product being subscribed to." + } + }, + "required": ["productId"] + }, + "Activity": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for a given Activity object." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "status": { + "$ref": "#/definitions/ActivityStatus", + "description": "The current processing status of a specified Activity." + }, + "type": { + "$ref": "#/definitions/ActivityType", + "description": "Type of Activity, such as Add User, or Sign Transaction." + }, + "intent": { + "$ref": "#/definitions/Intent", + "description": "Intent object crafted by Turnkey based on the user request, used to assess the permissibility of an action." + }, + "result": { + "$ref": "#/definitions/Result", + "description": "Result of the intended action." + }, + "votes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Vote" + }, + "description": "A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata." + }, + "appProofs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AppProof" + }, + "description": "A list of App Proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations." + }, + "fingerprint": { + "type": "string", + "description": "An artifact verifying a User's action." + }, + "canApprove": { + "type": "boolean" + }, + "canReject": { + "type": "boolean" + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "failure": { + "$ref": "#/definitions/Status", + "description": "Failure reason of the intended action." + } + }, + "required": [ + "id", + "organizationId", + "status", + "type", + "intent", + "result", + "votes", + "fingerprint", + "canApprove", + "canReject", + "createdAt", + "updatedAt" + ] + }, + "ActivityResponse": { + "type": "object", + "properties": { + "activity": { + "$ref": "#/definitions/Activity", + "description": "An action that can be taken within the Turnkey infrastructure." + } + }, + "required": ["activity"] + }, + "ActivityStatus": { + "type": "string", + "enum": [ + "ACTIVITY_STATUS_CREATED", + "ACTIVITY_STATUS_PENDING", + "ACTIVITY_STATUS_COMPLETED", + "ACTIVITY_STATUS_FAILED", + "ACTIVITY_STATUS_CONSENSUS_NEEDED", + "ACTIVITY_STATUS_REJECTED" + ] + }, + "ActivityType": { + "type": "string", + "enum": [ + "ACTIVITY_TYPE_CREATE_API_KEYS", + "ACTIVITY_TYPE_CREATE_USERS", + "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS", + "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD", + "ACTIVITY_TYPE_CREATE_INVITATIONS", + "ACTIVITY_TYPE_ACCEPT_INVITATION", + "ACTIVITY_TYPE_CREATE_POLICY", + "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY", + "ACTIVITY_TYPE_DELETE_USERS", + "ACTIVITY_TYPE_DELETE_API_KEYS", + "ACTIVITY_TYPE_DELETE_INVITATION", + "ACTIVITY_TYPE_DELETE_ORGANIZATION", + "ACTIVITY_TYPE_DELETE_POLICY", + "ACTIVITY_TYPE_CREATE_USER_TAG", + "ACTIVITY_TYPE_DELETE_USER_TAGS", + "ACTIVITY_TYPE_CREATE_ORGANIZATION", + "ACTIVITY_TYPE_SIGN_TRANSACTION", + "ACTIVITY_TYPE_APPROVE_ACTIVITY", + "ACTIVITY_TYPE_REJECT_ACTIVITY", + "ACTIVITY_TYPE_DELETE_AUTHENTICATORS", + "ACTIVITY_TYPE_CREATE_AUTHENTICATORS", + "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG", + "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS", + "ACTIVITY_TYPE_SET_PAYMENT_METHOD", + "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER", + "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD", + "ACTIVITY_TYPE_CREATE_POLICY_V2", + "ACTIVITY_TYPE_CREATE_POLICY_V3", + "ACTIVITY_TYPE_CREATE_API_ONLY_USERS", + "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM", + "ACTIVITY_TYPE_UPDATE_USER_TAG", + "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG", + "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2", + "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2", + "ACTIVITY_TYPE_CREATE_USERS_V2", + "ACTIVITY_TYPE_ACCEPT_INVITATION_V2", + "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION", + "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2", + "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS", + "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2", + "ACTIVITY_TYPE_UPDATE_USER", + "ACTIVITY_TYPE_UPDATE_POLICY", + "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2", + "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3", + "ACTIVITY_TYPE_CREATE_WALLET", + "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS", + "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY", + "ACTIVITY_TYPE_RECOVER_USER", + "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE", + "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE", + "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", + "ACTIVITY_TYPE_SIGN_TRANSACTION_V2", + "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY", + "ACTIVITY_TYPE_EXPORT_WALLET", + "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4", + "ACTIVITY_TYPE_EMAIL_AUTH", + "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT", + "ACTIVITY_TYPE_INIT_IMPORT_WALLET", + "ACTIVITY_TYPE_IMPORT_WALLET", + "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY", + "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY", + "ACTIVITY_TYPE_CREATE_POLICIES", + "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS", + "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION", + "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS", + "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS", + "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5", + "ACTIVITY_TYPE_OAUTH", + "ACTIVITY_TYPE_CREATE_API_KEYS_V2", + "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION", + "ACTIVITY_TYPE_EMAIL_AUTH_V2", + "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6", + "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS", + "ACTIVITY_TYPE_DELETE_WALLETS", + "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2", + "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION", + "ACTIVITY_TYPE_INIT_OTP_AUTH", + "ACTIVITY_TYPE_OTP_AUTH", + "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7", + "ACTIVITY_TYPE_UPDATE_WALLET", + "ACTIVITY_TYPE_UPDATE_POLICY_V2", + "ACTIVITY_TYPE_CREATE_USERS_V3", + "ACTIVITY_TYPE_INIT_OTP_AUTH_V2", + "ACTIVITY_TYPE_INIT_OTP", + "ACTIVITY_TYPE_VERIFY_OTP", + "ACTIVITY_TYPE_OTP_LOGIN", + "ACTIVITY_TYPE_STAMP_LOGIN", + "ACTIVITY_TYPE_OAUTH_LOGIN", + "ACTIVITY_TYPE_UPDATE_USER_NAME", + "ACTIVITY_TYPE_UPDATE_USER_EMAIL", + "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER", + "ACTIVITY_TYPE_INIT_FIAT_ON_RAMP", + "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE", + "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE", + "ACTIVITY_TYPE_ENABLE_AUTH_PROXY", + "ACTIVITY_TYPE_DISABLE_AUTH_PROXY", + "ACTIVITY_TYPE_UPDATE_AUTH_PROXY_CONFIG", + "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL", + "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL", + "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL", + "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE", + "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS", + "ACTIVITY_TYPE_DELETE_POLICIES", + "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION", + "ACTIVITY_TYPE_ETH_SEND_TRANSACTION", + "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL", + "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL", + "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL", + "ACTIVITY_TYPE_EMAIL_AUTH_V3", + "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2", + "ACTIVITY_TYPE_INIT_OTP_AUTH_V3", + "ACTIVITY_TYPE_INIT_OTP_V2", + "ACTIVITY_TYPE_UPSERT_GAS_USAGE_CONFIG", + "ACTIVITY_TYPE_CREATE_TVC_APP", + "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT", + "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS", + "ACTIVITY_TYPE_SOL_SEND_TRANSACTION", + "ACTIVITY_TYPE_INIT_OTP_V3", + "ACTIVITY_TYPE_VERIFY_OTP_V2", + "ACTIVITY_TYPE_OTP_LOGIN_V2", + "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME", + "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8", + "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2", + "ACTIVITY_TYPE_CREATE_USERS_V4", + "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT", + "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT", + "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT", + "ACTIVITY_TYPE_SET_IP_ALLOWLIST", + "ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST", + "ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT", + "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT", + "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS", + "ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT", + "ACTIVITY_TYPE_SPARK_SIGN_FROST", + "ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER", + "ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER", + "ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE", + "ACTIVITY_TYPE_POST_TVC_QUORUM_KEY_SHARE" + ] + }, + "AddressFormat": { + "type": "string", + "enum": [ + "ADDRESS_FORMAT_UNCOMPRESSED", + "ADDRESS_FORMAT_COMPRESSED", + "ADDRESS_FORMAT_ETHEREUM", + "ADDRESS_FORMAT_SOLANA", + "ADDRESS_FORMAT_COSMOS", + "ADDRESS_FORMAT_TRON", + "ADDRESS_FORMAT_SUI", + "ADDRESS_FORMAT_APTOS", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR", + "ADDRESS_FORMAT_SEI", + "ADDRESS_FORMAT_XLM", + "ADDRESS_FORMAT_DOGE_MAINNET", + "ADDRESS_FORMAT_DOGE_TESTNET", + "ADDRESS_FORMAT_TON_V3R2", + "ADDRESS_FORMAT_TON_V4R2", + "ADDRESS_FORMAT_TON_V5R1", + "ADDRESS_FORMAT_XRP", + "ADDRESS_FORMAT_SPARK_MAINNET", + "ADDRESS_FORMAT_SPARK_REGTEST" + ] + }, + "Any": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "ApiKey": { + "type": "object", + "properties": { + "credential": { + "$ref": "#/definitions/external.data.v1.Credential", + "description": "A User credential that can be used to authenticate to Turnkey." + }, + "apiKeyId": { + "type": "string", + "description": "Unique identifier for a given API Key." + }, + "apiKeyName": { + "type": "string", + "description": "Human-readable name for an API Key." + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "expirationSeconds": { + "type": "string", + "format": "uint64", + "x-nullable": true, + "description": "Optional window (in seconds) indicating how long the API Key should last." + } + }, + "required": [ + "credential", + "apiKeyId", + "apiKeyName", + "createdAt", + "updatedAt" + ] + }, + "ApiKeyCurve": { + "type": "string", + "enum": [ + "API_KEY_CURVE_P256", + "API_KEY_CURVE_SECP256K1", + "API_KEY_CURVE_ED25519" + ] + }, + "ApiKeyParams": { + "type": "object", + "properties": { + "apiKeyName": { + "type": "string", + "description": "Human-readable name for an API Key." + }, + "publicKey": { + "type": "string", + "description": "The public component of a cryptographic key pair used to sign messages and transactions." + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Optional window (in seconds) indicating how long the API Key should last." + } + }, + "required": ["apiKeyName", "publicKey"] + }, + "ApiKeyParamsV2": { + "type": "object", + "properties": { + "apiKeyName": { + "type": "string", + "description": "Human-readable name for an API Key." + }, + "publicKey": { + "type": "string", + "description": "The public component of a cryptographic key pair used to sign messages and transactions." + }, + "curveType": { + "$ref": "#/definitions/ApiKeyCurve", + "description": "The curve type to be used for processing API key signatures." + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Optional window (in seconds) indicating how long the API Key should last." + } + }, + "required": ["apiKeyName", "publicKey", "curveType"] + }, + "ApiOnlyUserParams": { + "type": "object", + "properties": { + "userName": { + "type": "string", + "description": "The name of the new API-only User." + }, + "userEmail": { + "type": "string", + "x-nullable": true, + "description": "The email address for this API-only User (optional)." + }, + "userTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of tags assigned to the new API-only User. This field, if not needed, should be an empty array in your request body." + }, + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKeyParams" + }, + "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." + } + }, + "required": ["userName", "userTags", "apiKeys"] + }, + "AppProof": { + "type": "object", + "properties": { + "scheme": { + "$ref": "#/definitions/data.v1.SignatureScheme", + "description": "Scheme of signing key." + }, + "publicKey": { + "type": "string", + "description": "Ephemeral public key." + }, + "proofPayload": { + "type": "string", + "description": "JSON serialized AppProofPayload." + }, + "signature": { + "type": "string", + "description": "Signature over hashed proof_payload." + } + }, + "required": ["scheme", "publicKey", "proofPayload", "signature"] + }, + "AppStatus": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Unique identifier for this TVC App" + }, + "deployments": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/DeploymentStatus" + }, + "description": "List of deployment statuses for this app" + }, + "targetedDeploymentId": { + "type": "string", + "description": "The deployment ID currently serving traffic for this app" + } + }, + "required": ["appId", "deployments", "targetedDeploymentId"] + }, + "ApproveActivityIntent": { + "type": "object", + "properties": { + "fingerprint": { + "type": "string", + "description": "An artifact verifying a User's action." + } + }, + "required": ["fingerprint"] + }, + "ApproveActivityRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_APPROVE_ACTIVITY"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/ApproveActivityIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "AssetBalance": { + "type": "object", + "properties": { + "caip19": { + "type": "string", + "description": "The caip-19 asset identifier" + }, + "symbol": { + "type": "string", + "description": "The asset symbol" + }, + "balance": { + "type": "string", + "description": "The balance in atomic units" + }, + "decimals": { + "type": "integer", + "format": "int32", + "description": "The number of decimals this asset uses" + }, + "display": { + "$ref": "#/definitions/AssetBalanceDisplay", + "description": "Normalized balance values for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise. Use the balance field instead." + }, + "name": { + "type": "string", + "description": "The asset name" + } + } + }, + "AssetBalanceDisplay": { + "type": "object", + "properties": { + "usd": { + "type": "string", + "description": "USD value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise." + }, + "crypto": { + "type": "string", + "description": "Normalized crypto value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise." + } + } + }, + "AssetMetadata": { + "type": "object", + "properties": { + "caip19": { + "type": "string", + "description": "The caip-19 asset identifier" + }, + "symbol": { + "type": "string", + "description": "The asset symbol" + }, + "decimals": { + "type": "integer", + "format": "int32", + "description": "The number of decimals this asset uses" + }, + "logoUrl": { + "type": "string", + "description": "The url of the asset logo" + }, + "name": { + "type": "string", + "description": "The asset name" + } + } + }, + "Attestation": { + "type": "object", + "properties": { + "credentialId": { + "type": "string", + "description": "The cbor encoded then base64 url encoded id of the credential." + }, + "clientDataJson": { + "type": "string", + "description": "A base64 url encoded payload containing metadata about the signing context and the challenge." + }, + "attestationObject": { + "type": "string", + "description": "A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses." + }, + "transports": { + "type": "array", + "items": { + "$ref": "#/definitions/AuthenticatorTransport" + }, + "description": "The type of authenticator transports." + } + }, + "required": [ + "credentialId", + "clientDataJson", + "attestationObject", + "transports" + ] + }, + "Authenticator": { + "type": "object", + "properties": { + "transports": { + "type": "array", + "items": { + "$ref": "#/definitions/AuthenticatorTransport" + }, + "description": "Types of transports that may be used by an Authenticator (e.g., USB, NFC, BLE)." + }, + "attestationType": { + "type": "string" + }, + "aaguid": { + "type": "string", + "description": "Identifier indicating the type of the Security Key." + }, + "credentialId": { + "type": "string", + "description": "Unique identifier for a WebAuthn credential." + }, + "model": { + "type": "string", + "description": "The type of Authenticator device." + }, + "credential": { + "$ref": "#/definitions/external.data.v1.Credential", + "description": "A User credential that can be used to authenticate to Turnkey." + }, + "authenticatorId": { + "type": "string", + "description": "Unique identifier for a given Authenticator." + }, + "authenticatorName": { + "type": "string", + "description": "Human-readable name for an Authenticator." + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + } + }, + "required": [ + "transports", + "attestationType", + "aaguid", + "credentialId", + "model", + "credential", + "authenticatorId", + "authenticatorName", + "createdAt", + "updatedAt" + ] + }, + "AuthenticatorAttestationResponse": { + "type": "object", + "properties": { + "clientDataJson": { + "type": "string" + }, + "attestationObject": { + "type": "string" + }, + "transports": { + "type": "array", + "items": { + "$ref": "#/definitions/AuthenticatorTransport" + } + }, + "authenticatorAttachment": { + "type": "string", + "enum": ["cross-platform", "platform"], + "x-nullable": true + } + }, + "required": ["clientDataJson", "attestationObject"] + }, + "AuthenticatorParams": { + "type": "object", + "properties": { + "authenticatorName": { + "type": "string", + "description": "Human-readable name for an Authenticator." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + }, + "attestation": { + "$ref": "#/definitions/PublicKeyCredentialWithAttestation" + }, + "challenge": { + "type": "string", + "description": "Challenge presented for authentication purposes." + } + }, + "required": ["authenticatorName", "userId", "attestation", "challenge"] + }, + "AuthenticatorParamsV2": { + "type": "object", + "properties": { + "authenticatorName": { + "type": "string", + "description": "Human-readable name for an Authenticator." + }, + "challenge": { + "type": "string", + "description": "Challenge presented for authentication purposes." + }, + "attestation": { + "$ref": "#/definitions/Attestation", + "description": "The attestation that proves custody of the authenticator and provides metadata about it." + } + }, + "required": ["authenticatorName", "challenge", "attestation"] + }, + "AuthenticatorTransport": { + "type": "string", + "enum": [ + "AUTHENTICATOR_TRANSPORT_BLE", + "AUTHENTICATOR_TRANSPORT_INTERNAL", + "AUTHENTICATOR_TRANSPORT_NFC", + "AUTHENTICATOR_TRANSPORT_USB", + "AUTHENTICATOR_TRANSPORT_HYBRID" + ] + }, + "BootProof": { + "type": "object", + "properties": { + "ephemeralPublicKeyHex": { + "type": "string", + "description": "The hex encoded Ephemeral Public Key." + }, + "awsAttestationDocB64": { + "type": "string", + "description": "The DER encoded COSE Sign1 struct Attestation doc." + }, + "qosManifestB64": { + "type": "string", + "description": "The base64 encoded QOS manifest. Encoding depends on qos_manifest_version." + }, + "qosManifestEnvelopeB64": { + "type": "string", + "description": "The base64 encoded QOS manifest envelope. Encoding depends on qos_manifest_version." + }, + "deploymentLabel": { + "type": "string", + "description": "The label under which the enclave app was deployed." + }, + "enclaveApp": { + "type": "string", + "description": "Name of the enclave app" + }, + "owner": { + "type": "string", + "description": "Owner of the app i.e. 'tkhq'" + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "qosManifestVersion": { + "type": "string", + "x-nullable": true, + "description": "QOS manifest schema version." + } + }, + "required": [ + "ephemeralPublicKeyHex", + "awsAttestationDocB64", + "qosManifestB64", + "qosManifestEnvelopeB64", + "deploymentLabel", + "enclaveApp", + "owner", + "createdAt" + ] + }, + "BootProofResponse": { + "type": "object", + "properties": { + "bootProof": { + "$ref": "#/definitions/BootProof" + } + }, + "required": ["bootProof"] + }, + "ClientSignature": { + "type": "object", + "properties": { + "publicKey": { + "type": "string", + "description": "The public component of a cryptographic key pair used to create the signature." + }, + "scheme": { + "$ref": "#/definitions/ClientSignatureScheme", + "description": "The signature scheme used to generate the client signature." + }, + "message": { + "type": "string", + "description": "The message that was signed." + }, + "signature": { + "type": "string", + "description": "The cryptographic signature over the message." + } + }, + "required": ["publicKey", "scheme", "message", "signature"] + }, + "ClientSignatureScheme": { + "type": "string", + "enum": ["CLIENT_SIGNATURE_SCHEME_API_P256"] + }, + "Config": { + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Feature" + } + }, + "quorum": { + "$ref": "#/definitions/external.data.v1.Quorum" + } + } + }, + "CreateApiKeysIntent": { + "type": "object", + "properties": { + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKeyParams" + }, + "description": "A list of API Keys." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + } + }, + "required": ["apiKeys", "userId"] + }, + "CreateApiKeysIntentV2": { + "type": "object", + "properties": { + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKeyParamsV2" + }, + "description": "A list of API Keys." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + } + }, + "required": ["apiKeys", "userId"] + }, + "CreateApiKeysRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_API_KEYS_V2"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateApiKeysIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateApiKeysResult": { + "type": "object", + "properties": { + "apiKeyIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of API Key IDs." + } + }, + "required": ["apiKeyIds"] + }, + "CreateApiOnlyUsersIntent": { + "type": "object", + "properties": { + "apiOnlyUsers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiOnlyUserParams" + }, + "description": "A list of API-only Users to create." + } + }, + "required": ["apiOnlyUsers"] + }, + "CreateApiOnlyUsersResult": { + "type": "object", + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of API-only User IDs." + } + }, + "required": ["userIds"] + }, + "CreateAuthenticatorsIntent": { + "type": "object", + "properties": { + "authenticators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AuthenticatorParams" + }, + "description": "A list of Authenticators." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + } + }, + "required": ["authenticators", "userId"] + }, + "CreateAuthenticatorsIntentV2": { + "type": "object", + "properties": { + "authenticators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AuthenticatorParamsV2" + }, + "description": "A list of Authenticators." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + } + }, + "required": ["authenticators", "userId"] + }, + "CreateAuthenticatorsRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateAuthenticatorsIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateAuthenticatorsResult": { + "type": "object", + "properties": { + "authenticatorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of Authenticator IDs." + } + }, + "required": ["authenticatorIds"] + }, + "CreateFiatOnRampCredentialIntent": { + "type": "object", + "properties": { + "onrampProvider": { + "$ref": "#/definitions/FiatOnRampProvider", + "description": "The fiat on-ramp provider" + }, + "projectId": { + "type": "string", + "x-nullable": true, + "description": "Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier" + }, + "publishableApiKey": { + "type": "string", + "description": "Publishable API key for the on-ramp provider" + }, + "encryptedSecretApiKey": { + "type": "string", + "description": "Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key" + }, + "encryptedPrivateApiKey": { + "type": "string", + "x-nullable": true, + "description": "Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key." + }, + "sandboxMode": { + "type": "boolean", + "description": "If the on-ramp credential is a sandbox credential" + } + }, + "required": [ + "onrampProvider", + "publishableApiKey", + "encryptedSecretApiKey" + ] + }, + "CreateFiatOnRampCredentialRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateFiatOnRampCredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateFiatOnRampCredentialResult": { + "type": "object", + "properties": { + "fiatOnRampCredentialId": { + "type": "string", + "description": "Unique identifier of the Fiat On-Ramp credential that was created" + } + }, + "required": ["fiatOnRampCredentialId"] + }, + "CreateInvitationsIntent": { + "type": "object", + "properties": { + "invitations": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/InvitationParams" + }, + "description": "A list of Invitations." + } + }, + "required": ["invitations"] + }, + "CreateInvitationsRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_INVITATIONS"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateInvitationsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateInvitationsResult": { + "type": "object", + "properties": { + "invitationIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of Invitation IDs" + } + }, + "required": ["invitationIds"] + }, + "CreateOauth2CredentialIntent": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/Oauth2Provider", + "description": "The OAuth 2.0 provider" + }, + "clientId": { + "type": "string", + "description": "The Client ID issued by the OAuth 2.0 provider" + }, + "encryptedClientSecret": { + "type": "string", + "description": "The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key" + } + }, + "required": ["provider", "clientId", "encryptedClientSecret"] + }, + "CreateOauth2CredentialRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateOauth2CredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateOauth2CredentialResult": { + "type": "object", + "properties": { + "oauth2CredentialId": { + "type": "string", + "description": "Unique identifier of the OAuth 2.0 credential that was created" + } + }, + "required": ["oauth2CredentialId"] + }, + "CreateOauthProvidersIntent": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "The ID of the User to add an Oauth provider to" + }, + "oauthProviders": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/OauthProviderParams" + }, + "description": "A list of Oauth providers." + } + }, + "required": ["userId", "oauthProviders"] + }, + "CreateOauthProvidersIntentV2": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "The ID of the User to add an Oauth provider to" + }, + "oauthProviders": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/OauthProviderParamsV2" + }, + "description": "A list of Oauth providers." + } + }, + "required": ["userId", "oauthProviders"] + }, + "CreateOauthProvidersRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateOauthProvidersIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateOauthProvidersResult": { + "type": "object", + "properties": { + "providerIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of unique identifiers for Oauth Providers" + } + }, + "required": ["providerIds"] + }, + "CreateOauthProvidersResultV2": { + "type": "object", + "properties": { + "providerIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of unique identifiers for Oauth Providers" + } + }, + "required": ["providerIds"] + }, + "CreateOrganizationIntent": { + "type": "object", + "properties": { + "organizationName": { + "type": "string", + "description": "Human-readable name for an Organization." + }, + "rootEmail": { + "type": "string", + "description": "The root user's email address." + }, + "rootAuthenticator": { + "$ref": "#/definitions/AuthenticatorParams", + "description": "The root user's Authenticator." + }, + "rootUserId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for the root user object." + } + }, + "required": ["organizationName", "rootEmail", "rootAuthenticator"] + }, + "CreateOrganizationIntentV2": { + "type": "object", + "properties": { + "organizationName": { + "type": "string", + "description": "Human-readable name for an Organization." + }, + "rootEmail": { + "type": "string", + "description": "The root user's email address." + }, + "rootAuthenticator": { + "$ref": "#/definitions/AuthenticatorParamsV2", + "description": "The root user's Authenticator." + }, + "rootUserId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for the root user object." + } + }, + "required": ["organizationName", "rootEmail", "rootAuthenticator"] + }, + "CreateOrganizationResult": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + } + }, + "required": ["organizationId"] + }, + "CreatePoliciesIntent": { + "type": "object", + "properties": { + "policies": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/CreatePolicyIntentV3" + }, + "description": "An array of policy intents to be created." + } + }, + "required": ["policies"] + }, + "CreatePoliciesRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_POLICIES"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreatePoliciesIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreatePoliciesResult": { + "type": "object", + "properties": { + "policyIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of unique identifiers for the created policies." + } + }, + "required": ["policyIds"] + }, + "CreatePolicyIntent": { + "type": "object", + "properties": { + "policyName": { + "type": "string", + "description": "Human-readable name for a Policy." + }, + "selectors": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Selector" + }, + "description": "A list of simple functions each including a subject, target and boolean. See Policy Engine Language section for additional details." + }, + "effect": { + "$ref": "#/definitions/Effect", + "description": "The instruction to DENY or ALLOW a particular activity following policy selector(s)." + }, + "notes": { + "type": "string" + } + }, + "required": ["policyName", "selectors", "effect"] + }, + "CreatePolicyIntentV2": { + "type": "object", + "properties": { + "policyName": { + "type": "string", + "description": "Human-readable name for a Policy." + }, + "selectors": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/SelectorV2" + }, + "description": "A list of simple functions each including a subject, target and boolean. See Policy Engine Language section for additional details." + }, + "effect": { + "$ref": "#/definitions/Effect", + "description": "Whether to ALLOW or DENY requests that match the condition and consensus requirements." + }, + "notes": { + "type": "string" + } + }, + "required": ["policyName", "selectors", "effect"] + }, + "CreatePolicyIntentV3": { + "type": "object", + "properties": { + "policyName": { + "type": "string", + "description": "Human-readable name for a Policy." + }, + "effect": { + "$ref": "#/definitions/Effect", + "description": "The instruction to DENY or ALLOW an activity." + }, + "condition": { + "type": "string", + "x-nullable": true, + "description": "The condition expression that triggers the Effect" + }, + "consensus": { + "type": "string", + "x-nullable": true, + "description": "The consensus expression that triggers the Effect" + }, + "notes": { + "type": "string", + "description": "Notes for a Policy." + } + }, + "required": ["policyName", "effect", "notes"] + }, + "CreatePolicyRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_POLICY_V3"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreatePolicyIntentV3" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreatePolicyResult": { + "type": "object", + "properties": { + "policyId": { + "type": "string", + "description": "Unique identifier for a given Policy." + } + }, + "required": ["policyId"] + }, + "CreatePrivateKeyTagIntent": { + "type": "object", + "properties": { + "privateKeyTagName": { + "type": "string", + "description": "Human-readable name for a Private Key Tag." + }, + "privateKeyIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of Private Key IDs." + } + }, + "required": ["privateKeyTagName", "privateKeyIds"] + }, + "CreatePrivateKeyTagRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreatePrivateKeyTagIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreatePrivateKeyTagResult": { + "type": "object", + "properties": { + "privateKeyTagId": { + "type": "string", + "description": "Unique identifier for a given Private Key Tag." + }, + "privateKeyIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of Private Key IDs." + } + }, + "required": ["privateKeyTagId", "privateKeyIds"] + }, + "CreatePrivateKeysIntent": { + "type": "object", + "properties": { + "privateKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/PrivateKeyParams" + }, + "description": "A list of Private Keys." + } + }, + "required": ["privateKeys"] + }, + "CreatePrivateKeysIntentV2": { + "type": "object", + "properties": { + "privateKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/PrivateKeyParams" + }, + "description": "A list of Private Keys." + } + }, + "required": ["privateKeys"] + }, + "CreatePrivateKeysRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreatePrivateKeysIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreatePrivateKeysResult": { + "type": "object", + "properties": { + "privateKeyIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of Private Key IDs." + } + }, + "required": ["privateKeyIds"] + }, + "CreatePrivateKeysResultV2": { + "type": "object", + "properties": { + "privateKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/PrivateKeyResult" + }, + "description": "A list of Private Key IDs and addresses." + } + }, + "required": ["privateKeys"] + }, + "CreateReadOnlySessionIntent": { + "type": "object" + }, + "CreateReadOnlySessionRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateReadOnlySessionIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateReadOnlySessionResult": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons." + }, + "organizationName": { + "type": "string", + "description": "Human-readable name for an Organization." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + }, + "username": { + "type": "string", + "description": "Human-readable name for a User." + }, + "session": { + "type": "string", + "description": "String representing a read only session" + }, + "sessionExpiry": { + "type": "string", + "format": "uint64", + "description": "UTC timestamp in seconds representing the expiry time for the read only session." + } + }, + "required": [ + "organizationId", + "organizationName", + "userId", + "username", + "session", + "sessionExpiry" + ] + }, + "CreateReadWriteSessionIntent": { + "type": "object", + "properties": { + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted." + }, + "email": { + "type": "string", + "description": "Email of the user to create a read write session for" + }, + "apiKeyName": { + "type": "string", + "x-nullable": true, + "description": "Optional human-readable name for an API Key. If none provided, default to Read Write Session - \u003cTimestamp\u003e" + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." + } + }, + "required": ["targetPublicKey", "email"] + }, + "CreateReadWriteSessionIntentV2": { + "type": "object", + "properties": { + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted." + }, + "userId": { + "type": "string", + "x-nullable": true, + "description": "Optional unique identifier for a given User. If none provided, the read write session will be created for the user who is making the request." + }, + "apiKeyName": { + "type": "string", + "x-nullable": true, + "description": "Optional human-readable name for an API Key. If none provided, default to Read Write Session - \u003cTimestamp\u003e" + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." + }, + "invalidateExisting": { + "type": "boolean", + "x-nullable": true, + "description": "Invalidate all other previously generated ReadWriteSession API keys" + } + }, + "required": ["targetPublicKey"] + }, + "CreateReadWriteSessionRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateReadWriteSessionIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateReadWriteSessionResult": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons." + }, + "organizationName": { + "type": "string", + "description": "Human-readable name for an Organization." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + }, + "username": { + "type": "string", + "description": "Human-readable name for a User." + }, + "apiKeyId": { + "type": "string", + "description": "Unique identifier for the created API key." + }, + "credentialBundle": { + "type": "string", + "description": "HPKE encrypted credential bundle" + } + }, + "required": [ + "organizationId", + "organizationName", + "userId", + "username", + "apiKeyId", + "credentialBundle" + ] + }, + "CreateReadWriteSessionResultV2": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons." + }, + "organizationName": { + "type": "string", + "description": "Human-readable name for an Organization." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + }, + "username": { + "type": "string", + "description": "Human-readable name for a User." + }, + "apiKeyId": { + "type": "string", + "description": "Unique identifier for the created API key." + }, + "credentialBundle": { + "type": "string", + "description": "HPKE encrypted credential bundle" + } + }, + "required": [ + "organizationId", + "organizationName", + "userId", + "username", + "apiKeyId", + "credentialBundle" + ] + }, + "CreateSmartContractInterfaceIntent": { + "type": "object", + "properties": { + "smartContractAddress": { + "type": "string", + "description": "Corresponding contract address or program ID" + }, + "smartContractInterface": { + "type": "string", + "description": "ABI/IDL as a JSON string. Limited to 400kb" + }, + "type": { + "$ref": "#/definitions/SmartContractInterfaceType" + }, + "label": { + "type": "string", + "description": "Human-readable name for a Smart Contract Interface." + }, + "notes": { + "type": "string", + "description": "Notes for a Smart Contract Interface." + } + }, + "required": [ + "smartContractAddress", + "smartContractInterface", + "type", + "label" + ] + }, + "CreateSmartContractInterfaceRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateSmartContractInterfaceIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateSmartContractInterfaceResult": { + "type": "object", + "properties": { + "smartContractInterfaceId": { + "type": "string", + "description": "The ID of the created Smart Contract Interface." + } + }, + "required": ["smartContractInterfaceId"] + }, + "CreateSubOrganizationIntent": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name for this sub-organization" + }, + "rootAuthenticator": { + "$ref": "#/definitions/AuthenticatorParamsV2", + "description": "Root User authenticator for this new sub-organization" + } + }, + "required": ["name", "rootAuthenticator"] + }, + "CreateSubOrganizationIntentV2": { + "type": "object", + "properties": { + "subOrganizationName": { + "type": "string", + "description": "Name for this sub-organization" + }, + "rootUsers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/RootUserParams" + }, + "description": "Root users to create within this sub-organization" + }, + "rootQuorumThreshold": { + "type": "integer", + "format": "int32", + "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + } + }, + "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + }, + "CreateSubOrganizationIntentV3": { + "type": "object", + "properties": { + "subOrganizationName": { + "type": "string", + "description": "Name for this sub-organization" + }, + "rootUsers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/RootUserParams" + }, + "description": "Root users to create within this sub-organization" + }, + "rootQuorumThreshold": { + "type": "integer", + "format": "int32", + "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + }, + "privateKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/PrivateKeyParams" + }, + "description": "A list of Private Keys." + } + }, + "required": [ + "subOrganizationName", + "rootUsers", + "rootQuorumThreshold", + "privateKeys" + ] + }, + "CreateSubOrganizationIntentV4": { + "type": "object", + "properties": { + "subOrganizationName": { + "type": "string", + "description": "Name for this sub-organization" + }, + "rootUsers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/RootUserParams" + }, + "description": "Root users to create within this sub-organization" + }, + "rootQuorumThreshold": { + "type": "integer", + "format": "int32", + "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + }, + "wallet": { + "$ref": "#/definitions/WalletParams", + "x-nullable": true, + "description": "The wallet to create for the sub-organization" + }, + "disableEmailRecovery": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email recovery for the sub-organization" + }, + "disableEmailAuth": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email auth for the sub-organization" + } + }, + "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + }, + "CreateSubOrganizationIntentV5": { + "type": "object", + "properties": { + "subOrganizationName": { + "type": "string", + "description": "Name for this sub-organization" + }, + "rootUsers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/RootUserParamsV2" + }, + "description": "Root users to create within this sub-organization" + }, + "rootQuorumThreshold": { + "type": "integer", + "format": "int32", + "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + }, + "wallet": { + "$ref": "#/definitions/WalletParams", + "x-nullable": true, + "description": "The wallet to create for the sub-organization" + }, + "disableEmailRecovery": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email recovery for the sub-organization" + }, + "disableEmailAuth": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email auth for the sub-organization" + } + }, + "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + }, + "CreateSubOrganizationIntentV6": { + "type": "object", + "properties": { + "subOrganizationName": { + "type": "string", + "description": "Name for this sub-organization" + }, + "rootUsers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/RootUserParamsV3" + }, + "description": "Root users to create within this sub-organization" + }, + "rootQuorumThreshold": { + "type": "integer", + "format": "int32", + "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + }, + "wallet": { + "$ref": "#/definitions/WalletParams", + "x-nullable": true, + "description": "The wallet to create for the sub-organization" + }, + "disableEmailRecovery": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email recovery for the sub-organization" + }, + "disableEmailAuth": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email auth for the sub-organization" + } + }, + "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + }, + "CreateSubOrganizationIntentV7": { + "type": "object", + "properties": { + "subOrganizationName": { + "type": "string", + "description": "Name for this sub-organization" + }, + "rootUsers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/RootUserParamsV4" + }, + "description": "Root users to create within this sub-organization" + }, + "rootQuorumThreshold": { + "type": "integer", + "format": "int32", + "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + }, + "wallet": { + "$ref": "#/definitions/WalletParams", + "x-nullable": true, + "description": "The wallet to create for the sub-organization" + }, + "disableEmailRecovery": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email recovery for the sub-organization" + }, + "disableEmailAuth": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email auth for the sub-organization" + }, + "disableSmsAuth": { + "type": "boolean", + "x-nullable": true, + "description": "Disable OTP SMS auth for the sub-organization" + }, + "disableOtpEmailAuth": { + "type": "boolean", + "x-nullable": true, + "description": "Disable OTP email auth for the sub-organization" + }, + "verificationToken": { + "type": "string", + "x-nullable": true, + "description": "Signed JWT containing a unique id, expiry, verification type, contact" + }, + "clientSignature": { + "$ref": "#/definitions/ClientSignature", + "x-nullable": true, + "description": "Optional signature proving authorization for this sub-organization creation. The signature is over the verification token ID and the root user parameters for the root user associated with the verification token. Only required if a public key was provided during the verification step." + } + }, + "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + }, + "CreateSubOrganizationIntentV8": { + "type": "object", + "properties": { + "subOrganizationName": { + "type": "string", + "description": "Name for this sub-organization" + }, + "rootUsers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/RootUserParamsV5" + }, + "description": "Root users to create within this sub-organization" + }, + "rootQuorumThreshold": { + "type": "integer", + "format": "int32", + "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + }, + "wallet": { + "$ref": "#/definitions/WalletParams", + "x-nullable": true, + "description": "The wallet to create for the sub-organization" + }, + "disableEmailRecovery": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email recovery for the sub-organization" + }, + "disableEmailAuth": { + "type": "boolean", + "x-nullable": true, + "description": "Disable email auth for the sub-organization" + }, + "disableSmsAuth": { + "type": "boolean", + "x-nullable": true, + "description": "Disable OTP SMS auth for the sub-organization" + }, + "disableOtpEmailAuth": { + "type": "boolean", + "x-nullable": true, + "description": "Disable OTP email auth for the sub-organization" + }, + "verificationToken": { + "type": "string", + "x-nullable": true, + "description": "Signed JWT containing a unique id, expiry, verification type, contact" + }, + "clientSignature": { + "$ref": "#/definitions/ClientSignature", + "x-nullable": true, + "description": "Optional signature proving authorization for this sub-organization creation. The signature is over the verification token ID and the root user parameters for the root user associated with the verification token. Only required if a public key was provided during the verification step." + } + }, + "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + }, + "CreateSubOrganizationRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateSubOrganizationIntentV8" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateSubOrganizationResult": { + "type": "object", + "properties": { + "subOrganizationId": { + "type": "string" + }, + "rootUserIds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["subOrganizationId"] + }, + "CreateSubOrganizationResultV3": { + "type": "object", + "properties": { + "subOrganizationId": { + "type": "string" }, - "userId": { - "type": "string", - "description": "Unique identifier for a given User." + "privateKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/PrivateKeyResult" + }, + "description": "A list of Private Key IDs and addresses." }, - "authenticator": { - "$ref": "#/definitions/AuthenticatorParams", - "description": "WebAuthN hardware devices that can be used to log in to the Turnkey web app." + "rootUserIds": { + "type": "array", + "items": { + "type": "string" + } } }, - "required": ["invitationId", "userId", "authenticator"] + "required": ["subOrganizationId", "privateKeys"] }, - "AcceptInvitationIntentV2": { + "CreateSubOrganizationResultV4": { "type": "object", "properties": { - "invitationId": { - "type": "string", - "description": "Unique identifier for a given Invitation object." + "subOrganizationId": { + "type": "string" }, - "userId": { - "type": "string", - "description": "Unique identifier for a given User." + "wallet": { + "$ref": "#/definitions/WalletResult", + "x-nullable": true }, - "authenticator": { - "$ref": "#/definitions/AuthenticatorParamsV2", - "description": "WebAuthN hardware devices that can be used to log in to the Turnkey web app." + "rootUserIds": { + "type": "array", + "items": { + "type": "string" + } } }, - "required": ["invitationId", "userId", "authenticator"] + "required": ["subOrganizationId"] }, - "AcceptInvitationResult": { + "CreateSubOrganizationResultV5": { "type": "object", "properties": { - "invitationId": { - "type": "string", - "description": "Unique identifier for a given Invitation." + "subOrganizationId": { + "type": "string" }, - "userId": { - "type": "string", - "description": "Unique identifier for a given User." + "wallet": { + "$ref": "#/definitions/WalletResult", + "x-nullable": true + }, + "rootUserIds": { + "type": "array", + "items": { + "type": "string" + } } }, - "required": ["invitationId", "userId"] + "required": ["subOrganizationId"] }, - "AccessType": { - "type": "string", - "enum": ["ACCESS_TYPE_WEB", "ACCESS_TYPE_API", "ACCESS_TYPE_ALL"] + "CreateSubOrganizationResultV6": { + "type": "object", + "properties": { + "subOrganizationId": { + "type": "string" + }, + "wallet": { + "$ref": "#/definitions/WalletResult", + "x-nullable": true + }, + "rootUserIds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["subOrganizationId"] }, - "ActivateBillingTierIntent": { + "CreateSubOrganizationResultV7": { "type": "object", "properties": { - "productId": { - "type": "string", - "description": "The product that the customer wants to subscribe to." + "subOrganizationId": { + "type": "string" + }, + "wallet": { + "$ref": "#/definitions/WalletResult", + "x-nullable": true + }, + "rootUserIds": { + "type": "array", + "items": { + "type": "string" + } } }, - "required": ["productId"] + "required": ["subOrganizationId"] }, - "ActivateBillingTierResult": { + "CreateSubOrganizationResultV8": { "type": "object", "properties": { - "productId": { - "type": "string", - "description": "The id of the product being subscribed to." + "subOrganizationId": { + "type": "string" + }, + "wallet": { + "$ref": "#/definitions/WalletResult", + "x-nullable": true + }, + "rootUserIds": { + "type": "array", + "items": { + "type": "string" + } } }, - "required": ["productId"] + "required": ["subOrganizationId"] }, - "Activity": { + "CreateTvcAppIntent": { "type": "object", "properties": { - "id": { + "name": { "type": "string", - "description": "Unique identifier for a given Activity object." + "description": "The name of the new TVC application" }, - "organizationId": { + "quorumPublicKey": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "Quorum public key to use for this application" }, - "status": { - "$ref": "#/definitions/ActivityStatus", - "description": "The current processing status of a specified Activity." + "manifestSetId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for an existing TVC operator set to use as the Manifest Set for this TVC application. If left empty, a new Manifest Set configuration is required" }, + "manifestSetParams": { + "$ref": "#/definitions/TvcOperatorSetParams", + "x-nullable": true, + "description": "Configuration to create a new TVC operator set, used as the Manifest Set for this TVC application. If left empty, a Manifest Set ID is required" + }, + "shareSetId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for an existing TVC operator set to use as the Share Set for this TVC application. If left empty, a new Share Set configuration is required" + }, + "shareSetParams": { + "$ref": "#/definitions/TvcOperatorSetParams", + "x-nullable": true, + "description": "Configuration to create a new TVC operator set, used as the Share Set for this TVC application. If left empty, a Share Set ID is required" + }, + "enableEgress": { + "type": "boolean", + "x-nullable": true, + "description": "Enables network egress for this TVC app. Default if not provided: false." + } + }, + "required": ["name", "quorumPublicKey"] + }, + "CreateTvcAppRequest": { + "type": "object", + "properties": { "type": { - "$ref": "#/definitions/ActivityType", - "description": "Type of Activity, such as Add User, or Sign Transaction." + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_TVC_APP"] }, - "intent": { - "$ref": "#/definitions/Intent", - "description": "Intent object crafted by Turnkey based on the user request, used to assess the permissibility of an action." + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "result": { - "$ref": "#/definitions/Result", - "description": "Result of the intended action." + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "votes": { + "parameters": { + "$ref": "#/definitions/CreateTvcAppIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateTvcAppResult": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "The unique identifier for the TVC application" + }, + "manifestSetId": { + "type": "string", + "description": "The unique identifier for the TVC manifest set" + }, + "manifestSetOperatorIds": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/Vote" + "type": "string" }, - "description": "A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata." + "description": "The unique identifier(s) of the manifest set operators" }, - "appProofs": { + "manifestSetThreshold": { + "type": "integer", + "format": "int64", + "description": "The required number of approvals for the manifest set" + } + }, + "required": [ + "appId", + "manifestSetId", + "manifestSetOperatorIds", + "manifestSetThreshold" + ] + }, + "CreateTvcDeploymentIntent": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "The unique identifier of the to-be-deployed TVC application" + }, + "qosVersion": { + "type": "string", + "description": "The QuorumOS version to use to deploy this application" + }, + "pivotContainerImageUrl": { + "type": "string", + "description": "URL of the container containing the pivot binary" + }, + "pivotPath": { + "type": "string", + "description": "Location of the binary in the pivot container" + }, + "pivotArgs": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/AppProof" + "type": "string" }, - "description": "A list of App Proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations." + "description": "Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"]" }, - "fingerprint": { + "expectedPivotDigest": { "type": "string", - "description": "An artifact verifying a User's action." + "description": "Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity." }, - "canApprove": { - "type": "boolean" + "nonce": { + "type": "integer", + "format": "int64", + "x-nullable": true, + "description": "Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds." }, - "canReject": { - "type": "boolean" + "pivotContainerEncryptedPullSecret": { + "type": "string", + "x-nullable": true, + "description": "Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty." }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "debugMode": { + "type": "boolean", + "x-nullable": true, + "description": "Optional flag to indicate whether to deploy the TVC app in debug mode, which includes additional logging and debugging tools. Default is false." }, - "updatedAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "healthCheckType": { + "$ref": "#/definitions/TvcHealthCheckType", + "description": "Health check type (TVC_HEALTH_CHECK_TYPE_HTTP or TVC_HEALTH_CHECK_TYPE_GRPC). HTTP health checks are made with a GET request on /health, and gRPC health checks follow the standard gRPC health checking protocol." }, - "failure": { - "$ref": "#/definitions/Status", - "description": "Failure reason of the intended action." + "healthCheckPort": { + "type": "integer", + "format": "int64", + "description": "Port to use for health checks." + }, + "publicIngressPort": { + "type": "integer", + "format": "int64", + "description": "Port to use for public ingress." } }, "required": [ - "id", - "organizationId", - "status", - "type", - "intent", - "result", - "votes", - "fingerprint", - "canApprove", - "canReject", - "createdAt", - "updatedAt" + "appId", + "qosVersion", + "pivotContainerImageUrl", + "pivotPath", + "pivotArgs", + "expectedPivotDigest", + "healthCheckType", + "healthCheckPort", + "publicIngressPort" ] }, - "ActivityResponse": { + "CreateTvcDeploymentRequest": { "type": "object", "properties": { - "activity": { - "$ref": "#/definitions/Activity", - "description": "An action that can be taken within the Turnkey infrastructure." + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateTvcDeploymentIntent" } }, - "required": ["activity"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "ActivityStatus": { - "type": "string", - "enum": [ - "ACTIVITY_STATUS_CREATED", - "ACTIVITY_STATUS_PENDING", - "ACTIVITY_STATUS_COMPLETED", - "ACTIVITY_STATUS_FAILED", - "ACTIVITY_STATUS_CONSENSUS_NEEDED", - "ACTIVITY_STATUS_REJECTED" - ] + "CreateTvcDeploymentResult": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "The unique identifier for the TVC deployment" + }, + "manifestId": { + "type": "string", + "description": "The unique identifier for the TVC manifest" + } + }, + "required": ["deploymentId", "manifestId"] }, - "ActivityType": { - "type": "string", - "enum": [ - "ACTIVITY_TYPE_CREATE_API_KEYS", - "ACTIVITY_TYPE_CREATE_USERS", - "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS", - "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD", - "ACTIVITY_TYPE_CREATE_INVITATIONS", - "ACTIVITY_TYPE_ACCEPT_INVITATION", - "ACTIVITY_TYPE_CREATE_POLICY", - "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY", - "ACTIVITY_TYPE_DELETE_USERS", - "ACTIVITY_TYPE_DELETE_API_KEYS", - "ACTIVITY_TYPE_DELETE_INVITATION", - "ACTIVITY_TYPE_DELETE_ORGANIZATION", - "ACTIVITY_TYPE_DELETE_POLICY", - "ACTIVITY_TYPE_CREATE_USER_TAG", - "ACTIVITY_TYPE_DELETE_USER_TAGS", - "ACTIVITY_TYPE_CREATE_ORGANIZATION", - "ACTIVITY_TYPE_SIGN_TRANSACTION", - "ACTIVITY_TYPE_APPROVE_ACTIVITY", - "ACTIVITY_TYPE_REJECT_ACTIVITY", - "ACTIVITY_TYPE_DELETE_AUTHENTICATORS", - "ACTIVITY_TYPE_CREATE_AUTHENTICATORS", - "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG", - "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS", - "ACTIVITY_TYPE_SET_PAYMENT_METHOD", - "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER", - "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD", - "ACTIVITY_TYPE_CREATE_POLICY_V2", - "ACTIVITY_TYPE_CREATE_POLICY_V3", - "ACTIVITY_TYPE_CREATE_API_ONLY_USERS", - "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM", - "ACTIVITY_TYPE_UPDATE_USER_TAG", - "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG", - "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2", - "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2", - "ACTIVITY_TYPE_CREATE_USERS_V2", - "ACTIVITY_TYPE_ACCEPT_INVITATION_V2", - "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION", - "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2", - "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS", - "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2", - "ACTIVITY_TYPE_UPDATE_USER", - "ACTIVITY_TYPE_UPDATE_POLICY", - "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2", - "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3", - "ACTIVITY_TYPE_CREATE_WALLET", - "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS", - "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY", - "ACTIVITY_TYPE_RECOVER_USER", - "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE", - "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE", - "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", - "ACTIVITY_TYPE_SIGN_TRANSACTION_V2", - "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY", - "ACTIVITY_TYPE_EXPORT_WALLET", - "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4", - "ACTIVITY_TYPE_EMAIL_AUTH", - "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT", - "ACTIVITY_TYPE_INIT_IMPORT_WALLET", - "ACTIVITY_TYPE_IMPORT_WALLET", - "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY", - "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY", - "ACTIVITY_TYPE_CREATE_POLICIES", - "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS", - "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION", - "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS", - "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS", - "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5", - "ACTIVITY_TYPE_OAUTH", - "ACTIVITY_TYPE_CREATE_API_KEYS_V2", - "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION", - "ACTIVITY_TYPE_EMAIL_AUTH_V2", - "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6", - "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS", - "ACTIVITY_TYPE_DELETE_WALLETS", - "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2", - "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION", - "ACTIVITY_TYPE_INIT_OTP_AUTH", - "ACTIVITY_TYPE_OTP_AUTH", - "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7", - "ACTIVITY_TYPE_UPDATE_WALLET", - "ACTIVITY_TYPE_UPDATE_POLICY_V2", - "ACTIVITY_TYPE_CREATE_USERS_V3", - "ACTIVITY_TYPE_INIT_OTP_AUTH_V2", - "ACTIVITY_TYPE_INIT_OTP", - "ACTIVITY_TYPE_VERIFY_OTP", - "ACTIVITY_TYPE_OTP_LOGIN", - "ACTIVITY_TYPE_STAMP_LOGIN", - "ACTIVITY_TYPE_OAUTH_LOGIN", - "ACTIVITY_TYPE_UPDATE_USER_NAME", - "ACTIVITY_TYPE_UPDATE_USER_EMAIL", - "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER", - "ACTIVITY_TYPE_INIT_FIAT_ON_RAMP", - "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE", - "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE", - "ACTIVITY_TYPE_ENABLE_AUTH_PROXY", - "ACTIVITY_TYPE_DISABLE_AUTH_PROXY", - "ACTIVITY_TYPE_UPDATE_AUTH_PROXY_CONFIG", - "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL", - "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL", - "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL", - "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE", - "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS", - "ACTIVITY_TYPE_DELETE_POLICIES", - "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION", - "ACTIVITY_TYPE_ETH_SEND_TRANSACTION", - "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL", - "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL", - "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL", - "ACTIVITY_TYPE_EMAIL_AUTH_V3", - "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2", - "ACTIVITY_TYPE_INIT_OTP_AUTH_V3", - "ACTIVITY_TYPE_INIT_OTP_V2", - "ACTIVITY_TYPE_UPSERT_GAS_USAGE_CONFIG", - "ACTIVITY_TYPE_CREATE_TVC_APP", - "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT", - "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS", - "ACTIVITY_TYPE_SOL_SEND_TRANSACTION" - ] + "CreateTvcManifestApprovalsIntent": { + "type": "object", + "properties": { + "manifestId": { + "type": "string", + "description": "Unique identifier of the TVC deployment to approve" + }, + "approvals": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TvcManifestApproval" + }, + "description": "List of manifest approvals" + } + }, + "required": ["manifestId", "approvals"] }, - "AddressFormat": { - "type": "string", - "enum": [ - "ADDRESS_FORMAT_UNCOMPRESSED", - "ADDRESS_FORMAT_COMPRESSED", - "ADDRESS_FORMAT_ETHEREUM", - "ADDRESS_FORMAT_SOLANA", - "ADDRESS_FORMAT_COSMOS", - "ADDRESS_FORMAT_TRON", - "ADDRESS_FORMAT_SUI", - "ADDRESS_FORMAT_APTOS", - "ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH", - "ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH", - "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH", - "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH", - "ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR", - "ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH", - "ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH", - "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH", - "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH", - "ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR", - "ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH", - "ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH", - "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH", - "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH", - "ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR", - "ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH", - "ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH", - "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH", - "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH", - "ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR", - "ADDRESS_FORMAT_SEI", - "ADDRESS_FORMAT_XLM", - "ADDRESS_FORMAT_DOGE_MAINNET", - "ADDRESS_FORMAT_DOGE_TESTNET", - "ADDRESS_FORMAT_TON_V3R2", - "ADDRESS_FORMAT_TON_V4R2", - "ADDRESS_FORMAT_TON_V5R1", - "ADDRESS_FORMAT_XRP" - ] + "CreateTvcManifestApprovalsRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateTvcManifestApprovalsIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "Any": { + "CreateTvcManifestApprovalsResult": { "type": "object", "properties": { - "@type": { - "type": "string" + "approvalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The unique identifier(s) for the manifest approvals" } }, - "additionalProperties": {} + "required": ["approvalIds"] }, - "ApiKey": { + "CreateUserTagIntent": { "type": "object", "properties": { - "credential": { - "$ref": "#/definitions/external.data.v1.Credential", - "description": "A User credential that can be used to authenticate to Turnkey." + "userTagName": { + "type": "string", + "description": "Human-readable name for a User Tag." }, - "apiKeyId": { + "userIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of User IDs." + } + }, + "required": ["userTagName", "userIds"] + }, + "CreateUserTagRequest": { + "type": "object", + "properties": { + "type": { "type": "string", - "description": "Unique identifier for a given API Key." + "enum": ["ACTIVITY_TYPE_CREATE_USER_TAG"] }, - "apiKeyName": { + "timestampMs": { "type": "string", - "description": "Human-readable name for an API Key." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "updatedAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "parameters": { + "$ref": "#/definitions/CreateUserTagIntent" }, - "expirationSeconds": { + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateUserTagResult": { + "type": "object", + "properties": { + "userTagId": { "type": "string", - "format": "uint64", + "description": "Unique identifier for a given User Tag." + }, + "userIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of User IDs." + } + }, + "required": ["userTagId", "userIds"] + }, + "CreateUsersIntent": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/UserParams" + }, + "description": "A list of Users." + } + }, + "required": ["users"] + }, + "CreateUsersIntentV2": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/UserParamsV2" + }, + "description": "A list of Users." + } + }, + "required": ["users"] + }, + "CreateUsersIntentV3": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/UserParamsV3" + }, + "description": "A list of Users." + } + }, + "required": ["users"] + }, + "CreateUsersIntentV4": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/UserParamsV4" + }, + "description": "A list of Users." + } + }, + "required": ["users"] + }, + "CreateUsersRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_USERS_V4"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateUsersIntentV4" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateUsersResult": { + "type": "object", + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of User IDs." + } + }, + "required": ["userIds"] + }, + "CreateWalletAccountsIntent": { + "type": "object", + "properties": { + "walletId": { + "type": "string", + "description": "Unique identifier for a given Wallet." + }, + "accounts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/WalletAccountParams" + }, + "description": "A list of wallet Accounts." + }, + "persist": { + "type": "boolean", "x-nullable": true, - "description": "Optional window (in seconds) indicating how long the API Key should last." + "description": "Indicates if the wallet accounts should be persisted. This is helpful if you'd like to see the addresses of different derivation paths without actually creating the accounts. Defaults to true." } }, - "required": [ - "credential", - "apiKeyId", - "apiKeyName", - "createdAt", - "updatedAt" - ] + "required": ["walletId", "accounts"] }, - "ApiKeyCurve": { - "type": "string", - "enum": [ - "API_KEY_CURVE_P256", - "API_KEY_CURVE_SECP256K1", - "API_KEY_CURVE_ED25519" - ] + "CreateWalletAccountsRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateWalletAccountsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "ApiKeyParams": { + "CreateWalletAccountsResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of derived addresses." + } + }, + "required": ["addresses"] + }, + "CreateWalletIntent": { "type": "object", "properties": { - "apiKeyName": { + "walletName": { "type": "string", - "description": "Human-readable name for an API Key." + "description": "Human-readable name for a Wallet." }, - "publicKey": { - "type": "string", - "description": "The public component of a cryptographic key pair used to sign messages and transactions." + "accounts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/WalletAccountParams" + }, + "description": "A list of wallet Accounts. This field, if not needed, should be an empty array in your request body." }, - "expirationSeconds": { - "type": "string", + "mnemonicLength": { + "type": "integer", + "format": "int32", "x-nullable": true, - "description": "Optional window (in seconds) indicating how long the API Key should last." + "description": "Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24." } }, - "required": ["apiKeyName", "publicKey"] + "required": ["walletName", "accounts"] }, - "ApiKeyParamsV2": { + "CreateWalletRequest": { "type": "object", "properties": { - "apiKeyName": { + "type": { "type": "string", - "description": "Human-readable name for an API Key." + "enum": ["ACTIVITY_TYPE_CREATE_WALLET"] }, - "publicKey": { + "timestampMs": { "type": "string", - "description": "The public component of a cryptographic key pair used to sign messages and transactions." - }, - "curveType": { - "$ref": "#/definitions/ApiKeyCurve", - "description": "The curve type to be used for processing API key signatures." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "expirationSeconds": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "Optional window (in seconds) indicating how long the API Key should last." + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateWalletIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": ["apiKeyName", "publicKey", "curveType"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "ApiOnlyUserParams": { + "CreateWalletResult": { "type": "object", "properties": { - "userName": { - "type": "string", - "description": "The name of the new API-only User." - }, - "userEmail": { + "walletId": { "type": "string", - "x-nullable": true, - "description": "The email address for this API-only User (optional)." + "description": "Unique identifier for a Wallet." }, - "userTags": { + "addresses": { "type": "array", "items": { "type": "string" }, - "description": "A list of tags assigned to the new API-only User. This field, if not needed, should be an empty array in your request body." - }, - "apiKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ApiKeyParams" - }, - "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." + "description": "A list of account addresses." } }, - "required": ["userName", "userTags", "apiKeys"] + "required": ["walletId", "addresses"] }, - "AppProof": { + "CreateWebhookEndpointIntent": { "type": "object", "properties": { - "scheme": { - "$ref": "#/definitions/data.v1.SignatureScheme", - "description": "Scheme of signing key." - }, - "publicKey": { + "url": { "type": "string", - "description": "Ephemeral public key." + "description": "The destination URL for webhook delivery." }, - "proofPayload": { + "name": { "type": "string", - "description": "JSON serialized AppProofPayload." + "description": "Human-readable name for this webhook endpoint." }, - "signature": { - "type": "string", - "description": "Signature over hashed proof_payload." - } - }, - "required": ["scheme", "publicKey", "proofPayload", "signature"] - }, - "ApproveActivityIntent": { - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "An artifact verifying a User's action." + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/WebhookSubscriptionParams" + }, + "description": "Event subscriptions to create for this endpoint." } }, - "required": ["fingerprint"] + "required": ["url", "name"] }, - "ApproveActivityRequest": { + "CreateWebhookEndpointRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_APPROVE_ACTIVITY"] + "enum": ["ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT"] }, "timestampMs": { "type": "string", @@ -3488,7 +6654,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/ApproveActivityIntent" + "$ref": "#/definitions/CreateWebhookEndpointIntent" }, "generateAppProofs": { "type": "boolean", @@ -3497,372 +6663,331 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "AssetBalance": { + "CreateWebhookEndpointResult": { "type": "object", "properties": { - "caip19": { - "type": "string", - "description": "The caip-19 asset identifier" - }, - "symbol": { - "type": "string", - "description": "The asset symbol" - }, - "balance": { + "endpointId": { "type": "string", - "description": "The balance in atomic units" - }, - "decimals": { - "type": "integer", - "format": "int32", - "description": "The number of decimals this asset uses" - }, - "display": { - "$ref": "#/definitions/AssetBalanceDisplay", - "description": "Normalized balance values for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise. Use the balance field instead." + "description": "Unique identifier of the created webhook endpoint." }, - "name": { - "type": "string", - "description": "The asset name" + "webhookEndpoint": { + "$ref": "#/definitions/WebhookEndpointData", + "description": "The created webhook endpoint data." } - } + }, + "required": ["endpointId", "webhookEndpoint"] }, - "AssetBalanceDisplay": { + "CredPropsAuthenticationExtensionsClientOutputs": { "type": "object", "properties": { - "usd": { - "type": "string", - "description": "USD value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise." - }, - "crypto": { - "type": "string", - "description": "Normalized crypto value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise." + "rk": { + "type": "boolean" } - } + }, + "required": ["rk"] }, - "AssetMetadata": { + "CredentialType": { + "type": "string", + "enum": [ + "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR", + "CREDENTIAL_TYPE_API_KEY_P256", + "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256", + "CREDENTIAL_TYPE_API_KEY_SECP256K1", + "CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256", + "CREDENTIAL_TYPE_API_KEY_ED25519", + "CREDENTIAL_TYPE_OTP_AUTH_KEY_P256", + "CREDENTIAL_TYPE_READ_WRITE_SESSION_KEY_P256", + "CREDENTIAL_TYPE_OAUTH_KEY_P256", + "CREDENTIAL_TYPE_LOGIN" + ] + }, + "Curve": { + "type": "string", + "enum": ["CURVE_SECP256K1", "CURVE_ED25519", "CURVE_P256"] + }, + "CustomRevertError": { "type": "object", "properties": { - "caip19": { - "type": "string", - "description": "The caip-19 asset identifier" - }, - "symbol": { - "type": "string", - "description": "The asset symbol" - }, - "decimals": { - "type": "integer", - "format": "int32", - "description": "The number of decimals this asset uses" - }, - "logoUrl": { + "errorName": { "type": "string", - "description": "The url of the asset logo" + "x-nullable": true, + "description": "The name of the custom error." }, - "name": { + "paramsJson": { "type": "string", - "description": "The asset name" + "x-nullable": true, + "description": "The decoded parameters as a JSON object." } } }, - "Attestation": { + "DeleteApiKeysIntent": { "type": "object", "properties": { - "credentialId": { - "type": "string", - "description": "The cbor encoded then base64 url encoded id of the credential." - }, - "clientDataJson": { - "type": "string", - "description": "A base64 url encoded payload containing metadata about the signing context and the challenge." - }, - "attestationObject": { + "userId": { "type": "string", - "description": "A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses." + "description": "Unique identifier for a given User." }, - "transports": { + "apiKeyIds": { "type": "array", "items": { - "$ref": "#/definitions/AuthenticatorTransport" + "type": "string" }, - "description": "The type of authenticator transports." + "description": "A list of API Key IDs." } }, - "required": [ - "credentialId", - "clientDataJson", - "attestationObject", - "transports" - ] + "required": ["userId", "apiKeyIds"] }, - "Authenticator": { + "DeleteApiKeysRequest": { "type": "object", "properties": { - "transports": { - "type": "array", - "items": { - "$ref": "#/definitions/AuthenticatorTransport" - }, - "description": "Types of transports that may be used by an Authenticator (e.g., USB, NFC, BLE)." - }, - "attestationType": { - "type": "string" - }, - "aaguid": { - "type": "string", - "description": "Identifier indicating the type of the Security Key." - }, - "credentialId": { - "type": "string", - "description": "Unique identifier for a WebAuthn credential." - }, - "model": { + "type": { "type": "string", - "description": "The type of Authenticator device." - }, - "credential": { - "$ref": "#/definitions/external.data.v1.Credential", - "description": "A User credential that can be used to authenticate to Turnkey." + "enum": ["ACTIVITY_TYPE_DELETE_API_KEYS"] }, - "authenticatorId": { + "timestampMs": { "type": "string", - "description": "Unique identifier for a given Authenticator." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "authenticatorName": { + "organizationId": { "type": "string", - "description": "Human-readable name for an Authenticator." - }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "description": "Unique identifier for a given Organization." }, - "updatedAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "parameters": { + "$ref": "#/definitions/DeleteApiKeysIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": [ - "transports", - "attestationType", - "aaguid", - "credentialId", - "model", - "credential", - "authenticatorId", - "authenticatorName", - "createdAt", - "updatedAt" - ] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "AuthenticatorAttestationResponse": { + "DeleteApiKeysResult": { "type": "object", "properties": { - "clientDataJson": { - "type": "string" - }, - "attestationObject": { - "type": "string" - }, - "transports": { + "apiKeyIds": { "type": "array", "items": { - "$ref": "#/definitions/AuthenticatorTransport" - } - }, - "authenticatorAttachment": { - "type": "string", - "enum": ["cross-platform", "platform"], - "x-nullable": true + "type": "string" + }, + "description": "A list of API Key IDs." } }, - "required": ["clientDataJson", "attestationObject"] + "required": ["apiKeyIds"] }, - "AuthenticatorParams": { + "DeleteAuthenticatorsIntent": { "type": "object", "properties": { - "authenticatorName": { - "type": "string", - "description": "Human-readable name for an Authenticator." - }, "userId": { "type": "string", "description": "Unique identifier for a given User." }, - "attestation": { - "$ref": "#/definitions/PublicKeyCredentialWithAttestation" - }, - "challenge": { - "type": "string", - "description": "Challenge presented for authentication purposes." + "authenticatorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of Authenticator IDs." } }, - "required": ["authenticatorName", "userId", "attestation", "challenge"] + "required": ["userId", "authenticatorIds"] }, - "AuthenticatorParamsV2": { + "DeleteAuthenticatorsRequest": { "type": "object", "properties": { - "authenticatorName": { + "type": { "type": "string", - "description": "Human-readable name for an Authenticator." + "enum": ["ACTIVITY_TYPE_DELETE_AUTHENTICATORS"] }, - "challenge": { + "timestampMs": { "type": "string", - "description": "Challenge presented for authentication purposes." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "attestation": { - "$ref": "#/definitions/Attestation", - "description": "The attestation that proves custody of the authenticator and provides metadata about it." + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/DeleteAuthenticatorsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": ["authenticatorName", "challenge", "attestation"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "AuthenticatorTransport": { - "type": "string", - "enum": [ - "AUTHENTICATOR_TRANSPORT_BLE", - "AUTHENTICATOR_TRANSPORT_INTERNAL", - "AUTHENTICATOR_TRANSPORT_NFC", - "AUTHENTICATOR_TRANSPORT_USB", - "AUTHENTICATOR_TRANSPORT_HYBRID" - ] + "DeleteAuthenticatorsResult": { + "type": "object", + "properties": { + "authenticatorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique identifier for a given Authenticator." + } + }, + "required": ["authenticatorIds"] }, - "BootProof": { + "DeleteFiatOnRampCredentialIntent": { "type": "object", "properties": { - "ephemeralPublicKeyHex": { - "type": "string", - "description": "The hex encoded Ephemeral Public Key." - }, - "awsAttestationDocB64": { + "fiatOnrampCredentialId": { "type": "string", - "description": "The DER encoded COSE Sign1 struct Attestation doc." - }, - "qosManifestB64": { + "description": "The ID of the fiat on-ramp credential to delete" + } + }, + "required": ["fiatOnrampCredentialId"] + }, + "DeleteFiatOnRampCredentialRequest": { + "type": "object", + "properties": { + "type": { "type": "string", - "description": "The borsch serialized base64 encoded Manifest." + "enum": ["ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL"] }, - "qosManifestEnvelopeB64": { + "timestampMs": { "type": "string", - "description": "The borsch serialized base64 encoded Manifest Envelope." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "deploymentLabel": { + "organizationId": { "type": "string", - "description": "The label under which the enclave app was deployed." + "description": "Unique identifier for a given Organization." }, - "enclaveApp": { - "type": "string", - "description": "Name of the enclave app" + "parameters": { + "$ref": "#/definitions/DeleteFiatOnRampCredentialIntent" }, - "owner": { + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "DeleteFiatOnRampCredentialResult": { + "type": "object", + "properties": { + "fiatOnRampCredentialId": { "type": "string", - "description": "Owner of the app i.e. 'tkhq'" - }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "description": "Unique identifier of the Fiat On-Ramp credential that was deleted" } }, - "required": [ - "ephemeralPublicKeyHex", - "awsAttestationDocB64", - "qosManifestB64", - "qosManifestEnvelopeB64", - "deploymentLabel", - "enclaveApp", - "owner", - "createdAt" - ] + "required": ["fiatOnRampCredentialId"] }, - "BootProofResponse": { + "DeleteInvitationIntent": { "type": "object", "properties": { - "bootProof": { - "$ref": "#/definitions/BootProof" + "invitationId": { + "type": "string", + "description": "Unique identifier for a given Invitation object." } }, - "required": ["bootProof"] + "required": ["invitationId"] }, - "ClientSignature": { + "DeleteInvitationRequest": { "type": "object", "properties": { - "publicKey": { + "type": { "type": "string", - "description": "The public component of a cryptographic key pair used to create the signature." + "enum": ["ACTIVITY_TYPE_DELETE_INVITATION"] }, - "scheme": { - "$ref": "#/definitions/ClientSignatureScheme", - "description": "The signature scheme used to generate the client signature." + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "message": { + "organizationId": { "type": "string", - "description": "The message that was signed." + "description": "Unique identifier for a given Organization." }, - "signature": { + "parameters": { + "$ref": "#/definitions/DeleteInvitationIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "DeleteInvitationResult": { + "type": "object", + "properties": { + "invitationId": { "type": "string", - "description": "The cryptographic signature over the message." + "description": "Unique identifier for a given Invitation." } }, - "required": ["publicKey", "scheme", "message", "signature"] + "required": ["invitationId"] }, - "ClientSignatureScheme": { - "type": "string", - "enum": ["CLIENT_SIGNATURE_SCHEME_API_P256"] + "DeleteOauth2CredentialIntent": { + "type": "object", + "properties": { + "oauth2CredentialId": { + "type": "string", + "description": "The ID of the OAuth 2.0 credential to delete" + } + }, + "required": ["oauth2CredentialId"] }, - "Config": { + "DeleteOauth2CredentialRequest": { "type": "object", "properties": { - "features": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Feature" - } + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL"] }, - "quorum": { - "$ref": "#/definitions/external.data.v1.Quorum" + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/DeleteOauth2CredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } - } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateApiKeysIntent": { + "DeleteOauth2CredentialResult": { "type": "object", "properties": { - "apiKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ApiKeyParams" - }, - "description": "A list of API Keys." - }, - "userId": { + "oauth2CredentialId": { "type": "string", - "description": "Unique identifier for a given User." + "description": "Unique identifier of the OAuth 2.0 credential that was deleted" } }, - "required": ["apiKeys", "userId"] + "required": ["oauth2CredentialId"] }, - "CreateApiKeysIntentV2": { + "DeleteOauthProvidersIntent": { "type": "object", "properties": { - "apiKeys": { + "userId": { + "type": "string", + "description": "The ID of the User to remove an Oauth provider from" + }, + "providerIds": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/ApiKeyParamsV2" + "type": "string" }, - "description": "A list of API Keys." - }, - "userId": { - "type": "string", - "description": "Unique identifier for a given User." + "description": "Unique identifier for a given Provider." } }, - "required": ["apiKeys", "userId"] + "required": ["userId", "providerIds"] }, - "CreateApiKeysRequest": { + "DeleteOauthProvidersRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_API_KEYS_V2"] + "enum": ["ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS"] }, "timestampMs": { "type": "string", @@ -3873,7 +6998,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateApiKeysIntentV2" + "$ref": "#/definitions/DeleteOauthProvidersIntent" }, "generateAppProofs": { "type": "boolean", @@ -3882,88 +7007,79 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateApiKeysResult": { + "DeleteOauthProvidersResult": { "type": "object", "properties": { - "apiKeyIds": { + "providerIds": { "type": "array", "items": { "type": "string" }, - "description": "A list of API Key IDs." + "description": "A list of unique identifiers for Oauth Providers" } }, - "required": ["apiKeyIds"] + "required": ["providerIds"] }, - "CreateApiOnlyUsersIntent": { + "DeleteOrganizationIntent": { "type": "object", "properties": { - "apiOnlyUsers": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ApiOnlyUserParams" - }, - "description": "A list of API-only Users to create." + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." } }, - "required": ["apiOnlyUsers"] + "required": ["organizationId"] }, - "CreateApiOnlyUsersResult": { + "DeleteOrganizationResult": { "type": "object", "properties": { - "userIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of API-only User IDs." + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." } }, - "required": ["userIds"] + "required": ["organizationId"] }, - "CreateAuthenticatorsIntent": { + "DeletePaymentMethodIntent": { "type": "object", "properties": { - "authenticators": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/AuthenticatorParams" - }, - "description": "A list of Authenticators." - }, - "userId": { + "paymentMethodId": { "type": "string", - "description": "Unique identifier for a given User." + "x-nullable": true, + "description": "The payment method that the customer wants to remove." } }, - "required": ["authenticators", "userId"] + "required": ["paymentMethodId"] }, - "CreateAuthenticatorsIntentV2": { + "DeletePaymentMethodResult": { "type": "object", "properties": { - "authenticators": { + "paymentMethodId": { + "type": "string", + "description": "The payment method that was removed." + } + }, + "required": ["paymentMethodId"] + }, + "DeletePoliciesIntent": { + "type": "object", + "properties": { + "policyIds": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/AuthenticatorParamsV2" + "type": "string" }, - "description": "A list of Authenticators." - }, - "userId": { - "type": "string", - "description": "Unique identifier for a given User." + "description": "List of unique identifiers for policies within an organization" } }, - "required": ["authenticators", "userId"] + "required": ["policyIds"] }, - "CreateAuthenticatorsRequest": { + "DeletePoliciesRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2"] + "enum": ["ACTIVITY_TYPE_DELETE_POLICIES"] }, "timestampMs": { "type": "string", @@ -3974,7 +7090,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateAuthenticatorsIntentV2" + "$ref": "#/definitions/DeletePoliciesIntent" }, "generateAppProofs": { "type": "boolean", @@ -3983,61 +7099,35 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateAuthenticatorsResult": { + "DeletePoliciesResult": { "type": "object", "properties": { - "authenticatorIds": { + "policyIds": { "type": "array", "items": { "type": "string" }, - "description": "A list of Authenticator IDs." + "description": "A list of unique identifiers for the deleted policies." } }, - "required": ["authenticatorIds"] + "required": ["policyIds"] }, - "CreateFiatOnRampCredentialIntent": { + "DeletePolicyIntent": { "type": "object", "properties": { - "onrampProvider": { - "$ref": "#/definitions/FiatOnRampProvider", - "description": "The fiat on-ramp provider" - }, - "projectId": { - "type": "string", - "x-nullable": true, - "description": "Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier" - }, - "publishableApiKey": { - "type": "string", - "description": "Publishable API key for the on-ramp provider" - }, - "encryptedSecretApiKey": { - "type": "string", - "description": "Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key" - }, - "encryptedPrivateApiKey": { + "policyId": { "type": "string", - "x-nullable": true, - "description": "Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key." - }, - "sandboxMode": { - "type": "boolean", - "description": "If the on-ramp credential is a sandbox credential" + "description": "Unique identifier for a given Policy." } }, - "required": [ - "onrampProvider", - "publishableApiKey", - "encryptedSecretApiKey" - ] + "required": ["policyId"] }, - "CreateFiatOnRampCredentialRequest": { + "DeletePolicyRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL"] + "enum": ["ACTIVITY_TYPE_DELETE_POLICY"] }, "timestampMs": { "type": "string", @@ -4048,7 +7138,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateFiatOnRampCredentialIntent" + "$ref": "#/definitions/DeletePolicyIntent" }, "generateAppProofs": { "type": "boolean", @@ -4057,36 +7147,35 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateFiatOnRampCredentialResult": { + "DeletePolicyResult": { "type": "object", "properties": { - "fiatOnRampCredentialId": { + "policyId": { "type": "string", - "description": "Unique identifier of the Fiat On-Ramp credential that was created" + "description": "Unique identifier for a given Policy." } }, - "required": ["fiatOnRampCredentialId"] + "required": ["policyId"] }, - "CreateInvitationsIntent": { + "DeletePrivateKeyTagsIntent": { "type": "object", "properties": { - "invitations": { + "privateKeyTagIds": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/InvitationParams" + "type": "string" }, - "description": "A list of Invitations." + "description": "A list of Private Key Tag IDs." } }, - "required": ["invitations"] + "required": ["privateKeyTagIds"] }, - "CreateInvitationsRequest": { + "DeletePrivateKeyTagsRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_INVITATIONS"] + "enum": ["ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS"] }, "timestampMs": { "type": "string", @@ -4097,7 +7186,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateInvitationsIntent" + "$ref": "#/definitions/DeletePrivateKeyTagsIntent" }, "generateAppProofs": { "type": "boolean", @@ -4106,96 +7195,50 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateInvitationsResult": { + "DeletePrivateKeyTagsResult": { "type": "object", "properties": { - "invitationIds": { + "privateKeyTagIds": { "type": "array", "items": { "type": "string" }, - "description": "A list of Invitation IDs" - } - }, - "required": ["invitationIds"] - }, - "CreateOauth2CredentialIntent": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/Oauth2Provider", - "description": "The OAuth 2.0 provider" - }, - "clientId": { - "type": "string", - "description": "The Client ID issued by the OAuth 2.0 provider" - }, - "encryptedClientSecret": { - "type": "string", - "description": "The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key" - } - }, - "required": ["provider", "clientId", "encryptedClientSecret"] - }, - "CreateOauth2CredentialRequest": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/CreateOauth2CredentialIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "CreateOauth2CredentialResult": { - "type": "object", - "properties": { - "oauth2CredentialId": { - "type": "string", - "description": "Unique identifier of the OAuth 2.0 credential that was created" + "description": "A list of Private Key Tag IDs." + }, + "privateKeyIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of Private Key IDs." } }, - "required": ["oauth2CredentialId"] + "required": ["privateKeyTagIds", "privateKeyIds"] }, - "CreateOauthProvidersIntent": { + "DeletePrivateKeysIntent": { "type": "object", "properties": { - "userId": { - "type": "string", - "description": "The ID of the User to add an Oauth provider to" - }, - "oauthProviders": { + "privateKeyIds": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/OauthProviderParams" + "type": "string" }, - "description": "A list of Oauth providers." + "description": "List of unique identifiers for private keys within an organization" + }, + "deleteWithoutExport": { + "type": "boolean", + "x-nullable": true, + "description": "Optional parameter for deleting the private keys, even if any have not been previously exported. If they have been exported, this field is ignored." } }, - "required": ["userId", "oauthProviders"] + "required": ["privateKeyIds"] }, - "CreateOauthProvidersRequest": { + "DeletePrivateKeysRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS"] + "enum": ["ACTIVITY_TYPE_DELETE_PRIVATE_KEYS"] }, "timestampMs": { "type": "string", @@ -4206,7 +7249,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateOauthProvidersIntent" + "$ref": "#/definitions/DeletePrivateKeysIntent" }, "generateAppProofs": { "type": "boolean", @@ -4215,95 +7258,80 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateOauthProvidersResult": { + "DeletePrivateKeysResult": { "type": "object", "properties": { - "providerIds": { + "privateKeyIds": { "type": "array", "items": { "type": "string" }, - "description": "A list of unique identifiers for Oauth Providers" + "description": "A list of private key unique identifiers that were removed" } }, - "required": ["providerIds"] + "required": ["privateKeyIds"] }, - "CreateOrganizationIntent": { + "DeleteSmartContractInterfaceIntent": { "type": "object", "properties": { - "organizationName": { - "type": "string", - "description": "Human-readable name for an Organization." - }, - "rootEmail": { - "type": "string", - "description": "The root user's email address." - }, - "rootAuthenticator": { - "$ref": "#/definitions/AuthenticatorParams", - "description": "The root user's Authenticator." - }, - "rootUserId": { + "smartContractInterfaceId": { "type": "string", - "x-nullable": true, - "description": "Unique identifier for the root user object." + "description": "The ID of a Smart Contract Interface intended for deletion." } }, - "required": ["organizationName", "rootEmail", "rootAuthenticator"] + "required": ["smartContractInterfaceId"] }, - "CreateOrganizationIntentV2": { + "DeleteSmartContractInterfaceRequest": { "type": "object", "properties": { - "organizationName": { + "type": { "type": "string", - "description": "Human-readable name for an Organization." + "enum": ["ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE"] }, - "rootEmail": { + "timestampMs": { "type": "string", - "description": "The root user's email address." - }, - "rootAuthenticator": { - "$ref": "#/definitions/AuthenticatorParamsV2", - "description": "The root user's Authenticator." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "rootUserId": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "Unique identifier for the root user object." + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/DeleteSmartContractInterfaceIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": ["organizationName", "rootEmail", "rootAuthenticator"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateOrganizationResult": { + "DeleteSmartContractInterfaceResult": { "type": "object", "properties": { - "organizationId": { + "smartContractInterfaceId": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "The ID of the deleted Smart Contract Interface." } }, - "required": ["organizationId"] + "required": ["smartContractInterfaceId"] }, - "CreatePoliciesIntent": { + "DeleteSubOrganizationIntent": { "type": "object", "properties": { - "policies": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/CreatePolicyIntentV3" - }, - "description": "An array of policy intents to be created." + "deleteWithoutExport": { + "type": "boolean", + "x-nullable": true, + "description": "Sub-organization deletion, by default, requires associated wallets and private keys to be exported for security reasons. Set this boolean to true to force sub-organization deletion even if some wallets or private keys within it have not been exported yet. Default: false." } - }, - "required": ["policies"] + } }, - "CreatePoliciesRequest": { + "DeleteSubOrganizationRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_POLICIES"] + "enum": ["ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION"] }, "timestampMs": { "type": "string", @@ -4314,7 +7342,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreatePoliciesIntent" + "$ref": "#/definitions/DeleteSubOrganizationIntent" }, "generateAppProofs": { "type": "boolean", @@ -4323,103 +7351,32 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreatePoliciesResult": { - "type": "object", - "properties": { - "policyIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of unique identifiers for the created policies." - } - }, - "required": ["policyIds"] - }, - "CreatePolicyIntent": { - "type": "object", - "properties": { - "policyName": { - "type": "string", - "description": "Human-readable name for a Policy." - }, - "selectors": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Selector" - }, - "description": "A list of simple functions each including a subject, target and boolean. See Policy Engine Language section for additional details." - }, - "effect": { - "$ref": "#/definitions/Effect", - "description": "The instruction to DENY or ALLOW a particular activity following policy selector(s)." - }, - "notes": { - "type": "string" - } - }, - "required": ["policyName", "selectors", "effect"] - }, - "CreatePolicyIntentV2": { + "DeleteSubOrganizationResult": { "type": "object", "properties": { - "policyName": { + "subOrganizationUuid": { "type": "string", - "description": "Human-readable name for a Policy." - }, - "selectors": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/SelectorV2" - }, - "description": "A list of simple functions each including a subject, target and boolean. See Policy Engine Language section for additional details." - }, - "effect": { - "$ref": "#/definitions/Effect", - "description": "Whether to ALLOW or DENY requests that match the condition and consensus requirements." - }, - "notes": { - "type": "string" + "description": "Unique identifier of the sub organization that was removed" } }, - "required": ["policyName", "selectors", "effect"] + "required": ["subOrganizationUuid"] }, - "CreatePolicyIntentV3": { + "DeleteTvcAppAndDeploymentsIntent": { "type": "object", "properties": { - "policyName": { - "type": "string", - "description": "Human-readable name for a Policy." - }, - "effect": { - "$ref": "#/definitions/Effect", - "description": "The instruction to DENY or ALLOW an activity." - }, - "condition": { - "type": "string", - "x-nullable": true, - "description": "The condition expression that triggers the Effect" - }, - "consensus": { - "type": "string", - "x-nullable": true, - "description": "The consensus expression that triggers the Effect" - }, - "notes": { + "appId": { "type": "string", - "description": "Notes for a Policy." + "description": "The unique identifier of the TVC app to delete. The app and all associated deployments will be removed." } }, - "required": ["policyName", "effect", "notes"] + "required": ["appId"] }, - "CreatePolicyRequest": { + "DeleteTvcAppAndDeploymentsRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_POLICY_V3"] + "enum": ["ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS"] }, "timestampMs": { "type": "string", @@ -4430,7 +7387,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreatePolicyIntentV3" + "$ref": "#/definitions/DeleteTvcAppAndDeploymentsIntent" }, "generateAppProofs": { "type": "boolean", @@ -4439,39 +7396,32 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreatePolicyResult": { + "DeleteTvcAppAndDeploymentsResult": { "type": "object", "properties": { - "policyId": { + "appId": { "type": "string", - "description": "Unique identifier for a given Policy." + "description": "The unique identifier of the deleted TVC app." } }, - "required": ["policyId"] + "required": ["appId"] }, - "CreatePrivateKeyTagIntent": { + "DeleteTvcDeploymentIntent": { "type": "object", "properties": { - "privateKeyTagName": { + "deploymentId": { "type": "string", - "description": "Human-readable name for a Private Key Tag." - }, - "privateKeyIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of Private Key IDs." + "description": "The unique identifier of the TVC deployment to delete." } }, - "required": ["privateKeyTagName", "privateKeyIds"] + "required": ["deploymentId"] }, - "CreatePrivateKeyTagRequest": { + "DeleteTvcDeploymentRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG"] + "enum": ["ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT"] }, "timestampMs": { "type": "string", @@ -4482,7 +7432,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreatePrivateKeyTagIntent" + "$ref": "#/definitions/DeleteTvcDeploymentIntent" }, "generateAppProofs": { "type": "boolean", @@ -4491,57 +7441,35 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreatePrivateKeyTagResult": { + "DeleteTvcDeploymentResult": { "type": "object", "properties": { - "privateKeyTagId": { + "deploymentId": { "type": "string", - "description": "Unique identifier for a given Private Key Tag." - }, - "privateKeyIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of Private Key IDs." - } - }, - "required": ["privateKeyTagId", "privateKeyIds"] - }, - "CreatePrivateKeysIntent": { - "type": "object", - "properties": { - "privateKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/PrivateKeyParams" - }, - "description": "A list of Private Keys." + "description": "The unique identifier of the deleted TVC deployment." } }, - "required": ["privateKeys"] + "required": ["deploymentId"] }, - "CreatePrivateKeysIntentV2": { + "DeleteUserTagsIntent": { "type": "object", "properties": { - "privateKeys": { + "userTagIds": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/PrivateKeyParams" + "type": "string" }, - "description": "A list of Private Keys." + "description": "A list of User Tag IDs." } }, - "required": ["privateKeys"] + "required": ["userTagIds"] }, - "CreatePrivateKeysRequest": { + "DeleteUserTagsRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2"] + "enum": ["ACTIVITY_TYPE_DELETE_USER_TAGS"] }, "timestampMs": { "type": "string", @@ -4552,7 +7480,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreatePrivateKeysIntentV2" + "$ref": "#/definitions/DeleteUserTagsIntent" }, "generateAppProofs": { "type": "boolean", @@ -4561,42 +7489,45 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreatePrivateKeysResult": { + "DeleteUserTagsResult": { "type": "object", "properties": { - "privateKeyIds": { + "userTagIds": { "type": "array", "items": { "type": "string" }, - "description": "A list of Private Key IDs." + "description": "A list of User Tag IDs." + }, + "userIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of User IDs." } }, - "required": ["privateKeyIds"] + "required": ["userTagIds", "userIds"] }, - "CreatePrivateKeysResultV2": { + "DeleteUsersIntent": { "type": "object", "properties": { - "privateKeys": { + "userIds": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/PrivateKeyResult" + "type": "string" }, - "description": "A list of Private Key IDs and addresses." + "description": "A list of User IDs." } }, - "required": ["privateKeys"] - }, - "CreateReadOnlySessionIntent": { - "type": "object" + "required": ["userIds"] }, - "CreateReadOnlySessionRequest": { + "DeleteUsersRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION"] + "enum": ["ACTIVITY_TYPE_DELETE_USERS"] }, "timestampMs": { "type": "string", @@ -4607,7 +7538,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateReadOnlySessionIntent" + "$ref": "#/definitions/DeleteUsersIntent" }, "generateAppProofs": { "type": "boolean", @@ -4616,104 +7547,43 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateReadOnlySessionResult": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons." - }, - "organizationName": { - "type": "string", - "description": "Human-readable name for an Organization." - }, - "userId": { - "type": "string", - "description": "Unique identifier for a given User." - }, - "username": { - "type": "string", - "description": "Human-readable name for a User." - }, - "session": { - "type": "string", - "description": "String representing a read only session" - }, - "sessionExpiry": { - "type": "string", - "format": "uint64", - "description": "UTC timestamp in seconds representing the expiry time for the read only session." - } - }, - "required": [ - "organizationId", - "organizationName", - "userId", - "username", - "session", - "sessionExpiry" - ] - }, - "CreateReadWriteSessionIntent": { + "DeleteUsersResult": { "type": "object", "properties": { - "targetPublicKey": { - "type": "string", - "description": "Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted." - }, - "email": { - "type": "string", - "description": "Email of the user to create a read write session for" - }, - "apiKeyName": { - "type": "string", - "x-nullable": true, - "description": "Optional human-readable name for an API Key. If none provided, default to Read Write Session - \u003cTimestamp\u003e" - }, - "expirationSeconds": { - "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." + "userIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of User IDs." } }, - "required": ["targetPublicKey", "email"] + "required": ["userIds"] }, - "CreateReadWriteSessionIntentV2": { + "DeleteWalletAccountsIntent": { "type": "object", "properties": { - "targetPublicKey": { - "type": "string", - "description": "Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted." - }, - "userId": { - "type": "string", - "x-nullable": true, - "description": "Unique identifier for a given User." - }, - "apiKeyName": { - "type": "string", - "x-nullable": true, - "description": "Optional human-readable name for an API Key. If none provided, default to Read Write Session - \u003cTimestamp\u003e" - }, - "expirationSeconds": { - "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." + "walletAccountIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of unique identifiers for wallet accounts within an organization" }, - "invalidateExisting": { + "deleteWithoutExport": { "type": "boolean", "x-nullable": true, - "description": "Invalidate all other previously generated ReadWriteSession API keys" + "description": "Optional parameter for deleting the wallet accounts, even if any have not been previously exported. If they have been exported, this field is ignored." } }, - "required": ["targetPublicKey"] + "required": ["walletAccountIds"] }, - "CreateReadWriteSessionRequest": { + "DeleteWalletAccountsRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2"] + "enum": ["ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS"] }, "timestampMs": { "type": "string", @@ -4724,7 +7594,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateReadWriteSessionIntentV2" + "$ref": "#/definitions/DeleteWalletAccountsIntent" }, "generateAppProofs": { "type": "boolean", @@ -4733,116 +7603,43 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateReadWriteSessionResult": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons." - }, - "organizationName": { - "type": "string", - "description": "Human-readable name for an Organization." - }, - "userId": { - "type": "string", - "description": "Unique identifier for a given User." - }, - "username": { - "type": "string", - "description": "Human-readable name for a User." - }, - "apiKeyId": { - "type": "string", - "description": "Unique identifier for the created API key." - }, - "credentialBundle": { - "type": "string", - "description": "HPKE encrypted credential bundle" - } - }, - "required": [ - "organizationId", - "organizationName", - "userId", - "username", - "apiKeyId", - "credentialBundle" - ] - }, - "CreateReadWriteSessionResultV2": { + "DeleteWalletAccountsResult": { "type": "object", "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons." - }, - "organizationName": { - "type": "string", - "description": "Human-readable name for an Organization." - }, - "userId": { - "type": "string", - "description": "Unique identifier for a given User." - }, - "username": { - "type": "string", - "description": "Human-readable name for a User." - }, - "apiKeyId": { - "type": "string", - "description": "Unique identifier for the created API key." - }, - "credentialBundle": { - "type": "string", - "description": "HPKE encrypted credential bundle" + "walletAccountIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of wallet account unique identifiers that were removed" } }, - "required": [ - "organizationId", - "organizationName", - "userId", - "username", - "apiKeyId", - "credentialBundle" - ] + "required": ["walletAccountIds"] }, - "CreateSmartContractInterfaceIntent": { + "DeleteWalletsIntent": { "type": "object", "properties": { - "smartContractAddress": { - "type": "string", - "description": "Corresponding contract address or program ID" - }, - "smartContractInterface": { - "type": "string", - "description": "ABI/IDL as a JSON string. Limited to 400kb" - }, - "type": { - "$ref": "#/definitions/SmartContractInterfaceType" - }, - "label": { - "type": "string", - "description": "Human-readable name for a Smart Contract Interface." + "walletIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of unique identifiers for wallets within an organization" }, - "notes": { - "type": "string", - "description": "Notes for a Smart Contract Interface." + "deleteWithoutExport": { + "type": "boolean", + "x-nullable": true, + "description": "Optional parameter for deleting the wallets, even if any have not been previously exported. If they have been exported, this field is ignored." } }, - "required": [ - "smartContractAddress", - "smartContractInterface", - "type", - "label" - ] + "required": ["walletIds"] }, - "CreateSmartContractInterfaceRequest": { + "DeleteWalletsRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE"] + "enum": ["ACTIVITY_TYPE_DELETE_WALLETS"] }, "timestampMs": { "type": "string", @@ -4853,7 +7650,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateSmartContractInterfaceIntent" + "$ref": "#/definitions/DeleteWalletsIntent" }, "generateAppProofs": { "type": "boolean", @@ -4862,267 +7659,305 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateSmartContractInterfaceResult": { + "DeleteWalletsResult": { "type": "object", "properties": { - "smartContractInterfaceId": { - "type": "string", - "description": "The ID of the created Smart Contract Interface." + "walletIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of wallet unique identifiers that were removed" } }, - "required": ["smartContractInterfaceId"] + "required": ["walletIds"] }, - "CreateSubOrganizationIntent": { + "DeleteWebhookEndpointIntent": { "type": "object", "properties": { - "name": { + "endpointId": { "type": "string", - "description": "Name for this sub-organization" - }, - "rootAuthenticator": { - "$ref": "#/definitions/AuthenticatorParamsV2", - "description": "Root User authenticator for this new sub-organization" + "description": "Unique identifier of the webhook endpoint to delete." } }, - "required": ["name", "rootAuthenticator"] + "required": ["endpointId"] }, - "CreateSubOrganizationIntentV2": { + "DeleteWebhookEndpointRequest": { "type": "object", "properties": { - "subOrganizationName": { + "type": { "type": "string", - "description": "Name for this sub-organization" + "enum": ["ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT"] }, - "rootUsers": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/RootUserParams" - }, - "description": "Root users to create within this sub-organization" + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "rootQuorumThreshold": { - "type": "integer", - "format": "int32", - "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/DeleteWebhookEndpointIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateSubOrganizationIntentV3": { + "DeleteWebhookEndpointResult": { "type": "object", "properties": { - "subOrganizationName": { + "endpointId": { "type": "string", - "description": "Name for this sub-organization" + "description": "Unique identifier of the deleted webhook endpoint." + } + }, + "required": ["endpointId"] + }, + "DeploymentStatus": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Unique identifier for this deployment (corresponds to k8s deployment label)" }, - "rootUsers": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/RootUserParams" - }, - "description": "Root users to create within this sub-organization" + "readyReplicas": { + "type": "integer", + "format": "int32", + "description": "Number of ready replicas" }, - "rootQuorumThreshold": { + "desiredReplicas": { "type": "integer", "format": "int32", - "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + "description": "Desired number of replicas" }, - "privateKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/PrivateKeyParams" - }, - "description": "A list of Private Keys." + "lastUpdatedTime": { + "$ref": "#/definitions/external.data.v1.Timestamp", + "description": "Last time this deployment was updated" } }, "required": [ - "subOrganizationName", - "rootUsers", - "rootQuorumThreshold", - "privateKeys" + "deploymentId", + "readyReplicas", + "desiredReplicas", + "lastUpdatedTime" ] }, - "CreateSubOrganizationIntentV4": { + "DisableAuthProxyIntent": { + "type": "object" + }, + "DisableAuthProxyResult": { + "type": "object" + }, + "DisablePrivateKeyIntent": { "type": "object", "properties": { - "subOrganizationName": { + "privateKeyId": { "type": "string", - "description": "Name for this sub-organization" - }, - "rootUsers": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/RootUserParams" - }, - "description": "Root users to create within this sub-organization" + "description": "Unique identifier for a given Private Key." + } + }, + "required": ["privateKeyId"] + }, + "DisablePrivateKeyResult": { + "type": "object", + "properties": { + "privateKeyId": { + "type": "string", + "description": "Unique identifier for a given Private Key." + } + }, + "required": ["privateKeyId"] + }, + "Effect": { + "type": "string", + "enum": ["EFFECT_ALLOW", "EFFECT_DENY"] + }, + "EmailAuthCustomizationParams": { + "type": "object", + "properties": { + "appName": { + "type": "string", + "description": "The name of the application. This field is required and will be used in email notifications if an email template is not provided." }, - "rootQuorumThreshold": { - "type": "integer", - "format": "int32", - "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + "logoUrl": { + "type": "string", + "x-nullable": true, + "description": "A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px." }, - "wallet": { - "$ref": "#/definitions/WalletParams", + "magicLinkTemplate": { + "type": "string", "x-nullable": true, - "description": "The wallet to create for the sub-organization" + "description": "A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`." }, - "disableEmailRecovery": { - "type": "boolean", + "templateVariables": { + "type": "string", "x-nullable": true, - "description": "Disable email recovery for the sub-organization" + "description": "JSON object containing key/value pairs to be used with custom templates." }, - "disableEmailAuth": { - "type": "boolean", + "templateId": { + "type": "string", "x-nullable": true, - "description": "Disable email auth for the sub-organization" + "description": "Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template." } }, - "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + "required": ["appName"] }, - "CreateSubOrganizationIntentV5": { + "EmailAuthIntent": { "type": "object", "properties": { - "subOrganizationName": { + "email": { "type": "string", - "description": "Name for this sub-organization" + "description": "Email of the authenticating user." }, - "rootUsers": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/RootUserParamsV2" - }, - "description": "Root users to create within this sub-organization" + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted." }, - "rootQuorumThreshold": { - "type": "integer", - "format": "int32", - "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + "apiKeyName": { + "type": "string", + "x-nullable": true, + "description": "Optional human-readable name for an API Key. If none provided, default to Email Auth - \u003cTimestamp\u003e" }, - "wallet": { - "$ref": "#/definitions/WalletParams", + "expirationSeconds": { + "type": "string", "x-nullable": true, - "description": "The wallet to create for the sub-organization" + "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." }, - "disableEmailRecovery": { - "type": "boolean", + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParams", "x-nullable": true, - "description": "Disable email recovery for the sub-organization" + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." }, - "disableEmailAuth": { + "invalidateExisting": { "type": "boolean", "x-nullable": true, - "description": "Disable email auth for the sub-organization" + "description": "Invalidate all other previously generated Email Auth API keys" + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the email" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, - "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + "required": ["email", "targetPublicKey"] }, - "CreateSubOrganizationIntentV6": { + "EmailAuthIntentV2": { "type": "object", "properties": { - "subOrganizationName": { + "email": { "type": "string", - "description": "Name for this sub-organization" + "description": "Email of the authenticating user." }, - "rootUsers": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/RootUserParamsV3" - }, - "description": "Root users to create within this sub-organization" + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted." }, - "rootQuorumThreshold": { - "type": "integer", - "format": "int32", - "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + "apiKeyName": { + "type": "string", + "x-nullable": true, + "description": "Optional human-readable name for an API Key. If none provided, default to Email Auth - \u003cTimestamp\u003e" + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." }, - "wallet": { - "$ref": "#/definitions/WalletParams", + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParams", "x-nullable": true, - "description": "The wallet to create for the sub-organization" + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." }, - "disableEmailRecovery": { + "invalidateExisting": { "type": "boolean", "x-nullable": true, - "description": "Disable email recovery for the sub-organization" + "description": "Invalidate all other previously generated Email Auth API keys" }, - "disableEmailAuth": { - "type": "boolean", + "sendFromEmailAddress": { + "type": "string", "x-nullable": true, - "description": "Disable email auth for the sub-organization" + "description": "Optional custom email address from which to send the email" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, - "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + "required": ["email", "targetPublicKey"] }, - "CreateSubOrganizationIntentV7": { + "EmailAuthIntentV3": { "type": "object", "properties": { - "subOrganizationName": { + "email": { "type": "string", - "description": "Name for this sub-organization" - }, - "rootUsers": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/RootUserParamsV4" - }, - "description": "Root users to create within this sub-organization" + "description": "Email of the authenticating user." }, - "rootQuorumThreshold": { - "type": "integer", - "format": "int32", - "description": "The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users" + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted." }, - "wallet": { - "$ref": "#/definitions/WalletParams", + "apiKeyName": { + "type": "string", "x-nullable": true, - "description": "The wallet to create for the sub-organization" + "description": "Optional human-readable name for an API Key. If none provided, default to Email Auth - \u003cTimestamp\u003e" }, - "disableEmailRecovery": { - "type": "boolean", + "expirationSeconds": { + "type": "string", "x-nullable": true, - "description": "Disable email recovery for the sub-organization" + "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." }, - "disableEmailAuth": { - "type": "boolean", - "x-nullable": true, - "description": "Disable email auth for the sub-organization" + "emailCustomization": { + "$ref": "#/definitions/EmailAuthCustomizationParams", + "description": "Parameters for customizing emails. If not provided, the default email will be used. Note that app_name is required." }, - "disableSmsAuth": { + "invalidateExisting": { "type": "boolean", "x-nullable": true, - "description": "Disable OTP SMS auth for the sub-organization" + "description": "Invalidate all other previously generated Email Auth API keys" }, - "disableOtpEmailAuth": { - "type": "boolean", + "sendFromEmailAddress": { + "type": "string", "x-nullable": true, - "description": "Disable OTP email auth for the sub-organization" + "description": "Optional custom email address from which to send the email" }, - "verificationToken": { + "sendFromEmailSenderName": { "type": "string", "x-nullable": true, - "description": "Signed JWT containing a unique id, expiry, verification type, contact" + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" }, - "clientSignature": { - "$ref": "#/definitions/ClientSignature", + "replyToEmailAddress": { + "type": "string", "x-nullable": true, - "description": "Optional signature proving authorization for this sub-organization creation. The signature is over the verification token ID and the root user parameters for the root user associated with the verification token. Only required if a public key was provided during the verification step." + "description": "Optional custom email address to use as reply-to" } }, - "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] + "required": ["email", "targetPublicKey", "emailCustomization"] }, - "CreateSubOrganizationRequest": { + "EmailAuthRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7"] + "enum": ["ACTIVITY_TYPE_EMAIL_AUTH_V3"] }, "timestampMs": { "type": "string", @@ -5133,7 +7968,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateSubOrganizationIntentV7" + "$ref": "#/definitions/EmailAuthIntentV3" }, "generateAppProofs": { "type": "boolean", @@ -5142,332 +7977,380 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateSubOrganizationResult": { + "EmailAuthResult": { "type": "object", "properties": { - "subOrganizationId": { - "type": "string" + "userId": { + "type": "string", + "description": "Unique identifier for the authenticating User." }, - "rootUserIds": { - "type": "array", - "items": { - "type": "string" - } + "apiKeyId": { + "type": "string", + "description": "Unique identifier for the created API key." } }, - "required": ["subOrganizationId"] + "required": ["userId", "apiKeyId"] }, - "CreateSubOrganizationResultV3": { + "EmailCustomizationParams": { "type": "object", "properties": { - "subOrganizationId": { - "type": "string" + "appName": { + "type": "string", + "x-nullable": true, + "description": "The name of the application." }, - "privateKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/PrivateKeyResult" - }, - "description": "A list of Private Key IDs and addresses." + "logoUrl": { + "type": "string", + "x-nullable": true, + "description": "A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px." }, - "rootUserIds": { - "type": "array", - "items": { - "type": "string" - } + "magicLinkTemplate": { + "type": "string", + "x-nullable": true, + "description": "A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`." + }, + "templateVariables": { + "type": "string", + "x-nullable": true, + "description": "JSON object containing key/value pairs to be used with custom templates." + }, + "templateId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template." } - }, - "required": ["subOrganizationId", "privateKeys"] + } }, - "CreateSubOrganizationResultV4": { + "EmailCustomizationParamsV2": { "type": "object", "properties": { - "subOrganizationId": { - "type": "string" + "logoUrl": { + "type": "string", + "x-nullable": true, + "description": "A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px." }, - "wallet": { - "$ref": "#/definitions/WalletResult", - "x-nullable": true + "magicLinkTemplate": { + "type": "string", + "x-nullable": true, + "description": "A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`." }, - "rootUserIds": { - "type": "array", - "items": { - "type": "string" - } + "templateVariables": { + "type": "string", + "x-nullable": true, + "description": "JSON object containing key/value pairs to be used with custom templates." + }, + "templateId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template." } - }, - "required": ["subOrganizationId"] + } }, - "CreateSubOrganizationResultV5": { + "EnableAuthProxyIntent": { + "type": "object" + }, + "EnableAuthProxyResult": { "type": "object", "properties": { - "subOrganizationId": { - "type": "string" - }, - "wallet": { - "$ref": "#/definitions/WalletResult", - "x-nullable": true - }, - "rootUserIds": { - "type": "array", - "items": { - "type": "string" - } + "userId": { + "type": "string", + "description": "A User ID with permission to initiate authentication." } }, - "required": ["subOrganizationId"] + "required": ["userId"] }, - "CreateSubOrganizationResultV6": { + "EthFailureDetails": { "type": "object", "properties": { - "subOrganizationId": { - "type": "string" - }, - "wallet": { - "$ref": "#/definitions/WalletResult", - "x-nullable": true - }, - "rootUserIds": { + "revertChain": { "type": "array", "items": { - "type": "string" - } + "type": "object", + "$ref": "#/definitions/RevertChainEntry" + }, + "description": "Ethereum revert chain, ordered from outermost to innermost." } - }, - "required": ["subOrganizationId"] + } }, - "CreateSubOrganizationResultV7": { + "EthSendRawTransactionIntent": { "type": "object", "properties": { - "subOrganizationId": { - "type": "string" - }, - "wallet": { - "$ref": "#/definitions/WalletResult", - "x-nullable": true + "signedTransaction": { + "type": "string", + "description": "The raw, signed transaction to be sent." }, - "rootUserIds": { - "type": "array", - "items": { - "type": "string" - } + "caip2": { + "type": "string", + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532", + "eip155:137", + "eip155:80002" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." + } + }, + "required": ["signedTransaction", "caip2"] + }, + "EthSendRawTransactionResult": { + "type": "object", + "properties": { + "transactionHash": { + "type": "string", + "description": "The transaction hash of the sent transaction" } }, - "required": ["subOrganizationId"] + "required": ["transactionHash"] }, - "CreateTvcAppIntent": { + "EthSendTransactionIntent": { "type": "object", "properties": { - "name": { + "from": { "type": "string", - "description": "The name of the new TVC application" + "description": "A wallet or private key address to sign with. This does not support private key IDs." }, - "quorumPublicKey": { + "sponsor": { + "type": "boolean", + "x-nullable": true, + "description": "Whether to sponsor this transaction via Gas Station." + }, + "caip2": { "type": "string", - "description": "Quorum public key to use for this application" + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532", + "eip155:137", + "eip155:80002" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." }, - "manifestSetId": { + "to": { + "type": "string", + "description": "Recipient address as a hex string with 0x prefix." + }, + "value": { "type": "string", "x-nullable": true, - "description": "Unique identifier for an existing TVC operator set to use as the Manifest Set for this TVC application. If left empty, a new Manifest Set configuration is required" + "description": "Amount of native asset to send in wei." }, - "manifestSetParams": { - "$ref": "#/definitions/TvcOperatorSetParams", + "data": { + "type": "string", "x-nullable": true, - "description": "Configuration to create a new TVC operator set, used as the Manifest Set for this TVC application. If left empty, a Manifest Set ID is required" + "description": "Hex-encoded call data for contract interactions." }, - "shareSetId": { + "nonce": { "type": "string", "x-nullable": true, - "description": "Unique identifier for an existing TVC operator set to use as the Share Set for this TVC application. If left empty, a new Share Set configuration is required" + "description": "Transaction nonce, for EIP-1559 and Turnkey Gas Station authorizations." }, - "shareSetParams": { - "$ref": "#/definitions/TvcOperatorSetParams", + "gasLimit": { + "type": "string", "x-nullable": true, - "description": "Configuration to create a new TVC operator set, used as the Share Set for this TVC application. If left empty, a Share Set ID is required" + "description": "Maximum amount of gas to use for this transaction, for EIP-1559 transactions." }, - "externalConnectivity": { - "type": "boolean", + "maxFeePerGas": { + "type": "string", + "x-nullable": true, + "description": "Maximum total fee per gas unit (base fee + priority fee) in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions." + }, + "maxPriorityFeePerGas": { + "type": "string", + "x-nullable": true, + "description": "Maximum priority fee (tip) per gas unit in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions." + }, + "deadline": { + "type": "string", + "x-nullable": true, + "description": "Unix timestamp in seconds for EIP-712 execution deadline. Only used when sponsor=true." + }, + "gasStationNonce": { + "type": "string", "x-nullable": true, - "description": "Enables external connectivity for this TVC app. Default if not provided: false." + "description": "The gas station delegate contract nonce. Only used when sponsor=true. Include this if you want maximal security posture." } }, - "required": ["name", "quorumPublicKey"] + "required": ["from", "caip2", "to"] }, - "CreateTvcAppResult": { + "EthSendTransactionRequest": { "type": "object", "properties": { - "appId": { + "type": { "type": "string", - "description": "The unique identifier for the TVC application" + "enum": ["ACTIVITY_TYPE_ETH_SEND_TRANSACTION"] }, - "manifestSetId": { + "timestampMs": { "type": "string", - "description": "The unique identifier for the TVC manifest set" + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "manifestSetOperatorIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The unique identifier(s) of the manifest set operators" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "manifestSetThreshold": { - "type": "integer", - "format": "int64", - "description": "The required number of approvals for the manifest set" + "parameters": { + "$ref": "#/definitions/EthSendTransactionIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": [ - "appId", - "manifestSetId", - "manifestSetOperatorIds", - "manifestSetThreshold" - ] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateTvcDeploymentIntent": { + "EthSendTransactionResult": { "type": "object", "properties": { - "appId": { + "sendTransactionStatusId": { "type": "string", - "description": "The unique identifier of the to-be-deployed TVC application" - }, - "qosVersion": { + "description": "The send_transaction_status ID associated with the transaction submission" + } + }, + "required": ["sendTransactionStatusId"] + }, + "EthSendTransactionStatus": { + "type": "object", + "properties": { + "txHash": { "type": "string", - "description": "The QuorumOS version to use to deploy this application" - }, - "pivotContainerImageUrl": { + "x-nullable": true, + "description": "The Ethereum transaction hash, if available." + } + } + }, + "ExportPrivateKeyIntent": { + "type": "object", + "properties": { + "privateKeyId": { "type": "string", - "description": "URL of the container containing the pivot binary" + "description": "Unique identifier for a given Private Key." }, - "pivotPath": { + "targetPublicKey": { "type": "string", - "description": "Location of the binary in the pivot container" - }, - "pivotArgs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"]" - }, - "expectedPivotDigest": { + "description": "Client-side public key generated by the user, to which the export bundle will be encrypted." + } + }, + "required": ["privateKeyId", "targetPublicKey"] + }, + "ExportPrivateKeyRequest": { + "type": "object", + "properties": { + "type": { "type": "string", - "description": "Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity." + "enum": ["ACTIVITY_TYPE_EXPORT_PRIVATE_KEY"] }, - "hostContainerImageUrl": { + "timestampMs": { "type": "string", - "description": "URL of the container containing the host binary" + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "hostPath": { + "organizationId": { "type": "string", - "description": "Location of the binary inside the host container" - }, - "hostArgs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Arguments to pass to the host binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"]" - }, - "nonce": { - "type": "integer", - "format": "int64", - "x-nullable": true, - "description": "Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds." + "description": "Unique identifier for a given Organization." }, - "pivotContainerEncryptedPullSecret": { - "type": "string", - "x-nullable": true, - "description": "Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty." + "parameters": { + "$ref": "#/definitions/ExportPrivateKeyIntent" }, - "hostContainerEncryptedPullSecret": { - "type": "string", - "x-nullable": true, - "description": "Optional encrypted pull secret to authorize Turnkey to pull the host container image. If your image is public, leave this empty." + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": [ - "appId", - "qosVersion", - "pivotContainerImageUrl", - "pivotPath", - "pivotArgs", - "expectedPivotDigest", - "hostContainerImageUrl", - "hostPath", - "hostArgs" - ] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateTvcDeploymentResult": { + "ExportPrivateKeyResult": { "type": "object", "properties": { - "deploymentId": { + "privateKeyId": { "type": "string", - "description": "The unique identifier for the TVC deployment" + "description": "Unique identifier for a given Private Key." }, - "manifestId": { + "exportBundle": { "type": "string", - "description": "The unique identifier for the TVC manifest" + "description": "Export bundle containing a private key encrypted to the client's target public key." } }, - "required": ["deploymentId", "manifestId"] + "required": ["privateKeyId", "exportBundle"] }, - "CreateTvcManifestApprovalsIntent": { + "ExportWalletAccountIntent": { "type": "object", "properties": { - "manifestId": { + "address": { "type": "string", - "description": "Unique identifier of the TVC deployment to approve" + "description": "Address to identify Wallet Account." }, - "approvals": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/TvcManifestApproval" - }, - "description": "List of manifest approvals" + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the export bundle will be encrypted." } }, - "required": ["manifestId", "approvals"] + "required": ["address", "targetPublicKey"] }, - "CreateTvcManifestApprovalsResult": { + "ExportWalletAccountRequest": { "type": "object", "properties": { - "approvalIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The unique identifier(s) for the manifest approvals" + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/ExportWalletAccountIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "ExportWalletAccountResult": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Address to identify Wallet Account." + }, + "exportBundle": { + "type": "string", + "description": "Export bundle containing a private key encrypted by the client's target public key." } }, - "required": ["approvalIds"] + "required": ["address", "exportBundle"] }, - "CreateUserTagIntent": { + "ExportWalletIntent": { "type": "object", "properties": { - "userTagName": { + "walletId": { "type": "string", - "description": "Human-readable name for a User Tag." + "description": "Unique identifier for a given Wallet." }, - "userIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of User IDs." + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the export bundle will be encrypted." + }, + "language": { + "$ref": "#/definitions/MnemonicLanguage", + "x-nullable": true, + "description": "The language of the mnemonic to export. Defaults to English." } }, - "required": ["userTagName", "userIds"] + "required": ["walletId", "targetPublicKey"] }, - "CreateUserTagRequest": { + "ExportWalletRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_USER_TAG"] + "enum": ["ACTIVITY_TYPE_EXPORT_WALLET"] }, "timestampMs": { "type": "string", @@ -5478,7 +8361,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/CreateUserTagIntent" + "$ref": "#/definitions/ExportWalletIntent" }, "generateAppProofs": { "type": "boolean", @@ -5487,1347 +8370,1303 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "CreateUserTagResult": { + "ExportWalletResult": { "type": "object", "properties": { - "userTagId": { + "walletId": { "type": "string", - "description": "Unique identifier for a given User Tag." + "description": "Unique identifier for a given Wallet." }, - "userIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of User IDs." + "exportBundle": { + "type": "string", + "description": "Export bundle containing a wallet mnemonic + optional newline passphrase encrypted by the client's target public key." } }, - "required": ["userTagId", "userIds"] + "required": ["walletId", "exportBundle"] }, - "CreateUsersIntent": { + "Feature": { "type": "object", "properties": { - "users": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/UserParams" - }, - "description": "A list of Users." + "name": { + "$ref": "#/definitions/FeatureName" + }, + "value": { + "type": "string", + "x-nullable": true + } + } + }, + "FeatureName": { + "type": "string", + "enum": [ + "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY", + "FEATURE_NAME_WEBAUTHN_ORIGINS", + "FEATURE_NAME_EMAIL_AUTH", + "FEATURE_NAME_EMAIL_RECOVERY", + "FEATURE_NAME_WEBHOOK", + "FEATURE_NAME_SMS_AUTH", + "FEATURE_NAME_OTP_EMAIL_AUTH", + "FEATURE_NAME_AUTH_PROXY", + "FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED" + ] + }, + "FiatOnRampBlockchainNetwork": { + "type": "string", + "enum": [ + "FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BITCOIN", + "FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_ETHEREUM", + "FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_SOLANA", + "FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BASE" + ] + }, + "FiatOnRampCredential": { + "type": "object", + "properties": { + "fiatOnrampCredentialId": { + "type": "string", + "description": "Unique identifier for a given Fiat On-Ramp Credential." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for an Organization." + }, + "onrampProvider": { + "$ref": "#/definitions/FiatOnRampProvider", + "description": "The fiat on-ramp provider." + }, + "projectId": { + "type": "string", + "x-nullable": true, + "description": "Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier." + }, + "publishableApiKey": { + "type": "string", + "description": "Publishable API key for the on-ramp provider." + }, + "encryptedSecretApiKey": { + "type": "string", + "description": "Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key." + }, + "encryptedPrivateApiKey": { + "type": "string", + "x-nullable": true, + "description": "Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key." + }, + "sandboxMode": { + "type": "boolean", + "description": "If the on-ramp credential is a sandbox credential." + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" } }, - "required": ["users"] + "required": [ + "fiatOnrampCredentialId", + "organizationId", + "onrampProvider", + "publishableApiKey", + "encryptedSecretApiKey", + "createdAt", + "updatedAt" + ] }, - "CreateUsersIntentV2": { + "FiatOnRampCryptoCurrency": { + "type": "string", + "enum": [ + "FIAT_ON_RAMP_CRYPTO_CURRENCY_BTC", + "FIAT_ON_RAMP_CRYPTO_CURRENCY_ETH", + "FIAT_ON_RAMP_CRYPTO_CURRENCY_SOL", + "FIAT_ON_RAMP_CRYPTO_CURRENCY_USDC" + ] + }, + "FiatOnRampCurrency": { + "type": "string", + "enum": [ + "FIAT_ON_RAMP_CURRENCY_AUD", + "FIAT_ON_RAMP_CURRENCY_BGN", + "FIAT_ON_RAMP_CURRENCY_BRL", + "FIAT_ON_RAMP_CURRENCY_CAD", + "FIAT_ON_RAMP_CURRENCY_CHF", + "FIAT_ON_RAMP_CURRENCY_COP", + "FIAT_ON_RAMP_CURRENCY_CZK", + "FIAT_ON_RAMP_CURRENCY_DKK", + "FIAT_ON_RAMP_CURRENCY_DOP", + "FIAT_ON_RAMP_CURRENCY_EGP", + "FIAT_ON_RAMP_CURRENCY_EUR", + "FIAT_ON_RAMP_CURRENCY_GBP", + "FIAT_ON_RAMP_CURRENCY_HKD", + "FIAT_ON_RAMP_CURRENCY_IDR", + "FIAT_ON_RAMP_CURRENCY_ILS", + "FIAT_ON_RAMP_CURRENCY_JOD", + "FIAT_ON_RAMP_CURRENCY_KES", + "FIAT_ON_RAMP_CURRENCY_KWD", + "FIAT_ON_RAMP_CURRENCY_LKR", + "FIAT_ON_RAMP_CURRENCY_MXN", + "FIAT_ON_RAMP_CURRENCY_NGN", + "FIAT_ON_RAMP_CURRENCY_NOK", + "FIAT_ON_RAMP_CURRENCY_NZD", + "FIAT_ON_RAMP_CURRENCY_OMR", + "FIAT_ON_RAMP_CURRENCY_PEN", + "FIAT_ON_RAMP_CURRENCY_PLN", + "FIAT_ON_RAMP_CURRENCY_RON", + "FIAT_ON_RAMP_CURRENCY_SEK", + "FIAT_ON_RAMP_CURRENCY_THB", + "FIAT_ON_RAMP_CURRENCY_TRY", + "FIAT_ON_RAMP_CURRENCY_TWD", + "FIAT_ON_RAMP_CURRENCY_USD", + "FIAT_ON_RAMP_CURRENCY_VND", + "FIAT_ON_RAMP_CURRENCY_ZAR" + ] + }, + "FiatOnRampPaymentMethod": { + "type": "string", + "enum": [ + "FIAT_ON_RAMP_PAYMENT_METHOD_CREDIT_DEBIT_CARD", + "FIAT_ON_RAMP_PAYMENT_METHOD_APPLE_PAY", + "FIAT_ON_RAMP_PAYMENT_METHOD_GBP_BANK_TRANSFER", + "FIAT_ON_RAMP_PAYMENT_METHOD_GBP_OPEN_BANKING_PAYMENT", + "FIAT_ON_RAMP_PAYMENT_METHOD_GOOGLE_PAY", + "FIAT_ON_RAMP_PAYMENT_METHOD_SEPA_BANK_TRANSFER", + "FIAT_ON_RAMP_PAYMENT_METHOD_PIX_INSTANT_PAYMENT", + "FIAT_ON_RAMP_PAYMENT_METHOD_PAYPAL", + "FIAT_ON_RAMP_PAYMENT_METHOD_VENMO", + "FIAT_ON_RAMP_PAYMENT_METHOD_MOONPAY_BALANCE", + "FIAT_ON_RAMP_PAYMENT_METHOD_CRYPTO_ACCOUNT", + "FIAT_ON_RAMP_PAYMENT_METHOD_FIAT_WALLET", + "FIAT_ON_RAMP_PAYMENT_METHOD_ACH_BANK_ACCOUNT" + ] + }, + "FiatOnRampProvider": { + "type": "string", + "enum": [ + "FIAT_ON_RAMP_PROVIDER_COINBASE", + "FIAT_ON_RAMP_PROVIDER_MOONPAY" + ] + }, + "GetActivitiesRequest": { "type": "object", "properties": { - "users": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given organization." + }, + "filterByStatus": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/UserParamsV2" + "$ref": "#/definitions/ActivityStatus" }, - "description": "A list of Users." + "description": "Array of activity statuses filtering which activities will be listed in the response." + }, + "paginationOptions": { + "$ref": "#/definitions/Pagination", + "description": "Parameters used for cursor-based pagination." + }, + "filterByType": { + "type": "array", + "items": { + "$ref": "#/definitions/ActivityType" + }, + "description": "Array of activity types filtering which activities will be listed in the response." } }, - "required": ["users"] + "required": ["organizationId"] }, - "CreateUsersIntentV3": { + "GetActivitiesResponse": { "type": "object", "properties": { - "users": { + "activities": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/UserParamsV3" + "$ref": "#/definitions/Activity" }, - "description": "A list of Users." + "description": "A list of activities." } }, - "required": ["users"] + "required": ["activities"] }, - "CreateUsersRequest": { + "GetActivityRequest": { "type": "object", "properties": { - "type": { + "organizationId": { "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_USERS_V3"] + "description": "Unique identifier for a given organization." }, - "timestampMs": { + "activityId": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, + "description": "Unique identifier for a given activity object." + } + }, + "required": ["organizationId", "activityId"] + }, + "GetApiKeyRequest": { + "type": "object", + "properties": { "organizationId": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/CreateUsersIntentV3" + "description": "Unique identifier for a given organization." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "apiKeyId": { + "type": "string", + "description": "Unique identifier for a given API key." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId", "apiKeyId"] }, - "CreateUsersResult": { + "GetApiKeyResponse": { "type": "object", "properties": { - "userIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of User IDs." + "apiKey": { + "$ref": "#/definitions/ApiKey", + "description": "An API key." } }, - "required": ["userIds"] + "required": ["apiKey"] }, - "CreateWalletAccountsIntent": { + "GetApiKeysRequest": { "type": "object", "properties": { - "walletId": { + "organizationId": { "type": "string", - "description": "Unique identifier for a given Wallet." + "description": "Unique identifier for a given organization." }, - "accounts": { + "userId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for a given user." + } + }, + "required": ["organizationId"] + }, + "GetApiKeysResponse": { + "type": "object", + "properties": { + "apiKeys": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/WalletAccountParams" + "$ref": "#/definitions/ApiKey" }, - "description": "A list of wallet Accounts." - }, - "persist": { - "type": "boolean", - "x-nullable": true, - "description": "Indicates if the wallet accounts should be persisted. This is helpful if you'd like to see the addresses of different derivation paths without actually creating the accounts. Defaults to true." + "description": "A list of API keys." } }, - "required": ["walletId", "accounts"] + "required": ["apiKeys"] }, - "CreateWalletAccountsRequest": { + "GetAppProofsRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", "description": "Unique identifier for a given Organization." }, - "parameters": { - "$ref": "#/definitions/CreateWalletAccountsIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "activityId": { + "type": "string", + "description": "Unique identifier for a given activity." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId", "activityId"] }, - "CreateWalletAccountsResult": { + "GetAppProofsResponse": { "type": "object", "properties": { - "addresses": { + "appProofs": { "type": "array", "items": { - "type": "string" - }, - "description": "A list of derived addresses." + "type": "object", + "$ref": "#/definitions/AppProof" + } } }, - "required": ["addresses"] + "required": ["appProofs"] }, - "CreateWalletIntent": { + "GetAppStatusRequest": { "type": "object", "properties": { - "walletName": { + "organizationId": { "type": "string", - "description": "Human-readable name for a Wallet." - }, - "accounts": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/WalletAccountParams" - }, - "description": "A list of wallet Accounts. This field, if not needed, should be an empty array in your request body." + "description": "Unique identifier for a given Organization." }, - "mnemonicLength": { - "type": "integer", - "format": "int32", - "x-nullable": true, - "description": "Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24." + "appId": { + "type": "string", + "description": "Unique identifier for a given TVC App." } }, - "required": ["walletName", "accounts"] + "required": ["organizationId", "appId"] }, - "CreateWalletRequest": { + "GetAppStatusResponse": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_CREATE_WALLET"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/CreateWalletIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "appStatus": { + "$ref": "#/definitions/AppStatus", + "description": "Live runtime status for the TVC App" } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["appStatus"] }, - "CreateWalletResult": { + "GetAuthenticatorRequest": { "type": "object", "properties": { - "walletId": { + "organizationId": { "type": "string", - "description": "Unique identifier for a Wallet." + "description": "Unique identifier for a given organization." }, - "addresses": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of account addresses." + "authenticatorId": { + "type": "string", + "description": "Unique identifier for a given authenticator." } }, - "required": ["walletId", "addresses"] + "required": ["organizationId", "authenticatorId"] }, - "CredPropsAuthenticationExtensionsClientOutputs": { + "GetAuthenticatorResponse": { "type": "object", "properties": { - "rk": { - "type": "boolean" + "authenticator": { + "$ref": "#/definitions/Authenticator", + "description": "An authenticator." } }, - "required": ["rk"] - }, - "CredentialType": { - "type": "string", - "enum": [ - "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR", - "CREDENTIAL_TYPE_API_KEY_P256", - "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256", - "CREDENTIAL_TYPE_API_KEY_SECP256K1", - "CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256", - "CREDENTIAL_TYPE_API_KEY_ED25519", - "CREDENTIAL_TYPE_OTP_AUTH_KEY_P256", - "CREDENTIAL_TYPE_READ_WRITE_SESSION_KEY_P256", - "CREDENTIAL_TYPE_OAUTH_KEY_P256", - "CREDENTIAL_TYPE_LOGIN" - ] - }, - "Curve": { - "type": "string", - "enum": ["CURVE_SECP256K1", "CURVE_ED25519", "CURVE_P256"] + "required": ["authenticator"] }, - "CustomRevertError": { + "GetAuthenticatorsRequest": { "type": "object", "properties": { - "errorName": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "The name of the custom error." + "description": "Unique identifier for a given organization." }, - "paramsJson": { + "userId": { "type": "string", - "x-nullable": true, - "description": "The decoded parameters as a JSON object." + "description": "Unique identifier for a given user." } - } + }, + "required": ["organizationId", "userId"] }, - "DeleteApiKeysIntent": { + "GetAuthenticatorsResponse": { "type": "object", "properties": { - "userId": { - "type": "string", - "description": "Unique identifier for a given User." - }, - "apiKeyIds": { + "authenticators": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/Authenticator" }, - "description": "A list of API Key IDs." + "description": "A list of authenticators." } }, - "required": ["userId", "apiKeyIds"] + "required": ["authenticators"] }, - "DeleteApiKeysRequest": { + "GetBootProofRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_API_KEYS"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", "description": "Unique identifier for a given Organization." }, - "parameters": { - "$ref": "#/definitions/DeleteApiKeysIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "ephemeralKey": { + "type": "string", + "description": "Hex encoded ephemeral public key." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId", "ephemeralKey"] }, - "DeleteApiKeysResult": { + "GetGasUsageRequest": { "type": "object", "properties": { - "apiKeyIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of API Key IDs." + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." } }, - "required": ["apiKeyIds"] + "required": ["organizationId"] }, - "DeleteAuthenticatorsIntent": { + "GetGasUsageResponse": { "type": "object", "properties": { - "userId": { + "windowDurationMinutes": { + "type": "integer", + "format": "int32", + "description": "The window duration (in minutes) for the organization or sub-organization." + }, + "windowLimitUsd": { "type": "string", - "description": "Unique identifier for a given User." + "description": "The window limit (in USD) for the organization or sub-organization." }, - "authenticatorIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of Authenticator IDs." + "usageUsd": { + "type": "string", + "description": "The total gas usage (in USD) of all sponsored transactions processed over the last `window_duration_minutes`" } }, - "required": ["userId", "authenticatorIds"] + "required": ["windowDurationMinutes", "windowLimitUsd", "usageUsd"] }, - "DeleteAuthenticatorsRequest": { + "GetIpAllowlistRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_AUTHENTICATORS"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeleteAuthenticatorsIntent" + "description": "Unique identifier for a given organization." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "publicKey": { + "type": "string", + "x-nullable": true, + "description": "If provided, return only the allowlist for this specific API key." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId"] }, - "DeleteAuthenticatorsResult": { + "GetIpAllowlistResponse": { "type": "object", "properties": { - "authenticatorIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Unique identifier for a given Authenticator." + "allowlist": { + "$ref": "#/definitions/IpAllowlist" } }, - "required": ["authenticatorIds"] + "required": ["allowlist"] }, - "DeleteFiatOnRampCredentialIntent": { + "GetLatestBootProofRequest": { "type": "object", "properties": { - "fiatOnrampCredentialId": { + "organizationId": { "type": "string", - "description": "The ID of the fiat on-ramp credential to delete" + "description": "Unique identifier for a given Organization." + }, + "appName": { + "type": "string", + "description": "Name of enclave app." } }, - "required": ["fiatOnrampCredentialId"] + "required": ["organizationId", "appName"] }, - "DeleteFiatOnRampCredentialRequest": { + "GetNoncesRequest": { "type": "object", "properties": { - "type": { + "organizationId": { "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL"] + "description": "Unique identifier for a given Organization." }, - "timestampMs": { + "address": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "description": "The Ethereum address to query nonces for." }, - "organizationId": { + "caip2": { "type": "string", - "description": "Unique identifier for a given Organization." + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532", + "eip155:137", + "eip155:80002" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." }, - "parameters": { - "$ref": "#/definitions/DeleteFiatOnRampCredentialIntent" + "nonce": { + "type": "boolean", + "description": "Whether to fetch the standard on-chain nonce." }, - "generateAppProofs": { + "gasStationNonce": { "type": "boolean", - "x-nullable": true + "description": "Whether to fetch the gas station nonce used for sponsored transactions." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId", "address", "caip2"] }, - "DeleteFiatOnRampCredentialResult": { + "GetNoncesResponse": { "type": "object", "properties": { - "fiatOnRampCredentialId": { + "nonce": { "type": "string", - "description": "Unique identifier of the Fiat On-Ramp credential that was deleted" + "format": "uint64", + "x-nullable": true, + "description": "The standard on-chain nonce for the address, if requested." + }, + "gasStationNonce": { + "type": "string", + "format": "uint64", + "x-nullable": true, + "description": "The gas station nonce for sponsored transactions, if requested." } - }, - "required": ["fiatOnRampCredentialId"] + } }, - "DeleteInvitationIntent": { + "GetOauth2CredentialRequest": { "type": "object", "properties": { - "invitationId": { + "organizationId": { "type": "string", - "description": "Unique identifier for a given Invitation object." + "description": "Unique identifier for a given Organization." + }, + "oauth2CredentialId": { + "type": "string", + "description": "Unique identifier for a given OAuth 2.0 Credential." } }, - "required": ["invitationId"] + "required": ["organizationId", "oauth2CredentialId"] }, - "DeleteInvitationRequest": { + "GetOauth2CredentialResponse": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_INVITATION"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeleteInvitationIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "oauth2Credential": { + "$ref": "#/definitions/Oauth2Credential" } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["oauth2Credential"] }, - "DeleteInvitationResult": { + "GetOauthProvidersRequest": { "type": "object", "properties": { - "invitationId": { + "organizationId": { "type": "string", - "description": "Unique identifier for a given Invitation." + "description": "Unique identifier for a given organization." + }, + "userId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for a given user." } }, - "required": ["invitationId"] + "required": ["organizationId"] }, - "DeleteOauth2CredentialIntent": { + "GetOauthProvidersResponse": { "type": "object", "properties": { - "oauth2CredentialId": { - "type": "string", - "description": "The ID of the OAuth 2.0 credential to delete" + "oauthProviders": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/OauthProvider" + }, + "description": "A list of Oauth providers." } }, - "required": ["oauth2CredentialId"] + "required": ["oauthProviders"] }, - "DeleteOauth2CredentialRequest": { + "GetOnRampTransactionStatusRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "Unique identifier for a given organization." }, - "parameters": { - "$ref": "#/definitions/DeleteOauth2CredentialIntent" + "transactionId": { + "type": "string", + "description": "The unique identifier for the fiat on ramp transaction." }, - "generateAppProofs": { + "refresh": { "type": "boolean", - "x-nullable": true + "x-nullable": true, + "description": "Optional flag to specify if the transaction status should be refreshed from the fiat on ramp provider. Default = false." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId", "transactionId"] }, - "DeleteOauth2CredentialResult": { + "GetOnRampTransactionStatusResponse": { "type": "object", "properties": { - "oauth2CredentialId": { + "transactionStatus": { "type": "string", - "description": "Unique identifier of the OAuth 2.0 credential that was deleted" + "description": "The status of the fiat on ramp transaction." } }, - "required": ["oauth2CredentialId"] + "required": ["transactionStatus"] }, - "DeleteOauthProvidersIntent": { + "GetOrganizationConfigsRequest": { "type": "object", "properties": { - "userId": { + "organizationId": { "type": "string", - "description": "The ID of the User to remove an Oauth provider from" - }, - "providerIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Unique identifier for a given Provider." + "description": "Unique identifier for a given organization." } }, - "required": ["userId", "providerIds"] + "required": ["organizationId"] }, - "DeleteOauthProvidersRequest": { + "GetOrganizationConfigsResponse": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeleteOauthProvidersIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "configs": { + "$ref": "#/definitions/Config", + "description": "Organization configs including quorum settings and organization features." + } + }, + "required": ["configs"] + }, + "GetPoliciesRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given organization." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId"] }, - "DeleteOauthProvidersResult": { + "GetPoliciesResponse": { "type": "object", "properties": { - "providerIds": { + "policies": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/Policy" }, - "description": "A list of unique identifiers for Oauth Providers" + "description": "A list of policies." } }, - "required": ["providerIds"] + "required": ["policies"] }, - "DeleteOrganizationIntent": { + "GetPolicyEvaluationsRequest": { "type": "object", "properties": { "organizationId": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "Unique identifier for a given organization." + }, + "activityId": { + "type": "string", + "description": "Unique identifier for a given activity." } }, - "required": ["organizationId"] + "required": ["organizationId", "activityId"] }, - "DeleteOrganizationResult": { + "GetPolicyEvaluationsResponse": { + "type": "object", + "properties": { + "policyEvaluations": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/activity.v1.PolicyEvaluation" + } + } + }, + "required": ["policyEvaluations"] + }, + "GetPolicyRequest": { "type": "object", "properties": { "organizationId": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "Unique identifier for a given organization." + }, + "policyId": { + "type": "string", + "description": "Unique identifier for a given policy." } }, - "required": ["organizationId"] + "required": ["organizationId", "policyId"] }, - "DeletePaymentMethodIntent": { + "GetPolicyResponse": { "type": "object", "properties": { - "paymentMethodId": { - "type": "string", - "x-nullable": true, - "description": "The payment method that the customer wants to remove." + "policy": { + "$ref": "#/definitions/Policy", + "description": "Object that codifies rules defining the actions that are permissible within an organization." } }, - "required": ["paymentMethodId"] + "required": ["policy"] }, - "DeletePaymentMethodResult": { + "GetPrivateKeyRequest": { "type": "object", "properties": { - "paymentMethodId": { + "organizationId": { "type": "string", - "description": "The payment method that was removed." + "description": "Unique identifier for a given organization." + }, + "privateKeyId": { + "type": "string", + "description": "Unique identifier for a given private key." } }, - "required": ["paymentMethodId"] + "required": ["organizationId", "privateKeyId"] }, - "DeletePoliciesIntent": { + "GetPrivateKeyResponse": { "type": "object", "properties": { - "policyIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of unique identifiers for policies within an organization" + "privateKey": { + "$ref": "#/definitions/PrivateKey", + "description": "Cryptographic public/private key pair that can be used for cryptocurrency needs or more generalized encryption." } }, - "required": ["policyIds"] + "required": ["privateKey"] }, - "DeletePoliciesRequest": { + "GetPrivateKeysRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_POLICIES"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeletePoliciesIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "description": "Unique identifier for a given organization." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId"] }, - "DeletePoliciesResult": { + "GetPrivateKeysResponse": { "type": "object", "properties": { - "policyIds": { + "privateKeys": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/PrivateKey" }, - "description": "A list of unique identifiers for the deleted policies." + "description": "A list of private keys." } }, - "required": ["policyIds"] + "required": ["privateKeys"] }, - "DeletePolicyIntent": { + "GetSendTransactionStatusRequest": { "type": "object", "properties": { - "policyId": { + "organizationId": { "type": "string", - "description": "Unique identifier for a given Policy." + "description": "Unique identifier for a given organization." + }, + "sendTransactionStatusId": { + "type": "string", + "description": "The unique identifier of a send transaction request." } }, - "required": ["policyId"] + "required": ["organizationId", "sendTransactionStatusId"] }, - "DeletePolicyRequest": { + "GetSendTransactionStatusResponse": { "type": "object", "properties": { - "type": { + "txStatus": { "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_POLICY"] + "description": "The current status of the send transaction." }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "eth": { + "$ref": "#/definitions/EthSendTransactionStatus", + "description": "Ethereum-specific transaction status." }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "solana": { + "$ref": "#/definitions/SolanaSendTransactionStatus", + "description": "Solana-specific transaction status." }, - "parameters": { - "$ref": "#/definitions/DeletePolicyIntent" + "txError": { + "type": "string", + "x-nullable": true, + "description": "The error encountered when broadcasting or confirming the transaction, if any." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "error": { + "$ref": "#/definitions/TxError", + "x-nullable": true, + "description": "Structured error information including revert details, if available." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["txStatus"] }, - "DeletePolicyResult": { + "GetSmartContractInterfaceRequest": { "type": "object", "properties": { - "policyId": { + "organizationId": { "type": "string", - "description": "Unique identifier for a given Policy." + "description": "Unique identifier for a given organization." + }, + "smartContractInterfaceId": { + "type": "string", + "description": "Unique identifier for a given smart contract interface." } }, - "required": ["policyId"] + "required": ["organizationId", "smartContractInterfaceId"] }, - "DeletePrivateKeyTagsIntent": { + "GetSmartContractInterfaceResponse": { "type": "object", "properties": { - "privateKeyTagIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of Private Key Tag IDs." + "smartContractInterface": { + "$ref": "#/definitions/data.v1.SmartContractInterface", + "description": "Object to be used in conjunction with policies to guard transaction signing." } }, - "required": ["privateKeyTagIds"] + "required": ["smartContractInterface"] }, - "DeletePrivateKeyTagsRequest": { + "GetSmartContractInterfacesRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeletePrivateKeyTagsIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "description": "Unique identifier for a given organization." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId"] }, - "DeletePrivateKeyTagsResult": { + "GetSmartContractInterfacesResponse": { "type": "object", "properties": { - "privateKeyTagIds": { + "smartContractInterfaces": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/data.v1.SmartContractInterface" }, - "description": "A list of Private Key Tag IDs." + "description": "A list of smart contract interfaces." + } + }, + "required": ["smartContractInterfaces"] + }, + "GetSubOrgIdsRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for the parent organization. This is used to find sub-organizations within it." }, - "privateKeyIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of Private Key IDs." + "filterType": { + "type": "string", + "description": "Specifies the type of filter to apply, i.e 'CREDENTIAL_ID', 'NAME', 'USERNAME', 'EMAIL', 'PHONE_NUMBER', 'OIDC_TOKEN', 'WALLET_ACCOUNT_ADDRESS' or 'PUBLIC_KEY'" + }, + "filterValue": { + "type": "string", + "description": "The value of the filter to apply for the specified type. For example, a specific email or name string." + }, + "paginationOptions": { + "$ref": "#/definitions/Pagination", + "description": "Parameters used for cursor-based pagination." } }, - "required": ["privateKeyTagIds", "privateKeyIds"] + "required": ["organizationId"] }, - "DeletePrivateKeysIntent": { + "GetSubOrgIdsResponse": { "type": "object", "properties": { - "privateKeyIds": { + "organizationIds": { "type": "array", "items": { - "type": "string" - }, - "description": "List of unique identifiers for private keys within an organization" - }, - "deleteWithoutExport": { - "type": "boolean", - "x-nullable": true, - "description": "Optional parameter for deleting the private keys, even if any have not been previously exported. If they have been exported, this field is ignored." + "type": "string" + }, + "description": "List of unique identifiers for the matching sub-organizations." } }, - "required": ["privateKeyIds"] + "required": ["organizationIds"] }, - "DeletePrivateKeysRequest": { + "GetTvcAppDeploymentsRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_PRIVATE_KEYS"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeletePrivateKeysIntent" + "description": "Unique identifier for a given organization." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "appId": { + "type": "string", + "description": "Unique identifier for a given TVC App." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId", "appId"] }, - "DeletePrivateKeysResult": { + "GetTvcAppDeploymentsResponse": { "type": "object", "properties": { - "privateKeyIds": { + "tvcDeployments": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/TvcDeployment" }, - "description": "A list of private key unique identifiers that were removed" + "description": "List of deployments for this TVC App" } }, - "required": ["privateKeyIds"] + "required": ["tvcDeployments"] }, - "DeleteSmartContractInterfaceIntent": { + "GetTvcAppRequest": { "type": "object", "properties": { - "smartContractInterfaceId": { + "organizationId": { "type": "string", - "description": "The ID of a Smart Contract Interface intended for deletion." + "description": "Unique identifier for a given organization." + }, + "tvcAppId": { + "type": "string", + "description": "Unique identifier for a given TVC App." } }, - "required": ["smartContractInterfaceId"] + "required": ["organizationId", "tvcAppId"] }, - "DeleteSmartContractInterfaceRequest": { + "GetTvcAppResponse": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeleteSmartContractInterfaceIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "tvcApp": { + "$ref": "#/definitions/TvcApp", + "description": "Details about a single TVC App" } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["tvcApp"] }, - "DeleteSmartContractInterfaceResult": { + "GetTvcAppsRequest": { "type": "object", "properties": { - "smartContractInterfaceId": { + "organizationId": { "type": "string", - "description": "The ID of the deleted Smart Contract Interface." + "description": "Unique identifier for a given organization." } }, - "required": ["smartContractInterfaceId"] + "required": ["organizationId"] }, - "DeleteSubOrganizationIntent": { + "GetTvcAppsResponse": { "type": "object", "properties": { - "deleteWithoutExport": { - "type": "boolean", - "x-nullable": true, - "description": "Sub-organization deletion, by default, requires associated wallets and private keys to be exported for security reasons. Set this boolean to true to force sub-organization deletion even if some wallets or private keys within it have not been exported yet. Default: false." + "tvcApps": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TvcApp" + }, + "description": "A list of TVC Apps." } - } + }, + "required": ["tvcApps"] }, - "DeleteSubOrganizationRequest": { + "GetTvcDeploymentRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeleteSubOrganizationIntent" + "description": "Unique identifier for a given organization." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "deploymentId": { + "type": "string", + "description": "Unique identifier for a given TVC Deployment." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId", "deploymentId"] }, - "DeleteSubOrganizationResult": { + "GetTvcDeploymentResponse": { "type": "object", "properties": { - "subOrganizationUuid": { - "type": "string", - "description": "Unique identifier of the sub organization that was removed" + "tvcDeployment": { + "$ref": "#/definitions/TvcDeployment", + "description": "Details about a single TVC Deployment" } }, - "required": ["subOrganizationUuid"] + "required": ["tvcDeployment"] }, - "DeleteUserTagsIntent": { + "GetUserRequest": { "type": "object", "properties": { - "userTagIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of User Tag IDs." + "organizationId": { + "type": "string", + "description": "Unique identifier for a given organization." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given user." } }, - "required": ["userTagIds"] + "required": ["organizationId", "userId"] }, - "DeleteUserTagsRequest": { + "GetUserResponse": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_USER_TAGS"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeleteUserTagsIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "user": { + "$ref": "#/definitions/User", + "description": "Web and/or API user within your organization." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["user"] }, - "DeleteUserTagsResult": { + "GetUsersRequest": { "type": "object", "properties": { - "userTagIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of User Tag IDs." - }, - "userIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of User IDs." + "organizationId": { + "type": "string", + "description": "Unique identifier for a given organization." } }, - "required": ["userTagIds", "userIds"] + "required": ["organizationId"] }, - "DeleteUsersIntent": { + "GetUsersResponse": { "type": "object", "properties": { - "userIds": { + "users": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/User" }, - "description": "A list of User IDs." + "description": "A list of users." } }, - "required": ["userIds"] + "required": ["users"] }, - "DeleteUsersRequest": { + "GetVerifiedSubOrgIdsRequest": { "type": "object", "properties": { - "type": { + "organizationId": { "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_USERS"] + "description": "Unique identifier for the parent organization. This is used to find sub-organizations within it." }, - "timestampMs": { + "filterType": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "description": "Specifies the type of filter to apply, i.e 'EMAIL', 'PHONE_NUMBER'." }, - "organizationId": { + "filterValue": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeleteUsersIntent" + "description": "The value of the filter to apply for the specified type. For example, a specific email or phone number string." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "DeleteUsersResult": { - "type": "object", - "properties": { - "userIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of User IDs." + "paginationOptions": { + "$ref": "#/definitions/Pagination", + "description": "Parameters used for cursor-based pagination." } }, - "required": ["userIds"] + "required": ["organizationId"] }, - "DeleteWalletAccountsIntent": { + "GetVerifiedSubOrgIdsResponse": { "type": "object", "properties": { - "walletAccountIds": { + "organizationIds": { "type": "array", "items": { "type": "string" }, - "description": "List of unique identifiers for wallet accounts within an organization" - }, - "deleteWithoutExport": { - "type": "boolean", - "x-nullable": true, - "description": "Optional parameter for deleting the wallet accounts, even if any have not been previously exported. If they have been exported, this field is ignored." + "description": "List of unique identifiers for the matching sub-organizations." } }, - "required": ["walletAccountIds"] + "required": ["organizationIds"] }, - "DeleteWalletAccountsRequest": { + "GetWalletAccountRequest": { "type": "object", "properties": { - "type": { + "organizationId": { "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS"] + "description": "Unique identifier for a given organization." }, - "timestampMs": { + "walletId": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "description": "Unique identifier for a given wallet." }, - "organizationId": { + "address": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeleteWalletAccountsIntent" + "x-nullable": true, + "description": "Address corresponding to a wallet account." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "path": { + "type": "string", + "x-nullable": true, + "description": "Path corresponding to a wallet account." + } + }, + "required": ["organizationId", "walletId"] + }, + "GetWalletAccountResponse": { + "type": "object", + "properties": { + "account": { + "$ref": "#/definitions/WalletAccount", + "description": "The resulting wallet account." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["account"] }, - "DeleteWalletAccountsResult": { + "GetWalletAccountsRequest": { "type": "object", "properties": { - "walletAccountIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of wallet account unique identifiers that were removed" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given organization." + }, + "walletId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for a given wallet. If not provided, all accounts for the organization will be returned." + }, + "includeWalletDetails": { + "type": "boolean", + "x-nullable": true, + "description": "Optional flag to specify if the wallet details should be included in the response. Default = false." + }, + "paginationOptions": { + "$ref": "#/definitions/Pagination", + "description": "Parameters used for cursor-based pagination." } }, - "required": ["walletAccountIds"] + "required": ["organizationId"] }, - "DeleteWalletsIntent": { + "GetWalletAccountsResponse": { "type": "object", "properties": { - "walletIds": { + "accounts": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/WalletAccount" }, - "description": "List of unique identifiers for wallets within an organization" - }, - "deleteWithoutExport": { - "type": "boolean", - "x-nullable": true, - "description": "Optional parameter for deleting the wallets, even if any have not been previously exported. If they have been exported, this field is ignored." + "description": "A list of accounts generated from a wallet that share a common seed." } }, - "required": ["walletIds"] + "required": ["accounts"] }, - "DeleteWalletsRequest": { + "GetWalletAddressBalancesRequest": { "type": "object", "properties": { - "type": { + "organizationId": { "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_WALLETS"] + "description": "Unique identifier for a given organization." }, - "timestampMs": { + "address": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "description": "Address corresponding to a wallet account. Private key addresses are not supported." }, - "organizationId": { + "caip2": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/DeleteWalletsIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532", + "eip155:137", + "eip155:80002", + "eip155:42161", + "eip155:421614", + "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet or 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId", "address", "caip2"] }, - "DeleteWalletsResult": { + "GetWalletAddressBalancesResponse": { "type": "object", "properties": { - "walletIds": { + "balances": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/AssetBalance" }, - "description": "A list of wallet unique identifiers that were removed" + "description": "List of asset balances" } - }, - "required": ["walletIds"] - }, - "DisableAuthProxyIntent": { - "type": "object" - }, - "DisableAuthProxyResult": { - "type": "object" + } }, - "DisablePrivateKeyIntent": { + "GetWalletRequest": { "type": "object", "properties": { - "privateKeyId": { + "organizationId": { "type": "string", - "description": "Unique identifier for a given Private Key." + "description": "Unique identifier for a given organization." + }, + "walletId": { + "type": "string", + "description": "Unique identifier for a given wallet." } }, - "required": ["privateKeyId"] + "required": ["organizationId", "walletId"] }, - "DisablePrivateKeyResult": { + "GetWalletResponse": { "type": "object", "properties": { - "privateKeyId": { - "type": "string", - "description": "Unique identifier for a given Private Key." + "wallet": { + "$ref": "#/definitions/Wallet", + "description": "A collection of deterministically generated cryptographic public / private key pairs that share a common seed." } }, - "required": ["privateKeyId"] - }, - "Effect": { - "type": "string", - "enum": ["EFFECT_ALLOW", "EFFECT_DENY"] + "required": ["wallet"] }, - "EmailAuthCustomizationParams": { + "GetWalletsRequest": { "type": "object", "properties": { - "appName": { - "type": "string", - "description": "The name of the application. This field is required and will be used in email notifications if an email template is not provided." - }, - "logoUrl": { - "type": "string", - "x-nullable": true, - "description": "A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px." - }, - "magicLinkTemplate": { - "type": "string", - "x-nullable": true, - "description": "A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`." - }, - "templateVariables": { - "type": "string", - "x-nullable": true, - "description": "JSON object containing key/value pairs to be used with custom templates." - }, - "templateId": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template." + "description": "Unique identifier for a given organization." } }, - "required": ["appName"] + "required": ["organizationId"] }, - "EmailAuthIntent": { + "GetWalletsResponse": { "type": "object", "properties": { - "email": { - "type": "string", - "description": "Email of the authenticating user." - }, - "targetPublicKey": { - "type": "string", - "description": "Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted." - }, - "apiKeyName": { - "type": "string", - "x-nullable": true, - "description": "Optional human-readable name for an API Key. If none provided, default to Email Auth - \u003cTimestamp\u003e" - }, - "expirationSeconds": { - "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." - }, - "emailCustomization": { - "$ref": "#/definitions/EmailCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing emails. If not provided, the default email will be used." - }, - "invalidateExisting": { - "type": "boolean", - "x-nullable": true, - "description": "Invalidate all other previously generated Email Auth API keys" - }, - "sendFromEmailAddress": { - "type": "string", - "x-nullable": true, - "description": "Optional custom email address from which to send the email" - }, - "sendFromEmailSenderName": { - "type": "string", - "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" - }, - "replyToEmailAddress": { - "type": "string", - "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "wallets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Wallet" + }, + "description": "A list of wallets." } }, - "required": ["email", "targetPublicKey"] + "required": ["wallets"] }, - "EmailAuthIntentV2": { + "GetWhoamiRequest": { "type": "object", "properties": { - "email": { - "type": "string", - "description": "Email of the authenticating user." - }, - "targetPublicKey": { - "type": "string", - "description": "Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted." - }, - "apiKeyName": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "Optional human-readable name for an API Key. If none provided, default to Email Auth - \u003cTimestamp\u003e" - }, - "expirationSeconds": { + "description": "Unique identifier for a given organization. If the request is being made by a WebAuthN user and their sub-organization ID is unknown, this can be the parent organization ID; using the sub-organization ID when possible is preferred due to performance reasons." + } + }, + "required": ["organizationId"] + }, + "GetWhoamiResponse": { + "type": "object", + "properties": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." - }, - "emailCustomization": { - "$ref": "#/definitions/EmailCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing emails. If not provided, the default email will be used." - }, - "invalidateExisting": { - "type": "boolean", - "x-nullable": true, - "description": "Invalidate all other previously generated Email Auth API keys" + "description": "Unique identifier for a given organization." }, - "sendFromEmailAddress": { + "organizationName": { "type": "string", - "x-nullable": true, - "description": "Optional custom email address from which to send the email" + "description": "Human-readable name for an organization." }, - "sendFromEmailSenderName": { + "userId": { "type": "string", - "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + "description": "Unique identifier for a given user." }, - "replyToEmailAddress": { + "username": { "type": "string", - "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "description": "Human-readable name for a user." } }, - "required": ["email", "targetPublicKey"] + "required": ["organizationId", "organizationName", "userId", "username"] }, - "EmailAuthIntentV3": { + "HashFunction": { + "type": "string", + "enum": [ + "HASH_FUNCTION_NO_OP", + "HASH_FUNCTION_SHA256", + "HASH_FUNCTION_KECCAK256", + "HASH_FUNCTION_NOT_APPLICABLE" + ] + }, + "ImportPrivateKeyIntent": { "type": "object", "properties": { - "email": { - "type": "string", - "description": "Email of the authenticating user." - }, - "targetPublicKey": { - "type": "string", - "description": "Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted." - }, - "apiKeyName": { + "userId": { "type": "string", - "x-nullable": true, - "description": "Optional human-readable name for an API Key. If none provided, default to Email Auth - \u003cTimestamp\u003e" + "description": "The ID of the User importing a Private Key." }, - "expirationSeconds": { + "privateKeyName": { "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." - }, - "emailCustomization": { - "$ref": "#/definitions/EmailAuthCustomizationParams", - "description": "Parameters for customizing emails. If not provided, the default email will be used. Note that app_name is required." - }, - "invalidateExisting": { - "type": "boolean", - "x-nullable": true, - "description": "Invalidate all other previously generated Email Auth API keys" + "description": "Human-readable name for a Private Key." }, - "sendFromEmailAddress": { + "encryptedBundle": { "type": "string", - "x-nullable": true, - "description": "Optional custom email address from which to send the email" + "description": "Bundle containing a raw private key encrypted to the enclave's target public key." }, - "sendFromEmailSenderName": { - "type": "string", - "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + "curve": { + "$ref": "#/definitions/Curve", + "description": "Cryptographic Curve used to generate a given Private Key." }, - "replyToEmailAddress": { - "type": "string", - "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "addressFormats": { + "type": "array", + "items": { + "$ref": "#/definitions/AddressFormat" + }, + "description": "Cryptocurrency-specific formats for a derived address (e.g., Ethereum)." } }, - "required": ["email", "targetPublicKey", "emailCustomization"] + "required": [ + "userId", + "privateKeyName", + "encryptedBundle", + "curve", + "addressFormats" + ] }, - "EmailAuthRequest": { + "ImportPrivateKeyRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_EMAIL_AUTH_V3"] + "enum": ["ACTIVITY_TYPE_IMPORT_PRIVATE_KEY"] }, "timestampMs": { "type": "string", @@ -6838,7 +9677,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/EmailAuthIntentV3" + "$ref": "#/definitions/ImportPrivateKeyIntent" }, "generateAppProofs": { "type": "boolean", @@ -6847,192 +9686,160 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "EmailAuthResult": { + "ImportPrivateKeyResult": { "type": "object", "properties": { - "userId": { + "privateKeyId": { "type": "string", - "description": "Unique identifier for the authenticating User." + "description": "Unique identifier for a Private Key." }, - "apiKeyId": { - "type": "string", - "description": "Unique identifier for the created API key." + "addresses": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/activity.v1.Address" + }, + "description": "A list of addresses." } }, - "required": ["userId", "apiKeyId"] + "required": ["privateKeyId", "addresses"] }, - "EmailCustomizationParams": { + "ImportWalletIntent": { "type": "object", "properties": { - "appName": { - "type": "string", - "x-nullable": true, - "description": "The name of the application." - }, - "logoUrl": { + "userId": { "type": "string", - "x-nullable": true, - "description": "A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px." + "description": "The ID of the User importing a Wallet." }, - "magicLinkTemplate": { + "walletName": { "type": "string", - "x-nullable": true, - "description": "A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`." + "description": "Human-readable name for a Wallet." }, - "templateVariables": { + "encryptedBundle": { "type": "string", - "x-nullable": true, - "description": "JSON object containing key/value pairs to be used with custom templates." + "description": "Bundle containing a wallet mnemonic encrypted to the enclave's target public key." }, - "templateId": { - "type": "string", - "x-nullable": true, - "description": "Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template." + "accounts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/WalletAccountParams" + }, + "description": "A list of wallet Accounts." } - } + }, + "required": ["userId", "walletName", "encryptedBundle", "accounts"] }, - "EmailCustomizationParamsV2": { + "ImportWalletRequest": { "type": "object", "properties": { - "logoUrl": { + "type": { "type": "string", - "x-nullable": true, - "description": "A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px." + "enum": ["ACTIVITY_TYPE_IMPORT_WALLET"] }, - "magicLinkTemplate": { + "timestampMs": { "type": "string", - "x-nullable": true, - "description": "A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "templateVariables": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "JSON object containing key/value pairs to be used with custom templates." + "description": "Unique identifier for a given Organization." }, - "templateId": { - "type": "string", - "x-nullable": true, - "description": "Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template." - } - } - }, - "EnableAuthProxyIntent": { - "type": "object" - }, - "EnableAuthProxyResult": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "A User ID with permission to initiate authentication." - } - }, - "required": ["userId"] - }, - "EthSendRawTransactionIntent": { - "type": "object", - "properties": { - "signedTransaction": { - "type": "string", - "description": "The raw, signed transaction to be sent." + "parameters": { + "$ref": "#/definitions/ImportWalletIntent" }, - "caip2": { - "type": "string", - "enum": [ - "eip155:1", - "eip155:11155111", - "eip155:8453", - "eip155:84532", - "eip155:137", - "eip155:80002" - ], - "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": ["signedTransaction", "caip2"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "EthSendRawTransactionResult": { + "ImportWalletResult": { "type": "object", "properties": { - "transactionHash": { + "walletId": { "type": "string", - "description": "The transaction hash of the sent transaction" + "description": "Unique identifier for a Wallet." + }, + "addresses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of account addresses." } }, - "required": ["transactionHash"] + "required": ["walletId", "addresses"] }, - "EthSendTransactionIntent": { + "InitFiatOnRampIntent": { "type": "object", "properties": { - "from": { - "type": "string", - "description": "A wallet or private key address to sign with. This does not support private key IDs." - }, - "sponsor": { - "type": "boolean", - "x-nullable": true, - "description": "Whether to sponsor this transaction via Gas Station." + "onrampProvider": { + "$ref": "#/definitions/FiatOnRampProvider", + "description": "Enum to specify which on-ramp provider to use" }, - "caip2": { + "walletAddress": { "type": "string", - "enum": [ - "eip155:1", - "eip155:11155111", - "eip155:8453", - "eip155:84532", - "eip155:137", - "eip155:80002" - ], - "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." + "description": "Destination wallet address for the buy transaction." }, - "to": { - "type": "string", - "description": "Recipient address as a hex string with 0x prefix." + "network": { + "$ref": "#/definitions/FiatOnRampBlockchainNetwork", + "description": "Blockchain network to be used for the transaction, e.g., bitcoin, ethereum. Maps to MoonPay's network or Coinbase's defaultNetwork." }, - "value": { - "type": "string", + "cryptoCurrencyCode": { + "$ref": "#/definitions/FiatOnRampCryptoCurrency", + "description": "Code for the cryptocurrency to be purchased, e.g., btc, eth. Maps to MoonPay's currencyCode or Coinbase's defaultAsset." + }, + "fiatCurrencyCode": { + "$ref": "#/definitions/FiatOnRampCurrency", "x-nullable": true, - "description": "Amount of native asset to send in wei." + "description": "Code for the fiat currency to be used in the transaction, e.g., USD, EUR." }, - "data": { + "fiatCurrencyAmount": { "type": "string", "x-nullable": true, - "description": "Hex-encoded call data for contract interactions." + "description": "Specifies a preset fiat amount for the transaction, e.g., '100'. Must be greater than '20'. If not provided, the user will be prompted to enter an amount." }, - "nonce": { - "type": "string", + "paymentMethod": { + "$ref": "#/definitions/FiatOnRampPaymentMethod", "x-nullable": true, - "description": "Transaction nonce, for EIP-1559 and Turnkey Gas Station authorizations." + "description": "Pre-selected payment method, e.g., CREDIT_DEBIT_CARD, APPLE_PAY. Validated against the chosen provider." }, - "gasLimit": { + "countryCode": { "type": "string", "x-nullable": true, - "description": "Maximum amount of gas to use for this transaction, for EIP-1559 transactions." + "description": "ISO 3166-1 two-digit country code for Coinbase representing the purchasing user’s country of residence, e.g., US, GB." }, - "maxFeePerGas": { + "countrySubdivisionCode": { "type": "string", "x-nullable": true, - "description": "Maximum total fee per gas unit (base fee + priority fee) in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions." + "description": "ISO 3166-2 two-digit country subdivision code for Coinbase representing the purchasing user’s subdivision of residence within their country, e.g. NY. Required if country_code=US." }, - "maxPriorityFeePerGas": { - "type": "string", + "sandboxMode": { + "type": "boolean", "x-nullable": true, - "description": "Maximum priority fee (tip) per gas unit in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions." + "description": "Optional flag to indicate whether to use the sandbox mode to simulate transactions for the on-ramp provider. Default is false." }, - "gasStationNonce": { + "urlForSignature": { "type": "string", "x-nullable": true, - "description": "The gas station delegate contract nonce. Only used when sponsor=true. Include this if you want maximal security posture." + "description": "Optional MoonPay Widget URL to sign when using MoonPay client SDKs with URL Signing enabled." } }, - "required": ["from", "caip2", "to"] + "required": [ + "onrampProvider", + "walletAddress", + "network", + "cryptoCurrencyCode" + ] }, - "EthSendTransactionRequest": { + "InitFiatOnRampRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_ETH_SEND_TRANSACTION"] + "enum": ["ACTIVITY_TYPE_INIT_FIAT_ON_RAMP"] }, "timestampMs": { "type": "string", @@ -7043,7 +9850,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/EthSendTransactionIntent" + "$ref": "#/definitions/InitFiatOnRampIntent" }, "generateAppProofs": { "type": "boolean", @@ -7052,46 +9859,40 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "EthSendTransactionResult": { + "InitFiatOnRampResult": { "type": "object", "properties": { - "sendTransactionStatusId": { + "onRampUrl": { "type": "string", - "description": "The send_transaction_status ID associated with the transaction submission" - } - }, - "required": ["sendTransactionStatusId"] - }, - "EthSendTransactionStatus": { - "type": "object", - "properties": { - "txHash": { + "description": "Unique URL for a given fiat on-ramp flow." + }, + "onRampTransactionId": { "type": "string", - "x-nullable": true, - "description": "The Ethereum transaction hash, if available." + "description": "Unique identifier used to retrieve transaction statuses for a given fiat on-ramp flow." + }, + "onRampUrlSignature": { + "type": "string", + "description": "Optional signature of the MoonPay Widget URL. The signature is generated if the Init Fiat On Ramp intent includes the urlForSignature field. The signature can be used to initialize the MoonPay SDKs when URL signing is enabled for your project." } - } + }, + "required": ["onRampUrl", "onRampTransactionId"] }, - "ExportPrivateKeyIntent": { + "InitImportPrivateKeyIntent": { "type": "object", "properties": { - "privateKeyId": { - "type": "string", - "description": "Unique identifier for a given Private Key." - }, - "targetPublicKey": { + "userId": { "type": "string", - "description": "Client-side public key generated by the user, to which the export bundle will be encrypted." + "description": "The ID of the User importing a Private Key." } }, - "required": ["privateKeyId", "targetPublicKey"] + "required": ["userId"] }, - "ExportPrivateKeyRequest": { + "InitImportPrivateKeyRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_EXPORT_PRIVATE_KEY"] + "enum": ["ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY"] }, "timestampMs": { "type": "string", @@ -7102,7 +9903,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/ExportPrivateKeyIntent" + "$ref": "#/definitions/InitImportPrivateKeyIntent" }, "generateAppProofs": { "type": "boolean", @@ -7111,40 +9912,32 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "ExportPrivateKeyResult": { + "InitImportPrivateKeyResult": { "type": "object", "properties": { - "privateKeyId": { - "type": "string", - "description": "Unique identifier for a given Private Key." - }, - "exportBundle": { + "importBundle": { "type": "string", - "description": "Export bundle containing a private key encrypted to the client's target public key." + "description": "Import bundle containing a public key and signature to use for importing client data." } }, - "required": ["privateKeyId", "exportBundle"] + "required": ["importBundle"] }, - "ExportWalletAccountIntent": { + "InitImportWalletIntent": { "type": "object", "properties": { - "address": { - "type": "string", - "description": "Address to identify Wallet Account." - }, - "targetPublicKey": { + "userId": { "type": "string", - "description": "Client-side public key generated by the user, to which the export bundle will be encrypted." + "description": "The ID of the User importing a Wallet." } }, - "required": ["address", "targetPublicKey"] + "required": ["userId"] }, - "ExportWalletAccountRequest": { + "InitImportWalletRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT"] + "enum": ["ACTIVITY_TYPE_INIT_IMPORT_WALLET"] }, "timestampMs": { "type": "string", @@ -7155,7 +9948,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/ExportWalletAccountIntent" + "$ref": "#/definitions/InitImportWalletIntent" }, "generateAppProofs": { "type": "boolean", @@ -7164,45 +9957,185 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "ExportWalletAccountResult": { + "InitImportWalletResult": { "type": "object", "properties": { - "address": { + "importBundle": { "type": "string", - "description": "Address to identify Wallet Account." + "description": "Import bundle containing a public key and signature to use for importing client data." + } + }, + "required": ["importBundle"] + }, + "InitOtpAuthIntent": { + "type": "object", + "properties": { + "otpType": { + "type": "string", + "description": "Enum to specify whether to send OTP via SMS or email" }, - "exportBundle": { + "contact": { "type": "string", - "description": "Export bundle containing a private key encrypted by the client's target public key." + "description": "Email or phone number to send the OTP code to" + }, + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + }, + "smsCustomization": { + "$ref": "#/definitions/SmsCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing SMS message. If not provided, the default sms message will be used." + }, + "userIdentifier": { + "type": "string", + "x-nullable": true, + "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, - "required": ["address", "exportBundle"] + "required": ["otpType", "contact"] }, - "ExportWalletIntent": { + "InitOtpAuthIntentV2": { "type": "object", "properties": { - "walletId": { + "otpType": { + "type": "string", + "description": "Enum to specify whether to send OTP via SMS or email" + }, + "contact": { + "type": "string", + "description": "Email or phone number to send the OTP code to" + }, + "otpLength": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Optional length of the OTP code. Default = 9" + }, + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + }, + "smsCustomization": { + "$ref": "#/definitions/SmsCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing SMS message. If not provided, the default SMS message will be used." + }, + "userIdentifier": { + "type": "string", + "x-nullable": true, + "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "alphanumeric": { + "type": "boolean", + "x-nullable": true, + "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" + } + }, + "required": ["otpType", "contact"] + }, + "InitOtpAuthIntentV3": { + "type": "object", + "properties": { + "otpType": { + "type": "string", + "description": "Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL" + }, + "contact": { + "type": "string", + "description": "Email or phone number to send the OTP code to" + }, + "otpLength": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Optional length of the OTP code. Default = 9" + }, + "appName": { + "type": "string", + "description": "The name of the application. This field is required and will be used in email notifications if an email template is not provided." + }, + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParamsV2", + "x-nullable": true, + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + }, + "smsCustomization": { + "$ref": "#/definitions/SmsCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing SMS message. If not provided, the default SMS message will be used." + }, + "userIdentifier": { + "type": "string", + "x-nullable": true, + "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "alphanumeric": { + "type": "boolean", + "x-nullable": true, + "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" + }, + "sendFromEmailSenderName": { "type": "string", - "description": "Unique identifier for a given Wallet." + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" }, - "targetPublicKey": { + "expirationSeconds": { "type": "string", - "description": "Client-side public key generated by the user, to which the export bundle will be encrypted." + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)" }, - "language": { - "$ref": "#/definitions/MnemonicLanguage", + "replyToEmailAddress": { + "type": "string", "x-nullable": true, - "description": "The language of the mnemonic to export. Defaults to English." + "description": "Optional custom email address to use as reply-to" } }, - "required": ["walletId", "targetPublicKey"] + "required": ["otpType", "contact", "appName"] }, - "ExportWalletRequest": { + "InitOtpAuthRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_EXPORT_WALLET"] + "enum": ["ACTIVITY_TYPE_INIT_OTP_AUTH_V3"] }, "timestampMs": { "type": "string", @@ -7213,7 +10146,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/ExportWalletIntent" + "$ref": "#/definitions/InitOtpAuthIntentV3" }, "generateAppProofs": { "type": "boolean", @@ -7222,1784 +10155,1152 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "ExportWalletResult": { + "InitOtpAuthResult": { "type": "object", "properties": { - "walletId": { - "type": "string", - "description": "Unique identifier for a given Wallet." - }, - "exportBundle": { + "otpId": { "type": "string", - "description": "Export bundle containing a wallet mnemonic + optional newline passphrase encrypted by the client's target public key." + "description": "Unique identifier for an OTP authentication" } }, - "required": ["walletId", "exportBundle"] + "required": ["otpId"] }, - "Feature": { + "InitOtpAuthResultV2": { "type": "object", "properties": { - "name": { - "$ref": "#/definitions/FeatureName" - }, - "value": { + "otpId": { "type": "string", - "x-nullable": true + "description": "Unique identifier for an OTP authentication" } - } - }, - "FeatureName": { - "type": "string", - "enum": [ - "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY", - "FEATURE_NAME_WEBAUTHN_ORIGINS", - "FEATURE_NAME_EMAIL_AUTH", - "FEATURE_NAME_EMAIL_RECOVERY", - "FEATURE_NAME_WEBHOOK", - "FEATURE_NAME_SMS_AUTH", - "FEATURE_NAME_OTP_EMAIL_AUTH", - "FEATURE_NAME_AUTH_PROXY" - ] - }, - "FiatOnRampBlockchainNetwork": { - "type": "string", - "enum": [ - "FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BITCOIN", - "FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_ETHEREUM", - "FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_SOLANA", - "FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BASE" - ] + }, + "required": ["otpId"] }, - "FiatOnRampCredential": { + "InitOtpIntent": { "type": "object", "properties": { - "fiatOnrampCredentialId": { + "otpType": { "type": "string", - "description": "Unique identifier for a given Fiat On-Ramp Credential." + "description": "Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL" }, - "organizationId": { + "contact": { "type": "string", - "description": "Unique identifier for an Organization." + "description": "Email or phone number to send the OTP code to" }, - "onrampProvider": { - "$ref": "#/definitions/FiatOnRampProvider", - "description": "The fiat on-ramp provider." + "otpLength": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Optional length of the OTP code. Default = 9" }, - "projectId": { - "type": "string", + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParams", "x-nullable": true, - "description": "Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier." + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." }, - "publishableApiKey": { - "type": "string", - "description": "Publishable API key for the on-ramp provider." + "smsCustomization": { + "$ref": "#/definitions/SmsCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing SMS message. If not provided, the default sms message will be used." }, - "encryptedSecretApiKey": { + "userIdentifier": { "type": "string", - "description": "Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key." + "x-nullable": true, + "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." }, - "encryptedPrivateApiKey": { + "sendFromEmailAddress": { "type": "string", "x-nullable": true, - "description": "Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key." + "description": "Optional custom email address from which to send the OTP email" }, - "sandboxMode": { + "alphanumeric": { "type": "boolean", - "description": "If the on-ramp credential is a sandbox credential." + "x-nullable": true, + "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" }, - "updatedAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, - "required": [ - "fiatOnrampCredentialId", - "organizationId", - "onrampProvider", - "publishableApiKey", - "encryptedSecretApiKey", - "createdAt", - "updatedAt" - ] - }, - "FiatOnRampCryptoCurrency": { - "type": "string", - "enum": [ - "FIAT_ON_RAMP_CRYPTO_CURRENCY_BTC", - "FIAT_ON_RAMP_CRYPTO_CURRENCY_ETH", - "FIAT_ON_RAMP_CRYPTO_CURRENCY_SOL", - "FIAT_ON_RAMP_CRYPTO_CURRENCY_USDC" - ] - }, - "FiatOnRampCurrency": { - "type": "string", - "enum": [ - "FIAT_ON_RAMP_CURRENCY_AUD", - "FIAT_ON_RAMP_CURRENCY_BGN", - "FIAT_ON_RAMP_CURRENCY_BRL", - "FIAT_ON_RAMP_CURRENCY_CAD", - "FIAT_ON_RAMP_CURRENCY_CHF", - "FIAT_ON_RAMP_CURRENCY_COP", - "FIAT_ON_RAMP_CURRENCY_CZK", - "FIAT_ON_RAMP_CURRENCY_DKK", - "FIAT_ON_RAMP_CURRENCY_DOP", - "FIAT_ON_RAMP_CURRENCY_EGP", - "FIAT_ON_RAMP_CURRENCY_EUR", - "FIAT_ON_RAMP_CURRENCY_GBP", - "FIAT_ON_RAMP_CURRENCY_HKD", - "FIAT_ON_RAMP_CURRENCY_IDR", - "FIAT_ON_RAMP_CURRENCY_ILS", - "FIAT_ON_RAMP_CURRENCY_JOD", - "FIAT_ON_RAMP_CURRENCY_KES", - "FIAT_ON_RAMP_CURRENCY_KWD", - "FIAT_ON_RAMP_CURRENCY_LKR", - "FIAT_ON_RAMP_CURRENCY_MXN", - "FIAT_ON_RAMP_CURRENCY_NGN", - "FIAT_ON_RAMP_CURRENCY_NOK", - "FIAT_ON_RAMP_CURRENCY_NZD", - "FIAT_ON_RAMP_CURRENCY_OMR", - "FIAT_ON_RAMP_CURRENCY_PEN", - "FIAT_ON_RAMP_CURRENCY_PLN", - "FIAT_ON_RAMP_CURRENCY_RON", - "FIAT_ON_RAMP_CURRENCY_SEK", - "FIAT_ON_RAMP_CURRENCY_THB", - "FIAT_ON_RAMP_CURRENCY_TRY", - "FIAT_ON_RAMP_CURRENCY_TWD", - "FIAT_ON_RAMP_CURRENCY_USD", - "FIAT_ON_RAMP_CURRENCY_VND", - "FIAT_ON_RAMP_CURRENCY_ZAR" - ] - }, - "FiatOnRampPaymentMethod": { - "type": "string", - "enum": [ - "FIAT_ON_RAMP_PAYMENT_METHOD_CREDIT_DEBIT_CARD", - "FIAT_ON_RAMP_PAYMENT_METHOD_APPLE_PAY", - "FIAT_ON_RAMP_PAYMENT_METHOD_GBP_BANK_TRANSFER", - "FIAT_ON_RAMP_PAYMENT_METHOD_GBP_OPEN_BANKING_PAYMENT", - "FIAT_ON_RAMP_PAYMENT_METHOD_GOOGLE_PAY", - "FIAT_ON_RAMP_PAYMENT_METHOD_SEPA_BANK_TRANSFER", - "FIAT_ON_RAMP_PAYMENT_METHOD_PIX_INSTANT_PAYMENT", - "FIAT_ON_RAMP_PAYMENT_METHOD_PAYPAL", - "FIAT_ON_RAMP_PAYMENT_METHOD_VENMO", - "FIAT_ON_RAMP_PAYMENT_METHOD_MOONPAY_BALANCE", - "FIAT_ON_RAMP_PAYMENT_METHOD_CRYPTO_ACCOUNT", - "FIAT_ON_RAMP_PAYMENT_METHOD_FIAT_WALLET", - "FIAT_ON_RAMP_PAYMENT_METHOD_ACH_BANK_ACCOUNT" - ] - }, - "FiatOnRampProvider": { - "type": "string", - "enum": [ - "FIAT_ON_RAMP_PROVIDER_COINBASE", - "FIAT_ON_RAMP_PROVIDER_MOONPAY" - ] + "required": ["otpType", "contact"] }, - "GetActivitiesRequest": { + "InitOtpIntentV2": { "type": "object", "properties": { - "organizationId": { + "otpType": { "type": "string", - "description": "Unique identifier for a given organization." + "description": "Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL" + }, + "contact": { + "type": "string", + "description": "Email or phone number to send the OTP code to" + }, + "otpLength": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Optional length of the OTP code. Default = 9" + }, + "appName": { + "type": "string", + "description": "The name of the application. This field is required and will be used in email notifications if an email template is not provided." + }, + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParamsV2", + "x-nullable": true, + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + }, + "smsCustomization": { + "$ref": "#/definitions/SmsCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing SMS message. If not provided, the default SMS message will be used." + }, + "userIdentifier": { + "type": "string", + "x-nullable": true, + "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "alphanumeric": { + "type": "boolean", + "x-nullable": true, + "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" }, - "filterByStatus": { - "type": "array", - "items": { - "$ref": "#/definitions/ActivityStatus" - }, - "description": "Array of activity statuses filtering which activities will be listed in the response." + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" }, - "paginationOptions": { - "$ref": "#/definitions/Pagination", - "description": "Parameters used for cursor-based pagination." + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)" }, - "filterByType": { - "type": "array", - "items": { - "$ref": "#/definitions/ActivityType" - }, - "description": "Array of activity types filtering which activities will be listed in the response." - } - }, - "required": ["organizationId"] - }, - "GetActivitiesResponse": { - "type": "object", - "properties": { - "activities": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Activity" - }, - "description": "A list of activities." + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, - "required": ["activities"] + "required": ["otpType", "contact", "appName"] }, - "GetActivityRequest": { + "InitOtpIntentV3": { "type": "object", "properties": { - "organizationId": { + "otpType": { "type": "string", - "description": "Unique identifier for a given organization." + "description": "Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL" }, - "activityId": { + "contact": { "type": "string", - "description": "Unique identifier for a given activity object." - } - }, - "required": ["organizationId", "activityId"] - }, - "GetApiKeyRequest": { - "type": "object", - "properties": { - "organizationId": { + "description": "Email or phone number to send the OTP code to" + }, + "appName": { "type": "string", - "description": "Unique identifier for a given organization." + "description": "The name of the application." }, - "apiKeyId": { + "otpLength": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Optional length of the OTP code. Default = 9" + }, + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParamsV2", + "x-nullable": true, + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + }, + "smsCustomization": { + "$ref": "#/definitions/SmsCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing SMS message. If not provided, the default sms message will be used." + }, + "userIdentifier": { "type": "string", - "description": "Unique identifier for a given API key." - } - }, - "required": ["organizationId", "apiKeyId"] - }, - "GetApiKeyResponse": { - "type": "object", - "properties": { - "apiKey": { - "$ref": "#/definitions/ApiKey", - "description": "An API key." - } - }, - "required": ["apiKey"] - }, - "GetApiKeysRequest": { - "type": "object", - "properties": { - "organizationId": { + "x-nullable": true, + "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." + }, + "sendFromEmailAddress": { "type": "string", - "description": "Unique identifier for a given organization." + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" }, - "userId": { + "alphanumeric": { + "type": "boolean", + "x-nullable": true, + "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). If set to false, OTP code will only be numeric. Default = true" + }, + "sendFromEmailSenderName": { "type": "string", "x-nullable": true, - "description": "Unique identifier for a given user." - } - }, - "required": ["organizationId"] - }, - "GetApiKeysResponse": { - "type": "object", - "properties": { - "apiKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ApiKey" - }, - "description": "A list of API keys." + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, - "required": ["apiKeys"] + "required": ["otpType", "contact", "appName"] }, - "GetAppProofsRequest": { + "InitOtpRequest": { "type": "object", "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_INIT_OTP_V3"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, "organizationId": { "type": "string", "description": "Unique identifier for a given Organization." }, - "activityId": { - "type": "string", - "description": "Unique identifier for a given activity." + "parameters": { + "$ref": "#/definitions/InitOtpIntentV3" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": ["organizationId", "activityId"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "GetAppProofsResponse": { + "InitOtpResult": { "type": "object", "properties": { - "appProofs": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/AppProof" - } + "otpId": { + "type": "string", + "description": "Unique identifier for an OTP authentication" } }, - "required": ["appProofs"] + "required": ["otpId"] }, - "GetAuthenticatorRequest": { + "InitOtpResultV2": { "type": "object", "properties": { - "organizationId": { + "otpId": { "type": "string", - "description": "Unique identifier for a given organization." + "description": "Unique identifier for an OTP flow" }, - "authenticatorId": { + "otpEncryptionTargetBundle": { "type": "string", - "description": "Unique identifier for a given authenticator." - } - }, - "required": ["organizationId", "authenticatorId"] - }, - "GetAuthenticatorResponse": { - "type": "object", - "properties": { - "authenticator": { - "$ref": "#/definitions/Authenticator", - "description": "An authenticator." + "description": "Signed bundle containing a target encryption key to use when submitting OTP codes." } }, - "required": ["authenticator"] + "required": ["otpId", "otpEncryptionTargetBundle"] }, - "GetAuthenticatorsRequest": { + "InitUserEmailRecoveryIntent": { "type": "object", "properties": { - "organizationId": { + "email": { "type": "string", - "description": "Unique identifier for a given organization." + "description": "Email of the user starting recovery" }, - "userId": { + "targetPublicKey": { "type": "string", - "description": "Unique identifier for a given user." + "description": "Client-side public key generated by the user, to which the recovery bundle will be encrypted." + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used." + }, + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, - "required": ["organizationId", "userId"] + "required": ["email", "targetPublicKey"] }, - "GetAuthenticatorsResponse": { + "InitUserEmailRecoveryIntentV2": { "type": "object", "properties": { - "authenticators": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Authenticator" - }, - "description": "A list of authenticators." + "email": { + "type": "string", + "description": "Email of the user starting recovery" + }, + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the recovery bundle will be encrypted." + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used." + }, + "emailCustomization": { + "$ref": "#/definitions/EmailAuthCustomizationParams", + "description": "Parameters for customizing emails. If not provided, the default email will be used. Note that `app_name` is required." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, - "required": ["authenticators"] + "required": ["email", "targetPublicKey", "emailCustomization"] }, - "GetBootProofRequest": { + "InitUserEmailRecoveryRequest": { "type": "object", "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, "organizationId": { "type": "string", "description": "Unique identifier for a given Organization." }, - "ephemeralKey": { - "type": "string", - "description": "Hex encoded ephemeral public key." + "parameters": { + "$ref": "#/definitions/InitUserEmailRecoveryIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": ["organizationId", "ephemeralKey"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "GetGasUsageRequest": { + "InitUserEmailRecoveryResult": { "type": "object", "properties": { - "organizationId": { + "userId": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "Unique identifier for the user being recovered." } }, - "required": ["organizationId"] + "required": ["userId"] }, - "GetGasUsageResponse": { + "Intent": { "type": "object", "properties": { - "windowDurationMinutes": { - "type": "integer", - "format": "int32", - "description": "The window duration (in minutes) for the organization or sub-organization." + "createOrganizationIntent": { + "$ref": "#/definitions/CreateOrganizationIntent" + }, + "createAuthenticatorsIntent": { + "$ref": "#/definitions/CreateAuthenticatorsIntent" + }, + "createUsersIntent": { + "$ref": "#/definitions/CreateUsersIntent" + }, + "createPrivateKeysIntent": { + "$ref": "#/definitions/CreatePrivateKeysIntent" + }, + "signRawPayloadIntent": { + "$ref": "#/definitions/SignRawPayloadIntent" + }, + "createInvitationsIntent": { + "$ref": "#/definitions/CreateInvitationsIntent" + }, + "acceptInvitationIntent": { + "$ref": "#/definitions/AcceptInvitationIntent" + }, + "createPolicyIntent": { + "$ref": "#/definitions/CreatePolicyIntent" + }, + "disablePrivateKeyIntent": { + "$ref": "#/definitions/DisablePrivateKeyIntent" + }, + "deleteUsersIntent": { + "$ref": "#/definitions/DeleteUsersIntent" + }, + "deleteAuthenticatorsIntent": { + "$ref": "#/definitions/DeleteAuthenticatorsIntent" + }, + "deleteInvitationIntent": { + "$ref": "#/definitions/DeleteInvitationIntent" + }, + "deleteOrganizationIntent": { + "$ref": "#/definitions/DeleteOrganizationIntent" + }, + "deletePolicyIntent": { + "$ref": "#/definitions/DeletePolicyIntent" + }, + "createUserTagIntent": { + "$ref": "#/definitions/CreateUserTagIntent" + }, + "deleteUserTagsIntent": { + "$ref": "#/definitions/DeleteUserTagsIntent" + }, + "signTransactionIntent": { + "$ref": "#/definitions/SignTransactionIntent" + }, + "createApiKeysIntent": { + "$ref": "#/definitions/CreateApiKeysIntent" + }, + "deleteApiKeysIntent": { + "$ref": "#/definitions/DeleteApiKeysIntent" + }, + "approveActivityIntent": { + "$ref": "#/definitions/ApproveActivityIntent" + }, + "rejectActivityIntent": { + "$ref": "#/definitions/RejectActivityIntent" + }, + "createPrivateKeyTagIntent": { + "$ref": "#/definitions/CreatePrivateKeyTagIntent" + }, + "deletePrivateKeyTagsIntent": { + "$ref": "#/definitions/DeletePrivateKeyTagsIntent" + }, + "createPolicyIntentV2": { + "$ref": "#/definitions/CreatePolicyIntentV2" + }, + "setPaymentMethodIntent": { + "$ref": "#/definitions/SetPaymentMethodIntent" + }, + "activateBillingTierIntent": { + "$ref": "#/definitions/ActivateBillingTierIntent" + }, + "deletePaymentMethodIntent": { + "$ref": "#/definitions/DeletePaymentMethodIntent" + }, + "createPolicyIntentV3": { + "$ref": "#/definitions/CreatePolicyIntentV3" + }, + "createApiOnlyUsersIntent": { + "$ref": "#/definitions/CreateApiOnlyUsersIntent" + }, + "updateRootQuorumIntent": { + "$ref": "#/definitions/UpdateRootQuorumIntent" + }, + "updateUserTagIntent": { + "$ref": "#/definitions/UpdateUserTagIntent" + }, + "updatePrivateKeyTagIntent": { + "$ref": "#/definitions/UpdatePrivateKeyTagIntent" + }, + "createAuthenticatorsIntentV2": { + "$ref": "#/definitions/CreateAuthenticatorsIntentV2" + }, + "acceptInvitationIntentV2": { + "$ref": "#/definitions/AcceptInvitationIntentV2" + }, + "createOrganizationIntentV2": { + "$ref": "#/definitions/CreateOrganizationIntentV2" + }, + "createUsersIntentV2": { + "$ref": "#/definitions/CreateUsersIntentV2" + }, + "createSubOrganizationIntent": { + "$ref": "#/definitions/CreateSubOrganizationIntent" + }, + "createSubOrganizationIntentV2": { + "$ref": "#/definitions/CreateSubOrganizationIntentV2" + }, + "updateAllowedOriginsIntent": { + "$ref": "#/definitions/UpdateAllowedOriginsIntent" + }, + "createPrivateKeysIntentV2": { + "$ref": "#/definitions/CreatePrivateKeysIntentV2" + }, + "updateUserIntent": { + "$ref": "#/definitions/UpdateUserIntent" + }, + "updatePolicyIntent": { + "$ref": "#/definitions/UpdatePolicyIntent" + }, + "setPaymentMethodIntentV2": { + "$ref": "#/definitions/SetPaymentMethodIntentV2" + }, + "createSubOrganizationIntentV3": { + "$ref": "#/definitions/CreateSubOrganizationIntentV3" + }, + "createWalletIntent": { + "$ref": "#/definitions/CreateWalletIntent" + }, + "createWalletAccountsIntent": { + "$ref": "#/definitions/CreateWalletAccountsIntent" + }, + "initUserEmailRecoveryIntent": { + "$ref": "#/definitions/InitUserEmailRecoveryIntent" + }, + "recoverUserIntent": { + "$ref": "#/definitions/RecoverUserIntent" + }, + "setOrganizationFeatureIntent": { + "$ref": "#/definitions/SetOrganizationFeatureIntent" + }, + "removeOrganizationFeatureIntent": { + "$ref": "#/definitions/RemoveOrganizationFeatureIntent" + }, + "signRawPayloadIntentV2": { + "$ref": "#/definitions/SignRawPayloadIntentV2" + }, + "signTransactionIntentV2": { + "$ref": "#/definitions/SignTransactionIntentV2" + }, + "exportPrivateKeyIntent": { + "$ref": "#/definitions/ExportPrivateKeyIntent" + }, + "exportWalletIntent": { + "$ref": "#/definitions/ExportWalletIntent" + }, + "createSubOrganizationIntentV4": { + "$ref": "#/definitions/CreateSubOrganizationIntentV4" + }, + "emailAuthIntent": { + "$ref": "#/definitions/EmailAuthIntent" + }, + "exportWalletAccountIntent": { + "$ref": "#/definitions/ExportWalletAccountIntent" + }, + "initImportWalletIntent": { + "$ref": "#/definitions/InitImportWalletIntent" + }, + "importWalletIntent": { + "$ref": "#/definitions/ImportWalletIntent" + }, + "initImportPrivateKeyIntent": { + "$ref": "#/definitions/InitImportPrivateKeyIntent" + }, + "importPrivateKeyIntent": { + "$ref": "#/definitions/ImportPrivateKeyIntent" + }, + "createPoliciesIntent": { + "$ref": "#/definitions/CreatePoliciesIntent" + }, + "signRawPayloadsIntent": { + "$ref": "#/definitions/SignRawPayloadsIntent" + }, + "createReadOnlySessionIntent": { + "$ref": "#/definitions/CreateReadOnlySessionIntent" + }, + "createOauthProvidersIntent": { + "$ref": "#/definitions/CreateOauthProvidersIntent" + }, + "deleteOauthProvidersIntent": { + "$ref": "#/definitions/DeleteOauthProvidersIntent" + }, + "createSubOrganizationIntentV5": { + "$ref": "#/definitions/CreateSubOrganizationIntentV5" + }, + "oauthIntent": { + "$ref": "#/definitions/OauthIntent" + }, + "createApiKeysIntentV2": { + "$ref": "#/definitions/CreateApiKeysIntentV2" }, - "windowLimitUsd": { - "type": "string", - "description": "The window limit (in USD) for the organization or sub-organization." + "createReadWriteSessionIntent": { + "$ref": "#/definitions/CreateReadWriteSessionIntent" }, - "usageUsd": { - "type": "string", - "description": "The total gas usage (in USD) of all sponsored transactions processed over the last `window_duration_minutes`" - } - }, - "required": ["windowDurationMinutes", "windowLimitUsd", "usageUsd"] - }, - "GetLatestBootProofRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "emailAuthIntentV2": { + "$ref": "#/definitions/EmailAuthIntentV2" }, - "appName": { - "type": "string", - "description": "Name of enclave app." - } - }, - "required": ["organizationId", "appName"] - }, - "GetNoncesRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "createSubOrganizationIntentV6": { + "$ref": "#/definitions/CreateSubOrganizationIntentV6" }, - "address": { - "type": "string", - "description": "The Ethereum address to query nonces for." + "deletePrivateKeysIntent": { + "$ref": "#/definitions/DeletePrivateKeysIntent" }, - "caip2": { - "type": "string", - "enum": [ - "eip155:1", - "eip155:11155111", - "eip155:8453", - "eip155:84532", - "eip155:137", - "eip155:80002" - ], - "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." + "deleteWalletsIntent": { + "$ref": "#/definitions/DeleteWalletsIntent" }, - "nonce": { - "type": "boolean", - "description": "Whether to fetch the standard on-chain nonce." + "createReadWriteSessionIntentV2": { + "$ref": "#/definitions/CreateReadWriteSessionIntentV2" }, - "gasStationNonce": { - "type": "boolean", - "description": "Whether to fetch the gas station nonce used for sponsored transactions." - } - }, - "required": ["organizationId", "address", "caip2"] - }, - "GetNoncesResponse": { - "type": "object", - "properties": { - "nonce": { - "type": "string", - "format": "uint64", - "x-nullable": true, - "description": "The standard on-chain nonce for the address, if requested." + "deleteSubOrganizationIntent": { + "$ref": "#/definitions/DeleteSubOrganizationIntent" }, - "gasStationNonce": { - "type": "string", - "format": "uint64", - "x-nullable": true, - "description": "The gas station nonce for sponsored transactions, if requested." - } - } - }, - "GetOauth2CredentialRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "initOtpAuthIntent": { + "$ref": "#/definitions/InitOtpAuthIntent" }, - "oauth2CredentialId": { - "type": "string", - "description": "Unique identifier for a given OAuth 2.0 Credential." - } - }, - "required": ["organizationId", "oauth2CredentialId"] - }, - "GetOauth2CredentialResponse": { - "type": "object", - "properties": { - "oauth2Credential": { - "$ref": "#/definitions/Oauth2Credential" - } - }, - "required": ["oauth2Credential"] - }, - "GetOauthProvidersRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "otpAuthIntent": { + "$ref": "#/definitions/OtpAuthIntent" }, - "userId": { - "type": "string", - "x-nullable": true, - "description": "Unique identifier for a given user." - } - }, - "required": ["organizationId"] - }, - "GetOauthProvidersResponse": { - "type": "object", - "properties": { - "oauthProviders": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/OauthProvider" - }, - "description": "A list of Oauth providers." - } - }, - "required": ["oauthProviders"] - }, - "GetOnRampTransactionStatusRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "createSubOrganizationIntentV7": { + "$ref": "#/definitions/CreateSubOrganizationIntentV7" }, - "transactionId": { - "type": "string", - "description": "The unique identifier for the fiat on ramp transaction." + "updateWalletIntent": { + "$ref": "#/definitions/UpdateWalletIntent" }, - "refresh": { - "type": "boolean", - "x-nullable": true, - "description": "Optional flag to specify if the transaction status should be refreshed from the fiat on ramp provider. Default = false." - } - }, - "required": ["organizationId", "transactionId"] - }, - "GetOnRampTransactionStatusResponse": { - "type": "object", - "properties": { - "transactionStatus": { - "type": "string", - "description": "The status of the fiat on ramp transaction." - } - }, - "required": ["transactionStatus"] - }, - "GetOrganizationConfigsRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." - } - }, - "required": ["organizationId"] - }, - "GetOrganizationConfigsResponse": { - "type": "object", - "properties": { - "configs": { - "$ref": "#/definitions/Config", - "description": "Organization configs including quorum settings and organization features." - } - }, - "required": ["configs"] - }, - "GetPoliciesRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." - } - }, - "required": ["organizationId"] - }, - "GetPoliciesResponse": { - "type": "object", - "properties": { - "policies": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Policy" - }, - "description": "A list of policies." - } - }, - "required": ["policies"] - }, - "GetPolicyEvaluationsRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "updatePolicyIntentV2": { + "$ref": "#/definitions/UpdatePolicyIntentV2" }, - "activityId": { - "type": "string", - "description": "Unique identifier for a given activity." - } - }, - "required": ["organizationId", "activityId"] - }, - "GetPolicyEvaluationsResponse": { - "type": "object", - "properties": { - "policyEvaluations": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/activity.v1.PolicyEvaluation" - } - } - }, - "required": ["policyEvaluations"] - }, - "GetPolicyRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "createUsersIntentV3": { + "$ref": "#/definitions/CreateUsersIntentV3" + }, + "initOtpAuthIntentV2": { + "$ref": "#/definitions/InitOtpAuthIntentV2" + }, + "initOtpIntent": { + "$ref": "#/definitions/InitOtpIntent" }, - "policyId": { - "type": "string", - "description": "Unique identifier for a given policy." - } - }, - "required": ["organizationId", "policyId"] - }, - "GetPolicyResponse": { - "type": "object", - "properties": { - "policy": { - "$ref": "#/definitions/Policy", - "description": "Object that codifies rules defining the actions that are permissible within an organization." - } - }, - "required": ["policy"] - }, - "GetPrivateKeyRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "verifyOtpIntent": { + "$ref": "#/definitions/VerifyOtpIntent" }, - "privateKeyId": { - "type": "string", - "description": "Unique identifier for a given private key." - } - }, - "required": ["organizationId", "privateKeyId"] - }, - "GetPrivateKeyResponse": { - "type": "object", - "properties": { - "privateKey": { - "$ref": "#/definitions/PrivateKey", - "description": "Cryptographic public/private key pair that can be used for cryptocurrency needs or more generalized encryption." - } - }, - "required": ["privateKey"] - }, - "GetPrivateKeysRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." - } - }, - "required": ["organizationId"] - }, - "GetPrivateKeysResponse": { - "type": "object", - "properties": { - "privateKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/PrivateKey" - }, - "description": "A list of private keys." - } - }, - "required": ["privateKeys"] - }, - "GetSendTransactionStatusRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "otpLoginIntent": { + "$ref": "#/definitions/OtpLoginIntent" }, - "sendTransactionStatusId": { - "type": "string", - "description": "The unique identifier of a send transaction request." - } - }, - "required": ["organizationId", "sendTransactionStatusId"] - }, - "GetSendTransactionStatusResponse": { - "type": "object", - "properties": { - "txStatus": { - "type": "string", - "description": "The current status of the send transaction." + "stampLoginIntent": { + "$ref": "#/definitions/StampLoginIntent" }, - "eth": { - "$ref": "#/definitions/EthSendTransactionStatus", - "description": "Ethereum-specific transaction status." + "oauthLoginIntent": { + "$ref": "#/definitions/OauthLoginIntent" }, - "txError": { - "type": "string", - "x-nullable": true, - "description": "The error encountered when broadcasting or confirming the transaction, if any." + "updateUserNameIntent": { + "$ref": "#/definitions/UpdateUserNameIntent" }, - "error": { - "$ref": "#/definitions/TxError", - "x-nullable": true, - "description": "Structured error information including revert details, if available." - } - }, - "required": ["txStatus"] - }, - "GetSmartContractInterfaceRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "updateUserEmailIntent": { + "$ref": "#/definitions/UpdateUserEmailIntent" }, - "smartContractInterfaceId": { - "type": "string", - "description": "Unique identifier for a given smart contract interface." - } - }, - "required": ["organizationId", "smartContractInterfaceId"] - }, - "GetSmartContractInterfaceResponse": { - "type": "object", - "properties": { - "smartContractInterface": { - "$ref": "#/definitions/data.v1.SmartContractInterface", - "description": "Object to be used in conjunction with policies to guard transaction signing." - } - }, - "required": ["smartContractInterface"] - }, - "GetSmartContractInterfacesRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." - } - }, - "required": ["organizationId"] - }, - "GetSmartContractInterfacesResponse": { - "type": "object", - "properties": { - "smartContractInterfaces": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/data.v1.SmartContractInterface" - }, - "description": "A list of smart contract interfaces." - } - }, - "required": ["smartContractInterfaces"] - }, - "GetSubOrgIdsRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for the parent organization. This is used to find sub-organizations within it." + "updateUserPhoneNumberIntent": { + "$ref": "#/definitions/UpdateUserPhoneNumberIntent" }, - "filterType": { - "type": "string", - "description": "Specifies the type of filter to apply, i.e 'CREDENTIAL_ID', 'NAME', 'USERNAME', 'EMAIL', 'PHONE_NUMBER', 'OIDC_TOKEN', 'WALLET_ACCOUNT_ADDRESS' or 'PUBLIC_KEY'" + "initFiatOnRampIntent": { + "$ref": "#/definitions/InitFiatOnRampIntent" }, - "filterValue": { - "type": "string", - "description": "The value of the filter to apply for the specified type. For example, a specific email or name string." + "createSmartContractInterfaceIntent": { + "$ref": "#/definitions/CreateSmartContractInterfaceIntent" }, - "paginationOptions": { - "$ref": "#/definitions/Pagination", - "description": "Parameters used for cursor-based pagination." - } - }, - "required": ["organizationId"] - }, - "GetSubOrgIdsResponse": { - "type": "object", - "properties": { - "organizationIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of unique identifiers for the matching sub-organizations." - } - }, - "required": ["organizationIds"] - }, - "GetUserRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "deleteSmartContractInterfaceIntent": { + "$ref": "#/definitions/DeleteSmartContractInterfaceIntent" }, - "userId": { - "type": "string", - "description": "Unique identifier for a given user." - } - }, - "required": ["organizationId", "userId"] - }, - "GetUserResponse": { - "type": "object", - "properties": { - "user": { - "$ref": "#/definitions/User", - "description": "Web and/or API user within your organization." - } - }, - "required": ["user"] - }, - "GetUsersRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." - } - }, - "required": ["organizationId"] - }, - "GetUsersResponse": { - "type": "object", - "properties": { - "users": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/User" - }, - "description": "A list of users." - } - }, - "required": ["users"] - }, - "GetVerifiedSubOrgIdsRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for the parent organization. This is used to find sub-organizations within it." + "enableAuthProxyIntent": { + "$ref": "#/definitions/EnableAuthProxyIntent" }, - "filterType": { - "type": "string", - "description": "Specifies the type of filter to apply, i.e 'EMAIL', 'PHONE_NUMBER'." + "disableAuthProxyIntent": { + "$ref": "#/definitions/DisableAuthProxyIntent" }, - "filterValue": { - "type": "string", - "description": "The value of the filter to apply for the specified type. For example, a specific email or phone number string." + "updateAuthProxyConfigIntent": { + "$ref": "#/definitions/UpdateAuthProxyConfigIntent" }, - "paginationOptions": { - "$ref": "#/definitions/Pagination", - "description": "Parameters used for cursor-based pagination." - } - }, - "required": ["organizationId"] - }, - "GetVerifiedSubOrgIdsResponse": { - "type": "object", - "properties": { - "organizationIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of unique identifiers for the matching sub-organizations." - } - }, - "required": ["organizationIds"] - }, - "GetWalletAccountRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "createOauth2CredentialIntent": { + "$ref": "#/definitions/CreateOauth2CredentialIntent" }, - "walletId": { - "type": "string", - "description": "Unique identifier for a given wallet." + "updateOauth2CredentialIntent": { + "$ref": "#/definitions/UpdateOauth2CredentialIntent" }, - "address": { - "type": "string", - "x-nullable": true, - "description": "Address corresponding to a wallet account." + "deleteOauth2CredentialIntent": { + "$ref": "#/definitions/DeleteOauth2CredentialIntent" }, - "path": { - "type": "string", - "x-nullable": true, - "description": "Path corresponding to a wallet account." - } - }, - "required": ["organizationId", "walletId"] - }, - "GetWalletAccountResponse": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/WalletAccount", - "description": "The resulting wallet account." - } - }, - "required": ["account"] - }, - "GetWalletAccountsRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "oauth2AuthenticateIntent": { + "$ref": "#/definitions/Oauth2AuthenticateIntent" }, - "walletId": { - "type": "string", - "x-nullable": true, - "description": "Unique identifier for a given wallet. If not provided, all accounts for the organization will be returned." + "deleteWalletAccountsIntent": { + "$ref": "#/definitions/DeleteWalletAccountsIntent" }, - "includeWalletDetails": { - "type": "boolean", - "x-nullable": true, - "description": "Optional flag to specify if the wallet details should be included in the response. Default = false." + "deletePoliciesIntent": { + "$ref": "#/definitions/DeletePoliciesIntent" }, - "paginationOptions": { - "$ref": "#/definitions/Pagination", - "description": "Parameters used for cursor-based pagination." - } - }, - "required": ["organizationId"] - }, - "GetWalletAccountsResponse": { - "type": "object", - "properties": { - "accounts": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/WalletAccount" - }, - "description": "A list of accounts generated from a wallet that share a common seed." - } - }, - "required": ["accounts"] - }, - "GetWalletAddressBalancesRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "ethSendRawTransactionIntent": { + "$ref": "#/definitions/EthSendRawTransactionIntent" }, - "address": { - "type": "string", - "description": "Address corresponding to a wallet account." + "ethSendTransactionIntent": { + "$ref": "#/definitions/EthSendTransactionIntent" }, - "caip2": { - "type": "string", - "enum": [ - "eip155:1", - "eip155:11155111", - "eip155:8453", - "eip155:84532", - "eip155:137", - "eip155:80002" - ], - "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." - } - }, - "required": ["organizationId", "address", "caip2"] - }, - "GetWalletAddressBalancesResponse": { - "type": "object", - "properties": { - "balances": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/AssetBalance" - }, - "description": "List of asset balances" - } - } - }, - "GetWalletRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "createFiatOnRampCredentialIntent": { + "$ref": "#/definitions/CreateFiatOnRampCredentialIntent" }, - "walletId": { - "type": "string", - "description": "Unique identifier for a given wallet." - } - }, - "required": ["organizationId", "walletId"] - }, - "GetWalletResponse": { - "type": "object", - "properties": { - "wallet": { - "$ref": "#/definitions/Wallet", - "description": "A collection of deterministically generated cryptographic public / private key pairs that share a common seed." - } - }, - "required": ["wallet"] - }, - "GetWalletsRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." - } - }, - "required": ["organizationId"] - }, - "GetWalletsResponse": { - "type": "object", - "properties": { - "wallets": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Wallet" - }, - "description": "A list of wallets." - } - }, - "required": ["wallets"] - }, - "GetWhoamiRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization. If the request is being made by a WebAuthN user and their sub-organization ID is unknown, this can be the parent organization ID; using the sub-organization ID when possible is preferred due to performance reasons." - } - }, - "required": ["organizationId"] - }, - "GetWhoamiResponse": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given organization." + "updateFiatOnRampCredentialIntent": { + "$ref": "#/definitions/UpdateFiatOnRampCredentialIntent" }, - "organizationName": { - "type": "string", - "description": "Human-readable name for an organization." + "deleteFiatOnRampCredentialIntent": { + "$ref": "#/definitions/DeleteFiatOnRampCredentialIntent" }, - "userId": { - "type": "string", - "description": "Unique identifier for a given user." + "emailAuthIntentV3": { + "$ref": "#/definitions/EmailAuthIntentV3" }, - "username": { - "type": "string", - "description": "Human-readable name for a user." - } - }, - "required": ["organizationId", "organizationName", "userId", "username"] - }, - "HashFunction": { - "type": "string", - "enum": [ - "HASH_FUNCTION_NO_OP", - "HASH_FUNCTION_SHA256", - "HASH_FUNCTION_KECCAK256", - "HASH_FUNCTION_NOT_APPLICABLE" - ] - }, - "ImportPrivateKeyIntent": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "The ID of the User importing a Private Key." + "initUserEmailRecoveryIntentV2": { + "$ref": "#/definitions/InitUserEmailRecoveryIntentV2" }, - "privateKeyName": { - "type": "string", - "description": "Human-readable name for a Private Key." + "initOtpIntentV2": { + "$ref": "#/definitions/InitOtpIntentV2" }, - "encryptedBundle": { - "type": "string", - "description": "Bundle containing a raw private key encrypted to the enclave's target public key." + "initOtpAuthIntentV3": { + "$ref": "#/definitions/InitOtpAuthIntentV3" }, - "curve": { - "$ref": "#/definitions/Curve", - "description": "Cryptographic Curve used to generate a given Private Key." + "upsertGasUsageConfigIntent": { + "$ref": "#/definitions/UpsertGasUsageConfigIntent" }, - "addressFormats": { - "type": "array", - "items": { - "$ref": "#/definitions/AddressFormat" - }, - "description": "Cryptocurrency-specific formats for a derived address (e.g., Ethereum)." - } - }, - "required": [ - "userId", - "privateKeyName", - "encryptedBundle", - "curve", - "addressFormats" - ] - }, - "ImportPrivateKeyRequest": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_IMPORT_PRIVATE_KEY"] + "createTvcAppIntent": { + "$ref": "#/definitions/CreateTvcAppIntent" }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "createTvcDeploymentIntent": { + "$ref": "#/definitions/CreateTvcDeploymentIntent" }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "createTvcManifestApprovalsIntent": { + "$ref": "#/definitions/CreateTvcManifestApprovalsIntent" }, - "parameters": { - "$ref": "#/definitions/ImportPrivateKeyIntent" + "solSendTransactionIntent": { + "$ref": "#/definitions/SolSendTransactionIntent" }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "ImportPrivateKeyResult": { - "type": "object", - "properties": { - "privateKeyId": { - "type": "string", - "description": "Unique identifier for a Private Key." + "initOtpIntentV3": { + "$ref": "#/definitions/InitOtpIntentV3" }, - "addresses": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/activity.v1.Address" - }, - "description": "A list of addresses." - } - }, - "required": ["privateKeyId", "addresses"] - }, - "ImportWalletIntent": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "The ID of the User importing a Wallet." + "verifyOtpIntentV2": { + "$ref": "#/definitions/VerifyOtpIntentV2" }, - "walletName": { - "type": "string", - "description": "Human-readable name for a Wallet." + "otpLoginIntentV2": { + "$ref": "#/definitions/OtpLoginIntentV2" }, - "encryptedBundle": { - "type": "string", - "description": "Bundle containing a wallet mnemonic encrypted to the enclave's target public key." + "updateOrganizationNameIntent": { + "$ref": "#/definitions/UpdateOrganizationNameIntent" }, - "accounts": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/WalletAccountParams" - }, - "description": "A list of wallet Accounts." - } - }, - "required": ["userId", "walletName", "encryptedBundle", "accounts"] - }, - "ImportWalletRequest": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_IMPORT_WALLET"] + "createSubOrganizationIntentV8": { + "$ref": "#/definitions/CreateSubOrganizationIntentV8" }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "createOauthProvidersIntentV2": { + "$ref": "#/definitions/CreateOauthProvidersIntentV2" }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "createUsersIntentV4": { + "$ref": "#/definitions/CreateUsersIntentV4" }, - "parameters": { - "$ref": "#/definitions/ImportWalletIntent" + "createWebhookEndpointIntent": { + "$ref": "#/definitions/CreateWebhookEndpointIntent" }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "ImportWalletResult": { - "type": "object", - "properties": { - "walletId": { - "type": "string", - "description": "Unique identifier for a Wallet." + "updateWebhookEndpointIntent": { + "$ref": "#/definitions/UpdateWebhookEndpointIntent" }, - "addresses": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of account addresses." - } - }, - "required": ["walletId", "addresses"] - }, - "InitFiatOnRampIntent": { - "type": "object", - "properties": { - "onrampProvider": { - "$ref": "#/definitions/FiatOnRampProvider", - "description": "Enum to specifiy which on-ramp provider to use" + "deleteWebhookEndpointIntent": { + "$ref": "#/definitions/DeleteWebhookEndpointIntent" }, - "walletAddress": { - "type": "string", - "description": "Destination wallet address for the buy transaction." + "setIpAllowlistIntent": { + "$ref": "#/definitions/SetIpAllowlistIntent" }, - "network": { - "$ref": "#/definitions/FiatOnRampBlockchainNetwork", - "description": "Blockchain network to be used for the transaction, e.g., bitcoin, ethereum. Maps to MoonPay's network or Coinbase's defaultNetwork." + "removeIpAllowlistIntent": { + "$ref": "#/definitions/RemoveIpAllowlistIntent" }, - "cryptoCurrencyCode": { - "$ref": "#/definitions/FiatOnRampCryptoCurrency", - "description": "Code for the cryptocurrency to be purchased, e.g., btc, eth. Maps to MoonPay's currencyCode or Coinbase's defaultAsset." + "updateTvcAppLiveDeploymentIntent": { + "$ref": "#/definitions/UpdateTvcAppLiveDeploymentIntent" }, - "fiatCurrencyCode": { - "$ref": "#/definitions/FiatOnRampCurrency", - "x-nullable": true, - "description": "Code for the fiat currency to be used in the transaction, e.g., USD, EUR." + "deleteTvcDeploymentIntent": { + "$ref": "#/definitions/DeleteTvcDeploymentIntent" }, - "fiatCurrencyAmount": { - "type": "string", - "x-nullable": true, - "description": "Specifies a preset fiat amount for the transaction, e.g., '100'. Must be greater than '20'. If not provided, the user will be prompted to enter an amount." + "deleteTvcAppAndDeploymentsIntent": { + "$ref": "#/definitions/DeleteTvcAppAndDeploymentsIntent" }, - "paymentMethod": { - "$ref": "#/definitions/FiatOnRampPaymentMethod", - "x-nullable": true, - "description": "Pre-selected payment method, e.g., CREDIT_DEBIT_CARD, APPLE_PAY. Validated against the chosen provider." + "restoreTvcDeploymentIntent": { + "$ref": "#/definitions/RestoreTvcDeploymentIntent" }, - "countryCode": { - "type": "string", - "x-nullable": true, - "description": "ISO 3166-1 two-digit country code for Coinbase representing the purchasing user’s country of residence, e.g., US, GB." + "sparkSignFrostIntent": { + "$ref": "#/definitions/SparkSignFrostIntent" }, - "countrySubdivisionCode": { - "type": "string", - "x-nullable": true, - "description": "ISO 3166-2 two-digit country subdivision code for Coinbase representing the purchasing user’s subdivision of residence within their country, e.g. NY. Required if country_code=US." + "sparkPrepareTransferIntent": { + "$ref": "#/definitions/SparkPrepareTransferIntent" }, - "sandboxMode": { - "type": "boolean", - "x-nullable": true, - "description": "Optional flag to indicate whether to use the sandbox mode to simulate transactions for the on-ramp provider. Default is false." + "sparkClaimTransferIntent": { + "$ref": "#/definitions/SparkClaimTransferIntent" }, - "urlForSignature": { - "type": "string", - "x-nullable": true, - "description": "Optional MoonPay Widget URL to sign when using MoonPay client SDKs with URL Signing enabled." + "sparkPrepareLightningReceiveIntent": { + "$ref": "#/definitions/SparkPrepareLightningReceiveIntent" + }, + "postTvcQuorumKeyShareIntent": { + "$ref": "#/definitions/PostTvcQuorumKeyShareIntent" } - }, - "required": [ - "onrampProvider", - "walletAddress", - "network", - "cryptoCurrencyCode" - ] + } }, - "InitFiatOnRampRequest": { + "InvitationParams": { "type": "object", "properties": { - "type": { + "receiverUserName": { "type": "string", - "enum": ["ACTIVITY_TYPE_INIT_FIAT_ON_RAMP"] + "description": "The name of the intended Invitation recipient." }, - "timestampMs": { + "receiverUserEmail": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "description": "The email address of the intended Invitation recipient." }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "receiverUserTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of tags assigned to the Invitation recipient. This field, if not needed, should be an empty array in your request body." }, - "parameters": { - "$ref": "#/definitions/InitFiatOnRampIntent" + "accessType": { + "$ref": "#/definitions/AccessType", + "description": "The User's permissible access method(s)." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "senderUserId": { + "type": "string", + "description": "Unique identifier for the Sender of an Invitation." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": [ + "receiverUserName", + "receiverUserEmail", + "receiverUserTags", + "accessType", + "senderUserId" + ] }, - "InitFiatOnRampResult": { + "IpAllowlist": { "type": "object", "properties": { - "onRampUrl": { + "organizationId": { "type": "string", - "description": "Unique URL for a given fiat on-ramp flow." + "description": "Unique identifier for the organization this allowlist belongs to." }, - "onRampTransactionId": { + "rules": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/IpAllowlistRule" + }, + "description": "List of IP allowlist rules with their metadata." + }, + "publicKey": { "type": "string", - "description": "Unique identifier used to retrieve transaction statuses for a given fiat on-ramp flow." + "x-nullable": true, + "description": "Public key of the API key this allowlist applies to. Null means the allowlist applies to the entire organization." }, - "onRampUrlSignature": { + "enabled": { + "type": "boolean", + "x-nullable": true, + "description": "Whether the IP allowlist is enabled. Only present for organization-level allowlists. Null for API key-level allowlists (presence of the allowlist implies enablement)." + }, + "onEvaluationError": { "type": "string", - "description": "Optional signature of the MoonPay Widget URL. The signature is generated if the Init Fiat On Ramp intent includes the urlForSignature field. The signature can be used to initialize the MoonPay SDKs when URL signing is enabled for your project." + "x-nullable": true, + "description": "Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY." } }, - "required": ["onRampUrl", "onRampTransactionId"] + "required": ["organizationId", "rules"] }, - "InitImportPrivateKeyIntent": { + "IpAllowlistIntentRule": { "type": "object", "properties": { - "userId": { + "cidr": { "type": "string", - "description": "The ID of the User importing a Private Key." + "description": "CIDR block (e.g., '192.168.1.0/24', '2001:db8::/32')." + }, + "label": { + "type": "string", + "x-nullable": true, + "description": "Optional human-readable label for this rule (e.g., 'Office VPN')." } }, - "required": ["userId"] + "required": ["cidr"] }, - "InitImportPrivateKeyRequest": { + "IpAllowlistRule": { "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, - "organizationId": { + "properties": { + "cidr": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "CIDR block (e.g., '192.168.1.0/24')." }, - "parameters": { - "$ref": "#/definitions/InitImportPrivateKeyIntent" + "label": { + "type": "string", + "x-nullable": true, + "description": "Optional human-readable label for this rule." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "createdAt": { + "type": "string", + "description": "Creation timestamp as millisecond epoch string." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["cidr"] }, - "InitImportPrivateKeyResult": { + "ListFiatOnRampCredentialsRequest": { "type": "object", "properties": { - "importBundle": { + "organizationId": { "type": "string", - "description": "Import bundle containing a public key and signature to use for importing client data." + "description": "Unique identifier for a given Organization." } }, - "required": ["importBundle"] + "required": ["organizationId"] }, - "InitImportWalletIntent": { + "ListFiatOnRampCredentialsResponse": { "type": "object", "properties": { - "userId": { - "type": "string", - "description": "The ID of the User importing a Wallet." + "fiatOnRampCredentials": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/FiatOnRampCredential" + } } }, - "required": ["userId"] + "required": ["fiatOnRampCredentials"] }, - "InitImportWalletRequest": { + "ListOauth2CredentialsRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_INIT_IMPORT_WALLET"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/InitImportWalletIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId"] }, - "InitImportWalletResult": { + "ListOauth2CredentialsResponse": { "type": "object", "properties": { - "importBundle": { - "type": "string", - "description": "Import bundle containing a public key and signature to use for importing client data." + "oauth2Credentials": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Oauth2Credential" + } } }, - "required": ["importBundle"] + "required": ["oauth2Credentials"] }, - "InitOtpAuthIntent": { + "ListPrivateKeyTagsRequest": { "type": "object", "properties": { - "otpType": { - "type": "string", - "description": "Enum to specifiy whether to send OTP via SMS or email" - }, - "contact": { - "type": "string", - "description": "Email or phone number to send the OTP code to" - }, - "emailCustomization": { - "$ref": "#/definitions/EmailCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing emails. If not provided, the default email will be used." - }, - "smsCustomization": { - "$ref": "#/definitions/SmsCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing SMS message. If not provided, the default sms message will be used." - }, - "userIdentifier": { - "type": "string", - "x-nullable": true, - "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." - }, - "sendFromEmailAddress": { - "type": "string", - "x-nullable": true, - "description": "Optional custom email address from which to send the OTP email" - }, - "sendFromEmailSenderName": { - "type": "string", - "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" - }, - "replyToEmailAddress": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "description": "Unique identifier for a given organization." } }, - "required": ["otpType", "contact"] + "required": ["organizationId"] }, - "InitOtpAuthIntentV2": { + "ListPrivateKeyTagsResponse": { "type": "object", "properties": { - "otpType": { - "type": "string", - "description": "Enum to specifiy whether to send OTP via SMS or email" - }, - "contact": { - "type": "string", - "description": "Email or phone number to send the OTP code to" - }, - "otpLength": { - "type": "integer", - "format": "int32", - "x-nullable": true, - "description": "Optional length of the OTP code. Default = 9" - }, - "emailCustomization": { - "$ref": "#/definitions/EmailCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing emails. If not provided, the default email will be used." - }, - "smsCustomization": { - "$ref": "#/definitions/SmsCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing SMS message. If not provided, the default SMS message will be used." - }, - "userIdentifier": { - "type": "string", - "x-nullable": true, - "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." - }, - "sendFromEmailAddress": { - "type": "string", - "x-nullable": true, - "description": "Optional custom email address from which to send the OTP email" - }, - "alphanumeric": { - "type": "boolean", - "x-nullable": true, - "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" - }, - "sendFromEmailSenderName": { - "type": "string", - "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" - }, - "replyToEmailAddress": { - "type": "string", - "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "privateKeyTags": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1.Tag" + }, + "description": "A list of private key tags." } }, - "required": ["otpType", "contact"] + "required": ["privateKeyTags"] }, - "InitOtpAuthIntentV3": { + "ListSupportedAssetsRequest": { "type": "object", "properties": { - "otpType": { - "type": "string", - "description": "Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL" - }, - "contact": { - "type": "string", - "description": "Email or phone number to send the OTP code to" - }, - "otpLength": { - "type": "integer", - "format": "int32", - "x-nullable": true, - "description": "Optional length of the OTP code. Default = 9" - }, - "appName": { - "type": "string", - "description": "The name of the application. This field is required and will be used in email notifications if an email template is not provided." - }, - "emailCustomization": { - "$ref": "#/definitions/EmailCustomizationParamsV2", - "x-nullable": true, - "description": "Optional parameters for customizing emails. If not provided, the default email will be used." - }, - "smsCustomization": { - "$ref": "#/definitions/SmsCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing SMS message. If not provided, the default SMS message will be used." - }, - "userIdentifier": { - "type": "string", - "x-nullable": true, - "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." - }, - "sendFromEmailAddress": { - "type": "string", - "x-nullable": true, - "description": "Optional custom email address from which to send the OTP email" - }, - "alphanumeric": { - "type": "boolean", - "x-nullable": true, - "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" - }, - "sendFromEmailSenderName": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + "description": "Unique identifier for a given organization." }, - "expirationSeconds": { + "caip2": { "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)" - }, - "replyToEmailAddress": { + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532", + "eip155:137", + "eip155:80002", + "eip155:42161", + "eip155:421614", + "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet or 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values." + } + }, + "required": ["organizationId", "caip2"] + }, + "ListSupportedAssetsResponse": { + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AssetMetadata" + }, + "description": "List of asset metadata" + } + } + }, + "ListUserTagsRequest": { + "type": "object", + "properties": { + "organizationId": { "type": "string", - "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "description": "Unique identifier for a given organization." + } + }, + "required": ["organizationId"] + }, + "ListUserTagsResponse": { + "type": "object", + "properties": { + "userTags": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1.Tag" + }, + "description": "A list of user tags." } }, - "required": ["otpType", "contact", "appName"] + "required": ["userTags"] }, - "InitOtpAuthRequest": { + "ListWebhookEndpointsRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_INIT_OTP_AUTH_V3"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, "organizationId": { "type": "string", "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/InitOtpAuthIntentV3" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["organizationId"] }, - "InitOtpAuthResult": { + "ListWebhookEndpointsResponse": { "type": "object", "properties": { - "otpId": { - "type": "string", - "description": "Unique identifier for an OTP authentication" + "webhookEndpoints": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/WebhookEndpointData" + } } }, - "required": ["otpId"] + "required": ["webhookEndpoints"] }, - "InitOtpAuthResultV2": { + "LoginUsage": { "type": "object", "properties": { - "otpId": { + "publicKey": { "type": "string", - "description": "Unique identifier for an OTP authentication" + "description": "Public key for authentication" } }, - "required": ["otpId"] + "required": ["publicKey"] }, - "InitOtpIntent": { + "MnemonicLanguage": { + "type": "string", + "enum": [ + "MNEMONIC_LANGUAGE_ENGLISH", + "MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE", + "MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE", + "MNEMONIC_LANGUAGE_CZECH", + "MNEMONIC_LANGUAGE_FRENCH", + "MNEMONIC_LANGUAGE_ITALIAN", + "MNEMONIC_LANGUAGE_JAPANESE", + "MNEMONIC_LANGUAGE_KOREAN", + "MNEMONIC_LANGUAGE_SPANISH" + ] + }, + "NOOPCodegenAnchorResponse": { "type": "object", "properties": { - "otpType": { - "type": "string", - "description": "Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL" + "stamp": { + "$ref": "#/definitions/WebAuthnStamp" }, - "contact": { - "type": "string", - "description": "Email or phone number to send the OTP code to" - }, - "otpLength": { - "type": "integer", - "format": "int32", - "x-nullable": true, - "description": "Optional length of the OTP code. Default = 9" - }, - "emailCustomization": { - "$ref": "#/definitions/EmailCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing emails. If not provided, the default email will be used." - }, - "smsCustomization": { - "$ref": "#/definitions/SmsCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing SMS message. If not provided, the default sms message will be used." - }, - "userIdentifier": { - "type": "string", - "x-nullable": true, - "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." - }, - "sendFromEmailAddress": { - "type": "string", - "x-nullable": true, - "description": "Optional custom email address from which to send the OTP email" - }, - "alphanumeric": { - "type": "boolean", - "x-nullable": true, - "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" - }, - "sendFromEmailSenderName": { + "tokenUsage": { + "$ref": "#/definitions/TokenUsage" + } + }, + "required": ["stamp"] + }, + "NativeRevertError": { + "type": "object", + "properties": { + "nativeType": { "type": "string", "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + "description": "The type of native error: 'error_string', 'panic', or 'execution_reverted'." }, - "expirationSeconds": { + "message": { "type": "string", "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)" + "description": "The error message for Error(string) reverts." }, - "replyToEmailAddress": { + "panicCode": { "type": "string", + "format": "uint64", "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "description": "The panic code for Panic(uint256) reverts." } - }, - "required": ["otpType", "contact"] + } }, - "InitOtpIntentV2": { + "Oauth2AuthenticateIntent": { "type": "object", "properties": { - "otpType": { - "type": "string", - "description": "Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL" - }, - "contact": { - "type": "string", - "description": "Email or phone number to send the OTP code to" - }, - "otpLength": { - "type": "integer", - "format": "int32", - "x-nullable": true, - "description": "Optional length of the OTP code. Default = 9" - }, - "appName": { + "oauth2CredentialId": { "type": "string", - "description": "The name of the application. This field is required and will be used in email notifications if an email template is not provided." - }, - "emailCustomization": { - "$ref": "#/definitions/EmailCustomizationParamsV2", - "x-nullable": true, - "description": "Optional parameters for customizing emails. If not provided, the default email will be used." - }, - "smsCustomization": { - "$ref": "#/definitions/SmsCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing SMS message. If not provided, the default SMS message will be used." + "description": "The OAuth 2.0 credential id whose client_id and client_secret will be used in the OAuth 2.0 flow" }, - "userIdentifier": { + "authCode": { "type": "string", - "x-nullable": true, - "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." + "description": "The auth_code provided by the OAuth 2.0 provider to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow" }, - "sendFromEmailAddress": { + "redirectUri": { "type": "string", - "x-nullable": true, - "description": "Optional custom email address from which to send the OTP email" - }, - "alphanumeric": { - "type": "boolean", - "x-nullable": true, - "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" + "description": "The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider" }, - "sendFromEmailSenderName": { + "codeVerifier": { "type": "string", - "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + "description": "The code verifier used by OAuth 2.0 PKCE providers" }, - "expirationSeconds": { + "nonce": { "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)" + "description": "A nonce value set to sha256(publicKey), used to bind the OIDC token to a specific public key" }, - "replyToEmailAddress": { + "bearerTokenTargetPublicKey": { "type": "string", "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "description": "An optional P256 public key to which, if provided, the bearer token will be encrypted and returned via the `encrypted_bearer_token` claim of the OIDC Token" } }, - "required": ["otpType", "contact", "appName"] + "required": [ + "oauth2CredentialId", + "authCode", + "redirectUri", + "codeVerifier", + "nonce" + ] }, - "InitOtpRequest": { + "Oauth2AuthenticateRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_INIT_OTP_V2"] + "enum": ["ACTIVITY_TYPE_OAUTH2_AUTHENTICATE"] }, "timestampMs": { "type": "string", @@ -9010,7 +11311,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/InitOtpIntentV2" + "$ref": "#/definitions/Oauth2AuthenticateIntent" }, "generateAppProofs": { "type": "boolean", @@ -9019,99 +11320,119 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "InitOtpResult": { + "Oauth2AuthenticateResult": { "type": "object", "properties": { - "otpId": { + "oidcToken": { "type": "string", - "description": "Unique identifier for an OTP authentication" + "description": "Base64 encoded OIDC token issued by Turnkey to be used with the LoginWithOAuth activity" } }, - "required": ["otpId"] + "required": ["oidcToken"] }, - "InitUserEmailRecoveryIntent": { + "Oauth2Credential": { "type": "object", "properties": { - "email": { + "oauth2CredentialId": { "type": "string", - "description": "Email of the user starting recovery" + "description": "Unique identifier for a given OAuth 2.0 Credential." }, - "targetPublicKey": { + "organizationId": { "type": "string", - "description": "Client-side public key generated by the user, to which the recovery bundle will be encrypted." + "description": "Unique identifier for an Organization." }, - "expirationSeconds": { + "provider": { + "$ref": "#/definitions/Oauth2Provider", + "description": "The provider for a given OAuth 2.0 Credential." + }, + "clientId": { "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used." + "description": "The client id for a given OAuth 2.0 Credential." }, - "emailCustomization": { - "$ref": "#/definitions/EmailCustomizationParams", - "x-nullable": true, - "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + "encryptedClientSecret": { + "type": "string", + "description": "The encrypted client secret for a given OAuth 2.0 Credential encrypted to the TLS Fetcher quorum key." + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + } + }, + "required": [ + "oauth2CredentialId", + "organizationId", + "provider", + "clientId", + "encryptedClientSecret", + "createdAt", + "updatedAt" + ] + }, + "Oauth2Provider": { + "type": "string", + "enum": ["OAUTH2_PROVIDER_X", "OAUTH2_PROVIDER_DISCORD"] + }, + "OauthIntent": { + "type": "object", + "properties": { + "oidcToken": { + "type": "string", + "description": "Base64 encoded OIDC token" + }, + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the oauth bundle (credentials) will be encrypted." }, - "sendFromEmailAddress": { + "apiKeyName": { "type": "string", "x-nullable": true, - "description": "Optional custom email address from which to send the OTP email" + "description": "Optional human-readable name for an API Key. If none provided, default to Oauth - \u003cTimestamp\u003e" }, - "sendFromEmailSenderName": { + "expirationSeconds": { "type": "string", "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." }, - "replyToEmailAddress": { - "type": "string", + "invalidateExisting": { + "type": "boolean", "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "description": "Invalidate all other previously generated Oauth API keys" } }, - "required": ["email", "targetPublicKey"] + "required": ["oidcToken", "targetPublicKey"] }, - "InitUserEmailRecoveryIntentV2": { + "OauthLoginIntent": { "type": "object", "properties": { - "email": { + "oidcToken": { "type": "string", - "description": "Email of the user starting recovery" + "description": "Base64 encoded OIDC token" }, - "targetPublicKey": { + "publicKey": { "type": "string", - "description": "Client-side public key generated by the user, to which the recovery bundle will be encrypted." + "description": "Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the oidc token associated with this request" }, "expirationSeconds": { "type": "string", "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used." - }, - "emailCustomization": { - "$ref": "#/definitions/EmailAuthCustomizationParams", - "description": "Parameters for customizing emails. If not provided, the default email will be used. Note that `app_name` is required." - }, - "sendFromEmailAddress": { - "type": "string", - "x-nullable": true, - "description": "Optional custom email address from which to send the OTP email" - }, - "sendFromEmailSenderName": { - "type": "string", - "x-nullable": true, - "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + "description": "Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used." }, - "replyToEmailAddress": { - "type": "string", + "invalidateExisting": { + "type": "boolean", "x-nullable": true, - "description": "Optional custom email address to use as reply-to" + "description": "Invalidate all other previously generated Login API keys" } }, - "required": ["email", "targetPublicKey", "emailCustomization"] + "required": ["oidcToken", "publicKey"] }, - "InitUserEmailRecoveryRequest": { + "OauthLoginRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2"] + "enum": ["ACTIVITY_TYPE_OAUTH_LOGIN"] }, "timestampMs": { "type": "string", @@ -9122,7 +11443,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/InitUserEmailRecoveryIntentV2" + "$ref": "#/definitions/OauthLoginIntent" }, "generateAppProofs": { "type": "boolean", @@ -9131,614 +11452,798 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "InitUserEmailRecoveryResult": { + "OauthLoginResult": { "type": "object", "properties": { - "userId": { + "session": { "type": "string", - "description": "Unique identifier for the user being recovered." + "description": "Signed JWT containing an expiry, public key, session type, user id, and organization id" } }, - "required": ["userId"] + "required": ["session"] }, - "Intent": { + "OauthProvider": { "type": "object", "properties": { - "createOrganizationIntent": { - "$ref": "#/definitions/CreateOrganizationIntent" - }, - "createAuthenticatorsIntent": { - "$ref": "#/definitions/CreateAuthenticatorsIntent" - }, - "createUsersIntent": { - "$ref": "#/definitions/CreateUsersIntent" - }, - "createPrivateKeysIntent": { - "$ref": "#/definitions/CreatePrivateKeysIntent" - }, - "signRawPayloadIntent": { - "$ref": "#/definitions/SignRawPayloadIntent" - }, - "createInvitationsIntent": { - "$ref": "#/definitions/CreateInvitationsIntent" - }, - "acceptInvitationIntent": { - "$ref": "#/definitions/AcceptInvitationIntent" - }, - "createPolicyIntent": { - "$ref": "#/definitions/CreatePolicyIntent" - }, - "disablePrivateKeyIntent": { - "$ref": "#/definitions/DisablePrivateKeyIntent" - }, - "deleteUsersIntent": { - "$ref": "#/definitions/DeleteUsersIntent" - }, - "deleteAuthenticatorsIntent": { - "$ref": "#/definitions/DeleteAuthenticatorsIntent" - }, - "deleteInvitationIntent": { - "$ref": "#/definitions/DeleteInvitationIntent" - }, - "deleteOrganizationIntent": { - "$ref": "#/definitions/DeleteOrganizationIntent" - }, - "deletePolicyIntent": { - "$ref": "#/definitions/DeletePolicyIntent" - }, - "createUserTagIntent": { - "$ref": "#/definitions/CreateUserTagIntent" - }, - "deleteUserTagsIntent": { - "$ref": "#/definitions/DeleteUserTagsIntent" - }, - "signTransactionIntent": { - "$ref": "#/definitions/SignTransactionIntent" - }, - "createApiKeysIntent": { - "$ref": "#/definitions/CreateApiKeysIntent" - }, - "deleteApiKeysIntent": { - "$ref": "#/definitions/DeleteApiKeysIntent" - }, - "approveActivityIntent": { - "$ref": "#/definitions/ApproveActivityIntent" - }, - "rejectActivityIntent": { - "$ref": "#/definitions/RejectActivityIntent" - }, - "createPrivateKeyTagIntent": { - "$ref": "#/definitions/CreatePrivateKeyTagIntent" - }, - "deletePrivateKeyTagsIntent": { - "$ref": "#/definitions/DeletePrivateKeyTagsIntent" - }, - "createPolicyIntentV2": { - "$ref": "#/definitions/CreatePolicyIntentV2" - }, - "setPaymentMethodIntent": { - "$ref": "#/definitions/SetPaymentMethodIntent" - }, - "activateBillingTierIntent": { - "$ref": "#/definitions/ActivateBillingTierIntent" - }, - "deletePaymentMethodIntent": { - "$ref": "#/definitions/DeletePaymentMethodIntent" - }, - "createPolicyIntentV3": { - "$ref": "#/definitions/CreatePolicyIntentV3" - }, - "createApiOnlyUsersIntent": { - "$ref": "#/definitions/CreateApiOnlyUsersIntent" - }, - "updateRootQuorumIntent": { - "$ref": "#/definitions/UpdateRootQuorumIntent" - }, - "updateUserTagIntent": { - "$ref": "#/definitions/UpdateUserTagIntent" - }, - "updatePrivateKeyTagIntent": { - "$ref": "#/definitions/UpdatePrivateKeyTagIntent" - }, - "createAuthenticatorsIntentV2": { - "$ref": "#/definitions/CreateAuthenticatorsIntentV2" - }, - "acceptInvitationIntentV2": { - "$ref": "#/definitions/AcceptInvitationIntentV2" - }, - "createOrganizationIntentV2": { - "$ref": "#/definitions/CreateOrganizationIntentV2" - }, - "createUsersIntentV2": { - "$ref": "#/definitions/CreateUsersIntentV2" - }, - "createSubOrganizationIntent": { - "$ref": "#/definitions/CreateSubOrganizationIntent" - }, - "createSubOrganizationIntentV2": { - "$ref": "#/definitions/CreateSubOrganizationIntentV2" - }, - "updateAllowedOriginsIntent": { - "$ref": "#/definitions/UpdateAllowedOriginsIntent" - }, - "createPrivateKeysIntentV2": { - "$ref": "#/definitions/CreatePrivateKeysIntentV2" - }, - "updateUserIntent": { - "$ref": "#/definitions/UpdateUserIntent" - }, - "updatePolicyIntent": { - "$ref": "#/definitions/UpdatePolicyIntent" - }, - "setPaymentMethodIntentV2": { - "$ref": "#/definitions/SetPaymentMethodIntentV2" - }, - "createSubOrganizationIntentV3": { - "$ref": "#/definitions/CreateSubOrganizationIntentV3" - }, - "createWalletIntent": { - "$ref": "#/definitions/CreateWalletIntent" - }, - "createWalletAccountsIntent": { - "$ref": "#/definitions/CreateWalletAccountsIntent" - }, - "initUserEmailRecoveryIntent": { - "$ref": "#/definitions/InitUserEmailRecoveryIntent" - }, - "recoverUserIntent": { - "$ref": "#/definitions/RecoverUserIntent" - }, - "setOrganizationFeatureIntent": { - "$ref": "#/definitions/SetOrganizationFeatureIntent" - }, - "removeOrganizationFeatureIntent": { - "$ref": "#/definitions/RemoveOrganizationFeatureIntent" - }, - "signRawPayloadIntentV2": { - "$ref": "#/definitions/SignRawPayloadIntentV2" - }, - "signTransactionIntentV2": { - "$ref": "#/definitions/SignTransactionIntentV2" - }, - "exportPrivateKeyIntent": { - "$ref": "#/definitions/ExportPrivateKeyIntent" - }, - "exportWalletIntent": { - "$ref": "#/definitions/ExportWalletIntent" - }, - "createSubOrganizationIntentV4": { - "$ref": "#/definitions/CreateSubOrganizationIntentV4" - }, - "emailAuthIntent": { - "$ref": "#/definitions/EmailAuthIntent" + "providerId": { + "type": "string", + "description": "Unique identifier for an OAuth Provider" }, - "exportWalletAccountIntent": { - "$ref": "#/definitions/ExportWalletAccountIntent" + "providerName": { + "type": "string", + "description": "Human-readable name to identify a Provider." }, - "initImportWalletIntent": { - "$ref": "#/definitions/InitImportWalletIntent" + "issuer": { + "type": "string", + "description": "The issuer of the token, typically a URL indicating the authentication server, e.g https://accounts.google.com" }, - "importWalletIntent": { - "$ref": "#/definitions/ImportWalletIntent" + "audience": { + "type": "string", + "description": "Expected audience ('aud' attribute of the signed token) which represents the app ID" }, - "initImportPrivateKeyIntent": { - "$ref": "#/definitions/InitImportPrivateKeyIntent" + "subject": { + "type": "string", + "description": "Expected subject ('sub' attribute of the signed token) which represents the user ID" }, - "importPrivateKeyIntent": { - "$ref": "#/definitions/ImportPrivateKeyIntent" + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" }, - "createPoliciesIntent": { - "$ref": "#/definitions/CreatePoliciesIntent" + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + } + }, + "required": [ + "providerId", + "providerName", + "issuer", + "audience", + "subject", + "createdAt", + "updatedAt" + ] + }, + "OauthProviderParams": { + "type": "object", + "properties": { + "providerName": { + "type": "string", + "description": "Human-readable name to identify a Provider." }, - "signRawPayloadsIntent": { - "$ref": "#/definitions/SignRawPayloadsIntent" + "oidcToken": { + "type": "string", + "description": "Base64 encoded OIDC token" + } + }, + "required": ["providerName", "oidcToken"] + }, + "OauthProviderParamsV2": { + "type": "object", + "properties": { + "providerName": { + "type": "string", + "description": "Human-readable name to identify a Provider." }, - "createReadOnlySessionIntent": { - "$ref": "#/definitions/CreateReadOnlySessionIntent" + "oidcToken": { + "type": "string", + "description": "Base64 encoded OIDC token" }, - "createOauthProvidersIntent": { - "$ref": "#/definitions/CreateOauthProvidersIntent" + "oidcClaims": { + "$ref": "#/definitions/OidcClaims", + "description": "OIDC claims (iss, sub, aud) to uniquely identify the user" + } + }, + "required": ["providerName"] + }, + "OauthRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_OAUTH"] }, - "deleteOauthProvidersIntent": { - "$ref": "#/definitions/DeleteOauthProvidersIntent" + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "createSubOrganizationIntentV5": { - "$ref": "#/definitions/CreateSubOrganizationIntentV5" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "oauthIntent": { + "parameters": { "$ref": "#/definitions/OauthIntent" }, - "createApiKeysIntentV2": { - "$ref": "#/definitions/CreateApiKeysIntentV2" - }, - "createReadWriteSessionIntent": { - "$ref": "#/definitions/CreateReadWriteSessionIntent" + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "OauthResult": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique identifier for the authenticating User." }, - "emailAuthIntentV2": { - "$ref": "#/definitions/EmailAuthIntentV2" + "apiKeyId": { + "type": "string", + "description": "Unique identifier for the created API key." }, - "createSubOrganizationIntentV6": { - "$ref": "#/definitions/CreateSubOrganizationIntentV6" + "credentialBundle": { + "type": "string", + "description": "HPKE encrypted credential bundle" + } + }, + "required": ["userId", "apiKeyId", "credentialBundle"] + }, + "OidcClaims": { + "type": "object", + "properties": { + "iss": { + "type": "string", + "description": "The issuer identifier from the OIDC token (iss claim)" }, - "deletePrivateKeysIntent": { - "$ref": "#/definitions/DeletePrivateKeysIntent" + "sub": { + "type": "string", + "description": "The subject identifier from the OIDC token (sub claim)" }, - "deleteWalletsIntent": { - "$ref": "#/definitions/DeleteWalletsIntent" + "aud": { + "type": "string", + "description": "The audience from the OIDC token (aud claim)" + } + }, + "required": ["iss", "sub", "aud"] + }, + "Operator": { + "type": "string", + "enum": [ + "OPERATOR_EQUAL", + "OPERATOR_MORE_THAN", + "OPERATOR_MORE_THAN_OR_EQUAL", + "OPERATOR_LESS_THAN", + "OPERATOR_LESS_THAN_OR_EQUAL", + "OPERATOR_CONTAINS", + "OPERATOR_NOT_EQUAL", + "OPERATOR_IN", + "OPERATOR_NOT_IN", + "OPERATOR_CONTAINS_ONE", + "OPERATOR_CONTAINS_ALL" + ] + }, + "OtpAuthIntent": { + "type": "object", + "properties": { + "otpId": { + "type": "string", + "description": "ID representing the result of an init OTP activity." }, - "createReadWriteSessionIntentV2": { - "$ref": "#/definitions/CreateReadWriteSessionIntentV2" + "otpCode": { + "type": "string", + "description": "OTP sent out to a user's contact (email or SMS)" }, - "deleteSubOrganizationIntent": { - "$ref": "#/definitions/DeleteSubOrganizationIntent" + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the OTP bundle (credentials) will be encrypted." }, - "initOtpAuthIntent": { - "$ref": "#/definitions/InitOtpAuthIntent" + "apiKeyName": { + "type": "string", + "x-nullable": true, + "description": "Optional human-readable name for an API Key. If none provided, default to OTP Auth - \u003cTimestamp\u003e" }, - "otpAuthIntent": { - "$ref": "#/definitions/OtpAuthIntent" + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." }, - "createSubOrganizationIntentV7": { - "$ref": "#/definitions/CreateSubOrganizationIntentV7" + "invalidateExisting": { + "type": "boolean", + "x-nullable": true, + "description": "Invalidate all other previously generated OTP Auth API keys" + } + }, + "required": ["otpId", "otpCode", "targetPublicKey"] + }, + "OtpAuthRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_OTP_AUTH"] }, - "updateWalletIntent": { - "$ref": "#/definitions/UpdateWalletIntent" + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "updatePolicyIntentV2": { - "$ref": "#/definitions/UpdatePolicyIntentV2" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "createUsersIntentV3": { - "$ref": "#/definitions/CreateUsersIntentV3" + "parameters": { + "$ref": "#/definitions/OtpAuthIntent" }, - "initOtpAuthIntentV2": { - "$ref": "#/definitions/InitOtpAuthIntentV2" + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "OtpAuthResult": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique identifier for the authenticating User." }, - "initOtpIntent": { - "$ref": "#/definitions/InitOtpIntent" + "apiKeyId": { + "type": "string", + "description": "Unique identifier for the created API key." }, - "verifyOtpIntent": { - "$ref": "#/definitions/VerifyOtpIntent" + "credentialBundle": { + "type": "string", + "description": "HPKE encrypted credential bundle" + } + }, + "required": ["userId"] + }, + "OtpLoginIntent": { + "type": "object", + "properties": { + "verificationToken": { + "type": "string", + "description": "Signed JWT containing a unique id, expiry, verification type, contact" }, - "otpLoginIntent": { - "$ref": "#/definitions/OtpLoginIntent" + "publicKey": { + "type": "string", + "description": "Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the verification token" }, - "stampLoginIntent": { - "$ref": "#/definitions/StampLoginIntent" + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used." }, - "oauthLoginIntent": { - "$ref": "#/definitions/OauthLoginIntent" + "invalidateExisting": { + "type": "boolean", + "x-nullable": true, + "description": "Invalidate all other previously generated Login API keys" }, - "updateUserNameIntent": { - "$ref": "#/definitions/UpdateUserNameIntent" + "clientSignature": { + "$ref": "#/definitions/ClientSignature", + "x-nullable": true, + "description": "Optional signature proving authorization for this login. The signature is over the verification token ID and the public key. Only required if a public key was provided during the verification step." + } + }, + "required": ["verificationToken", "publicKey"] + }, + "OtpLoginIntentV2": { + "type": "object", + "properties": { + "verificationToken": { + "type": "string", + "description": "Signed Verification Token containing a unique id, expiry, verification type, contact" }, - "updateUserEmailIntent": { - "$ref": "#/definitions/UpdateUserEmailIntent" + "publicKey": { + "type": "string", + "description": "Client-side public key generated by the user, used as the session public key upon successful login" }, - "updateUserPhoneNumberIntent": { - "$ref": "#/definitions/UpdateUserPhoneNumberIntent" + "clientSignature": { + "$ref": "#/definitions/ClientSignature", + "description": "Required signature proving authorization for this login. The signature is over the verification token ID and the public key. Required for secure OTP login process." }, - "initFiatOnRampIntent": { - "$ref": "#/definitions/InitFiatOnRampIntent" + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used." }, - "createSmartContractInterfaceIntent": { - "$ref": "#/definitions/CreateSmartContractInterfaceIntent" + "invalidateExisting": { + "type": "boolean", + "x-nullable": true, + "description": "Invalidate all other previously generated Login sessions" + } + }, + "required": ["verificationToken", "publicKey", "clientSignature"] + }, + "OtpLoginRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_OTP_LOGIN_V2"] }, - "deleteSmartContractInterfaceIntent": { - "$ref": "#/definitions/DeleteSmartContractInterfaceIntent" + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "enableAuthProxyIntent": { - "$ref": "#/definitions/EnableAuthProxyIntent" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "disableAuthProxyIntent": { - "$ref": "#/definitions/DisableAuthProxyIntent" + "parameters": { + "$ref": "#/definitions/OtpLoginIntentV2" }, - "updateAuthProxyConfigIntent": { - "$ref": "#/definitions/UpdateAuthProxyConfigIntent" + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "OtpLoginResult": { + "type": "object", + "properties": { + "session": { + "type": "string", + "description": "Signed JWT containing an expiry, public key, session type, user id, and organization id" + } + }, + "required": ["session"] + }, + "Outcome": { + "type": "string", + "enum": [ + "OUTCOME_ALLOW", + "OUTCOME_DENY_EXPLICIT", + "OUTCOME_DENY_IMPLICIT", + "OUTCOME_REQUIRES_CONSENSUS", + "OUTCOME_REJECTED", + "OUTCOME_ERROR" + ] + }, + "Pagination": { + "type": "object", + "properties": { + "limit": { + "type": "string", + "description": "A limit of the number of object to be returned, between 1 and 100. Defaults to 10." }, - "createOauth2CredentialIntent": { - "$ref": "#/definitions/CreateOauth2CredentialIntent" + "before": { + "type": "string", + "description": "A pagination cursor. This is an object ID that enables you to fetch all objects before this ID." }, - "updateOauth2CredentialIntent": { - "$ref": "#/definitions/UpdateOauth2CredentialIntent" + "after": { + "type": "string", + "description": "A pagination cursor. This is an object ID that enables you to fetch all objects after this ID." + } + } + }, + "PathFormat": { + "type": "string", + "enum": ["PATH_FORMAT_BIP32"] + }, + "PayloadEncoding": { + "type": "string", + "enum": [ + "PAYLOAD_ENCODING_HEXADECIMAL", + "PAYLOAD_ENCODING_TEXT_UTF8", + "PAYLOAD_ENCODING_EIP712", + "PAYLOAD_ENCODING_EIP7702_AUTHORIZATION" + ] + }, + "Policy": { + "type": "object", + "properties": { + "policyId": { + "type": "string", + "description": "Unique identifier for a given Policy." }, - "deleteOauth2CredentialIntent": { - "$ref": "#/definitions/DeleteOauth2CredentialIntent" + "policyName": { + "type": "string", + "description": "Human-readable name for a Policy." }, - "oauth2AuthenticateIntent": { - "$ref": "#/definitions/Oauth2AuthenticateIntent" + "effect": { + "$ref": "#/definitions/Effect", + "description": "The instruction to DENY or ALLOW a particular activity following policy selector(s)." }, - "deleteWalletAccountsIntent": { - "$ref": "#/definitions/DeleteWalletAccountsIntent" + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" }, - "deletePoliciesIntent": { - "$ref": "#/definitions/DeletePoliciesIntent" + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" }, - "ethSendRawTransactionIntent": { - "$ref": "#/definitions/EthSendRawTransactionIntent" + "notes": { + "type": "string", + "description": "Human-readable notes added by a User to describe a particular policy." }, - "ethSendTransactionIntent": { - "$ref": "#/definitions/EthSendTransactionIntent" + "consensus": { + "type": "string", + "x-nullable": true, + "description": "A consensus expression that evalutes to true or false." }, - "createFiatOnRampCredentialIntent": { - "$ref": "#/definitions/CreateFiatOnRampCredentialIntent" + "condition": { + "type": "string", + "x-nullable": true, + "description": "A condition expression that evalutes to true or false." + } + }, + "required": [ + "policyId", + "policyName", + "effect", + "createdAt", + "updatedAt", + "notes", + "consensus", + "condition" + ] + }, + "PostTvcQuorumKeyShareIntent": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Unique identifier of the TVC deployment receiving quorum key share" }, - "updateFiatOnRampCredentialIntent": { - "$ref": "#/definitions/UpdateFiatOnRampCredentialIntent" + "ephemeralPublicKeyHex": { + "type": "string", + "description": "Hex-encoded ephemeral public key used to encrypt the quorum key share" }, - "deleteFiatOnRampCredentialIntent": { - "$ref": "#/definitions/DeleteFiatOnRampCredentialIntent" + "shareApprovalBundle": { + "$ref": "#/definitions/QuorumKeyShareApprovalBundle", + "description": "Re-encrypted quorum key share and approval" + } + }, + "required": [ + "deploymentId", + "ephemeralPublicKeyHex", + "shareApprovalBundle" + ] + }, + "PostTvcQuorumKeyShareResult": { + "type": "object", + "properties": { + "provisioningShareId": { + "type": "string", + "description": "The unique identifier for the provisioning quorum key share" + } + }, + "required": ["provisioningShareId"] + }, + "PrivateKey": { + "type": "object", + "properties": { + "privateKeyId": { + "type": "string", + "description": "Unique identifier for a given Private Key." }, - "emailAuthIntentV3": { - "$ref": "#/definitions/EmailAuthIntentV3" + "publicKey": { + "type": "string", + "description": "The public component of a cryptographic key pair used to sign messages and transactions." }, - "initUserEmailRecoveryIntentV2": { - "$ref": "#/definitions/InitUserEmailRecoveryIntentV2" + "privateKeyName": { + "type": "string", + "description": "Human-readable name for a Private Key." }, - "initOtpIntentV2": { - "$ref": "#/definitions/InitOtpIntentV2" + "curve": { + "$ref": "#/definitions/Curve", + "description": "Cryptographic Curve used to generate a given Private Key." }, - "initOtpAuthIntentV3": { - "$ref": "#/definitions/InitOtpAuthIntentV3" + "addresses": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/data.v1.Address" + }, + "description": "Derived cryptocurrency addresses for a given Private Key." }, - "upsertGasUsageConfigIntent": { - "$ref": "#/definitions/UpsertGasUsageConfigIntent" + "privateKeyTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of Private Key Tag IDs." }, - "createTvcAppIntent": { - "$ref": "#/definitions/CreateTvcAppIntent" + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" }, - "createTvcDeploymentIntent": { - "$ref": "#/definitions/CreateTvcDeploymentIntent" + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" }, - "createTvcManifestApprovalsIntent": { - "$ref": "#/definitions/CreateTvcManifestApprovalsIntent" + "exported": { + "type": "boolean", + "description": "True when a given Private Key is exported, false otherwise." }, - "solSendTransactionIntent": { - "$ref": "#/definitions/SolSendTransactionIntent" + "imported": { + "type": "boolean", + "description": "True when a given Private Key is imported, false otherwise." } - } + }, + "required": [ + "privateKeyId", + "publicKey", + "privateKeyName", + "curve", + "addresses", + "privateKeyTags", + "createdAt", + "updatedAt", + "exported", + "imported" + ] }, - "InvitationParams": { + "PrivateKeyParams": { "type": "object", "properties": { - "receiverUserName": { + "privateKeyName": { "type": "string", - "description": "The name of the intended Invitation recipient." + "description": "Human-readable name for a Private Key." }, - "receiverUserEmail": { - "type": "string", - "description": "The email address of the intended Invitation recipient." + "curve": { + "$ref": "#/definitions/Curve", + "description": "Cryptographic Curve used to generate a given Private Key." }, - "receiverUserTags": { + "privateKeyTags": { "type": "array", "items": { "type": "string" }, - "description": "A list of tags assigned to the Invitation recipient. This field, if not needed, should be an empty array in your request body." - }, - "accessType": { - "$ref": "#/definitions/AccessType", - "description": "The User's permissible access method(s)." + "description": "A list of Private Key Tag IDs. This field, if not needed, should be an empty array in your request body." }, - "senderUserId": { - "type": "string", - "description": "Unique identifier for the Sender of an Invitation." + "addressFormats": { + "type": "array", + "items": { + "$ref": "#/definitions/AddressFormat" + }, + "description": "Cryptocurrency-specific formats for a derived address (e.g., Ethereum)." } }, "required": [ - "receiverUserName", - "receiverUserEmail", - "receiverUserTags", - "accessType", - "senderUserId" + "privateKeyName", + "curve", + "privateKeyTags", + "addressFormats" ] }, - "ListFiatOnRampCredentialsRequest": { - "type": "object", - "properties": { - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." - } - }, - "required": ["organizationId"] - }, - "ListFiatOnRampCredentialsResponse": { + "PrivateKeyResult": { "type": "object", "properties": { - "fiatOnRampCredentials": { + "privateKeyId": { + "type": "string" + }, + "addresses": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/FiatOnRampCredential" + "$ref": "#/definitions/activity.v1.Address" } } - }, - "required": ["fiatOnRampCredentials"] + } }, - "ListOauth2CredentialsRequest": { + "PublicKeyCredentialWithAttestation": { "type": "object", "properties": { - "organizationId": { + "id": { + "type": "string" + }, + "type": { "type": "string", - "description": "Unique identifier for a given Organization." - } - }, - "required": ["organizationId"] - }, - "ListOauth2CredentialsResponse": { - "type": "object", - "properties": { - "oauth2Credentials": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Oauth2Credential" - } + "enum": ["public-key"] + }, + "rawId": { + "type": "string" + }, + "authenticatorAttachment": { + "type": "string", + "enum": ["cross-platform", "platform"], + "x-nullable": true + }, + "response": { + "$ref": "#/definitions/AuthenticatorAttestationResponse" + }, + "clientExtensionResults": { + "$ref": "#/definitions/SimpleClientExtensionResults" } }, - "required": ["oauth2Credentials"] + "required": ["id", "type", "rawId", "response", "clientExtensionResults"] }, - "ListPrivateKeyTagsRequest": { + "QuorumKeyShareApprovalBundle": { "type": "object", "properties": { - "organizationId": { + "operatorId": { "type": "string", - "description": "Unique identifier for a given organization." + "description": "Unique identifier of the operator providing this quorum key share" + }, + "reEncryptedShareHex": { + "type": "string", + "description": "Hex-encoded re-encrypted quorum key share" + }, + "signature": { + "type": "string", + "description": "Signature from the share set operator approving the manifest" } }, - "required": ["organizationId"] + "required": ["operatorId", "reEncryptedShareHex", "signature"] }, - "ListPrivateKeyTagsResponse": { + "RecoverUserIntent": { "type": "object", "properties": { - "privateKeyTags": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1.Tag" - }, - "description": "A list of private key tags." + "authenticator": { + "$ref": "#/definitions/AuthenticatorParamsV2", + "description": "The new authenticator to register." + }, + "userId": { + "type": "string", + "description": "Unique identifier for the user performing recovery." } }, - "required": ["privateKeyTags"] + "required": ["authenticator", "userId"] }, - "ListSupportedAssetsRequest": { + "RecoverUserRequest": { "type": "object", "properties": { - "organizationId": { + "type": { "type": "string", - "description": "Unique identifier for a given organization." + "enum": ["ACTIVITY_TYPE_RECOVER_USER"] }, - "caip2": { + "timestampMs": { "type": "string", - "enum": [ - "eip155:1", - "eip155:11155111", - "eip155:8453", - "eip155:84532", - "eip155:137", - "eip155:80002" - ], - "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/RecoverUserIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": ["organizationId", "caip2"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "ListSupportedAssetsResponse": { + "RecoverUserResult": { "type": "object", "properties": { - "assets": { + "authenticatorId": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/AssetMetadata" + "type": "string" }, - "description": "List of asset metadata" + "description": "ID of the authenticator created." } - } + }, + "required": ["authenticatorId"] }, - "ListUserTagsRequest": { + "RejectActivityIntent": { "type": "object", "properties": { - "organizationId": { + "fingerprint": { "type": "string", - "description": "Unique identifier for a given organization." + "description": "An artifact verifying a User's action." } }, - "required": ["organizationId"] + "required": ["fingerprint"] }, - "ListUserTagsResponse": { + "RejectActivityRequest": { "type": "object", "properties": { - "userTags": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1.Tag" - }, - "description": "A list of user tags." + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_REJECT_ACTIVITY"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/RejectActivityIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": ["userTags"] - }, - "MnemonicLanguage": { - "type": "string", - "enum": [ - "MNEMONIC_LANGUAGE_ENGLISH", - "MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE", - "MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE", - "MNEMONIC_LANGUAGE_CZECH", - "MNEMONIC_LANGUAGE_FRENCH", - "MNEMONIC_LANGUAGE_ITALIAN", - "MNEMONIC_LANGUAGE_JAPANESE", - "MNEMONIC_LANGUAGE_KOREAN", - "MNEMONIC_LANGUAGE_SPANISH" - ] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "NativeRevertError": { + "RemoveIpAllowlistIntent": { "type": "object", "properties": { - "nativeType": { + "publicKey": { "type": "string", "x-nullable": true, - "description": "The type of native error: 'error_string', 'panic', or 'execution_reverted'." + "description": "The public component of an API key. If null, removes the organization-level IP allowlist. If set, removes the IP allowlist for this specific API key." + } + } + }, + "RemoveIpAllowlistRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST"] }, - "message": { + "timestampMs": { "type": "string", - "x-nullable": true, - "description": "The error message for Error(string) reverts." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "panicCode": { + "organizationId": { "type": "string", - "format": "uint64", - "x-nullable": true, - "description": "The panic code for Panic(uint256) reverts." + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/RemoveIpAllowlistIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } - } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "Oauth2AuthenticateIntent": { + "RemoveIpAllowlistResult": { + "type": "object" + }, + "RemoveOrganizationFeatureIntent": { "type": "object", "properties": { - "oauth2CredentialId": { - "type": "string", - "description": "The OAuth 2.0 credential id whose client_id and client_secret will be used in the OAuth 2.0 flow" - }, - "authCode": { + "name": { + "$ref": "#/definitions/FeatureName", + "description": "Name of the feature to remove" + } + }, + "required": ["name"] + }, + "RemoveOrganizationFeatureRequest": { + "type": "object", + "properties": { + "type": { "type": "string", - "description": "The auth_code provided by the OAuth 2.0 provider to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow" + "enum": ["ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE"] }, - "redirectUri": { + "timestampMs": { "type": "string", - "description": "The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider" + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "codeVerifier": { + "organizationId": { "type": "string", - "description": "The code verifier used by OAuth 2.0 PKCE providers" + "description": "Unique identifier for a given Organization." }, - "nonce": { - "type": "string", - "x-nullable": true, - "description": "An optional nonce used by the client to prevent replay/substitution of an ID token" + "parameters": { + "$ref": "#/definitions/RemoveOrganizationFeatureIntent" }, - "bearerTokenTargetPublicKey": { + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "RemoveOrganizationFeatureResult": { + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Feature" + }, + "description": "Resulting list of organization features." + } + }, + "required": ["features"] + }, + "RestoreTvcDeploymentIntent": { + "type": "object", + "properties": { + "deploymentId": { "type": "string", - "x-nullable": true, - "description": "An optional P256 public key to which, if provided, the bearer token will be encrypted and returned via the `encrypted_bearer_token` claim of the OIDC Token" + "description": "The unique identifier of the TVC deployment to restore." } }, - "required": [ - "oauth2CredentialId", - "authCode", - "redirectUri", - "codeVerifier" - ] + "required": ["deploymentId"] }, - "Oauth2AuthenticateRequest": { + "RestoreTvcDeploymentRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_OAUTH2_AUTHENTICATE"] + "enum": ["ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT"] }, "timestampMs": { "type": "string", @@ -9749,7 +12254,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/Oauth2AuthenticateIntent" + "$ref": "#/definitions/RestoreTvcDeploymentIntent" }, "generateAppProofs": { "type": "boolean", @@ -9758,694 +12263,660 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "Oauth2AuthenticateResult": { + "RestoreTvcDeploymentResult": { "type": "object", "properties": { - "oidcToken": { + "deploymentId": { "type": "string", - "description": "Base64 encoded OIDC token issued by Turnkey to be used with the LoginWithOAuth activity" + "description": "The unique identifier of the restored TVC deployment." } }, - "required": ["oidcToken"] + "required": ["deploymentId"] }, - "Oauth2Credential": { + "Result": { "type": "object", "properties": { - "oauth2CredentialId": { - "type": "string", - "description": "Unique identifier for a given OAuth 2.0 Credential." + "createOrganizationResult": { + "$ref": "#/definitions/CreateOrganizationResult" + }, + "createAuthenticatorsResult": { + "$ref": "#/definitions/CreateAuthenticatorsResult" + }, + "createUsersResult": { + "$ref": "#/definitions/CreateUsersResult" + }, + "createPrivateKeysResult": { + "$ref": "#/definitions/CreatePrivateKeysResult" + }, + "createInvitationsResult": { + "$ref": "#/definitions/CreateInvitationsResult" + }, + "acceptInvitationResult": { + "$ref": "#/definitions/AcceptInvitationResult" + }, + "signRawPayloadResult": { + "$ref": "#/definitions/SignRawPayloadResult" + }, + "createPolicyResult": { + "$ref": "#/definitions/CreatePolicyResult" + }, + "disablePrivateKeyResult": { + "$ref": "#/definitions/DisablePrivateKeyResult" + }, + "deleteUsersResult": { + "$ref": "#/definitions/DeleteUsersResult" + }, + "deleteAuthenticatorsResult": { + "$ref": "#/definitions/DeleteAuthenticatorsResult" + }, + "deleteInvitationResult": { + "$ref": "#/definitions/DeleteInvitationResult" + }, + "deleteOrganizationResult": { + "$ref": "#/definitions/DeleteOrganizationResult" + }, + "deletePolicyResult": { + "$ref": "#/definitions/DeletePolicyResult" + }, + "createUserTagResult": { + "$ref": "#/definitions/CreateUserTagResult" + }, + "deleteUserTagsResult": { + "$ref": "#/definitions/DeleteUserTagsResult" + }, + "signTransactionResult": { + "$ref": "#/definitions/SignTransactionResult" + }, + "deleteApiKeysResult": { + "$ref": "#/definitions/DeleteApiKeysResult" + }, + "createApiKeysResult": { + "$ref": "#/definitions/CreateApiKeysResult" + }, + "createPrivateKeyTagResult": { + "$ref": "#/definitions/CreatePrivateKeyTagResult" + }, + "deletePrivateKeyTagsResult": { + "$ref": "#/definitions/DeletePrivateKeyTagsResult" + }, + "setPaymentMethodResult": { + "$ref": "#/definitions/SetPaymentMethodResult" + }, + "activateBillingTierResult": { + "$ref": "#/definitions/ActivateBillingTierResult" + }, + "deletePaymentMethodResult": { + "$ref": "#/definitions/DeletePaymentMethodResult" + }, + "createApiOnlyUsersResult": { + "$ref": "#/definitions/CreateApiOnlyUsersResult" + }, + "updateRootQuorumResult": { + "$ref": "#/definitions/UpdateRootQuorumResult" + }, + "updateUserTagResult": { + "$ref": "#/definitions/UpdateUserTagResult" + }, + "updatePrivateKeyTagResult": { + "$ref": "#/definitions/UpdatePrivateKeyTagResult" + }, + "createSubOrganizationResult": { + "$ref": "#/definitions/CreateSubOrganizationResult" + }, + "updateAllowedOriginsResult": { + "$ref": "#/definitions/UpdateAllowedOriginsResult" + }, + "createPrivateKeysResultV2": { + "$ref": "#/definitions/CreatePrivateKeysResultV2" + }, + "updateUserResult": { + "$ref": "#/definitions/UpdateUserResult" + }, + "updatePolicyResult": { + "$ref": "#/definitions/UpdatePolicyResult" + }, + "createSubOrganizationResultV3": { + "$ref": "#/definitions/CreateSubOrganizationResultV3" + }, + "createWalletResult": { + "$ref": "#/definitions/CreateWalletResult" + }, + "createWalletAccountsResult": { + "$ref": "#/definitions/CreateWalletAccountsResult" + }, + "initUserEmailRecoveryResult": { + "$ref": "#/definitions/InitUserEmailRecoveryResult" + }, + "recoverUserResult": { + "$ref": "#/definitions/RecoverUserResult" + }, + "setOrganizationFeatureResult": { + "$ref": "#/definitions/SetOrganizationFeatureResult" + }, + "removeOrganizationFeatureResult": { + "$ref": "#/definitions/RemoveOrganizationFeatureResult" + }, + "exportPrivateKeyResult": { + "$ref": "#/definitions/ExportPrivateKeyResult" + }, + "exportWalletResult": { + "$ref": "#/definitions/ExportWalletResult" + }, + "createSubOrganizationResultV4": { + "$ref": "#/definitions/CreateSubOrganizationResultV4" + }, + "emailAuthResult": { + "$ref": "#/definitions/EmailAuthResult" + }, + "exportWalletAccountResult": { + "$ref": "#/definitions/ExportWalletAccountResult" + }, + "initImportWalletResult": { + "$ref": "#/definitions/InitImportWalletResult" + }, + "importWalletResult": { + "$ref": "#/definitions/ImportWalletResult" + }, + "initImportPrivateKeyResult": { + "$ref": "#/definitions/InitImportPrivateKeyResult" + }, + "importPrivateKeyResult": { + "$ref": "#/definitions/ImportPrivateKeyResult" + }, + "createPoliciesResult": { + "$ref": "#/definitions/CreatePoliciesResult" + }, + "signRawPayloadsResult": { + "$ref": "#/definitions/SignRawPayloadsResult" + }, + "createReadOnlySessionResult": { + "$ref": "#/definitions/CreateReadOnlySessionResult" + }, + "createOauthProvidersResult": { + "$ref": "#/definitions/CreateOauthProvidersResult" + }, + "deleteOauthProvidersResult": { + "$ref": "#/definitions/DeleteOauthProvidersResult" + }, + "createSubOrganizationResultV5": { + "$ref": "#/definitions/CreateSubOrganizationResultV5" + }, + "oauthResult": { + "$ref": "#/definitions/OauthResult" + }, + "createReadWriteSessionResult": { + "$ref": "#/definitions/CreateReadWriteSessionResult" + }, + "createSubOrganizationResultV6": { + "$ref": "#/definitions/CreateSubOrganizationResultV6" + }, + "deletePrivateKeysResult": { + "$ref": "#/definitions/DeletePrivateKeysResult" + }, + "deleteWalletsResult": { + "$ref": "#/definitions/DeleteWalletsResult" + }, + "createReadWriteSessionResultV2": { + "$ref": "#/definitions/CreateReadWriteSessionResultV2" + }, + "deleteSubOrganizationResult": { + "$ref": "#/definitions/DeleteSubOrganizationResult" + }, + "initOtpAuthResult": { + "$ref": "#/definitions/InitOtpAuthResult" + }, + "otpAuthResult": { + "$ref": "#/definitions/OtpAuthResult" + }, + "createSubOrganizationResultV7": { + "$ref": "#/definitions/CreateSubOrganizationResultV7" }, - "organizationId": { - "type": "string", - "description": "Unique identifier for an Organization." + "updateWalletResult": { + "$ref": "#/definitions/UpdateWalletResult" }, - "provider": { - "$ref": "#/definitions/Oauth2Provider", - "description": "The provider for a given OAuth 2.0 Credential." + "updatePolicyResultV2": { + "$ref": "#/definitions/UpdatePolicyResultV2" }, - "clientId": { - "type": "string", - "description": "The client id for a given OAuth 2.0 Credential." + "initOtpAuthResultV2": { + "$ref": "#/definitions/InitOtpAuthResultV2" }, - "encryptedClientSecret": { - "type": "string", - "description": "The encrypted client secret for a given OAuth 2.0 Credential encrypted to the TLS Fetcher quorum key." + "initOtpResult": { + "$ref": "#/definitions/InitOtpResult" }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "verifyOtpResult": { + "$ref": "#/definitions/VerifyOtpResult" }, - "updatedAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" - } - }, - "required": [ - "oauth2CredentialId", - "organizationId", - "provider", - "clientId", - "encryptedClientSecret", - "createdAt", - "updatedAt" - ] - }, - "Oauth2Provider": { - "type": "string", - "enum": ["OAUTH2_PROVIDER_X", "OAUTH2_PROVIDER_DISCORD"] - }, - "OauthIntent": { - "type": "object", - "properties": { - "oidcToken": { - "type": "string", - "description": "Base64 encoded OIDC token" + "otpLoginResult": { + "$ref": "#/definitions/OtpLoginResult" }, - "targetPublicKey": { - "type": "string", - "description": "Client-side public key generated by the user, to which the oauth bundle (credentials) will be encrypted." + "stampLoginResult": { + "$ref": "#/definitions/StampLoginResult" }, - "apiKeyName": { - "type": "string", - "x-nullable": true, - "description": "Optional human-readable name for an API Key. If none provided, default to Oauth - \u003cTimestamp\u003e" + "oauthLoginResult": { + "$ref": "#/definitions/OauthLoginResult" }, - "expirationSeconds": { - "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." + "updateUserNameResult": { + "$ref": "#/definitions/UpdateUserNameResult" }, - "invalidateExisting": { - "type": "boolean", - "x-nullable": true, - "description": "Invalidate all other previously generated Oauth API keys" - } - }, - "required": ["oidcToken", "targetPublicKey"] - }, - "OauthLoginIntent": { - "type": "object", - "properties": { - "oidcToken": { - "type": "string", - "description": "Base64 encoded OIDC token" + "updateUserEmailResult": { + "$ref": "#/definitions/UpdateUserEmailResult" }, - "publicKey": { - "type": "string", - "description": "Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the oidc token associated with this request" + "updateUserPhoneNumberResult": { + "$ref": "#/definitions/UpdateUserPhoneNumberResult" }, - "expirationSeconds": { - "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used." + "initFiatOnRampResult": { + "$ref": "#/definitions/InitFiatOnRampResult" }, - "invalidateExisting": { - "type": "boolean", - "x-nullable": true, - "description": "Invalidate all other previously generated Login API keys" - } - }, - "required": ["oidcToken", "publicKey"] - }, - "OauthLoginRequest": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_OAUTH_LOGIN"] + "createSmartContractInterfaceResult": { + "$ref": "#/definitions/CreateSmartContractInterfaceResult" }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "deleteSmartContractInterfaceResult": { + "$ref": "#/definitions/DeleteSmartContractInterfaceResult" }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "enableAuthProxyResult": { + "$ref": "#/definitions/EnableAuthProxyResult" }, - "parameters": { - "$ref": "#/definitions/OauthLoginIntent" + "disableAuthProxyResult": { + "$ref": "#/definitions/DisableAuthProxyResult" }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "OauthLoginResult": { - "type": "object", - "properties": { - "session": { - "type": "string", - "description": "Signed JWT containing an expiry, public key, session type, user id, and organization id" - } - }, - "required": ["session"] - }, - "OauthProvider": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Unique identifier for an OAuth Provider" + "updateAuthProxyConfigResult": { + "$ref": "#/definitions/UpdateAuthProxyConfigResult" }, - "providerName": { - "type": "string", - "description": "Human-readable name to identify a Provider." + "createOauth2CredentialResult": { + "$ref": "#/definitions/CreateOauth2CredentialResult" }, - "issuer": { - "type": "string", - "description": "The issuer of the token, typically a URL indicating the authentication server, e.g https://accounts.google.com" + "updateOauth2CredentialResult": { + "$ref": "#/definitions/UpdateOauth2CredentialResult" }, - "audience": { - "type": "string", - "description": "Expected audience ('aud' attribute of the signed token) which represents the app ID" + "deleteOauth2CredentialResult": { + "$ref": "#/definitions/DeleteOauth2CredentialResult" }, - "subject": { - "type": "string", - "description": "Expected subject ('sub' attribute of the signed token) which represents the user ID" + "oauth2AuthenticateResult": { + "$ref": "#/definitions/Oauth2AuthenticateResult" }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "deleteWalletAccountsResult": { + "$ref": "#/definitions/DeleteWalletAccountsResult" }, - "updatedAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" - } - }, - "required": [ - "providerId", - "providerName", - "issuer", - "audience", - "subject", - "createdAt", - "updatedAt" - ] - }, - "OauthProviderParams": { - "type": "object", - "properties": { - "providerName": { - "type": "string", - "description": "Human-readable name to identify a Provider." + "deletePoliciesResult": { + "$ref": "#/definitions/DeletePoliciesResult" }, - "oidcToken": { - "type": "string", - "description": "Base64 encoded OIDC token" - } - }, - "required": ["providerName", "oidcToken"] - }, - "OauthRequest": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_OAUTH"] + "ethSendRawTransactionResult": { + "$ref": "#/definitions/EthSendRawTransactionResult" }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "createFiatOnRampCredentialResult": { + "$ref": "#/definitions/CreateFiatOnRampCredentialResult" }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "updateFiatOnRampCredentialResult": { + "$ref": "#/definitions/UpdateFiatOnRampCredentialResult" }, - "parameters": { - "$ref": "#/definitions/OauthIntent" + "deleteFiatOnRampCredentialResult": { + "$ref": "#/definitions/DeleteFiatOnRampCredentialResult" }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "OauthResult": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique identifier for the authenticating User." + "ethSendTransactionResult": { + "$ref": "#/definitions/EthSendTransactionResult" + }, + "upsertGasUsageConfigResult": { + "$ref": "#/definitions/UpsertGasUsageConfigResult" + }, + "createTvcAppResult": { + "$ref": "#/definitions/CreateTvcAppResult" + }, + "createTvcDeploymentResult": { + "$ref": "#/definitions/CreateTvcDeploymentResult" + }, + "createTvcManifestApprovalsResult": { + "$ref": "#/definitions/CreateTvcManifestApprovalsResult" + }, + "solSendTransactionResult": { + "$ref": "#/definitions/SolSendTransactionResult" + }, + "initOtpResultV2": { + "$ref": "#/definitions/InitOtpResultV2" }, - "apiKeyId": { - "type": "string", - "description": "Unique identifier for the created API key." + "updateOrganizationNameResult": { + "$ref": "#/definitions/UpdateOrganizationNameResult" }, - "credentialBundle": { - "type": "string", - "description": "HPKE encrypted credential bundle" - } - }, - "required": ["userId", "apiKeyId", "credentialBundle"] - }, - "Operator": { - "type": "string", - "enum": [ - "OPERATOR_EQUAL", - "OPERATOR_MORE_THAN", - "OPERATOR_MORE_THAN_OR_EQUAL", - "OPERATOR_LESS_THAN", - "OPERATOR_LESS_THAN_OR_EQUAL", - "OPERATOR_CONTAINS", - "OPERATOR_NOT_EQUAL", - "OPERATOR_IN", - "OPERATOR_NOT_IN", - "OPERATOR_CONTAINS_ONE", - "OPERATOR_CONTAINS_ALL" - ] - }, - "OtpAuthIntent": { - "type": "object", - "properties": { - "otpId": { - "type": "string", - "description": "ID representing the result of an init OTP activity." + "createSubOrganizationResultV8": { + "$ref": "#/definitions/CreateSubOrganizationResultV8" }, - "otpCode": { - "type": "string", - "description": "OTP sent out to a user's contact (email or SMS)" + "createOauthProvidersResultV2": { + "$ref": "#/definitions/CreateOauthProvidersResultV2" }, - "targetPublicKey": { - "type": "string", - "description": "Client-side public key generated by the user, to which the OTP bundle (credentials) will be encrypted." + "createWebhookEndpointResult": { + "$ref": "#/definitions/CreateWebhookEndpointResult" }, - "apiKeyName": { - "type": "string", - "x-nullable": true, - "description": "Optional human-readable name for an API Key. If none provided, default to OTP Auth - \u003cTimestamp\u003e" + "updateWebhookEndpointResult": { + "$ref": "#/definitions/UpdateWebhookEndpointResult" }, - "expirationSeconds": { - "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." + "deleteWebhookEndpointResult": { + "$ref": "#/definitions/DeleteWebhookEndpointResult" }, - "invalidateExisting": { - "type": "boolean", - "x-nullable": true, - "description": "Invalidate all other previously generated OTP Auth API keys" - } - }, - "required": ["otpId", "otpCode", "targetPublicKey"] - }, - "OtpAuthRequest": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_OTP_AUTH"] + "setIpAllowlistResult": { + "$ref": "#/definitions/SetIpAllowlistResult" }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "removeIpAllowlistResult": { + "$ref": "#/definitions/RemoveIpAllowlistResult" }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." + "updateTvcAppLiveDeploymentResult": { + "$ref": "#/definitions/UpdateTvcAppLiveDeploymentResult" }, - "parameters": { - "$ref": "#/definitions/OtpAuthIntent" + "deleteTvcDeploymentResult": { + "$ref": "#/definitions/DeleteTvcDeploymentResult" }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "OtpAuthResult": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique identifier for the authenticating User." + "deleteTvcAppAndDeploymentsResult": { + "$ref": "#/definitions/DeleteTvcAppAndDeploymentsResult" }, - "apiKeyId": { - "type": "string", - "description": "Unique identifier for the created API key." + "restoreTvcDeploymentResult": { + "$ref": "#/definitions/RestoreTvcDeploymentResult" }, - "credentialBundle": { - "type": "string", - "description": "HPKE encrypted credential bundle" - } - }, - "required": ["userId"] - }, - "OtpLoginIntent": { - "type": "object", - "properties": { - "verificationToken": { - "type": "string", - "description": "Signed JWT containing a unique id, expiry, verification type, contact" + "sparkSignFrostResult": { + "$ref": "#/definitions/SparkSignFrostResult" }, - "publicKey": { - "type": "string", - "description": "Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the verification token" + "sparkPrepareTransferResult": { + "$ref": "#/definitions/SparkPrepareTransferResult" }, - "expirationSeconds": { - "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used." + "sparkClaimTransferResult": { + "$ref": "#/definitions/SparkClaimTransferResult" }, - "invalidateExisting": { - "type": "boolean", - "x-nullable": true, - "description": "Invalidate all other previously generated Login API keys" + "sparkPrepareLightningReceiveResult": { + "$ref": "#/definitions/SparkPrepareLightningReceiveResult" }, - "clientSignature": { - "$ref": "#/definitions/ClientSignature", - "x-nullable": true, - "description": "Optional signature proving authorization for this login. The signature is over the verification token ID and the public key. Only required if a public key was provided during the verification step." + "postTvcQuorumKeyShareResult": { + "$ref": "#/definitions/PostTvcQuorumKeyShareResult" } - }, - "required": ["verificationToken", "publicKey"] + } }, - "OtpLoginRequest": { + "RevertChainEntry": { "type": "object", "properties": { - "type": { + "address": { "type": "string", - "enum": ["ACTIVITY_TYPE_OTP_LOGIN"] + "description": "The contract address where the revert occurred." }, - "timestampMs": { + "errorType": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "description": "Type of error: 'unknown', 'native', or 'custom'." }, - "organizationId": { + "displayMessage": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "Human-readable message describing this revert." }, - "parameters": { - "$ref": "#/definitions/OtpLoginIntent" + "unknown": { + "$ref": "#/definitions/UnknownRevertError", + "description": "Details for unknown error types." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "OtpLoginResult": { - "type": "object", - "properties": { - "session": { - "type": "string", - "description": "Signed JWT containing an expiry, public key, session type, user id, and organization id" + "native": { + "$ref": "#/definitions/NativeRevertError", + "description": "Details for native Solidity errors (Error, Panic, execution reverted)." + }, + "custom": { + "$ref": "#/definitions/CustomRevertError", + "description": "Details for custom contract errors." } - }, - "required": ["session"] - }, - "Outcome": { - "type": "string", - "enum": [ - "OUTCOME_ALLOW", - "OUTCOME_DENY_EXPLICIT", - "OUTCOME_DENY_IMPLICIT", - "OUTCOME_REQUIRES_CONSENSUS", - "OUTCOME_REJECTED", - "OUTCOME_ERROR" - ] + } }, - "Pagination": { + "RootUserParams": { "type": "object", "properties": { - "limit": { + "userName": { "type": "string", - "description": "A limit of the number of object to be returned, between 1 and 100. Defaults to 10." + "description": "Human-readable name for a User." }, - "before": { + "userEmail": { "type": "string", - "description": "A pagination cursor. This is an object ID that enables you to fetch all objects before this ID." + "x-nullable": true, + "description": "The user's email address." }, - "after": { - "type": "string", - "description": "A pagination cursor. This is an object ID that enables you to fetch all objects after this ID." + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKeyParams" + }, + "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." + }, + "authenticators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AuthenticatorParamsV2" + }, + "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." } - } - }, - "PathFormat": { - "type": "string", - "enum": ["PATH_FORMAT_BIP32"] - }, - "PayloadEncoding": { - "type": "string", - "enum": [ - "PAYLOAD_ENCODING_HEXADECIMAL", - "PAYLOAD_ENCODING_TEXT_UTF8", - "PAYLOAD_ENCODING_EIP712", - "PAYLOAD_ENCODING_EIP7702_AUTHORIZATION" - ] + }, + "required": ["userName", "apiKeys", "authenticators"] }, - "Policy": { + "RootUserParamsV2": { "type": "object", "properties": { - "policyId": { + "userName": { "type": "string", - "description": "Unique identifier for a given Policy." + "description": "Human-readable name for a User." }, - "policyName": { + "userEmail": { "type": "string", - "description": "Human-readable name for a Policy." - }, - "effect": { - "$ref": "#/definitions/Effect", - "description": "The instruction to DENY or ALLOW a particular activity following policy selector(s)." + "x-nullable": true, + "description": "The user's email address." }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKeyParams" + }, + "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." }, - "updatedAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "authenticators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AuthenticatorParamsV2" + }, + "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." }, - "notes": { + "oauthProviders": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/OauthProviderParams" + }, + "description": "A list of Oauth providers. This field, if not needed, should be an empty array in your request body." + } + }, + "required": ["userName", "apiKeys", "authenticators", "oauthProviders"] + }, + "RootUserParamsV3": { + "type": "object", + "properties": { + "userName": { "type": "string", - "description": "Human-readable notes added by a User to describe a particular policy." + "description": "Human-readable name for a User." }, - "consensus": { + "userEmail": { "type": "string", "x-nullable": true, - "description": "A consensus expression that evalutes to true or false." + "description": "The user's email address." }, - "condition": { - "type": "string", - "x-nullable": true, - "description": "A condition expression that evalutes to true or false." + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKeyParamsV2" + }, + "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." + }, + "authenticators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AuthenticatorParamsV2" + }, + "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." + }, + "oauthProviders": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/OauthProviderParams" + }, + "description": "A list of Oauth providers. This field, if not needed, should be an empty array in your request body." } }, - "required": [ - "policyId", - "policyName", - "effect", - "createdAt", - "updatedAt", - "notes", - "consensus", - "condition" - ] + "required": ["userName", "apiKeys", "authenticators", "oauthProviders"] }, - "PrivateKey": { + "RootUserParamsV4": { "type": "object", "properties": { - "privateKeyId": { + "userName": { "type": "string", - "description": "Unique identifier for a given Private Key." + "description": "Human-readable name for a User." }, - "publicKey": { + "userEmail": { "type": "string", - "description": "The public component of a cryptographic key pair used to sign messages and transactions." + "x-nullable": true, + "description": "The user's email address." }, - "privateKeyName": { + "userPhoneNumber": { "type": "string", - "description": "Human-readable name for a Private Key." - }, - "curve": { - "$ref": "#/definitions/Curve", - "description": "Cryptographic Curve used to generate a given Private Key." + "x-nullable": true, + "description": "The user's phone number in E.164 format e.g. +13214567890" }, - "addresses": { + "apiKeys": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/data.v1.Address" + "$ref": "#/definitions/ApiKeyParamsV2" }, - "description": "Derived cryptocurrency addresses for a given Private Key." + "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." }, - "privateKeyTags": { + "authenticators": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/AuthenticatorParamsV2" }, - "description": "A list of Private Key Tag IDs." - }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" - }, - "updatedAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" - }, - "exported": { - "type": "boolean", - "description": "True when a given Private Key is exported, false otherwise." + "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." }, - "imported": { - "type": "boolean", - "description": "True when a given Private Key is imported, false otherwise." + "oauthProviders": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/OauthProviderParams" + }, + "description": "A list of Oauth providers. This field, if not needed, should be an empty array in your request body." } }, - "required": [ - "privateKeyId", - "publicKey", - "privateKeyName", - "curve", - "addresses", - "privateKeyTags", - "createdAt", - "updatedAt", - "exported", - "imported" - ] + "required": ["userName", "apiKeys", "authenticators", "oauthProviders"] }, - "PrivateKeyParams": { + "RootUserParamsV5": { "type": "object", "properties": { - "privateKeyName": { + "userName": { "type": "string", - "description": "Human-readable name for a Private Key." + "description": "Human-readable name for a User." }, - "curve": { - "$ref": "#/definitions/Curve", - "description": "Cryptographic Curve used to generate a given Private Key." + "userEmail": { + "type": "string", + "x-nullable": true, + "description": "The user's email address." }, - "privateKeyTags": { + "userPhoneNumber": { + "type": "string", + "x-nullable": true, + "description": "The user's phone number in E.164 format e.g. +13214567890" + }, + "apiKeys": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/ApiKeyParamsV2" }, - "description": "A list of Private Key Tag IDs. This field, if not needed, should be an empty array in your request body." + "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." }, - "addressFormats": { + "authenticators": { "type": "array", "items": { - "$ref": "#/definitions/AddressFormat" + "type": "object", + "$ref": "#/definitions/AuthenticatorParamsV2" }, - "description": "Cryptocurrency-specific formats for a derived address (e.g., Ethereum)." - } - }, - "required": [ - "privateKeyName", - "curve", - "privateKeyTags", - "addressFormats" - ] - }, - "PrivateKeyResult": { - "type": "object", - "properties": { - "privateKeyId": { - "type": "string" + "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." }, - "addresses": { + "oauthProviders": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/activity.v1.Address" - } + "$ref": "#/definitions/OauthProviderParamsV2" + }, + "description": "A list of Oauth providers. This field, if not needed, should be an empty array in your request body." } - } + }, + "required": ["userName", "apiKeys", "authenticators", "oauthProviders"] }, - "PublicKeyCredentialWithAttestation": { + "Selector": { "type": "object", "properties": { - "id": { + "subject": { "type": "string" }, - "type": { - "type": "string", - "enum": ["public-key"] + "operator": { + "$ref": "#/definitions/Operator" }, - "rawId": { + "target": { "type": "string" - }, - "authenticatorAttachment": { - "type": "string", - "enum": ["cross-platform", "platform"], - "x-nullable": true - }, - "response": { - "$ref": "#/definitions/AuthenticatorAttestationResponse" - }, - "clientExtensionResults": { - "$ref": "#/definitions/SimpleClientExtensionResults" } - }, - "required": ["id", "type", "rawId", "response", "clientExtensionResults"] + } }, - "RecoverUserIntent": { + "SelectorV2": { "type": "object", "properties": { - "authenticator": { - "$ref": "#/definitions/AuthenticatorParamsV2", - "description": "The new authenticator to register." + "subject": { + "type": "string" }, - "userId": { - "type": "string", - "description": "Unique identifier for the user performing recovery." + "operator": { + "$ref": "#/definitions/Operator" + }, + "targets": { + "type": "array", + "items": { + "type": "string" + } } - }, - "required": ["authenticator", "userId"] + } }, - "RecoverUserRequest": { + "SetIpAllowlistIntent": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_RECOVER_USER"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, - "organizationId": { + "publicKey": { "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/RecoverUserIntent" + "x-nullable": true, + "description": "The public component of an API key. If null, the IP allowlist applies at the organization level. If set, it applies only to this specific API key." }, - "generateAppProofs": { + "enabled": { "type": "boolean", - "x-nullable": true - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "RecoverUserResult": { - "type": "object", - "properties": { - "authenticatorId": { + "x-nullable": true, + "description": "Whether the IP allowlist is enabled. Only meaningful for organization-level allowlists. Omit for API key-level allowlists." + }, + "rules": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/IpAllowlistIntentRule" }, - "description": "ID of the authenticator created." - } - }, - "required": ["authenticatorId"] - }, - "RejectActivityIntent": { - "type": "object", - "properties": { - "fingerprint": { + "description": "List of IP allowlist rules with CIDR blocks and optional labels." + }, + "onEvaluationError": { "type": "string", - "description": "An artifact verifying a User's action." + "x-nullable": true, + "description": "Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY." } - }, - "required": ["fingerprint"] + } }, - "RejectActivityRequest": { + "SetIpAllowlistRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_REJECT_ACTIVITY"] + "enum": ["ACTIVITY_TYPE_SET_IP_ALLOWLIST"] }, "timestampMs": { "type": "string", @@ -10456,7 +12927,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/RejectActivityIntent" + "$ref": "#/definitions/SetIpAllowlistIntent" }, "generateAppProofs": { "type": "boolean", @@ -10465,22 +12936,30 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "RemoveOrganizationFeatureIntent": { + "SetIpAllowlistResult": { + "type": "object" + }, + "SetOrganizationFeatureIntent": { "type": "object", "properties": { "name": { "$ref": "#/definitions/FeatureName", - "description": "Name of the feature to remove" + "description": "Name of the feature to set" + }, + "value": { + "type": "string", + "x-nullable": true, + "description": "Optional value for the feature. Will override existing values if feature is already set." } }, - "required": ["name"] + "required": ["name", "value"] }, - "RemoveOrganizationFeatureRequest": { + "SetOrganizationFeatureRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE"] + "enum": ["ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE"] }, "timestampMs": { "type": "string", @@ -10491,7 +12970,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/RemoveOrganizationFeatureIntent" + "$ref": "#/definitions/SetOrganizationFeatureIntent" }, "generateAppProofs": { "type": "boolean", @@ -10500,7 +12979,7 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "RemoveOrganizationFeatureResult": { + "SetOrganizationFeatureResult": { "type": "object", "properties": { "features": { @@ -10514,539 +12993,799 @@ }, "required": ["features"] }, - "Result": { + "SetPaymentMethodIntent": { "type": "object", "properties": { - "createOrganizationResult": { - "$ref": "#/definitions/CreateOrganizationResult" - }, - "createAuthenticatorsResult": { - "$ref": "#/definitions/CreateAuthenticatorsResult" - }, - "createUsersResult": { - "$ref": "#/definitions/CreateUsersResult" - }, - "createPrivateKeysResult": { - "$ref": "#/definitions/CreatePrivateKeysResult" - }, - "createInvitationsResult": { - "$ref": "#/definitions/CreateInvitationsResult" - }, - "acceptInvitationResult": { - "$ref": "#/definitions/AcceptInvitationResult" - }, - "signRawPayloadResult": { - "$ref": "#/definitions/SignRawPayloadResult" - }, - "createPolicyResult": { - "$ref": "#/definitions/CreatePolicyResult" - }, - "disablePrivateKeyResult": { - "$ref": "#/definitions/DisablePrivateKeyResult" - }, - "deleteUsersResult": { - "$ref": "#/definitions/DeleteUsersResult" - }, - "deleteAuthenticatorsResult": { - "$ref": "#/definitions/DeleteAuthenticatorsResult" - }, - "deleteInvitationResult": { - "$ref": "#/definitions/DeleteInvitationResult" - }, - "deleteOrganizationResult": { - "$ref": "#/definitions/DeleteOrganizationResult" - }, - "deletePolicyResult": { - "$ref": "#/definitions/DeletePolicyResult" - }, - "createUserTagResult": { - "$ref": "#/definitions/CreateUserTagResult" - }, - "deleteUserTagsResult": { - "$ref": "#/definitions/DeleteUserTagsResult" - }, - "signTransactionResult": { - "$ref": "#/definitions/SignTransactionResult" - }, - "deleteApiKeysResult": { - "$ref": "#/definitions/DeleteApiKeysResult" - }, - "createApiKeysResult": { - "$ref": "#/definitions/CreateApiKeysResult" - }, - "createPrivateKeyTagResult": { - "$ref": "#/definitions/CreatePrivateKeyTagResult" - }, - "deletePrivateKeyTagsResult": { - "$ref": "#/definitions/DeletePrivateKeyTagsResult" - }, - "setPaymentMethodResult": { - "$ref": "#/definitions/SetPaymentMethodResult" - }, - "activateBillingTierResult": { - "$ref": "#/definitions/ActivateBillingTierResult" - }, - "deletePaymentMethodResult": { - "$ref": "#/definitions/DeletePaymentMethodResult" - }, - "createApiOnlyUsersResult": { - "$ref": "#/definitions/CreateApiOnlyUsersResult" - }, - "updateRootQuorumResult": { - "$ref": "#/definitions/UpdateRootQuorumResult" - }, - "updateUserTagResult": { - "$ref": "#/definitions/UpdateUserTagResult" - }, - "updatePrivateKeyTagResult": { - "$ref": "#/definitions/UpdatePrivateKeyTagResult" - }, - "createSubOrganizationResult": { - "$ref": "#/definitions/CreateSubOrganizationResult" - }, - "updateAllowedOriginsResult": { - "$ref": "#/definitions/UpdateAllowedOriginsResult" - }, - "createPrivateKeysResultV2": { - "$ref": "#/definitions/CreatePrivateKeysResultV2" - }, - "updateUserResult": { - "$ref": "#/definitions/UpdateUserResult" - }, - "updatePolicyResult": { - "$ref": "#/definitions/UpdatePolicyResult" - }, - "createSubOrganizationResultV3": { - "$ref": "#/definitions/CreateSubOrganizationResultV3" - }, - "createWalletResult": { - "$ref": "#/definitions/CreateWalletResult" - }, - "createWalletAccountsResult": { - "$ref": "#/definitions/CreateWalletAccountsResult" - }, - "initUserEmailRecoveryResult": { - "$ref": "#/definitions/InitUserEmailRecoveryResult" - }, - "recoverUserResult": { - "$ref": "#/definitions/RecoverUserResult" - }, - "setOrganizationFeatureResult": { - "$ref": "#/definitions/SetOrganizationFeatureResult" - }, - "removeOrganizationFeatureResult": { - "$ref": "#/definitions/RemoveOrganizationFeatureResult" - }, - "exportPrivateKeyResult": { - "$ref": "#/definitions/ExportPrivateKeyResult" - }, - "exportWalletResult": { - "$ref": "#/definitions/ExportWalletResult" - }, - "createSubOrganizationResultV4": { - "$ref": "#/definitions/CreateSubOrganizationResultV4" - }, - "emailAuthResult": { - "$ref": "#/definitions/EmailAuthResult" - }, - "exportWalletAccountResult": { - "$ref": "#/definitions/ExportWalletAccountResult" - }, - "initImportWalletResult": { - "$ref": "#/definitions/InitImportWalletResult" - }, - "importWalletResult": { - "$ref": "#/definitions/ImportWalletResult" - }, - "initImportPrivateKeyResult": { - "$ref": "#/definitions/InitImportPrivateKeyResult" - }, - "importPrivateKeyResult": { - "$ref": "#/definitions/ImportPrivateKeyResult" - }, - "createPoliciesResult": { - "$ref": "#/definitions/CreatePoliciesResult" - }, - "signRawPayloadsResult": { - "$ref": "#/definitions/SignRawPayloadsResult" - }, - "createReadOnlySessionResult": { - "$ref": "#/definitions/CreateReadOnlySessionResult" + "number": { + "type": "string", + "description": "The account number of the customer's credit card." }, - "createOauthProvidersResult": { - "$ref": "#/definitions/CreateOauthProvidersResult" + "cvv": { + "type": "string", + "description": "The verification digits of the customer's credit card." }, - "deleteOauthProvidersResult": { - "$ref": "#/definitions/DeleteOauthProvidersResult" + "expiryMonth": { + "type": "string", + "description": "The month that the credit card expires." }, - "createSubOrganizationResultV5": { - "$ref": "#/definitions/CreateSubOrganizationResultV5" + "expiryYear": { + "type": "string", + "description": "The year that the credit card expires." }, - "oauthResult": { - "$ref": "#/definitions/OauthResult" + "cardHolderEmail": { + "type": "string", + "description": "The email that will receive invoices for the credit card." }, - "createReadWriteSessionResult": { - "$ref": "#/definitions/CreateReadWriteSessionResult" + "cardHolderName": { + "type": "string", + "description": "The name associated with the credit card." + } + }, + "required": [ + "number", + "cvv", + "expiryMonth", + "expiryYear", + "cardHolderEmail", + "cardHolderName" + ] + }, + "SetPaymentMethodIntentV2": { + "type": "object", + "properties": { + "paymentMethodId": { + "type": "string", + "description": "The id of the payment method that was created clientside." }, - "createSubOrganizationResultV6": { - "$ref": "#/definitions/CreateSubOrganizationResultV6" + "cardHolderEmail": { + "type": "string", + "description": "The email that will receive invoices for the credit card." }, - "deletePrivateKeysResult": { - "$ref": "#/definitions/DeletePrivateKeysResult" + "cardHolderName": { + "type": "string", + "description": "The name associated with the credit card." + } + }, + "required": ["paymentMethodId", "cardHolderEmail", "cardHolderName"] + }, + "SetPaymentMethodResult": { + "type": "object", + "properties": { + "lastFour": { + "type": "string", + "description": "The last four digits of the credit card added." }, - "deleteWalletsResult": { - "$ref": "#/definitions/DeleteWalletsResult" + "cardHolderName": { + "type": "string", + "description": "The name associated with the payment method." }, - "createReadWriteSessionResultV2": { - "$ref": "#/definitions/CreateReadWriteSessionResultV2" + "cardHolderEmail": { + "type": "string", + "description": "The email address associated with the payment method." + } + }, + "required": ["lastFour", "cardHolderName", "cardHolderEmail"] + }, + "SignRawPayloadIntent": { + "type": "object", + "properties": { + "privateKeyId": { + "type": "string", + "description": "Unique identifier for a given Private Key." }, - "deleteSubOrganizationResult": { - "$ref": "#/definitions/DeleteSubOrganizationResult" + "payload": { + "type": "string", + "description": "Raw unsigned payload to be signed." }, - "initOtpAuthResult": { - "$ref": "#/definitions/InitOtpAuthResult" + "encoding": { + "$ref": "#/definitions/PayloadEncoding", + "description": "Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8)." }, - "otpAuthResult": { - "$ref": "#/definitions/OtpAuthResult" + "hashFunction": { + "$ref": "#/definitions/HashFunction", + "description": "Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032." + } + }, + "required": ["privateKeyId", "payload", "encoding", "hashFunction"] + }, + "SignRawPayloadIntentV2": { + "type": "object", + "properties": { + "signWith": { + "type": "string", + "description": "A Wallet account address, Private Key address, or Private Key identifier." }, - "createSubOrganizationResultV7": { - "$ref": "#/definitions/CreateSubOrganizationResultV7" + "payload": { + "type": "string", + "description": "Raw unsigned payload to be signed." }, - "updateWalletResult": { - "$ref": "#/definitions/UpdateWalletResult" + "encoding": { + "$ref": "#/definitions/PayloadEncoding", + "description": "Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8)." }, - "updatePolicyResultV2": { - "$ref": "#/definitions/UpdatePolicyResultV2" + "hashFunction": { + "$ref": "#/definitions/HashFunction", + "description": "Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032." + } + }, + "required": ["signWith", "payload", "encoding", "hashFunction"] + }, + "SignRawPayloadRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2"] }, - "initOtpAuthResultV2": { - "$ref": "#/definitions/InitOtpAuthResultV2" + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "initOtpResult": { - "$ref": "#/definitions/InitOtpResult" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "verifyOtpResult": { - "$ref": "#/definitions/VerifyOtpResult" + "parameters": { + "$ref": "#/definitions/SignRawPayloadIntentV2" }, - "otpLoginResult": { - "$ref": "#/definitions/OtpLoginResult" + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "SignRawPayloadResult": { + "type": "object", + "properties": { + "r": { + "type": "string", + "description": "Component of an ECSDA signature." }, - "stampLoginResult": { - "$ref": "#/definitions/StampLoginResult" + "s": { + "type": "string", + "description": "Component of an ECSDA signature." }, - "oauthLoginResult": { - "$ref": "#/definitions/OauthLoginResult" + "v": { + "type": "string", + "description": "Component of an ECSDA signature." + } + }, + "required": ["r", "s", "v"] + }, + "SignRawPayloadsIntent": { + "type": "object", + "properties": { + "signWith": { + "type": "string", + "description": "A Wallet account address, Private Key address, or Private Key identifier." }, - "updateUserNameResult": { - "$ref": "#/definitions/UpdateUserNameResult" + "payloads": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of raw unsigned payloads to be signed." }, - "updateUserEmailResult": { - "$ref": "#/definitions/UpdateUserEmailResult" + "encoding": { + "$ref": "#/definitions/PayloadEncoding", + "description": "Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8)." }, - "updateUserPhoneNumberResult": { - "$ref": "#/definitions/UpdateUserPhoneNumberResult" + "hashFunction": { + "$ref": "#/definitions/HashFunction", + "description": "Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032." + } + }, + "required": ["signWith", "payloads", "encoding", "hashFunction"] + }, + "SignRawPayloadsRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_SIGN_RAW_PAYLOADS"] }, - "initFiatOnRampResult": { - "$ref": "#/definitions/InitFiatOnRampResult" + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "createSmartContractInterfaceResult": { - "$ref": "#/definitions/CreateSmartContractInterfaceResult" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "deleteSmartContractInterfaceResult": { - "$ref": "#/definitions/DeleteSmartContractInterfaceResult" + "parameters": { + "$ref": "#/definitions/SignRawPayloadsIntent" }, - "enableAuthProxyResult": { - "$ref": "#/definitions/EnableAuthProxyResult" + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "SignRawPayloadsResult": { + "type": "object", + "properties": { + "signatures": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/SignRawPayloadResult" + } + } + } + }, + "SignTransactionIntent": { + "type": "object", + "properties": { + "privateKeyId": { + "type": "string", + "description": "Unique identifier for a given Private Key." }, - "disableAuthProxyResult": { - "$ref": "#/definitions/DisableAuthProxyResult" + "unsignedTransaction": { + "type": "string", + "description": "Raw unsigned transaction to be signed by a particular Private Key." }, - "updateAuthProxyConfigResult": { - "$ref": "#/definitions/UpdateAuthProxyConfigResult" + "type": { + "$ref": "#/definitions/TransactionType" + } + }, + "required": ["privateKeyId", "unsignedTransaction", "type"] + }, + "SignTransactionIntentV2": { + "type": "object", + "properties": { + "signWith": { + "type": "string", + "description": "A Wallet account address, Private Key address, or Private Key identifier." }, - "createOauth2CredentialResult": { - "$ref": "#/definitions/CreateOauth2CredentialResult" + "unsignedTransaction": { + "type": "string", + "description": "Raw unsigned transaction to be signed" }, - "updateOauth2CredentialResult": { - "$ref": "#/definitions/UpdateOauth2CredentialResult" + "type": { + "$ref": "#/definitions/TransactionType" + } + }, + "required": ["signWith", "unsignedTransaction", "type"] + }, + "SignTransactionRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_SIGN_TRANSACTION_V2"] }, - "deleteOauth2CredentialResult": { - "$ref": "#/definitions/DeleteOauth2CredentialResult" + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "oauth2AuthenticateResult": { - "$ref": "#/definitions/Oauth2AuthenticateResult" + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "deleteWalletAccountsResult": { - "$ref": "#/definitions/DeleteWalletAccountsResult" + "parameters": { + "$ref": "#/definitions/SignTransactionIntentV2" }, - "deletePoliciesResult": { - "$ref": "#/definitions/DeletePoliciesResult" + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "SignTransactionResult": { + "type": "object", + "properties": { + "signedTransaction": { + "type": "string" + } + }, + "required": ["signedTransaction"] + }, + "SignupUsage": { + "type": "object", + "properties": { + "email": { + "type": "string", + "x-nullable": true }, - "ethSendRawTransactionResult": { - "$ref": "#/definitions/EthSendRawTransactionResult" + "phoneNumber": { + "type": "string", + "x-nullable": true }, - "createFiatOnRampCredentialResult": { - "$ref": "#/definitions/CreateFiatOnRampCredentialResult" + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKeyParamsV2" + } }, - "updateFiatOnRampCredentialResult": { - "$ref": "#/definitions/UpdateFiatOnRampCredentialResult" + "authenticators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AuthenticatorParamsV2" + } }, - "deleteFiatOnRampCredentialResult": { - "$ref": "#/definitions/DeleteFiatOnRampCredentialResult" + "oauthProviders": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/OauthProviderParams" + } + } + } + }, + "SignupUsageV2": { + "type": "object", + "properties": { + "email": { + "type": "string", + "x-nullable": true }, - "ethSendTransactionResult": { - "$ref": "#/definitions/EthSendTransactionResult" + "phoneNumber": { + "type": "string", + "x-nullable": true }, - "upsertGasUsageConfigResult": { - "$ref": "#/definitions/UpsertGasUsageConfigResult" + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKeyParamsV2" + } }, - "createTvcAppResult": { - "$ref": "#/definitions/CreateTvcAppResult" + "authenticators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AuthenticatorParamsV2" + } }, - "createTvcDeploymentResult": { - "$ref": "#/definitions/CreateTvcDeploymentResult" + "oauthProviders": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/OauthProviderParamsV2" + } + } + } + }, + "SimpleClientExtensionResults": { + "type": "object", + "properties": { + "appid": { + "type": "boolean", + "x-nullable": true }, - "createTvcManifestApprovalsResult": { - "$ref": "#/definitions/CreateTvcManifestApprovalsResult" + "appidExclude": { + "type": "boolean", + "x-nullable": true }, - "solSendTransactionResult": { - "$ref": "#/definitions/SolSendTransactionResult" + "credProps": { + "$ref": "#/definitions/CredPropsAuthenticationExtensionsClientOutputs", + "x-nullable": true } } }, - "RevertChainEntry": { + "SmartContractInterfaceType": { + "type": "string", + "enum": [ + "SMART_CONTRACT_INTERFACE_TYPE_ETHEREUM", + "SMART_CONTRACT_INTERFACE_TYPE_SOLANA" + ] + }, + "SmsCustomizationParams": { "type": "object", "properties": { - "address": { + "template": { "type": "string", - "description": "The contract address where the revert occurred." + "x-nullable": true, + "description": "Template containing references to .OtpCode i.e Your OTP is {{.OtpCode}}" + } + } + }, + "SolSendTransactionIntent": { + "type": "object", + "properties": { + "unsignedTransaction": { + "type": "string", + "description": "Base64-encoded serialized unsigned Solana transaction" }, - "errorType": { + "signWith": { "type": "string", - "description": "Type of error: 'unknown', 'native', or 'custom'." + "description": "A wallet or private key address to sign with. This does not support private key IDs." }, - "displayMessage": { + "sponsor": { + "type": "boolean", + "x-nullable": true, + "description": "Whether to sponsor this transaction via Gas Station." + }, + "caip2": { "type": "string", - "description": "Human-readable message describing this revert." + "enum": [ + "solana:mainnet", + "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", + "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d", + "solana:devnet", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG" + ], + "description": "CAIP-2 chain ID (e.g., 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values." }, - "unknown": { - "$ref": "#/definitions/UnknownRevertError", - "description": "Details for unknown error types." + "recentBlockhash": { + "type": "string", + "x-nullable": true, + "description": "user-provided blockhash for replay protection / deadline control. If omitted and sponsor=true, we fetch a fresh blockhash during execution" + } + }, + "required": ["unsignedTransaction", "signWith", "caip2"] + }, + "SolSendTransactionRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_SOL_SEND_TRANSACTION"] }, - "native": { - "$ref": "#/definitions/NativeRevertError", - "description": "Details for native Solidity errors (Error, Panic, execution reverted)." + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "custom": { - "$ref": "#/definitions/CustomRevertError", - "description": "Details for custom contract errors." + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/SolSendTransactionIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "SolSendTransactionResult": { + "type": "object", + "properties": { + "sendTransactionStatusId": { + "type": "string", + "description": "The send_transaction_status ID associated with the transaction submission" + } + }, + "required": ["sendTransactionStatusId"] + }, + "SolanaConfig": { + "type": "object", + "properties": { + "rentPrefundEnabled": { + "type": "boolean", + "x-nullable": true, + "description": "Whether Solana rent prefunding is enabled for the organization. When omitted, the existing rent-prefund state is left unchanged." } } }, - "RootUserParams": { + "SolanaFailureDetails": { "type": "object", "properties": { - "userName": { + "source": { "type": "string", - "description": "Human-readable name for a User." + "description": "Where the Solana failure occurred, such as simulation or preflight." }, - "userEmail": { + "rpcCode": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "The Solana JSON-RPC error code, if available." + }, + "rpcMessage": { "type": "string", "x-nullable": true, - "description": "The user's email address." + "description": "The Solana JSON-RPC error message, if available." }, - "apiKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ApiKeyParams" - }, - "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." + "transactionErrorJson": { + "type": "string", + "x-nullable": true, + "description": "The raw Solana transaction error object serialized as JSON, if available." }, - "authenticators": { + "logs": { "type": "array", "items": { - "type": "object", - "$ref": "#/definitions/AuthenticatorParamsV2" + "type": "string" }, - "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." + "description": "Program logs returned by Solana simulation or preflight, if available." + }, + "unitsConsumed": { + "type": "string", + "format": "uint64", + "x-nullable": true, + "description": "Compute units consumed during simulation or preflight, if available." + }, + "innerInstructionsJson": { + "type": "string", + "x-nullable": true, + "description": "The raw Solana inner instructions payload serialized as JSON, if available." } - }, - "required": ["userName", "apiKeys", "authenticators"] + } }, - "RootUserParamsV2": { + "SolanaSendTransactionStatus": { "type": "object", "properties": { - "userName": { + "signature": { "type": "string", - "description": "Human-readable name for a User." + "x-nullable": true, + "description": "The Solana transaction signature, if available." + } + } + }, + "SparkClaimLeaf": { + "type": "object", + "properties": { + "leafId": { + "type": "string", + "description": "Leaf identifier (UUID)." }, - "userEmail": { + "ciphertext": { "type": "string", - "x-nullable": true, - "description": "The user's email address." + "description": "ECIES ciphertext (hex-encoded) containing the inbound transfer secret. Decrypted inside the enclave using the wallet's Identity key." }, - "apiKeys": { + "senderSignature": { + "type": "string", + "description": "Hex-encoded 64-byte compact ECDSA signature binding (leaf_id, transfer_id, ciphertext) to the sender's identity key. Verified inside the enclave before decryption." + } + }, + "required": ["leafId", "ciphertext", "senderSignature"] + }, + "SparkClaimPackage": { + "type": "object", + "properties": { + "leaves": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/ApiKeyParams" + "$ref": "#/definitions/SparkClaimLeaf" }, - "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." + "description": "Leaves being claimed." }, - "authenticators": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/AuthenticatorParamsV2" - }, - "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." + "threshold": { + "type": "integer", + "format": "int64", + "description": "Shamir threshold for reconstructing the per-leaf claim secret." }, - "oauthProviders": { + "operatorRecipients": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/OauthProviderParams" + "$ref": "#/definitions/SparkOperatorRecipient" }, - "description": "A list of Oauth providers. This field, if not needed, should be an empty array in your request body." + "description": "Operators that will receive Shamir shares." + }, + "transferId": { + "type": "string", + "description": "Spark transfer identifier (UUID). Used together with each leaf's sender_signature to verify the sender bound this ciphertext to this transfer." + }, + "senderIdentityPublicKey": { + "type": "string", + "description": "Sender's compressed secp256k1 identity public key (hex-encoded, 33 bytes). Used to verify the per-leaf sender_signature fields." + } + }, + "required": [ + "leaves", + "threshold", + "operatorRecipients", + "transferId", + "senderIdentityPublicKey" + ] + }, + "SparkClaimTransferIntent": { + "type": "object", + "properties": { + "signWith": { + "type": "string", + "description": "A Spark wallet account address identifying the wallet." + }, + "claim": { + "$ref": "#/definitions/SparkClaimPackage", + "description": "Claim package parameters." } }, - "required": ["userName", "apiKeys", "authenticators", "oauthProviders"] + "required": ["signWith", "claim"] }, - "RootUserParamsV3": { + "SparkClaimTransferRequest": { "type": "object", "properties": { - "userName": { + "type": { "type": "string", - "description": "Human-readable name for a User." + "enum": ["ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER"] }, - "userEmail": { + "timestampMs": { "type": "string", - "x-nullable": true, - "description": "The user's email address." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "apiKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ApiKeyParamsV2" - }, - "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." }, - "authenticators": { + "parameters": { + "$ref": "#/definitions/SparkClaimTransferIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "SparkClaimTransferResult": { + "type": "object", + "properties": { + "operatorPackages": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/AuthenticatorParamsV2" + "$ref": "#/definitions/SparkEncryptedOperatorPackage" }, - "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." + "description": "Per-operator ECIES-encrypted packages." }, - "oauthProviders": { + "newLeafPublicKeys": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/OauthProviderParams" + "$ref": "#/definitions/SparkLeafPublicKey" }, - "description": "A list of Oauth providers. This field, if not needed, should be an empty array in your request body." + "description": "Newly-derived SigningLeaf public keys, one per leaf, in input order." } }, - "required": ["userName", "apiKeys", "authenticators", "oauthProviders"] + "required": ["operatorPackages", "newLeafPublicKeys"] }, - "RootUserParamsV4": { + "SparkDepositDerivation": { + "type": "object" + }, + "SparkEncryptedOperatorPackage": { "type": "object", "properties": { - "userName": { + "operatorId": { "type": "string", - "description": "Human-readable name for a User." + "description": "Spark operator identifier (UUID)." }, - "userEmail": { + "encryptedPackage": { "type": "string", - "x-nullable": true, - "description": "The user's email address." + "description": "ECIES ciphertext (hex-encoded) opaque to Turnkey after emission." + } + }, + "required": ["operatorId", "encryptedPackage"] + }, + "SparkFrostCommitment": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "FROST participant identifier, hex-encoded (32-byte scalar)." }, - "userPhoneNumber": { + "hiding": { "type": "string", - "x-nullable": true, - "description": "The user's phone number in E.164 format e.g. +13214567890" + "description": "Hiding commitment D, hex-encoded compressed secp256k1 point." }, - "apiKeys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ApiKeyParamsV2" - }, - "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." + "binding": { + "type": "string", + "description": "Binding commitment E, hex-encoded compressed secp256k1 point." + } + }, + "required": ["id", "hiding", "binding"] + }, + "SparkHtlcPreimageDerivation": { + "type": "object" + }, + "SparkIdentityDerivation": { + "type": "object" + }, + "SparkKeyDerivation": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/definitions/SparkIdentityDerivation", + "description": "Spark identity key derivation." }, - "authenticators": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/AuthenticatorParamsV2" - }, - "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." + "signingLeaf": { + "$ref": "#/definitions/SparkSigningLeafDerivation", + "description": "Spark signing leaf key derivation, identified by leaf ID." }, - "oauthProviders": { + "deposit": { + "$ref": "#/definitions/SparkDepositDerivation", + "description": "Spark deposit key derivation." + }, + "staticDeposit": { + "$ref": "#/definitions/SparkStaticDepositDerivation", + "description": "Spark static deposit key derivation, identified by index." + }, + "htlcPreimage": { + "$ref": "#/definitions/SparkHtlcPreimageDerivation", + "description": "Spark HTLC preimage key derivation." + } + } + }, + "SparkLeafPublicKey": { + "type": "object", + "properties": { + "leafId": { + "type": "string", + "description": "The Spark leaf_id this public key was derived for." + }, + "publicKey": { + "type": "string", + "description": "Hex-encoded compressed secp256k1 point (33 bytes) for the SigningLeaf derivation at leaf_id." + } + }, + "required": ["leafId", "publicKey"] + }, + "SparkLightningReceivePackage": { + "type": "object", + "properties": { + "threshold": { + "type": "integer", + "format": "int64", + "description": "Feldman VSS threshold for reconstructing the preimage." + }, + "operatorRecipients": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/OauthProviderParams" + "$ref": "#/definitions/SparkOperatorRecipient" }, - "description": "A list of Oauth providers. This field, if not needed, should be an empty array in your request body." + "description": "Operators that will receive Feldman shares of the preimage. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list." } }, - "required": ["userName", "apiKeys", "authenticators", "oauthProviders"] + "required": ["threshold", "operatorRecipients"] }, - "Selector": { + "SparkOperatorRecipient": { "type": "object", "properties": { - "subject": { - "type": "string" - }, - "operator": { - "$ref": "#/definitions/Operator" + "operatorId": { + "type": "string", + "description": "Spark operator identifier (UUID)." }, - "target": { - "type": "string" + "encryptionPublicKey": { + "type": "string", + "description": "Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point)." } - } + }, + "required": ["operatorId", "encryptionPublicKey"] }, - "SelectorV2": { + "SparkPartialSignature": { "type": "object", "properties": { - "subject": { - "type": "string" + "signatureShare": { + "type": "string", + "description": "Hex-encoded FROST partial signature." }, - "operator": { - "$ref": "#/definitions/Operator" + "hiding": { + "type": "string", + "description": "Turnkey's hiding commitment D (hex-encoded compressed secp256k1 point). Forward to the Spark Operator." }, - "targets": { - "type": "array", - "items": { - "type": "string" - } + "binding": { + "type": "string", + "description": "Turnkey's binding commitment E (hex-encoded compressed secp256k1 point). Forward to the Spark Operator." } - } + }, + "required": ["signatureShare", "hiding", "binding"] }, - "SetOrganizationFeatureIntent": { + "SparkPrepareLightningReceiveIntent": { "type": "object", "properties": { - "name": { - "$ref": "#/definitions/FeatureName", - "description": "Name of the feature to set" - }, - "value": { + "signWith": { "type": "string", - "x-nullable": true, - "description": "Optional value for the feature. Will override existing values if feature is already set." + "description": "A Spark wallet account address identifying the wallet." + }, + "lightningReceive": { + "$ref": "#/definitions/SparkLightningReceivePackage", + "description": "Lightning receive package parameters: threshold and operator recipients." } }, - "required": ["name", "value"] + "required": ["signWith", "lightningReceive"] }, - "SetOrganizationFeatureRequest": { + "SparkPrepareLightningReceiveRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE"] + "enum": ["ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE"] }, "timestampMs": { "type": "string", @@ -11057,152 +13796,118 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/SetOrganizationFeatureIntent" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "$ref": "#/definitions/SparkPrepareLightningReceiveIntent" } }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "SetOrganizationFeatureResult": { + "SparkPrepareLightningReceiveResult": { "type": "object", "properties": { - "features": { + "operatorPackages": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/Feature" + "$ref": "#/definitions/SparkEncryptedOperatorPackage" }, - "description": "Resulting list of organization features." - } - }, - "required": ["features"] - }, - "SetPaymentMethodIntent": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "The account number of the customer's credit card." - }, - "cvv": { - "type": "string", - "description": "The verification digits of the customer's credit card." - }, - "expiryMonth": { - "type": "string", - "description": "The month that the credit card expires." - }, - "expiryYear": { - "type": "string", - "description": "The year that the credit card expires." + "description": "Per-operator ECIES-encrypted Feldman share packages." }, - "cardHolderEmail": { - "type": "string", - "description": "The email that will receive invoices for the credit card." - }, - "cardHolderName": { + "paymentHash": { "type": "string", - "description": "The name associated with the credit card." + "description": "Hex-encoded SHA256(preimage). Forward to the Lightning node." } }, - "required": [ - "number", - "cvv", - "expiryMonth", - "expiryYear", - "cardHolderEmail", - "cardHolderName" - ] + "required": ["operatorPackages", "paymentHash"] }, - "SetPaymentMethodIntentV2": { + "SparkPrepareTransferIntent": { "type": "object", "properties": { - "paymentMethodId": { - "type": "string", - "description": "The id of the payment method that was created clientside." - }, - "cardHolderEmail": { + "signWith": { "type": "string", - "description": "The email that will receive invoices for the credit card." + "description": "A Spark wallet account address identifying the wallet." }, - "cardHolderName": { - "type": "string", - "description": "The name associated with the credit card." + "transfer": { + "$ref": "#/definitions/SparkTransferPackage", + "description": "Transfer package parameters for HD key tweak splitting." } }, - "required": ["paymentMethodId", "cardHolderEmail", "cardHolderName"] + "required": ["signWith", "transfer"] }, - "SetPaymentMethodResult": { + "SparkPrepareTransferRequest": { "type": "object", "properties": { - "lastFour": { + "type": { "type": "string", - "description": "The last four digits of the credit card added." + "enum": ["ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER"] }, - "cardHolderName": { + "timestampMs": { "type": "string", - "description": "The name associated with the payment method." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "cardHolderEmail": { + "organizationId": { "type": "string", - "description": "The email address associated with the payment method." + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/SparkPrepareTransferIntent" } }, - "required": ["lastFour", "cardHolderName", "cardHolderEmail"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "SignRawPayloadIntent": { + "SparkPrepareTransferResult": { "type": "object", "properties": { - "privateKeyId": { - "type": "string", - "description": "Unique identifier for a given Private Key." + "operatorPackages": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/SparkEncryptedOperatorPackage" + }, + "description": "Per-operator ECIES-encrypted packages." }, - "payload": { + "transferUserSignature": { "type": "string", - "description": "Raw unsigned payload to be signed." - }, - "encoding": { - "$ref": "#/definitions/PayloadEncoding", - "description": "Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8)." + "description": "Hex-encoded ECDSA-DER signature of the TransferPackage signing payload, signed with the wallet's IDENTITY key." }, - "hashFunction": { - "$ref": "#/definitions/HashFunction", - "description": "Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032." + "newLeafPublicKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/SparkLeafPublicKey" + }, + "description": "Newly-derived SigningLeaf public keys, one per leaf, in input order." } }, - "required": ["privateKeyId", "payload", "encoding", "hashFunction"] + "required": [ + "operatorPackages", + "transferUserSignature", + "newLeafPublicKeys" + ] }, - "SignRawPayloadIntentV2": { + "SparkSignFrostIntent": { "type": "object", "properties": { "signWith": { "type": "string", - "description": "A Wallet account address, Private Key address, or Private Key identifier." - }, - "payload": { - "type": "string", - "description": "Raw unsigned payload to be signed." - }, - "encoding": { - "$ref": "#/definitions/PayloadEncoding", - "description": "Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8)." - }, - "hashFunction": { - "$ref": "#/definitions/HashFunction", - "description": "Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032." + "description": "A Spark wallet account address identifying the wallet to sign with." + }, + "signatures": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/SparkSignatureRequest" + }, + "description": "Batched sign requests. Each produces a partial signature plus Turnkey's public commitments." } }, - "required": ["signWith", "payload", "encoding", "hashFunction"] + "required": ["signWith", "signatures"] }, - "SignRawPayloadRequest": { + "SparkSignFrostRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2"] + "enum": ["ACTIVITY_TYPE_SPARK_SIGN_FROST"] }, "timestampMs": { "type": "string", @@ -11213,135 +13918,182 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/SignRawPayloadIntentV2" - }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "$ref": "#/definitions/SparkSignFrostIntent" } }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "SignRawPayloadResult": { + "SparkSignFrostResult": { "type": "object", "properties": { - "r": { - "type": "string", - "description": "Component of an ECSDA signature." - }, - "s": { - "type": "string", - "description": "Component of an ECSDA signature." - }, - "v": { - "type": "string", - "description": "Component of an ECSDA signature." + "signatures": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/SparkPartialSignature" + }, + "description": "Partial signatures plus Turnkey commitments, one per request, in order." } }, - "required": ["r", "s", "v"] + "required": ["signatures"] }, - "SignRawPayloadsIntent": { + "SparkSignatureRequest": { "type": "object", "properties": { - "signWith": { + "derivation": { + "$ref": "#/definitions/SparkKeyDerivation", + "description": "Which key to sign with." + }, + "message": { "type": "string", - "description": "A Wallet account address, Private Key address, or Private Key identifier." + "description": "Hex-encoded 32-byte sighash to sign." }, - "payloads": { + "verifyingKey": { + "type": "string", + "description": "Aggregate group verifying key (hex-encoded compressed secp256k1 point), computed as P_ops + P_user. Bound into the nonce HMAC." + }, + "operatorCommitments": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/SparkFrostCommitment" }, - "description": "An array of raw unsigned payloads to be signed." - }, - "encoding": { - "$ref": "#/definitions/PayloadEncoding", - "description": "Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8)." + "description": "Commitments for every non-Turnkey participant. MUST NOT include an entry under Turnkey's identifier. Bound into the nonce HMAC." }, - "hashFunction": { - "$ref": "#/definitions/HashFunction", - "description": "Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032." + "adaptorPublicKey": { + "type": "string", + "x-nullable": true, + "description": "Optional adaptor point T (hex-encoded 33-byte compressed secp256k1 pubkey). When set, Turnkey produces a Schnorr adaptor pre-signature with the FROST challenge bound to `R+T` (where `R` is the aggregate group nonce commitment from FROST). The party holding the discrete log `t` completes the pre-sig to a valid BIP-340 signature by adding `t` (or `-t`, for parity) to the signature scalar `s`. This is primarily used by Spark leaves-swap and other adaptor-bound flows; absent or empty leads to plain FROST signing (the typical case)." } }, - "required": ["signWith", "payloads", "encoding", "hashFunction"] + "required": [ + "derivation", + "message", + "verifyingKey", + "operatorCommitments" + ] }, - "SignRawPayloadsRequest": { + "SparkSigningLeafDerivation": { "type": "object", "properties": { - "type": { + "leafId": { "type": "string", - "enum": ["ACTIVITY_TYPE_SIGN_RAW_PAYLOADS"] - }, - "timestampMs": { + "description": "Unique identifier for the Spark signing leaf." + } + }, + "required": ["leafId"] + }, + "SparkStaticDepositDerivation": { + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int64", + "description": "Index used to derive the static deposit key." + } + }, + "required": ["index"] + }, + "SparkTransferLeaf": { + "type": "object", + "properties": { + "leafId": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "description": "Leaf identifier (UUID)." }, - "organizationId": { + "oldLeafDerivation": { + "$ref": "#/definitions/SparkKeyDerivation", + "description": "Derivation for the existing (pre-transfer) leaf key. Always a SigningLeaf derivation." + }, + "newLeafDerivation": { + "$ref": "#/definitions/SparkKeyDerivation", + "description": "Derivation for the new (post-transfer) leaf key. Always a SigningLeaf derivation. The enclave ECIES-encrypts this private key to receiver_public_key as the per-leaf secret_cipher; HD-derived rather than random so the sender can re-derive on retry (Turnkey's enclave is stateless)." + }, + "refundSignature": { "type": "string", - "description": "Unique identifier for a given Organization." + "x-nullable": true, + "description": "Client-produced CPFP refund signature (hex-encoded), passed through verbatim into the per-operator SendLeafKeyTweak. Empty omits the field from the operator package." }, - "parameters": { - "$ref": "#/definitions/SignRawPayloadsIntent" + "directRefundSignature": { + "type": "string", + "x-nullable": true, + "description": "Client-produced direct refund signature (hex-encoded). Passed through verbatim." }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "directFromCpfpRefundSignature": { + "type": "string", + "x-nullable": true, + "description": "Client-produced direct-from-CPFP refund signature (hex-encoded). Passed through verbatim." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["leafId", "oldLeafDerivation", "newLeafDerivation"] }, - "SignRawPayloadsResult": { + "SparkTransferPackage": { "type": "object", "properties": { - "signatures": { + "transferId": { + "type": "string", + "description": "Spark transfer identifier (UUID)." + }, + "leaves": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/SignRawPayloadResult" - } - } - } - }, - "SignTransactionIntent": { - "type": "object", - "properties": { - "privateKeyId": { - "type": "string", - "description": "Unique identifier for a given Private Key." + "$ref": "#/definitions/SparkTransferLeaf" + }, + "description": "Leaves being transferred." }, - "unsignedTransaction": { - "type": "string", - "description": "Raw unsigned transaction to be signed by a particular Private Key." + "threshold": { + "type": "integer", + "format": "int64", + "description": "Feldman VSS threshold for reconstructing the per-leaf tweak scalar." }, - "type": { - "$ref": "#/definitions/TransactionType" + "operatorRecipients": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/SparkOperatorRecipient" + }, + "description": "Operators that will receive Feldman shares of the per-leaf tweak. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list." + }, + "receiverPublicKey": { + "type": "string", + "description": "Recipient's identity pubkey (hex-encoded compressed secp256k1 point). Each leaf's new_priv is ECIES-encrypted to this key and embedded in the per-operator package for claim-time delivery." } }, - "required": ["privateKeyId", "unsignedTransaction", "type"] + "required": [ + "transferId", + "leaves", + "threshold", + "operatorRecipients", + "receiverPublicKey" + ] }, - "SignTransactionIntentV2": { + "StampLoginIntent": { "type": "object", "properties": { - "signWith": { + "publicKey": { "type": "string", - "description": "A Wallet account address, Private Key address, or Private Key identifier." + "description": "Client-side public key generated by the user, which will be conditionally added to org data based on the passkey stamp associated with this request" }, - "unsignedTransaction": { + "expirationSeconds": { "type": "string", - "description": "Raw unsigned transaction to be signed" + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used." }, - "type": { - "$ref": "#/definitions/TransactionType" + "invalidateExisting": { + "type": "boolean", + "x-nullable": true, + "description": "Invalidate all other previously generated Login API keys" } }, - "required": ["signWith", "unsignedTransaction", "type"] + "required": ["publicKey"] }, - "SignTransactionRequest": { + "StampLoginRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_SIGN_TRANSACTION_V2"] + "enum": ["ACTIVITY_TYPE_STAMP_LOGIN"] }, "timestampMs": { "type": "string", @@ -11352,7 +14104,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/SignTransactionIntentV2" + "$ref": "#/definitions/StampLoginIntent" }, "generateAppProofs": { "type": "boolean", @@ -11361,232 +14113,405 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "SignTransactionResult": { + "StampLoginResult": { "type": "object", "properties": { - "signedTransaction": { - "type": "string" + "session": { + "type": "string", + "description": "Signed JWT containing an expiry, public key, session type, user id, and organization id" } }, - "required": ["signedTransaction"] + "required": ["session"] }, - "SimpleClientExtensionResults": { + "Status": { "type": "object", "properties": { - "appid": { - "type": "boolean", - "x-nullable": true + "code": { + "type": "integer", + "format": "int32" }, - "appidExclude": { - "type": "boolean", - "x-nullable": true + "message": { + "type": "string" }, - "credProps": { - "$ref": "#/definitions/CredPropsAuthenticationExtensionsClientOutputs", - "x-nullable": true + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Any" + } } } }, - "SmartContractInterfaceType": { + "TagType": { "type": "string", - "enum": [ - "SMART_CONTRACT_INTERFACE_TYPE_ETHEREUM", - "SMART_CONTRACT_INTERFACE_TYPE_SOLANA" - ] + "enum": ["TAG_TYPE_USER", "TAG_TYPE_PRIVATE_KEY"] }, - "SmsCustomizationParams": { + "TokenUsage": { "type": "object", "properties": { - "template": { + "type": { + "$ref": "#/definitions/UsageType", + "description": "Type of token usage" + }, + "tokenId": { "type": "string", - "x-nullable": true, - "description": "Template containing references to .OtpCode i.e Your OTP is {{.OtpCode}}" + "description": "Unique identifier for the verification token" + }, + "signup": { + "$ref": "#/definitions/SignupUsage" + }, + "login": { + "$ref": "#/definitions/LoginUsage" + }, + "signupV2": { + "$ref": "#/definitions/SignupUsageV2" } - } + }, + "required": ["type", "tokenId"] }, - "SolSendTransactionIntent": { + "TransactionType": { + "type": "string", + "enum": [ + "TRANSACTION_TYPE_ETHEREUM", + "TRANSACTION_TYPE_SOLANA", + "TRANSACTION_TYPE_TRON", + "TRANSACTION_TYPE_BITCOIN", + "TRANSACTION_TYPE_TEMPO" + ] + }, + "TvcApp": { "type": "object", "properties": { - "unsignedTransaction": { + "id": { "type": "string", - "description": "Base64-encoded serialized unsigned Solana transaction" + "description": "Unique Identifier for this TVC App." }, - "signWith": { + "organizationId": { "type": "string", - "description": "A wallet or private key address to sign with. This does not support private key IDs." + "description": "Unique Identifier of the Organization for this TVC App" }, - "sponsor": { + "name": { + "type": "string", + "description": "Name for this TVC App." + }, + "quorumPublicKey": { + "type": "string", + "description": "Public key for the Quorum Key associated with this TVC App" + }, + "manifestSet": { + "$ref": "#/definitions/TvcOperatorSet", + "description": "Manifest Set (people who can approve manifests)" + }, + "shareSet": { + "$ref": "#/definitions/TvcOperatorSet", + "description": "Share Set (people who have a share of the Quorum Key)" + }, + "enableEgress": { "type": "boolean", + "description": "Whether or not this TVC App has network egress enabled." + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "liveDeploymentId": { + "type": "string", "x-nullable": true, - "description": "Whether to sponsor this transaction via Gas Station." + "description": "The deployment currently designated to receive traffic. Null if no deployment for this app is deployed." }, - "caip2": { + "publicDomain": { "type": "string", - "enum": [ - "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", - "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG", - "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY" - ], - "description": "CAIP-2 chain ID (e.g., 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet)." + "description": "The public domain for ingress to this TVC App (in the format \"app-\u003cID\u003e.turnkey.cloud\")." + } + }, + "required": [ + "id", + "organizationId", + "name", + "quorumPublicKey", + "manifestSet", + "shareSet", + "enableEgress", + "createdAt", + "updatedAt", + "publicDomain" + ] + }, + "TvcContainerSpec": { + "type": "object", + "properties": { + "containerUrl": { + "type": "string", + "description": "The URL for this container image." + }, + "path": { + "type": "string", + "description": "The path (in-container) to the executable binary." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The arguments to pass to the executable." + }, + "hasPullSecret": { + "type": "boolean", + "description": "Whether or not this container requires a pull secret to access." }, - "recentBlockhash": { - "type": "string", - "x-nullable": true, - "description": "user-provided blockhash for replay protection / deadline control. If omitted and sponsor=true, we fetch a fresh blockhash during execution" + "healthCheckType": { + "$ref": "#/definitions/TvcHealthCheckType", + "description": "The type of health check to perform against this executable." + }, + "healthCheckPort": { + "type": "integer", + "format": "int64", + "description": "The port to use for health checks against this executable." + }, + "publicIngressPort": { + "type": "integer", + "format": "int64", + "description": "The port to use for public ingress to this executable." } }, - "required": ["unsignedTransaction", "signWith", "caip2"] + "required": [ + "containerUrl", + "path", + "args", + "hasPullSecret", + "healthCheckType", + "healthCheckPort", + "publicIngressPort" + ] }, - "SolSendTransactionRequest": { + "TvcDeployment": { "type": "object", "properties": { - "type": { + "id": { "type": "string", - "enum": ["ACTIVITY_TYPE_SOL_SEND_TRANSACTION"] + "description": "Unique Identifier for this TVC Deployment." }, - "timestampMs": { + "organizationId": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "description": "Unique Identifier of the Organization for this TVC Deployment" }, - "organizationId": { + "appId": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "Unique Identifier of the TVC App for this deployment" }, - "parameters": { - "$ref": "#/definitions/SolSendTransactionIntent" + "manifestSet": { + "$ref": "#/definitions/TvcOperatorSet", + "description": "Set of TVC operators who can approve this deployment" }, - "generateAppProofs": { + "shareSet": { + "$ref": "#/definitions/TvcOperatorSet", + "description": "Set of TVC operators who have a share of the Quorum Key" + }, + "manifest": { + "$ref": "#/definitions/TvcManifest", + "description": "The manifest used for this deployment" + }, + "manifestApprovals": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TvcOperatorApproval" + }, + "description": "List of operator approvals for this manifest" + }, + "qosVersion": { + "type": "string", + "description": "QOS Version used for this deployment" + }, + "pivotContainer": { + "$ref": "#/definitions/TvcContainerSpec", + "description": "The pivot container spec for this deployment" + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "delete": { "type": "boolean", - "x-nullable": true + "description": "Whether or not the user wants this deployment deleted from the cluster." } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": [ + "id", + "organizationId", + "appId", + "manifestSet", + "shareSet", + "manifest", + "manifestApprovals", + "qosVersion", + "pivotContainer", + "createdAt", + "updatedAt", + "delete" + ] }, - "SolSendTransactionResult": { + "TvcHealthCheckType": { + "type": "string", + "enum": ["TVC_HEALTH_CHECK_TYPE_HTTP", "TVC_HEALTH_CHECK_TYPE_GRPC"] + }, + "TvcManifest": { "type": "object", "properties": { - "sendTransactionStatusId": { + "id": { "type": "string", - "description": "The send_transaction_status ID associated with the transaction submission" + "description": "Unique Identifier for this TVC Manifest." + }, + "manifest": { + "type": "string", + "format": "byte", + "description": "The manifest content (raw UTF-8 JSON bytes)" + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" } }, - "required": ["sendTransactionStatusId"] + "required": ["id", "manifest", "createdAt", "updatedAt"] }, - "StampLoginIntent": { + "TvcManifestApproval": { "type": "object", "properties": { - "publicKey": { + "operatorId": { "type": "string", - "description": "Client-side public key generated by the user, which will be conditionally added to org data based on the passkey stamp associated with this request" + "description": "Unique identifier of the operator providing this approval" }, - "expirationSeconds": { + "signature": { "type": "string", - "x-nullable": true, - "description": "Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used." - }, - "invalidateExisting": { - "type": "boolean", - "x-nullable": true, - "description": "Invalidate all other previously generated Login API keys" + "description": "Signature from the operator approving the manifest" } }, - "required": ["publicKey"] + "required": ["operatorId", "signature"] }, - "StampLoginRequest": { + "TvcOperator": { "type": "object", "properties": { - "type": { + "id": { "type": "string", - "enum": ["ACTIVITY_TYPE_STAMP_LOGIN"] + "description": "Unique Identifier for this TVC Operator." }, - "timestampMs": { + "name": { "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + "description": "Name of this TVC Operator." }, - "organizationId": { + "publicKey": { "type": "string", - "description": "Unique identifier for a given Organization." + "description": "Public key for this TVC Operator." }, - "parameters": { - "$ref": "#/definitions/StampLoginIntent" + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" }, - "generateAppProofs": { - "type": "boolean", - "x-nullable": true + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" } }, - "required": ["type", "timestampMs", "organizationId", "parameters"] + "required": ["id", "name", "publicKey", "createdAt", "updatedAt"] }, - "StampLoginResult": { + "TvcOperatorApproval": { "type": "object", "properties": { - "session": { + "id": { "type": "string", - "description": "Signed JWT containing an expiry, public key, session type, user id, and organization id" - } - }, - "required": ["session"] - }, - "Status": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" + "description": "Unique ID for this approval" }, - "message": { - "type": "string" + "manifestId": { + "type": "string", + "description": "Unique Identifier of the TVC Manifest being approved" }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Any" - } + "operator": { + "$ref": "#/definitions/TvcOperator", + "description": "The TVC Operator who made this approval" + }, + "approval": { + "type": "string", + "format": "byte", + "description": "Signature of the operator over the deployment manifest" + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" } - } - }, - "TagType": { - "type": "string", - "enum": ["TAG_TYPE_USER", "TAG_TYPE_PRIVATE_KEY"] - }, - "TransactionType": { - "type": "string", - "enum": [ - "TRANSACTION_TYPE_ETHEREUM", - "TRANSACTION_TYPE_SOLANA", - "TRANSACTION_TYPE_TRON", - "TRANSACTION_TYPE_BITCOIN", - "TRANSACTION_TYPE_TEMPO" + }, + "required": [ + "id", + "manifestId", + "operator", + "approval", + "createdAt", + "updatedAt" ] }, - "TvcManifestApproval": { + "TvcOperatorParams": { "type": "object", "properties": { - "operatorId": { + "name": { "type": "string", - "description": "Unique identifier of the operator providing this approval" + "description": "The name for this new operator" }, - "signature": { + "publicKey": { "type": "string", - "description": "Signature from the operator approving the manifest" + "description": "Public key for this operator" } }, - "required": ["operatorId", "signature"] + "required": ["name", "publicKey"] }, - "TvcOperatorParams": { + "TvcOperatorSet": { "type": "object", "properties": { + "id": { + "type": "string", + "description": "Unique Identifier for this TVC Operator Set." + }, "name": { "type": "string", - "description": "The name for this new operator" + "description": "Name of this TVC Operator Set." }, - "publicKey": { + "organizationId": { "type": "string", - "description": "Public key for this operator" + "description": "Unique Identifier of the Organization for this TVC Operator Set" + }, + "operators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TvcOperator" + }, + "description": "List of TVC Operators in this set" + }, + "threshold": { + "type": "integer", + "format": "int64", + "description": "Threshold number of operators required for quorum." + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" } }, - "required": ["name", "publicKey"] + "required": [ + "id", + "name", + "organizationId", + "operators", + "threshold", + "createdAt", + "updatedAt" + ] }, "TvcOperatorSetParams": { "type": "object", @@ -11632,6 +14557,16 @@ "$ref": "#/definitions/RevertChainEntry" }, "description": "Chain of revert errors from nested contract calls, ordered from outermost to innermost." + }, + "solana": { + "$ref": "#/definitions/SolanaFailureDetails", + "x-nullable": true, + "description": "Solana-specific failure details for simulation or preflight errors, if available." + }, + "eth": { + "$ref": "#/definitions/EthFailureDetails", + "x-nullable": true, + "description": "Ethereum-specific failure details, if available." } } }, @@ -11756,6 +14691,13 @@ "type": "boolean", "x-nullable": true, "description": "Verification token required for get account with PII (email/phone number). Default false." + }, + "socialLinkingClientIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Whitelisted OAuth client IDs for social account linking. When a user authenticates via a social provider with an email matching an existing account, the accounts will be linked if the client ID is in this list and the issuer is considered a trusted provider." } } }, @@ -11853,26 +14795,71 @@ }, "clientId": { "type": "string", - "description": "The Client ID issued by the OAuth 2.0 provider" - }, - "encryptedClientSecret": { + "description": "The Client ID issued by the OAuth 2.0 provider" + }, + "encryptedClientSecret": { + "type": "string", + "description": "The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key" + } + }, + "required": [ + "oauth2CredentialId", + "provider", + "clientId", + "encryptedClientSecret" + ] + }, + "UpdateOauth2CredentialRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/UpdateOauth2CredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "UpdateOauth2CredentialResult": { + "type": "object", + "properties": { + "oauth2CredentialId": { + "type": "string", + "description": "Unique identifier of the OAuth 2.0 credential that was updated" + } + }, + "required": ["oauth2CredentialId"] + }, + "UpdateOrganizationNameIntent": { + "type": "object", + "properties": { + "organizationName": { "type": "string", - "description": "The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key" + "description": "New name for the Organization." } }, - "required": [ - "oauth2CredentialId", - "provider", - "clientId", - "encryptedClientSecret" - ] + "required": ["organizationName"] }, - "UpdateOauth2CredentialRequest": { + "UpdateOrganizationNameRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL"] + "enum": ["ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME"] }, "timestampMs": { "type": "string", @@ -11883,7 +14870,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/UpdateOauth2CredentialIntent" + "$ref": "#/definitions/UpdateOrganizationNameIntent" }, "generateAppProofs": { "type": "boolean", @@ -11892,15 +14879,19 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "UpdateOauth2CredentialResult": { + "UpdateOrganizationNameResult": { "type": "object", "properties": { - "oauth2CredentialId": { + "organizationId": { "type": "string", - "description": "Unique identifier of the OAuth 2.0 credential that was updated" + "description": "Unique identifier for the Organization." + }, + "organizationName": { + "type": "string", + "description": "The updated organization name." } }, - "required": ["oauth2CredentialId"] + "required": ["organizationId", "organizationName"] }, "UpdatePolicyIntent": { "type": "object", @@ -12127,6 +15118,44 @@ "UpdateRootQuorumResult": { "type": "object" }, + "UpdateTvcAppLiveDeploymentIntent": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "The unique identifier of the TVC deployment to set as live for the app." + } + }, + "required": ["deploymentId"] + }, + "UpdateTvcAppLiveDeploymentRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/UpdateTvcAppLiveDeploymentIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "UpdateTvcAppLiveDeploymentResult": { + "type": "object" + }, "UpdateUserEmailIntent": { "type": "object", "properties": { @@ -12464,6 +15493,70 @@ }, "required": ["walletId"] }, + "UpdateWebhookEndpointIntent": { + "type": "object", + "properties": { + "endpointId": { + "type": "string", + "description": "Unique identifier of the webhook endpoint to update." + }, + "url": { + "type": "string", + "x-nullable": true, + "description": "Updated destination URL for webhook delivery." + }, + "name": { + "type": "string", + "x-nullable": true, + "description": "Updated human-readable name for this webhook endpoint." + }, + "isActive": { + "type": "boolean", + "x-nullable": true, + "description": "Whether this webhook endpoint is active." + } + }, + "required": ["endpointId"] + }, + "UpdateWebhookEndpointRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/UpdateWebhookEndpointIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "UpdateWebhookEndpointResult": { + "type": "object", + "properties": { + "endpointId": { + "type": "string", + "description": "Unique identifier of the updated webhook endpoint." + }, + "webhookEndpoint": { + "$ref": "#/definitions/WebhookEndpointData", + "description": "The updated webhook endpoint data." + } + }, + "required": ["endpointId", "webhookEndpoint"] + }, "UpsertGasUsageConfigIntent": { "type": "object", "properties": { @@ -12477,12 +15570,16 @@ }, "windowDurationMinutes": { "type": "string", - "description": "Rolling sponsorship window duration, expressed in minutes." + "description": "Rolling sponsorship window duration, expressed in minutes. This value can't exceed 30 days (43200 minutes)." }, "enabled": { "type": "boolean", "x-nullable": true, "description": "Whether gas sponsorship is enabled for the organization." + }, + "solanaConfig": { + "$ref": "#/definitions/SolanaConfig", + "description": "Optional Solana sponsorship settings. If omitted, the existing Solana sponsorship state is left unchanged." } }, "required": [ @@ -12501,6 +15598,10 @@ }, "required": ["gasUsageConfigId"] }, + "UsageType": { + "type": "string", + "enum": ["USAGE_TYPE_SIGNUP", "USAGE_TYPE_LOGIN"] + }, "User": { "type": "object", "properties": { @@ -12714,6 +15815,90 @@ "userTags" ] }, + "UserParamsV4": { + "type": "object", + "properties": { + "userName": { + "type": "string", + "description": "Human-readable name for a User." + }, + "userEmail": { + "type": "string", + "x-nullable": true, + "description": "The user's email address." + }, + "userPhoneNumber": { + "type": "string", + "x-nullable": true, + "description": "The user's phone number in E.164 format e.g. +13214567890" + }, + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKeyParamsV2" + }, + "description": "A list of API Key parameters. This field, if not needed, should be an empty array in your request body." + }, + "authenticators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AuthenticatorParamsV2" + }, + "description": "A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body." + }, + "oauthProviders": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/OauthProviderParamsV2" + }, + "description": "A list of Oauth providers. This field, if not needed, should be an empty array in your request body." + }, + "userTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of User Tag IDs. This field, if not needed, should be an empty array in your request body." + } + }, + "required": [ + "userName", + "apiKeys", + "authenticators", + "oauthProviders", + "userTags" + ] + }, + "ValidateTvcImageRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "pivotContainerImageUrl": { + "type": "string", + "description": "URL of the container image." + }, + "pivotContainerEncryptedPullSecret": { + "type": "string", + "x-nullable": true, + "description": "HPKE-encrypted pull secret for private images." + } + }, + "required": ["organizationId", "pivotContainerImageUrl"] + }, + "ValidateTvcImageResponse": { + "type": "object", + "properties": { + "resolvedImageDigest": { + "type": "string" + } + } + }, "VerifyOtpIntent": { "type": "object", "properties": { @@ -12738,12 +15923,31 @@ }, "required": ["otpId", "otpCode"] }, + "VerifyOtpIntentV2": { + "type": "object", + "properties": { + "otpId": { + "type": "string", + "description": "UUID representing an OTP flow. A new UUID is created for each init OTP activity." + }, + "encryptedOtpBundle": { + "type": "string", + "description": "Encrypted bundle containing the OTP code and a client-generated public key. Turnkey's secure enclaves will decrypt this bundle, verify the OTP code, and issue a new Verification Token. Encrypted using the target encryption key provided in the INIT_OTP activity result." + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the verification token is valid for. If not provided, a default of 1 hour will be used. Maximum value is 86400 seconds (24 hours)" + } + }, + "required": ["otpId", "encryptedOtpBundle"] + }, "VerifyOtpRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_VERIFY_OTP"] + "enum": ["ACTIVITY_TYPE_VERIFY_OTP_V2"] }, "timestampMs": { "type": "string", @@ -12754,7 +15958,7 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/VerifyOtpIntent" + "$ref": "#/definitions/VerifyOtpIntentV2" }, "generateAppProofs": { "type": "boolean", @@ -13017,6 +16221,87 @@ }, "required": ["walletId", "addresses"] }, + "WebAuthnStamp": { + "type": "object", + "properties": { + "credentialId": { + "type": "string", + "description": "A base64 url encoded Unique identifier for a given credential." + }, + "clientDataJson": { + "type": "string", + "description": "A base64 encoded payload containing metadata about the signing context and the challenge." + }, + "authenticatorData": { + "type": "string", + "description": "A base64 encoded payload containing metadata about the authenticator." + }, + "signature": { + "type": "string", + "description": "The base64 url encoded signature bytes contained within the WebAuthn assertion response." + } + }, + "required": [ + "credentialId", + "clientDataJson", + "authenticatorData", + "signature" + ] + }, + "WebhookEndpointData": { + "type": "object", + "properties": { + "endpointId": { + "type": "string", + "description": "Unique identifier of the webhook endpoint." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "url": { + "type": "string", + "description": "The destination URL for webhook delivery." + }, + "name": { + "type": "string", + "description": "Human-readable name for this webhook endpoint." + }, + "isActive": { + "type": "boolean", + "description": "Whether this webhook endpoint is active." + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/WebhookSubscriptionParams" + }, + "description": "Current subscriptions attached to this endpoint." + } + }, + "required": ["endpointId", "organizationId", "url", "name", "isActive"] + }, + "WebhookSubscriptionParams": { + "type": "object", + "properties": { + "eventType": { + "type": "string", + "description": "The event type to subscribe to (for example, ACTIVITY_UPDATES, BALANCE_CONFIRMED_UPDATES, or BALANCE_FINALIZED_UPDATES)." + }, + "filtersJson": { + "type": "string", + "x-nullable": true, + "description": "JSON-encoded filter criteria for this subscription." + }, + "isActive": { + "type": "boolean", + "x-nullable": true, + "description": "Whether this subscription is active." + } + }, + "required": ["eventType"] + }, "activity.v1.Address": { "type": "object", "properties": { @@ -13217,6 +16502,11 @@ "name": "X-Stamp", "in": "header" }, + "AttestedAuth": { + "type": "apiKey", + "name": "X-Stamp-Attested", + "in": "header" + }, "AuthenticatorAuth": { "type": "apiKey", "name": "X-Stamp-WebAuthn", @@ -13234,7 +16524,13 @@ "x-tagGroups": [ { "name": "ORGANIZATIONS", - "tags": ["Organizations", "Invitations", "Policies", "Features"] + "tags": [ + "Organizations", + "Invitations", + "Policies", + "Features", + "IP Allowlist" + ] }, { "name": "WALLETS AND PRIVATE KEYS",