@algolia/ingestion 1.0.0-beta.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builds/browser.d.ts +22 -8
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +22 -8
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/ingestion.cjs +623 -187
- package/dist/ingestion.esm.browser.js +623 -187
- package/dist/ingestion.esm.node.js +623 -187
- 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 +209 -65
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/destination.d.ts +1 -0
- package/dist/model/destination.d.ts.map +1 -1
- package/dist/model/destinationCreate.d.ts +1 -0
- package/dist/model/destinationCreate.d.ts.map +1 -1
- package/dist/model/destinationInput.d.ts +1 -2
- package/dist/model/destinationInput.d.ts.map +1 -1
- package/dist/model/destinationUpdate.d.ts +1 -0
- package/dist/model/destinationUpdate.d.ts.map +1 -1
- package/dist/model/dockerStreams.d.ts +13 -0
- package/dist/model/dockerStreams.d.ts.map +1 -0
- package/dist/model/dockerStreamsInput.d.ts +8 -0
- package/dist/model/dockerStreamsInput.d.ts.map +1 -0
- package/dist/model/dockerStreamsSyncMode.d.ts +5 -0
- package/dist/model/dockerStreamsSyncMode.d.ts.map +1 -0
- package/dist/model/entityType.d.ts +5 -0
- package/dist/model/entityType.d.ts.map +1 -0
- package/dist/model/generateTransformationCodePayload.d.ts +6 -0
- package/dist/model/generateTransformationCodePayload.d.ts.map +1 -0
- package/dist/model/generateTransformationCodeResponse.d.ts +4 -0
- package/dist/model/generateTransformationCodeResponse.d.ts.map +1 -0
- package/dist/model/index.d.ts +19 -5
- 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/model.d.ts +8 -0
- package/dist/model/model.d.ts.map +1 -0
- package/dist/model/runSourcePayload.d.ts +17 -0
- package/dist/model/runSourcePayload.d.ts.map +1 -0
- package/dist/model/runSourceResponse.d.ts +11 -0
- package/dist/model/runSourceResponse.d.ts.map +1 -0
- package/dist/model/sourceUpdateShopify.d.ts +2 -26
- package/dist/model/sourceUpdateShopify.d.ts.map +1 -1
- package/dist/model/{streamingUtilsInput.d.ts → streamingInput.d.ts} +2 -2
- package/dist/model/streamingInput.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/taskInput.d.ts +3 -4
- package/dist/model/taskInput.d.ts.map +1 -1
- 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/transformation.d.ts +5 -1
- package/dist/model/transformation.d.ts.map +1 -1
- package/dist/model/transformationCreate.d.ts +5 -1
- package/dist/model/transformationCreate.d.ts.map +1 -1
- package/dist/model/{transformationTryResponseError.d.ts → transformationError.d.ts} +2 -2
- package/dist/model/transformationError.d.ts.map +1 -0
- package/dist/model/transformationModels.d.ts +8 -0
- package/dist/model/transformationModels.d.ts.map +1 -0
- package/dist/model/transformationSearch.d.ts +1 -1
- package/dist/model/transformationSearch.d.ts.map +1 -1
- package/dist/model/transformationTry.d.ts +2 -0
- package/dist/model/transformationTry.d.ts.map +1 -1
- package/dist/model/transformationTryResponse.d.ts +2 -2
- package/dist/model/transformationTryResponse.d.ts.map +1 -1
- package/dist/src/ingestionClient.d.ts +276 -93
- package/dist/src/ingestionClient.d.ts.map +1 -1
- package/model/action.ts +13 -0
- package/model/batchRequest.ts +12 -0
- package/model/{destinationIndexPrefix.ts → batchWriteParams.ts} +7 -5
- package/model/clientMethodProps.ts +224 -70
- package/model/destination.ts +2 -0
- package/model/destinationCreate.ts +2 -0
- package/model/destinationInput.ts +1 -2
- package/model/destinationUpdate.ts +2 -0
- package/model/dockerStreams.ts +17 -0
- package/model/dockerStreamsInput.ts +10 -0
- package/model/dockerStreamsSyncMode.ts +6 -0
- package/model/entityType.ts +6 -0
- package/model/generateTransformationCodePayload.ts +9 -0
- package/model/generateTransformationCodeResponse.ts +5 -0
- package/model/index.ts +19 -5
- package/model/listTasksResponseV1.ts +13 -0
- package/model/model.ts +13 -0
- package/model/runSourcePayload.ts +22 -0
- package/model/runSourceResponse.ts +13 -0
- package/model/sourceUpdateShopify.ts +2 -32
- package/model/{streamingUtilsInput.ts → streamingInput.ts} +1 -1
- package/model/task.ts +14 -2
- package/model/taskCreate.ts +5 -3
- package/model/taskCreateV1.ts +41 -0
- package/model/taskInput.ts +3 -8
- package/model/taskUpdate.ts +4 -2
- package/model/taskUpdateV1.ts +28 -0
- package/model/taskV1.ts +56 -0
- package/model/transformation.ts +6 -1
- package/model/transformationCreate.ts +6 -1
- package/model/{transformationTryResponseError.ts → transformationError.ts} +1 -1
- package/model/transformationModels.ts +10 -0
- package/model/transformationSearch.ts +1 -1
- package/model/transformationTry.ts +4 -0
- package/model/transformationTryResponse.ts +2 -2
- package/package.json +7 -7
- package/dist/model/destinationIndexPrefix.d.ts +0 -7
- package/dist/model/destinationIndexPrefix.d.ts.map +0 -1
- package/dist/model/onDemandDateUtilsInput.d.ts +0 -16
- package/dist/model/onDemandDateUtilsInput.d.ts.map +0 -1
- package/dist/model/scheduleDateUtilsInput.d.ts +0 -12
- package/dist/model/scheduleDateUtilsInput.d.ts.map +0 -1
- package/dist/model/streamingUtilsInput.d.ts.map +0 -1
- package/dist/model/transformationTryResponseError.d.ts.map +0 -1
- package/model/onDemandDateUtilsInput.ts +0 -20
- package/model/scheduleDateUtilsInput.ts +0 -15
package/dist/ingestion.cjs
CHANGED
|
@@ -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
|
|
7
|
+
const apiClientVersion = '1.0.0';
|
|
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 `
|
|
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 `
|
|
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
|
|
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
|
|
575
|
-
* @param
|
|
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
|
-
|
|
584
|
-
|
|
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
|
-
|
|
588
|
-
|
|
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 (
|
|
591
|
-
|
|
747
|
+
if (!eventID) {
|
|
748
|
+
throw new Error('Parameter `eventID` is required when calling `getEvent`.');
|
|
592
749
|
}
|
|
593
|
-
|
|
594
|
-
|
|
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
|
-
|
|
597
|
-
|
|
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
|
-
|
|
600
|
-
|
|
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
|
-
|
|
603
|
-
|
|
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
|
|
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
|
|
622
|
-
* @param
|
|
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
|
-
|
|
626
|
-
if (!
|
|
627
|
-
throw new Error('Parameter `
|
|
883
|
+
getTransformation({ transformationID }, requestOptions) {
|
|
884
|
+
if (!transformationID) {
|
|
885
|
+
throw new Error('Parameter `transformationID` is required when calling `getTransformation`.');
|
|
628
886
|
}
|
|
629
|
-
const requestPath = '/1/
|
|
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
|
|
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
|
|
649
|
-
* @param
|
|
650
|
-
* @param
|
|
651
|
-
* @param
|
|
652
|
-
* @param
|
|
653
|
-
* @param
|
|
654
|
-
* @param
|
|
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
|
-
|
|
658
|
-
const requestPath = '/1/
|
|
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 (
|
|
671
|
-
queryParameters.
|
|
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
|
|
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
|
|
696
|
-
* @param
|
|
697
|
-
* @param
|
|
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
|
-
|
|
701
|
-
|
|
702
|
-
|
|
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 (
|
|
705
|
-
|
|
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
|
|
729
|
-
* @param
|
|
730
|
-
* @param
|
|
731
|
-
* @param
|
|
732
|
-
* @param
|
|
733
|
-
* @param
|
|
734
|
-
* @param
|
|
735
|
-
* @param
|
|
736
|
-
* @param
|
|
737
|
-
* @param
|
|
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
|
-
|
|
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 `
|
|
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
|
|
815
|
-
* @param
|
|
816
|
-
* @param
|
|
817
|
-
* @param
|
|
818
|
-
* @param
|
|
819
|
-
* @param
|
|
820
|
-
* @param
|
|
821
|
-
* @param
|
|
822
|
-
* @param
|
|
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
|
-
|
|
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
|
|
897
|
-
* @param
|
|
898
|
-
* @param
|
|
899
|
-
* @param
|
|
900
|
-
* @param
|
|
901
|
-
* @param
|
|
902
|
-
* @param
|
|
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
|
-
|
|
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
|
|
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
|
|
944
|
-
* @param
|
|
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
|
-
|
|
948
|
-
|
|
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
|
|
971
|
-
* @param
|
|
972
|
-
* @param
|
|
973
|
-
* @param
|
|
974
|
-
* @param
|
|
975
|
-
* @param
|
|
976
|
-
* @param
|
|
977
|
-
* @param
|
|
978
|
-
* @param
|
|
979
|
-
* @param
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
1034
|
-
|
|
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
|
|
1057
|
-
* @param
|
|
1058
|
-
* @param
|
|
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
|
-
|
|
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.
|
|
1242
|
-
throw new Error('Parameter `transformationSearch.
|
|
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
|
-
|
|
1668
|
+
tryTransformation(transformationTry, requestOptions) {
|
|
1295
1669
|
if (!transformationTry) {
|
|
1296
|
-
throw new Error('Parameter `transformationTry` is required when calling `
|
|
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 `
|
|
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 `
|
|
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 = {};
|