turnkey_client 0.0.17 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/lib/turnkey_client/api/broadcasting_api.rb +12 -12
  3. data/lib/turnkey_client/api/default_api.rb +46 -0
  4. data/lib/turnkey_client/api/ip_allowlist_api.rb +193 -0
  5. data/lib/turnkey_client/api/organizations_api.rb +290 -0
  6. data/lib/turnkey_client/api/signing_api.rb +232 -0
  7. data/lib/turnkey_client/api/tvc_api.rb +773 -0
  8. data/lib/turnkey_client/api/wallets_api.rb +116 -0
  9. data/lib/turnkey_client/configuration.rb +7 -0
  10. data/lib/turnkey_client/models/activate_billing_tier_intent.rb +14 -4
  11. data/lib/turnkey_client/models/activity_type.rb +21 -0
  12. data/lib/turnkey_client/models/address_format.rb +2 -0
  13. data/lib/turnkey_client/models/app_status.rb +243 -0
  14. data/lib/turnkey_client/models/asset_balance.rb +255 -0
  15. data/lib/turnkey_client/models/asset_balance_display.rb +216 -0
  16. data/lib/turnkey_client/models/asset_metadata.rb +246 -0
  17. data/lib/turnkey_client/models/boot_proof.rb +17 -6
  18. data/lib/turnkey_client/models/create_oauth_providers_intent_v2.rb +228 -0
  19. data/lib/turnkey_client/models/create_oauth_providers_request.rb +2 -2
  20. data/lib/turnkey_client/models/create_oauth_providers_result_v2.rb +213 -0
  21. data/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +1 -1
  22. data/lib/turnkey_client/models/create_sub_organization_intent_v8.rb +316 -0
  23. data/lib/turnkey_client/models/create_sub_organization_request.rb +2 -2
  24. data/lib/turnkey_client/models/create_sub_organization_result_v8.rb +230 -0
  25. data/lib/turnkey_client/models/create_tvc_app_intent.rb +9 -9
  26. data/lib/turnkey_client/models/create_tvc_app_request.rb +288 -0
  27. data/lib/turnkey_client/models/create_tvc_deployment_intent.rb +60 -41
  28. data/lib/turnkey_client/models/create_tvc_deployment_request.rb +288 -0
  29. data/lib/turnkey_client/models/create_tvc_manifest_approvals_request.rb +288 -0
  30. data/lib/turnkey_client/models/create_users_intent_v4.rb +213 -0
  31. data/lib/turnkey_client/models/create_users_request.rb +2 -2
  32. data/lib/turnkey_client/models/create_webhook_endpoint_intent.rb +238 -0
  33. data/lib/turnkey_client/models/create_webhook_endpoint_request.rb +298 -0
  34. data/lib/turnkey_client/models/create_webhook_endpoint_result.rb +225 -0
  35. data/lib/turnkey_client/models/delete_tvc_app_and_deployments_intent.rb +211 -0
  36. data/lib/turnkey_client/models/delete_tvc_app_and_deployments_request.rb +298 -0
  37. data/lib/turnkey_client/models/delete_tvc_app_and_deployments_result.rb +211 -0
  38. data/lib/turnkey_client/models/delete_tvc_deployment_intent.rb +211 -0
  39. data/lib/turnkey_client/models/delete_tvc_deployment_request.rb +298 -0
  40. data/lib/turnkey_client/models/delete_tvc_deployment_result.rb +211 -0
  41. data/lib/turnkey_client/models/delete_webhook_endpoint_intent.rb +211 -0
  42. data/lib/turnkey_client/models/delete_webhook_endpoint_request.rb +298 -0
  43. data/lib/turnkey_client/models/delete_webhook_endpoint_result.rb +211 -0
  44. data/lib/turnkey_client/models/deployment_status.rb +255 -0
  45. data/lib/turnkey_client/models/eth_failure_details.rb +208 -0
  46. data/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb +2 -2
  47. data/lib/turnkey_client/models/eth_send_transaction_intent.rb +12 -1
  48. data/lib/turnkey_client/models/feature_name.rb +1 -0
  49. data/lib/turnkey_client/models/get_app_status_request.rb +226 -0
  50. data/lib/turnkey_client/models/get_app_status_response.rb +210 -0
  51. data/lib/turnkey_client/models/get_ip_allowlist_request.rb +222 -0
  52. data/lib/turnkey_client/models/get_ip_allowlist_response.rb +210 -0
  53. data/lib/turnkey_client/models/get_nonces_request.rb +35 -1
  54. data/lib/turnkey_client/models/get_send_transaction_status_response.rb +10 -1
  55. data/lib/turnkey_client/models/get_tvc_app_deployments_request.rb +226 -0
  56. data/lib/turnkey_client/models/get_tvc_app_deployments_response.rb +213 -0
  57. data/lib/turnkey_client/models/get_tvc_app_request.rb +226 -0
  58. data/lib/turnkey_client/models/get_tvc_app_response.rb +210 -0
  59. data/lib/turnkey_client/models/get_tvc_apps_request.rb +211 -0
  60. data/lib/turnkey_client/models/get_tvc_apps_response.rb +213 -0
  61. data/lib/turnkey_client/models/get_tvc_deployment_request.rb +226 -0
  62. data/lib/turnkey_client/models/get_tvc_deployment_response.rb +210 -0
  63. data/lib/turnkey_client/models/get_wallet_address_balances_request.rb +275 -0
  64. data/lib/turnkey_client/models/get_wallet_address_balances_response.rb +208 -0
  65. data/lib/turnkey_client/models/init_otp_auth_intent.rb +1 -1
  66. data/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +1 -1
  67. data/lib/turnkey_client/models/init_otp_intent_v3.rb +336 -0
  68. data/lib/turnkey_client/models/init_otp_request.rb +2 -2
  69. data/lib/turnkey_client/models/init_otp_result_v2.rb +226 -0
  70. data/lib/turnkey_client/models/intent.rb +193 -4
  71. data/lib/turnkey_client/models/ip_allowlist.rb +261 -0
  72. data/lib/turnkey_client/models/ip_allowlist_intent_rule.rb +222 -0
  73. data/lib/turnkey_client/models/ip_allowlist_rule.rb +232 -0
  74. data/lib/turnkey_client/models/list_supported_assets_request.rb +260 -0
  75. data/lib/turnkey_client/models/list_supported_assets_response.rb +208 -0
  76. data/lib/turnkey_client/models/list_webhook_endpoints_request.rb +211 -0
  77. data/lib/turnkey_client/models/list_webhook_endpoints_response.rb +212 -0
  78. data/lib/turnkey_client/models/login_usage.rb +211 -0
  79. data/lib/turnkey_client/models/noop_codegen_anchor_response.rb +219 -0
  80. data/lib/turnkey_client/models/oauth2_authenticate_intent.rb +6 -2
  81. data/lib/turnkey_client/models/oauth_provider_params_v2.rb +230 -0
  82. data/lib/turnkey_client/models/oidc_claims.rb +241 -0
  83. data/lib/turnkey_client/models/otp_login_intent_v2.rb +262 -0
  84. data/lib/turnkey_client/models/otp_login_request.rb +2 -2
  85. data/lib/turnkey_client/models/post_tvc_quorum_key_share_intent.rb +240 -0
  86. data/lib/turnkey_client/models/post_tvc_quorum_key_share_result.rb +211 -0
  87. data/lib/turnkey_client/models/quorum_key_share_approval_bundle.rb +241 -0
  88. data/lib/turnkey_client/models/remove_ip_allowlist_intent.rb +207 -0
  89. data/lib/turnkey_client/models/remove_ip_allowlist_request.rb +298 -0
  90. data/lib/turnkey_client/models/remove_ip_allowlist_result.rb +196 -0
  91. data/lib/turnkey_client/models/restore_tvc_deployment_intent.rb +211 -0
  92. data/lib/turnkey_client/models/restore_tvc_deployment_request.rb +298 -0
  93. data/lib/turnkey_client/models/restore_tvc_deployment_result.rb +211 -0
  94. data/lib/turnkey_client/models/result.rb +166 -4
  95. data/lib/turnkey_client/models/root_user_params_v5.rb +284 -0
  96. data/lib/turnkey_client/models/set_ip_allowlist_intent.rb +241 -0
  97. data/lib/turnkey_client/models/set_ip_allowlist_request.rb +298 -0
  98. data/lib/turnkey_client/models/set_ip_allowlist_result.rb +196 -0
  99. data/lib/turnkey_client/models/signup_usage.rb +249 -0
  100. data/lib/turnkey_client/models/signup_usage_v2.rb +249 -0
  101. data/lib/turnkey_client/models/sol_send_transaction_intent.rb +3 -3
  102. data/lib/turnkey_client/models/solana_config.rb +207 -0
  103. data/lib/turnkey_client/models/solana_failure_details.rb +273 -0
  104. data/lib/turnkey_client/models/solana_send_transaction_status.rb +207 -0
  105. data/lib/turnkey_client/models/spark_claim_leaf.rb +241 -0
  106. data/lib/turnkey_client/models/spark_claim_package.rb +275 -0
  107. data/lib/turnkey_client/models/spark_claim_transfer_intent.rb +225 -0
  108. data/lib/turnkey_client/models/spark_claim_transfer_request.rb +288 -0
  109. data/lib/turnkey_client/models/spark_claim_transfer_result.rb +230 -0
  110. data/lib/turnkey_client/models/spark_deposit_derivation.rb +196 -0
  111. data/lib/turnkey_client/models/spark_encrypted_operator_package.rb +226 -0
  112. data/lib/turnkey_client/models/spark_frost_commitment.rb +241 -0
  113. data/lib/turnkey_client/models/spark_htlc_preimage_derivation.rb +196 -0
  114. data/lib/turnkey_client/models/spark_identity_derivation.rb +196 -0
  115. data/lib/turnkey_client/models/spark_key_derivation.rb +241 -0
  116. data/lib/turnkey_client/models/spark_leaf_public_key.rb +226 -0
  117. data/lib/turnkey_client/models/spark_lightning_receive_package.rb +228 -0
  118. data/lib/turnkey_client/models/spark_operator_recipient.rb +226 -0
  119. data/lib/turnkey_client/models/spark_partial_signature.rb +241 -0
  120. data/lib/turnkey_client/models/spark_prepare_lightning_receive_intent.rb +225 -0
  121. data/lib/turnkey_client/models/spark_prepare_lightning_receive_request.rb +288 -0
  122. data/lib/turnkey_client/models/spark_prepare_lightning_receive_result.rb +228 -0
  123. data/lib/turnkey_client/models/spark_prepare_transfer_intent.rb +225 -0
  124. data/lib/turnkey_client/models/spark_prepare_transfer_request.rb +288 -0
  125. data/lib/turnkey_client/models/spark_prepare_transfer_result.rb +245 -0
  126. data/lib/turnkey_client/models/spark_sign_frost_intent.rb +228 -0
  127. data/lib/turnkey_client/models/spark_sign_frost_request.rb +288 -0
  128. data/lib/turnkey_client/models/spark_sign_frost_result.rb +213 -0
  129. data/lib/turnkey_client/models/spark_signature_request.rb +268 -0
  130. data/lib/turnkey_client/models/spark_signing_leaf_derivation.rb +211 -0
  131. data/lib/turnkey_client/models/spark_static_deposit_derivation.rb +211 -0
  132. data/lib/turnkey_client/models/spark_transfer_leaf.rb +272 -0
  133. data/lib/turnkey_client/models/spark_transfer_package.rb +275 -0
  134. data/lib/turnkey_client/models/token_usage.rb +252 -0
  135. data/lib/turnkey_client/models/tvc_app.rb +353 -0
  136. data/lib/turnkey_client/models/tvc_container_spec.rb +302 -0
  137. data/lib/turnkey_client/models/tvc_deployment.rb +372 -0
  138. data/lib/turnkey_client/models/tvc_health_check_type.rb +27 -0
  139. data/lib/turnkey_client/models/tvc_manifest.rb +254 -0
  140. data/lib/turnkey_client/models/tvc_operator.rb +269 -0
  141. data/lib/turnkey_client/models/tvc_operator_approval.rb +283 -0
  142. data/lib/turnkey_client/models/tvc_operator_set.rb +301 -0
  143. data/lib/turnkey_client/models/tx_error.rb +22 -4
  144. data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +17 -5
  145. data/lib/turnkey_client/models/update_organization_name_intent.rb +211 -0
  146. data/lib/turnkey_client/models/update_organization_name_request.rb +298 -0
  147. data/lib/turnkey_client/models/update_organization_name_result.rb +226 -0
  148. data/lib/turnkey_client/models/update_tvc_app_live_deployment_intent.rb +211 -0
  149. data/lib/turnkey_client/models/update_tvc_app_live_deployment_request.rb +298 -0
  150. data/lib/turnkey_client/models/update_tvc_app_live_deployment_result.rb +196 -0
  151. data/lib/turnkey_client/models/update_webhook_endpoint_intent.rb +244 -0
  152. data/lib/turnkey_client/models/update_webhook_endpoint_request.rb +298 -0
  153. data/lib/turnkey_client/models/update_webhook_endpoint_result.rb +225 -0
  154. data/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +25 -5
  155. data/lib/turnkey_client/models/usage_type.rb +27 -0
  156. data/lib/turnkey_client/models/user_params_v4.rb +301 -0
  157. data/lib/turnkey_client/models/validate_tvc_image_request.rb +237 -0
  158. data/lib/turnkey_client/models/validate_tvc_image_response.rb +205 -0
  159. data/lib/turnkey_client/models/verify_otp_intent_v2.rb +237 -0
  160. data/lib/turnkey_client/models/verify_otp_request.rb +2 -2
  161. data/lib/turnkey_client/models/web_authn_stamp.rb +256 -0
  162. data/lib/turnkey_client/models/webhook_endpoint_data.rb +283 -0
  163. data/lib/turnkey_client/models/webhook_subscription_params.rb +233 -0
  164. data/lib/turnkey_client/version.rb +1 -1
  165. data/lib/turnkey_client.rb +129 -0
  166. metadata +153 -24
