algolia 3.0.0.beta.10 → 3.0.0.beta.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -200,7 +200,7 @@ module Algolia
200
200
  raise ArgumentError, "Parameter `task_create` is required when calling `create_task`."
201
201
  end
202
202
 
203
- path = "/1/tasks"
203
+ path = "/2/tasks"
204
204
  query_params = {}
205
205
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
206
206
  header_params = {}
@@ -229,6 +229,46 @@ module Algolia
229
229
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskCreateResponse")
230
230
  end
231
231
 
232
+ # Creates a new task using the v1 endpoint, please use `createTask` instead.
233
+
234
+ # @param task_create [TaskCreateV1] Request body for creating a task. (required)
235
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
236
+ # @return [Http::Response] the response
237
+ def create_task_v1_with_http_info(task_create, request_options = {})
238
+ # verify the required parameter 'task_create' is set
239
+ if @api_client.config.client_side_validation && task_create.nil?
240
+ raise ArgumentError, "Parameter `task_create` is required when calling `create_task_v1`."
241
+ end
242
+
243
+ path = "/1/tasks"
244
+ query_params = {}
245
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
246
+ header_params = {}
247
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
248
+
249
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_create)
250
+
251
+ new_options = request_options.merge(
252
+ :operation => :"IngestionClient.create_task_v1",
253
+ :header_params => header_params,
254
+ :query_params => query_params,
255
+ :body => post_body,
256
+ :use_read_transporter => false
257
+ )
258
+
259
+ @api_client.call_api(:POST, path, new_options)
260
+ end
261
+
262
+ # Creates a new task using the v1 endpoint, please use `createTask` instead.
263
+
264
+ # @param task_create [TaskCreateV1] Request body for creating a task. (required)
265
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
266
+ # @return [TaskCreateResponse]
267
+ def create_task_v1(task_create, request_options = {})
268
+ response = create_task_v1_with_http_info(task_create, request_options)
269
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskCreateResponse")
270
+ end
271
+
232
272
  # Creates a new transformation.
233
273
 
234
274
  # @param transformation_create [TransformationCreate] Request body for creating a transformation. (required)
@@ -609,7 +649,7 @@ module Algolia
609
649
  raise ArgumentError, "Parameter `task_id` is required when calling `delete_task`."
610
650
  end
611
651
 
612
- path = "/1/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
652
+ path = "/2/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
613
653
  query_params = {}
614
654
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
615
655
  header_params = {}
@@ -638,6 +678,46 @@ module Algolia
638
678
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
639
679
  end
640
680
 
681
+ # Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead.
682
+
683
+ # @param task_id [String] Unique identifier of a task. (required)
684
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
685
+ # @return [Http::Response] the response
686
+ def delete_task_v1_with_http_info(task_id, request_options = {})
687
+ # verify the required parameter 'task_id' is set
688
+ if @api_client.config.client_side_validation && task_id.nil?
689
+ raise ArgumentError, "Parameter `task_id` is required when calling `delete_task_v1`."
690
+ end
691
+
692
+ path = "/1/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
693
+ query_params = {}
694
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
695
+ header_params = {}
696
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
697
+
698
+ post_body = request_options[:debug_body]
699
+
700
+ new_options = request_options.merge(
701
+ :operation => :"IngestionClient.delete_task_v1",
702
+ :header_params => header_params,
703
+ :query_params => query_params,
704
+ :body => post_body,
705
+ :use_read_transporter => false
706
+ )
707
+
708
+ @api_client.call_api(:DELETE, path, new_options)
709
+ end
710
+
711
+ # Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead.
712
+
713
+ # @param task_id [String] Unique identifier of a task. (required)
714
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
715
+ # @return [DeleteResponse]
716
+ def delete_task_v1(task_id, request_options = {})
717
+ response = delete_task_v1_with_http_info(task_id, request_options)
718
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
719
+ end
720
+
641
721
  # Deletes a transformation by its ID.
642
722
 
643
723
  # @param transformation_id [String] Unique identifier of a transformation. (required)
@@ -696,7 +776,7 @@ module Algolia
696
776
  raise ArgumentError, "Parameter `task_id` is required when calling `disable_task`."
697
777
  end
698
778
 
699
- path = "/1/tasks/{taskID}/disable".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
779
+ path = "/2/tasks/{taskID}/disable".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
700
780
  query_params = {}
701
781
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
702
782
  header_params = {}
@@ -729,6 +809,54 @@ module Algolia
729
809
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
730
810
  end
731
811
 
812
+ # Disables a task using the v1 endpoint, please use `disableTask` instead.
813
+ #
814
+ # Required API Key ACLs:
815
+ # - addObject
816
+ # - deleteIndex
817
+ # - editSettings
818
+ # @param task_id [String] Unique identifier of a task. (required)
819
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
820
+ # @return [Http::Response] the response
821
+ def disable_task_v1_with_http_info(task_id, request_options = {})
822
+ # verify the required parameter 'task_id' is set
823
+ if @api_client.config.client_side_validation && task_id.nil?
824
+ raise ArgumentError, "Parameter `task_id` is required when calling `disable_task_v1`."
825
+ end
826
+
827
+ path = "/1/tasks/{taskID}/disable".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
828
+ query_params = {}
829
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
830
+ header_params = {}
831
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
832
+
833
+ post_body = request_options[:debug_body]
834
+
835
+ new_options = request_options.merge(
836
+ :operation => :"IngestionClient.disable_task_v1",
837
+ :header_params => header_params,
838
+ :query_params => query_params,
839
+ :body => post_body,
840
+ :use_read_transporter => false
841
+ )
842
+
843
+ @api_client.call_api(:PUT, path, new_options)
844
+ end
845
+
846
+ # Disables a task using the v1 endpoint, please use `disableTask` instead.
847
+ #
848
+ # Required API Key ACLs:
849
+ # - addObject
850
+ # - deleteIndex
851
+ # - editSettings
852
+ # @param task_id [String] Unique identifier of a task. (required)
853
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
854
+ # @return [TaskUpdateResponse]
855
+ def disable_task_v1(task_id, request_options = {})
856
+ response = disable_task_v1_with_http_info(task_id, request_options)
857
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
858
+ end
859
+
732
860
  # Enables a task.
733
861
  #
734
862
  # Required API Key ACLs:
@@ -744,7 +872,7 @@ module Algolia
744
872
  raise ArgumentError, "Parameter `task_id` is required when calling `enable_task`."
745
873
  end
746
874
 
747
- path = "/1/tasks/{taskID}/enable".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
875
+ path = "/2/tasks/{taskID}/enable".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
748
876
  query_params = {}
749
877
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
750
878
  header_params = {}
@@ -777,25 +905,22 @@ module Algolia
777
905
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
778
906
  end
779
907
 
780
- # Retrieves an authentication resource by its ID.
908
+ # Enables a task using the v1 endpoint, please use `enableTask` instead.
781
909
  #
782
910
  # Required API Key ACLs:
783
911
  # - addObject
784
912
  # - deleteIndex
785
913
  # - editSettings
786
- # @param authentication_id [String] Unique identifier of an authentication resource. (required)
914
+ # @param task_id [String] Unique identifier of a task. (required)
787
915
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
788
916
  # @return [Http::Response] the response
789
- def get_authentication_with_http_info(authentication_id, request_options = {})
790
- # verify the required parameter 'authentication_id' is set
791
- if @api_client.config.client_side_validation && authentication_id.nil?
792
- raise ArgumentError, "Parameter `authentication_id` is required when calling `get_authentication`."
917
+ def enable_task_v1_with_http_info(task_id, request_options = {})
918
+ # verify the required parameter 'task_id' is set
919
+ if @api_client.config.client_side_validation && task_id.nil?
920
+ raise ArgumentError, "Parameter `task_id` is required when calling `enable_task_v1`."
793
921
  end
794
922
 
795
- path = "/1/authentications/{authenticationID}".sub(
796
- "{" + "authenticationID" + "}",
797
- Transport.encode_uri(authentication_id.to_s)
798
- )
923
+ path = "/1/tasks/{taskID}/enable".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
799
924
  query_params = {}
800
925
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
801
926
  header_params = {}
@@ -804,82 +929,50 @@ module Algolia
804
929
  post_body = request_options[:debug_body]
805
930
 
806
931
  new_options = request_options.merge(
807
- :operation => :"IngestionClient.get_authentication",
932
+ :operation => :"IngestionClient.enable_task_v1",
808
933
  :header_params => header_params,
809
934
  :query_params => query_params,
810
935
  :body => post_body,
811
936
  :use_read_transporter => false
812
937
  )
813
938
 
814
- @api_client.call_api(:GET, path, new_options)
939
+ @api_client.call_api(:PUT, path, new_options)
815
940
  end
816
941
 
817
- # Retrieves an authentication resource by its ID.
942
+ # Enables a task using the v1 endpoint, please use `enableTask` instead.
818
943
  #
819
944
  # Required API Key ACLs:
820
945
  # - addObject
821
946
  # - deleteIndex
822
947
  # - editSettings
