@algolia/ingestion 1.0.0-beta.11 → 1.0.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/builds/browser.d.ts +17 -7
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +17 -7
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/ingestion.cjs +491 -179
  6. package/dist/ingestion.esm.browser.js +491 -179
  7. package/dist/ingestion.esm.node.js +491 -179
  8. package/dist/ingestion.umd.js +2 -2
  9. package/dist/model/action.d.ts +5 -0
  10. package/dist/model/action.d.ts.map +1 -0
  11. package/dist/model/batchRequest.d.ts +9 -0
  12. package/dist/model/batchRequest.d.ts.map +1 -0
  13. package/dist/model/batchWriteParams.d.ts +8 -0
  14. package/dist/model/batchWriteParams.d.ts.map +1 -0
  15. package/dist/model/clientMethodProps.d.ts +177 -66
  16. package/dist/model/clientMethodProps.d.ts.map +1 -1
  17. package/dist/model/dockerStreamsInput.d.ts +3 -0
  18. package/dist/model/dockerStreamsInput.d.ts.map +1 -1
  19. package/dist/model/index.d.ts +8 -1
  20. package/dist/model/index.d.ts.map +1 -1
  21. package/dist/model/listTasksResponseV1.d.ts +10 -0
  22. package/dist/model/listTasksResponseV1.d.ts.map +1 -0
  23. package/dist/model/task.d.ts +12 -2
  24. package/dist/model/task.d.ts.map +1 -1
  25. package/dist/model/taskCreate.d.ts +4 -2
  26. package/dist/model/taskCreate.d.ts.map +1 -1
  27. package/dist/model/taskCreateV1.d.ts +32 -0
  28. package/dist/model/taskCreateV1.d.ts.map +1 -0
  29. package/dist/model/taskUpdate.d.ts +4 -2
  30. package/dist/model/taskUpdate.d.ts.map +1 -1
  31. package/dist/model/taskUpdateV1.d.ts +22 -0
  32. package/dist/model/taskUpdateV1.d.ts.map +1 -0
  33. package/dist/model/taskV1.d.ts +44 -0
  34. package/dist/model/taskV1.d.ts.map +1 -0
  35. package/dist/model/{transformationTryResponseError.d.ts → transformationError.d.ts} +2 -2
  36. package/dist/model/transformationError.d.ts.map +1 -0
  37. package/dist/model/transformationTryResponse.d.ts +2 -2
  38. package/dist/model/transformationTryResponse.d.ts.map +1 -1
  39. package/dist/src/ingestionClient.d.ts +218 -92
  40. package/dist/src/ingestionClient.d.ts.map +1 -1
  41. package/model/action.ts +13 -0
  42. package/model/batchRequest.ts +12 -0
  43. package/model/batchWriteParams.ts +10 -0
  44. package/model/clientMethodProps.ts +189 -70
  45. package/model/dockerStreamsInput.ts +3 -0
  46. package/model/index.ts +8 -1
  47. package/model/listTasksResponseV1.ts +13 -0
  48. package/model/task.ts +14 -2
  49. package/model/taskCreate.ts +5 -3
  50. package/model/taskCreateV1.ts +41 -0
  51. package/model/taskUpdate.ts +4 -2
  52. package/model/taskUpdateV1.ts +28 -0
  53. package/model/taskV1.ts +56 -0
  54. package/model/{transformationTryResponseError.ts → transformationError.ts} +1 -1
  55. package/model/transformationTryResponse.ts +2 -2
  56. package/package.json +7 -7
  57. package/dist/model/transformationTryResponseError.d.ts.map +0 -1
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
2
2
  import { createHttpRequester } from '@algolia/requester-node-http';
3
3
 
4
4
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
5
- const apiClientVersion = '1.0.0-beta.11';
5
+ const apiClientVersion = '1.0.0-beta.13';
6
6
  const REGIONS = ['eu', 'us'];
