composio 0.1.15 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +250 -202
  4. data/lib/composio/api/actions_api.rb +201 -6
  5. data/lib/composio/api/admin_api.rb +78 -0
  6. data/lib/composio/api/auth_api.rb +77 -0
  7. data/lib/composio/api/cli_api.rb +266 -0
  8. data/lib/composio/api/connections_api.rb +124 -6
  9. data/lib/composio/api/event_logs_api.rb +0 -318
  10. data/lib/composio/api/integrations_api.rb +8 -4
  11. data/lib/composio/api/logs_api.rb +19 -4
  12. data/lib/composio/api/triggers_api.rb +9 -2
  13. data/lib/composio/models/action_execution_req_dto.rb +31 -4
  14. data/lib/composio/models/action_get_nla_inputs_req_dto.rb +22 -4
  15. data/lib/composio/models/actions_query_dto.rb +22 -4
  16. data/lib/composio/models/app_query_dto.rb +1 -1
  17. data/lib/composio/models/client_dto.rb +374 -0
  18. data/lib/composio/models/client_dto_created_at.rb +102 -0
  19. data/lib/composio/models/client_dto_last_subscribed_at.rb +102 -0
  20. data/lib/composio/models/client_dto_updated_at.rb +102 -0
  21. data/lib/composio/models/client_info_res_dto.rb +235 -0
  22. data/lib/composio/models/connection_params.rb +15 -4
  23. data/lib/composio/models/connection_with_app_data.rb +15 -4
  24. data/lib/composio/models/create_connector_payload_dto.rb +12 -7
  25. data/lib/composio/models/expected_input_fields_dto.rb +346 -0
  26. data/lib/composio/models/get_connections_query_dto.rb +15 -4
  27. data/lib/composio/models/get_connector_info_res_dto.rb +1 -1
  28. data/lib/composio/models/get_logs_dto.rb +14 -4
  29. data/lib/composio/models/ingest_data_dto.rb +21 -1
  30. data/lib/composio/models/initiate_connection_payload_dto.rb +19 -18
  31. data/lib/composio/models/list_triggers_query_dto.rb +11 -1
  32. data/lib/composio/models/sdk_error_res_dto.rb +221 -0
  33. data/lib/composio/models/session_info_dto.rb +224 -0
  34. data/lib/composio/models/tools_execute_req_dto.rb +22 -4
  35. data/lib/composio/models/trigger_response_dto.rb +14 -4
  36. data/lib/composio/models/update_connection_labels_payload_dto.rb +222 -0
  37. data/lib/composio/version.rb +1 -1
  38. data/lib/composio.rb +12 -3
  39. data/spec/api/actions_api_spec.rb +25 -0
  40. data/spec/api/admin_api_spec.rb +11 -0
  41. data/spec/api/auth_api_spec.rb +11 -0
  42. data/spec/api/cli_api_spec.rb +63 -0
  43. data/spec/api/connections_api_spec.rb +14 -0
  44. data/spec/api/event_logs_api_spec.rb +0 -43
  45. data/spec/api/logs_api_spec.rb +1 -0
  46. data/spec/api/triggers_api_spec.rb +1 -0
  47. data/spec/models/action_execution_req_dto_spec.rb +18 -0
  48. data/spec/models/action_get_nla_inputs_req_dto_spec.rb +12 -0
  49. data/spec/models/actions_query_dto_spec.rb +12 -0
  50. data/spec/models/client_dto_created_at_spec.rb +25 -0
  51. data/spec/models/client_dto_last_subscribed_at_spec.rb +25 -0
  52. data/spec/models/client_dto_spec.rb +100 -0
  53. data/spec/models/client_dto_updated_at_spec.rb +25 -0
  54. data/spec/models/client_info_res_dto_spec.rb +34 -0
  55. data/spec/models/connection_params_spec.rb +6 -0
  56. data/spec/models/connection_with_app_data_spec.rb +6 -0
  57. data/spec/models/create_connector_payload_dto_spec.rb +6 -0
  58. data/spec/models/expected_input_fields_dto_spec.rb +82 -0
  59. data/spec/models/get_connections_query_dto_spec.rb +6 -0
  60. data/spec/models/get_logs_dto_spec.rb +6 -0
  61. data/spec/models/ingest_data_dto_spec.rb +12 -0
  62. data/spec/models/initiate_connection_payload_dto_spec.rb +6 -0
  63. data/spec/models/list_triggers_query_dto_spec.rb +6 -0
  64. data/spec/models/sdk_error_res_dto_spec.rb +28 -0
  65. data/spec/models/session_info_dto_spec.rb +34 -0
  66. data/spec/models/tools_execute_req_dto_spec.rb +12 -0
  67. data/spec/models/trigger_response_dto_spec.rb +6 -0
  68. data/spec/models/update_connection_labels_payload_dto_spec.rb +28 -0
  69. metadata +32 -4
  70. data/spec/api/payment_api_spec.rb +0 -83