@@ -537,6 +537,64 @@ module TurnkeyClient
537
537
  end
538
538
  return data, status_code, headers
539
539
  end
540
+ # Get balances
541
+ # Get balances of supported assets for an address on the specified network. Only non-zero balances are returned.
542
+ # @param body
543
+ # @param [Hash] opts the optional parameters
544
+ # @return [GetWalletAddressBalancesResponse]
545
+ def get_wallet_address_balances(body, opts = {})
546
+ data, _status_code, _headers = get_wallet_address_balances_with_http_info(body, opts)
547
+ data
548
+ end
549
+
550
+ # Get balances
551
+ # Get balances of supported assets for an address on the specified network. Only non-zero balances are returned.
552
+ # @param body
553
+ # @param [Hash] opts the optional parameters
554
+ # @return [Array<(GetWalletAddressBalancesResponse, Integer, Hash)>] GetWalletAddressBalancesResponse data, response status code and response headers
555
+ def get_wallet_address_balances_with_http_info(body, opts = {})
556
+ if @api_client.config.debugging
557
+ @api_client.config.logger.debug 'Calling API: WalletsApi.get_wallet_address_balances ...'
558
+ end
559
+ # verify the required parameter 'body' is set
560
+ if @api_client.config.client_side_validation && body.nil?
561
+ fail ArgumentError, "Missing the required parameter 'body' when calling WalletsApi.get_wallet_address_balances"
562
+ end
563
+ # resource path
564
+ local_var_path = '/public/v1/query/get_wallet_address_balances'
565
+
566
+ # query parameters
567
+ query_params = opts[:query_params] || {}
568
+
569
+ # header parameters
570
+ header_params = opts[:header_params] || {}
571
+ # HTTP header 'Accept' (if needed)
572
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
573
+ # HTTP header 'Content-Type'
574
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
575
+
576
+ # form parameters
577
+ form_params = opts[:form_params] || {}
578
+
579
+ # http body (model)
580
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
581
+
582
+ return_type = opts[:return_type] || 'GetWalletAddressBalancesResponse'
583
+
584
+ auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
585
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
586
+ :header_params => header_params,
587
+ :query_params => query_params,
588
+ :form_params => form_params,
589
+ :body => post_body,
590
+ :auth_names => auth_names,
591
+ :return_type => return_type)
592
+
593
+ if @api_client.config.debugging
594
+ @api_client.config.logger.debug "API called: WalletsApi#get_wallet_address_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
595
+ end
596
+ return data, status_code, headers
597
+ end
540
598
  # List wallets
