@algolia/ingestion 1.0.0-beta.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/builds/browser.d.ts +22 -8
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +22 -8
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/ingestion.cjs +623 -187
  6. package/dist/ingestion.esm.browser.js +623 -187
  7. package/dist/ingestion.esm.node.js +623 -187
  8. package/dist/ingestion.umd.js +2 -2
  9. package/dist/model/action.d.ts +5 -0
  10. package/dist/model/action.d.ts.map +1 -0
  11. package/dist/model/batchRequest.d.ts +9 -0
  12. package/dist/model/batchRequest.d.ts.map +1 -0
  13. package/dist/model/batchWriteParams.d.ts +8 -0
  14. package/dist/model/batchWriteParams.d.ts.map +1 -0
  15. package/dist/model/clientMethodProps.d.ts +209 -65
  16. package/dist/model/clientMethodProps.d.ts.map +1 -1
  17. package/dist/model/destination.d.ts +1 -0
  18. package/dist/model/destination.d.ts.map +1 -1
  19. package/dist/model/destinationCreate.d.ts +1 -0
  20. package/dist/model/destinationCreate.d.ts.map +1 -1
  21. package/dist/model/destinationInput.d.ts +1 -2
  22. package/dist/model/destinationInput.d.ts.map +1 -1
  23. package/dist/model/destinationUpdate.d.ts +1 -0
  24. package/dist/model/destinationUpdate.d.ts.map +1 -1
  25. package/dist/model/dockerStreams.d.ts +13 -0
  26. package/dist/model/dockerStreams.d.ts.map +1 -0
  27. package/dist/model/dockerStreamsInput.d.ts +8 -0
  28. package/dist/model/dockerStreamsInput.d.ts.map +1 -0
  29. package/dist/model/dockerStreamsSyncMode.d.ts +5 -0
  30. package/dist/model/dockerStreamsSyncMode.d.ts.map +1 -0
  31. package/dist/model/entityType.d.ts +5 -0
  32. package/dist/model/entityType.d.ts.map +1 -0
  33. package/dist/model/generateTransformationCodePayload.d.ts +6 -0
  34. package/dist/model/generateTransformationCodePayload.d.ts.map +1 -0
  35. package/dist/model/generateTransformationCodeResponse.d.ts +4 -0
  36. package/dist/model/generateTransformationCodeResponse.d.ts.map +1 -0
  37. package/dist/model/index.d.ts +19 -5
  38. package/dist/model/index.d.ts.map +1 -1
  39. package/dist/model/listTasksResponseV1.d.ts +10 -0
  40. package/dist/model/listTasksResponseV1.d.ts.map +1 -0
  41. package/dist/model/model.d.ts +8 -0
  42. package/dist/model/model.d.ts.map +1 -0
  43. package/dist/model/runSourcePayload.d.ts +17 -0
  44. package/dist/model/runSourcePayload.d.ts.map +1 -0
  45. package/dist/model/runSourceResponse.d.ts +11 -0
  46. package/dist/model/runSourceResponse.d.ts.map +1 -0
  47. package/dist/model/sourceUpdateShopify.d.ts +2 -26
  48. package/dist/model/sourceUpdateShopify.d.ts.map +1 -1
  49. package/dist/model/{streamingUtilsInput.d.ts → streamingInput.d.ts} +2 -2
  50. package/dist/model/streamingInput.d.ts.map +1 -0
  51. package/dist/model/task.d.ts +12 -2
  52. package/dist/model/task.d.ts.map +1 -1
  53. package/dist/model/taskCreate.d.ts +4 -2
  54. package/dist/model/taskCreate.d.ts.map +1 -1
  55. package/dist/model/taskCreateV1.d.ts +32 -0
  56. package/dist/model/taskCreateV1.d.ts.map +1 -0
  57. package/dist/model/taskInput.d.ts +3 -4
  58. package/dist/model/taskInput.d.ts.map +1 -1
  59. package/dist/model/taskUpdate.d.ts +4 -2
  60. package/dist/model/taskUpdate.d.ts.map +1 -1
  61. package/dist/model/taskUpdateV1.d.ts +22 -0
  62. package/dist/model/taskUpdateV1.d.ts.map +1 -0
  63. package/dist/model/taskV1.d.ts +44 -0
  64. package/dist/model/taskV1.d.ts.map +1 -0
  65. package/dist/model/transformation.d.ts +5 -1
  66. package/dist/model/transformation.d.ts.map +1 -1
  67. package/dist/model/transformationCreate.d.ts +5 -1
  68. package/dist/model/transformationCreate.d.ts.map +1 -1
  69. package/dist/model/{transformationTryResponseError.d.ts → transformationError.d.ts} +2 -2
  70. package/dist/model/transformationError.d.ts.map +1 -0
  71. package/dist/model/transformationModels.d.ts +8 -0
  72. package/dist/model/transformationModels.d.ts.map +1 -0
  73. package/dist/model/transformationSearch.d.ts +1 -1
  74. package/dist/model/transformationSearch.d.ts.map +1 -1
  75. package/dist/model/transformationTry.d.ts +2 -0
  76. package/dist/model/transformationTry.d.ts.map +1 -1
  77. package/dist/model/transformationTryResponse.d.ts +2 -2
  78. package/dist/model/transformationTryResponse.d.ts.map +1 -1
  79. package/dist/src/ingestionClient.d.ts +276 -93
  80. package/dist/src/ingestionClient.d.ts.map +1 -1
  81. package/model/action.ts +13 -0
  82. package/model/batchRequest.ts +12 -0
  83. package/model/{destinationIndexPrefix.ts → batchWriteParams.ts} +7 -5
  84. package/model/clientMethodProps.ts +224 -70
  85. package/model/destination.ts +2 -0
  86. package/model/destinationCreate.ts +2 -0
  87. package/model/destinationInput.ts +1 -2
  88. package/model/destinationUpdate.ts +2 -0
  89. package/model/dockerStreams.ts +17 -0
  90. package/model/dockerStreamsInput.ts +10 -0
  91. package/model/dockerStreamsSyncMode.ts +6 -0
  92. package/model/entityType.ts +6 -0
  93. package/model/generateTransformationCodePayload.ts +9 -0
  94. package/model/generateTransformationCodeResponse.ts +5 -0
  95. package/model/index.ts +19 -5
  96. package/model/listTasksResponseV1.ts +13 -0
  97. package/model/model.ts +13 -0
  98. package/model/runSourcePayload.ts +22 -0
  99. package/model/runSourceResponse.ts +13 -0
  100. package/model/sourceUpdateShopify.ts +2 -32
  101. package/model/{streamingUtilsInput.ts → streamingInput.ts} +1 -1
  102. package/model/task.ts +14 -2
  103. package/model/taskCreate.ts +5 -3
  104. package/model/taskCreateV1.ts +41 -0
  105. package/model/taskInput.ts +3 -8
  106. package/model/taskUpdate.ts +4 -2
  107. package/model/taskUpdateV1.ts +28 -0
  108. package/model/taskV1.ts +56 -0
  109. package/model/transformation.ts +6 -1
  110. package/model/transformationCreate.ts +6 -1
  111. package/model/{transformationTryResponseError.ts → transformationError.ts} +1 -1
  112. package/model/transformationModels.ts +10 -0
  113. package/model/transformationSearch.ts +1 -1
  114. package/model/transformationTry.ts +4 -0
  115. package/model/transformationTryResponse.ts +2 -2
  116. package/package.json +7 -7
  117. package/dist/model/destinationIndexPrefix.d.ts +0 -7
  118. package/dist/model/destinationIndexPrefix.d.ts.map +0 -1
  119. package/dist/model/onDemandDateUtilsInput.d.ts +0 -16
  120. package/dist/model/onDemandDateUtilsInput.d.ts.map +0 -1
  121. package/dist/model/scheduleDateUtilsInput.d.ts +0 -12
  122. package/dist/model/scheduleDateUtilsInput.d.ts.map +0 -1
  123. package/dist/model/streamingUtilsInput.d.ts.map +0 -1
  124. package/dist/model/transformationTryResponseError.d.ts.map +0 -1
  125. package/model/onDemandDateUtilsInput.ts +0 -20
  126. package/model/scheduleDateUtilsInput.ts +0 -15