@@ -26,19 +26,25 @@ module Composio
26
26
  # @param entity_id [String]
27
27
  # @param endpoint [String]
28
28
  # @param input [Object]
29
+ # @param session_info [SessionInfoDTO]
29
30
  # @param auth_config [CustomAuthDTO]
30
31
  # @param text [String]
32
+ # @param custom_description [String]
33
+ # @param system_prompt [String]
31
34
  # @param body [ActionExecutionReqDTO]
32
35
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
33
- def execute(action_id:, connected_account_id: SENTINEL, app_name: SENTINEL, entity_id: SENTINEL, endpoint: SENTINEL, input: SENTINEL, auth_config: SENTINEL, text: SENTINEL, extra: {})
36
+ def execute(action_id:, connected_account_id: SENTINEL, app_name: SENTINEL, entity_id: SENTINEL, endpoint: SENTINEL, input: SENTINEL, session_info: SENTINEL, auth_config: SENTINEL, text: SENTINEL, custom_description: SENTINEL, system_prompt: SENTINEL, extra: {})
34
37
  _body = {}
35
38
  _body[:connectedAccountId] = connected_account_id if connected_account_id != SENTINEL
36
39
  _body[:appName] = app_name if app_name != SENTINEL
37
40
  _body[:entityId] = entity_id if entity_id != SENTINEL
38
41
  _body[:endpoint] = endpoint if endpoint != SENTINEL
39
42
  _body[:input] = input if input != SENTINEL
43
+ _body[:sessionInfo] = session_info if session_info != SENTINEL
40
44
  _body[:authConfig] = auth_config if auth_config != SENTINEL
41
45
  _body[:text] = text if text != SENTINEL
46
+ _body[:customDescription] = custom_description if custom_description != SENTINEL
47
+ _body[:systemPrompt] = system_prompt if system_prompt != SENTINEL
42
48
  extra[:action_execution_req_dto] = _body if !_body.empty?
43
49
  api_response = execute_with_http_info_impl(action_id, extra)
44
50
  api_response.data
@@ -54,19 +60,25 @@ module Composio
54
60
  # @param entity_id [String]
55
61
  # @param endpoint [String]
56
62
  # @param input [Object]
63
+ # @param session_info [SessionInfoDTO]
57
64
  # @param auth_config [CustomAuthDTO]
58
65
  # @param text [String]
66
+ # @param custom_description [String]
67
+ # @param system_prompt [String]
59
68
  # @param body [ActionExecutionReqDTO]
60
69
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
61
- def execute_with_http_info(action_id:, connected_account_id: SENTINEL, app_name: SENTINEL, entity_id: SENTINEL, endpoint: SENTINEL, input: SENTINEL, auth_config: SENTINEL, text: SENTINEL, extra: {})
70
+ def execute_with_http_info(action_id:, connected_account_id: SENTINEL, app_name: SENTINEL, entity_id: SENTINEL, endpoint: SENTINEL, input: SENTINEL, session_info: SENTINEL, auth_config: SENTINEL, text: SENTINEL, custom_description: SENTINEL, system_prompt: SENTINEL, extra: {})
62
71
  _body = {}
63
72
  _body[:connectedAccountId] = connected_account_id if connected_account_id != SENTINEL