541
599
  # List all wallets within an organization.
542
600
  # @param body
@@ -711,6 +769,64 @@ module TurnkeyClient
711
769
  end
712
770
  return data, status_code, headers
713
771
  end
772
+ # List supported assets
773
+ # List supported assets for the specified network.
774
+ # @param body
775
+ # @param [Hash] opts the optional parameters
776
+ # @return [ListSupportedAssetsResponse]
777
+ def list_supported_assets(body, opts = {})
778
+ data, _status_code, _headers = list_supported_assets_with_http_info(body, opts)
779
+ data
780
+ end
781
+
782
+ # List supported assets
783
+ # List supported assets for the specified network.
784
+ # @param body
785
+ # @param [Hash] opts the optional parameters
786
+ # @return [Array<(ListSupportedAssetsResponse, Integer, Hash)>] ListSupportedAssetsResponse data, response status code and response headers
787
+ def list_supported_assets_with_http_info(body, opts = {})
788
+ if @api_client.config.debugging
789
+ @api_client.config.logger.debug 'Calling API: WalletsApi.list_supported_assets ...'
790
+ end
791
+ # verify the required parameter 'body' is set
792
+ if @api_client.config.client_side_validation && body.nil?
793
+ fail ArgumentError, "Missing the required parameter 'body' when calling WalletsApi.list_supported_assets"
794
+ end
795
+ # resource path
796
+ local_var_path = '/public/v1/query/list_supported_assets'
797
+
798
+ # query parameters
799
+ query_params = opts[:query_params] || {}
800
+
801
+ # header parameters
802
+ header_params = opts[:header_params] || {}
803
+ # HTTP header 'Accept' (if needed)
804
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
805
+ # HTTP header 'Content-Type'
806
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
807
+
808
+ # form parameters
809
+ form_params = opts[:form_params] || {}
810
+
811
+ # http body (model)
812
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
813
+
814
+ return_type = opts[:return_type] || 'ListSupportedAssetsResponse'
815
+
816
+ auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
817
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
818
+ :header_params => header_params,
819
+ :query_params => query_params,
820
+ :form_params => form_params,
821
+ :body => post_body,
822
+ :auth_names => auth_names,
823
+ :return_type => return_type)
824
+
825
+ if @api_client.config.debugging
826
+ @api_client.config.logger.debug "API called: WalletsApi#list_supported_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
827
+ end
828
+ return data, status_code, headers
829
+ end
714
830
  # Update wallet
