@algolia/ingestion 1.0.0-beta.8 → 1.0.0

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 (126) hide show
  1. package/dist/builds/browser.d.ts +22 -8
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +22 -8
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/ingestion.cjs +623 -187
  6. package/dist/ingestion.esm.browser.js +623 -187
  7. package/dist/ingestion.esm.node.js +623 -187
  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 +209 -65
  16. package/dist/model/clientMethodProps.d.ts.map +1 -1
  17. package/dist/model/destination.d.ts +1 -0
  18. package/dist/model/destination.d.ts.map +1 -1
  19. package/dist/model/destinationCreate.d.ts +1 -0
  20. package/dist/model/destinationCreate.d.ts.map +1 -1
  21. package/dist/model/destinationInput.d.ts +1 -2
  22. package/dist/model/destinationInput.d.ts.map +1 -1
  23. package/dist/model/destinationUpdate.d.ts +1 -0
  24. package/dist/model/destinationUpdate.d.ts.map +1 -1
  25. package/dist/model/dockerStreams.d.ts +13 -0
  26. package/dist/model/dockerStreams.d.ts.map +1 -0
  27. package/dist/model/dockerStreamsInput.d.ts +8 -0
  28. package/dist/model/dockerStreamsInput.d.ts.map +1 -0
  29. package/dist/model/dockerStreamsSyncMode.d.ts +5 -0
  30. package/dist/model/dockerStreamsSyncMode.d.ts.map +1 -0
  31. package/dist/model/entityType.d.ts +5 -0
  32. package/dist/model/entityType.d.ts.map +1 -0
  33. package/dist/model/generateTransformationCodePayload.d.ts +6 -0
  34. package/dist/model/generateTransformationCodePayload.d.ts.map +1 -0
  35. package/dist/model/generateTransformationCodeResponse.d.ts +4 -0
  36. package/dist/model/generateTransformationCodeResponse.d.ts.map +1 -0
  37. package/dist/model/index.d.ts +19 -5
  38. package/dist/model/index.d.ts.map +1 -1
  39. package/dist/model/listTasksResponseV1.d.ts +10 -0
  40. package/dist/model/listTasksResponseV1.d.ts.map +1 -0
  41. package/dist/model/model.d.ts +8 -0
  42. package/dist/model/model.d.ts.map +1 -0
  43. package/dist/model/runSourcePayload.d.ts +17 -0
  44. package/dist/model/runSourcePayload.d.ts.map +1 -0
  45. package/dist/model/runSourceResponse.d.ts +11 -0
  46. package/dist/model/runSourceResponse.d.ts.map +1 -0
  47. package/dist/model/sourceUpdateShopify.d.ts +2 -26
  48. package/dist/model/sourceUpdateShopify.d.ts.map +1 -1
  49. package/dist/model/{streamingUtilsInput.d.ts → streamingInput.d.ts} +2 -2
  50. package/dist/model/streamingInput.d.ts.map +1 -0
  51. package/dist/model/task.d.ts +12 -2
  52. package/dist/model/task.d.ts.map +1 -1
  53. package/dist/model/taskCreate.d.ts +4 -2
  54. package/dist/model/taskCreate.d.ts.map +1 -1
  55. package/dist/model/taskCreateV1.d.ts +32 -0
  56. package/dist/model/taskCreateV1.d.ts.map +1 -0
  57. package/dist/model/taskInput.d.ts +3 -4
  58. package/dist/model/taskInput.d.ts.map +1 -1
  59. package/dist/model/taskUpdate.d.ts +4 -2
  60. package/dist/model/taskUpdate.d.ts.map +1 -1
  61. package/dist/model/taskUpdateV1.d.ts +22 -0
  62. package/dist/model/taskUpdateV1.d.ts.map +1 -0
  63. package/dist/model/taskV1.d.ts +44 -0
  64. package/dist/model/taskV1.d.ts.map +1 -0
  65. package/dist/model/transformation.d.ts +5 -1
  66. package/dist/model/transformation.d.ts.map +1 -1
  67. package/dist/model/transformationCreate.d.ts +5 -1
  68. package/dist/model/transformationCreate.d.ts.map +1 -1
  69. package/dist/model/{transformationTryResponseError.d.ts → transformationError.d.ts} +2 -2
  70. package/dist/model/transformationError.d.ts.map +1 -0
  71. package/dist/model/transformationModels.d.ts +8 -0
  72. package/dist/model/transformationModels.d.ts.map +1 -0
  73. package/dist/model/transformationSearch.d.ts +1 -1
  74. package/dist/model/transformationSearch.d.ts.map +1 -1
  75. package/dist/model/transformationTry.d.ts +2 -0
  76. package/dist/model/transformationTry.d.ts.map +1 -1
  77. package/dist/model/transformationTryResponse.d.ts +2 -2
  78. package/dist/model/transformationTryResponse.d.ts.map +1 -1
  79. package/dist/src/ingestionClient.d.ts +276 -93
  80. package/dist/src/ingestionClient.d.ts.map +1 -1
  81. package/model/action.ts +13 -0
  82. package/model/batchRequest.ts +12 -0
  83. package/model/{destinationIndexPrefix.ts → batchWriteParams.ts} +7 -5
  84. package/model/clientMethodProps.ts +224 -70
  85. package/model/destination.ts +2 -0
  86. package/model/destinationCreate.ts +2 -0
  87. package/model/destinationInput.ts +1 -2
  88. package/model/destinationUpdate.ts +2 -0
  89. package/model/dockerStreams.ts +17 -0
  90. package/model/dockerStreamsInput.ts +10 -0
  91. package/model/dockerStreamsSyncMode.ts +6 -0
  92. package/model/entityType.ts +6 -0
  93. package/model/generateTransformationCodePayload.ts +9 -0
  94. package/model/generateTransformationCodeResponse.ts +5 -0
  95. package/model/index.ts +19 -5
  96. package/model/listTasksResponseV1.ts +13 -0
  97. package/model/model.ts +13 -0
  98. package/model/runSourcePayload.ts +22 -0
  99. package/model/runSourceResponse.ts +13 -0
  100. package/model/sourceUpdateShopify.ts +2 -32
  101. package/model/{streamingUtilsInput.ts → streamingInput.ts} +1 -1
  102. package/model/task.ts +14 -2
  103. package/model/taskCreate.ts +5 -3
  104. package/model/taskCreateV1.ts +41 -0
  105. package/model/taskInput.ts +3 -8
  106. package/model/taskUpdate.ts +4 -2
  107. package/model/taskUpdateV1.ts +28 -0
  108. package/model/taskV1.ts +56 -0
  109. package/model/transformation.ts +6 -1
  110. package/model/transformationCreate.ts +6 -1
  111. package/model/{transformationTryResponseError.ts → transformationError.ts} +1 -1
  112. package/model/transformationModels.ts +10 -0
  113. package/model/transformationSearch.ts +1 -1
  114. package/model/transformationTry.ts +4 -0
  115. package/model/transformationTryResponse.ts +2 -2
  116. package/package.json +7 -7
  117. package/dist/model/destinationIndexPrefix.d.ts +0 -7
  118. package/dist/model/destinationIndexPrefix.d.ts.map +0 -1
  119. package/dist/model/onDemandDateUtilsInput.d.ts +0 -16
  120. package/dist/model/onDemandDateUtilsInput.d.ts.map +0 -1
  121. package/dist/model/scheduleDateUtilsInput.d.ts +0 -12
  122. package/dist/model/scheduleDateUtilsInput.d.ts.map +0 -1
  123. package/dist/model/streamingUtilsInput.d.ts.map +0 -1
  124. package/dist/model/transformationTryResponseError.d.ts.map +0 -1
  125. package/model/onDemandDateUtilsInput.ts +0 -20
  126. package/model/scheduleDateUtilsInput.ts +0 -15
