turnkey_client 0.0.9 → 0.0.13

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/turnkey_client/api/features_api.rb +4 -4
  3. data/lib/turnkey_client/api/organizations_api.rb +60 -2
  4. data/lib/turnkey_client/api/user_auth_api.rb +348 -0
  5. data/lib/turnkey_client/api/users_api.rb +0 -232
  6. data/lib/turnkey_client/api/wallets_api.rb +118 -2
  7. data/lib/turnkey_client/models/activity_type.rb +4 -0
  8. data/lib/turnkey_client/models/address_format.rb +7 -0
  9. data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +292 -0
  10. data/lib/turnkey_client/models/create_sub_organization_request.rb +2 -2
  11. data/lib/turnkey_client/models/create_sub_organization_result_v7.rb +230 -0
  12. data/lib/turnkey_client/models/credential_type.rb +1 -0
  13. data/lib/turnkey_client/models/email_auth_intent.rb +14 -4
  14. data/lib/turnkey_client/models/email_auth_intent_v2.rb +14 -4
  15. data/lib/turnkey_client/models/feature_name.rb +2 -0
  16. data/lib/turnkey_client/models/get_sub_org_ids_request.rb +1 -1
  17. data/lib/turnkey_client/models/get_verified_sub_org_ids_request.rb +240 -0
  18. data/lib/turnkey_client/models/get_verified_sub_org_ids_response.rb +213 -0
  19. data/lib/turnkey_client/models/get_wallet_account_request.rb +246 -0
  20. data/lib/turnkey_client/models/get_wallet_account_response.rb +210 -0
  21. data/lib/turnkey_client/models/get_wallet_accounts_response.rb +1 -1
  22. data/lib/turnkey_client/models/init_otp_auth_intent.rb +264 -0
  23. data/lib/turnkey_client/models/init_otp_auth_request.rb +288 -0
  24. data/lib/turnkey_client/models/init_otp_auth_result.rb +211 -0
  25. data/lib/turnkey_client/models/intent.rb +40 -4
  26. data/lib/turnkey_client/models/otp_auth_intent.rb +266 -0
  27. data/lib/turnkey_client/models/otp_auth_request.rb +288 -0
  28. data/lib/turnkey_client/models/otp_auth_result.rb +231 -0
  29. data/lib/turnkey_client/models/result.rb +40 -4
  30. data/lib/turnkey_client/models/root_user_params_v4.rb +282 -0
  31. data/lib/turnkey_client/models/sms_customization_params.rb +206 -0
  32. data/lib/turnkey_client/models/update_user_intent.rb +14 -4
  33. data/lib/turnkey_client/models/update_wallet_intent.rb +221 -0
  34. data/lib/turnkey_client/models/update_wallet_request.rb +288 -0
  35. data/lib/turnkey_client/models/update_wallet_result.rb +211 -0
  36. data/lib/turnkey_client/models/user.rb +11 -1
  37. data/lib/turnkey_client/models/wallet_account.rb +16 -1
  38. data/lib/turnkey_client/version.rb +1 -1
  39. data/lib/turnkey_client.rb +17 -0
  40. data/turnkey_client-0.0.12.gem +0 -0
  41. data/turnkey_client-0.0.9.gem +0 -0
  42. metadata +21 -2
@@ -15,64 +15,6 @@ module TurnkeyClient
15
15
  def initialize(api_client = ApiClient.default)
16
16
  @api_client = api_client
17
17
  end