823
- # @param authentication_id [String] Unique identifier of an authentication resource. (required)
948
+ # @param task_id [String] Unique identifier of a task. (required)
824
949
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
825
- # @return [Authentication]
826
- def get_authentication(authentication_id, request_options = {})
827
- response = get_authentication_with_http_info(authentication_id, request_options)
828
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Authentication")
950
+ # @return [TaskUpdateResponse]
951
+ def enable_task_v1(task_id, request_options = {})
952
+ response = enable_task_v1_with_http_info(task_id, request_options)
953
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
829
954
  end
830
955
 
831
- # Retrieves a list of all authentication resources.
956
+ # Retrieves an authentication resource by its ID.
832
957
  #
833
958
  # Required API Key ACLs:
834
959
  # - addObject
835
960
  # - deleteIndex
836
961
  # - editSettings
837
- # @param items_per_page [Integer] Number of items per page. (default to 10)
838
- # @param page [Integer] Page number of the paginated API response.
839
- # @param type [Array<AuthenticationType>] Type of authentication resource to retrieve.
840
- # @param platform [Array<PlatformWithNone>] Ecommerce platform for which to retrieve authentication resources.
841
- # @param sort [AuthenticationSortKeys] Property by which to sort the list of authentication resources. (default to 'createdAt')
842
- # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
962
+ # @param authentication_id [String] Unique identifier of an authentication resource. (required)
843
963
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
844
964
  # @return [Http::Response] the response
845
- def get_authentications_with_http_info(
846
- items_per_page = nil,
847
- page = nil,
848
- type = nil,
849
- platform = nil,
850
- sort = nil,
851
- order = nil,
852
- request_options = {}
853
- )
854
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
855
- raise(
856
- ArgumentError,
857
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_authentications, must be smaller than or equal to 100."
858
- )
859
- end
860
-
861
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
862
- raise(
863
- ArgumentError,
864
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_authentications, must be greater than or equal to 1."
865
- )
866
- end
867
-
868
- if @api_client.config.client_side_validation && !page.nil? && page < 1
869
- raise(
870
- ArgumentError,
871
- "invalid value for \"\"page\"\" when calling IngestionClient.get_authentications, must be greater than or equal to 1."
872
- )
965
+ def get_authentication_with_http_info(authentication_id, request_options = {})
966
+ # verify the required parameter 'authentication_id' is set
967
+ if @api_client.config.client_side_validation && authentication_id.nil?
968
+ raise ArgumentError, "Parameter `authentication_id` is required when calling `get_authentication`."
873
969
  end
874
970
 
875
- path = "/1/authentications"
971
+ path = "/1/authentications/{authenticationID}".sub(
972
+ "{" + "authenticationID" + "}",
973
+ Transport.encode_uri(authentication_id.to_s)
974
+ )
876
975
  query_params = {}
877
- query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
878
- query_params[:page] = page unless page.nil?
879
- query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil?
880
- query_params[:platform] = @api_client.build_collection_param(platform, :csv) unless platform.nil?
881
- query_params[:sort] = sort unless sort.nil?
882
- query_params[:order] = order unless order.nil?
883
976
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
884
977
  header_params = {}
885
978
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -887,7 +980,7 @@ module Algolia
887
980
  post_body = request_options[:debug_body]
888
981
 