64
73
  _body[:appName] = app_name if app_name != SENTINEL
65
74
  _body[:entityId] = entity_id if entity_id != SENTINEL
66
75
  _body[:endpoint] = endpoint if endpoint != SENTINEL
67
76
  _body[:input] = input if input != SENTINEL
77
+ _body[:sessionInfo] = session_info if session_info != SENTINEL
68
78
  _body[:authConfig] = auth_config if auth_config != SENTINEL
69
79
  _body[:text] = text if text != SENTINEL
80
+ _body[:customDescription] = custom_description if custom_description != SENTINEL
81
+ _body[:systemPrompt] = system_prompt if system_prompt != SENTINEL
70
82
  extra[:action_execution_req_dto] = _body if !_body.empty?
71
83
  execute_with_http_info_impl(action_id, extra)
72
84
  end
@@ -338,11 +350,15 @@ module Composio
338
350
  #
339
351
  # @param text [String]
340
352
  # @param action_id [String]
353
+ # @param custom_description [String]
354
+ # @param system_prompt [String]
341
355
  # @param body [ActionGetNLAInputsReqDTO]
342
356
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
343
- def get_action_inputs(text:, action_id:, extra: {})
357
+ def get_action_inputs(text:, action_id:, custom_description: SENTINEL, system_prompt: SENTINEL, extra: {})
344
358
  _body = {}
345
359
  _body[:text] = text if text != SENTINEL
360
+ _body[:customDescription] = custom_description if custom_description != SENTINEL
361
+ _body[:systemPrompt] = system_prompt if system_prompt != SENTINEL
346
362
  extra[:action_get_nla_inputs_req_dto] = _body if !_body.empty?
347
363
  api_response = get_action_inputs_with_http_info_impl(action_id, extra)
348
364
  api_response.data
@@ -354,11 +370,15 @@ module Composio
354
370
  #
355
371
  # @param text [String]
356
372
  # @param action_id [String]
373
+ # @param custom_description [String]
374
+ # @param system_prompt [String]
357
375
  # @param body [ActionGetNLAInputsReqDTO]
358
376
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
359
- def get_action_inputs_with_http_info(text:, action_id:, extra: {})
377
+ def get_action_inputs_with_http_info(text:, action_id:, custom_description: SENTINEL, system_prompt: SENTINEL, extra: {})
360
378
  _body = {}
361
379
  _body[:text] = text if text != SENTINEL
380
+ _body[:customDescription] = custom_description if custom_description != SENTINEL
381
+ _body[:systemPrompt] = system_prompt if system_prompt != SENTINEL
362
382
  extra[:action_get_nla_inputs_req_dto] = _body if !_body.empty?
363
383
  get_action_inputs_with_http_info_impl(action_id, extra)
364
384
  end
@@ -453,8 +473,10 @@ module Composio
453
473
  # @param usecase_limit [Float]
454
474
  # @param filter_important_actions [Boolean]
455
475
  # @param show_all [Boolean]
476
+ # @param page [Float]
477
+ # @param offset [Float]
456
478
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
457
- def get_all_actions_based_on_query(app_names: SENTINEL, use_case: SENTINEL, show_enabled_only: SENTINEL, limit: SENTINEL, apps: SENTINEL, actions: SENTINEL, tags: SENTINEL, usecase_limit: SENTINEL, filter_important_actions: SENTINEL, show_all: SENTINEL, extra: {})
479
+ def get_all_actions_based_on_query(app_names: SENTINEL, use_case: SENTINEL, show_enabled_only: SENTINEL, limit: SENTINEL, apps: SENTINEL, actions: SENTINEL, tags: SENTINEL, usecase_limit: SENTINEL, filter_important_actions: SENTINEL, show_all: SENTINEL, page: SENTINEL, offset: SENTINEL, extra: {})
458
480
  extra[:app_names] = app_names if app_names != SENTINEL
459
481
  extra[:use_case] = use_case if use_case != SENTINEL
460
482
  extra[:show_enabled_only] = show_enabled_only if show_enabled_only != SENTINEL
@@ -465,6 +487,8 @@ module Composio
465
487
  extra[:usecase_limit] = usecase_limit if usecase_limit != SENTINEL