715
831
  # Update a wallet for an organization.
716
832
  # @param body
@@ -202,6 +202,13 @@ module TurnkeyClient
202
202
  key: 'X-Stamp',
203
203
  value: api_key_with_prefix('X-Stamp')
204
204
  },
205
+ 'AttestedAuth' =>
206
+ {
207
+ type: 'api_key',
208
+ in: 'header',
209
+ key: 'X-Stamp-Attested',
210
+ value: api_key_with_prefix('X-Stamp-Attested')
211
+ },
205
212
  'AuthenticatorAuth' =>
206
213
  {
207
214
  type: 'api_key',
@@ -15,23 +15,28 @@ module TurnkeyClient
15
15
  # The product that the customer wants to subscribe to.
16
16
  attr_accessor :product_id
17
17
 
18
+ attr_accessor :orb_plan_id
19
+
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
21
- :'product_id' => :'productId'
23
+ :'product_id' => :'productId',
24
+ :'orb_plan_id' => :'orbPlanId'
22
25
  }
23
26
  end
24
27
 
25
28
  # Attribute type mapping.
26
29
  def self.openapi_types
27
30
  {
28
- :'product_id' => :'Object'
31
+ :'product_id' => :'Object',
32
+ :'orb_plan_id' => :'Object'
29
33
  }