889
982
  new_options = request_options.merge(
890
- :operation => :"IngestionClient.get_authentications",
983
+ :operation => :"IngestionClient.get_authentication",
891
984
  :header_params => header_params,
892
985
  :query_params => query_params,
893
986
  :body => post_body,
@@ -897,34 +990,18 @@ module Algolia
897
990
  @api_client.call_api(:GET, path, new_options)
898
991
  end
899
992
 
900
- # Retrieves a list of all authentication resources.
993
+ # Retrieves an authentication resource by its ID.
901
994
  #
902
995
  # Required API Key ACLs:
903
996
  # - addObject
904
997
  # - deleteIndex
905
998
  # - editSettings
906
- # @param items_per_page [Integer] Number of items per page. (default to 10)
907
- # @param page [Integer] Page number of the paginated API response.
908
- # @param type [Array<AuthenticationType>] Type of authentication resource to retrieve.
909
- # @param platform [Array<PlatformWithNone>] Ecommerce platform for which to retrieve authentication resources.
910
- # @param sort [AuthenticationSortKeys] Property by which to sort the list of authentication resources. (default to 'createdAt')
911
- # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
999
+ # @param authentication_id [String] Unique identifier of an authentication resource. (required)
912
1000
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
913
- # @return [ListAuthenticationsResponse]
914
- def get_authentications(
915
- items_per_page = nil,
916
- page = nil,
917
- type = nil,
918
- platform = nil,
919
- sort = nil,
920
- order = nil,
921
- request_options = {}
922
- )
923
- response = get_authentications_with_http_info(items_per_page, page, type, platform, sort, order, request_options)
924
- @api_client.deserialize(
925
- response.body,
926
- request_options[:debug_return_type] || "Ingestion::ListAuthenticationsResponse"
927
- )
1001
+ # @return [Authentication]
1002
+ def get_authentication(authentication_id, request_options = {})
1003
+ response = get_authentication_with_http_info(authentication_id, request_options)
1004
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Authentication")
928
1005
  end
929
1006
 
930
1007
  # Retrieves a destination by its ID.
@@ -978,59 +1055,356 @@ module Algolia
978
1055
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Destination")
979
1056
  end
980
1057
 
981
- # Retrieves a list of destinations.
1058
+ # Retrieves a single task run event by its ID.
982
1059
  #
983
1060
  # Required API Key ACLs:
984
1061
  # - addObject
985
1062
  # - deleteIndex
986
1063
  # - editSettings
987
- # @param items_per_page [Integer] Number of items per page. (default to 10)
988
- # @param page [Integer] Page number of the paginated API response.
989
- # @param type [Array<DestinationType>] Destination type.
990
- # @param authentication_id [Array<String>] Authentication ID used by destinations.
991
- # @param sort [DestinationSortKeys] Property by which to sort the destinations. (default to 'createdAt')
992
- # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1064
+ # @param run_id [String] Unique identifier of a task run. (required)
1065
+ # @param event_id [String] Unique identifier of an event. (required)
993
1066
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
994
1067
  # @return [Http::Response] the response
995
- def get_destinations_with_http_info(
996
- items_per_page = nil,
997
- page = nil,
998
- type = nil,
999
- authentication_id = nil,
1000
- sort = nil,
1001
- order = nil,
1002
- request_options = {}
1003
- )
1004
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1005
- raise(
1006
- ArgumentError,
1007
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_destinations, must be smaller than or equal to 100."
1008
- )
1009
- end
1010
-
1011
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1012
- raise(
1013
- ArgumentError,
1014
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_destinations, must be greater than or equal to 1."
1015
- )
1068
+ def get_event_with_http_info(run_id, event_id, request_options = {})
1069
+ # verify the required parameter 'run_id' is set
1070
+ if @api_client.config.client_side_validation && run_id.nil?
1071
+ raise ArgumentError, "Parameter `run_id` is required when calling `get_event`."
1016
1072
  end
1017
-
1018
- if @api_client.config.client_side_validation && !page.nil? && page < 1
1019
- raise(
1020
- ArgumentError,
1021
- "invalid value for \"\"page\"\" when calling IngestionClient.get_destinations, must be greater than or equal to 1."
1022
- )
1073
+ # verify the required parameter 'event_id' is set
1074
+ if @api_client.config.client_side_validation && event_id.nil?
1075
+ raise ArgumentError, "Parameter `event_id` is required when calling `get_event`."
1023
1076
  end
1024
1077
 
1025
- path = "/1/destinations"
1078
+ path = "/1/runs/{runID}/events/{eventID}".sub("{" + "runID" + "}", Transport.encode_uri(run_id.to_s)).sub(
1079
+ "{" + "eventID" + "}",
1080
+ Transport.encode_uri(event_id.to_s)
1081
+ )
1026
1082
  query_params = {}
1027
- query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
1028
- query_params[:page] = page unless page.nil?
1029
- query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil?
1030
- unless authentication_id.nil?
1031
- query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv)
1083
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1084
+ header_params = {}
1085
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
1086
+
1087
+ post_body = request_options[:debug_body]
1088
+
1089
+ new_options = request_options.merge(
1090
+ :operation => :"IngestionClient.get_event",
1091
+ :header_params => header_params,
1092
+ :query_params => query_params,
1093
+ :body => post_body,
1094
+ :use_read_transporter => false
1095
+ )
1096
+
1097
+ @api_client.call_api(:GET, path, new_options)
1098
+ end
1099
+
1100
+ # Retrieves a single task run event by its ID.
1101
+ #
1102
+ # Required API Key ACLs:
1103
+ # - addObject
1104
+ # - deleteIndex
1105
+ # - editSettings
1106
+ # @param run_id [String] Unique identifier of a task run. (required)
1107
+ # @param event_id [String] Unique identifier of an event. (required)
1108
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1109
+ # @return [Event]
1110
+ def get_event(run_id, event_id, request_options = {})
1111
+ response = get_event_with_http_info(run_id, event_id, request_options)
1112
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Event")
1113
+ end
1114
+
1115
+ # Retrieve a single task run by its ID.
1116
+ #
1117
+ # Required API Key ACLs:
1118
+ # - addObject
1119
+ # - deleteIndex
1120
+ # - editSettings
1121
+ # @param run_id [String] Unique identifier of a task run. (required)
1122
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1123
+ # @return [Http::Response] the response
1124
+ def get_run_with_http_info(run_id, request_options = {})
1125
+ # verify the required parameter 'run_id' is set
1126
+ if @api_client.config.client_side_validation && run_id.nil?
1127
+ raise ArgumentError, "Parameter `run_id` is required when calling `get_run`."
1128
+ end
1129
+
1130
+ path = "/1/runs/{runID}".sub("{" + "runID" + "}", Transport.encode_uri(run_id.to_s))
1131
+ query_params = {}
1132
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1133
+ header_params = {}
1134
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
1135
+
1136
+ post_body = request_options[:debug_body]
1137
+
1138
+ new_options = request_options.merge(
1139
+ :operation => :"IngestionClient.get_run",
1140
+ :header_params => header_params,
1141
+ :query_params => query_params,
1142
+ :body => post_body,
1143
+ :use_read_transporter => false
1144
+ )
1145
+
1146
+ @api_client.call_api(:GET, path, new_options)
1147
+ end
1148
+
1149
+ # Retrieve a single task run by its ID.
1150
+ #
1151
+ # Required API Key ACLs:
1152
+ # - addObject
1153
+ # - deleteIndex
1154
+ # - editSettings
1155
+ # @param run_id [String] Unique identifier of a task run. (required)
1156
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1157
+ # @return [Run]
1158
+ def get_run(run_id, request_options = {})
1159
+ response = get_run_with_http_info(run_id, request_options)
1160
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Run")
1161
+ end
1162
+
1163
+ # Retrieve a source by its ID.
1164
+ #
1165
+ # Required API Key ACLs:
1166
+ # - addObject
1167
+ # - deleteIndex
1168
+ # - editSettings
1169
+ # @param source_id [String] Unique identifier of a source. (required)
1170
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1171
+ # @return [Http::Response] the response
1172
+ def get_source_with_http_info(source_id, request_options = {})
1173
+ # verify the required parameter 'source_id' is set
1174
+ if @api_client.config.client_side_validation && source_id.nil?
1175
+ raise ArgumentError, "Parameter `source_id` is required when calling `get_source`."
1176
+ end
1177
+
1178
+ path = "/1/sources/{sourceID}".sub("{" + "sourceID" + "}", Transport.encode_uri(source_id.to_s))
1179
+ query_params = {}
1180
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1181
+ header_params = {}
1182
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
1183
+
1184
+ post_body = request_options[:debug_body]
1185
+
1186
+ new_options = request_options.merge(
1187
+ :operation => :"IngestionClient.get_source",
1188
+ :header_params => header_params,
1189
+ :query_params => query_params,
1190
+ :body => post_body,
1191
+ :use_read_transporter => false
1192
+ )
1193
+
1194
+ @api_client.call_api(:GET, path, new_options)
1195
+ end
1196
+
1197
+ # Retrieve a source by its ID.
1198
+ #
1199
+ # Required API Key ACLs:
1200
+ # - addObject
1201
+ # - deleteIndex
1202
+ # - editSettings
1203
+ # @param source_id [String] Unique identifier of a source. (required)
1204
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1205
+ # @return [Source]
1206
+ def get_source(source_id, request_options = {})
1207
+ response = get_source_with_http_info(source_id, request_options)
1208
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Source")
1209
+ end
1210
+
1211
+ # Retrieves a task by its ID.
1212
+ #
1213
+ # Required API Key ACLs:
1214
+ # - addObject
1215
+ # - deleteIndex
1216
+ # - editSettings
1217
+ # @param task_id [String] Unique identifier of a task. (required)
1218
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1219
+ # @return [Http::Response] the response
1220
+ def get_task_with_http_info(task_id, request_options = {})
1221
+ # verify the required parameter 'task_id' is set
1222
+ if @api_client.config.client_side_validation && task_id.nil?
1223
+ raise ArgumentError, "Parameter `task_id` is required when calling `get_task`."
1224
+ end
1225
+
1226
+ path = "/2/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
1227
+ query_params = {}
1228
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1229
+ header_params = {}
1230
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
1231
+
1232
+ post_body = request_options[:debug_body]
1233
+
1234
+ new_options = request_options.merge(
1235
+ :operation => :"IngestionClient.get_task",
1236
+ :header_params => header_params,
1237
+ :query_params => query_params,
1238
+ :body => post_body,
1239
+ :use_read_transporter => false
1240
+ )
1241
+
1242
+ @api_client.call_api(:GET, path, new_options)
1243
+ end
1244
+
1245
+ # Retrieves a task by its ID.
1246
+ #
1247
+ # Required API Key ACLs:
1248
+ # - addObject
1249
+ # - deleteIndex
1250
+ # - editSettings
1251
+ # @param task_id [String] Unique identifier of a task. (required)
1252
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1253
+ # @return [Task]
1254
+ def get_task(task_id, request_options = {})
1255
+ response = get_task_with_http_info(task_id, request_options)
1256
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Task")
1257
+ end
1258
+
1259
+ # Retrieves a task by its ID using the v1 endpoint, please use &#x60;getTask&#x60; instead.
1260
+ #
1261
+ # Required API Key ACLs:
1262
+ # - addObject
1263
+ # - deleteIndex
1264
+ # - editSettings
1265
+ # @param task_id [String] Unique identifier of a task. (required)
1266
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1267
+ # @return [Http::Response] the response
1268
+ def get_task_v1_with_http_info(task_id, request_options = {})
1269
+ # verify the required parameter 'task_id' is set
1270
+ if @api_client.config.client_side_validation && task_id.nil?
1271
+ raise ArgumentError, "Parameter `task_id` is required when calling `get_task_v1`."
1272
+ end
1273
+
1274
+ path = "/1/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
1275
+ query_params = {}
1276
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1277
+ header_params = {}
1278
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
1279
+
1280
+ post_body = request_options[:debug_body]
1281
+
1282
+ new_options = request_options.merge(
1283
+ :operation => :"IngestionClient.get_task_v1",
1284
+ :header_params => header_params,
1285
+ :query_params => query_params,
1286
+ :body => post_body,
1287
+ :use_read_transporter => false
1288
+ )
1289
+
1290
+ @api_client.call_api(:GET, path, new_options)
1291
+ end
1292
+
1293
+ # Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.
1294
+ #
1295
+ # Required API Key ACLs:
1296
+ # - addObject
1297
+ # - deleteIndex
1298
+ # - editSettings
1299
+ # @param task_id [String] Unique identifier of a task. (required)
1300
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1301
+ # @return [TaskV1]
1302
+ def get_task_v1(task_id, request_options = {})
1303
+ response = get_task_v1_with_http_info(task_id, request_options)
1304
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskV1")
1305
+ end
1306
+
1307
+ # Retrieves a transformation by its ID.
1308
+ #
1309
+ # Required API Key ACLs:
1310
+ # - addObject
1311
+ # - deleteIndex
1312
+ # - editSettings
1313
+ # @param transformation_id [String] Unique identifier of a transformation. (required)
1314
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1315
+ # @return [Http::Response] the response
1316
+ def get_transformation_with_http_info(transformation_id, request_options = {})
1317
+ # verify the required parameter 'transformation_id' is set
1318
+ if @api_client.config.client_side_validation && transformation_id.nil?
1319
+ raise ArgumentError, "Parameter `transformation_id` is required when calling `get_transformation`."
1032
1320
  end
1033
1321
 