@@ -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.8';
5
+ const apiClientVersion = '1.0.0';
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 = {};
@@ -244,9 +275,6 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
244
275
  if (!transformationCreate.name) {
245
276
  throw new Error('Parameter `transformationCreate.name` is required when calling `createTransformation`.');
246
277
  }
247
- if (!transformationCreate.description) {
248
- throw new Error('Parameter `transformationCreate.description` is required when calling `createTransformation`.');
249
- }
250
278
  const requestPath = '/1/transformations';
251
279
  const headers = {};
252
280
  const queryParameters = {};
@@ -447,6 +475,28 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
447
475
  if (!taskID) {
448
476
  throw new Error('Parameter `taskID` is required when calling `deleteTask`.');
449
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
+ }
450
500
  const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
451
501
  const headers = {};
452
502
  const queryParameters = {};
@@ -496,6 +546,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
496
546
  if (!taskID) {
497
547
  throw new Error('Parameter `taskID` is required when calling `disableTask`.');
498
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
+ }
499
576
  const requestPath = '/1/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID));
500
577
  const headers = {};
501
578
  const queryParameters = {};
@@ -523,6 +600,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
523
600
  if (!taskID) {
524
601
  throw new Error('Parameter `taskID` is required when calling `enableTask`.');
525
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
+ }
526
630
  const requestPath = '/1/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID));
527
631
  const headers = {};
528
632
  const queryParameters = {};
@@ -534,6 +638,39 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
534
638
  };
535
639
  return transporter.request(request, requestOptions);
536
640
  },
641
+ /**
642
+ * Generates code for the selected model based on the given prompt.
643
+ *
644
+ * Required API Key ACLs:
645
+ * - addObject
646
+ * - deleteIndex
647
+ * - editSettings.
648
+ *
649
+ * @param generateTransformationCodePayload - The generateTransformationCodePayload object.
650
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
651
+ */
652
+ generateTransformationCode(generateTransformationCodePayload, requestOptions) {
653
+ if (!generateTransformationCodePayload) {
654
+ throw new Error('Parameter `generateTransformationCodePayload` is required when calling `generateTransformationCode`.');
655
+ }
656
+ if (!generateTransformationCodePayload.id) {
657
+ throw new Error('Parameter `generateTransformationCodePayload.id` is required when calling `generateTransformationCode`.');
658
+ }
659
+ if (!generateTransformationCodePayload.userPrompt) {
660
+ throw new Error('Parameter `generateTransformationCodePayload.userPrompt` is required when calling `generateTransformationCode`.');
661
+ }
662
+ const requestPath = '/1/transformations/models';
663
+ const headers = {};
664
+ const queryParameters = {};
665
+ const request = {
666
+ method: 'POST',
667
+ path: requestPath,
668
+ queryParameters,
669
+ headers,
670
+ data: generateTransformationCodePayload,
671
+ };
672
+ return transporter.request(request, requestOptions);
673
+ },
537
674
  /**
538
675
  * Retrieves an authentication resource by its ID.
539
676
  *
@@ -562,44 +699,165 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
562
699
  return transporter.request(request, requestOptions);
563
700
  },
564
701
  /**
565
- * Retrieves a list of all authentication resources.
702
+ * Retrieves a destination by its ID.
566
703
  *
567
704
  * Required API Key ACLs:
568
705
  * - addObject
569
706
  * - deleteIndex
570
707
  * - editSettings.
571
708
  *
572
- * @param getAuthentications - The getAuthentications object.
573
- * @param getAuthentications.itemsPerPage - Number of items per page.
574
- * @param getAuthentications.page - Page number of the paginated API response.
575
- * @param getAuthentications.type - Type of authentication resource to retrieve.
576
- * @param getAuthentications.platform - Ecommerce platform for which to retrieve authentication resources.
577
- * @param getAuthentications.sort - Property by which to sort the list of authentication resources.
578
- * @param getAuthentications.order - Sort order of the response, ascending or descending.
709
+ * @param getDestination - The getDestination object.
710
+ * @param getDestination.destinationID - Unique identifier of a destination.
579
711
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
580
712
  */