30
34
  end
31
35
 
32
36
  # List of attributes with nullable: true
33
37
  def self.openapi_nullable
34
38
  Set.new([
39
+ :'orb_plan_id'
35
40
  ])
36
41
  end
37
42
 
@@ -53,6 +58,10 @@ module TurnkeyClient
53
58
  if attributes.key?(:'product_id')
54
59
  self.product_id = attributes[:'product_id']
55
60
  end
61
+
62
+ if attributes.key?(:'orb_plan_id')
63
+ self.orb_plan_id = attributes[:'orb_plan_id']
64
+ end
56
65
  end
57
66
 
58
67
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -78,7 +87,8 @@ module TurnkeyClient
78
87
  def ==(o)
79
88
  return true if self.equal?(o)
80
89
  self.class == o.class &&
81
- product_id == o.product_id
90
+ product_id == o.product_id &&
91
+ orb_plan_id == o.orb_plan_id
82
92
  end
83
93
 
84
94
  # @see the `==` method
@@ -90,7 +100,7 @@ module TurnkeyClient
90
100
  # Calculates hash code according to all attributes.
91
101
  # @return [Integer] Hash code
92
102
  def hash
93
- [product_id].hash
103
+ [product_id, orb_plan_id].hash
94
104
  end
95
105
 