1322
+ path = "/1/transformations/{transformationID}".sub(
1323
+ "{" + "transformationID" + "}",
1324
+ Transport.encode_uri(transformation_id.to_s)
1325
+ )
1326
+ query_params = {}
1327
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1328
+ header_params = {}
1329
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
1330
+
1331
+ post_body = request_options[:debug_body]
1332
+
1333
+ new_options = request_options.merge(
1334
+ :operation => :"IngestionClient.get_transformation",
1335
+ :header_params => header_params,
1336
+ :query_params => query_params,
1337
+ :body => post_body,
1338
+ :use_read_transporter => false
1339
+ )
1340
+
1341
+ @api_client.call_api(:GET, path, new_options)
1342
+ end
1343
+
1344
+ # Retrieves a transformation by its ID.
1345
+ #
1346
+ # Required API Key ACLs:
1347
+ # - addObject
1348
+ # - deleteIndex
1349
+ # - editSettings
1350
+ # @param transformation_id [String] Unique identifier of a transformation. (required)
1351
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1352
+ # @return [Transformation]
1353
+ def get_transformation(transformation_id, request_options = {})
1354
+ response = get_transformation_with_http_info(transformation_id, request_options)
1355
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Transformation")
1356
+ end
1357
+
1358
+ # Retrieves a list of all authentication resources.
1359
+ #
1360
+ # Required API Key ACLs:
1361
+ # - addObject
1362
+ # - deleteIndex
1363
+ # - editSettings
1364
+ # @param items_per_page [Integer] Number of items per page. (default to 10)
1365
+ # @param page [Integer] Page number of the paginated API response.
1366
+ # @param type [Array<AuthenticationType>] Type of authentication resource to retrieve.
1367
+ # @param platform [Array<PlatformWithNone>] Ecommerce platform for which to retrieve authentication resources.
1368
+ # @param sort [AuthenticationSortKeys] Property by which to sort the list of authentication resources. (default to 'createdAt')
1369
+ # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1370
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1371
+ # @return [Http::Response] the response
1372
+ def list_authentications_with_http_info(
1373
+ items_per_page = nil,
1374
+ page = nil,
1375
+ type = nil,
1376
+ platform = nil,
1377
+ sort = nil,
1378
+ order = nil,
1379
+ request_options = {}
1380
+ )
1381
+ if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1382
+ raise(
1383
+ ArgumentError,
1384
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_authentications, must be smaller than or equal to 100."
1385
+ )
1386
+ end
1387
+
1388
+ if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1389
+ raise(
1390
+ ArgumentError,
1391
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_authentications, must be greater than or equal to 1."
1392
+ )
1393
+ end
1394
+
1395
+ if @api_client.config.client_side_validation && !page.nil? && page < 1
1396
+ raise(
1397
+ ArgumentError,
1398
+ "invalid value for \"\"page\"\" when calling IngestionClient.list_authentications, must be greater than or equal to 1."
1399
+ )
1400
+ end
1401
+
1402
+ path = "/1/authentications"
1403
+ query_params = {}
1404
+ query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
1405
+ query_params[:page] = page unless page.nil?
1406
+ query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil?
1407
+ query_params[:platform] = @api_client.build_collection_param(platform, :csv) unless platform.nil?
1034
1408
  query_params[:sort] = sort unless sort.nil?
1035
1409
  query_params[:order] = order unless order.nil?
1036
1410
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -1040,7 +1414,7 @@ module Algolia
1040
1414
  post_body = request_options[:debug_body]
1041
1415
 
