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