581
- getAuthentications({ itemsPerPage, page, type, platform, sort, order, } = {}, requestOptions = undefined) {
582
- const requestPath = '/1/authentications';
713
+ getDestination({ destinationID }, requestOptions) {
714
+ if (!destinationID) {
715
+ throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
716
+ }
717
+ const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
583
718
  const headers = {};
584
719
  const queryParameters = {};
585
- if (itemsPerPage !== undefined) {
586
- queryParameters.itemsPerPage = itemsPerPage.toString();
720
+ const request = {
721
+ method: 'GET',
722
+ path: requestPath,
723
+ queryParameters,
724
+ headers,
725
+ };
726
+ return transporter.request(request, requestOptions);
727
+ },
728
+ /**
729
+ * Retrieves a single task run event by its ID.
730
+ *
731
+ * Required API Key ACLs:
732
+ * - addObject
733
+ * - deleteIndex
734
+ * - editSettings.
735
+ *
736
+ * @param getEvent - The getEvent object.
737
+ * @param getEvent.runID - Unique identifier of a task run.
738
+ * @param getEvent.eventID - Unique identifier of an event.
739
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
740
+ */
741
+ getEvent({ runID, eventID }, requestOptions) {
742
+ if (!runID) {
743
+ throw new Error('Parameter `runID` is required when calling `getEvent`.');
587
744
  }
588
- if (page !== undefined) {
589
- queryParameters.page = page.toString();
745
+ if (!eventID) {
746
+ throw new Error('Parameter `eventID` is required when calling `getEvent`.');
590
747
  }
591
- if (type !== undefined) {
592
- queryParameters.type = type.toString();
748
+ const requestPath = '/1/runs/{runID}/events/{eventID}'
749
+ .replace('{runID}', encodeURIComponent(runID))
750
+ .replace('{eventID}', encodeURIComponent(eventID));
751
+ const headers = {};
752
+ const queryParameters = {};
753
+ const request = {
754
+ method: 'GET',
755
+ path: requestPath,
756
+ queryParameters,
757
+ headers,
758
+ };
759
+ return transporter.request(request, requestOptions);
760
+ },
761
+ /**
762
+ * Retrieve a single task run by its ID.
763
+ *
764
+ * Required API Key ACLs:
765
+ * - addObject
766
+ * - deleteIndex
767
+ * - editSettings.
768
+ *
769
+ * @param getRun - The getRun object.
770
+ * @param getRun.runID - Unique identifier of a task run.
771
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
772
+ */
773
+ getRun({ runID }, requestOptions) {
774
+ if (!runID) {
775
+ throw new Error('Parameter `runID` is required when calling `getRun`.');
593
776
  }
594
- if (platform !== undefined) {
595
- queryParameters.platform = platform.toString();
777
+ const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
778
+ const headers = {};
779
+ const queryParameters = {};
780
+ const request = {
781
+ method: 'GET',
782
+ path: requestPath,
783
+ queryParameters,
784
+ headers,
785
+ };
786
+ return transporter.request(request, requestOptions);
787
+ },
788
+ /**
789
+ * Retrieve a source by its ID.
790
+ *
791
+ * Required API Key ACLs:
792
+ * - addObject
793
+ * - deleteIndex
794
+ * - editSettings.
795
+ *
796
+ * @param getSource - The getSource object.
797
+ * @param getSource.sourceID - Unique identifier of a source.
798
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
799
+ */
800
+ getSource({ sourceID }, requestOptions) {
801
+ if (!sourceID) {
802
+ throw new Error('Parameter `sourceID` is required when calling `getSource`.');
596
803
  }
597
- if (sort !== undefined) {
598
- queryParameters.sort = sort.toString();
804
+ const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
805
+ const headers = {};
806
+ const queryParameters = {};
807
+ const request = {
808
+ method: 'GET',
809
+ path: requestPath,
810
+ queryParameters,
811
+ headers,
812
+ };
813
+ return transporter.request(request, requestOptions);
814
+ },
815
+ /**
816
+ * Retrieves a task by its ID.
817
+ *
818
+ * Required API Key ACLs:
819
+ * - addObject
820
+ * - deleteIndex
821
+ * - editSettings.
822
+ *
823
+ * @param getTask - The getTask object.
824
+ * @param getTask.taskID - Unique identifier of a task.
825
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
826
+ */
827
+ getTask({ taskID }, requestOptions) {
828
+ if (!taskID) {
829
+ throw new Error('Parameter `taskID` is required when calling `getTask`.');
599
830
  }
600
- if (order !== undefined) {
601
- queryParameters.order = order.toString();
831
+ const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
832
+ const headers = {};
833
+ const queryParameters = {};
834
+ const request = {
835
+ method: 'GET',
836
+ path: requestPath,
837
+ queryParameters,
838
+ headers,
839
+ };
840
+ return transporter.request(request, requestOptions);
841
+ },
842
+ /**
843
+ * Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.
844
+ *
845
+ * Required API Key ACLs:
846
+ * - addObject
847
+ * - deleteIndex
848
+ * - editSettings.
849
+ *
850
+ * @param getTaskV1 - The getTaskV1 object.
851
+ * @param getTaskV1.taskID - Unique identifier of a task.
852
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
853
+ */
854
+ getTaskV1({ taskID }, requestOptions) {
855
+ if (!taskID) {
856
+ throw new Error('Parameter `taskID` is required when calling `getTaskV1`.');
602
857
  }
858
+ const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
859
+ const headers = {};
860
+ const queryParameters = {};
603
861
  const request = {
604
862
  method: 'GET',
605
863
  path: requestPath,
@@ -609,22 +867,22 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
609
867
  return transporter.request(request, requestOptions);
610
868
  },
611
869
  /**
612
- * Retrieves a destination by its ID.
870
+ * Retrieves a transformation by its ID.
613
871
  *
614
872
  * Required API Key ACLs:
615
873
  * - addObject
616
874
  * - deleteIndex
617
875
  * - editSettings.
618
876
  *
619
- * @param getDestination - The getDestination object.
620
- * @param getDestination.destinationID - Unique identifier of a destination.
877
+ * @param getTransformation - The getTransformation object.
878
+ * @param getTransformation.transformationID - Unique identifier of a transformation.
621
879
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
622
880
  */
623
- getDestination({ destinationID }, requestOptions) {
624
- if (!destinationID) {
625
- throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
881
+ getTransformation({ transformationID }, requestOptions) {
882
+ if (!transformationID) {
883
+ throw new Error('Parameter `transformationID` is required when calling `getTransformation`.');
626
884
  }
627
- const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
885
+ const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
628
886
  const headers = {};
629
887
  const queryParameters = {};
630
888
  const request = {
@@ -636,24 +894,24 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
636
894
  return transporter.request(request, requestOptions);
637
895
  },
638
896
  /**
639
- * Retrieves a list of destinations.
897
+ * Retrieves a list of all authentication resources.
640
898
  *
641
899
  * Required API Key ACLs:
642
900
  * - addObject
643
901
  * - deleteIndex
644
902
  * - editSettings.
645
903
  *
646
- * @param getDestinations - The getDestinations object.
647
- * @param getDestinations.itemsPerPage - Number of items per page.
648
- * @param getDestinations.page - Page number of the paginated API response.
649
- * @param getDestinations.type - Destination type.
650
- * @param getDestinations.authenticationID - Authentication ID used by destinations.
651
- * @param getDestinations.sort - Property by which to sort the destinations.
652
- * @param getDestinations.order - Sort order of the response, ascending or descending.
904
+ * @param listAuthentications - The listAuthentications object.
905
+ * @param listAuthentications.itemsPerPage - Number of items per page.
906
+ * @param listAuthentications.page - Page number of the paginated API response.
907
+ * @param listAuthentications.type - Type of authentication resource to retrieve.
908
+ * @param listAuthentications.platform - Ecommerce platform for which to retrieve authentication resources.
909
+ * @param listAuthentications.sort - Property by which to sort the list of authentication resources.
910
+ * @param listAuthentications.order - Sort order of the response, ascending or descending.
653
911
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
654
912
  */
655
- getDestinations({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
656
- const requestPath = '/1/destinations';
913
+ listAuthentications({ itemsPerPage, page, type, platform, sort, order, } = {}, requestOptions = undefined) {
914
+ const requestPath = '/1/authentications';
657
915
  const headers = {};
658
916
  const queryParameters = {};
659
917
  if (itemsPerPage !== undefined) {
@@ -665,8 +923,8 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
665
923
  if (type !== undefined) {
666
924
  queryParameters.type = type.toString();
667
925
  }
668
- if (authenticationID !== undefined) {
669
- queryParameters.authenticationID = authenticationID.toString();
926
+ if (platform !== undefined) {
927
+ queryParameters.platform = platform.toString();
670
928
  }
671
929
  if (sort !== undefined) {
672
930
  queryParameters.sort = sort.toString();
@@ -683,30 +941,44 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
683
941
  return transporter.request(request, requestOptions);
684
942
  },
685
943
  /**
686
- * Retrieves a single task run event by its ID.
944
+ * Retrieves a list of destinations.
687
945
  *
688
946
  * Required API Key ACLs:
689
947
  * - addObject
690
948
  * - deleteIndex
691
949
  * - editSettings.
692
950
  *
693
- * @param getEvent - The getEvent object.
694
- * @param getEvent.runID - Unique identifier of a task run.
695
- * @param getEvent.eventID - Unique identifier of an event.
951
+ * @param listDestinations - The listDestinations object.
952
+ * @param listDestinations.itemsPerPage - Number of items per page.
953
+ * @param listDestinations.page - Page number of the paginated API response.
954
+ * @param listDestinations.type - Destination type.
955
+ * @param listDestinations.authenticationID - Authentication ID used by destinations.
956
+ * @param listDestinations.sort - Property by which to sort the destinations.
957
+ * @param listDestinations.order - Sort order of the response, ascending or descending.
696
958
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
697
959
  */
698
- getEvent({ runID, eventID }, requestOptions) {
699
- if (!runID) {
700
- throw new Error('Parameter `runID` is required when calling `getEvent`.');
960
+ listDestinations({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
961
+ const requestPath = '/1/destinations';
962
+ const headers = {};
963
+ const queryParameters = {};
964
+ if (itemsPerPage !== undefined) {
965
+ queryParameters.itemsPerPage = itemsPerPage.toString();
966
+ }
967
+ if (page !== undefined) {
968
+ queryParameters.page = page.toString();
969
+ }
970
+ if (type !== undefined) {
971
+ queryParameters.type = type.toString();
972
+ }
973
+ if (authenticationID !== undefined) {
974
+ queryParameters.authenticationID = authenticationID.toString();
701
975
  }
702
- if (!eventID) {
703
- throw new Error('Parameter `eventID` is required when calling `getEvent`.');
976
+ if (sort !== undefined) {
977
+ queryParameters.sort = sort.toString();
978
+ }
979
+ if (order !== undefined) {
980
+ queryParameters.order = order.toString();
704
981
  }
705
- const requestPath = '/1/runs/{runID}/events/{eventID}'
706
- .replace('{runID}', encodeURIComponent(runID))
707
- .replace('{eventID}', encodeURIComponent(eventID));
708
- const headers = {};
709
- const queryParameters = {};
710
982
  const request = {
711
983
  method: 'GET',
712
984
  path: requestPath,
@@ -723,21 +995,21 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
723
995
  * - deleteIndex
724
996
  * - editSettings.
725
997
  *
726
- * @param getEvents - The getEvents object.
727
- * @param getEvents.runID - Unique identifier of a task run.
728
- * @param getEvents.itemsPerPage - Number of items per page.
729
- * @param getEvents.page - Page number of the paginated API response.
730
- * @param getEvents.status - Event status for filtering the list of task runs.
731
- * @param getEvents.type - Event type for filtering the list of task runs.
732
- * @param getEvents.sort - Property by which to sort the list of task run events.
733
- * @param getEvents.order - Sort order of the response, ascending or descending.
734
- * @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.
735
- * @param getEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
998
+ * @param listEvents - The listEvents object.
999
+ * @param listEvents.runID - Unique identifier of a task run.
1000
+ * @param listEvents.itemsPerPage - Number of items per page.
1001
+ * @param listEvents.page - Page number of the paginated API response.
1002
+ * @param listEvents.status - Event status for filtering the list of task runs.
1003
+ * @param listEvents.type - Event type for filtering the list of task runs.
1004
+ * @param listEvents.sort - Property by which to sort the list of task run events.
1005
+ * @param listEvents.order - Sort order of the response, ascending or descending.
1006
+ * @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.
1007
+ * @param listEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
736
1008
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
737
1009
  */
738
- getEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
1010
+ listEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
739
1011
  if (!runID) {
740
- throw new Error('Parameter `runID` is required when calling `getEvents`.');
1012
+ throw new Error('Parameter `runID` is required when calling `listEvents`.');
741
1013
  }
742
1014
  const requestPath = '/1/runs/{runID}/events'.replace('{runID}', encodeURIComponent(runID));
743
1015
  const headers = {};
@@ -774,33 +1046,6 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
774
1046
  };
775
1047
  return transporter.request(request, requestOptions);
776
1048
  },
777
- /**
778
- * Retrieve a single task run by its ID.
779
- *
780
- * Required API Key ACLs:
781
- * - addObject
782
- * - deleteIndex
783
- * - editSettings.
784
- *
785
- * @param getRun - The getRun object.
786
- * @param getRun.runID - Unique identifier of a task run.
787
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
788
- */
789
- getRun({ runID }, requestOptions) {
790
- if (!runID) {
791
- throw new Error('Parameter `runID` is required when calling `getRun`.');
792
- }
793
- const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
794
- const headers = {};
795
- const queryParameters = {};
796
- const request = {
797
- method: 'GET',
798
- path: requestPath,
799
- queryParameters,
800
- headers,
801
- };
802
- return transporter.request(request, requestOptions);
803
- },
804
1049
  /**
805
1050
  * Retrieve a list of task runs.
806
1051
  *
@@ -809,18 +1054,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
809
1054
  * - deleteIndex
810
1055
  * - editSettings.
811
1056
  *
812
- * @param getRuns - The getRuns object.
813
- * @param getRuns.itemsPerPage - Number of items per page.
814
- * @param getRuns.page - Page number of the paginated API response.
815
- * @param getRuns.status - Run status for filtering the list of task runs.
816
- * @param getRuns.taskID - Task ID for filtering the list of task runs.
817
- * @param getRuns.sort - Property by which to sort the list of task runs.
818
- * @param getRuns.order - Sort order of the response, ascending or descending.
819
- * @param getRuns.startDate - Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.
820
- * @param getRuns.endDate - Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.
1057
+ * @param listRuns - The listRuns object.
1058
+ * @param listRuns.itemsPerPage - Number of items per page.
1059
+ * @param listRuns.page - Page number of the paginated API response.
1060
+ * @param listRuns.status - Run status for filtering the list of task runs.
1061
+ * @param listRuns.taskID - Task ID for filtering the list of task runs.
1062
+ * @param listRuns.sort - Property by which to sort the list of task runs.
1063
+ * @param listRuns.order - Sort order of the response, ascending or descending.
1064
+ * @param listRuns.startDate - Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.
1065
+ * @param listRuns.endDate - Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.
821
1066
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
822
1067
  */
823
- getRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
1068
+ listRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
824
1069
  const requestPath = '/1/runs';
825
1070
  const headers = {};
826
1071
  const queryParameters = {};
@@ -856,33 +1101,6 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
856
1101
  };
857
1102
  return transporter.request(request, requestOptions);
858
1103
  },
859
- /**
860
- * Retrieve a source by its ID.
861
- *
862
- * Required API Key ACLs:
863
- * - addObject
864
- * - deleteIndex
865
- * - editSettings.
866
- *
867
- * @param getSource - The getSource object.
868
- * @param getSource.sourceID - Unique identifier of a source.
869
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
870
- */
871
- getSource({ sourceID }, requestOptions) {
872
- if (!sourceID) {
873
- throw new Error('Parameter `sourceID` is required when calling `getSource`.');
874
- }
875
- const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
876
- const headers = {};
877
- const queryParameters = {};
878
- const request = {
879
- method: 'GET',
880
- path: requestPath,
881
- queryParameters,
882
- headers,
883
- };
884
- return transporter.request(request, requestOptions);
885
- },
886
1104
  /**
887
1105
  * Retrieves a list of sources.
888
1106
  *
@@ -891,16 +1109,16 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
891
1109
  * - deleteIndex
892
1110
  * - editSettings.
893
1111
  *
894
- * @param getSources - The getSources object.
895
- * @param getSources.itemsPerPage - Number of items per page.
896
- * @param getSources.page - Page number of the paginated API response.
897
- * @param getSources.type - Source type. Some sources require authentication.
898
- * @param getSources.authenticationID - Authentication IDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication resource.
899
- * @param getSources.sort - Property by which to sort the list of sources.
900
- * @param getSources.order - Sort order of the response, ascending or descending.
1112
+ * @param listSources - The listSources object.
1113
+ * @param listSources.itemsPerPage - Number of items per page.
1114
+ * @param listSources.page - Page number of the paginated API response.
1115
+ * @param listSources.type - Source type. Some sources require authentication.
1116
+ * @param listSources.authenticationID - Authentication IDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication resource.
1117
+ * @param listSources.sort - Property by which to sort the list of sources.
1118
+ * @param listSources.order - Sort order of the response, ascending or descending.
901
1119
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
902
1120
  */
903
- getSources({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
1121
+ listSources({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
904
1122
  const requestPath = '/1/sources';
905
1123
  const headers = {};
906
1124
  const queryParameters = {};
@@ -931,24 +1149,56 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
931
1149
  return transporter.request(request, requestOptions);
932
1150
  },
933
1151
  /**
934
- * Retrieves a task by its ID.
1152
+ * Retrieves a list of tasks.
935
1153
  *
936
1154
  * Required API Key ACLs:
937
1155
  * - addObject
938
1156
  * - deleteIndex
939
1157
  * - editSettings.
940
1158
  *
941
- * @param getTask - The getTask object.
942
- * @param getTask.taskID - Unique identifier of a task.
1159
+ * @param listTasks - The listTasks object.
1160
+ * @param listTasks.itemsPerPage - Number of items per page.
1161
+ * @param listTasks.page - Page number of the paginated API response.
1162
+ * @param listTasks.action - Actions for filtering the list of tasks.
1163
+ * @param listTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
1164
+ * @param listTasks.sourceID - Source IDs for filtering the list of tasks.
1165
+ * @param listTasks.destinationID - Destination IDs for filtering the list of tasks.
1166
+ * @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.
1167
+ * @param listTasks.sort - Property by which to sort the list of tasks.
1168
+ * @param listTasks.order - Sort order of the response, ascending or descending.
943
1169
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
944
1170
  */
945
- getTask({ taskID }, requestOptions) {
946
- if (!taskID) {
947
- throw new Error('Parameter `taskID` is required when calling `getTask`.');
948
- }
949
- const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1171
+ listTasks({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
1172
+ const requestPath = '/2/tasks';
950
1173
  const headers = {};
951
1174
  const queryParameters = {};
1175
+ if (itemsPerPage !== undefined) {
1176
+ queryParameters.itemsPerPage = itemsPerPage.toString();
1177
+ }
1178
+ if (page !== undefined) {
1179
+ queryParameters.page = page.toString();
1180
+ }
1181
+ if (action !== undefined) {
1182
+ queryParameters.action = action.toString();
1183
+ }
1184
+ if (enabled !== undefined) {
1185
+ queryParameters.enabled = enabled.toString();
1186
+ }
1187
+ if (sourceID !== undefined) {
1188
+ queryParameters.sourceID = sourceID.toString();
1189
+ }
1190
+ if (destinationID !== undefined) {
1191
+ queryParameters.destinationID = destinationID.toString();
1192
+ }
1193
+ if (triggerType !== undefined) {
1194
+ queryParameters.triggerType = triggerType.toString();
1195
+ }
1196
+ if (sort !== undefined) {
1197
+ queryParameters.sort = sort.toString();
1198
+ }
1199
+ if (order !== undefined) {
1200
+ queryParameters.order = order.toString();
1201
+ }
952
1202
  const request = {
953
1203
  method: 'GET',
954
1204
  path: requestPath,
@@ -958,26 +1208,26 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
958
1208
  return transporter.request(request, requestOptions);
959
1209
  },
960
1210
  /**
961
- * Retrieves a list of tasks.
1211
+ * Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.
962
1212
  *
963
1213
  * Required API Key ACLs:
964
1214
  * - addObject
965
1215
  * - deleteIndex
966
1216
  * - editSettings.
967
1217
  *
968
- * @param getTasks - The getTasks object.
969
- * @param getTasks.itemsPerPage - Number of items per page.
970
- * @param getTasks.page - Page number of the paginated API response.
971
- * @param getTasks.action - Actions for filtering the list of tasks.
972
- * @param getTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
973
- * @param getTasks.sourceID - Source IDs for filtering the list of tasks.
974
- * @param getTasks.destinationID - Destination IDs for filtering the list of tasks.
975
- * @param getTasks.triggerType - Type of task trigger for filtering the list of tasks.
976
- * @param getTasks.sort - Property by which to sort the list of tasks.
977
- * @param getTasks.order - Sort order of the response, ascending or descending.
1218
+ * @param listTasksV1 - The listTasksV1 object.
1219
+ * @param listTasksV1.itemsPerPage - Number of items per page.
1220
+ * @param listTasksV1.page - Page number of the paginated API response.
1221
+ * @param listTasksV1.action - Actions for filtering the list of tasks.
1222
+ * @param listTasksV1.enabled - Whether to filter the list of tasks by the `enabled` status.
1223
+ * @param listTasksV1.sourceID - Source IDs for filtering the list of tasks.
1224
+ * @param listTasksV1.destinationID - Destination IDs for filtering the list of tasks.
1225
+ * @param listTasksV1.triggerType - Type of task trigger for filtering the list of tasks.
1226
+ * @param listTasksV1.sort - Property by which to sort the list of tasks.
1227
+ * @param listTasksV1.order - Sort order of the response, ascending or descending.
978
1228
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
979
1229
  */
980
- getTasks({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
1230
+ listTasksV1({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
981
1231
  const requestPath = '/1/tasks';
982
1232
  const headers = {};
983
1233
  const queryParameters = {};
@@ -1017,22 +1267,17 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1017
1267
  return transporter.request(request, requestOptions);
1018
1268
  },
1019
1269
  /**
1020
- * Retrieves a transformation by its ID.
1270
+ * Retrieves a list of existing LLM transformation helpers.
1021
1271
  *
1022
1272
  * Required API Key ACLs:
1023
1273
  * - addObject
1024
1274
  * - deleteIndex
1025
1275
  * - editSettings.
1026
1276
  *
1027
- * @param getTransformation - The getTransformation object.
1028
- * @param getTransformation.transformationID - Unique identifier of a transformation.
1029
1277
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1030
1278
  */
1031
- getTransformation({ transformationID }, requestOptions) {
1032
- if (!transformationID) {
1033
- throw new Error('Parameter `transformationID` is required when calling `getTransformation`.');
1034
- }
1035
- const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
1279
+ listTransformationModels(requestOptions) {
1280
+ const requestPath = '/1/transformations/models';
1036
1281
  const headers = {};
1037
1282
  const queryParameters = {};
1038
1283
  const request = {
@@ -1051,15 +1296,23 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1051
1296
  * - deleteIndex
1052
1297
  * - editSettings.
1053
1298
  *
1054
- * @param getTransformations - The getTransformations object.
1055
- * @param getTransformations.sort - Property by which to sort the list.
1056
- * @param getTransformations.order - Sort order of the response, ascending or descending.
1299
+ * @param listTransformations - The listTransformations object.
1300
+ * @param listTransformations.itemsPerPage - Number of items per page.
1301
+ * @param listTransformations.page - Page number of the paginated API response.
1302
+ * @param listTransformations.sort - Property by which to sort the list.
1303
+ * @param listTransformations.order - Sort order of the response, ascending or descending.
1057
1304
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1058
1305
  */
1059
- getTransformations({ sort, order } = {}, requestOptions = undefined) {
1306
+ listTransformations({ itemsPerPage, page, sort, order } = {}, requestOptions = undefined) {
1060
1307
  const requestPath = '/1/transformations';
1061
1308
  const headers = {};
1062
1309
  const queryParameters = {};
1310
+ if (itemsPerPage !== undefined) {
1311
+ queryParameters.itemsPerPage = itemsPerPage.toString();
1312
+ }
1313
+ if (page !== undefined) {
1314
+ queryParameters.page = page.toString();
1315
+ }
1063
1316
  if (sort !== undefined) {
1064
1317
  queryParameters.sort = sort.toString();
1065
1318
  }
@@ -1074,6 +1327,70 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1074
1327
  };
1075
1328
  return transporter.request(request, requestOptions);
1076
1329
  },
1330
+ /**
1331
+ * Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
1332
+ *
1333
+ * Required API Key ACLs:
1334
+ * - addObject
1335
+ * - deleteIndex
1336
+ * - editSettings.
1337
+ *
1338
+ * @param pushTask - The pushTask object.
1339
+ * @param pushTask.taskID - Unique identifier of a task.
1340
+ * @param pushTask.batchWriteParams - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
1341
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1342
+ */
1343
+ pushTask({ taskID, batchWriteParams }, requestOptions) {
1344
+ if (!taskID) {
1345
+ throw new Error('Parameter `taskID` is required when calling `pushTask`.');
1346
+ }
1347
+ if (!batchWriteParams) {
1348
+ throw new Error('Parameter `batchWriteParams` is required when calling `pushTask`.');
1349
+ }
1350
+ if (!batchWriteParams.requests) {
1351
+ throw new Error('Parameter `batchWriteParams.requests` is required when calling `pushTask`.');
1352
+ }
1353
+ const requestPath = '/2/tasks/{taskID}/push'.replace('{taskID}', encodeURIComponent(taskID));
1354
+ const headers = {};
1355
+ const queryParameters = {};
1356
+ const request = {
1357
+ method: 'POST',
1358
+ path: requestPath,
1359
+ queryParameters,
1360
+ headers,
1361
+ data: batchWriteParams,
1362
+ };
1363
+ return transporter.request(request, requestOptions);
1364
+ },
1365
+ /**
1366
+ * Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
1367
+ *
1368
+ * Required API Key ACLs:
1369
+ * - addObject
1370
+ * - deleteIndex
1371
+ * - editSettings.
1372
+ *
1373
+ * @param runSource - The runSource object.
1374
+ * @param runSource.sourceID - Unique identifier of a source.
1375
+ * @param runSource.runSourcePayload -.
1376
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1377
+ */
1378
+ runSource({ sourceID, runSourcePayload }, requestOptions) {
1379
+ if (!sourceID) {
1380
+ throw new Error('Parameter `sourceID` is required when calling `runSource`.');
1381
+ }
1382
+ const requestPath = '/1/sources/{sourceID}/run'.replace('{sourceID}', encodeURIComponent(sourceID));
1383
+ const headers = {};
1384
+ const queryParameters = {};
1385
+ const request = {
1386
+ method: 'POST',
1387
+ path: requestPath,
1388
+ queryParameters,
1389
+ headers,
1390
+ data: runSourcePayload ? runSourcePayload : {},
1391
+ };
1392
+ return transporter.request(request, requestOptions);
1393
+ },
1077
1394
  /**
1078
1395
  * Runs a task. You can check the status of task runs with the observability endpoints.
1079
1396
  *
@@ -1090,6 +1407,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1090
1407
  if (!taskID) {
1091
1408
  throw new Error('Parameter `taskID` is required when calling `runTask`.');
1092
1409
  }
1410
+ const requestPath = '/2/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
1411
+ const headers = {};
1412
+ const queryParameters = {};
1413
+ const request = {
1414
+ method: 'POST',
1415
+ path: requestPath,
1416
+ queryParameters,
1417
+ headers,
1418
+ };
1419
+ return transporter.request(request, requestOptions);
1420
+ },
1421
+ /**
1422
+ * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.
1423
+ *
1424
+ * Required API Key ACLs:
1425
+ * - addObject
1426
+ * - deleteIndex
1427
+ * - editSettings.
1428
+ *
1429
+ * @param runTaskV1 - The runTaskV1 object.
1430
+ * @param runTaskV1.taskID - Unique identifier of a task.
1431
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1432
+ */
1433
+ runTaskV1({ taskID }, requestOptions) {
1434
+ if (!taskID) {
1435
+ throw new Error('Parameter `taskID` is required when calling `runTaskV1`.');
1436
+ }
1093
1437
  const requestPath = '/1/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
1094
1438
  const headers = {};
1095
1439
  const queryParameters = {};
@@ -1209,6 +1553,36 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1209
1553
  if (!taskSearch.taskIDs) {
1210
1554
  throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.');
1211
1555
  }
1556
+ const requestPath = '/2/tasks/search';
1557
+ const headers = {};
1558
+ const queryParameters = {};
1559
+ const request = {
1560
+ method: 'POST',
1561
+ path: requestPath,
1562
+ queryParameters,
1563
+ headers,
1564
+ data: taskSearch,
1565
+ };
1566
+ return transporter.request(request, requestOptions);
1567
+ },
1568
+ /**
1569
+ * Searches for tasks using the v1 endpoint, please use `searchTasks` instead.
1570
+ *
1571
+ * Required API Key ACLs:
1572
+ * - addObject
1573
+ * - deleteIndex
1574
+ * - editSettings.
1575
+ *
1576
+ * @param taskSearch - The taskSearch object.
1577
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1578
+ */
1579
+ searchTasksV1(taskSearch, requestOptions) {
1580
+ if (!taskSearch) {
1581
+ throw new Error('Parameter `taskSearch` is required when calling `searchTasksV1`.');
1582
+ }
1583
+ if (!taskSearch.taskIDs) {
1584
+ throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.');
1585
+ }
1212
1586
  const requestPath = '/1/tasks/search';
1213
1587
  const headers = {};
1214
1588
  const queryParameters = {};
@@ -1236,8 +1610,8 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1236
1610
  if (!transformationSearch) {
1237
1611
  throw new Error('Parameter `transformationSearch` is required when calling `searchTransformations`.');
1238
1612
  }
1239
- if (!transformationSearch.transformationsIDs) {
1240
- throw new Error('Parameter `transformationSearch.transformationsIDs` is required when calling `searchTransformations`.');
1613
+ if (!transformationSearch.transformationIDs) {
1614
+ throw new Error('Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.');
1241
1615
  }
1242
1616
  const requestPath = '/1/transformations/search';
1243
1617
  const headers = {};
@@ -1279,7 +1653,7 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1279
1653
  return transporter.request(request, requestOptions);
1280
1654
  },
1281
1655
  /**
1282
- * Try a transformation.
1656
+ * Try a transformation before creating it.
1283
1657
  *
1284
1658
  * Required API Key ACLs:
1285
1659
  * - addObject
@@ -1289,15 +1663,15 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1289
1663
  * @param transformationTry - The transformationTry object.
1290
1664
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1291
1665
  */
1292
- tryTransformations(transformationTry, requestOptions) {
1666
+ tryTransformation(transformationTry, requestOptions) {
1293
1667
  if (!transformationTry) {
1294
- throw new Error('Parameter `transformationTry` is required when calling `tryTransformations`.');
1668
+ throw new Error('Parameter `transformationTry` is required when calling `tryTransformation`.');
1295
1669
  }
1296
1670
  if (!transformationTry.code) {
1297
- throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformations`.');
1671
+ throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformation`.');
1298
1672
  }
1299
1673
  if (!transformationTry.sampleRecord) {
1300
- throw new Error('Parameter `transformationTry.sampleRecord` is required when calling `tryTransformations`.');
1674
+ throw new Error('Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.');
1301
1675
  }
1302
1676
  const requestPath = '/1/transformations/try';
1303
1677
  const headers = {};
@@ -1311,6 +1685,44 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1311
1685
  };
1312
1686
  return transporter.request(request, requestOptions);
1313
1687
  },
1688
+ /**
1689
+ * Try a transformation before updating it.
1690
+ *
1691
+ * Required API Key ACLs:
1692
+ * - addObject
1693
+ * - deleteIndex
1694
+ * - editSettings.
1695
+ *
1696
+ * @param tryTransformationBeforeUpdate - The tryTransformationBeforeUpdate object.
1697
+ * @param tryTransformationBeforeUpdate.transformationID - Unique identifier of a transformation.
1698
+ * @param tryTransformationBeforeUpdate.transformationTry - The transformationTry object.
1699
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1700
+ */
1701
+ tryTransformationBeforeUpdate({ transformationID, transformationTry, }, requestOptions) {
1702
+ if (!transformationID) {
1703
+ throw new Error('Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.');
1704
+ }
1705
+ if (!transformationTry) {
1706
+ throw new Error('Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.');
1707
+ }
1708
+ if (!transformationTry.code) {
1709
+ throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformationBeforeUpdate`.');
1710
+ }
1711
+ if (!transformationTry.sampleRecord) {
1712
+ throw new Error('Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.');
1713
+ }
1714
+ const requestPath = '/1/transformations/{transformationID}/try'.replace('{transformationID}', encodeURIComponent(transformationID));
1715
+ const headers = {};
1716
+ const queryParameters = {};
1717
+ const request = {
1718
+ method: 'POST',
1719
+ path: requestPath,
1720
+ queryParameters,
1721
+ headers,
1722
+ data: transformationTry,
1723
+ };
1724
+ return transporter.request(request, requestOptions);
1725
+ },
1314
1726
  /**
1315
1727
  * Updates an authentication resource.
1316
1728
  *
@@ -1422,6 +1834,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1422
1834
  if (!taskUpdate) {
1423
1835
  throw new Error('Parameter `taskUpdate` is required when calling `updateTask`.');
1424
1836
  }
1837
+ const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1838
+ const headers = {};
1839
+ const queryParameters = {};
1840
+ const request = {
1841
+ method: 'PATCH',
1842
+ path: requestPath,
1843
+ queryParameters,
1844
+ headers,
1845
+ data: taskUpdate,
1846
+ };
1847
+ return transporter.request(request, requestOptions);
1848
+ },
1849
+ /**
1850
+ * Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.
1851
+ *
1852
+ * @param updateTaskV1 - The updateTaskV1 object.
1853
+ * @param updateTaskV1.taskID - Unique identifier of a task.
1854
+ * @param updateTaskV1.taskUpdate - The taskUpdate object.
1855
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1856
+ */
1857
+ updateTaskV1({ taskID, taskUpdate }, requestOptions) {
1858
+ if (!taskID) {
1859
+ throw new Error('Parameter `taskID` is required when calling `updateTaskV1`.');
1860
+ }
1861
+ if (!taskUpdate) {
1862
+ throw new Error('Parameter `taskUpdate` is required when calling `updateTaskV1`.');
1863
+ }
1425
1864
  const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1426
1865
  const headers = {};
1427
1866
  const queryParameters = {};
@@ -1455,9 +1894,6 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1455
1894
  if (!transformationCreate.name) {
1456
1895
  throw new Error('Parameter `transformationCreate.name` is required when calling `updateTransformation`.');
1457
1896
  }
1458
- if (!transformationCreate.description) {
1459
- throw new Error('Parameter `transformationCreate.description` is required when calling `updateTransformation`.');
1460
- }
1461
1897
  const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
1462
1898
  const headers = {};
1463
1899
  const queryParameters = {};