@@ -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.8';
679
+ const apiClientVersion = '1.0.0';
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 `createTask`.');
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 `createTask`.');
922
+ throw new Error('Parameter `taskCreate.action` is required when calling `createTaskV1`.');
892
923
  }
893
924
  const requestPath = '/1/tasks';
894
925
  const headers = {};
@@ -918,9 +949,6 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
918
949
  if (!transformationCreate.name) {
919
950
  throw new Error('Parameter `transformationCreate.name` is required when calling `createTransformation`.');
920
951
  }
921
- if (!transformationCreate.description) {
922
- throw new Error('Parameter `transformationCreate.description` is required when calling `createTransformation`.');
923
- }
924
952
  const requestPath = '/1/transformations';
925
953
  const headers = {};
926
954
  const queryParameters = {};
@@ -1121,6 +1149,28 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1121
1149
  if (!taskID) {
1122
1150
  throw new Error('Parameter `taskID` is required when calling `deleteTask`.');
1123
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
+ }
1124
1174
  const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1125
1175
  const headers = {};
1126
1176
  const queryParameters = {};
@@ -1170,6 +1220,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1170
1220
  if (!taskID) {
1171
1221
  throw new Error('Parameter `taskID` is required when calling `disableTask`.');
1172
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
+ }
1173
1250
  const requestPath = '/1/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID));
1174
1251
  const headers = {};
1175
1252
  const queryParameters = {};
@@ -1197,6 +1274,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1197
1274
  if (!taskID) {
1198
1275
  throw new Error('Parameter `taskID` is required when calling `enableTask`.');
1199
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
+ }
1200
1304
  const requestPath = '/1/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID));
1201
1305
  const headers = {};
1202
1306
  const queryParameters = {};
@@ -1208,6 +1312,39 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1208
1312
  };
1209
1313
  return transporter.request(request, requestOptions);
1210
1314
  },
1315
+ /**
1316
+ * Generates code for the selected model based on the given prompt.
1317
+ *
1318
+ * Required API Key ACLs:
1319
+ * - addObject
1320
+ * - deleteIndex
1321
+ * - editSettings.
1322
+ *
1323
+ * @param generateTransformationCodePayload - The generateTransformationCodePayload object.
1324
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1325
+ */
1326
+ generateTransformationCode(generateTransformationCodePayload, requestOptions) {
1327
+ if (!generateTransformationCodePayload) {
1328
+ throw new Error('Parameter `generateTransformationCodePayload` is required when calling `generateTransformationCode`.');
1329
+ }
1330
+ if (!generateTransformationCodePayload.id) {
1331
+ throw new Error('Parameter `generateTransformationCodePayload.id` is required when calling `generateTransformationCode`.');
1332
+ }
1333
+ if (!generateTransformationCodePayload.userPrompt) {
1334
+ throw new Error('Parameter `generateTransformationCodePayload.userPrompt` is required when calling `generateTransformationCode`.');
1335
+ }
1336
+ const requestPath = '/1/transformations/models';
1337
+ const headers = {};
1338
+ const queryParameters = {};
1339
+ const request = {
1340
+ method: 'POST',
1341
+ path: requestPath,
1342
+ queryParameters,
1343
+ headers,
1344
+ data: generateTransformationCodePayload,
1345
+ };
1346
+ return transporter.request(request, requestOptions);
1347
+ },
1211
1348
  /**
1212
1349
  * Retrieves an authentication resource by its ID.
1213
1350
  *
@@ -1236,44 +1373,165 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1236
1373
  return transporter.request(request, requestOptions);
1237
1374
  },
1238
1375
  /**
1239
- * Retrieves a list of all authentication resources.
1376
+ * Retrieves a destination by its ID.
1240
1377
  *
1241
1378
  * Required API Key ACLs:
1242
1379
  * - addObject
1243
1380
  * - deleteIndex
1244
1381
  * - editSettings.
1245
1382
  *
1246
- * @param getAuthentications - The getAuthentications object.
1247
- * @param getAuthentications.itemsPerPage - Number of items per page.
1248
- * @param getAuthentications.page - Page number of the paginated API response.
1249
- * @param getAuthentications.type - Type of authentication resource to retrieve.
1250
- * @param getAuthentications.platform - Ecommerce platform for which to retrieve authentication resources.
1251
- * @param getAuthentications.sort - Property by which to sort the list of authentication resources.
1252
- * @param getAuthentications.order - Sort order of the response, ascending or descending.
1383
+ * @param getDestination - The getDestination object.
1384
+ * @param getDestination.destinationID - Unique identifier of a destination.
1253
1385
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1254
1386
  */