466
488
  extra[:filter_important_actions] = filter_important_actions if filter_important_actions != SENTINEL
467
489
  extra[:show_all] = show_all if show_all != SENTINEL
490
+ extra[:page] = page if page != SENTINEL
491
+ extra[:offset] = offset if offset != SENTINEL
468
492
  api_response = get_all_actions_based_on_query_with_http_info_impl(extra)
469
493
  api_response.data
470
494
  end
@@ -483,8 +507,10 @@ module Composio
483
507
  # @param usecase_limit [Float]
484
508
  # @param filter_important_actions [Boolean]
485
509
  # @param show_all [Boolean]
510
+ # @param page [Float]
511
+ # @param offset [Float]
486
512
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
487
- def get_all_actions_based_on_query_with_http_info(app_names: SENTINEL, use_case: SENTINEL, show_enabled_only: SENTINEL, limit: SENTINEL, apps: SENTINEL, actions: SENTINEL, tags: SENTINEL, usecase_limit: SENTINEL, filter_important_actions: SENTINEL, show_all: SENTINEL, extra: {})
513
+ def get_all_actions_based_on_query_with_http_info(app_names: SENTINEL, use_case: SENTINEL, show_enabled_only: SENTINEL, limit: SENTINEL, apps: SENTINEL, actions: SENTINEL, tags: SENTINEL, usecase_limit: SENTINEL, filter_important_actions: SENTINEL, show_all: SENTINEL, page: SENTINEL, offset: SENTINEL, extra: {})
488
514
  extra[:app_names] = app_names if app_names != SENTINEL
489
515
  extra[:use_case] = use_case if use_case != SENTINEL
490
516
  extra[:show_enabled_only] = show_enabled_only if show_enabled_only != SENTINEL
@@ -495,6 +521,8 @@ module Composio
495
521
  extra[:usecase_limit] = usecase_limit if usecase_limit != SENTINEL
496
522
  extra[:filter_important_actions] = filter_important_actions if filter_important_actions != SENTINEL
497
523
  extra[:show_all] = show_all if show_all != SENTINEL
524
+ extra[:page] = page if page != SENTINEL
525
+ extra[:offset] = offset if offset != SENTINEL
498
526
  get_all_actions_based_on_query_with_http_info_impl(extra)
499
527
  end
500
528
 
@@ -511,6 +539,8 @@ module Composio
511
539
  # @option opts [Float] :usecase_limit
512
540
  # @option opts [Boolean] :filter_important_actions
513
541
  # @option opts [Boolean] :show_all
542
+ # @option opts [Float] :page
543
+ # @option opts [Float] :offset
514
544
  # @return [ActionsListResponseDTO]
515
545
  private def get_all_actions_based_on_query_impl(opts = {})
516
546
  data, _status_code, _headers = get_all_actions_based_on_query_with_http_info(opts)
@@ -530,6 +560,8 @@ module Composio
530
560
  # @option opts [Float] :usecase_limit
531
561
  # @option opts [Boolean] :filter_important_actions
532
562
  # @option opts [Boolean] :show_all
563
+ # @option opts [Float] :page
564
+ # @option opts [Float] :offset
533
565
  # @return [APIResponse] data is ActionsListResponseDTO, status code, headers and response
534
566
  private def get_all_actions_based_on_query_with_http_info_impl(opts = {})
535
567
  if @api_client.config.debugging
@@ -550,6 +582,8 @@ module Composio
550
582
  query_params[:'usecaseLimit'] = opts[:'usecase_limit'] if !opts[:'usecase_limit'].nil?
551
583
  query_params[:'filterImportantActions'] = opts[:'filter_important_actions'] if !opts[:'filter_important_actions'].nil?
552
584
  query_params[:'showAll'] = opts[:'show_all'] if !opts[:'show_all'].nil?
585
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
586
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
553
587
 
554
588
  # header parameters
555
589
  header_params = opts[:header_params] || {}
@@ -584,6 +618,167 @@ module Composio
584
618
  end
585
619
  APIResponse::new(data, status_code, headers, response)
586
620
  end