18
- # Create Oauth Providers
19
- # Creates Oauth providers for a specified user - BETA
20
- # @param body
21
- # @param [Hash] opts the optional parameters
22
- # @return [ActivityResponse]
23
- def create_oauth_providers(body, opts = {})
24
- data, _status_code, _headers = create_oauth_providers_with_http_info(body, opts)
25
- data
26
- end
27
-
28
- # Create Oauth Providers
29
- # Creates Oauth providers for a specified user - BETA
30
- # @param body
31
- # @param [Hash] opts the optional parameters
32
- # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
33
- def create_oauth_providers_with_http_info(body, opts = {})
34
- if @api_client.config.debugging
35
- @api_client.config.logger.debug 'Calling API: UsersApi.create_oauth_providers ...'
36
- end
37
- # verify the required parameter 'body' is set
38
- if @api_client.config.client_side_validation && body.nil?
39
- fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.create_oauth_providers"
40
- end
41
- # resource path
42
- local_var_path = '/public/v1/submit/create_oauth_providers'
43
-
44
- # query parameters
45
- query_params = opts[:query_params] || {}
46
-
47
- # header parameters
48
- header_params = opts[:header_params] || {}
49
- # HTTP header 'Accept' (if needed)
50
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
- # HTTP header 'Content-Type'
52
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
53
-
54
- # form parameters
55
- form_params = opts[:form_params] || {}
56
-
57
- # http body (model)
58
- post_body = opts[:body] || @api_client.object_to_http_body(body)
59
-
60
- return_type = opts[:return_type] || 'ActivityResponse'
61
-
62
- auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
63
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
64
- :header_params => header_params,
65
- :query_params => query_params,
66
- :form_params => form_params,
67
- :body => post_body,
68
- :auth_names => auth_names,
69
- :return_type => return_type)
70
-
71
- if @api_client.config.debugging
72
- @api_client.config.logger.debug "API called: UsersApi#create_oauth_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
- end
74
- return data, status_code, headers
75
- end
76
18
  # Create Users
77
19
  # Create Users in an existing Organization
78
20
  # @param body
@@ -131,64 +73,6 @@ module TurnkeyClient
131
73
  end
132
74
  return data, status_code, headers
133
75
  end
134
- # Delete Oauth Providers
135
- # Removes Oauth providers for a specified user - BETA
136
- # @param body
137
- # @param [Hash] opts the optional parameters
138
- # @return [ActivityResponse]
139
- def delete_oauth_providers(body, opts = {})
140
- data, _status_code, _headers = delete_oauth_providers_with_http_info(body, opts)
141
- data
142
- end
143
-
144
- # Delete Oauth Providers
145
- # Removes Oauth providers for a specified user - BETA
146
- # @param body
147
- # @param [Hash] opts the optional parameters
148
- # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
149
- def delete_oauth_providers_with_http_info(body, opts = {})
150
- if @api_client.config.debugging
151
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_oauth_providers ...'
152
- end
153
- # verify the required parameter 'body' is set
154
- if @api_client.config.client_side_validation && body.nil?
155
- fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.delete_oauth_providers"
156
- end
157
- # resource path
158
- local_var_path = '/public/v1/submit/delete_oauth_providers'
159
-
160
- # query parameters
161
- query_params = opts[:query_params] || {}
162
-
163
- # header parameters
164
- header_params = opts[:header_params] || {}
165
- # HTTP header 'Accept' (if needed)
166
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
167
- # HTTP header 'Content-Type'
168
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
169
-
170
- # form parameters
171
- form_params = opts[:form_params] || {}
172
-
173
- # http body (model)
174
- post_body = opts[:body] || @api_client.object_to_http_body(body)
175
-
176
- return_type = opts[:return_type] || 'ActivityResponse'
177
-
178
- auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
179
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
180
- :header_params => header_params,
181
- :query_params => query_params,
182
- :form_params => form_params,
183
- :body => post_body,
184
- :auth_names => auth_names,
185
- :return_type => return_type)
186
-
187
- if @api_client.config.debugging
188
- @api_client.config.logger.debug "API called: UsersApi#delete_oauth_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
189
- end
190
- return data, status_code, headers
191
- end
192
76
  # Delete Users
193
77
  # Delete Users within an Organization
194
78
  # @param body