1255
- getAuthentications({ itemsPerPage, page, type, platform, sort, order, } = {}, requestOptions = undefined) {
1256
- const requestPath = '/1/authentications';
1387
+ getDestination({ destinationID }, requestOptions) {
1388
+ if (!destinationID) {
1389
+ throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
1390
+ }
1391
+ const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
1257
1392
  const headers = {};
1258
1393
  const queryParameters = {};
1259
- if (itemsPerPage !== undefined) {
1260
- queryParameters.itemsPerPage = itemsPerPage.toString();
1394
+ const request = {
1395
+ method: 'GET',
1396
+ path: requestPath,
1397
+ queryParameters,
1398
+ headers,
1399
+ };
1400
+ return transporter.request(request, requestOptions);
1401
+ },
1402
+ /**
1403
+ * Retrieves a single task run event by its ID.
1404
+ *
1405
+ * Required API Key ACLs:
1406
+ * - addObject
1407
+ * - deleteIndex
1408
+ * - editSettings.
1409
+ *
1410
+ * @param getEvent - The getEvent object.
1411
+ * @param getEvent.runID - Unique identifier of a task run.
1412
+ * @param getEvent.eventID - Unique identifier of an event.
1413
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1414
+ */
1415
+ getEvent({ runID, eventID }, requestOptions) {
1416
+ if (!runID) {
1417
+ throw new Error('Parameter `runID` is required when calling `getEvent`.');
1261
1418
  }
1262
- if (page !== undefined) {
1263
- queryParameters.page = page.toString();
1419
+ if (!eventID) {
1420
+ throw new Error('Parameter `eventID` is required when calling `getEvent`.');
1264
1421
  }
1265
- if (type !== undefined) {
1266
- queryParameters.type = type.toString();
1422
+ const requestPath = '/1/runs/{runID}/events/{eventID}'
1423
+ .replace('{runID}', encodeURIComponent(runID))
1424
+ .replace('{eventID}', encodeURIComponent(eventID));
1425
+ const headers = {};
1426
+ const queryParameters = {};
1427
+ const request = {
1428
+ method: 'GET',
1429
+ path: requestPath,
1430
+ queryParameters,
1431
+ headers,
1432
+ };
1433
+ return transporter.request(request, requestOptions);
1434
+ },
1435
+ /**
1436
+ * Retrieve a single task run by its ID.
1437
+ *
1438
+ * Required API Key ACLs:
1439
+ * - addObject
1440
+ * - deleteIndex
1441
+ * - editSettings.
1442
+ *
1443
+ * @param getRun - The getRun object.
1444
+ * @param getRun.runID - Unique identifier of a task run.
1445
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1446
+ */
1447
+ getRun({ runID }, requestOptions) {
1448
+ if (!runID) {
1449
+ throw new Error('Parameter `runID` is required when calling `getRun`.');
1267
1450
  }
1268
- if (platform !== undefined) {
1269
- queryParameters.platform = platform.toString();
1451
+ const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
1452
+ const headers = {};
1453
+ const queryParameters = {};
1454
+ const request = {
1455
+ method: 'GET',
1456
+ path: requestPath,
1457
+ queryParameters,
1458
+ headers,
1459
+ };
1460
+ return transporter.request(request, requestOptions);
1461
+ },
1462
+ /**
1463
+ * Retrieve a source by its ID.
1464
+ *
1465
+ * Required API Key ACLs:
1466
+ * - addObject
1467
+ * - deleteIndex
1468
+ * - editSettings.
1469
+ *
1470
+ * @param getSource - The getSource object.
1471
+ * @param getSource.sourceID - Unique identifier of a source.
1472
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1473
+ */
1474
+ getSource({ sourceID }, requestOptions) {
1475
+ if (!sourceID) {
1476
+ throw new Error('Parameter `sourceID` is required when calling `getSource`.');
1270
1477
  }
1271
- if (sort !== undefined) {
1272
- queryParameters.sort = sort.toString();
1478
+ const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
1479
+ const headers = {};
1480
+ const queryParameters = {};
1481
+ const request = {
1482
+ method: 'GET',
1483
+ path: requestPath,
1484
+ queryParameters,
1485
+ headers,
1486
+ };
1487
+ return transporter.request(request, requestOptions);
1488
+ },
1489
+ /**
1490
+ * Retrieves a task by its ID.
1491
+ *
1492
+ * Required API Key ACLs:
1493
+ * - addObject
1494
+ * - deleteIndex
1495
+ * - editSettings.
1496
+ *
1497
+ * @param getTask - The getTask object.
1498
+ * @param getTask.taskID - Unique identifier of a task.
1499
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1500
+ */
1501
+ getTask({ taskID }, requestOptions) {
1502
+ if (!taskID) {
1503
+ throw new Error('Parameter `taskID` is required when calling `getTask`.');
1273
1504
  }
1274
- if (order !== undefined) {
1275
- queryParameters.order = order.toString();
1505
+ const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1506
+ const headers = {};
1507
+ const queryParameters = {};
1508
+ const request = {
1509
+ method: 'GET',
1510
+ path: requestPath,
1511
+ queryParameters,
1512
+ headers,
1513
+ };
1514
+ return transporter.request(request, requestOptions);
1515
+ },
1516
+ /**
1517
+ * Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.
1518
+ *
1519
+ * Required API Key ACLs:
1520
+ * - addObject
1521
+ * - deleteIndex
1522
+ * - editSettings.
1523
+ *
1524
+ * @param getTaskV1 - The getTaskV1 object.
1525
+ * @param getTaskV1.taskID - Unique identifier of a task.
1526
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1527
+ */
1528
+ getTaskV1({ taskID }, requestOptions) {
1529
+ if (!taskID) {
1530
+ throw new Error('Parameter `taskID` is required when calling `getTaskV1`.');
1276
1531
  }
1532
+ const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1533
+ const headers = {};
1534
+ const queryParameters = {};
1277
1535
  const request = {
1278
1536
  method: 'GET',
1279
1537
  path: requestPath,
@@ -1283,22 +1541,22 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1283
1541
  return transporter.request(request, requestOptions);
1284
1542
  },
1285
1543
  /**
1286
- * Retrieves a destination by its ID.
1544
+ * Retrieves a transformation by its ID.
1287
1545
  *
1288
1546
  * Required API Key ACLs:
1289
1547
  * - addObject
1290
1548
  * - deleteIndex
1291
1549
  * - editSettings.
1292
1550
  *
1293
- * @param getDestination - The getDestination object.
1294
- * @param getDestination.destinationID - Unique identifier of a destination.
1551
+ * @param getTransformation - The getTransformation object.
1552
+ * @param getTransformation.transformationID - Unique identifier of a transformation.
1295
1553
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1296
1554
  */
1297
- getDestination({ destinationID }, requestOptions) {
1298
- if (!destinationID) {
1299
- throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
1555
+ getTransformation({ transformationID }, requestOptions) {
1556
+ if (!transformationID) {
1557
+ throw new Error('Parameter `transformationID` is required when calling `getTransformation`.');
1300
1558
  }
1301
- const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
1559
+ const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
1302
1560
  const headers = {};
1303
1561
  const queryParameters = {};
1304
1562
  const request = {
@@ -1310,24 +1568,24 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1310
1568
  return transporter.request(request, requestOptions);
1311
1569
  },
1312
1570
  /**
1313
- * Retrieves a list of destinations.
1571
+ * Retrieves a list of all authentication resources.
1314
1572
  *
1315
1573
  * Required API Key ACLs:
1316
1574
  * - addObject
1317
1575
  * - deleteIndex
1318
1576
  * - editSettings.
1319
1577
  *
1320
- * @param getDestinations - The getDestinations object.
1321
- * @param getDestinations.itemsPerPage - Number of items per page.
1322
- * @param getDestinations.page - Page number of the paginated API response.
1323
- * @param getDestinations.type - Destination type.
1324
- * @param getDestinations.authenticationID - Authentication ID used by destinations.
1325
- * @param getDestinations.sort - Property by which to sort the destinations.
1326
- * @param getDestinations.order - Sort order of the response, ascending or descending.
1578
+ * @param listAuthentications - The listAuthentications object.
1579
+ * @param listAuthentications.itemsPerPage - Number of items per page.
1580
+ * @param listAuthentications.page - Page number of the paginated API response.
1581
+ * @param listAuthentications.type - Type of authentication resource to retrieve.
1582
+ * @param listAuthentications.platform - Ecommerce platform for which to retrieve authentication resources.
1583
+ * @param listAuthentications.sort - Property by which to sort the list of authentication resources.
1584
+ * @param listAuthentications.order - Sort order of the response, ascending or descending.
1327
1585
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1328
1586
  */
1329
- getDestinations({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
1330
- const requestPath = '/1/destinations';
1587
+ listAuthentications({ itemsPerPage, page, type, platform, sort, order, } = {}, requestOptions = undefined) {
1588
+ const requestPath = '/1/authentications';
1331
1589
  const headers = {};
1332
1590
  const queryParameters = {};
1333
1591
  if (itemsPerPage !== undefined) {
@@ -1339,8 +1597,8 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1339
1597
  if (type !== undefined) {
1340
1598
  queryParameters.type = type.toString();
1341
1599
  }
1342
- if (authenticationID !== undefined) {
1343
- queryParameters.authenticationID = authenticationID.toString();
1600
+ if (platform !== undefined) {
1601
+ queryParameters.platform = platform.toString();
1344
1602
  }
1345
1603
  if (sort !== undefined) {
1346
1604
  queryParameters.sort = sort.toString();
@@ -1357,30 +1615,44 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1357
1615
  return transporter.request(request, requestOptions);
1358
1616
  },
1359
1617
  /**
1360
- * Retrieves a single task run event by its ID.
1618
+ * Retrieves a list of destinations.
1361
1619
  *
1362
1620
  * Required API Key ACLs:
1363
1621
  * - addObject
1364
1622
  * - deleteIndex
1365
1623
  * - editSettings.
1366
1624
  *
1367
- * @param getEvent - The getEvent object.
1368
- * @param getEvent.runID - Unique identifier of a task run.
1369
- * @param getEvent.eventID - Unique identifier of an event.
1625
+ * @param listDestinations - The listDestinations object.
1626
+ * @param listDestinations.itemsPerPage - Number of items per page.
1627
+ * @param listDestinations.page - Page number of the paginated API response.
1628
+ * @param listDestinations.type - Destination type.
1629
+ * @param listDestinations.authenticationID - Authentication ID used by destinations.
1630
+ * @param listDestinations.sort - Property by which to sort the destinations.
1631
+ * @param listDestinations.order - Sort order of the response, ascending or descending.
1370
1632
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1371
1633
  */
1372
- getEvent({ runID, eventID }, requestOptions) {
1373
- if (!runID) {
1374
- throw new Error('Parameter `runID` is required when calling `getEvent`.');
1634
+ listDestinations({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
1635
+ const requestPath = '/1/destinations';
1636
+ const headers = {};
1637
+ const queryParameters = {};
1638
+ if (itemsPerPage !== undefined) {
1639
+ queryParameters.itemsPerPage = itemsPerPage.toString();
1640
+ }
1641
+ if (page !== undefined) {
1642
+ queryParameters.page = page.toString();
1643
+ }
1644
+ if (type !== undefined) {
1645
+ queryParameters.type = type.toString();
1646
+ }
1647
+ if (authenticationID !== undefined) {
1648
+ queryParameters.authenticationID = authenticationID.toString();
1375
1649
  }
1376
- if (!eventID) {
1377
- throw new Error('Parameter `eventID` is required when calling `getEvent`.');
1650
+ if (sort !== undefined) {
1651
+ queryParameters.sort = sort.toString();
1652
+ }
1653
+ if (order !== undefined) {
1654
+ queryParameters.order = order.toString();
1378
1655
  }
1379
- const requestPath = '/1/runs/{runID}/events/{eventID}'
1380
- .replace('{runID}', encodeURIComponent(runID))
1381
- .replace('{eventID}', encodeURIComponent(eventID));
1382
- const headers = {};
1383
- const queryParameters = {};
1384
1656
  const request = {
1385
1657
  method: 'GET',
1386
1658
  path: requestPath,
@@ -1397,21 +1669,21 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1397
1669
  * - deleteIndex
1398
1670
  * - editSettings.
1399
1671
  *
1400
- * @param getEvents - The getEvents object.
1401
- * @param getEvents.runID - Unique identifier of a task run.
1402
- * @param getEvents.itemsPerPage - Number of items per page.
1403
- * @param getEvents.page - Page number of the paginated API response.
1404
- * @param getEvents.status - Event status for filtering the list of task runs.
1405
- * @param getEvents.type - Event type for filtering the list of task runs.
1406
- * @param getEvents.sort - Property by which to sort the list of task run events.
1407
- * @param getEvents.order - Sort order of the response, ascending or descending.
1408
- * @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.
1409
- * @param getEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
1672
+ * @param listEvents - The listEvents object.
1673
+ * @param listEvents.runID - Unique identifier of a task run.
1674
+ * @param listEvents.itemsPerPage - Number of items per page.
1675
+ * @param listEvents.page - Page number of the paginated API response.
1676
+ * @param listEvents.status - Event status for filtering the list of task runs.
1677
+ * @param listEvents.type - Event type for filtering the list of task runs.
1678
+ * @param listEvents.sort - Property by which to sort the list of task run events.
1679
+ * @param listEvents.order - Sort order of the response, ascending or descending.
1680
+ * @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.
1681
+ * @param listEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.
1410
1682
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1411
1683
  */
1412
- getEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
1684
+ listEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
1413
1685
  if (!runID) {
1414
- throw new Error('Parameter `runID` is required when calling `getEvents`.');
1686
+ throw new Error('Parameter `runID` is required when calling `listEvents`.');
1415
1687
  }
1416
1688
  const requestPath = '/1/runs/{runID}/events'.replace('{runID}', encodeURIComponent(runID));
1417
1689
  const headers = {};
@@ -1448,33 +1720,6 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1448
1720
  };
1449
1721
  return transporter.request(request, requestOptions);
1450
1722
  },
1451
- /**
1452
- * Retrieve a single task run by its ID.
1453
- *
1454
- * Required API Key ACLs:
1455
- * - addObject
1456
- * - deleteIndex
1457
- * - editSettings.
1458
- *
1459
- * @param getRun - The getRun object.
1460
- * @param getRun.runID - Unique identifier of a task run.
1461
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1462
- */
1463
- getRun({ runID }, requestOptions) {
1464
- if (!runID) {
1465
- throw new Error('Parameter `runID` is required when calling `getRun`.');
1466
- }
1467
- const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
1468
- const headers = {};
1469
- const queryParameters = {};
1470
- const request = {
1471
- method: 'GET',
1472
- path: requestPath,
1473
- queryParameters,
1474
- headers,
1475
- };
1476
- return transporter.request(request, requestOptions);
1477
- },
1478
1723
  /**
1479
1724
  * Retrieve a list of task runs.
1480
1725
  *
@@ -1483,18 +1728,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1483
1728
  * - deleteIndex
1484
1729
  * - editSettings.
1485
1730
  *
1486
- * @param getRuns - The getRuns object.
1487
- * @param getRuns.itemsPerPage - Number of items per page.
1488
- * @param getRuns.page - Page number of the paginated API response.
1489
- * @param getRuns.status - Run status for filtering the list of task runs.
1490
- * @param getRuns.taskID - Task ID for filtering the list of task runs.
1491
- * @param getRuns.sort - Property by which to sort the list of task runs.
1492
- * @param getRuns.order - Sort order of the response, ascending or descending.
1493
- * @param getRuns.startDate - Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.
1494
- * @param getRuns.endDate - Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.
1731
+ * @param listRuns - The listRuns object.
1732
+ * @param listRuns.itemsPerPage - Number of items per page.
1733
+ * @param listRuns.page - Page number of the paginated API response.
1734
+ * @param listRuns.status - Run status for filtering the list of task runs.
1735
+ * @param listRuns.taskID - Task ID for filtering the list of task runs.
1736
+ * @param listRuns.sort - Property by which to sort the list of task runs.
1737
+ * @param listRuns.order - Sort order of the response, ascending or descending.
1738
+ * @param listRuns.startDate - Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.
1739
+ * @param listRuns.endDate - Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.
1495
1740
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1496
1741
  */
1497
- getRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
1742
+ listRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
1498
1743
  const requestPath = '/1/runs';
1499
1744
  const headers = {};
1500
1745
  const queryParameters = {};
@@ -1530,33 +1775,6 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1530
1775
  };
1531
1776
  return transporter.request(request, requestOptions);
1532
1777
  },
1533
- /**
1534
- * Retrieve a source by its ID.
1535
- *
1536
- * Required API Key ACLs:
1537
- * - addObject
1538
- * - deleteIndex
1539
- * - editSettings.
1540
- *
1541
- * @param getSource - The getSource object.
1542
- * @param getSource.sourceID - Unique identifier of a source.
1543
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1544
- */
1545
- getSource({ sourceID }, requestOptions) {
1546
- if (!sourceID) {
1547
- throw new Error('Parameter `sourceID` is required when calling `getSource`.');
1548
- }
1549
- const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
1550
- const headers = {};
1551
- const queryParameters = {};
1552
- const request = {
1553
- method: 'GET',
1554
- path: requestPath,
1555
- queryParameters,
1556
- headers,
1557
- };
1558
- return transporter.request(request, requestOptions);
1559
- },
1560
1778
  /**
1561
1779
  * Retrieves a list of sources.
1562
1780
  *
@@ -1565,16 +1783,16 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1565
1783
  * - deleteIndex
1566
1784
  * - editSettings.
1567
1785
  *
1568
- * @param getSources - The getSources object.
1569
- * @param getSources.itemsPerPage - Number of items per page.
1570
- * @param getSources.page - Page number of the paginated API response.
1571
- * @param getSources.type - Source type. Some sources require authentication.
1572
- * @param getSources.authenticationID - Authentication IDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication resource.
1573
- * @param getSources.sort - Property by which to sort the list of sources.
1574
- * @param getSources.order - Sort order of the response, ascending or descending.
1786
+ * @param listSources - The listSources object.
1787
+ * @param listSources.itemsPerPage - Number of items per page.
1788
+ * @param listSources.page - Page number of the paginated API response.
1789
+ * @param listSources.type - Source type. Some sources require authentication.
1790
+ * @param listSources.authenticationID - Authentication IDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication resource.
1791
+ * @param listSources.sort - Property by which to sort the list of sources.
1792
+ * @param listSources.order - Sort order of the response, ascending or descending.
1575
1793
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1576
1794
  */
1577
- getSources({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
1795
+ listSources({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
1578
1796
  const requestPath = '/1/sources';
1579
1797
  const headers = {};
1580
1798
  const queryParameters = {};
@@ -1605,24 +1823,56 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1605
1823
  return transporter.request(request, requestOptions);
1606
1824
  },
1607
1825
  /**
1608
- * Retrieves a task by its ID.
1826
+ * Retrieves a list of tasks.
1609
1827
  *
1610
1828
  * Required API Key ACLs:
1611
1829
  * - addObject
1612
1830
  * - deleteIndex
1613
1831
  * - editSettings.
1614
1832
  *
1615
- * @param getTask - The getTask object.
1616
- * @param getTask.taskID - Unique identifier of a task.
1833
+ * @param listTasks - The listTasks object.
1834
+ * @param listTasks.itemsPerPage - Number of items per page.
1835
+ * @param listTasks.page - Page number of the paginated API response.
1836
+ * @param listTasks.action - Actions for filtering the list of tasks.
1837
+ * @param listTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
1838
+ * @param listTasks.sourceID - Source IDs for filtering the list of tasks.
1839
+ * @param listTasks.destinationID - Destination IDs for filtering the list of tasks.
1840
+ * @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.
1841
+ * @param listTasks.sort - Property by which to sort the list of tasks.
1842
+ * @param listTasks.order - Sort order of the response, ascending or descending.
1617
1843
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1618
1844
  */
1619
- getTask({ taskID }, requestOptions) {
1620
- if (!taskID) {
1621
- throw new Error('Parameter `taskID` is required when calling `getTask`.');
1622
- }
1623
- const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
1845
+ listTasks({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
1846
+ const requestPath = '/2/tasks';
1624
1847
  const headers = {};
1625
1848
  const queryParameters = {};
1849
+ if (itemsPerPage !== undefined) {
1850
+ queryParameters.itemsPerPage = itemsPerPage.toString();
1851
+ }
1852
+ if (page !== undefined) {
1853
+ queryParameters.page = page.toString();
1854
+ }
1855
+ if (action !== undefined) {
1856
+ queryParameters.action = action.toString();
1857
+ }
1858
+ if (enabled !== undefined) {
1859
+ queryParameters.enabled = enabled.toString();
1860
+ }
1861
+ if (sourceID !== undefined) {
1862
+ queryParameters.sourceID = sourceID.toString();
1863
+ }
1864
+ if (destinationID !== undefined) {
1865
+ queryParameters.destinationID = destinationID.toString();
1866
+ }
1867
+ if (triggerType !== undefined) {
1868
+ queryParameters.triggerType = triggerType.toString();
1869
+ }
1870
+ if (sort !== undefined) {
1871
+ queryParameters.sort = sort.toString();
1872
+ }
1873
+ if (order !== undefined) {
1874
+ queryParameters.order = order.toString();
1875
+ }
1626
1876
  const request = {
1627
1877
  method: 'GET',
1628
1878
  path: requestPath,
@@ -1632,26 +1882,26 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1632
1882
  return transporter.request(request, requestOptions);
1633
1883
  },
1634
1884
  /**
1635
- * Retrieves a list of tasks.
1885
+ * Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.
1636
1886
  *
1637
1887
  * Required API Key ACLs:
1638
1888
  * - addObject
1639
1889
  * - deleteIndex
1640
1890
  * - editSettings.
1641
1891
  *
1642
- * @param getTasks - The getTasks object.
1643
- * @param getTasks.itemsPerPage - Number of items per page.
1644
- * @param getTasks.page - Page number of the paginated API response.
1645
- * @param getTasks.action - Actions for filtering the list of tasks.
1646
- * @param getTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
1647
- * @param getTasks.sourceID - Source IDs for filtering the list of tasks.
1648
- * @param getTasks.destinationID - Destination IDs for filtering the list of tasks.
1649
- * @param getTasks.triggerType - Type of task trigger for filtering the list of tasks.
1650
- * @param getTasks.sort - Property by which to sort the list of tasks.
1651
- * @param getTasks.order - Sort order of the response, ascending or descending.
1892
+ * @param listTasksV1 - The listTasksV1 object.
1893
+ * @param listTasksV1.itemsPerPage - Number of items per page.
1894
+ * @param listTasksV1.page - Page number of the paginated API response.
1895
+ * @param listTasksV1.action - Actions for filtering the list of tasks.
1896
+ * @param listTasksV1.enabled - Whether to filter the list of tasks by the `enabled` status.
1897
+ * @param listTasksV1.sourceID - Source IDs for filtering the list of tasks.
1898
+ * @param listTasksV1.destinationID - Destination IDs for filtering the list of tasks.
1899
+ * @param listTasksV1.triggerType - Type of task trigger for filtering the list of tasks.
1900
+ * @param listTasksV1.sort - Property by which to sort the list of tasks.
1901
+ * @param listTasksV1.order - Sort order of the response, ascending or descending.
1652
1902
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1653
1903
  */
1654
- getTasks({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
1904
+ listTasksV1({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
1655
1905
  const requestPath = '/1/tasks';
1656
1906
  const headers = {};
1657
1907
  const queryParameters = {};
@@ -1691,22 +1941,17 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1691
1941
  return transporter.request(request, requestOptions);
1692
1942
  },
1693
1943
  /**
1694
- * Retrieves a transformation by its ID.
1944
+ * Retrieves a list of existing LLM transformation helpers.
1695
1945
  *
1696
1946
  * Required API Key ACLs:
1697
1947
  * - addObject
1698
1948
  * - deleteIndex
1699
1949
  * - editSettings.
1700
1950
  *
1701
- * @param getTransformation - The getTransformation object.
1702
- * @param getTransformation.transformationID - Unique identifier of a transformation.
1703
1951
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1704
1952
  */
1705
- getTransformation({ transformationID }, requestOptions) {
1706
- if (!transformationID) {
1707
- throw new Error('Parameter `transformationID` is required when calling `getTransformation`.');
1708
- }
1709
- const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
1953
+ listTransformationModels(requestOptions) {
1954
+ const requestPath = '/1/transformations/models';
1710
1955
  const headers = {};
1711
1956
  const queryParameters = {};
1712
1957
  const request = {
@@ -1725,15 +1970,23 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1725
1970
  * - deleteIndex
1726
1971
  * - editSettings.
1727
1972
  *
1728
- * @param getTransformations - The getTransformations object.
1729
- * @param getTransformations.sort - Property by which to sort the list.
1730
- * @param getTransformations.order - Sort order of the response, ascending or descending.
1973
+ * @param listTransformations - The listTransformations object.
1974
+ * @param listTransformations.itemsPerPage - Number of items per page.
1975
+ * @param listTransformations.page - Page number of the paginated API response.
1976
+ * @param listTransformations.sort - Property by which to sort the list.
1977
+ * @param listTransformations.order - Sort order of the response, ascending or descending.
1731
1978
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1732
1979
  */
1733
- getTransformations({ sort, order } = {}, requestOptions = undefined) {
1980
+ listTransformations({ itemsPerPage, page, sort, order } = {}, requestOptions = undefined) {
1734
1981
  const requestPath = '/1/transformations';
1735
1982
  const headers = {};
1736
1983
  const queryParameters = {};
1984
+ if (itemsPerPage !== undefined) {
1985
+ queryParameters.itemsPerPage = itemsPerPage.toString();
1986
+ }
1987
+ if (page !== undefined) {
1988
+ queryParameters.page = page.toString();
1989
+ }
1737
1990
  if (sort !== undefined) {
1738
1991
  queryParameters.sort = sort.toString();
1739
1992
  }
@@ -1748,6 +2001,70 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1748
2001
  };
1749
2002
  return transporter.request(request, requestOptions);
1750
2003
  },
2004
+ /**
2005
+ * Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
2006
+ *
2007
+ * Required API Key ACLs:
2008
+ * - addObject
2009
+ * - deleteIndex
2010
+ * - editSettings.
2011
+ *
2012
+ * @param pushTask - The pushTask object.
2013
+ * @param pushTask.taskID - Unique identifier of a task.
2014
+ * @param pushTask.batchWriteParams - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
2015
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2016
+ */
2017
+ pushTask({ taskID, batchWriteParams }, requestOptions) {
2018
+ if (!taskID) {
2019
+ throw new Error('Parameter `taskID` is required when calling `pushTask`.');
2020
+ }
2021
+ if (!batchWriteParams) {
2022
+ throw new Error('Parameter `batchWriteParams` is required when calling `pushTask`.');
2023
+ }
2024
+ if (!batchWriteParams.requests) {
2025
+ throw new Error('Parameter `batchWriteParams.requests` is required when calling `pushTask`.');
2026
+ }
2027
+ const requestPath = '/2/tasks/{taskID}/push'.replace('{taskID}', encodeURIComponent(taskID));
2028
+ const headers = {};
2029
+ const queryParameters = {};
2030
+ const request = {
2031
+ method: 'POST',
2032
+ path: requestPath,
2033
+ queryParameters,
2034
+ headers,
2035
+ data: batchWriteParams,
2036
+ };
2037
+ return transporter.request(request, requestOptions);
2038
+ },
2039
+ /**
2040
+ * Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
2041
+ *
2042
+ * Required API Key ACLs:
2043
+ * - addObject
2044
+ * - deleteIndex
2045
+ * - editSettings.
2046
+ *
2047
+ * @param runSource - The runSource object.
2048
+ * @param runSource.sourceID - Unique identifier of a source.
2049
+ * @param runSource.runSourcePayload -.
2050
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2051
+ */
2052
+ runSource({ sourceID, runSourcePayload }, requestOptions) {
2053
+ if (!sourceID) {
2054
+ throw new Error('Parameter `sourceID` is required when calling `runSource`.');
2055
+ }
2056
+ const requestPath = '/1/sources/{sourceID}/run'.replace('{sourceID}', encodeURIComponent(sourceID));
2057
+ const headers = {};
2058
+ const queryParameters = {};
2059
+ const request = {
2060
+ method: 'POST',
2061
+ path: requestPath,
2062
+ queryParameters,
2063
+ headers,
2064
+ data: runSourcePayload ? runSourcePayload : {},
2065
+ };
2066
+ return transporter.request(request, requestOptions);
2067
+ },
1751
2068
  /**
1752
2069
  * Runs a task. You can check the status of task runs with the observability endpoints.
1753
2070
  *
@@ -1764,6 +2081,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1764
2081
  if (!taskID) {
1765
2082
  throw new Error('Parameter `taskID` is required when calling `runTask`.');
1766
2083
  }
2084
+ const requestPath = '/2/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
2085
+ const headers = {};
2086
+ const queryParameters = {};
2087
+ const request = {
2088
+ method: 'POST',
2089
+ path: requestPath,
2090
+ queryParameters,
2091
+ headers,
2092
+ };
2093
+ return transporter.request(request, requestOptions);
2094
+ },
2095
+ /**
2096
+ * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.
2097
+ *
2098
+ * Required API Key ACLs:
2099
+ * - addObject
2100
+ * - deleteIndex
2101
+ * - editSettings.
2102
+ *
2103
+ * @param runTaskV1 - The runTaskV1 object.
2104
+ * @param runTaskV1.taskID - Unique identifier of a task.
2105
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2106
+ */
2107
+ runTaskV1({ taskID }, requestOptions) {
2108
+ if (!taskID) {
2109
+ throw new Error('Parameter `taskID` is required when calling `runTaskV1`.');
2110
+ }
1767
2111
  const requestPath = '/1/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
1768
2112
  const headers = {};
1769
2113
  const queryParameters = {};
@@ -1883,6 +2227,36 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1883
2227
  if (!taskSearch.taskIDs) {
1884
2228
  throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.');
1885
2229
  }
2230
+ const requestPath = '/2/tasks/search';
2231
+ const headers = {};
2232
+ const queryParameters = {};
2233
+ const request = {
2234
+ method: 'POST',
2235
+ path: requestPath,
2236
+ queryParameters,
2237
+ headers,
2238
+ data: taskSearch,
2239
+ };
2240
+ return transporter.request(request, requestOptions);
2241
+ },
2242
+ /**
2243
+ * Searches for tasks using the v1 endpoint, please use `searchTasks` instead.
2244
+ *
2245
+ * Required API Key ACLs:
2246
+ * - addObject
2247
+ * - deleteIndex
2248
+ * - editSettings.
2249
+ *
2250
+ * @param taskSearch - The taskSearch object.
2251
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2252
+ */
2253
+ searchTasksV1(taskSearch, requestOptions) {
2254
+ if (!taskSearch) {
2255
+ throw new Error('Parameter `taskSearch` is required when calling `searchTasksV1`.');
2256
+ }
2257
+ if (!taskSearch.taskIDs) {
2258
+ throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.');
2259
+ }
1886
2260
  const requestPath = '/1/tasks/search';
1887
2261
  const headers = {};
1888
2262
  const queryParameters = {};
@@ -1910,8 +2284,8 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1910
2284
  if (!transformationSearch) {
1911
2285
  throw new Error('Parameter `transformationSearch` is required when calling `searchTransformations`.');
1912
2286
  }
1913
- if (!transformationSearch.transformationsIDs) {
1914
- throw new Error('Parameter `transformationSearch.transformationsIDs` is required when calling `searchTransformations`.');
2287
+ if (!transformationSearch.transformationIDs) {
2288
+ throw new Error('Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.');
1915
2289
  }
1916
2290
  const requestPath = '/1/transformations/search';
1917
2291
  const headers = {};
@@ -1953,7 +2327,7 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1953
2327
  return transporter.request(request, requestOptions);
1954
2328
  },
1955
2329
  /**
1956
- * Try a transformation.
2330
+ * Try a transformation before creating it.
1957
2331
  *
1958
2332
  * Required API Key ACLs:
1959
2333
  * - addObject
@@ -1963,15 +2337,15 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1963
2337
  * @param transformationTry - The transformationTry object.
1964
2338
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1965
2339
  */
1966
- tryTransformations(transformationTry, requestOptions) {
2340
+ tryTransformation(transformationTry, requestOptions) {
1967
2341
  if (!transformationTry) {
1968
- throw new Error('Parameter `transformationTry` is required when calling `tryTransformations`.');
2342
+ throw new Error('Parameter `transformationTry` is required when calling `tryTransformation`.');
1969
2343
  }
1970
2344
  if (!transformationTry.code) {
1971
- throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformations`.');
2345
+ throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformation`.');
1972
2346
  }
1973
2347
  if (!transformationTry.sampleRecord) {
1974
- throw new Error('Parameter `transformationTry.sampleRecord` is required when calling `tryTransformations`.');
2348
+ throw new Error('Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.');
1975
2349
  }
1976
2350
  const requestPath = '/1/transformations/try';
1977
2351
  const headers = {};
@@ -1985,6 +2359,44 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1985
2359
  };
1986
2360
  return transporter.request(request, requestOptions);
1987
2361
  },
2362
+ /**
2363
+ * Try a transformation before updating it.
2364
+ *
2365
+ * Required API Key ACLs:
2366
+ * - addObject
2367
+ * - deleteIndex
2368
+ * - editSettings.
2369
+ *
2370
+ * @param tryTransformationBeforeUpdate - The tryTransformationBeforeUpdate object.
2371
+ * @param tryTransformationBeforeUpdate.transformationID - Unique identifier of a transformation.
2372
+ * @param tryTransformationBeforeUpdate.transformationTry - The transformationTry object.
2373
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2374
+ */
2375
+ tryTransformationBeforeUpdate({ transformationID, transformationTry, }, requestOptions) {
2376
+ if (!transformationID) {
2377
+ throw new Error('Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.');
2378
+ }
2379
+ if (!transformationTry) {
2380
+ throw new Error('Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.');
2381
+ }
2382
+ if (!transformationTry.code) {
2383
+ throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformationBeforeUpdate`.');
2384
+ }
2385
+ if (!transformationTry.sampleRecord) {
2386
+ throw new Error('Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.');
2387
+ }
2388
+ const requestPath = '/1/transformations/{transformationID}/try'.replace('{transformationID}', encodeURIComponent(transformationID));
2389
+ const headers = {};
2390
+ const queryParameters = {};
2391
+ const request = {
2392
+ method: 'POST',
2393
+ path: requestPath,
2394
+ queryParameters,
2395
+ headers,
2396
+ data: transformationTry,
2397
+ };
2398
+ return transporter.request(request, requestOptions);
2399
+ },
1988
2400
  /**
1989
2401
  * Updates an authentication resource.
1990
2402
  *
@@ -2096,6 +2508,33 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
2096
2508
  if (!taskUpdate) {
2097
2509
  throw new Error('Parameter `taskUpdate` is required when calling `updateTask`.');
2098
2510
  }
2511
+ const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
2512
+ const headers = {};
2513
+ const queryParameters = {};
2514
+ const request = {
2515
+ method: 'PATCH',
2516
+ path: requestPath,
2517
+ queryParameters,
2518
+ headers,
2519
+ data: taskUpdate,
2520
+ };
2521
+ return transporter.request(request, requestOptions);
2522
+ },
2523
+ /**
2524
+ * Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.
2525
+ *
2526
+ * @param updateTaskV1 - The updateTaskV1 object.
2527
+ * @param updateTaskV1.taskID - Unique identifier of a task.
2528
+ * @param updateTaskV1.taskUpdate - The taskUpdate object.
2529
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2530
+ */
2531
+ updateTaskV1({ taskID, taskUpdate }, requestOptions) {
2532
+ if (!taskID) {
2533
+ throw new Error('Parameter `taskID` is required when calling `updateTaskV1`.');
2534
+ }
2535
+ if (!taskUpdate) {
2536
+ throw new Error('Parameter `taskUpdate` is required when calling `updateTaskV1`.');
2537
+ }
2099
2538
  const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
2100
2539
  const headers = {};
2101
2540
  const queryParameters = {};
@@ -2129,9 +2568,6 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
2129
2568
  if (!transformationCreate.name) {
2130
2569
  throw new Error('Parameter `transformationCreate.name` is required when calling `updateTransformation`.');
2131
2570
  }
2132
- if (!transformationCreate.description) {
2133
- throw new Error('Parameter `transformationCreate.description` is required when calling `updateTransformation`.');
2134
- }
2135
2571
  const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
2136
2572
  const headers = {};
2137
2573
  const queryParameters = {};