621
+
622
+
623
+ # List actions
624
+ #
625
+ # Retrieve a list of all actions based on query parameters.
626
+ #
627
+ # @param app_names [String]
628
+ # @param use_case [String]
629
+ # @param show_enabled_only [Boolean]
630
+ # @param limit [Float]
631
+ # @param apps [String]
632
+ # @param actions [String]
633
+ # @param tags [String]
634
+ # @param usecase_limit [Float]
635
+ # @param filter_important_actions [Boolean]
636
+ # @param show_all [Boolean]
637
+ # @param page [Float]
638
+ # @param offset [Float]
639
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
640
+ def list(app_names: SENTINEL, use_case: SENTINEL, show_enabled_only: SENTINEL, limit: SENTINEL, apps: SENTINEL, actions: SENTINEL, tags: SENTINEL, usecase_limit: SENTINEL, filter_important_actions: SENTINEL, show_all: SENTINEL, page: SENTINEL, offset: SENTINEL, extra: {})
641
+ extra[:app_names] = app_names if app_names != SENTINEL
642
+ extra[:use_case] = use_case if use_case != SENTINEL
643
+ extra[:show_enabled_only] = show_enabled_only if show_enabled_only != SENTINEL
644
+ extra[:limit] = limit if limit != SENTINEL
645
+ extra[:apps] = apps if apps != SENTINEL
646
+ extra[:actions] = actions if actions != SENTINEL
647
+ extra[:tags] = tags if tags != SENTINEL
648
+ extra[:usecase_limit] = usecase_limit if usecase_limit != SENTINEL
649
+ extra[:filter_important_actions] = filter_important_actions if filter_important_actions != SENTINEL
650
+ extra[:show_all] = show_all if show_all != SENTINEL
651
+ extra[:page] = page if page != SENTINEL
652
+ extra[:offset] = offset if offset != SENTINEL
653
+ api_response = list_with_http_info_impl(extra)
654
+ api_response.data
655
+ end
656
+
657
+ # List actions
658
+ #
659
+ # Retrieve a list of all actions based on query parameters.
660
+ #
661
+ # @param app_names [String]
662
+ # @param use_case [String]
663
+ # @param show_enabled_only [Boolean]
664
+ # @param limit [Float]
665
+ # @param apps [String]
666
+ # @param actions [String]
667
+ # @param tags [String]
668
+ # @param usecase_limit [Float]
669
+ # @param filter_important_actions [Boolean]
670
+ # @param show_all [Boolean]
671
+ # @param page [Float]
672
+ # @param offset [Float]
673
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
674
+ def list_with_http_info(app_names: SENTINEL, use_case: SENTINEL, show_enabled_only: SENTINEL, limit: SENTINEL, apps: SENTINEL, actions: SENTINEL, tags: SENTINEL, usecase_limit: SENTINEL, filter_important_actions: SENTINEL, show_all: SENTINEL, page: SENTINEL, offset: SENTINEL, extra: {})
675
+ extra[:app_names] = app_names if app_names != SENTINEL
676
+ extra[:use_case] = use_case if use_case != SENTINEL
677
+ extra[:show_enabled_only] = show_enabled_only if show_enabled_only != SENTINEL
678
+ extra[:limit] = limit if limit != SENTINEL
679
+ extra[:apps] = apps if apps != SENTINEL
680
+ extra[:actions] = actions if actions != SENTINEL
681
+ extra[:tags] = tags if tags != SENTINEL
682
+ extra[:usecase_limit] = usecase_limit if usecase_limit != SENTINEL
683
+ extra[:filter_important_actions] = filter_important_actions if filter_important_actions != SENTINEL
684
+ extra[:show_all] = show_all if show_all != SENTINEL
685
+ extra[:page] = page if page != SENTINEL
686
+ extra[:offset] = offset if offset != SENTINEL
687
+ list_with_http_info_impl(extra)
688
+ end
689
+
690
+ # List actions
691
+ # Retrieve a list of all actions based on query parameters.
692
+ # @param [Hash] opts the optional parameters
693
+ # @option opts [String] :app_names
694
+ # @option opts [String] :use_case
695
+ # @option opts [Boolean] :show_enabled_only
696
+ # @option opts [Float] :limit
697
+ # @option opts [String] :apps
698
+ # @option opts [String] :actions
699
+ # @option opts [String] :tags
700
+ # @option opts [Float] :usecase_limit
701
+ # @option opts [Boolean] :filter_important_actions
702
+ # @option opts [Boolean] :show_all
703
+ # @option opts [Float] :page
704
+ # @option opts [Float] :offset
705
+ # @return [ActionsListResponseDTO]
706
+ private def list_impl(opts = {})
707
+ data, _status_code, _headers = list_with_http_info(opts)
708
+ data
709
+ end
710
+
711
+ # List actions
712
+ # Retrieve a list of all actions based on query parameters.
713
+ # @param [Hash] opts the optional parameters
714
+ # @option opts [String] :app_names
715
+ # @option opts [String] :use_case
716
+ # @option opts [Boolean] :show_enabled_only
717
+ # @option opts [Float] :limit
718
+ # @option opts [String] :apps
719
+ # @option opts [String] :actions
720
+ # @option opts [String] :tags
721
+ # @option opts [Float] :usecase_limit
722
+ # @option opts [Boolean] :filter_important_actions
723
+ # @option opts [Boolean] :show_all
724
+ # @option opts [Float] :page
725
+ # @option opts [Float] :offset
726
+ # @return [APIResponse] data is ActionsListResponseDTO, status code, headers and response
727
+ private def list_with_http_info_impl(opts = {})
728
+ if @api_client.config.debugging
729
+ @api_client.config.logger.debug 'Calling API: ActionsApi.list ...'
730
+ end
731
+ # resource path
732
+ local_var_path = '/api/v2/actions'
733
+
734
+ # query parameters
735
+ query_params = opts[:query_params] || {}
736
+ query_params[:'appNames'] = opts[:'app_names'] if !opts[:'app_names'].nil?
737
+ query_params[:'useCase'] = opts[:'use_case'] if !opts[:'use_case'].nil?
738
+ query_params[:'showEnabledOnly'] = opts[:'show_enabled_only'] if !opts[:'show_enabled_only'].nil?
739
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
740
+ query_params[:'apps'] = opts[:'apps'] if !opts[:'apps'].nil?
741
+ query_params[:'actions'] = opts[:'actions'] if !opts[:'actions'].nil?
742
+ query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
743
+ query_params[:'usecaseLimit'] = opts[:'usecase_limit'] if !opts[:'usecase_limit'].nil?
744
+ query_params[:'filterImportantActions'] = opts[:'filter_important_actions'] if !opts[:'filter_important_actions'].nil?
745
+ query_params[:'showAll'] = opts[:'show_all'] if !opts[:'show_all'].nil?
746
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
747
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
748
+
749
+ # header parameters
750
+ header_params = opts[:header_params] || {}
751
+ # HTTP header 'Accept' (if needed)
752
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
753
+
754
+ # form parameters
755
+ form_params = opts[:form_params] || {}
756
+
757
+ # http body (model)
758
+ post_body = opts[:debug_body]
759
+
760
+ # return_type
761
+ return_type = opts[:debug_return_type] || 'ActionsListResponseDTO'
762
+
763
+ # auth_names
764
+ auth_names = opts[:debug_auth_names] || ['api_key']
765
+
766
+ new_options = opts.merge(
767
+ :operation => :"ActionsApi.list",
768
+ :header_params => header_params,
769
+ :query_params => query_params,
770
+ :form_params => form_params,
771
+ :body => post_body,
772
+ :auth_names => auth_names,
773
+ :return_type => return_type
774
+ )
775
+
776
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
777
+ if @api_client.config.debugging
778
+ @api_client.config.logger.debug "API called: ActionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
779
+ end
780
+ APIResponse::new(data, status_code, headers, response)
781
+ end
587
782
  end