@@ -247,64 +131,6 @@ module TurnkeyClient
247
131
  end
248
132
  return data, status_code, headers
249
133
  end
250
- # Get Oauth providers
251
- # Get details about Oauth providers for a user
252
- # @param body
253
- # @param [Hash] opts the optional parameters
254
- # @return [GetOauthProvidersResponse]
255
- def get_oauth_providers(body, opts = {})
256
- data, _status_code, _headers = get_oauth_providers_with_http_info(body, opts)
257
- data
258
- end
259
-
260
- # Get Oauth providers
261
- # Get details about Oauth providers for a user
262
- # @param body
263
- # @param [Hash] opts the optional parameters
264
- # @return [Array<(GetOauthProvidersResponse, Integer, Hash)>] GetOauthProvidersResponse data, response status code and response headers
265
- def get_oauth_providers_with_http_info(body, opts = {})
266
- if @api_client.config.debugging
267
- @api_client.config.logger.debug 'Calling API: UsersApi.get_oauth_providers ...'
268
- end
269
- # verify the required parameter 'body' is set
270
- if @api_client.config.client_side_validation && body.nil?
271
- fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.get_oauth_providers"
272
- end
273
- # resource path
274
- local_var_path = '/public/v1/query/get_oauth_providers'
275
-
276
- # query parameters
277
- query_params = opts[:query_params] || {}
278
-
279
- # header parameters
280
- header_params = opts[:header_params] || {}
281
- # HTTP header 'Accept' (if needed)
282
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
283
- # HTTP header 'Content-Type'
284
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
285
-
286
- # form parameters
287
- form_params = opts[:form_params] || {}
288
-
289
- # http body (model)
290
- post_body = opts[:body] || @api_client.object_to_http_body(body)
291
-
292
- return_type = opts[:return_type] || 'GetOauthProvidersResponse'
293
-
294
- auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
295
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
296
- :header_params => header_params,
297
- :query_params => query_params,
298
- :form_params => form_params,
299
- :body => post_body,
300
- :auth_names => auth_names,
301
- :return_type => return_type)
302
-
303
- if @api_client.config.debugging
304
- @api_client.config.logger.debug "API called: UsersApi#get_oauth_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
305
- end
306
- return data, status_code, headers
307
- end
308
134
  # Get User
309
135
  # Get details about a User
310
136
  # @param body
@@ -421,64 +247,6 @@ module TurnkeyClient
421
247
  end
422
248
  return data, status_code, headers
423
249
  end
424
- # Oauth
425
- # Authenticate a user with an Oidc token (Oauth) - BETA
426
- # @param body
427
- # @param [Hash] opts the optional parameters
428
- # @return [ActivityResponse]
429
- def oauth(body, opts = {})
430
- data, _status_code, _headers = oauth_with_http_info(body, opts)
431
- data
432
- end
433
-
434
- # Oauth
435
- # Authenticate a user with an Oidc token (Oauth) - BETA
436
- # @param body
437
- # @param [Hash] opts the optional parameters
438
- # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
439
- def oauth_with_http_info(body, opts = {})
440
- if @api_client.config.debugging
441
- @api_client.config.logger.debug 'Calling API: UsersApi.oauth ...'
442
- end
443
- # verify the required parameter 'body' is set
444
- if @api_client.config.client_side_validation && body.nil?
445
- fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.oauth"
446
- end
447
- # resource path
448
- local_var_path = '/public/v1/submit/oauth'
449
-
450
- # query parameters
451
- query_params = opts[:query_params] || {}
452
-
453
- # header parameters
454
- header_params = opts[:header_params] || {}
455
- # HTTP header 'Accept' (if needed)
456
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
457
- # HTTP header 'Content-Type'
458
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
459
-
460
- # form parameters
461
- form_params = opts[:form_params] || {}
462
-
463
- # http body (model)
464
- post_body = opts[:body] || @api_client.object_to_http_body(body)
465
-
466
- return_type = opts[:return_type] || 'ActivityResponse'
467
-
468
- auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
469
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
470
- :header_params => header_params,
471
- :query_params => query_params,
472
- :form_params => form_params,
473
- :body => post_body,
474
- :auth_names => auth_names,
475
- :return_type => return_type)
476
-
477
- if @api_client.config.debugging
478
- @api_client.config.logger.debug "API called: UsersApi#oauth\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
479
- end
480
- return data, status_code, headers
481
- end
482
250
  # Update User
