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

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