@algolia/ingestion 1.0.0-beta.9 → 1.0.2

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