1042
1416
  new_options = request_options.merge(
1043
- :operation => :"IngestionClient.get_destinations",
1417
+ :operation => :"IngestionClient.list_authentications",
1044
1418
  :header_params => header_params,
1045
1419
  :query_params => query_params,
1046
1420
  :body => post_body,
@@ -1050,7 +1424,7 @@ module Algolia
1050
1424
  @api_client.call_api(:GET, path, new_options)
1051
1425
  end
1052
1426
 
1053
- # Retrieves a list of destinations.
1427
+ # Retrieves a list of all authentication resources.
1054
1428
  #
1055
1429
  # Required API Key ACLs:
1056
1430
  # - addObject
@@ -1058,61 +1432,83 @@ module Algolia
1058
1432
  # - editSettings
1059
1433
  # @param items_per_page [Integer] Number of items per page. (default to 10)
1060
1434
  # @param page [Integer] Page number of the paginated API response.
1061
- # @param type [Array<DestinationType>] Destination type.
1062
- # @param authentication_id [Array<String>] Authentication ID used by destinations.
1063
- # @param sort [DestinationSortKeys] Property by which to sort the destinations. (default to 'createdAt')
1435
+ # @param type [Array<AuthenticationType>] Type of authentication resource to retrieve.
1436
+ # @param platform [Array<PlatformWithNone>] Ecommerce platform for which to retrieve authentication resources.
1437
+ # @param sort [AuthenticationSortKeys] Property by which to sort the list of authentication resources. (default to 'createdAt')
1064
1438
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1065
1439
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1066
- # @return [ListDestinationsResponse]
1067
- def get_destinations(
1440
+ # @return [ListAuthenticationsResponse]
1441
+ def list_authentications(
1068
1442
  items_per_page = nil,
1069
1443
  page = nil,
1070
1444
  type = nil,
1071
- authentication_id = nil,
1445
+ platform = nil,
1072
1446
  sort = nil,
1073
1447
  order = nil,
1074
1448
  request_options = {}
1075
1449
  )
1076
- response = get_destinations_with_http_info(
1077
- items_per_page,
1078
- page,
1079
- type,
1080
- authentication_id,
1081
- sort,
1082
- order,
1083
- request_options
1084
- )
1450
+ response = list_authentications_with_http_info(items_per_page, page, type, platform, sort, order, request_options)
1085
1451
  @api_client.deserialize(
1086
1452
  response.body,
1087
- request_options[:debug_return_type] || "Ingestion::ListDestinationsResponse"
1453
+ request_options[:debug_return_type] || "Ingestion::ListAuthenticationsResponse"
1088
1454
  )
1089
1455
  end
1090
1456
 
1091
- # Retrieves a single task run event by its ID.
1457
+ # Retrieves a list of destinations.
1092
1458
  #
1093
1459
  # Required API Key ACLs:
1094
1460
  # - addObject
1095
1461
  # - deleteIndex
1096
1462
  # - editSettings
1097
- # @param run_id [String] Unique identifier of a task run. (required)
1098
- # @param event_id [String] Unique identifier of an event. (required)
1463
+ # @param items_per_page [Integer] Number of items per page. (default to 10)
1464
+ # @param page [Integer] Page number of the paginated API response.
1465
+ # @param type [Array<DestinationType>] Destination type.
1466
+ # @param authentication_id [Array<String>] Authentication ID used by destinations.
1467
+ # @param sort [DestinationSortKeys] Property by which to sort the destinations. (default to 'createdAt')
1468
+ # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1099
1469
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1100
1470
  # @return [Http::Response] the response
1101
- def get_event_with_http_info(run_id, event_id, request_options = {})
1102
- # verify the required parameter 'run_id' is set
1103
- if @api_client.config.client_side_validation && run_id.nil?
1104
- raise ArgumentError, "Parameter `run_id` is required when calling `get_event`."
1471
+ def list_destinations_with_http_info(
1472
+ items_per_page = nil,
1473
+ page = nil,
1474
+ type = nil,
1475
+ authentication_id = nil,
1476
+ sort = nil,
1477
+ order = nil,
1478
+ request_options = {}
1479
+ )
1480
+ if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1481
+ raise(
1482
+ ArgumentError,
1483
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_destinations, must be smaller than or equal to 100."
1484
+ )
1105
1485
  end
1106
- # verify the required parameter 'event_id' is set
1107
- if @api_client.config.client_side_validation && event_id.nil?
1108
- raise ArgumentError, "Parameter `event_id` is required when calling `get_event`."
1486
+
1487
+ if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1488
+ raise(
1489
+ ArgumentError,
1490
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_destinations, must be greater than or equal to 1."
1491
+ )
1109
1492
  end
1110
1493
 
1111
- path = "/1/runs/{runID}/events/{eventID}".sub("{" + "runID" + "}", Transport.encode_uri(run_id.to_s)).sub(
1112
- "{" + "eventID" + "}",
1113
- Transport.encode_uri(event_id.to_s)
1114
- )
1494
+ if @api_client.config.client_side_validation && !page.nil? && page < 1
1495
+ raise(
1496
+ ArgumentError,
1497
+ "invalid value for \"\"page\"\" when calling IngestionClient.list_destinations, must be greater than or equal to 1."
1498
+ )
1499
+ end
1500
+
1501
+ path = "/1/destinations"
1115
1502
  query_params = {}
1503
+ query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
1504
+ query_params[:page] = page unless page.nil?
1505
+ query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil?
1506
+ unless authentication_id.nil?
1507
+ query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv)
1508
+ end
1509
+
1510
+ query_params[:sort] = sort unless sort.nil?
1511
+ query_params[:order] = order unless order.nil?
1116
1512
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1117
1513
  header_params = {}
1118
1514
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -1120,7 +1516,7 @@ module Algolia
1120
1516
  post_body = request_options[:debug_body]
1121
1517
 
1122
1518
  new_options = request_options.merge(
1123
- :operation => :"IngestionClient.get_event",
1519
+ :operation => :"IngestionClient.list_destinations",
1124
1520
  :header_params => header_params,
1125
1521
  :query_params => query_params,
1126
1522
  :body => post_body,
@@ -1130,19 +1526,42 @@ module Algolia
1130
1526
  @api_client.call_api(:GET, path, new_options)
1131
1527
  end
1132
1528
 
1133
- # Retrieves a single task run event by its ID.
1529
+ # Retrieves a list of destinations.
1134
1530
  #
1135
1531
  # Required API Key ACLs:
1136
1532
  # - addObject
1137
1533
  # - deleteIndex
1138
1534
  # - editSettings
1139
- # @param run_id [String] Unique identifier of a task run. (required)
1140
- # @param event_id [String] Unique identifier of an event. (required)
1535
+ # @param items_per_page [Integer] Number of items per page. (default to 10)
1536
+ # @param page [Integer] Page number of the paginated API response.
1537
+ # @param type [Array<DestinationType>] Destination type.
1538
+ # @param authentication_id [Array<String>] Authentication ID used by destinations.
1539
+ # @param sort [DestinationSortKeys] Property by which to sort the destinations. (default to 'createdAt')
1540
+ # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1141
1541
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1142
- # @return [Event]
1143
- def get_event(run_id, event_id, request_options = {})
1144
- response = get_event_with_http_info(run_id, event_id, request_options)
1145
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Event")
1542
+ # @return [ListDestinationsResponse]
1543
+ def list_destinations(
1544
+ items_per_page = nil,
1545
+ page = nil,
1546
+ type = nil,
1547
+ authentication_id = nil,
1548
+ sort = nil,
1549
+ order = nil,
1550
+ request_options = {}
1551
+ )
1552
+ response = list_destinations_with_http_info(
1553
+ items_per_page,
1554
+ page,
1555
+ type,
1556
+ authentication_id,
1557
+ sort,
1558
+ order,
1559
+ request_options
1560
+ )
1561
+ @api_client.deserialize(
1562
+ response.body,
1563
+ request_options[:debug_return_type] || "Ingestion::ListDestinationsResponse"
1564
+ )
1146
1565
  end
1147
1566
 
1148
1567
  # Retrieves a list of events for a task run, identified by it&#39;s ID.
@@ -1162,7 +1581,7 @@ module Algolia
1162
1581
  # @param end_date [String] Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
1163
1582
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1164
1583
  # @return [Http::Response] the response
1165
- def get_events_with_http_info(
1584
+ def list_events_with_http_info(
1166
1585
  run_id,
1167
1586
  items_per_page = nil,
1168
1587
  page = nil,
@@ -1176,27 +1595,27 @@ module Algolia
1176
1595
  )
1177
1596
  # verify the required parameter 'run_id' is set
1178
1597
  if @api_client.config.client_side_validation && run_id.nil?
1179
- raise ArgumentError, "Parameter `run_id` is required when calling `get_events`."
1598
+ raise ArgumentError, "Parameter `run_id` is required when calling `list_events`."
1180
1599
  end
1181
1600
 
1182
1601
  if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1183
1602
  raise(
1184
1603
  ArgumentError,
1185
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_events, must be smaller than or equal to 100."
1604
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_events, must be smaller than or equal to 100."
1186
1605
  )
1187
1606
  end
1188
1607
 
1189
1608
  if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1190
1609
  raise(
1191
1610
  ArgumentError,
1192
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_events, must be greater than or equal to 1."
1611
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_events, must be greater than or equal to 1."
1193
1612
  )
1194
1613
  end
1195
1614
 
1196
1615
  if @api_client.config.client_side_validation && !page.nil? && page < 1
1197
1616
  raise(
1198
1617
  ArgumentError,
1199
- "invalid value for \"\"page\"\" when calling IngestionClient.get_events, must be greater than or equal to 1."
1618
+ "invalid value for \"\"page\"\" when calling IngestionClient.list_events, must be greater than or equal to 1."
1200
1619
  )
1201
1620
  end
1202
1621
 
@@ -1217,7 +1636,7 @@ module Algolia
1217
1636
  post_body = request_options[:debug_body]
1218
1637
 
1219
1638
  new_options = request_options.merge(
1220
- :operation => :"IngestionClient.get_events",
1639
+ :operation => :"IngestionClient.list_events",
1221
1640
  :header_params => header_params,
1222
1641
  :query_params => query_params,
1223
1642
  :body => post_body,
@@ -1244,7 +1663,7 @@ module Algolia
1244
1663
  # @param end_date [String] Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
1245
1664
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1246
1665
  # @return [ListEventsResponse]
1247
- def get_events(
1666
+ def list_events(
1248
1667
  run_id,
1249
1668
  items_per_page = nil,
1250
1669
  page = nil,
@@ -1256,7 +1675,7 @@ module Algolia
1256
1675
  end_date = nil,
1257
1676
  request_options = {}
1258
1677
  )
1259
- response = get_events_with_http_info(
1678
+ response = list_events_with_http_info(
1260
1679
  run_id,
1261
1680
  items_per_page,
1262
1681
  page,
@@ -1271,54 +1690,6 @@ module Algolia
1271
1690
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::ListEventsResponse")
1272
1691
  end
1273
1692
 
1274
- # Retrieve a single task run by its ID.
1275
- #
1276
- # Required API Key ACLs:
1277
- # - addObject
1278
- # - deleteIndex
1279
- # - editSettings
1280
- # @param run_id [String] Unique identifier of a task run. (required)
1281
- # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1282
- # @return [Http::Response] the response
1283
- def get_run_with_http_info(run_id, request_options = {})
1284
- # verify the required parameter 'run_id' is set
1285
- if @api_client.config.client_side_validation && run_id.nil?
1286
- raise ArgumentError, "Parameter `run_id` is required when calling `get_run`."
1287
- end
1288
-
1289
- path = "/1/runs/{runID}".sub("{" + "runID" + "}", Transport.encode_uri(run_id.to_s))
1290
- query_params = {}
1291
- query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1292
- header_params = {}
1293
- header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
1294
-
1295
- post_body = request_options[:debug_body]
1296
-
1297
- new_options = request_options.merge(
1298
- :operation => :"IngestionClient.get_run",
1299
- :header_params => header_params,
1300
- :query_params => query_params,
1301
- :body => post_body,
1302
- :use_read_transporter => false
1303
- )
1304
-
1305
- @api_client.call_api(:GET, path, new_options)
1306
- end
1307
-
1308
- # Retrieve a single task run by its ID.
1309
- #
1310
- # Required API Key ACLs:
1311
- # - addObject
1312
- # - deleteIndex
1313
- # - editSettings
1314
- # @param run_id [String] Unique identifier of a task run. (required)
1315
- # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1316
- # @return [Run]
1317
- def get_run(run_id, request_options = {})
1318
- response = get_run_with_http_info(run_id, request_options)
1319
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Run")
1320
- end
1321
-
1322
1693
  # Retrieve a list of task runs.
1323
1694
  #
1324
1695
  # Required API Key ACLs:
@@ -1335,7 +1706,7 @@ module Algolia
1335
1706
  # @param end_date [String] Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.
1336
1707
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1337
1708
  # @return [Http::Response] the response
1338
- def get_runs_with_http_info(
1709
+ def list_runs_with_http_info(
1339
1710
  items_per_page = nil,
1340
1711
  page = nil,
1341
1712
  status = nil,
@@ -1349,21 +1720,21 @@ module Algolia
1349
1720
  if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1350
1721
  raise(
1351
1722
  ArgumentError,
1352
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_runs, must be smaller than or equal to 100."
1723
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_runs, must be smaller than or equal to 100."
1353
1724
  )
1354
1725
  end
1355
1726
 
1356
1727
  if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1357
1728
  raise(
1358
1729
  ArgumentError,
1359
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_runs, must be greater than or equal to 1."
1730
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_runs, must be greater than or equal to 1."
1360
1731
  )
1361
1732
  end
1362
1733
 
1363
1734
  if @api_client.config.client_side_validation && !page.nil? && page < 1
1364
1735
  raise(
1365
1736
  ArgumentError,
1366
- "invalid value for \"\"page\"\" when calling IngestionClient.get_runs, must be greater than or equal to 1."
1737
+ "invalid value for \"\"page\"\" when calling IngestionClient.list_runs, must be greater than or equal to 1."
1367
1738
  )
1368
1739
  end
1369
1740
 
@@ -1384,7 +1755,7 @@ module Algolia
1384
1755
  post_body = request_options[:debug_body]
1385
1756
 
1386
1757
  new_options = request_options.merge(
1387
- :operation => :"IngestionClient.get_runs",
1758
+ :operation => :"IngestionClient.list_runs",
1388
1759
  :header_params => header_params,
1389
1760
  :query_params => query_params,
1390
1761
  :body => post_body,
@@ -1410,7 +1781,7 @@ module Algolia
1410
1781
  # @param end_date [String] Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.
1411
1782
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1412
1783
  # @return [RunListResponse]
1413
- def get_runs(
1784
+ def list_runs(
1414
1785
  items_per_page = nil,
1415
1786
  page = nil,
1416
1787
  status = nil,
@@ -1421,7 +1792,7 @@ module Algolia
1421
1792
  end_date = nil,
1422
1793
  request_options = {}
1423
1794
  )
1424
- response = get_runs_with_http_info(
1795
+ response = list_runs_with_http_info(
1425
1796
  items_per_page,
1426
1797
  page,
1427
1798
  status,
@@ -1435,54 +1806,6 @@ module Algolia
1435
1806
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunListResponse")
1436
1807
  end
1437
1808
 
1438
- # Retrieve a source by its ID.
1439
- #
1440
- # Required API Key ACLs:
1441
- # - addObject
1442
- # - deleteIndex
1443
- # - editSettings
1444
- # @param source_id [String] Unique identifier of a source. (required)
1445
- # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1446
- # @return [Http::Response] the response
1447
- def get_source_with_http_info(source_id, request_options = {})
1448
- # verify the required parameter 'source_id' is set
1449
- if @api_client.config.client_side_validation && source_id.nil?
1450
- raise ArgumentError, "Parameter `source_id` is required when calling `get_source`."
1451
- end
1452
-
1453
- path = "/1/sources/{sourceID}".sub("{" + "sourceID" + "}", Transport.encode_uri(source_id.to_s))
1454
- query_params = {}
1455
- query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1456
- header_params = {}
1457
- header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
1458
-
1459
- post_body = request_options[:debug_body]
1460
-
1461
- new_options = request_options.merge(
1462
- :operation => :"IngestionClient.get_source",
1463
- :header_params => header_params,
1464
- :query_params => query_params,
1465
- :body => post_body,
1466
- :use_read_transporter => false
1467
- )
1468
-
1469
- @api_client.call_api(:GET, path, new_options)
1470
- end
1471
-
1472
- # Retrieve a source by its ID.
1473
- #
1474
- # Required API Key ACLs:
1475
- # - addObject
1476
- # - deleteIndex
1477
- # - editSettings
1478
- # @param source_id [String] Unique identifier of a source. (required)
1479
- # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1480
- # @return [Source]
1481
- def get_source(source_id, request_options = {})
1482
- response = get_source_with_http_info(source_id, request_options)
1483
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Source")
1484
- end
1485
-
1486
1809
  # Retrieves a list of sources.
1487
1810
  #
1488
1811
  # Required API Key ACLs:
@@ -1497,7 +1820,7 @@ module Algolia
1497
1820
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1498
1821
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1499
1822
  # @return [Http::Response] the response
1500
- def get_sources_with_http_info(
1823
+ def list_sources_with_http_info(
1501
1824
  items_per_page = nil,
1502
1825
  page = nil,
1503
1826
  type = nil,
@@ -1509,21 +1832,21 @@ module Algolia
1509
1832
  if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1510
1833
  raise(
1511
1834
  ArgumentError,
1512
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_sources, must be smaller than or equal to 100."
1835
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_sources, must be smaller than or equal to 100."
1513
1836
  )
1514
1837
  end
1515
1838
 
1516
1839
  if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1517
1840
  raise(
1518
1841
  ArgumentError,
1519
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_sources, must be greater than or equal to 1."
1842
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_sources, must be greater than or equal to 1."
1520
1843
  )
1521
1844
  end
1522
1845
 
1523
1846
  if @api_client.config.client_side_validation && !page.nil? && page < 1
1524
1847
  raise(
1525
1848
  ArgumentError,
1526
- "invalid value for \"\"page\"\" when calling IngestionClient.get_sources, must be greater than or equal to 1."
1849
+ "invalid value for \"\"page\"\" when calling IngestionClient.list_sources, must be greater than or equal to 1."
1527
1850
  )
1528
1851
  end
1529
1852
 
@@ -1545,7 +1868,7 @@ module Algolia
1545
1868
  post_body = request_options[:debug_body]
1546
1869
 
1547
1870
  new_options = request_options.merge(
1548
- :operation => :"IngestionClient.get_sources",
1871
+ :operation => :"IngestionClient.list_sources",
1549
1872
  :header_params => header_params,
1550
1873
  :query_params => query_params,
1551
1874
  :body => post_body,
@@ -1569,7 +1892,7 @@ module Algolia
1569
1892
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1570
1893
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1571
1894
  # @return [ListSourcesResponse]
1572
- def get_sources(
1895
+ def list_sources(
1573
1896
  items_per_page = nil,
1574
1897
  page = nil,
1575
1898
  type = nil,
@@ -1578,27 +1901,82 @@ module Algolia
1578
1901
  order = nil,
1579
1902
  request_options = {}
1580
1903
  )
1581
- response = get_sources_with_http_info(items_per_page, page, type, authentication_id, sort, order, request_options)
1904
+ response = list_sources_with_http_info(
1905
+ items_per_page,
1906
+ page,
1907
+ type,
1908
+ authentication_id,
1909
+ sort,
1910
+ order,
1911
+ request_options
1912
+ )
1582
1913
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::ListSourcesResponse")
1583
1914
  end
1584
1915
 
1585
- # Retrieves a task by its ID.
1586
- #
1587
- # Required API Key ACLs:
1588
- # - addObject
1589
- # - deleteIndex
1590
- # - editSettings
1591
- # @param task_id [String] Unique identifier of a task. (required)
1592
- # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1593
- # @return [Http::Response] the response
1594
- def get_task_with_http_info(task_id, request_options = {})
1595
- # verify the required parameter 'task_id' is set
1596
- if @api_client.config.client_side_validation && task_id.nil?
1597
- raise ArgumentError, "Parameter `task_id` is required when calling `get_task`."
1916
+ # Retrieves a list of tasks.
1917
+ #
1918
+ # Required API Key ACLs:
1919
+ # - addObject
1920
+ # - deleteIndex
1921
+ # - editSettings
1922
+ # @param items_per_page [Integer] Number of items per page. (default to 10)
1923
+ # @param page [Integer] Page number of the paginated API response.
1924
+ # @param action [Array<ActionType>] Actions for filtering the list of tasks.
1925
+ # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
1926
+ # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
1927
+ # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
1928
+ # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
1929
+ # @param sort [TaskSortKeys] Property by which to sort the list of tasks. (default to 'createdAt')
1930
+ # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1931
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1932
+ # @return [Http::Response] the response
1933
+ def list_tasks_with_http_info(
1934
+ items_per_page = nil,
1935
+ page = nil,
1936
+ action = nil,
1937
+ enabled = nil,
1938
+ source_id = nil,
1939
+ destination_id = nil,
1940
+ trigger_type = nil,
1941
+ sort = nil,
1942
+ order = nil,
1943
+ request_options = {}
1944
+ )
1945
+ if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1946
+ raise(
1947
+ ArgumentError,
1948
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_tasks, must be smaller than or equal to 100."
1949
+ )
1950
+ end
1951
+
1952
+ if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1953
+ raise(
1954
+ ArgumentError,
1955
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_tasks, must be greater than or equal to 1."
1956
+ )
1957
+ end
1958
+
1959
+ if @api_client.config.client_side_validation && !page.nil? && page < 1
1960
+ raise(
1961
+ ArgumentError,
1962
+ "invalid value for \"\"page\"\" when calling IngestionClient.list_tasks, must be greater than or equal to 1."
1963
+ )
1598
1964
  end
1599
1965
 
1600
- path = "/1/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
1966
+ path = "/2/tasks"
1601
1967
  query_params = {}
1968
+ query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
1969
+ query_params[:page] = page unless page.nil?
1970
+ query_params[:action] = @api_client.build_collection_param(action, :csv) unless action.nil?
1971
+ query_params[:enabled] = enabled unless enabled.nil?
1972
+ query_params[:sourceID] = @api_client.build_collection_param(source_id, :csv) unless source_id.nil?
1973
+ unless destination_id.nil?
1974
+ query_params[:destinationID] = @api_client.build_collection_param(destination_id, :csv)
1975
+ end
1976
+
1977
+ query_params[:triggerType] = @api_client.build_collection_param(trigger_type, :csv) unless trigger_type.nil?
1978
+ query_params[:sort] = sort unless sort.nil?
1979
+ query_params[:order] = order unless order.nil?
1602
1980
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1603
1981
  header_params = {}
1604
1982
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -1606,7 +1984,7 @@ module Algolia
1606
1984
  post_body = request_options[:debug_body]
1607
1985
 
1608
1986
  new_options = request_options.merge(
1609
- :operation => :"IngestionClient.get_task",
1987
+ :operation => :"IngestionClient.list_tasks",
1610
1988
  :header_params => header_params,
1611
1989
  :query_params => query_params,
1612
1990
  :body => post_body,
@@ -1616,21 +1994,51 @@ module Algolia
1616
1994
  @api_client.call_api(:GET, path, new_options)
1617
1995
  end
1618
1996
 
1619
- # Retrieves a task by its ID.
1997
+ # Retrieves a list of tasks.
1620
1998
  #
1621
1999
  # Required API Key ACLs:
1622
2000
  # - addObject
1623
2001
  # - deleteIndex
1624
2002
  # - editSettings
1625
- # @param task_id [String] Unique identifier of a task. (required)
2003
+ # @param items_per_page [Integer] Number of items per page. (default to 10)
2004
+ # @param page [Integer] Page number of the paginated API response.
2005
+ # @param action [Array<ActionType>] Actions for filtering the list of tasks.
2006
+ # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
2007
+ # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
2008
+ # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
2009
+ # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
2010
+ # @param sort [TaskSortKeys] Property by which to sort the list of tasks. (default to 'createdAt')
2011
+ # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1626
2012
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1627
- # @return [Task]
1628
- def get_task(task_id, request_options = {})
1629
- response = get_task_with_http_info(task_id, request_options)
1630
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Task")
2013
+ # @return [ListTasksResponse]
2014
+ def list_tasks(
2015
+ items_per_page = nil,
2016
+ page = nil,
2017
+ action = nil,
2018
+ enabled = nil,
2019
+ source_id = nil,
2020
+ destination_id = nil,
2021
+ trigger_type = nil,
2022
+ sort = nil,
2023
+ order = nil,
2024
+ request_options = {}
2025
+ )
2026
+ response = list_tasks_with_http_info(
2027
+ items_per_page,
2028
+ page,
2029
+ action,
2030
+ enabled,
2031
+ source_id,
2032
+ destination_id,
2033
+ trigger_type,
2034
+ sort,
2035
+ order,
2036
+ request_options
2037
+ )
2038
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::ListTasksResponse")
1631
2039
  end
1632
2040
 
1633
- # Retrieves a list of tasks.
2041
+ # Retrieves a list of tasks using the v1 endpoint, please use &#x60;getTasks&#x60; instead.
1634
2042
  #
1635
2043
  # Required API Key ACLs:
1636
2044
  # - addObject
@@ -1647,7 +2055,7 @@ module Algolia
1647
2055
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1648
2056
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1649
2057
  # @return [Http::Response] the response
1650
- def get_tasks_with_http_info(
2058
+ def list_tasks_v1_with_http_info(
1651
2059
  items_per_page = nil,
1652
2060
  page = nil,
1653
2061
  action = nil,
@@ -1662,21 +2070,21 @@ module Algolia
1662
2070
  if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1663
2071
  raise(
1664
2072
  ArgumentError,
1665
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_tasks, must be smaller than or equal to 100."
2073
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_tasks_v1, must be smaller than or equal to 100."
1666
2074
  )
1667
2075
  end
1668
2076
 
1669
2077
  if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1670
2078
  raise(
1671
2079
  ArgumentError,
1672
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_tasks, must be greater than or equal to 1."
2080
+ "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_tasks_v1, must be greater than or equal to 1."
1673
2081
  )
1674
2082
  end
1675
2083
 
1676
2084
  if @api_client.config.client_side_validation && !page.nil? && page < 1
1677
2085
  raise(
1678
2086
  ArgumentError,
1679
- "invalid value for \"\"page\"\" when calling IngestionClient.get_tasks, must be greater than or equal to 1."
2087
+ "invalid value for \"\"page\"\" when calling IngestionClient.list_tasks_v1, must be greater than or equal to 1."
1680
2088
  )
1681
2089
  end
1682
2090
 
@@ -1701,7 +2109,7 @@ module Algolia
1701
2109
  post_body = request_options[:debug_body]
1702
2110
 
1703
2111
  new_options = request_options.merge(
1704
- :operation => :"IngestionClient.get_tasks",
2112
+ :operation => :"IngestionClient.list_tasks_v1",
1705
2113
  :header_params => header_params,
1706
2114
  :query_params => query_params,
1707
2115
  :body => post_body,
@@ -1711,7 +2119,7 @@ module Algolia
1711
2119
  @api_client.call_api(:GET, path, new_options)
1712
2120
  end
1713
2121
 
1714
- # Retrieves a list of tasks.
2122
+ # Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.
1715
2123
  #
1716
2124
  # Required API Key ACLs:
1717
2125
  # - addObject
@@ -1727,8 +2135,8 @@ module Algolia
1727
2135
  # @param sort [TaskSortKeys] Property by which to sort the list of tasks. (default to 'createdAt')
1728
2136
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1729
2137
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1730
- # @return [ListTasksResponse]
1731
- def get_tasks(
2138
+ # @return [ListTasksResponseV1]
2139
+ def list_tasks_v1(
1732
2140
  items_per_page = nil,
1733
2141
  page = nil,
1734
2142
  action = nil,
@@ -1740,7 +2148,7 @@ module Algolia
1740
2148
  order = nil,
1741
2149
  request_options = {}
1742
2150
  )
1743
- response = get_tasks_with_http_info(
2151
+ response = list_tasks_v1_with_http_info(
1744
2152
  items_per_page,
1745
2153
  page,
1746
2154
  action,
@@ -1752,29 +2160,24 @@ module Algolia
1752
2160
  order,
1753
2161
  request_options
1754
2162
  )
1755
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::ListTasksResponse")
2163
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::ListTasksResponseV1")
1756
2164
  end
1757
2165
 
1758
- # Retrieves a transformation by its ID.
2166
+ # Retrieves a list of transformations.
1759
2167
  #
1760
2168
  # Required API Key ACLs:
1761
2169
  # - addObject
1762
2170
  # - deleteIndex
1763
2171
  # - editSettings
1764
- # @param transformation_id [String] Unique identifier of a transformation. (required)
2172
+ # @param sort [SortKeys] Property by which to sort the list. (default to 'desc')
2173
+ # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1765
2174
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1766
2175
  # @return [Http::Response] the response
1767
- def get_transformation_with_http_info(transformation_id, request_options = {})
1768
- # verify the required parameter 'transformation_id' is set
1769
- if @api_client.config.client_side_validation && transformation_id.nil?
1770
- raise ArgumentError, "Parameter `transformation_id` is required when calling `get_transformation`."
1771
- end
1772
-
1773
- path = "/1/transformations/{transformationID}".sub(
1774
- "{" + "transformationID" + "}",
1775
- Transport.encode_uri(transformation_id.to_s)
1776
- )
2176
+ def list_transformations_with_http_info(sort = nil, order = nil, request_options = {})
2177
+ path = "/1/transformations"
1777
2178
  query_params = {}
2179
+ query_params[:sort] = sort unless sort.nil?
2180
+ query_params[:order] = order unless order.nil?
1778
2181
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1779
2182
  header_params = {}
1780
2183
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -1782,7 +2185,7 @@ module Algolia
1782
2185
  post_body = request_options[:debug_body]
1783
2186
 
1784
2187
  new_options = request_options.merge(
1785
- :operation => :"IngestionClient.get_transformation",
2188
+ :operation => :"IngestionClient.list_transformations",
1786
2189
  :header_params => header_params,
1787
2190
  :query_params => query_params,
1788
2191
  :body => post_body,
@@ -1792,68 +2195,76 @@ module Algolia
1792
2195
  @api_client.call_api(:GET, path, new_options)
1793
2196
  end
1794
2197
 
1795
- # Retrieves a transformation by its ID.
2198
+ # Retrieves a list of transformations.
1796
2199
  #
1797
2200
  # Required API Key ACLs:
1798
2201
  # - addObject
1799
2202
  # - deleteIndex
1800
2203
  # - editSettings
1801
- # @param transformation_id [String] Unique identifier of a transformation. (required)
2204
+ # @param sort [SortKeys] Property by which to sort the list. (default to 'desc')
2205
+ # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1802
2206
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1803
- # @return [Transformation]
1804
- def get_transformation(transformation_id, request_options = {})
1805
- response = get_transformation_with_http_info(transformation_id, request_options)
1806
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Transformation")
2207
+ # @return [ListTransformationsResponse]
2208
+ def list_transformations(sort = nil, order = nil, request_options = {})
2209
+ response = list_transformations_with_http_info(sort, order, request_options)
2210
+ @api_client.deserialize(
2211
+ response.body,
2212
+ request_options[:debug_return_type] || "Ingestion::ListTransformationsResponse"
2213
+ )
1807
2214
  end
1808
2215
 
1809
- # Retrieves a list of transformations.
2216
+ # Push a &#x60;batch&#x60; request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
1810
2217
  #
1811
2218
  # Required API Key ACLs:
1812
2219
  # - addObject
1813
2220
  # - deleteIndex
1814
2221
  # - editSettings
1815
- # @param sort [SortKeys] Property by which to sort the list. (default to 'desc')
1816
- # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
2222
+ # @param task_id [String] Unique identifier of a task. (required)
2223
+ # @param batch_write_params [BatchWriteParams] Request body of a Search API &#x60;batch&#x60; request that will be pushed in the Connectors pipeline. (required)
1817
2224
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1818
2225
  # @return [Http::Response] the response
1819
- def get_transformations_with_http_info(sort = nil, order = nil, request_options = {})
1820
- path = "/1/transformations"
2226
+ def push_task_with_http_info(task_id, batch_write_params, request_options = {})
2227
+ # verify the required parameter 'task_id' is set
2228
+ if @api_client.config.client_side_validation && task_id.nil?
2229
+ raise ArgumentError, "Parameter `task_id` is required when calling `push_task`."
2230
+ end
2231
+ # verify the required parameter 'batch_write_params' is set
2232
+ if @api_client.config.client_side_validation && batch_write_params.nil?
2233
+ raise ArgumentError, "Parameter `batch_write_params` is required when calling `push_task`."
2234
+ end
2235
+
2236
+ path = "/2/tasks/{taskID}/push".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
1821
2237
  query_params = {}
1822
- query_params[:sort] = sort unless sort.nil?
1823
- query_params[:order] = order unless order.nil?
1824
2238
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1825
2239
  header_params = {}
1826
2240
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
1827
2241
 
1828
- post_body = request_options[:debug_body]
2242
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(batch_write_params)
1829
2243
 
1830
2244
  new_options = request_options.merge(
1831
- :operation => :"IngestionClient.get_transformations",
2245
+ :operation => :"IngestionClient.push_task",
1832
2246
  :header_params => header_params,
1833
2247
  :query_params => query_params,
1834
2248
  :body => post_body,
1835
2249
  :use_read_transporter => false
1836
2250
  )
1837
2251
 
1838
- @api_client.call_api(:GET, path, new_options)
2252
+ @api_client.call_api(:POST, path, new_options)
1839
2253
  end
1840
2254
 
1841
- # Retrieves a list of transformations.
2255
+ # Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
1842
2256
  #
1843
2257
  # Required API Key ACLs:
1844
2258
  # - addObject
1845
2259
  # - deleteIndex
1846
2260
  # - editSettings
1847
- # @param sort [SortKeys] Property by which to sort the list. (default to 'desc')
1848
- # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
2261
+ # @param task_id [String] Unique identifier of a task. (required)
2262
+ # @param batch_write_params [BatchWriteParams] Request body of a Search API &#x60;batch&#x60; request that will be pushed in the Connectors pipeline. (required)
1849
2263
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1850
- # @return [ListTransformationsResponse]
1851
- def get_transformations(sort = nil, order = nil, request_options = {})
1852
- response = get_transformations_with_http_info(sort, order, request_options)
1853
- @api_client.deserialize(
1854
- response.body,
1855
- request_options[:debug_return_type] || "Ingestion::ListTransformationsResponse"
1856
- )
2264
+ # @return [RunResponse]
2265
+ def push_task(task_id, batch_write_params, request_options = {})
2266
+ response = push_task_with_http_info(task_id, batch_write_params, request_options)
2267
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunResponse")
1857
2268
  end
1858
2269
 
1859
2270
  # Runs a task. You can check the status of task runs with the observability endpoints.
@@ -1871,7 +2282,7 @@ module Algolia
1871
2282
  raise ArgumentError, "Parameter `task_id` is required when calling `run_task`."
1872
2283
  end
1873
2284
 
1874
- path = "/1/tasks/{taskID}/run".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
2285
+ path = "/2/tasks/{taskID}/run".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
1875
2286
  query_params = {}
1876
2287
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1877
2288
  header_params = {}
@@ -1904,6 +2315,54 @@ module Algolia
1904
2315
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunResponse")
1905
2316
  end
1906
2317
 
2318
+ # Runs a task using the v1 endpoint, please use &#x60;runTask&#x60; instead. You can check the status of task runs with the observability endpoints.
2319
+ #
2320
+ # Required API Key ACLs:
2321
+ # - addObject
2322
+ # - deleteIndex
2323
+ # - editSettings
2324
+ # @param task_id [String] Unique identifier of a task. (required)
2325
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2326
+ # @return [Http::Response] the response
2327
+ def run_task_v1_with_http_info(task_id, request_options = {})
2328
+ # verify the required parameter 'task_id' is set
2329
+ if @api_client.config.client_side_validation && task_id.nil?
2330
+ raise ArgumentError, "Parameter `task_id` is required when calling `run_task_v1`."
2331
+ end
2332
+
2333
+ path = "/1/tasks/{taskID}/run".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
2334
+ query_params = {}
2335
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2336
+ header_params = {}
2337
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
2338
+
2339
+ post_body = request_options[:debug_body]
2340
+
2341
+ new_options = request_options.merge(
2342
+ :operation => :"IngestionClient.run_task_v1",
2343
+ :header_params => header_params,
2344
+ :query_params => query_params,
2345
+ :body => post_body,
2346
+ :use_read_transporter => false
2347
+ )
2348
+
2349
+ @api_client.call_api(:POST, path, new_options)
2350
+ end
2351
+
2352
+ # Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.
2353
+ #
2354
+ # Required API Key ACLs:
2355
+ # - addObject
2356
+ # - deleteIndex
2357
+ # - editSettings
2358
+ # @param task_id [String] Unique identifier of a task. (required)
2359
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2360
+ # @return [RunResponse]
2361
+ def run_task_v1(task_id, request_options = {})
2362
+ response = run_task_v1_with_http_info(task_id, request_options)
2363
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunResponse")
2364
+ end
2365
+
1907
2366
  # Searches for authentication resources.
1908
2367
  #
1909
2368
  # Required API Key ACLs:
@@ -2063,7 +2522,7 @@ module Algolia
2063
2522
  raise ArgumentError, "Parameter `task_search` is required when calling `search_tasks`."
2064
2523
  end
2065
2524
 
2066
- path = "/1/tasks/search"
2525
+ path = "/2/tasks/search"
2067
2526
  query_params = {}
2068
2527
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2069
2528
  header_params = {}
@@ -2096,6 +2555,54 @@ module Algolia
2096
2555
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Ingestion::Task>")
2097
2556
  end
2098
2557
 
2558
+ # Searches for tasks using the v1 endpoint, please use &#x60;searchTasks&#x60; instead.
2559
+ #
2560
+ # Required API Key ACLs:
2561
+ # - addObject
2562
+ # - deleteIndex
2563
+ # - editSettings
2564
+ # @param task_search [TaskSearch] (required)
2565
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2566
+ # @return [Http::Response] the response
2567
+ def search_tasks_v1_with_http_info(task_search, request_options = {})
2568
+ # verify the required parameter 'task_search' is set
2569
+ if @api_client.config.client_side_validation && task_search.nil?
2570
+ raise ArgumentError, "Parameter `task_search` is required when calling `search_tasks_v1`."
2571
+ end
2572
+
2573
+ path = "/1/tasks/search"
2574
+ query_params = {}
2575
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2576
+ header_params = {}
2577
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
2578
+
2579
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_search)
2580
+
2581
+ new_options = request_options.merge(
2582
+ :operation => :"IngestionClient.search_tasks_v1",
2583
+ :header_params => header_params,
2584
+ :query_params => query_params,
2585
+ :body => post_body,
2586
+ :use_read_transporter => false
2587
+ )
2588
+
2589
+ @api_client.call_api(:POST, path, new_options)
2590
+ end
2591
+
2592
+ # Searches for tasks using the v1 endpoint, please use `searchTasks` instead.
2593
+ #
2594
+ # Required API Key ACLs:
2595
+ # - addObject
2596
+ # - deleteIndex
2597
+ # - editSettings
2598
+ # @param task_search [TaskSearch] (required)
2599
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2600
+ # @return [Array<TaskV1>]
2601
+ def search_tasks_v1(task_search, request_options = {})
2602
+ response = search_tasks_v1_with_http_info(task_search, request_options)
2603
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Ingestion::TaskV1>")
2604
+ end
2605
+
2099
2606
  # Searches for transformations.
2100
2607
  #
2101
2608
  # Required API Key ACLs:
@@ -2433,7 +2940,7 @@ module Algolia
2433
2940
  raise ArgumentError, "Parameter `task_update` is required when calling `update_task`."
2434
2941
  end
2435
2942
 
2436
- path = "/1/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
2943
+ path = "/2/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
2437
2944
  query_params = {}
2438
2945
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2439
2946
  header_params = {}
@@ -2463,6 +2970,52 @@ module Algolia
2463
2970
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
2464
2971
  end
2465
2972
 
2973
+ # Updates a task by its ID using the v1 endpoint, please use &#x60;updateTask&#x60; instead.
2974
+
2975
+ # @param task_id [String] Unique identifier of a task. (required)
2976
+ # @param task_update [TaskUpdateV1] (required)
2977
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2978
+ # @return [Http::Response] the response
2979
+ def update_task_v1_with_http_info(task_id, task_update, request_options = {})
2980
+ # verify the required parameter 'task_id' is set
2981
+ if @api_client.config.client_side_validation && task_id.nil?
2982
+ raise ArgumentError, "Parameter `task_id` is required when calling `update_task_v1`."
2983
+ end
2984
+ # verify the required parameter 'task_update' is set
2985
+ if @api_client.config.client_side_validation && task_update.nil?
2986
+ raise ArgumentError, "Parameter `task_update` is required when calling `update_task_v1`."
2987
+ end
2988
+
2989
+ path = "/1/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
2990
+ query_params = {}
2991
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2992
+ header_params = {}
2993
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
2994
+
2995
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_update)
2996
+
2997
+ new_options = request_options.merge(
2998
+ :operation => :"IngestionClient.update_task_v1",
2999
+ :header_params => header_params,
3000
+ :query_params => query_params,
3001
+ :body => post_body,
3002
+ :use_read_transporter => false
3003
+ )
3004
+
3005
+ @api_client.call_api(:PATCH, path, new_options)
3006
+ end
3007
+
3008
+ # Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.
3009
+
3010
+ # @param task_id [String] Unique identifier of a task. (required)
3011
+ # @param task_update [TaskUpdateV1] (required)
3012
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
3013
+ # @return [TaskUpdateResponse]
3014
+ def update_task_v1(task_id, task_update, request_options = {})
3015
+ response = update_task_v1_with_http_info(task_id, task_update, request_options)
3016
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
3017
+ end
3018
+
2466
3019
  # Updates a transformation by its ID.
2467
3020
 
2468
3021
  # @param transformation_id [String] Unique identifier of a transformation. (required)