483
251
  # Update a User in an existing Organization
484
252
  # @param body
@@ -363,8 +363,66 @@ module TurnkeyClient
363
363
  end
364
364
  return data, status_code, headers
365
365
  end
366
+ # Get Wallet Account
367
+ # Get a single wallet account
368
+ # @param body
369
+ # @param [Hash] opts the optional parameters
370
+ # @return [GetWalletAccountResponse]
371
+ def get_wallet_account(body, opts = {})
372
+ data, _status_code, _headers = get_wallet_account_with_http_info(body, opts)
373
+ data
374
+ end
375
+
376
+ # Get Wallet Account
377
+ # Get a single wallet account
378
+ # @param body
379
+ # @param [Hash] opts the optional parameters
380
+ # @return [Array<(GetWalletAccountResponse, Integer, Hash)>] GetWalletAccountResponse data, response status code and response headers
381
+ def get_wallet_account_with_http_info(body, opts = {})
382
+ if @api_client.config.debugging
383
+ @api_client.config.logger.debug 'Calling API: WalletsApi.get_wallet_account ...'
384
+ end
385
+ # verify the required parameter 'body' is set
386
+ if @api_client.config.client_side_validation && body.nil?
387
+ fail ArgumentError, "Missing the required parameter 'body' when calling WalletsApi.get_wallet_account"
388
+ end
389
+ # resource path
390
+ local_var_path = '/public/v1/query/get_wallet_account'
391
+
392
+ # query parameters
393
+ query_params = opts[:query_params] || {}
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
399
+ # HTTP header 'Content-Type'
400
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
401
+
402
+ # form parameters
403
+ form_params = opts[:form_params] || {}
404
+
405
+ # http body (model)
406
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
407
+
408
+ return_type = opts[:return_type] || 'GetWalletAccountResponse'
409
+
410
+ auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
411
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
412
+ :header_params => header_params,
413
+ :query_params => query_params,
414
+ :form_params => form_params,
415
+ :body => post_body,
416
+ :auth_names => auth_names,
417
+ :return_type => return_type)
418
+
419
+ if @api_client.config.debugging
420
+ @api_client.config.logger.debug "API called: WalletsApi#get_wallet_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
421
+ end
422
+ return data, status_code, headers
423
+ end
366
424
  # List Wallets Accounts
367
- # List all Accounts wirhin a Wallet
425
+ # List all Accounts within a Wallet
368
426
  # @param body
369
427
  # @param [Hash] opts the optional parameters
370
428
  # @return [GetWalletAccountsResponse]
@@ -374,7 +432,7 @@ module TurnkeyClient
374
432
  end
375
433
 
376
434
  # List Wallets Accounts
377
- # List all Accounts wirhin a Wallet
435
+ # List all Accounts within a Wallet
378
436
  # @param body
379
437
  # @param [Hash] opts the optional parameters
380
438
  # @return [Array<(GetWalletAccountsResponse, Integer, Hash)>] GetWalletAccountsResponse data, response status code and response headers
@@ -595,5 +653,63 @@ module TurnkeyClient
595
653
  end
596
654
  return data, status_code, headers
597
655
  end