96
106
  # Builds the object from hash
@@ -129,6 +129,27 @@ module TurnkeyClient
129
129
  CREATE_TVC_DEPLOYMENT = 'ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT'.freeze
130
130
  CREATE_TVC_MANIFEST_APPROVALS = 'ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS'.freeze
131
131
  SOL_SEND_TRANSACTION = 'ACTIVITY_TYPE_SOL_SEND_TRANSACTION'.freeze
132
+ INIT_OTP_V3 = 'ACTIVITY_TYPE_INIT_OTP_V3'.freeze
133
+ VERIFY_OTP_V2 = 'ACTIVITY_TYPE_VERIFY_OTP_V2'.freeze
134
+ OTP_LOGIN_V2 = 'ACTIVITY_TYPE_OTP_LOGIN_V2'.freeze
135
+ UPDATE_ORGANIZATION_NAME = 'ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME'.freeze
136
+ CREATE_SUB_ORGANIZATION_V8 = 'ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8'.freeze
137
+ CREATE_OAUTH_PROVIDERS_V2 = 'ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2'.freeze
138
+ CREATE_USERS_V4 = 'ACTIVITY_TYPE_CREATE_USERS_V4'.freeze
139
+ CREATE_WEBHOOK_ENDPOINT = 'ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT'.freeze
140
+ UPDATE_WEBHOOK_ENDPOINT = 'ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT'.freeze
141
+ DELETE_WEBHOOK_ENDPOINT = 'ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT'.freeze
142
+ SET_IP_ALLOWLIST = 'ACTIVITY_TYPE_SET_IP_ALLOWLIST'.freeze
143
+ REMOVE_IP_ALLOWLIST = 'ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST'.freeze
144
+ UPDATE_TVC_APP_LIVE_DEPLOYMENT = 'ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT'.freeze
145
+ DELETE_TVC_DEPLOYMENT = 'ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT'.freeze
146
+ DELETE_TVC_APP_AND_DEPLOYMENTS = 'ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS'.freeze
147
+ RESTORE_TVC_DEPLOYMENT = 'ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT'.freeze
148
+ SPARK_SIGN_FROST = 'ACTIVITY_TYPE_SPARK_SIGN_FROST'.freeze
149
+ SPARK_PREPARE_TRANSFER = 'ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER'.freeze
150
+ SPARK_CLAIM_TRANSFER = 'ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER'.freeze
151
+ SPARK_PREPARE_LIGHTNING_RECEIVE = 'ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE'.freeze
152
+ POST_TVC_QUORUM_KEY_SHARE = 'ACTIVITY_TYPE_POST_TVC_QUORUM_KEY_SHARE'.freeze
132
153
 
133
154
  # Builds the enum from string
134
155
  # @param [String] The enum value in the form of the string
@@ -48,6 +48,8 @@ module TurnkeyClient
48
48
  TON_V4_R2 = 'ADDRESS_FORMAT_TON_V4R2'.freeze
49
49
  TON_V5_R1 = 'ADDRESS_FORMAT_TON_V5R1'.freeze
50
50
  XRP = 'ADDRESS_FORMAT_XRP'.freeze
51
+ SPARK_MAINNET = 'ADDRESS_FORMAT_SPARK_MAINNET'.freeze
52
+ SPARK_REGTEST = 'ADDRESS_FORMAT_SPARK_REGTEST'.freeze
51
53
 
52
54
  # Builds the enum from string
53
55
  # @param [String] The enum value in the form of the string