588
783
 
589
784
  # top-level client access to avoid having the user to insantiate their own API instances
@@ -16,6 +16,84 @@ module Composio
16
16
  @api_client = api_client
17
17
  end
18
18
 
19
+ # Clear cache
20
+ #
21
+ # @param x_admin_token [String]
22
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
23
+ def clear_cache(x_admin_token: SENTINEL, extra: {})
24
+ extra[:x_admin_token] = x_admin_token if x_admin_token != SENTINEL
25
+ api_response = clear_cache_with_http_info_impl(extra)
26
+ api_response.data
27
+ end
28
+
29
+ # Clear cache
30
+ #
31
+ # @param x_admin_token [String]
32
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
33
+ def clear_cache_with_http_info(x_admin_token: SENTINEL, extra: {})
34
+ extra[:x_admin_token] = x_admin_token if x_admin_token != SENTINEL
35
+ clear_cache_with_http_info_impl(extra)
36
+ end
37
+
38
+ # Clear cache
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [String] :x_admin_token
41
+ # @return [Object]
42
+ private def clear_cache_impl(opts = {})
43
+ data, _status_code, _headers = clear_cache_with_http_info(opts)
44
+ data
45
+ end
46
+
47
+ # Clear cache
48
+ # @param [Hash] opts the optional parameters
49
+ # @option opts [String] :x_admin_token
50
+ # @return [APIResponse] data is Object, status code, headers and response
51
+ private def clear_cache_with_http_info_impl(opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug 'Calling API: AdminApi.clear_cache ...'
54
+ end
55
+ # resource path
56
+ local_var_path = '/api/v1/clear-cache'
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+
61
+ # header parameters
62
+ header_params = opts[:header_params] || {}
63
+ # HTTP header 'Accept' (if needed)
64
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
65
+ header_params[:'X-ADMIN-TOKEN'] = opts[:'x_admin_token'] if !opts[:'x_admin_token'].nil?
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:debug_body]
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'Object'
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['api_key']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"AdminApi.clear_cache",
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: AdminApi#clear_cache\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ APIResponse::new(data, status_code, headers, response)
94
+ end
95
+
96
+
19
97
  # Jssentry dns