7
7
  function getDefaultHosts(region) {
8
8
  const url = 'data.{region}.algolia.com'.replace('{region}', region);
@@ -210,11 +210,42 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
210
210
  if (!taskCreate.destinationID) {
211
211
  throw new Error('Parameter `taskCreate.destinationID` is required when calling `createTask`.');
212
212
  }
213
+ if (!taskCreate.action) {
214
+ throw new Error('Parameter `taskCreate.action` is required when calling `createTask`.');
215
+ }
216
+ const requestPath = '/2/tasks';
217
+ const headers = {};
218
+ const queryParameters = {};
219
+ const request = {
220
+ method: 'POST',
221
+ path: requestPath,
222
+ queryParameters,
223
+ headers,
224
+ data: taskCreate,
225
+ };
226
+ return transporter.request(request, requestOptions);
227
+ },
228
+ /**
229
+ * Creates a new task using the v1 endpoint, please use `createTask` instead.
230
+ *
231
+ * @param taskCreate - Request body for creating a task.
232
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
233
+ */
234
+ createTaskV1(taskCreate, requestOptions) {
235
+ if (!taskCreate) {
236
+ throw new Error('Parameter `taskCreate` is required when calling `createTaskV1`.');
237
+ }
238
+ if (!taskCreate.sourceID) {
239
+ throw new Error('Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.');
240
+ }
241
+ if (!taskCreate.destinationID) {
242
+ throw new Error('Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.');
243
+ }
213
244
  if (!taskCreate.trigger) {
214
- throw new Error('Parameter `taskCreate.trigger` is required when calling `createTask`.');
245
+ throw new Error('Parameter `taskCreate.trigger` is required when calling `createTaskV1`.');
215
246
  }
216
247
  if (!taskCreate.action) {
217
- throw new Error('Parameter `taskCreate.action` is required when calling `createTask`.');
248
+ throw new Error('Parameter `taskCreate.action` is required when calling `createTaskV1`.');
218
249
  }
219
250
  const requestPath = '/1/tasks';
220
251
  const headers = {};
@@ -444,6 +475,28 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
444
475
  if (!taskID) {
445
476
  throw new Error('Parameter `taskID` is required when calling `deleteTask`.');
446
477
  }
478
+ const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
479
+ const headers = {};
480
+ const queryParameters = {};
481
+ const request = {
482
+ method: 'DELETE',
483
+ path: requestPath,
484
+ queryParameters,
485
+ headers,
486
+ };
487
+ return transporter.request(request, requestOptions);
488
+ },
489
+ /**
490
+ * Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead.
491
+ *
492
+ * @param deleteTaskV1 - The deleteTaskV1 object.
493
+ * @param deleteTaskV1.taskID - Unique identifier of a task.
494
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
495
+ */
496
+ deleteTaskV1({ taskID }, requestOptions) {
497
+ if (!taskID) {
498
+ throw new Error('Parameter `taskID` is required when calling `deleteTaskV1`.');
499
+ }
447
500
  const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
448
501
  const headers = {};
449
502
  const queryParameters = {};
@@ -493,6 +546,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
493
546
  if (!taskID) {
494
547
  throw new Error('Parameter `taskID` is required when calling `disableTask`.');
495
548
  }
549
+ const requestPath = '/2/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID));
550
+ const headers = {};
551
+ const queryParameters = {};
552
+ const request = {
553
+ method: 'PUT',
554
+ path: requestPath,
555
+ queryParameters,
556
+ headers,
557
+ };
558
+ return transporter.request(request, requestOptions);
559
+ },
560
+ /**
561
+ * Disables a task using the v1 endpoint, please use `disableTask` instead.
562
+ *
563
+ * Required API Key ACLs:
564
+ * - addObject
565
+ * - deleteIndex
566
+ * - editSettings.
567
+ *
568
+ * @param disableTaskV1 - The disableTaskV1 object.
569
+ * @param disableTaskV1.taskID - Unique identifier of a task.
570
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
571
+ */
572
+ disableTaskV1({ taskID }, requestOptions) {
573
+ if (!taskID) {
574
+ throw new Error('Parameter `taskID` is required when calling `disableTaskV1`.');
575
+ }
496
576
  const requestPath = '/1/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID));
497
577
  const headers = {};
498
578
  const queryParameters = {};
@@ -520,6 +600,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
520
600
  if (!taskID) {
521
601
  throw new Error('Parameter `taskID` is required when calling `enableTask`.');
522
602
  }
603
+ const requestPath = '/2/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID));
604
+ const headers = {};
605
+ const queryParameters = {};
606
+ const request = {
607
+ method: 'PUT',
608
+ path: requestPath,
609
+ queryParameters,
610
+ headers,
611
+ };
612
+ return transporter.request(request, requestOptions);
613
+ },
614
+ /**
615
+ * Enables a task using the v1 endpoint, please use `enableTask` instead.
616
+ *
617
+ * Required API Key ACLs:
618
+ * - addObject
619
+ * - deleteIndex
620
+ * - editSettings.
621
+ *
622
+ * @param enableTaskV1 - The enableTaskV1 object.
623
+ * @param enableTaskV1.taskID - Unique identifier of a task.
624
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
625
+ */
626
+ enableTaskV1({ taskID }, requestOptions) {
627
+ if (!taskID) {
628
+ throw new Error('Parameter `taskID` is required when calling `enableTaskV1`.');
629
+ }
523
630
  const requestPath = '/1/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID));
524
631
  const headers = {};
525
632
  const queryParameters = {};
@@ -559,44 +666,57 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
559
666
  return transporter.request(request, requestOptions);
560
667
  },
561
668
  /**
562
- * Retrieves a list of all authentication resources.
669
+ * Retrieves a destination by its ID.
563
670
  *
564
671
  * Required API Key ACLs:
565
672
  * - addObject
566
673
  * - deleteIndex
567
674
  * - editSettings.
568
675
  *
569
- * @param getAuthentications - The getAuthentications object.
570
- * @param getAuthentications.itemsPerPage - Number of items per page.
571
- * @param getAuthentications.page - Page number of the paginated API response.
572
- * @param getAuthentications.type - Type of authentication resource to retrieve.
573
- * @param getAuthentications.platform - Ecommerce platform for which to retrieve authentication resources.
574
- * @param getAuthentications.sort - Property by which to sort the list of authentication resources.
575
- * @param getAuthentications.order - Sort order of the response, ascending or descending.
676
+ * @param getDestination - The getDestination object.
677
+ * @param getDestination.destinationID - Unique identifier of a destination.
576
678
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
577
679
  */
