@algolia/ingestion 1.0.0-beta.4 → 1.0.0-beta.5
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 +41 -33
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +41 -33
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/ingestion.cjs +271 -32
- package/dist/ingestion.esm.browser.js +272 -34
- package/dist/ingestion.esm.node.js +271 -32
- package/dist/ingestion.umd.js +2 -2
- package/dist/model/authentication.d.ts +2 -2
- package/dist/model/authenticationCreateResponse.d.ts +1 -1
- package/dist/model/authenticationUpdateResponse.d.ts +1 -1
- package/dist/model/clientMethodProps.d.ts +57 -13
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/deleteResponse.d.ts +1 -1
- package/dist/model/destination.d.ts +2 -2
- package/dist/model/destinationCreateResponse.d.ts +1 -1
- package/dist/model/destinationUpdateResponse.d.ts +1 -1
- package/dist/model/event.d.ts +1 -1
- package/dist/model/index.d.ts +11 -2
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/listTransformationsResponse.d.ts +10 -0
- package/dist/model/listTransformationsResponse.d.ts.map +1 -0
- package/dist/model/onDemandDateUtilsInput.d.ts +2 -2
- package/dist/model/onDemandTrigger.d.ts +1 -1
- package/dist/model/run.d.ts +3 -3
- package/dist/model/runResponse.d.ts +1 -1
- package/dist/model/scheduleTrigger.d.ts +2 -2
- package/dist/model/sortKeys.d.ts +5 -0
- package/dist/model/sortKeys.d.ts.map +1 -0
- package/dist/model/source.d.ts +2 -2
- package/dist/model/sourceCreateResponse.d.ts +1 -1
- package/dist/model/sourceUpdateResponse.d.ts +1 -1
- package/dist/model/sourceWatchResponse.d.ts +20 -0
- package/dist/model/sourceWatchResponse.d.ts.map +1 -0
- package/dist/model/task.d.ts +6 -2
- package/dist/model/task.d.ts.map +1 -1
- package/dist/model/taskCreate.d.ts +4 -0
- package/dist/model/taskCreate.d.ts.map +1 -1
- package/dist/model/taskCreateResponse.d.ts +1 -1
- package/dist/model/taskUpdateResponse.d.ts +1 -1
- package/dist/model/transformation.d.ts +27 -0
- package/dist/model/transformation.d.ts.map +1 -0
- package/dist/model/transformationCreate.d.ts +18 -0
- package/dist/model/transformationCreate.d.ts.map +1 -0
- package/dist/model/transformationCreateResponse.d.ts +14 -0
- package/dist/model/transformationCreateResponse.d.ts.map +1 -0
- package/dist/model/transformationSearch.d.ts +4 -0
- package/dist/model/transformationSearch.d.ts.map +1 -0
- package/dist/model/transformationTry.d.ts +11 -0
- package/dist/model/transformationTry.d.ts.map +1 -0
- package/dist/model/transformationTryResponse.d.ts +9 -0
- package/dist/model/transformationTryResponse.d.ts.map +1 -0
- package/dist/model/transformationTryResponseError.d.ts +14 -0
- package/dist/model/transformationTryResponseError.d.ts.map +1 -0
- package/dist/model/transformationUpdateResponse.d.ts +14 -0
- package/dist/model/transformationUpdateResponse.d.ts.map +1 -0
- package/dist/model/window.d.ts +2 -2
- package/dist/src/ingestionClient.d.ts +117 -22
- package/dist/src/ingestionClient.d.ts.map +1 -1
- package/model/authentication.ts +2 -2
- package/model/authenticationCreateResponse.ts +1 -1
- package/model/authenticationUpdateResponse.ts +1 -1
- package/model/clientMethodProps.ts +62 -14
- package/model/deleteResponse.ts +1 -1
- package/model/destination.ts +2 -2
- package/model/destinationCreateResponse.ts +1 -1
- package/model/destinationUpdateResponse.ts +1 -1
- package/model/event.ts +1 -1
- package/model/index.ts +11 -2
- package/model/listTransformationsResponse.ts +13 -0
- package/model/onDemandDateUtilsInput.ts +2 -2
- package/model/onDemandTrigger.ts +1 -1
- package/model/run.ts +3 -3
- package/model/runResponse.ts +1 -1
- package/model/scheduleTrigger.ts +2 -2
- package/model/sortKeys.ts +6 -0
- package/model/source.ts +2 -2
- package/model/sourceCreateResponse.ts +1 -1
- package/model/sourceUpdateResponse.ts +1 -1
- package/model/sourceWatchResponse.ts +25 -0
- package/model/task.ts +7 -2
- package/model/taskCreate.ts +5 -0
- package/model/taskCreateResponse.ts +1 -1
- package/model/taskUpdateResponse.ts +1 -1
- package/model/transformation.ts +33 -0
- package/model/transformationCreate.ts +21 -0
- package/model/transformationCreateResponse.ts +16 -0
- package/model/{dockerSourceStreams.ts → transformationSearch.ts} +2 -2
- package/model/{dockerSourceDiscover.ts → transformationTry.ts} +5 -5
- package/model/transformationTryResponse.ts +12 -0
- package/model/transformationTryResponseError.ts +16 -0
- package/model/transformationUpdateResponse.ts +16 -0
- package/model/window.ts +2 -2
- package/package.json +10 -7
- package/dist/model/dockerSourceDiscover.d.ts +0 -11
- package/dist/model/dockerSourceDiscover.d.ts.map +0 -1
- package/dist/model/dockerSourceStreams.d.ts +0 -4
- package/dist/model/dockerSourceStreams.d.ts.map +0 -1
|
@@ -271,8 +271,7 @@ function serializeUrl(host, path, queryParameters) {
|
|
|
271
271
|
return url;
|
|
272
272
|
}
|
|
273
273
|
function serializeQueryParameters(parameters) {
|
|
274
|
-
|
|
275
|
-
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]).replaceAll('+', '%20')}`).join('&');
|
|
274
|
+
return Object.keys(parameters).filter(key => parameters[key] !== undefined).sort().map(key => `${key}=${encodeURIComponent(Object.prototype.toString.call(parameters[key]) === '[object Array]' ? parameters[key].join(',') : parameters[key]).replaceAll('+', '%20')}`).join('&');
|
|
276
275
|
}
|
|
277
276
|
function serializeData(request, requestOptions) {
|
|
278
277
|
if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
|
|
@@ -677,7 +676,7 @@ function createXhrRequester() {
|
|
|
677
676
|
}
|
|
678
677
|
|
|
679
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.
|
|
680
|
-
const apiClientVersion = '1.0.0-beta.
|
|
679
|
+
const apiClientVersion = '1.0.0-beta.5';
|
|
681
680
|
const REGIONS = ['eu', 'us'];
|
|
682
681
|
function getDefaultHosts(region) {
|
|
683
682
|
const url = 'data.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -903,6 +902,37 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
903
902
|
};
|
|
904
903
|
return transporter.request(request, requestOptions);
|
|
905
904
|
},
|
|
905
|
+
/**
|
|
906
|
+
* Creates a new transformation.
|
|
907
|
+
*
|
|
908
|
+
* @param transformationCreate - Request body for creating a transformation.
|
|
909
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
910
|
+
*/
|
|
911
|
+
createTransformation(transformationCreate, requestOptions) {
|
|
912
|
+
if (!transformationCreate) {
|
|
913
|
+
throw new Error('Parameter `transformationCreate` is required when calling `createTransformation`.');
|
|
914
|
+
}
|
|
915
|
+
if (!transformationCreate.code) {
|
|
916
|
+
throw new Error('Parameter `transformationCreate.code` is required when calling `createTransformation`.');
|
|
917
|
+
}
|
|
918
|
+
if (!transformationCreate.name) {
|
|
919
|
+
throw new Error('Parameter `transformationCreate.name` is required when calling `createTransformation`.');
|
|
920
|
+
}
|
|
921
|
+
if (!transformationCreate.description) {
|
|
922
|
+
throw new Error('Parameter `transformationCreate.description` is required when calling `createTransformation`.');
|
|
923
|
+
}
|
|
924
|
+
const requestPath = '/1/transformations';
|
|
925
|
+
const headers = {};
|
|
926
|
+
const queryParameters = {};
|
|
927
|
+
const request = {
|
|
928
|
+
method: 'POST',
|
|
929
|
+
path: requestPath,
|
|
930
|
+
queryParameters,
|
|
931
|
+
headers,
|
|
932
|
+
data: transformationCreate,
|
|
933
|
+
};
|
|
934
|
+
return transporter.request(request, requestOptions);
|
|
935
|
+
},
|
|
906
936
|
/**
|
|
907
937
|
* This method allow you to send requests to the Algolia REST API.
|
|
908
938
|
*
|
|
@@ -1102,6 +1132,28 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1102
1132
|
};
|
|
1103
1133
|
return transporter.request(request, requestOptions);
|
|
1104
1134
|
},
|
|
1135
|
+
/**
|
|
1136
|
+
* Deletes a transformation by its ID.
|
|
1137
|
+
*
|
|
1138
|
+
* @param deleteTransformation - The deleteTransformation object.
|
|
1139
|
+
* @param deleteTransformation.transformationID - Unique identifier of a transformation.
|
|
1140
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1141
|
+
*/
|
|
1142
|
+
deleteTransformation({ transformationID }, requestOptions) {
|
|
1143
|
+
if (!transformationID) {
|
|
1144
|
+
throw new Error('Parameter `transformationID` is required when calling `deleteTransformation`.');
|
|
1145
|
+
}
|
|
1146
|
+
const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
|
|
1147
|
+
const headers = {};
|
|
1148
|
+
const queryParameters = {};
|
|
1149
|
+
const request = {
|
|
1150
|
+
method: 'DELETE',
|
|
1151
|
+
path: requestPath,
|
|
1152
|
+
queryParameters,
|
|
1153
|
+
headers,
|
|
1154
|
+
};
|
|
1155
|
+
return transporter.request(request, requestOptions);
|
|
1156
|
+
},
|
|
1105
1157
|
/**
|
|
1106
1158
|
* Disables a task.
|
|
1107
1159
|
*
|
|
@@ -1304,33 +1356,6 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1304
1356
|
};
|
|
1305
1357
|
return transporter.request(request, requestOptions);
|
|
1306
1358
|
},
|
|
1307
|
-
/**
|
|
1308
|
-
* Retrieves a stream listing for a source. Listing streams only works with sources with `type: docker` and `imageType: singer`.
|
|
1309
|
-
*
|
|
1310
|
-
* Required API Key ACLs:
|
|
1311
|
-
* - addObject
|
|
1312
|
-
* - deleteIndex
|
|
1313
|
-
* - editSettings.
|
|
1314
|
-
*
|
|
1315
|
-
* @param getDockerSourceStreams - The getDockerSourceStreams object.
|
|
1316
|
-
* @param getDockerSourceStreams.sourceID - Unique identifier of a source.
|
|
1317
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1318
|
-
*/
|
|
1319
|
-
getDockerSourceStreams({ sourceID }, requestOptions) {
|
|
1320
|
-
if (!sourceID) {
|
|
1321
|
-
throw new Error('Parameter `sourceID` is required when calling `getDockerSourceStreams`.');
|
|
1322
|
-
}
|
|
1323
|
-
const requestPath = '/1/sources/{sourceID}/discover'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
1324
|
-
const headers = {};
|
|
1325
|
-
const queryParameters = {};
|
|
1326
|
-
const request = {
|
|
1327
|
-
method: 'GET',
|
|
1328
|
-
path: requestPath,
|
|
1329
|
-
queryParameters,
|
|
1330
|
-
headers,
|
|
1331
|
-
};
|
|
1332
|
-
return transporter.request(request, requestOptions);
|
|
1333
|
-
},
|
|
1334
1359
|
/**
|
|
1335
1360
|
* Retrieves a single task run event by its ID.
|
|
1336
1361
|
*
|
|
@@ -1380,8 +1405,8 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1380
1405
|
* @param getEvents.type - Event type for filtering the list of task runs.
|
|
1381
1406
|
* @param getEvents.sort - Property by which to sort the list of task run events.
|
|
1382
1407
|
* @param getEvents.order - Sort order of the response, ascending or descending.
|
|
1383
|
-
* @param getEvents.startDate - Date and time in
|
|
1384
|
-
* @param getEvents.endDate - Date and time in
|
|
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.
|
|
1385
1410
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1386
1411
|
*/
|
|
1387
1412
|
getEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
|
|
@@ -1465,8 +1490,8 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1465
1490
|
* @param getRuns.taskID - Task ID for filtering the list of task runs.
|
|
1466
1491
|
* @param getRuns.sort - Property by which to sort the list of task runs.
|
|
1467
1492
|
* @param getRuns.order - Sort order of the response, ascending or descending.
|
|
1468
|
-
* @param getRuns.startDate - Date in
|
|
1469
|
-
* @param getRuns.endDate - Date in
|
|
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.
|
|
1470
1495
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1471
1496
|
*/
|
|
1472
1497
|
getRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
|
|
@@ -1665,6 +1690,64 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1665
1690
|
};
|
|
1666
1691
|
return transporter.request(request, requestOptions);
|
|
1667
1692
|
},
|
|
1693
|
+
/**
|
|
1694
|
+
* Retrieves a transformation by its ID.
|
|
1695
|
+
*
|
|
1696
|
+
* Required API Key ACLs:
|
|
1697
|
+
* - addObject
|
|
1698
|
+
* - deleteIndex
|
|
1699
|
+
* - editSettings.
|
|
1700
|
+
*
|
|
1701
|
+
* @param getTransformation - The getTransformation object.
|
|
1702
|
+
* @param getTransformation.transformationID - Unique identifier of a transformation.
|
|
1703
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1704
|
+
*/
|
|
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));
|
|
1710
|
+
const headers = {};
|
|
1711
|
+
const queryParameters = {};
|
|
1712
|
+
const request = {
|
|
1713
|
+
method: 'GET',
|
|
1714
|
+
path: requestPath,
|
|
1715
|
+
queryParameters,
|
|
1716
|
+
headers,
|
|
1717
|
+
};
|
|
1718
|
+
return transporter.request(request, requestOptions);
|
|
1719
|
+
},
|
|
1720
|
+
/**
|
|
1721
|
+
* Retrieves a list of transformations.
|
|
1722
|
+
*
|
|
1723
|
+
* Required API Key ACLs:
|
|
1724
|
+
* - addObject
|
|
1725
|
+
* - deleteIndex
|
|
1726
|
+
* - editSettings.
|
|
1727
|
+
*
|
|
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.
|
|
1731
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1732
|
+
*/
|
|
1733
|
+
getTransformations({ sort, order } = {}, requestOptions = undefined) {
|
|
1734
|
+
const requestPath = '/1/transformations';
|
|
1735
|
+
const headers = {};
|
|
1736
|
+
const queryParameters = {};
|
|
1737
|
+
if (sort !== undefined) {
|
|
1738
|
+
queryParameters.sort = sort.toString();
|
|
1739
|
+
}
|
|
1740
|
+
if (order !== undefined) {
|
|
1741
|
+
queryParameters.order = order.toString();
|
|
1742
|
+
}
|
|
1743
|
+
const request = {
|
|
1744
|
+
method: 'GET',
|
|
1745
|
+
path: requestPath,
|
|
1746
|
+
queryParameters,
|
|
1747
|
+
headers,
|
|
1748
|
+
};
|
|
1749
|
+
return transporter.request(request, requestOptions);
|
|
1750
|
+
},
|
|
1668
1751
|
/**
|
|
1669
1752
|
* Runs a task. You can check the status of task runs with the observability endpoints.
|
|
1670
1753
|
*
|
|
@@ -1812,6 +1895,36 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1812
1895
|
};
|
|
1813
1896
|
return transporter.request(request, requestOptions);
|
|
1814
1897
|
},
|
|
1898
|
+
/**
|
|
1899
|
+
* Searches for transformations.
|
|
1900
|
+
*
|
|
1901
|
+
* Required API Key ACLs:
|
|
1902
|
+
* - addObject
|
|
1903
|
+
* - deleteIndex
|
|
1904
|
+
* - editSettings.
|
|
1905
|
+
*
|
|
1906
|
+
* @param transformationSearch - The transformationSearch object.
|
|
1907
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1908
|
+
*/
|
|
1909
|
+
searchTransformations(transformationSearch, requestOptions) {
|
|
1910
|
+
if (!transformationSearch) {
|
|
1911
|
+
throw new Error('Parameter `transformationSearch` is required when calling `searchTransformations`.');
|
|
1912
|
+
}
|
|
1913
|
+
if (!transformationSearch.transformationsIDs) {
|
|
1914
|
+
throw new Error('Parameter `transformationSearch.transformationsIDs` is required when calling `searchTransformations`.');
|
|
1915
|
+
}
|
|
1916
|
+
const requestPath = '/1/transformations/search';
|
|
1917
|
+
const headers = {};
|
|
1918
|
+
const queryParameters = {};
|
|
1919
|
+
const request = {
|
|
1920
|
+
method: 'POST',
|
|
1921
|
+
path: requestPath,
|
|
1922
|
+
queryParameters,
|
|
1923
|
+
headers,
|
|
1924
|
+
data: transformationSearch,
|
|
1925
|
+
};
|
|
1926
|
+
return transporter.request(request, requestOptions);
|
|
1927
|
+
},
|
|
1815
1928
|
/**
|
|
1816
1929
|
* Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`.
|
|
1817
1930
|
*
|
|
@@ -1839,6 +1952,39 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1839
1952
|
};
|
|
1840
1953
|
return transporter.request(request, requestOptions);
|
|
1841
1954
|
},
|
|
1955
|
+
/**
|
|
1956
|
+
* Searches for transformations.
|
|
1957
|
+
*
|
|
1958
|
+
* Required API Key ACLs:
|
|
1959
|
+
* - addObject
|
|
1960
|
+
* - deleteIndex
|
|
1961
|
+
* - editSettings.
|
|
1962
|
+
*
|
|
1963
|
+
* @param transformationTry - The transformationTry object.
|
|
1964
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1965
|
+
*/
|
|
1966
|
+
tryTransformations(transformationTry, requestOptions) {
|
|
1967
|
+
if (!transformationTry) {
|
|
1968
|
+
throw new Error('Parameter `transformationTry` is required when calling `tryTransformations`.');
|
|
1969
|
+
}
|
|
1970
|
+
if (!transformationTry.code) {
|
|
1971
|
+
throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformations`.');
|
|
1972
|
+
}
|
|
1973
|
+
if (!transformationTry.sampleRecord) {
|
|
1974
|
+
throw new Error('Parameter `transformationTry.sampleRecord` is required when calling `tryTransformations`.');
|
|
1975
|
+
}
|
|
1976
|
+
const requestPath = '/1/transformations/try';
|
|
1977
|
+
const headers = {};
|
|
1978
|
+
const queryParameters = {};
|
|
1979
|
+
const request = {
|
|
1980
|
+
method: 'POST',
|
|
1981
|
+
path: requestPath,
|
|
1982
|
+
queryParameters,
|
|
1983
|
+
headers,
|
|
1984
|
+
data: transformationTry,
|
|
1985
|
+
};
|
|
1986
|
+
return transporter.request(request, requestOptions);
|
|
1987
|
+
},
|
|
1842
1988
|
/**
|
|
1843
1989
|
* Updates an authentication resource.
|
|
1844
1990
|
*
|
|
@@ -1962,6 +2108,98 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1962
2108
|
};
|
|
1963
2109
|
return transporter.request(request, requestOptions);
|
|
1964
2110
|
},
|
|
2111
|
+
/**
|
|
2112
|
+
* Updates a transformation by its ID.
|
|
2113
|
+
*
|
|
2114
|
+
* @param updateTransformation - The updateTransformation object.
|
|
2115
|
+
* @param updateTransformation.transformationID - Unique identifier of a transformation.
|
|
2116
|
+
* @param updateTransformation.transformationCreate - The transformationCreate object.
|
|
2117
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2118
|
+
*/
|
|
2119
|
+
updateTransformation({ transformationID, transformationCreate }, requestOptions) {
|
|
2120
|
+
if (!transformationID) {
|
|
2121
|
+
throw new Error('Parameter `transformationID` is required when calling `updateTransformation`.');
|
|
2122
|
+
}
|
|
2123
|
+
if (!transformationCreate) {
|
|
2124
|
+
throw new Error('Parameter `transformationCreate` is required when calling `updateTransformation`.');
|
|
2125
|
+
}
|
|
2126
|
+
if (!transformationCreate.code) {
|
|
2127
|
+
throw new Error('Parameter `transformationCreate.code` is required when calling `updateTransformation`.');
|
|
2128
|
+
}
|
|
2129
|
+
if (!transformationCreate.name) {
|
|
2130
|
+
throw new Error('Parameter `transformationCreate.name` is required when calling `updateTransformation`.');
|
|
2131
|
+
}
|
|
2132
|
+
if (!transformationCreate.description) {
|
|
2133
|
+
throw new Error('Parameter `transformationCreate.description` is required when calling `updateTransformation`.');
|
|
2134
|
+
}
|
|
2135
|
+
const requestPath = '/1/transformations/{transformationID}'.replace('{transformationID}', encodeURIComponent(transformationID));
|
|
2136
|
+
const headers = {};
|
|
2137
|
+
const queryParameters = {};
|
|
2138
|
+
const request = {
|
|
2139
|
+
method: 'PUT',
|
|
2140
|
+
path: requestPath,
|
|
2141
|
+
queryParameters,
|
|
2142
|
+
headers,
|
|
2143
|
+
data: transformationCreate,
|
|
2144
|
+
};
|
|
2145
|
+
return transporter.request(request, requestOptions);
|
|
2146
|
+
},
|
|
2147
|
+
/**
|
|
2148
|
+
* Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.
|
|
2149
|
+
*
|
|
2150
|
+
* Required API Key ACLs:
|
|
2151
|
+
* - addObject
|
|
2152
|
+
* - deleteIndex
|
|
2153
|
+
* - editSettings.
|
|
2154
|
+
*
|
|
2155
|
+
* @param sourceCreate -.
|
|
2156
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2157
|
+
*/
|
|
2158
|
+
validateSource(sourceCreate, requestOptions = undefined) {
|
|
2159
|
+
const requestPath = '/1/sources/validate';
|
|
2160
|
+
const headers = {};
|
|
2161
|
+
const queryParameters = {};
|
|
2162
|
+
const request = {
|
|
2163
|
+
method: 'POST',
|
|
2164
|
+
path: requestPath,
|
|
2165
|
+
queryParameters,
|
|
2166
|
+
headers,
|
|
2167
|
+
data: sourceCreate ? sourceCreate : {},
|
|
2168
|
+
};
|
|
2169
|
+
return transporter.request(request, requestOptions);
|
|
2170
|
+
},
|
|
2171
|
+
/**
|
|
2172
|
+
* Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.
|
|
2173
|
+
*
|
|
2174
|
+
* Required API Key ACLs:
|
|
2175
|
+
* - addObject
|
|
2176
|
+
* - deleteIndex
|
|
2177
|
+
* - editSettings.
|
|
2178
|
+
*
|
|
2179
|
+
* @param validateSourceBeforeUpdate - The validateSourceBeforeUpdate object.
|
|
2180
|
+
* @param validateSourceBeforeUpdate.sourceID - Unique identifier of a source.
|
|
2181
|
+
* @param validateSourceBeforeUpdate.sourceUpdate - The sourceUpdate object.
|
|
2182
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2183
|
+
*/
|
|
2184
|
+
validateSourceBeforeUpdate({ sourceID, sourceUpdate }, requestOptions) {
|
|
2185
|
+
if (!sourceID) {
|
|
2186
|
+
throw new Error('Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.');
|
|
2187
|
+
}
|
|
2188
|
+
if (!sourceUpdate) {
|
|
2189
|
+
throw new Error('Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.');
|
|
2190
|
+
}
|
|
2191
|
+
const requestPath = '/1/sources/{sourceID}/validate'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
2192
|
+
const headers = {};
|
|
2193
|
+
const queryParameters = {};
|
|
2194
|
+
const request = {
|
|
2195
|
+
method: 'POST',
|
|
2196
|
+
path: requestPath,
|
|
2197
|
+
queryParameters,
|
|
2198
|
+
headers,
|
|
2199
|
+
data: sourceUpdate,
|
|
2200
|
+
};
|
|
2201
|
+
return transporter.request(request, requestOptions);
|
|
2202
|
+
},
|
|
1965
2203
|
};
|
|
1966
2204
|
}
|
|
1967
2205
|
|