@algolia/ingestion 1.0.0-beta.10 → 1.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/index.d.ts +7 -0
- 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/sourceUpdateShopify.d.ts +2 -26
- package/dist/model/sourceUpdateShopify.d.ts.map +1 -1
- 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/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/index.ts +7 -0
- package/model/listTasksResponseV1.ts +13 -0
- package/model/sourceUpdateShopify.ts +2 -32
- 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/package.json +6 -6
|
@@ -676,7 +676,7 @@ function createXhrRequester() {
|
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
// 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.
|
|
679
|
-
const apiClientVersion = '1.0.0-beta.
|
|
679
|
+
const apiClientVersion = '1.0.0-beta.12';
|
|
680
680
|
const REGIONS = ['eu', 'us'];
|
|
681
681
|
function getDefaultHosts(region) {
|
|
682
682
|
const url = 'data.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -884,11 +884,42 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
884
884
|
if (!taskCreate.destinationID) {
|
|
885
885
|
throw new Error('Parameter `taskCreate.destinationID` is required when calling `createTask`.');
|
|
886
886
|
}
|
|
887
|
+
if (!taskCreate.action) {
|
|
888
|
+
throw new Error('Parameter `taskCreate.action` is required when calling `createTask`.');
|
|
889
|
+
}
|
|
890
|
+
const requestPath = '/2/tasks';
|
|
891
|
+
const headers = {};
|
|
892
|
+
const queryParameters = {};
|
|
893
|
+
const request = {
|
|
894
|
+
method: 'POST',
|
|
895
|
+
path: requestPath,
|
|
896
|
+
queryParameters,
|
|
897
|
+
headers,
|
|
898
|
+
data: taskCreate,
|
|
899
|
+
};
|
|
900
|
+
return transporter.request(request, requestOptions);
|
|
901
|
+
},
|
|
902
|
+
/**
|
|
903
|
+
* Creates a new task using the v1 endpoint, please use `createTask` instead.
|
|
904
|
+
*
|
|
905
|
+
* @param taskCreate - Request body for creating a task.
|
|
906
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
907
|
+
*/
|
|
908
|
+
createTaskV1(taskCreate, requestOptions) {
|
|
909
|
+
if (!taskCreate) {
|
|
910
|
+
throw new Error('Parameter `taskCreate` is required when calling `createTaskV1`.');
|
|
911
|
+
}
|
|
912
|
+
if (!taskCreate.sourceID) {
|
|
913
|
+
throw new Error('Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.');
|
|
914
|
+
}
|
|
915
|
+
if (!taskCreate.destinationID) {
|
|
916
|
+
throw new Error('Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.');
|
|
917
|
+
}
|
|
887
918
|
if (!taskCreate.trigger) {
|
|
888
|
-
throw new Error('Parameter `taskCreate.trigger` is required when calling `
|
|
919
|
+
throw new Error('Parameter `taskCreate.trigger` is required when calling `createTaskV1`.');
|
|
889
920
|
}
|
|
890
921
|
if (!taskCreate.action) {
|
|
891
|
-
throw new Error('Parameter `taskCreate.action` is required when calling `
|
|
922
|
+
throw new Error('Parameter `taskCreate.action` is required when calling `createTaskV1`.');
|
|
892
923
|
}
|
|
893
924
|
const requestPath = '/1/tasks';
|
|
894
925
|
const headers = {};
|
|
@@ -1118,6 +1149,28 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1118
1149
|
if (!taskID) {
|
|
1119
1150
|
throw new Error('Parameter `taskID` is required when calling `deleteTask`.');
|
|
1120
1151
|
}
|
|
1152
|
+
const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1153
|
+
const headers = {};
|
|
1154
|
+
const queryParameters = {};
|
|
1155
|
+
const request = {
|
|
1156
|
+
method: 'DELETE',
|
|
1157
|
+
path: requestPath,
|
|
1158
|
+
queryParameters,
|
|
1159
|
+
headers,
|
|
1160
|
+
};
|
|
1161
|
+
return transporter.request(request, requestOptions);
|
|
1162
|
+
},
|
|
1163
|
+
/**
|
|
1164
|
+
* Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead.
|
|
1165
|
+
*
|
|
1166
|
+
* @param deleteTaskV1 - The deleteTaskV1 object.
|
|
1167
|
+
* @param deleteTaskV1.taskID - Unique identifier of a task.
|
|
1168
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1169
|
+
*/
|
|
1170
|
+
deleteTaskV1({ taskID }, requestOptions) {
|
|
1171
|
+
if (!taskID) {
|
|
1172
|
+
throw new Error('Parameter `taskID` is required when calling `deleteTaskV1`.');
|
|
1173
|
+
}
|
|
1121
1174
|
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1122
1175
|
const headers = {};
|
|
1123
1176
|
const queryParameters = {};
|
|
@@ -1167,6 +1220,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1167
1220
|
if (!taskID) {
|
|
1168
1221
|
throw new Error('Parameter `taskID` is required when calling `disableTask`.');
|
|
1169
1222
|
}
|
|
1223
|
+
const requestPath = '/2/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1224
|
+
const headers = {};
|
|
1225
|
+
const queryParameters = {};
|
|
1226
|
+
const request = {
|
|
1227
|
+
method: 'PUT',
|
|
1228
|
+
path: requestPath,
|
|
1229
|
+
queryParameters,
|
|
1230
|
+
headers,
|
|
1231
|
+
};
|
|
1232
|
+
return transporter.request(request, requestOptions);
|
|
1233
|
+
},
|
|
1234
|
+
/**
|
|
1235
|
+
* Disables a task using the v1 endpoint, please use `disableTask` instead.
|
|
1236
|
+
*
|
|
1237
|
+
* Required API Key ACLs:
|
|
1238
|
+
* - addObject
|
|
1239
|
+
* - deleteIndex
|
|
1240
|
+
* - editSettings.
|
|
1241
|
+
*
|
|
1242
|
+
* @param disableTaskV1 - The disableTaskV1 object.
|
|
1243
|
+
* @param disableTaskV1.taskID - Unique identifier of a task.
|
|
1244
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1245
|
+
*/
|
|
1246
|
+
disableTaskV1({ taskID }, requestOptions) {
|
|
1247
|
+
if (!taskID) {
|
|
1248
|
+
throw new Error('Parameter `taskID` is required when calling `disableTaskV1`.');
|
|
1249
|
+
}
|
|
1170
1250
|
const requestPath = '/1/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1171
1251
|
const headers = {};
|
|
1172
1252
|
const queryParameters = {};
|
|
@@ -1194,6 +1274,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1194
1274
|
if (!taskID) {
|
|
1195
1275
|
throw new Error('Parameter `taskID` is required when calling `enableTask`.');
|
|
1196
1276
|
}
|
|
1277
|
+
const requestPath = '/2/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1278
|
+
const headers = {};
|
|
1279
|
+
const queryParameters = {};
|
|
1280
|
+
const request = {
|
|
1281
|
+
method: 'PUT',
|
|
1282
|
+
path: requestPath,
|
|
1283
|
+
queryParameters,
|
|
1284
|
+
headers,
|
|
1285
|
+
};
|
|
1286
|
+
return transporter.request(request, requestOptions);
|
|
1287
|
+
},
|
|
1288
|
+
/**
|
|
1289
|
+
* Enables a task using the v1 endpoint, please use `enableTask` instead.
|
|
1290
|
+
*
|
|
1291
|
+
* Required API Key ACLs:
|
|
1292
|
+
* - addObject
|
|
1293
|
+
* - deleteIndex
|
|
1294
|
+
* - editSettings.
|
|
1295
|
+
*
|
|
1296
|
+
* @param enableTaskV1 - The enableTaskV1 object.
|
|
1297
|
+
* @param enableTaskV1.taskID - Unique identifier of a task.
|
|
1298
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1299
|
+
*/
|
|
1300
|
+
enableTaskV1({ taskID }, requestOptions) {
|
|
1301
|
+
if (!taskID) {
|
|
1302
|
+
throw new Error('Parameter `taskID` is required when calling `enableTaskV1`.');
|
|
1303
|
+
}
|
|
1197
1304
|
const requestPath = '/1/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1198
1305
|
const headers = {};
|
|
1199
1306
|
const queryParameters = {};
|
|
@@ -1233,44 +1340,57 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1233
1340
|
return transporter.request(request, requestOptions);
|
|
1234
1341
|
},
|
|
1235
1342
|
/**
|
|
1236
|
-
* Retrieves a
|
|
1343
|
+
* Retrieves a destination by its ID.
|
|
1237
1344
|
*
|
|
1238
1345
|
* Required API Key ACLs:
|
|
1239
1346
|
* - addObject
|
|
1240
1347
|
* - deleteIndex
|
|
1241
1348
|
* - editSettings.
|
|
1242
1349
|
*
|
|
1243
|
-
* @param
|
|
1244
|
-
* @param
|
|
1245
|
-
* @param getAuthentications.page - Page number of the paginated API response.
|
|
1246
|
-
* @param getAuthentications.type - Type of authentication resource to retrieve.
|
|
1247
|
-
* @param getAuthentications.platform - Ecommerce platform for which to retrieve authentication resources.
|
|
1248
|
-
* @param getAuthentications.sort - Property by which to sort the list of authentication resources.
|
|
1249
|
-
* @param getAuthentications.order - Sort order of the response, ascending or descending.
|
|
1350
|
+
* @param getDestination - The getDestination object.
|
|
1351
|
+
* @param getDestination.destinationID - Unique identifier of a destination.
|
|
1250
1352
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1251
1353
|
*/
|
|
1252
|
-
|
|
1253
|
-
|
|
1354
|
+
getDestination({ destinationID }, requestOptions) {
|
|
1355
|
+
if (!destinationID) {
|
|
1356
|
+
throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
|
|
1357
|
+
}
|
|
1358
|
+
const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
|
|
1254
1359
|
const headers = {};
|
|
1255
1360
|
const queryParameters = {};
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1361
|
+
const request = {
|
|
1362
|
+
method: 'GET',
|
|
1363
|
+
path: requestPath,
|
|
1364
|
+
queryParameters,
|
|
1365
|
+
headers,
|
|
1366
|
+
};
|
|
1367
|
+
return transporter.request(request, requestOptions);
|
|
1368
|
+
},
|
|
1369
|
+
/**
|
|
1370
|
+
* Retrieves a single task run event by its ID.
|
|
1371
|
+
*
|
|
1372
|
+
* Required API Key ACLs:
|
|
1373
|
+
* - addObject
|
|
1374
|
+
* - deleteIndex
|
|
1375
|
+
* - editSettings.
|
|
1376
|
+
*
|
|
1377
|
+
* @param getEvent - The getEvent object.
|
|
1378
|
+
* @param getEvent.runID - Unique identifier of a task run.
|
|
1379
|
+
* @param getEvent.eventID - Unique identifier of an event.
|
|
1380
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1381
|
+
*/
|
|
1382
|
+
getEvent({ runID, eventID }, requestOptions) {
|
|
1383
|
+
if (!runID) {
|
|
1384
|
+
throw new Error('Parameter `runID` is required when calling `getEvent`.');
|
|
1270
1385
|
}
|
|
1271
|
-
if (
|
|
1272
|
-
|
|
1386
|
+
if (!eventID) {
|
|
1387
|
+
throw new Error('Parameter `eventID` is required when calling `getEvent`.');
|
|
1273
1388
|
}
|
|
1389
|
+
const requestPath = '/1/runs/{runID}/events/{eventID}'
|
|
1390
|
+
.replace('{runID}', encodeURIComponent(runID))
|
|
1391
|
+
.replace('{eventID}', encodeURIComponent(eventID));
|
|
1392
|
+
const headers = {};
|
|
1393
|
+
const queryParameters = {};
|
|
1274
1394
|
const request = {
|
|
1275
1395
|
method: 'GET',
|
|
1276
1396
|
path: requestPath,
|
|
@@ -1280,22 +1400,22 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1280
1400
|
return transporter.request(request, requestOptions);
|
|
1281
1401
|
},
|
|
1282
1402
|
/**
|
|
1283
|
-
*
|
|
1403
|
+
* Retrieve a single task run by its ID.
|
|
1284
1404
|
*
|
|
1285
1405
|
* Required API Key ACLs:
|
|
1286
1406
|
* - addObject
|
|
1287
1407
|
* - deleteIndex
|
|
1288
1408
|
* - editSettings.
|
|
1289
1409
|
*
|
|
1290
|
-
* @param
|
|
1291
|
-
* @param
|
|
1410
|
+
* @param getRun - The getRun object.
|
|
1411
|
+
* @param getRun.runID - Unique identifier of a task run.
|
|
1292
1412
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1293
1413
|
*/
|
|
1294
|
-
|
|
1295
|
-
if (!
|
|
1296
|
-
throw new Error('Parameter `
|
|
1414
|
+
getRun({ runID }, requestOptions) {
|
|
1415
|
+
if (!runID) {
|
|
1416
|
+
throw new Error('Parameter `runID` is required when calling `getRun`.');
|
|
1297
1417
|
}
|
|
1298
|
-
const requestPath = '/1/
|
|
1418
|
+
const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
|
|
1299
1419
|
const headers = {};
|
|
1300
1420
|
const queryParameters = {};
|
|
1301
1421
|
const request = {
|
|
@@ -1307,44 +1427,24 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1307
1427
|
return transporter.request(request, requestOptions);
|
|
1308
1428
|
},
|
|
1309
1429
|
/**
|
|
1310
|
-
*
|
|
1430
|
+
* Retrieve a source by its ID.
|
|
1311
1431
|
*
|
|
1312
1432
|
* Required API Key ACLs:
|
|
1313
1433
|
* - addObject
|
|
1314
1434
|
* - deleteIndex
|
|
1315
1435
|
* - editSettings.
|
|
1316
1436
|
*
|
|
1317
|
-
* @param
|
|
1318
|
-
* @param
|
|
1319
|
-
* @param getDestinations.page - Page number of the paginated API response.
|
|
1320
|
-
* @param getDestinations.type - Destination type.
|
|
1321
|
-
* @param getDestinations.authenticationID - Authentication ID used by destinations.
|
|
1322
|
-
* @param getDestinations.sort - Property by which to sort the destinations.
|
|
1323
|
-
* @param getDestinations.order - Sort order of the response, ascending or descending.
|
|
1437
|
+
* @param getSource - The getSource object.
|
|
1438
|
+
* @param getSource.sourceID - Unique identifier of a source.
|
|
1324
1439
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1325
1440
|
*/
|
|
1326
|
-
|
|
1327
|
-
|
|
1441
|
+
getSource({ sourceID }, requestOptions) {
|
|
1442
|
+
if (!sourceID) {
|
|
1443
|
+
throw new Error('Parameter `sourceID` is required when calling `getSource`.');
|
|
1444
|
+
}
|
|
1445
|
+
const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
1328
1446
|
const headers = {};
|
|
1329
1447
|
const queryParameters = {};
|
|
1330
|
-
if (itemsPerPage !== undefined) {
|
|
1331
|
-
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
1332
|
-
}
|
|
1333
|
-
if (page !== undefined) {
|
|
1334
|
-
queryParameters.page = page.toString();
|
|
1335
|
-
}
|
|
1336
|
-
if (type !== undefined) {
|
|
1337
|
-
queryParameters.type = type.toString();
|
|
1338
|
-
}
|
|
1339
|
-
if (authenticationID !== undefined) {
|
|
1340
|
-
queryParameters.authenticationID = authenticationID.toString();
|
|
1341
|
-
}
|
|
1342
|
-
if (sort !== undefined) {
|
|
1343
|
-
queryParameters.sort = sort.toString();
|
|
1344
|
-
}
|
|
1345
|
-
if (order !== undefined) {
|
|
1346
|
-
queryParameters.order = order.toString();
|
|
1347
|
-
}
|
|
1348
1448
|
const request = {
|
|
1349
1449
|
method: 'GET',
|
|
1350
1450
|
path: requestPath,
|
|
@@ -1354,28 +1454,49 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1354
1454
|
return transporter.request(request, requestOptions);
|
|
1355
1455
|
},
|
|
1356
1456
|
/**
|
|
1357
|
-
* Retrieves a
|
|
1457
|
+
* Retrieves a task by its ID.
|
|
1358
1458
|
*
|
|
1359
1459
|
* Required API Key ACLs:
|
|
1360
1460
|
* - addObject
|
|
1361
1461
|
* - deleteIndex
|
|
1362
1462
|
* - editSettings.
|
|
1363
1463
|
*
|
|
1364
|
-
* @param
|
|
1365
|
-
* @param
|
|
1366
|
-
* @param getEvent.eventID - Unique identifier of an event.
|
|
1464
|
+
* @param getTask - The getTask object.
|
|
1465
|
+
* @param getTask.taskID - Unique identifier of a task.
|
|
1367
1466
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1368
1467
|
*/
|
|
1369
|
-
|
|
1370
|
-
if (!
|
|
1371
|
-
throw new Error('Parameter `
|
|
1468
|
+
getTask({ taskID }, requestOptions) {
|
|
1469
|
+
if (!taskID) {
|
|
1470
|
+
throw new Error('Parameter `taskID` is required when calling `getTask`.');
|
|
1372
1471
|
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1472
|
+
const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1473
|
+
const headers = {};
|
|
1474
|
+
const queryParameters = {};
|
|
1475
|
+
const request = {
|
|
1476
|
+
method: 'GET',
|
|
1477
|
+
path: requestPath,
|
|
1478
|
+
queryParameters,
|
|
1479
|
+
headers,
|
|
1480
|
+
};
|
|
1481
|
+
return transporter.request(request, requestOptions);
|
|
1482
|
+
},
|
|
1483
|
+
/**
|
|
1484
|
+
* Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.
|
|
1485
|
+
*
|
|
1486
|
+
* Required API Key ACLs:
|
|
1487
|
+
* - addObject
|
|
1488
|
+
* - deleteIndex
|
|
1489
|
+
* - editSettings.
|
|
1490
|
+
*
|
|
1491
|
+
* @param getTaskV1 - The getTaskV1 object.
|
|
1492
|
+
* @param getTaskV1.taskID - Unique identifier of a task.
|
|
1493
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1494
|
+
*/
|
|
1495
|
+
getTaskV1({ taskID }, requestOptions) {
|
|
1496
|
+
if (!taskID) {
|
|
1497
|
+
throw new Error('Parameter `taskID` is required when calling `getTaskV1`.');
|
|
1375
1498
|
}
|
|
1376
|
-
const requestPath = '/1/
|
|
1377
|
-
.replace('{runID}', encodeURIComponent(runID))
|
|
1378
|
-
.replace('{eventID}', encodeURIComponent(eventID));
|
|
1499
|
+
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1379
1500
|
const headers = {};
|
|
1380
1501
|
const queryParameters = {};
|
|
1381
1502
|
const request = {
|
|
@@ -1387,30 +1508,51 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1387
1508
|
return transporter.request(request, requestOptions);
|
|
1388
1509
|
},
|
|
1389
1510
|
/**
|
|
1390
|
-
* Retrieves a
|
|
1511
|
+
* Retrieves a transformation by its ID.
|
|
1391
1512
|
*
|
|
1392
1513
|
* Required API Key ACLs:
|
|
1393
1514
|
* - addObject
|
|
1394
1515
|
* - deleteIndex
|
|
1395
1516
|
* - editSettings.
|
|
1396
1517
|
*
|
|
1397
|
-
* @param
|
|
1398
|
-
* @param
|
|
1399
|
-
* @param getEvents.itemsPerPage - Number of items per page.
|
|
1400
|
-
* @param getEvents.page - Page number of the paginated API response.
|
|
1401
|
-
* @param getEvents.status - Event status for filtering the list of task runs.
|
|
1402
|
-
* @param getEvents.type - Event type for filtering the list of task runs.
|
|
1403
|
-
* @param getEvents.sort - Property by which to sort the list of task run events.
|
|
1404
|
-
* @param getEvents.order - Sort order of the response, ascending or descending.
|
|
1405
|
-
* @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.
|
|
1406
|
-
* @param getEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
|
|
1518
|
+
* @param getTransformation - The getTransformation object.
|
|
1519
|
+
* @param getTransformation.transformationID - Unique identifier of a transformation.
|
|
1407
1520
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1408
1521
|
*/
|
|
1409
|
-
|
|
1410
|
-
if (!
|
|
1411
|
-
throw new Error('Parameter `
|
|
1522
|
+
getTransformation({ transformationID }, requestOptions) {
|
|
1523
|
+
if (!transformationID) {
|
|
1524
|
+
throw new Error('Parameter `transformationID` is required when calling `getTransformation`.');
|
|
1412
1525
|
}
|
|
1413
|
-
const requestPath = '/1/
|
|
1526
|
+
const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
|
|
1527
|
+
const headers = {};
|
|
1528
|
+
const queryParameters = {};
|
|
1529
|
+
const request = {
|
|
1530
|
+
method: 'GET',
|
|
1531
|
+
path: requestPath,
|
|
1532
|
+
queryParameters,
|
|
1533
|
+
headers,
|
|
1534
|
+
};
|
|
1535
|
+
return transporter.request(request, requestOptions);
|
|
1536
|
+
},
|
|
1537
|
+
/**
|
|
1538
|
+
* Retrieves a list of all authentication resources.
|
|
1539
|
+
*
|
|
1540
|
+
* Required API Key ACLs:
|
|
1541
|
+
* - addObject
|
|
1542
|
+
* - deleteIndex
|
|
1543
|
+
* - editSettings.
|
|
1544
|
+
*
|
|
1545
|
+
* @param listAuthentications - The listAuthentications object.
|
|
1546
|
+
* @param listAuthentications.itemsPerPage - Number of items per page.
|
|
1547
|
+
* @param listAuthentications.page - Page number of the paginated API response.
|
|
1548
|
+
* @param listAuthentications.type - Type of authentication resource to retrieve.
|
|
1549
|
+
* @param listAuthentications.platform - Ecommerce platform for which to retrieve authentication resources.
|
|
1550
|
+
* @param listAuthentications.sort - Property by which to sort the list of authentication resources.
|
|
1551
|
+
* @param listAuthentications.order - Sort order of the response, ascending or descending.
|
|
1552
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1553
|
+
*/
|
|
1554
|
+
listAuthentications({ itemsPerPage, page, type, platform, sort, order, } = {}, requestOptions = undefined) {
|
|
1555
|
+
const requestPath = '/1/authentications';
|
|
1414
1556
|
const headers = {};
|
|
1415
1557
|
const queryParameters = {};
|
|
1416
1558
|
if (itemsPerPage !== undefined) {
|
|
@@ -1419,24 +1561,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1419
1561
|
if (page !== undefined) {
|
|
1420
1562
|
queryParameters.page = page.toString();
|
|
1421
1563
|
}
|
|
1422
|
-
if (status !== undefined) {
|
|
1423
|
-
queryParameters.status = status.toString();
|
|
1424
|
-
}
|
|
1425
1564
|
if (type !== undefined) {
|
|
1426
1565
|
queryParameters.type = type.toString();
|
|
1427
1566
|
}
|
|
1567
|
+
if (platform !== undefined) {
|
|
1568
|
+
queryParameters.platform = platform.toString();
|
|
1569
|
+
}
|
|
1428
1570
|
if (sort !== undefined) {
|
|
1429
1571
|
queryParameters.sort = sort.toString();
|
|
1430
1572
|
}
|
|
1431
1573
|
if (order !== undefined) {
|
|
1432
1574
|
queryParameters.order = order.toString();
|
|
1433
1575
|
}
|
|
1434
|
-
if (startDate !== undefined) {
|
|
1435
|
-
queryParameters.startDate = startDate.toString();
|
|
1436
|
-
}
|
|
1437
|
-
if (endDate !== undefined) {
|
|
1438
|
-
queryParameters.endDate = endDate.toString();
|
|
1439
|
-
}
|
|
1440
1576
|
const request = {
|
|
1441
1577
|
method: 'GET',
|
|
1442
1578
|
path: requestPath,
|
|
@@ -1446,24 +1582,44 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1446
1582
|
return transporter.request(request, requestOptions);
|
|
1447
1583
|
},
|
|
1448
1584
|
/**
|
|
1449
|
-
*
|
|
1585
|
+
* Retrieves a list of destinations.
|
|
1450
1586
|
*
|
|
1451
1587
|
* Required API Key ACLs:
|
|
1452
1588
|
* - addObject
|
|
1453
1589
|
* - deleteIndex
|
|
1454
1590
|
* - editSettings.
|
|
1455
1591
|
*
|
|
1456
|
-
* @param
|
|
1457
|
-
* @param
|
|
1592
|
+
* @param listDestinations - The listDestinations object.
|
|
1593
|
+
* @param listDestinations.itemsPerPage - Number of items per page.
|
|
1594
|
+
* @param listDestinations.page - Page number of the paginated API response.
|
|
1595
|
+
* @param listDestinations.type - Destination type.
|
|
1596
|
+
* @param listDestinations.authenticationID - Authentication ID used by destinations.
|
|
1597
|
+
* @param listDestinations.sort - Property by which to sort the destinations.
|
|
1598
|
+
* @param listDestinations.order - Sort order of the response, ascending or descending.
|
|
1458
1599
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1459
1600
|
*/
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
throw new Error('Parameter `runID` is required when calling `getRun`.');
|
|
1463
|
-
}
|
|
1464
|
-
const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
|
|
1601
|
+
listDestinations({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
|
|
1602
|
+
const requestPath = '/1/destinations';
|
|
1465
1603
|
const headers = {};
|
|
1466
1604
|
const queryParameters = {};
|
|
1605
|
+
if (itemsPerPage !== undefined) {
|
|
1606
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
1607
|
+
}
|
|
1608
|
+
if (page !== undefined) {
|
|
1609
|
+
queryParameters.page = page.toString();
|
|
1610
|
+
}
|
|
1611
|
+
if (type !== undefined) {
|
|
1612
|
+
queryParameters.type = type.toString();
|
|
1613
|
+
}
|
|
1614
|
+
if (authenticationID !== undefined) {
|
|
1615
|
+
queryParameters.authenticationID = authenticationID.toString();
|
|
1616
|
+
}
|
|
1617
|
+
if (sort !== undefined) {
|
|
1618
|
+
queryParameters.sort = sort.toString();
|
|
1619
|
+
}
|
|
1620
|
+
if (order !== undefined) {
|
|
1621
|
+
queryParameters.order = order.toString();
|
|
1622
|
+
}
|
|
1467
1623
|
const request = {
|
|
1468
1624
|
method: 'GET',
|
|
1469
1625
|
path: requestPath,
|
|
@@ -1473,26 +1629,30 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1473
1629
|
return transporter.request(request, requestOptions);
|
|
1474
1630
|
},
|
|
1475
1631
|
/**
|
|
1476
|
-
*
|
|
1632
|
+
* Retrieves a list of events for a task run, identified by it\'s ID.
|
|
1477
1633
|
*
|
|
1478
1634
|
* Required API Key ACLs:
|
|
1479
1635
|
* - addObject
|
|
1480
1636
|
* - deleteIndex
|
|
1481
1637
|
* - editSettings.
|
|
1482
1638
|
*
|
|
1483
|
-
* @param
|
|
1484
|
-
* @param
|
|
1485
|
-
* @param
|
|
1486
|
-
* @param
|
|
1487
|
-
* @param
|
|
1488
|
-
* @param
|
|
1489
|
-
* @param
|
|
1490
|
-
* @param
|
|
1491
|
-
* @param
|
|
1639
|
+
* @param listEvents - The listEvents object.
|
|
1640
|
+
* @param listEvents.runID - Unique identifier of a task run.
|
|
1641
|
+
* @param listEvents.itemsPerPage - Number of items per page.
|
|
1642
|
+
* @param listEvents.page - Page number of the paginated API response.
|
|
1643
|
+
* @param listEvents.status - Event status for filtering the list of task runs.
|
|
1644
|
+
* @param listEvents.type - Event type for filtering the list of task runs.
|
|
1645
|
+
* @param listEvents.sort - Property by which to sort the list of task run events.
|
|
1646
|
+
* @param listEvents.order - Sort order of the response, ascending or descending.
|
|
1647
|
+
* @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.
|
|
1648
|
+
* @param listEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
|
|
1492
1649
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1493
1650
|
*/
|
|
1494
|
-
|
|
1495
|
-
|
|
1651
|
+
listEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
|
|
1652
|
+
if (!runID) {
|
|
1653
|
+
throw new Error('Parameter `runID` is required when calling `listEvents`.');
|
|
1654
|
+
}
|
|
1655
|
+
const requestPath = '/1/runs/{runID}/events'.replace('{runID}', encodeURIComponent(runID));
|
|
1496
1656
|
const headers = {};
|
|
1497
1657
|
const queryParameters = {};
|
|
1498
1658
|
if (itemsPerPage !== undefined) {
|
|
@@ -1504,8 +1664,8 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1504
1664
|
if (status !== undefined) {
|
|
1505
1665
|
queryParameters.status = status.toString();
|
|
1506
1666
|
}
|
|
1507
|
-
if (
|
|
1508
|
-
queryParameters.
|
|
1667
|
+
if (type !== undefined) {
|
|
1668
|
+
queryParameters.type = type.toString();
|
|
1509
1669
|
}
|
|
1510
1670
|
if (sort !== undefined) {
|
|
1511
1671
|
queryParameters.sort = sort.toString();
|
|
@@ -1528,24 +1688,52 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1528
1688
|
return transporter.request(request, requestOptions);
|
|
1529
1689
|
},
|
|
1530
1690
|
/**
|
|
1531
|
-
* Retrieve a
|
|
1691
|
+
* Retrieve a list of task runs.
|
|
1532
1692
|
*
|
|
1533
1693
|
* Required API Key ACLs:
|
|
1534
1694
|
* - addObject
|
|
1535
1695
|
* - deleteIndex
|
|
1536
1696
|
* - editSettings.
|
|
1537
1697
|
*
|
|
1538
|
-
* @param
|
|
1539
|
-
* @param
|
|
1698
|
+
* @param listRuns - The listRuns object.
|
|
1699
|
+
* @param listRuns.itemsPerPage - Number of items per page.
|
|
1700
|
+
* @param listRuns.page - Page number of the paginated API response.
|
|
1701
|
+
* @param listRuns.status - Run status for filtering the list of task runs.
|
|
1702
|
+
* @param listRuns.taskID - Task ID for filtering the list of task runs.
|
|
1703
|
+
* @param listRuns.sort - Property by which to sort the list of task runs.
|
|
1704
|
+
* @param listRuns.order - Sort order of the response, ascending or descending.
|
|
1705
|
+
* @param listRuns.startDate - Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.
|
|
1706
|
+
* @param listRuns.endDate - Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.
|
|
1540
1707
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1541
1708
|
*/
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
throw new Error('Parameter `sourceID` is required when calling `getSource`.');
|
|
1545
|
-
}
|
|
1546
|
-
const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
1709
|
+
listRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
|
|
1710
|
+
const requestPath = '/1/runs';
|
|
1547
1711
|
const headers = {};
|
|
1548
1712
|
const queryParameters = {};
|
|
1713
|
+
if (itemsPerPage !== undefined) {
|
|
1714
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
1715
|
+
}
|
|
1716
|
+
if (page !== undefined) {
|
|
1717
|
+
queryParameters.page = page.toString();
|
|
1718
|
+
}
|
|
1719
|
+
if (status !== undefined) {
|
|
1720
|
+
queryParameters.status = status.toString();
|
|
1721
|
+
}
|
|
1722
|
+
if (taskID !== undefined) {
|
|
1723
|
+
queryParameters.taskID = taskID.toString();
|
|
1724
|
+
}
|
|
1725
|
+
if (sort !== undefined) {
|
|
1726
|
+
queryParameters.sort = sort.toString();
|
|
1727
|
+
}
|
|
1728
|
+
if (order !== undefined) {
|
|
1729
|
+
queryParameters.order = order.toString();
|
|
1730
|
+
}
|
|
1731
|
+
if (startDate !== undefined) {
|
|
1732
|
+
queryParameters.startDate = startDate.toString();
|
|
1733
|
+
}
|
|
1734
|
+
if (endDate !== undefined) {
|
|
1735
|
+
queryParameters.endDate = endDate.toString();
|
|
1736
|
+
}
|
|
1549
1737
|
const request = {
|
|
1550
1738
|
method: 'GET',
|
|
1551
1739
|
path: requestPath,
|
|
@@ -1562,16 +1750,16 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1562
1750
|
* - deleteIndex
|
|
1563
1751
|
* - editSettings.
|
|
1564
1752
|
*
|
|
1565
|
-
* @param
|
|
1566
|
-
* @param
|
|
1567
|
-
* @param
|
|
1568
|
-
* @param
|
|
1569
|
-
* @param
|
|
1570
|
-
* @param
|
|
1571
|
-
* @param
|
|
1753
|
+
* @param listSources - The listSources object.
|
|
1754
|
+
* @param listSources.itemsPerPage - Number of items per page.
|
|
1755
|
+
* @param listSources.page - Page number of the paginated API response.
|
|
1756
|
+
* @param listSources.type - Source type. Some sources require authentication.
|
|
1757
|
+
* @param listSources.authenticationID - Authentication IDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication resource.
|
|
1758
|
+
* @param listSources.sort - Property by which to sort the list of sources.
|
|
1759
|
+
* @param listSources.order - Sort order of the response, ascending or descending.
|
|
1572
1760
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1573
1761
|
*/
|
|
1574
|
-
|
|
1762
|
+
listSources({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
|
|
1575
1763
|
const requestPath = '/1/sources';
|
|
1576
1764
|
const headers = {};
|
|
1577
1765
|
const queryParameters = {};
|
|
@@ -1602,24 +1790,56 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1602
1790
|
return transporter.request(request, requestOptions);
|
|
1603
1791
|
},
|
|
1604
1792
|
/**
|
|
1605
|
-
* Retrieves a
|
|
1793
|
+
* Retrieves a list of tasks.
|
|
1606
1794
|
*
|
|
1607
1795
|
* Required API Key ACLs:
|
|
1608
1796
|
* - addObject
|
|
1609
1797
|
* - deleteIndex
|
|
1610
1798
|
* - editSettings.
|
|
1611
1799
|
*
|
|
1612
|
-
* @param
|
|
1613
|
-
* @param
|
|
1800
|
+
* @param listTasks - The listTasks object.
|
|
1801
|
+
* @param listTasks.itemsPerPage - Number of items per page.
|
|
1802
|
+
* @param listTasks.page - Page number of the paginated API response.
|
|
1803
|
+
* @param listTasks.action - Actions for filtering the list of tasks.
|
|
1804
|
+
* @param listTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
|
|
1805
|
+
* @param listTasks.sourceID - Source IDs for filtering the list of tasks.
|
|
1806
|
+
* @param listTasks.destinationID - Destination IDs for filtering the list of tasks.
|
|
1807
|
+
* @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.
|
|
1808
|
+
* @param listTasks.sort - Property by which to sort the list of tasks.
|
|
1809
|
+
* @param listTasks.order - Sort order of the response, ascending or descending.
|
|
1614
1810
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1615
1811
|
*/
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
throw new Error('Parameter `taskID` is required when calling `getTask`.');
|
|
1619
|
-
}
|
|
1620
|
-
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1812
|
+
listTasks({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
|
|
1813
|
+
const requestPath = '/2/tasks';
|
|
1621
1814
|
const headers = {};
|
|
1622
1815
|
const queryParameters = {};
|
|
1816
|
+
if (itemsPerPage !== undefined) {
|
|
1817
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
1818
|
+
}
|
|
1819
|
+
if (page !== undefined) {
|
|
1820
|
+
queryParameters.page = page.toString();
|
|
1821
|
+
}
|
|
1822
|
+
if (action !== undefined) {
|
|
1823
|
+
queryParameters.action = action.toString();
|
|
1824
|
+
}
|
|
1825
|
+
if (enabled !== undefined) {
|
|
1826
|
+
queryParameters.enabled = enabled.toString();
|
|
1827
|
+
}
|
|
1828
|
+
if (sourceID !== undefined) {
|
|
1829
|
+
queryParameters.sourceID = sourceID.toString();
|
|
1830
|
+
}
|
|
1831
|
+
if (destinationID !== undefined) {
|
|
1832
|
+
queryParameters.destinationID = destinationID.toString();
|
|
1833
|
+
}
|
|
1834
|
+
if (triggerType !== undefined) {
|
|
1835
|
+
queryParameters.triggerType = triggerType.toString();
|
|
1836
|
+
}
|
|
1837
|
+
if (sort !== undefined) {
|
|
1838
|
+
queryParameters.sort = sort.toString();
|
|
1839
|
+
}
|
|
1840
|
+
if (order !== undefined) {
|
|
1841
|
+
queryParameters.order = order.toString();
|
|
1842
|
+
}
|
|
1623
1843
|
const request = {
|
|
1624
1844
|
method: 'GET',
|
|
1625
1845
|
path: requestPath,
|
|
@@ -1629,26 +1849,26 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1629
1849
|
return transporter.request(request, requestOptions);
|
|
1630
1850
|
},
|
|
1631
1851
|
/**
|
|
1632
|
-
* Retrieves a list of tasks.
|
|
1852
|
+
* Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.
|
|
1633
1853
|
*
|
|
1634
1854
|
* Required API Key ACLs:
|
|
1635
1855
|
* - addObject
|
|
1636
1856
|
* - deleteIndex
|
|
1637
1857
|
* - editSettings.
|
|
1638
1858
|
*
|
|
1639
|
-
* @param
|
|
1640
|
-
* @param
|
|
1641
|
-
* @param
|
|
1642
|
-
* @param
|
|
1643
|
-
* @param
|
|
1644
|
-
* @param
|
|
1645
|
-
* @param
|
|
1646
|
-
* @param
|
|
1647
|
-
* @param
|
|
1648
|
-
* @param
|
|
1859
|
+
* @param listTasksV1 - The listTasksV1 object.
|
|
1860
|
+
* @param listTasksV1.itemsPerPage - Number of items per page.
|
|
1861
|
+
* @param listTasksV1.page - Page number of the paginated API response.
|
|
1862
|
+
* @param listTasksV1.action - Actions for filtering the list of tasks.
|
|
1863
|
+
* @param listTasksV1.enabled - Whether to filter the list of tasks by the `enabled` status.
|
|
1864
|
+
* @param listTasksV1.sourceID - Source IDs for filtering the list of tasks.
|
|
1865
|
+
* @param listTasksV1.destinationID - Destination IDs for filtering the list of tasks.
|
|
1866
|
+
* @param listTasksV1.triggerType - Type of task trigger for filtering the list of tasks.
|
|
1867
|
+
* @param listTasksV1.sort - Property by which to sort the list of tasks.
|
|
1868
|
+
* @param listTasksV1.order - Sort order of the response, ascending or descending.
|
|
1649
1869
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1650
1870
|
*/
|
|
1651
|
-
|
|
1871
|
+
listTasksV1({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
|
|
1652
1872
|
const requestPath = '/1/tasks';
|
|
1653
1873
|
const headers = {};
|
|
1654
1874
|
const queryParameters = {};
|
|
@@ -1688,24 +1908,28 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1688
1908
|
return transporter.request(request, requestOptions);
|
|
1689
1909
|
},
|
|
1690
1910
|
/**
|
|
1691
|
-
* Retrieves a
|
|
1911
|
+
* Retrieves a list of transformations.
|
|
1692
1912
|
*
|
|
1693
1913
|
* Required API Key ACLs:
|
|
1694
1914
|
* - addObject
|
|
1695
1915
|
* - deleteIndex
|
|
1696
1916
|
* - editSettings.
|
|
1697
1917
|
*
|
|
1698
|
-
* @param
|
|
1699
|
-
* @param
|
|
1918
|
+
* @param listTransformations - The listTransformations object.
|
|
1919
|
+
* @param listTransformations.sort - Property by which to sort the list.
|
|
1920
|
+
* @param listTransformations.order - Sort order of the response, ascending or descending.
|
|
1700
1921
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1701
1922
|
*/
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
throw new Error('Parameter `transformationID` is required when calling `getTransformation`.');
|
|
1705
|
-
}
|
|
1706
|
-
const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
|
|
1923
|
+
listTransformations({ sort, order } = {}, requestOptions = undefined) {
|
|
1924
|
+
const requestPath = '/1/transformations';
|
|
1707
1925
|
const headers = {};
|
|
1708
1926
|
const queryParameters = {};
|
|
1927
|
+
if (sort !== undefined) {
|
|
1928
|
+
queryParameters.sort = sort.toString();
|
|
1929
|
+
}
|
|
1930
|
+
if (order !== undefined) {
|
|
1931
|
+
queryParameters.order = order.toString();
|
|
1932
|
+
}
|
|
1709
1933
|
const request = {
|
|
1710
1934
|
method: 'GET',
|
|
1711
1935
|
path: requestPath,
|
|
@@ -1715,33 +1939,37 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1715
1939
|
return transporter.request(request, requestOptions);
|
|
1716
1940
|
},
|
|
1717
1941
|
/**
|
|
1718
|
-
*
|
|
1942
|
+
* Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
|
|
1719
1943
|
*
|
|
1720
1944
|
* Required API Key ACLs:
|
|
1721
1945
|
* - addObject
|
|
1722
1946
|
* - deleteIndex
|
|
1723
1947
|
* - editSettings.
|
|
1724
1948
|
*
|
|
1725
|
-
* @param
|
|
1726
|
-
* @param
|
|
1727
|
-
* @param
|
|
1949
|
+
* @param pushTask - The pushTask object.
|
|
1950
|
+
* @param pushTask.taskID - Unique identifier of a task.
|
|
1951
|
+
* @param pushTask.batchWriteParams - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
|
|
1728
1952
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1729
1953
|
*/
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
const queryParameters = {};
|
|
1734
|
-
if (sort !== undefined) {
|
|
1735
|
-
queryParameters.sort = sort.toString();
|
|
1954
|
+
pushTask({ taskID, batchWriteParams }, requestOptions) {
|
|
1955
|
+
if (!taskID) {
|
|
1956
|
+
throw new Error('Parameter `taskID` is required when calling `pushTask`.');
|
|
1736
1957
|
}
|
|
1737
|
-
if (
|
|
1738
|
-
|
|
1958
|
+
if (!batchWriteParams) {
|
|
1959
|
+
throw new Error('Parameter `batchWriteParams` is required when calling `pushTask`.');
|
|
1739
1960
|
}
|
|
1961
|
+
if (!batchWriteParams.requests) {
|
|
1962
|
+
throw new Error('Parameter `batchWriteParams.requests` is required when calling `pushTask`.');
|
|
1963
|
+
}
|
|
1964
|
+
const requestPath = '/2/tasks/{taskID}/push'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1965
|
+
const headers = {};
|
|
1966
|
+
const queryParameters = {};
|
|
1740
1967
|
const request = {
|
|
1741
|
-
method: '
|
|
1968
|
+
method: 'POST',
|
|
1742
1969
|
path: requestPath,
|
|
1743
1970
|
queryParameters,
|
|
1744
1971
|
headers,
|
|
1972
|
+
data: batchWriteParams,
|
|
1745
1973
|
};
|
|
1746
1974
|
return transporter.request(request, requestOptions);
|
|
1747
1975
|
},
|
|
@@ -1761,6 +1989,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1761
1989
|
if (!taskID) {
|
|
1762
1990
|
throw new Error('Parameter `taskID` is required when calling `runTask`.');
|
|
1763
1991
|
}
|
|
1992
|
+
const requestPath = '/2/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1993
|
+
const headers = {};
|
|
1994
|
+
const queryParameters = {};
|
|
1995
|
+
const request = {
|
|
1996
|
+
method: 'POST',
|
|
1997
|
+
path: requestPath,
|
|
1998
|
+
queryParameters,
|
|
1999
|
+
headers,
|
|
2000
|
+
};
|
|
2001
|
+
return transporter.request(request, requestOptions);
|
|
2002
|
+
},
|
|
2003
|
+
/**
|
|
2004
|
+
* Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.
|
|
2005
|
+
*
|
|
2006
|
+
* Required API Key ACLs:
|
|
2007
|
+
* - addObject
|
|
2008
|
+
* - deleteIndex
|
|
2009
|
+
* - editSettings.
|
|
2010
|
+
*
|
|
2011
|
+
* @param runTaskV1 - The runTaskV1 object.
|
|
2012
|
+
* @param runTaskV1.taskID - Unique identifier of a task.
|
|
2013
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2014
|
+
*/
|
|
2015
|
+
runTaskV1({ taskID }, requestOptions) {
|
|
2016
|
+
if (!taskID) {
|
|
2017
|
+
throw new Error('Parameter `taskID` is required when calling `runTaskV1`.');
|
|
2018
|
+
}
|
|
1764
2019
|
const requestPath = '/1/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1765
2020
|
const headers = {};
|
|
1766
2021
|
const queryParameters = {};
|
|
@@ -1880,6 +2135,36 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1880
2135
|
if (!taskSearch.taskIDs) {
|
|
1881
2136
|
throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.');
|
|
1882
2137
|
}
|
|
2138
|
+
const requestPath = '/2/tasks/search';
|
|
2139
|
+
const headers = {};
|
|
2140
|
+
const queryParameters = {};
|
|
2141
|
+
const request = {
|
|
2142
|
+
method: 'POST',
|
|
2143
|
+
path: requestPath,
|
|
2144
|
+
queryParameters,
|
|
2145
|
+
headers,
|
|
2146
|
+
data: taskSearch,
|
|
2147
|
+
};
|
|
2148
|
+
return transporter.request(request, requestOptions);
|
|
2149
|
+
},
|
|
2150
|
+
/**
|
|
2151
|
+
* Searches for tasks using the v1 endpoint, please use `searchTasks` instead.
|
|
2152
|
+
*
|
|
2153
|
+
* Required API Key ACLs:
|
|
2154
|
+
* - addObject
|
|
2155
|
+
* - deleteIndex
|
|
2156
|
+
* - editSettings.
|
|
2157
|
+
*
|
|
2158
|
+
* @param taskSearch - The taskSearch object.
|
|
2159
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2160
|
+
*/
|
|
2161
|
+
searchTasksV1(taskSearch, requestOptions) {
|
|
2162
|
+
if (!taskSearch) {
|
|
2163
|
+
throw new Error('Parameter `taskSearch` is required when calling `searchTasksV1`.');
|
|
2164
|
+
}
|
|
2165
|
+
if (!taskSearch.taskIDs) {
|
|
2166
|
+
throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.');
|
|
2167
|
+
}
|
|
1883
2168
|
const requestPath = '/1/tasks/search';
|
|
1884
2169
|
const headers = {};
|
|
1885
2170
|
const queryParameters = {};
|
|
@@ -2093,6 +2378,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
2093
2378
|
if (!taskUpdate) {
|
|
2094
2379
|
throw new Error('Parameter `taskUpdate` is required when calling `updateTask`.');
|
|
2095
2380
|
}
|
|
2381
|
+
const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
2382
|
+
const headers = {};
|
|
2383
|
+
const queryParameters = {};
|
|
2384
|
+
const request = {
|
|
2385
|
+
method: 'PATCH',
|
|
2386
|
+
path: requestPath,
|
|
2387
|
+
queryParameters,
|
|
2388
|
+
headers,
|
|
2389
|
+
data: taskUpdate,
|
|
2390
|
+
};
|
|
2391
|
+
return transporter.request(request, requestOptions);
|
|
2392
|
+
},
|
|
2393
|
+
/**
|
|
2394
|
+
* Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.
|
|
2395
|
+
*
|
|
2396
|
+
* @param updateTaskV1 - The updateTaskV1 object.
|
|
2397
|
+
* @param updateTaskV1.taskID - Unique identifier of a task.
|
|
2398
|
+
* @param updateTaskV1.taskUpdate - The taskUpdate object.
|
|
2399
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2400
|
+
*/
|
|
2401
|
+
updateTaskV1({ taskID, taskUpdate }, requestOptions) {
|
|
2402
|
+
if (!taskID) {
|
|
2403
|
+
throw new Error('Parameter `taskID` is required when calling `updateTaskV1`.');
|
|
2404
|
+
}
|
|
2405
|
+
if (!taskUpdate) {
|
|
2406
|
+
throw new Error('Parameter `taskUpdate` is required when calling `updateTaskV1`.');
|
|
2407
|
+
}
|
|
2096
2408
|
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
2097
2409
|
const headers = {};
|
|
2098
2410
|
const queryParameters = {};
|