20
98
  #
21
99
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
@@ -16,6 +16,83 @@ module Composio
16
16
  @api_client = api_client
17
17
  end
18
18
 
19
+ # Get user info
20
+ #
21
+ # Get client info
22
+ #
23
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
24
+ def get_user_info(extra: {})
25
+ api_response = get_user_info_with_http_info_impl(extra)
26
+ api_response.data
27
+ end
28
+
29
+ # Get user info
30
+ #
31
+ # Get client info
32
+ #
33
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
34
+ def get_user_info_with_http_info(extra: {})
35
+ get_user_info_with_http_info_impl(extra)
36
+ end
37
+
38
+ # Get user info
39
+ # Get client info
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [ClientInfoResDTO]
42
+ private def get_user_info_impl(opts = {})
43
+ data, _status_code, _headers = get_user_info_with_http_info(opts)
44
+ data
45
+ end
46
+
47
+ # Get user info
48
+ # Get client info
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [APIResponse] data is ClientInfoResDTO, status code, headers and response
51
+ private def get_user_info_with_http_info_impl(opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug 'Calling API: AuthApi.get_user_info ...'
54
+ end
55
+ # resource path
56
+ local_var_path = '/api/v1/client/auth/client_info'
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+
61
+ # header parameters
62
+ header_params = opts[:header_params] || {}
63
+ # HTTP header 'Accept' (if needed)
64
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
65
+
66
+ # form parameters
67
+ form_params = opts[:form_params] || {}
68
+
69
+ # http body (model)
70
+ post_body = opts[:debug_body]
71
+
72
+ # return_type
73
+ return_type = opts[:debug_return_type] || 'ClientInfoResDTO'
74
+
75
+ # auth_names
76
+ auth_names = opts[:debug_auth_names] || ['api_key']
77
+
78
+ new_options = opts.merge(
79
+ :operation => :"AuthApi.get_user_info",
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => return_type
86
+ )
87
+
88
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: AuthApi#get_user_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ APIResponse::new(data, status_code, headers, response)
93
+ end
94
+
95
+
19
96
  # Identify client
20
97
  #
21
98
  # @param hash [String] The hash of the client