656
+ # Update Wallet
657
+ # Update a wallet for an organization
658
+ # @param body
659
+ # @param [Hash] opts the optional parameters
660
+ # @return [ActivityResponse]
661
+ def update_wallet(body, opts = {})
662
+ data, _status_code, _headers = update_wallet_with_http_info(body, opts)
663
+ data
664
+ end
665
+
666
+ # Update Wallet
667
+ # Update a wallet for an organization
668
+ # @param body
669
+ # @param [Hash] opts the optional parameters
670
+ # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
671
+ def update_wallet_with_http_info(body, opts = {})
672
+ if @api_client.config.debugging
673
+ @api_client.config.logger.debug 'Calling API: WalletsApi.update_wallet ...'
674
+ end
675
+ # verify the required parameter 'body' is set
676
+ if @api_client.config.client_side_validation && body.nil?
677
+ fail ArgumentError, "Missing the required parameter 'body' when calling WalletsApi.update_wallet"
678
+ end
679
+ # resource path
680
+ local_var_path = '/public/v1/submit/update_wallet'
681
+
682
+ # query parameters
683
+ query_params = opts[:query_params] || {}
684
+
685
+ # header parameters
686
+ header_params = opts[:header_params] || {}
687
+ # HTTP header 'Accept' (if needed)
688
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
689
+ # HTTP header 'Content-Type'
690
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
691
+
692
+ # form parameters
693
+ form_params = opts[:form_params] || {}
694
+
695
+ # http body (model)
696
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
697
+
698
+ return_type = opts[:return_type] || 'ActivityResponse'
699
+
700
+ auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
701
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
702
+ :header_params => header_params,
703
+ :query_params => query_params,
704
+ :form_params => form_params,
705
+ :body => post_body,
706
+ :auth_names => auth_names,
707
+ :return_type => return_type)
708
+
709
+ if @api_client.config.debugging
710
+ @api_client.config.logger.debug "API called: WalletsApi#update_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
711
+ end
712
+ return data, status_code, headers
713
+ end
598
714
  end
599
715
  end
@@ -88,6 +88,10 @@ module TurnkeyClient
88
88
  DELETE_WALLETS = 'ACTIVITY_TYPE_DELETE_WALLETS'.freeze
89
89
  CREATE_READ_WRITE_SESSION_V2 = 'ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2'.freeze
90
90
  DELETE_SUB_ORGANIZATION = 'ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION'.freeze
91
+ INIT_OTP_AUTH = 'ACTIVITY_TYPE_INIT_OTP_AUTH'.freeze
92
+ OTP_AUTH = 'ACTIVITY_TYPE_OTP_AUTH'.freeze
93
+ CREATE_SUB_ORGANIZATION_V7 = 'ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7'.freeze
94
+ UPDATE_WALLET = 'ACTIVITY_TYPE_UPDATE_WALLET'.freeze
91
95
 
92
96
  # Builds the enum from string
93
97
  # @param [String] The enum value in the form of the string
@@ -40,6 +40,13 @@ module TurnkeyClient
40
40
  BITCOIN_REGTEST_P2_WPKH = 'ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH'.freeze
41
41
  BITCOIN_REGTEST_P2_WSH = 'ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH'.freeze
42
42
  BITCOIN_REGTEST_P2_TR = 'ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR'.freeze
43
+ SEI = 'ADDRESS_FORMAT_SEI'.freeze
44
+ XLM = 'ADDRESS_FORMAT_XLM'.freeze
45
+ DOGE_MAINNET = 'ADDRESS_FORMAT_DOGE_MAINNET'.freeze
46
+ DOGE_TESTNET = 'ADDRESS_FORMAT_DOGE_TESTNET'.freeze
47
+ TON_V3_R2 = 'ADDRESS_FORMAT_TON_V3R2'.freeze
48
+ TON_V4_R2 = 'ADDRESS_FORMAT_TON_V4R2'.freeze
49
+ XRP = 'ADDRESS_FORMAT_XRP'.freeze
43
50
 
44
51
  # Builds the enum from string
45
52
  # @param [String] The enum value in the form of the string