@@ -0,0 +1,243 @@
1
+ =begin
2
+ #API Reference
3
+
4
+ #Review our [API Introduction](../api-introduction) to get started.
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module TurnkeyClient
14
+ class AppStatus
15
+ # Unique identifier for this TVC App
16
+ attr_accessor :app_id
17
+
18
+ # List of deployment statuses for this app
19
+ attr_accessor :deployments
20
+
21
+ # The deployment ID currently serving traffic for this app
22
+ attr_accessor :targeted_deployment_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'app_id' => :'appId',
28
+ :'deployments' => :'deployments',
29
+ :'targeted_deployment_id' => :'targetedDeploymentId'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'app_id' => :'Object',
37
+ :'deployments' => :'Object',
38
+ :'targeted_deployment_id' => :'Object'
39
+ }
40
+ end
41
+
42
+ # List of attributes with nullable: true
43
+ def self.openapi_nullable
44
+ Set.new([
45
+ ])
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ if (!attributes.is_a?(Hash))
52
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::AppStatus` initialize method"
53
+ end
54
+
55
+ # check to see if the attribute exists and convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h|
57
+ if (!self.class.attribute_map.key?(k.to_sym))
58
+ 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
59
+ end
60
+ h[k.to_sym] = v
61
+ }
62
+
63
+ if attributes.key?(:'app_id')
64
+ self.app_id = attributes[:'app_id']
65
+ end
66
+
67
+ if attributes.key?(:'deployments')
68
+ if (value = attributes[:'deployments']).is_a?(Array)
69
+ self.deployments = value
70
+ end
71
+ end
72
+
73
+ if attributes.key?(:'targeted_deployment_id')
74
+ self.targeted_deployment_id = attributes[:'targeted_deployment_id']
75
+ end
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ if @app_id.nil?
83
+ invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
84
+ end
85
+
86
+ if @deployments.nil?
87
+ invalid_properties.push('invalid value for "deployments", deployments cannot be nil.')
88
+ end
89
+
90
+ if @targeted_deployment_id.nil?
91
+ invalid_properties.push('invalid value for "targeted_deployment_id", targeted_deployment_id cannot be nil.')
92
+ end
93
+
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ return false if @app_id.nil?
101
+ return false if @deployments.nil?
102
+ return false if @targeted_deployment_id.nil?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ app_id == o.app_id &&
112
+ deployments == o.deployments &&
113
+ targeted_deployment_id == o.targeted_deployment_id
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [app_id, deployments, targeted_deployment_id].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ new.build_from_hash(attributes)
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ self.class.openapi_types.each_pair do |key, type|
141
+ if type =~ /\AArray<(.*)>/i
142
+ # check to ensure the input is an array given that the attribute
143
+ # is documented as an array but the input is not
144
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
145
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ end
147
+ elsif !attributes[self.class.attribute_map[key]].nil?
148
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
150
+ self.send("#{key}=", nil)
151
+ end
152
+ end
153
+
154
+ self
155
+ end
156
+
157
+ # Deserializes the data based on type
158
+ # @param string type Data type
159
+ # @param string value Value to be deserialized
160
+ # @return [Object] Deserialized data
161
+ def _deserialize(type, value)
162
+ case type.to_sym
163
+ when :DateTime
164
+ DateTime.parse(value)
165
+ when :Date
166
+ Date.parse(value)
167
+ when :String
168
+ value.to_s
169
+ when :Integer
170
+ value.to_i
171
+ when :Float
172
+ value.to_f
173
+ when :Boolean
174
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
175
+ true
176
+ else
177
+ false
178
+ end
179
+ when :Object
180
+ # generic object (usually a Hash), return directly
181
+ value
182
+ when /\AArray<(?<inner_type>.+)>\z/
183
+ inner_type = Regexp.last_match[:inner_type]
184
+ value.map { |v| _deserialize(inner_type, v) }
185
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
186
+ k_type = Regexp.last_match[:k_type]
187
+ v_type = Regexp.last_match[:v_type]
188
+ {}.tap do |hash|
189
+ value.each do |k, v|
190
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
191
+ end
192
+ end
193
+ else # model
194
+ TurnkeyClient.const_get(type).build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end end
243
+ end