578
- getAuthentications({ itemsPerPage, page, type, platform, sort, order, } = {}, requestOptions = undefined) {
579
- const requestPath = '/1/authentications';
680
+ getDestination({ destinationID }, requestOptions) {
681
+ if (!destinationID) {
682
+ throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
683
+ }
684
+ const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
580
685
  const headers = {};
581
686
  const queryParameters = {};
582
- if (itemsPerPage !== undefined) {
583
- queryParameters.itemsPerPage = itemsPerPage.toString();
584
- }
585
- if (page !== undefined) {
586
- queryParameters.page = page.toString();
587
- }
588
- if (type !== undefined) {
589
- queryParameters.type = type.toString();
590
- }
591
- if (platform !== undefined) {
592
- queryParameters.platform = platform.toString();
593
- }
594
- if (sort !== undefined) {
595
- queryParameters.sort = sort.toString();
687
+ const request = {
688
+ method: 'GET',
689
+ path: requestPath,
690
+ queryParameters,
691
+ headers,
692
+ };
693
+ return transporter.request(request, requestOptions);
694
+ },
695
+ /**
696
+ * Retrieves a single task run event by its ID.
697
+ *
698
+ * Required API Key ACLs:
699
+ * - addObject
700
+ * - deleteIndex
701
+ * - editSettings.
702
+ *
703
+ * @param getEvent - The getEvent object.
704
+ * @param getEvent.runID - Unique identifier of a task run.
705
+ * @param getEvent.eventID - Unique identifier of an event.
706
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
707
+ */
708
+ getEvent({ runID, eventID }, requestOptions) {
709
+ if (!runID) {
710
+ throw new Error('Parameter `runID` is required when calling `getEvent`.');
596
711
  }
597
- if (order !== undefined) {
598
- queryParameters.order = order.toString();
712
+ if (!eventID) {
713
+ throw new Error('Parameter `eventID` is required when calling `getEvent`.');
599
714
  }
715
+ const requestPath = '/1/runs/{runID}/events/{eventID}'
716
+ .replace('{runID}', encodeURIComponent(runID))
717
+ .replace('{eventID}', encodeURIComponent(eventID));
718
+ const headers = {};
719
+ const queryParameters = {};
600
720
  const request = {
601
721
  method: 'GET',
602
722
  path: requestPath,
@@ -606,22 +726,22 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
606
726
  return transporter.request(request, requestOptions);
607
727
  },
608
728
  /**
609
- * Retrieves a destination by its ID.
729
+ * Retrieve a single task run by its ID.
610
730
  *
611
731
  * Required API Key ACLs:
612
732
  * - addObject
613
733
  * - deleteIndex
614
734
  * - editSettings.
615
735
  *
616
- * @param getDestination - The getDestination object.
617
- * @param getDestination.destinationID - Unique identifier of a destination.
736
+ * @param getRun - The getRun object.
737
+ * @param getRun.runID - Unique identifier of a task run.
618
738
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
619
739
  */
620
- getDestination({ destinationID }, requestOptions) {
621
- if (!destinationID) {
622
- throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
740
+ getRun({ runID }, requestOptions) {
741
+ if (!runID) {
742
+ throw new Error('Parameter `runID` is required when calling `getRun`.');
623
743
  }
624
- const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
744
+ const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
625
745
  const headers = {};
626
746
  const queryParameters = {};
627
747
  const request = {
@@ -633,44 +753,24 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
633
753
  return transporter.request(request, requestOptions);
634
754
  },
635
755
  /**
636
- * Retrieves a list of destinations.
756
+ * Retrieve a source by its ID.
637
757
  *
638
758
  * Required API Key ACLs:
639
759
  * - addObject
640
760
  * - deleteIndex
641
761
  * - editSettings.
642
762
  *
643
- * @param getDestinations - The getDestinations object.
644
- * @param getDestinations.itemsPerPage - Number of items per page.
645
- * @param getDestinations.page - Page number of the paginated API response.
646
- * @param getDestinations.type - Destination type.
647
- * @param getDestinations.authenticationID - Authentication ID used by destinations.
648
- * @param getDestinations.sort - Property by which to sort the destinations.
649
- * @param getDestinations.order - Sort order of the response, ascending or descending.
763
+ * @param getSource - The getSource object.
764
+ * @param getSource.sourceID - Unique identifier of a source.
650
765
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
651
766
  */
652
- getDestinations({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
653
- const requestPath = '/1/destinations';
767
+ getSource({ sourceID }, requestOptions) {
768
+ if (!sourceID) {
769
+ throw new Error('Parameter `sourceID` is required when calling `getSource`.');
770
+ }
771
+ const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
654
772
  const headers = {};
655
773
  const queryParameters = {};
656
- if (itemsPerPage !== undefined) {
657
- queryParameters.itemsPerPage = itemsPerPage.toString();
658
- }
659
- if (page !== undefined) {
660
- queryParameters.page = page.toString();
661
- }
662
- if (type !== undefined) {
663
- queryParameters.type = type.toString();
664
- }
665
- if (authenticationID !== undefined) {
666
- queryParameters.authenticationID = authenticationID.toString();
667
- }
668
- if (sort !== undefined) {
669
- queryParameters.sort = sort.toString();
670
- }
671
- if (order !== undefined) {
672
- queryParameters.order = order.toString();
673
- }
674
774
  const request = {
675
775
  method: 'GET',
676
776
  path: requestPath,
@@ -680,28 +780,49 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
680
780
  return transporter.request(request, requestOptions);
681
781
  },
682
782
  /**
683
- * Retrieves a single task run event by its ID.
783
+ * Retrieves a task by its ID.
684
784
  *
685
785
  * Required API Key ACLs:
686
786
  * - addObject
687
787
  * - deleteIndex
688
788
  * - editSettings.
689
789
  *
690
- * @param getEvent - The getEvent object.
691
- * @param getEvent.runID - Unique identifier of a task run.
692
- * @param getEvent.eventID - Unique identifier of an event.
790
+ * @param getTask - The getTask object.
791
+ * @param getTask.taskID - Unique identifier of a task.
693
792
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
694
793
  */
695
- getEvent({ runID, eventID }, requestOptions) {
696
- if (!runID) {
697
- throw new Error('Parameter `runID` is required when calling `getEvent`.');
794
+ getTask({ taskID }, requestOptions) {
795
+ if (!taskID) {
796
+ throw new Error('Parameter `taskID` is required when calling `getTask`.');
698
797
  }
699
- if (!eventID) {
700
- throw new Error('Parameter `eventID` is required when calling `getEvent`.');
798
+ const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
799
+ const headers = {};
800
+ const queryParameters = {};
801
+ const request = {
802
+ method: 'GET',
803
+ path: requestPath,
804
+ queryParameters,
805
+ headers,
806
+ };
807
+ return transporter.request(request, requestOptions);
808
+ },
809
+ /**
810
+ * Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.
811
+ *
812
+ * Required API Key ACLs:
813
+ * - addObject
814
+ * - deleteIndex
815
+ * - editSettings.
816
+ *
817
+ * @param getTaskV1 - The getTaskV1 object.
818
+ * @param getTaskV1.taskID - Unique identifier of a task.
819
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
820
+ */
821
+ getTaskV1({ taskID }, requestOptions) {
822
+ if (!taskID) {
823
+ throw new Error('Parameter `taskID` is required when calling `getTaskV1`.');
701
824
  }
702
- const requestPath = '/1/runs/{runID}/events/{eventID}'
703
- .replace('{runID}', encodeURIComponent(runID))
704
- .replace('{eventID}', encodeURIComponent(eventID));
825
+ const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
705
826
  const headers = {};
706
827
  const queryParameters = {};
707
828
  const request = {
@@ -713,30 +834,51 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
713
834
  return transporter.request(request, requestOptions);
714
835
  },
715
836
  /**
716
- * Retrieves a list of events for a task run, identified by it\'s ID.
837
+ * Retrieves a transformation by its ID.
717
838
  *
718
839
  * Required API Key ACLs:
719
840
  * - addObject
720
841
  * - deleteIndex
721
842
  * - editSettings.
722
843
  *
723
- * @param getEvents - The getEvents object.
724
- * @param getEvents.runID - Unique identifier of a task run.
725
- * @param getEvents.itemsPerPage - Number of items per page.
726
- * @param getEvents.page - Page number of the paginated API response.
727
- * @param getEvents.status - Event status for filtering the list of task runs.
728
- * @param getEvents.type - Event type for filtering the list of task runs.
729
- * @param getEvents.sort - Property by which to sort the list of task run events.
730
- * @param getEvents.order - Sort order of the response, ascending or descending.
731
- * @param getEvents.startDate - Date and time in RFC 3339 format for the earliest events to retrieve. By default, the current time minus three hours is used.
732
- * @param getEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
844
+ * @param getTransformation - The getTransformation object.
845
+ * @param getTransformation.transformationID - Unique identifier of a transformation.
733
846
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
734
847
  */
735
- getEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
736
- if (!runID) {
737
- throw new Error('Parameter `runID` is required when calling `getEvents`.');
848
+ getTransformation({ transformationID }, requestOptions) {
849
+ if (!transformationID) {
850
+ throw new Error('Parameter `transformationID` is required when calling `getTransformation`.');
738
851
  }
739
- const requestPath = '/1/runs/{runID}/events'.replace('{runID}', encodeURIComponent(runID));
852
+ const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
853
+ const headers = {};
854
+ const queryParameters = {};
855
+ const request = {
856
+ method: 'GET',
857
+ path: requestPath,
858
+ queryParameters,
859
+ headers,
860
+ };
861
+ return transporter.request(request, requestOptions);
862
+ },
863
+ /**
864
+ * Retrieves a list of all authentication resources.
865
+ *
866
+ * Required API Key ACLs:
867
+ * - addObject
868
+ * - deleteIndex
869
+ * - editSettings.
870
+ *
871
+ * @param listAuthentications - The listAuthentications object.
872
+ * @param listAuthentications.itemsPerPage - Number of items per page.
873
+ * @param listAuthentications.page - Page number of the paginated API response.
874
+ * @param listAuthentications.type - Type of authentication resource to retrieve.
875
+ * @param listAuthentications.platform - Ecommerce platform for which to retrieve authentication resources.
876
+ * @param listAuthentications.sort - Property by which to sort the list of authentication resources.
877
+ * @param listAuthentications.order - Sort order of the response, ascending or descending.
878
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
879
+ */
880
+ listAuthentications({ itemsPerPage, page, type, platform, sort, order, } = {}, requestOptions = undefined) {
881
+ const requestPath = '/1/authentications';
740
882
  const headers = {};
741
883
  const queryParameters = {};
742
884
  if (itemsPerPage !== undefined) {
@@ -745,24 +887,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
745
887
  if (page !== undefined) {
746
888
  queryParameters.page = page.toString();
747
889
  }
748
- if (status !== undefined) {
749
- queryParameters.status = status.toString();
750
- }
751
890
  if (type !== undefined) {
752
891
  queryParameters.type = type.toString();
753
892
  }
893
+ if (platform !== undefined) {
894
+ queryParameters.platform = platform.toString();
895
+ }
754
896
  if (sort !== undefined) {
755
897
  queryParameters.sort = sort.toString();
756
898
  }
757
899
  if (order !== undefined) {
758
900
  queryParameters.order = order.toString();
759
901
  }
760
- if (startDate !== undefined) {
761
- queryParameters.startDate = startDate.toString();
762
- }
763
- if (endDate !== undefined) {
764
- queryParameters.endDate = endDate.toString();
765
- }
766
902
  const request = {
767
903
  method: 'GET',
768
904
  path: requestPath,
@@ -772,24 +908,44 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
772
908
  return transporter.request(request, requestOptions);
773
909
  },
774
910
  /**
775
- * Retrieve a single task run by its ID.
911
+ * Retrieves a list of destinations.
776
912
  *
777
913
  * Required API Key ACLs:
778
914
  * - addObject
779
915
  * - deleteIndex
780
916
  * - editSettings.
781
917
  *
782
- * @param getRun - The getRun object.
783
- * @param getRun.runID - Unique identifier of a task run.
918
+ * @param listDestinations - The listDestinations object.
919
+ * @param listDestinations.itemsPerPage - Number of items per page.
920
+ * @param listDestinations.page - Page number of the paginated API response.
921
+ * @param listDestinations.type - Destination type.
922
+ * @param listDestinations.authenticationID - Authentication ID used by destinations.
923
+ * @param listDestinations.sort - Property by which to sort the destinations.
924
+ * @param listDestinations.order - Sort order of the response, ascending or descending.
784
925
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
785
926
  */
786
- getRun({ runID }, requestOptions) {
787
- if (!runID) {
788
- throw new Error('Parameter `runID` is required when calling `getRun`.');
789
- }
790
- const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
927
+ listDestinations({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
928
+ const requestPath = '/1/destinations';
791
929
  const headers = {};
792
930
  const queryParameters = {};
931
+ if (itemsPerPage !== undefined) {
932
+ queryParameters.itemsPerPage = itemsPerPage.toString();
933
+ }
934
+ if (page !== undefined) {
935
+ queryParameters.page = page.toString();
936
+ }
937
+ if (type !== undefined) {
938
+ queryParameters.type = type.toString();
939
+ }
940
+ if (authenticationID !== undefined) {
941
+ queryParameters.authenticationID = authenticationID.toString();
942
+ }
943
+ if (sort !== undefined) {
944
+ queryParameters.sort = sort.toString();
945
+ }
946
+ if (order !== undefined) {
947
+ queryParameters.order = order.toString();
948
+ }
793
949
  const request = {
794
950
  method: 'GET',
795
951
  path: requestPath,
@@ -799,26 +955,30 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
799
955
  return transporter.request(request, requestOptions);
800
956
  },
801
957
  /**
802
- * Retrieve a list of task runs.
958
+ * Retrieves a list of events for a task run, identified by it\'s ID.
803
959
  *
804
960
  * Required API Key ACLs:
805
961
  * - addObject
806
962
  * - deleteIndex
807
963
  * - editSettings.
808
964
  *
809
- * @param getRuns - The getRuns object.
810
- * @param getRuns.itemsPerPage - Number of items per page.
811
- * @param getRuns.page - Page number of the paginated API response.
812
- * @param getRuns.status - Run status for filtering the list of task runs.
813
- * @param getRuns.taskID - Task ID for filtering the list of task runs.
814
- * @param getRuns.sort - Property by which to sort the list of task runs.
815
- * @param getRuns.order - Sort order of the response, ascending or descending.
816
- * @param getRuns.startDate - Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.
817
- * @param getRuns.endDate - Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.
965
+ * @param listEvents - The listEvents object.
966
+ * @param listEvents.runID - Unique identifier of a task run.
967
+ * @param listEvents.itemsPerPage - Number of items per page.
968
+ * @param listEvents.page - Page number of the paginated API response.
969
+ * @param listEvents.status - Event status for filtering the list of task runs.
970
+ * @param listEvents.type - Event type for filtering the list of task runs.
971
+ * @param listEvents.sort - Property by which to sort the list of task run events.
972
+ * @param listEvents.order - Sort order of the response, ascending or descending.
973
+ * @param listEvents.startDate - Date and time in RFC 3339 format for the earliest events to retrieve. By default, the current time minus three hours is used.
974
+ * @param listEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
818
975
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
819
976
  */
820
- getRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
821
- const requestPath = '/1/runs';
977
+ listEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
978
+ if (!runID) {
979
+ throw new Error('Parameter `runID` is required when calling `listEvents`.');
980
+ }
981
+ const requestPath = '/1/runs/{runID}/events'.replace('{runID}', encodeURIComponent(runID));
822
982
  const headers = {};
823
983
  const queryParameters = {};
824
984
  if (itemsPerPage !== undefined) {
@@ -830,8 +990,8 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
830
990
  if (status !== undefined) {
831
991
  queryParameters.status = status.toString();
832
992
  }
833
- if (taskID !== undefined) {
834
- queryParameters.taskID = taskID.toString();
993
+ if (type !== undefined) {
994
+ queryParameters.type = type.toString();
835
995
  }
836
996
  if (sort !== undefined) {
837
997
  queryParameters.sort = sort.toString();
@@ -854,24 +1014,52 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
854
1014
  return transporter.request(request, requestOptions);
855
1015
  },
856
1016
  /**
857
- * Retrieve a source by its ID.
1017
+ * Retrieve a list of task runs.
858
1018
  *
859
1019
  * Required API Key ACLs:
860
1020
  * - addObject
861
1021
  * - deleteIndex
862
1022
  * - editSettings.
863
1023
  *
864
- * @param getSource - The getSource object.
865
- * @param getSource.sourceID - Unique identifier of a source.
1024
+ * @param listRuns - The listRuns object.
1025
+ * @param listRuns.itemsPerPage - Number of items per page.
1026
+ * @param listRuns.page - Page number of the paginated API response.
1027
+ * @param listRuns.status - Run status for filtering the list of task runs.
1028
+ * @param listRuns.taskID - Task ID for filtering the list of task runs.
1029
+ * @param listRuns.sort - Property by which to sort the list of task runs.
1030
+ * @param listRuns.order - Sort order of the response, ascending or descending.
1031
+ * @param listRuns.startDate - Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.
1032
+ * @param listRuns.endDate - Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.
866
1033
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
867
1034
  */
868
- getSource({ sourceID }, requestOptions) {
869
- if (!sourceID) {
870
- throw new Error('Parameter `sourceID` is required when calling `getSource`.');
871
- }
872
- const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
1035
+ listRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
1036
+ const requestPath = '/1/runs';
873
1037
  const headers = {};
874
1038
  const queryParameters = {};
1039
+ if (itemsPerPage !== undefined) {
1040
+ queryParameters.itemsPerPage = itemsPerPage.toString();
1041
+ }
1042
+ if (page !== undefined) {
1043
+ queryParameters.page = page.toString();
1044
+ }
1045
+ if (status !== undefined) {
1046
+ queryParameters.status = status.toString();
1047
+ }
1048
+ if (taskID !== undefined) {
1049
+ queryParameters.taskID = taskID.toString();
1050
+ }
1051
+ if (sort !== undefined) {
1052
+ queryParameters.sort = sort.toString();
1053
+ }
1054
+ if (order !== undefined) {
1055
+ queryParameters.order = order.toString();
1056
+ }
1057
+ if (startDate !== undefined) {
1058
+ queryParameters.startDate = startDate.toString();
1059
+ }
1060
+ if (endDate !== undefined) {
1061
+ queryParameters.endDate = endDate.toString();
1062
+ }
875
1063
  const request = {
876
1064
  method: 'GET',
877
1065
  path: requestPath,
@@ -888,16 +1076,16 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
888
1076
  * - deleteIndex
889
1077
  * - editSettings.
890
1078
  *
891
- * @param getSources - The getSources object.
892
- * @param getSources.itemsPerPage - Number of items per page.
893
- * @param getSources.page - Page number of the paginated API response.
894
- * @param getSources.type - Source type. Some sources require authentication.
895
- * @param getSources.authenticationID - Authentication IDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication resource.
896
- * @param getSources.sort - Property by which to sort the list of sources.
897
- * @param getSources.order - Sort order of the response, ascending or descending.
1079
+ * @param listSources - The listSources object.
1080
+ * @param listSources.itemsPerPage - Number of items per page.
1081
+ * @param listSources.page - Page number of the paginated API response.
1082
+ * @param listSources.type - Source type. Some sources require authentication.
1083
+ * @param listSources.authenticationID - Authentication IDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication resource.
1084
+ * @param listSources.sort - Property by which to sort the list of sources.
1085
+ * @param listSources.order - Sort order of the response, ascending or descending.
898
1086
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
899
1087
  */
900
- getSources({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
1088
+ listSources({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
901
1089
  const requestPath = '/1/sources';
902
1090
  const headers = {};
903
1091
  const queryParameters = {};
@@ -928,24 +1116,56 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
928
1116
  return transporter.request(request, requestOptions);
929
1117
  },
930
1118
  /**
931
- * Retrieves a task by its ID.
1119
+ * Retrieves a list of tasks.
932
1120
  *
933
1121
  * Required API Key ACLs:
934
1122
  * - addObject
935
1123
  * - deleteIndex
936
1124
  * - editSettings.
937
1125
  *
938
- * @param getTask - The getTask object.
939
- * @param getTask.taskID - Unique identifier of a task.
1126
+ * @param listTasks - The listTasks object.
1127
+ * @param listTasks.itemsPerPage - Number of items per page.
1128
+ * @param listTasks.page - Page number of the paginated API response.
1129
+ * @param listTasks.action - Actions for filtering the list of tasks.
1130
+ * @param listTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
1131
+ * @param listTasks.sourceID - Source IDs for filtering the list of tasks.
1132
+ * @param listTasks.destinationID - Destination IDs for filtering the list of tasks.
1133
+ * @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.
1134
+ * @param listTasks.sort - Property by which to sort the list of tasks.
1135
+ * @param listTasks.order - Sort order of the response, ascending or descending.
940
1136
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
941
1137
  */
942
- getTask({ taskID }, requestOptions) {
943
- if (!taskID) {
944
- throw new Error('Parameter `taskID` is required when calling `getTask`.');
945
- }
946
- const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1138
+ listTasks({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
1139
+ const requestPath = '/2/tasks';
947
1140
  const headers = {};
948
1141
  const queryParameters = {};
1142
+ if (itemsPerPage !== undefined) {
1143
+ queryParameters.itemsPerPage = itemsPerPage.toString();
1144
+ }
1145
+ if (page !== undefined) {
1146
+ queryParameters.page = page.toString();
1147
+ }
1148
+ if (action !== undefined) {
1149
+ queryParameters.action = action.toString();
1150
+ }
1151
+ if (enabled !== undefined) {
1152
+ queryParameters.enabled = enabled.toString();
1153
+ }
1154
+ if (sourceID !== undefined) {
1155
+ queryParameters.sourceID = sourceID.toString();
1156
+ }
1157
+ if (destinationID !== undefined) {
1158
+ queryParameters.destinationID = destinationID.toString();
1159
+ }
1160
+ if (triggerType !== undefined) {
1161
+ queryParameters.triggerType = triggerType.toString();
1162
+ }
1163
+ if (sort !== undefined) {
1164
+ queryParameters.sort = sort.toString();
1165
+ }
1166
+ if (order !== undefined) {
1167
+ queryParameters.order = order.toString();
1168
+ }
949
1169
  const request = {
950
1170
  method: 'GET',
951
1171
  path: requestPath,
@@ -955,26 +1175,26 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
955
1175
  return transporter.request(request, requestOptions);
956
1176
  },
957
1177
  /**
958
- * Retrieves a list of tasks.
1178
+ * Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.
959
1179
  *
960
1180
  * Required API Key ACLs:
961
1181
  * - addObject
962
1182
  * - deleteIndex
963
1183
  * - editSettings.
964
1184
  *
965
- * @param getTasks - The getTasks object.
966
- * @param getTasks.itemsPerPage - Number of items per page.
967
- * @param getTasks.page - Page number of the paginated API response.
968
- * @param getTasks.action - Actions for filtering the list of tasks.
969
- * @param getTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
970
- * @param getTasks.sourceID - Source IDs for filtering the list of tasks.
971
- * @param getTasks.destinationID - Destination IDs for filtering the list of tasks.
972
- * @param getTasks.triggerType - Type of task trigger for filtering the list of tasks.
973
- * @param getTasks.sort - Property by which to sort the list of tasks.
974
- * @param getTasks.order - Sort order of the response, ascending or descending.
1185
+ * @param listTasksV1 - The listTasksV1 object.
1186
+ * @param listTasksV1.itemsPerPage - Number of items per page.
1187
+ * @param listTasksV1.page - Page number of the paginated API response.
1188
+ * @param listTasksV1.action - Actions for filtering the list of tasks.
1189
+ * @param listTasksV1.enabled - Whether to filter the list of tasks by the `enabled` status.
1190
+ * @param listTasksV1.sourceID - Source IDs for filtering the list of tasks.
1191
+ * @param listTasksV1.destinationID - Destination IDs for filtering the list of tasks.
1192
+ * @param listTasksV1.triggerType - Type of task trigger for filtering the list of tasks.
1193
+ * @param listTasksV1.sort - Property by which to sort the list of tasks.
1194
+ * @param listTasksV1.order - Sort order of the response, ascending or descending.
975
1195
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
976
1196
  */
977
- getTasks({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
1197
+ listTasksV1({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
978
1198
  const requestPath = '/1/tasks';
979
1199
  const headers = {};
980
1200
  const queryParameters = {};
@@ -1014,24 +1234,28 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1014
1234
  return transporter.request(request, requestOptions);
1015
1235
  },
1016
1236
  /**
1017
- * Retrieves a transformation by its ID.
1237
+ * Retrieves a list of transformations.
1018
1238
  *
1019
1239
  * Required API Key ACLs:
1020
1240
  * - addObject
1021
1241
  * - deleteIndex
1022
1242
  * - editSettings.
1023
1243
  *
1024
- * @param getTransformation - The getTransformation object.
1025
- * @param getTransformation.transformationID - Unique identifier of a transformation.
1244
+ * @param listTransformations - The listTransformations object.
1245
+ * @param listTransformations.sort - Property by which to sort the list.
1246
+ * @param listTransformations.order - Sort order of the response, ascending or descending.
1026
1247
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1027
1248
  */
1028
- getTransformation({ transformationID }, requestOptions) {
1029
- if (!transformationID) {
1030
- throw new Error('Parameter `transformationID` is required when calling `getTransformation`.');
1031
- }
1032
- const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
1249
+ listTransformations({ sort, order } = {}, requestOptions = undefined) {
1250
+ const requestPath = '/1/transformations';
1033
1251
  const headers = {};
1034
1252
  const queryParameters = {};
1253
+ if (sort !== undefined) {
1254
+ queryParameters.sort = sort.toString();
1255
+ }
1256
+ if (order !== undefined) {
1257
+ queryParameters.order = order.toString();
1258
+ }
1035
1259
  const request = {
1036
1260
  method: 'GET',
1037
1261
  path: requestPath,
@@ -1041,33 +1265,37 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1041
1265
  return transporter.request(request, requestOptions);
1042
1266
  },
1043
1267
  /**
1044
- * Retrieves a list of transformations.
1268
+ * Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
1045
1269
  *
1046
1270
  * Required API Key ACLs:
1047
1271
  * - addObject
1048
1272
  * - deleteIndex
1049
1273
  * - editSettings.
1050
1274
  *
1051
- * @param getTransformations - The getTransformations object.
1052
- * @param getTransformations.sort - Property by which to sort the list.
1053
- * @param getTransformations.order - Sort order of the response, ascending or descending.
1275
+ * @param pushTask - The pushTask object.
1276
+ * @param pushTask.taskID - Unique identifier of a task.
1277
+ * @param pushTask.batchWriteParams - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
1054
1278
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1055
1279
  */
1056
- getTransformations({ sort, order } = {}, requestOptions = undefined) {
1057
- const requestPath = '/1/transformations';
1058
- const headers = {};
1059
- const queryParameters = {};
1060
- if (sort !== undefined) {
1061
- queryParameters.sort = sort.toString();
1280
+ pushTask({ taskID, batchWriteParams }, requestOptions) {
1281
+ if (!taskID) {
1282
+ throw new Error('Parameter `taskID` is required when calling `pushTask`.');
1062
1283
  }
1063
- if (order !== undefined) {
1064
- queryParameters.order = order.toString();
1284
+ if (!batchWriteParams) {
1285
+ throw new Error('Parameter `batchWriteParams` is required when calling `pushTask`.');
1065
1286
  }
1287
+ if (!batchWriteParams.requests) {
1288
+ throw new Error('Parameter `batchWriteParams.requests` is required when calling `pushTask`.');
1289
+ }
1290
+ const requestPath = '/2/tasks/{taskID}/push'.replace('{taskID}', encodeURIComponent(taskID));
1291
+ const headers = {};
1292
+ const queryParameters = {};
1066
1293
  const request = {
1067
- method: 'GET',
1294
+ method: 'POST',
1068
1295
  path: requestPath,
1069
1296
  queryParameters,
1070
1297
  headers,
1298
+ data: batchWriteParams,
1071
1299
  };
1072
1300
  return transporter.request(request, requestOptions);
1073
1301
  },
@@ -1087,6 +1315,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1087
1315
  if (!taskID) {
1088
1316
  throw new Error('Parameter `taskID` is required when calling `runTask`.');
1089
1317
  }
1318
+ const requestPath = '/2/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
1319
+ const headers = {};
1320
+ const queryParameters = {};
1321
+ const request = {
1322
+ method: 'POST',
1323
+ path: requestPath,
1324
+ queryParameters,
1325
+ headers,
1326
+ };
1327
+ return transporter.request(request, requestOptions);
1328
+ },
1329
+ /**
1330
+ * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.
1331
+ *
1332
+ * Required API Key ACLs:
1333
+ * - addObject
1334
+ * - deleteIndex
1335
+ * - editSettings.
1336
+ *
1337
+ * @param runTaskV1 - The runTaskV1 object.
1338
+ * @param runTaskV1.taskID - Unique identifier of a task.
1339
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1340
+ */
1341
+ runTaskV1({ taskID }, requestOptions) {
1342
+ if (!taskID) {
1343
+ throw new Error('Parameter `taskID` is required when calling `runTaskV1`.');
1344
+ }
1090
1345
  const requestPath = '/1/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
1091
1346
  const headers = {};
1092
1347
  const queryParameters = {};
@@ -1206,6 +1461,36 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1206
1461
  if (!taskSearch.taskIDs) {
1207
1462
  throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.');
1208
1463
  }
1464
+ const requestPath = '/2/tasks/search';
1465
+ const headers = {};
1466
+ const queryParameters = {};
1467
+ const request = {
1468
+ method: 'POST',
1469
+ path: requestPath,
1470
+ queryParameters,
1471
+ headers,
1472
+ data: taskSearch,
1473
+ };
1474
+ return transporter.request(request, requestOptions);
1475
+ },
1476
+ /**
1477
+ * Searches for tasks using the v1 endpoint, please use `searchTasks` instead.
1478
+ *
1479
+ * Required API Key ACLs:
1480
+ * - addObject
1481
+ * - deleteIndex
1482
+ * - editSettings.
1483
+ *
1484
+ * @param taskSearch - The taskSearch object.
1485
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1486
+ */
1487
+ searchTasksV1(taskSearch, requestOptions) {
1488
+ if (!taskSearch) {
1489
+ throw new Error('Parameter `taskSearch` is required when calling `searchTasksV1`.');
1490
+ }
1491
+ if (!taskSearch.taskIDs) {
1492
+ throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.');
1493
+ }
1209
1494
  const requestPath = '/1/tasks/search';
1210
1495
  const headers = {};
1211
1496
  const queryParameters = {};
@@ -1419,6 +1704,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1419
1704
  if (!taskUpdate) {
1420
1705
  throw new Error('Parameter `taskUpdate` is required when calling `updateTask`.');
1421
1706
  }
1707
+ const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1708
+ const headers = {};
1709
+ const queryParameters = {};
1710
+ const request = {
1711
+ method: 'PATCH',
1712
+ path: requestPath,
1713
+ queryParameters,
1714
+ headers,
1715
+ data: taskUpdate,
1716
+ };
1717
+ return transporter.request(request, requestOptions);
1718
+ },
1719
+ /**
1720
+ * Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.
1721
+ *
1722
+ * @param updateTaskV1 - The updateTaskV1 object.
1723
+ * @param updateTaskV1.taskID - Unique identifier of a task.
1724
+ * @param updateTaskV1.taskUpdate - The taskUpdate object.
1725
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1726
+ */
1727
+ updateTaskV1({ taskID, taskUpdate }, requestOptions) {
1728
+ if (!taskID) {
1729
+ throw new Error('Parameter `taskID` is required when calling `updateTaskV1`.');
1730
+ }
1731
+ if (!taskUpdate) {
1732
+ throw new Error('Parameter `taskUpdate` is required when calling `updateTaskV1`.');
1733
+ }
1422
1734
  const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1423
1735
  const headers = {};
1424
1736
  const queryParameters = {};