@algolia/ingestion 1.0.0-alpha.7 → 1.0.0-alpha.71
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 +5 -5
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +5 -5
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/{ingestion.cjs.js → ingestion.cjs} +1205 -820
- package/dist/ingestion.esm.browser.js +1386 -967
- package/dist/ingestion.esm.node.js +1203 -819
- package/dist/ingestion.umd.js +2 -2
- package/dist/model/actionType.d.ts +4 -1
- package/dist/model/actionType.d.ts.map +1 -1
- package/dist/model/authAPIKey.d.ts +6 -3
- package/dist/model/authAPIKey.d.ts.map +1 -1
- package/dist/model/authAPIKeyPartial.d.ts +7 -0
- package/dist/model/authAPIKeyPartial.d.ts.map +1 -0
- package/dist/model/authAlgolia.d.ts +10 -4
- package/dist/model/authAlgolia.d.ts.map +1 -1
- package/dist/model/authAlgoliaPartial.d.ts +11 -0
- package/dist/model/authAlgoliaPartial.d.ts.map +1 -0
- package/dist/model/authBasic.d.ts +7 -4
- package/dist/model/authBasic.d.ts.map +1 -1
- package/dist/model/authBasicPartial.d.ts +8 -0
- package/dist/model/authBasicPartial.d.ts.map +1 -0
- package/dist/model/authGoogleServiceAccount.d.ts +13 -4
- package/dist/model/authGoogleServiceAccount.d.ts.map +1 -1
- package/dist/model/authGoogleServiceAccountPartial.d.ts +14 -0
- package/dist/model/authGoogleServiceAccountPartial.d.ts.map +1 -0
- package/dist/model/authInput.d.ts +6 -6
- package/dist/model/authInput.d.ts.map +1 -1
- package/dist/model/authInputPartial.d.ts +7 -0
- package/dist/model/authInputPartial.d.ts.map +1 -0
- package/dist/model/authOAuth.d.ts +17 -6
- package/dist/model/authOAuth.d.ts.map +1 -1
- package/dist/model/authOAuthPartial.d.ts +18 -0
- package/dist/model/authOAuthPartial.d.ts.map +1 -0
- package/dist/model/authentication.d.ts +27 -16
- package/dist/model/authentication.d.ts.map +1 -1
- package/dist/model/authenticationCreate.d.ts +15 -9
- package/dist/model/authenticationCreate.d.ts.map +1 -1
- package/dist/model/authenticationCreateResponse.d.ts +17 -8
- package/dist/model/authenticationCreateResponse.d.ts.map +1 -1
- package/dist/model/authenticationSearch.d.ts +7 -0
- package/dist/model/authenticationSearch.d.ts.map +1 -0
- package/dist/model/authenticationSortKeys.d.ts +5 -0
- package/dist/model/authenticationSortKeys.d.ts.map +1 -0
- package/dist/model/authenticationType.d.ts +4 -1
- package/dist/model/authenticationType.d.ts.map +1 -1
- package/dist/model/authenticationUpdate.d.ts +15 -9
- package/dist/model/authenticationUpdate.d.ts.map +1 -1
- package/dist/model/authenticationUpdateResponse.d.ts +17 -8
- package/dist/model/authenticationUpdateResponse.d.ts.map +1 -1
- package/dist/model/bigCommerceChannel.d.ts +11 -0
- package/dist/model/bigCommerceChannel.d.ts.map +1 -0
- package/dist/model/bigCommerceMetafield.d.ts +11 -0
- package/dist/model/bigCommerceMetafield.d.ts.map +1 -0
- package/dist/model/bigQueryDataType.d.ts +2 -0
- package/dist/model/bigQueryDataType.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +465 -282
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/deleteResponse.d.ts +6 -6
- package/dist/model/deleteResponse.d.ts.map +1 -1
- package/dist/model/destination.d.ts +26 -17
- package/dist/model/destination.d.ts.map +1 -1
- package/dist/model/destinationCreate.d.ts +17 -8
- package/dist/model/destinationCreate.d.ts.map +1 -1
- package/dist/model/destinationCreateResponse.d.ts +17 -8
- package/dist/model/destinationCreateResponse.d.ts.map +1 -1
- package/dist/model/destinationIndexName.d.ts +12 -3
- package/dist/model/destinationIndexName.d.ts.map +1 -1
- package/dist/model/destinationIndexPrefix.d.ts +6 -3
- package/dist/model/destinationIndexPrefix.d.ts.map +1 -1
- package/dist/model/destinationInput.d.ts +3 -3
- package/dist/model/destinationInput.d.ts.map +1 -1
- package/dist/model/destinationSearch.d.ts +7 -0
- package/dist/model/destinationSearch.d.ts.map +1 -0
- package/dist/model/destinationSortKeys.d.ts +5 -0
- package/dist/model/destinationSortKeys.d.ts.map +1 -0
- package/dist/model/destinationType.d.ts +4 -1
- package/dist/model/destinationType.d.ts.map +1 -1
- package/dist/model/destinationUpdate.d.ts +14 -8
- package/dist/model/destinationUpdate.d.ts.map +1 -1
- package/dist/model/destinationUpdateResponse.d.ts +17 -8
- package/dist/model/destinationUpdateResponse.d.ts.map +1 -1
- package/dist/model/dockerImageType.d.ts +5 -0
- package/dist/model/dockerImageType.d.ts.map +1 -0
- package/dist/model/dockerRegistry.d.ts +5 -0
- package/dist/model/dockerRegistry.d.ts.map +1 -0
- package/dist/model/dockerSourceDiscover.d.ts +11 -0
- package/dist/model/dockerSourceDiscover.d.ts.map +1 -0
- package/dist/model/dockerSourceStreams.d.ts +4 -0
- package/dist/model/dockerSourceStreams.d.ts.map +1 -0
- package/dist/model/errorBase.d.ts +6 -6
- package/dist/model/errorBase.d.ts.map +1 -1
- package/dist/model/event.d.ts +30 -14
- package/dist/model/event.d.ts.map +1 -1
- package/dist/model/eventSortKeys.d.ts +5 -0
- package/dist/model/eventSortKeys.d.ts.map +1 -0
- package/dist/model/eventStatus.d.ts +1 -1
- package/dist/model/eventStatus.d.ts.map +1 -1
- package/dist/model/eventType.d.ts +1 -1
- package/dist/model/eventType.d.ts.map +1 -1
- package/dist/model/index.d.ts +109 -63
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/listAuthenticationsResponse.d.ts +6 -6
- package/dist/model/listAuthenticationsResponse.d.ts.map +1 -1
- package/dist/model/listDestinationsResponse.d.ts +6 -6
- package/dist/model/listDestinationsResponse.d.ts.map +1 -1
- package/dist/model/listEventsResponse.d.ts +8 -6
- package/dist/model/listEventsResponse.d.ts.map +1 -1
- package/dist/model/listSourcesResponse.d.ts +6 -6
- package/dist/model/listSourcesResponse.d.ts.map +1 -1
- package/dist/model/listTasksResponse.d.ts +9 -6
- package/dist/model/listTasksResponse.d.ts.map +1 -1
- package/dist/model/mappingTypeCSV.d.ts +2 -0
- package/dist/model/mappingTypeCSV.d.ts.map +1 -0
- package/dist/model/methodType.d.ts +1 -1
- package/dist/model/methodType.d.ts.map +1 -1
- package/dist/model/onDemandDateUtilsInput.d.ts +14 -0
- package/dist/model/onDemandDateUtilsInput.d.ts.map +1 -0
- package/dist/model/onDemandTrigger.d.ts +12 -0
- package/dist/model/onDemandTrigger.d.ts.map +1 -0
- package/dist/model/onDemandTriggerInput.d.ts +8 -0
- package/dist/model/onDemandTriggerInput.d.ts.map +1 -0
- package/dist/model/onDemandTriggerType.d.ts +5 -0
- package/dist/model/onDemandTriggerType.d.ts.map +1 -0
- package/dist/model/orderKeys.d.ts +5 -0
- package/dist/model/orderKeys.d.ts.map +1 -0
- package/dist/model/pagination.d.ts +6 -6
- package/dist/model/pagination.d.ts.map +1 -1
- package/dist/model/platform.d.ts +5 -0
- package/dist/model/platform.d.ts.map +1 -0
- package/dist/model/platformNone.d.ts +5 -0
- package/dist/model/platformNone.d.ts.map +1 -0
- package/dist/model/platformWithNone.d.ts +4 -0
- package/dist/model/platformWithNone.d.ts.map +1 -0
- package/dist/model/recordType.d.ts +5 -0
- package/dist/model/recordType.d.ts.map +1 -0
- package/dist/model/run.d.ts +41 -29
- package/dist/model/run.d.ts.map +1 -1
- package/dist/model/runListResponse.d.ts +8 -6
- package/dist/model/runListResponse.d.ts.map +1 -1
- package/dist/model/runOutcome.d.ts +1 -1
- package/dist/model/runOutcome.d.ts.map +1 -1
- package/dist/model/runProgress.d.ts +4 -4
- package/dist/model/runProgress.d.ts.map +1 -1
- package/dist/model/runReasonCode.d.ts +5 -0
- package/dist/model/runReasonCode.d.ts.map +1 -0
- package/dist/model/runResponse.d.ts +13 -7
- package/dist/model/runResponse.d.ts.map +1 -1
- package/dist/model/runSortKeys.d.ts +5 -0
- package/dist/model/runSortKeys.d.ts.map +1 -0
- package/dist/model/runStatus.d.ts +1 -1
- package/dist/model/runStatus.d.ts.map +1 -1
- package/dist/model/runType.d.ts +1 -1
- package/dist/model/runType.d.ts.map +1 -1
- package/dist/model/scheduleDateUtilsInput.d.ts +10 -0
- package/dist/model/scheduleDateUtilsInput.d.ts.map +1 -0
- package/dist/model/scheduleTrigger.d.ts +20 -0
- package/dist/model/scheduleTrigger.d.ts.map +1 -0
- package/dist/model/scheduleTriggerInput.d.ts +12 -0
- package/dist/model/scheduleTriggerInput.d.ts.map +1 -0
- package/dist/model/scheduleTriggerType.d.ts +5 -0
- package/dist/model/scheduleTriggerType.d.ts.map +1 -0
- package/dist/model/source.d.ts +23 -17
- package/dist/model/source.d.ts.map +1 -1
- package/dist/model/sourceBigCommerce.d.ts +12 -3
- package/dist/model/sourceBigCommerce.d.ts.map +1 -1
- package/dist/model/sourceBigQuery.d.ts +29 -0
- package/dist/model/sourceBigQuery.d.ts.map +1 -0
- package/dist/model/sourceCSV.d.ts +22 -0
- package/dist/model/sourceCSV.d.ts.map +1 -0
- package/dist/model/sourceCommercetools.d.ts +13 -9
- package/dist/model/sourceCommercetools.d.ts.map +1 -1
- package/dist/model/sourceCreate.d.ts +11 -8
- package/dist/model/sourceCreate.d.ts.map +1 -1
- package/dist/model/sourceCreateResponse.d.ts +11 -8
- package/dist/model/sourceCreateResponse.d.ts.map +1 -1
- package/dist/model/sourceDocker.d.ts +19 -0
- package/dist/model/sourceDocker.d.ts.map +1 -0
- package/dist/model/sourceInput.d.ts +7 -4
- package/dist/model/sourceInput.d.ts.map +1 -1
- package/dist/model/sourceJSON.d.ts +13 -0
- package/dist/model/sourceJSON.d.ts.map +1 -0
- package/dist/model/sourceSearch.d.ts +4 -0
- package/dist/model/sourceSearch.d.ts.map +1 -0
- package/dist/model/sourceSortKeys.d.ts +5 -0
- package/dist/model/sourceSortKeys.d.ts.map +1 -0
- package/dist/model/sourceType.d.ts +1 -1
- package/dist/model/sourceType.d.ts.map +1 -1
- package/dist/model/sourceUpdate.d.ts +9 -8
- package/dist/model/sourceUpdate.d.ts.map +1 -1
- package/dist/model/sourceUpdateCommercetools.d.ts +11 -0
- package/dist/model/sourceUpdateCommercetools.d.ts.map +1 -0
- package/dist/model/sourceUpdateDocker.d.ts +17 -0
- package/dist/model/sourceUpdateDocker.d.ts.map +1 -0
- package/dist/model/sourceUpdateInput.d.ts +7 -0
- package/dist/model/sourceUpdateInput.d.ts.map +1 -0
- package/dist/model/sourceUpdateResponse.d.ts +11 -8
- package/dist/model/sourceUpdateResponse.d.ts.map +1 -1
- package/dist/model/subscriptionTrigger.d.ts +8 -0
- package/dist/model/subscriptionTrigger.d.ts.map +1 -0
- package/dist/model/subscriptionTriggerType.d.ts +5 -0
- package/dist/model/subscriptionTriggerType.d.ts.map +1 -0
- package/dist/model/task.d.ts +36 -18
- package/dist/model/task.d.ts.map +1 -1
- package/dist/model/taskCreate.d.ts +27 -9
- package/dist/model/taskCreate.d.ts.map +1 -1
- package/dist/model/taskCreateResponse.d.ts +13 -7
- package/dist/model/taskCreateResponse.d.ts.map +1 -1
- package/dist/model/taskCreateTrigger.d.ts +5 -0
- package/dist/model/taskCreateTrigger.d.ts.map +1 -0
- package/dist/model/taskInput.d.ts +4 -0
- package/dist/model/taskInput.d.ts.map +1 -0
- package/dist/model/taskSearch.d.ts +4 -0
- package/dist/model/taskSearch.d.ts.map +1 -0
- package/dist/model/taskSortKeys.d.ts +5 -0
- package/dist/model/taskSortKeys.d.ts.map +1 -0
- package/dist/model/taskUpdate.d.ts +21 -6
- package/dist/model/taskUpdate.d.ts.map +1 -1
- package/dist/model/taskUpdateResponse.d.ts +13 -7
- package/dist/model/taskUpdateResponse.d.ts.map +1 -1
- package/dist/model/trigger.d.ts +4 -13
- package/dist/model/trigger.d.ts.map +1 -1
- package/dist/model/triggerType.d.ts +4 -1
- package/dist/model/triggerType.d.ts.map +1 -1
- package/dist/model/triggerUpdateInput.d.ts +10 -0
- package/dist/model/triggerUpdateInput.d.ts.map +1 -0
- package/dist/model/window.d.ts +14 -0
- package/dist/model/window.d.ts.map +1 -0
- package/dist/src/ingestionClient.d.ts +465 -325
- package/dist/src/ingestionClient.d.ts.map +1 -1
- package/index.js +1 -1
- package/model/actionType.ts +5 -2
- package/model/authAPIKey.ts +4 -1
- package/model/authAPIKeyPartial.ts +8 -0
- package/model/authAlgolia.ts +7 -1
- package/model/authAlgoliaPartial.ts +13 -0
- package/model/authBasic.ts +4 -1
- package/model/authBasicPartial.ts +10 -0
- package/model/authGoogleServiceAccount.ts +10 -1
- package/model/authGoogleServiceAccountPartial.ts +16 -0
- package/model/authInput.ts +1 -1
- package/model/authInputPartial.ts +14 -0
- package/model/authOAuth.ts +13 -3
- package/model/authOAuthPartial.ts +21 -0
- package/model/authentication.ts +15 -3
- package/model/authenticationCreate.ts +9 -3
- package/model/authenticationCreateResponse.ts +10 -1
- package/model/authenticationSearch.ts +8 -0
- package/model/authenticationSortKeys.ts +11 -0
- package/model/authenticationType.ts +4 -1
- package/model/authenticationUpdate.ts +11 -5
- package/model/authenticationUpdateResponse.ts +10 -1
- package/model/bigCommerceChannel.ts +13 -0
- package/model/bigCommerceMetafield.ts +13 -0
- package/model/bigQueryDataType.ts +3 -0
- package/model/clientMethodProps.ts +224 -36
- package/model/deleteResponse.ts +1 -1
- package/model/destination.ts +10 -1
- package/model/destinationCreate.ts +11 -2
- package/model/destinationCreateResponse.ts +10 -1
- package/model/destinationIndexName.ts +13 -1
- package/model/destinationIndexPrefix.ts +4 -1
- package/model/destinationInput.ts +1 -1
- package/model/destinationSearch.ts +8 -0
- package/model/destinationSortKeys.ts +6 -0
- package/model/destinationType.ts +5 -2
- package/model/destinationUpdate.ts +7 -1
- package/model/destinationUpdateResponse.ts +10 -1
- package/model/dockerImageType.ts +6 -0
- package/model/dockerRegistry.ts +6 -0
- package/model/dockerSourceDiscover.ts +13 -0
- package/model/dockerSourceStreams.ts +5 -0
- package/model/errorBase.ts +1 -1
- package/model/event.ts +18 -1
- package/model/eventSortKeys.ts +6 -0
- package/model/eventStatus.ts +2 -1
- package/model/eventType.ts +2 -2
- package/model/index.ts +52 -6
- package/model/listAuthenticationsResponse.ts +1 -1
- package/model/listDestinationsResponse.ts +1 -1
- package/model/listEventsResponse.ts +4 -1
- package/model/listSourcesResponse.ts +1 -1
- package/model/listTasksResponse.ts +4 -1
- package/model/mappingTypeCSV.ts +8 -0
- package/model/methodType.ts +1 -1
- package/model/onDemandDateUtilsInput.ts +16 -0
- package/model/onDemandTrigger.ts +15 -0
- package/model/onDemandTriggerInput.ts +10 -0
- package/model/onDemandTriggerType.ts +6 -0
- package/model/orderKeys.ts +6 -0
- package/model/pagination.ts +1 -1
- package/model/platform.ts +6 -0
- package/model/platformNone.ts +6 -0
- package/model/platformWithNone.ts +6 -0
- package/model/recordType.ts +6 -0
- package/model/run.ts +20 -6
- package/model/runListResponse.ts +4 -1
- package/model/runOutcome.ts +2 -2
- package/model/runProgress.ts +1 -1
- package/model/runReasonCode.ts +13 -0
- package/model/runResponse.ts +7 -1
- package/model/runSortKeys.ts +6 -0
- package/model/runStatus.ts +7 -2
- package/model/runType.ts +2 -2
- package/model/scheduleDateUtilsInput.ts +11 -0
- package/model/scheduleTrigger.ts +25 -0
- package/model/scheduleTriggerInput.ts +15 -0
- package/model/scheduleTriggerType.ts +6 -0
- package/model/source.ts +7 -1
- package/model/sourceBigCommerce.ts +15 -1
- package/model/sourceBigQuery.ts +37 -0
- package/model/sourceCSV.ts +28 -0
- package/model/sourceCommercetools.ts +6 -1
- package/model/sourceCreate.ts +5 -2
- package/model/sourceCreateResponse.ts +4 -1
- package/model/sourceDocker.ts +25 -0
- package/model/sourceInput.ts +12 -3
- package/model/sourceJSON.ts +17 -0
- package/model/sourceSearch.ts +5 -0
- package/model/sourceSortKeys.ts +6 -0
- package/model/sourceType.ts +8 -2
- package/model/sourceUpdate.ts +6 -6
- package/model/sourceUpdateCommercetools.ts +13 -0
- package/model/sourceUpdateDocker.ts +22 -0
- package/model/sourceUpdateInput.ts +14 -0
- package/model/sourceUpdateResponse.ts +4 -1
- package/model/subscriptionTrigger.ts +10 -0
- package/model/subscriptionTriggerType.ts +6 -0
- package/model/task.ts +22 -2
- package/model/taskCreate.ts +23 -3
- package/model/taskCreateResponse.ts +7 -1
- package/model/taskCreateTrigger.ts +10 -0
- package/model/taskInput.ts +6 -0
- package/model/taskSearch.ts +5 -0
- package/model/taskSortKeys.ts +11 -0
- package/model/taskUpdate.ts +20 -3
- package/model/taskUpdateResponse.ts +7 -1
- package/model/trigger.ts +5 -17
- package/model/triggerType.ts +5 -2
- package/model/triggerUpdateInput.ts +11 -0
- package/model/window.ts +16 -0
- package/package.json +10 -9
- package/dist/model/authenticationInput.d.ts +0 -5
- package/dist/model/authenticationInput.d.ts.map +0 -1
- package/dist/model/authenticationWithInput.d.ts +0 -4
- package/dist/model/authenticationWithInput.d.ts.map +0 -1
- package/dist/model/platformType.d.ts +0 -2
- package/dist/model/platformType.d.ts.map +0 -1
- package/dist/model/sourceJson.d.ts +0 -6
- package/dist/model/sourceJson.d.ts.map +0 -1
- package/dist/model/triggerInput.d.ts +0 -6
- package/dist/model/triggerInput.d.ts.map +0 -1
- package/model/authenticationInput.ts +0 -7
- package/model/authenticationWithInput.ts +0 -6
- package/model/platformType.ts +0 -3
- package/model/sourceJson.ts +0 -9
- package/model/triggerInput.ts +0 -9
|
@@ -1,826 +1,1210 @@
|
|
|
1
1
|
import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
|
-
//
|
|
5
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
6
|
-
const REGIONS = ['us'];
|
|
7
|
-
function getDefaultHosts(region) {
|
|
8
|
-
const url = 'data.{region}.algolia.com'.replace('{region}', region);
|
|
9
|
-
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* @
|
|
93
|
-
* @param
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* @
|
|
190
|
-
* @param
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
*
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
const
|
|
335
|
-
const
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
queryParameters
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
* @
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
* @
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}
|
|
473
|
-
const
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
* @
|
|
488
|
-
* @param
|
|
489
|
-
* @param
|
|
490
|
-
* @param
|
|
491
|
-
* @param
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
*
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
* @
|
|
596
|
-
* @param
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}
|
|
604
|
-
const
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
* Get
|
|
617
|
-
*
|
|
618
|
-
* @
|
|
619
|
-
* @param
|
|
620
|
-
* @param
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
const requestPath = '/1/
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
*
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
const
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
4
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
5
|
+
const apiClientVersion = '1.0.0-alpha.71';
|
|
6
|
+
const REGIONS = ['eu', 'us'];
|
|
7
|
+
function getDefaultHosts(region) {
|
|
8
|
+
const url = 'data.{region}.algolia.com'.replace('{region}', region);
|
|
9
|
+
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Guard: Return strongly typed specific OnDemandTrigger for a given Trigger.
|
|
13
|
+
*
|
|
14
|
+
* @summary Guard method that returns a strongly typed specific OnDemandTrigger for a given Trigger.
|
|
15
|
+
* @param trigger - The given Task Trigger.
|
|
16
|
+
*/
|
|
17
|
+
function isOnDemandTrigger(trigger) {
|
|
18
|
+
return trigger.type === 'onDemand';
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Guard: Return strongly typed specific ScheduleTrigger for a given Trigger.
|
|
22
|
+
*
|
|
23
|
+
* @summary Guard method that returns a strongly typed specific ScheduleTrigger for a given Trigger.
|
|
24
|
+
* @param trigger - The given Task Trigger.
|
|
25
|
+
*/
|
|
26
|
+
function isScheduleTrigger(trigger) {
|
|
27
|
+
return trigger.type === 'schedule';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Guard: Return strongly typed specific SubscriptionTrigger for a given Trigger.
|
|
31
|
+
*
|
|
32
|
+
* @summary Guard method that returns a strongly typed specific SubscriptionTrigger for a given Trigger.
|
|
33
|
+
* @param trigger - The given Task Trigger.
|
|
34
|
+
*/
|
|
35
|
+
function isSubscriptionTrigger(trigger) {
|
|
36
|
+
return trigger.type === 'subscription';
|
|
37
|
+
}
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
39
|
+
function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
40
|
+
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
41
|
+
const transporter = createTransporter({
|
|
42
|
+
hosts: getDefaultHosts(regionOption),
|
|
43
|
+
...options,
|
|
44
|
+
algoliaAgent: getAlgoliaAgent({
|
|
45
|
+
algoliaAgents,
|
|
46
|
+
client: 'Ingestion',
|
|
47
|
+
version: apiClientVersion,
|
|
48
|
+
}),
|
|
49
|
+
baseHeaders: {
|
|
50
|
+
'content-type': 'text/plain',
|
|
51
|
+
...auth.headers(),
|
|
52
|
+
...options.baseHeaders,
|
|
53
|
+
},
|
|
54
|
+
baseQueryParameters: {
|
|
55
|
+
...auth.queryParameters(),
|
|
56
|
+
...options.baseQueryParameters,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
transporter,
|
|
61
|
+
/**
|
|
62
|
+
* The `appId` currently in use.
|
|
63
|
+
*/
|
|
64
|
+
appId: appIdOption,
|
|
65
|
+
/**
|
|
66
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
67
|
+
*/
|
|
68
|
+
clearCache() {
|
|
69
|
+
return Promise.all([
|
|
70
|
+
transporter.requestsCache.clear(),
|
|
71
|
+
transporter.responsesCache.clear(),
|
|
72
|
+
]).then(() => undefined);
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
76
|
+
*/
|
|
77
|
+
get _ua() {
|
|
78
|
+
return transporter.algoliaAgent.value;
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
82
|
+
*
|
|
83
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
84
|
+
* @param version - The version of the agent.
|
|
85
|
+
*/
|
|
86
|
+
addAlgoliaAgent(segment, version) {
|
|
87
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
88
|
+
},
|
|
89
|
+
/**
|
|
90
|
+
* Create a authentication.
|
|
91
|
+
*
|
|
92
|
+
* @summary Create a authentication.
|
|
93
|
+
* @param authenticationCreate -.
|
|
94
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
95
|
+
*/
|
|
96
|
+
createAuthentication(authenticationCreate, requestOptions) {
|
|
97
|
+
if (!authenticationCreate) {
|
|
98
|
+
throw new Error('Parameter `authenticationCreate` is required when calling `createAuthentication`.');
|
|
99
|
+
}
|
|
100
|
+
if (!authenticationCreate.type) {
|
|
101
|
+
throw new Error('Parameter `authenticationCreate.type` is required when calling `createAuthentication`.');
|
|
102
|
+
}
|
|
103
|
+
if (!authenticationCreate.name) {
|
|
104
|
+
throw new Error('Parameter `authenticationCreate.name` is required when calling `createAuthentication`.');
|
|
105
|
+
}
|
|
106
|
+
if (!authenticationCreate.input) {
|
|
107
|
+
throw new Error('Parameter `authenticationCreate.input` is required when calling `createAuthentication`.');
|
|
108
|
+
}
|
|
109
|
+
const requestPath = '/1/authentications';
|
|
110
|
+
const headers = {};
|
|
111
|
+
const queryParameters = {};
|
|
112
|
+
const request = {
|
|
113
|
+
method: 'POST',
|
|
114
|
+
path: requestPath,
|
|
115
|
+
queryParameters,
|
|
116
|
+
headers,
|
|
117
|
+
data: authenticationCreate,
|
|
118
|
+
};
|
|
119
|
+
return transporter.request(request, requestOptions);
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* Create a destination.
|
|
123
|
+
*
|
|
124
|
+
* @summary Create a destination.
|
|
125
|
+
* @param destinationCreate -.
|
|
126
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
127
|
+
*/
|
|
128
|
+
createDestination(destinationCreate, requestOptions) {
|
|
129
|
+
if (!destinationCreate) {
|
|
130
|
+
throw new Error('Parameter `destinationCreate` is required when calling `createDestination`.');
|
|
131
|
+
}
|
|
132
|
+
if (!destinationCreate.type) {
|
|
133
|
+
throw new Error('Parameter `destinationCreate.type` is required when calling `createDestination`.');
|
|
134
|
+
}
|
|
135
|
+
if (!destinationCreate.name) {
|
|
136
|
+
throw new Error('Parameter `destinationCreate.name` is required when calling `createDestination`.');
|
|
137
|
+
}
|
|
138
|
+
if (!destinationCreate.input) {
|
|
139
|
+
throw new Error('Parameter `destinationCreate.input` is required when calling `createDestination`.');
|
|
140
|
+
}
|
|
141
|
+
const requestPath = '/1/destinations';
|
|
142
|
+
const headers = {};
|
|
143
|
+
const queryParameters = {};
|
|
144
|
+
const request = {
|
|
145
|
+
method: 'POST',
|
|
146
|
+
path: requestPath,
|
|
147
|
+
queryParameters,
|
|
148
|
+
headers,
|
|
149
|
+
data: destinationCreate,
|
|
150
|
+
};
|
|
151
|
+
return transporter.request(request, requestOptions);
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* Create a source.
|
|
155
|
+
*
|
|
156
|
+
* @summary Create a source.
|
|
157
|
+
* @param sourceCreate -.
|
|
158
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
159
|
+
*/
|
|
160
|
+
createSource(sourceCreate, requestOptions) {
|
|
161
|
+
if (!sourceCreate) {
|
|
162
|
+
throw new Error('Parameter `sourceCreate` is required when calling `createSource`.');
|
|
163
|
+
}
|
|
164
|
+
if (!sourceCreate.type) {
|
|
165
|
+
throw new Error('Parameter `sourceCreate.type` is required when calling `createSource`.');
|
|
166
|
+
}
|
|
167
|
+
if (!sourceCreate.name) {
|
|
168
|
+
throw new Error('Parameter `sourceCreate.name` is required when calling `createSource`.');
|
|
169
|
+
}
|
|
170
|
+
if (!sourceCreate.input) {
|
|
171
|
+
throw new Error('Parameter `sourceCreate.input` is required when calling `createSource`.');
|
|
172
|
+
}
|
|
173
|
+
const requestPath = '/1/sources';
|
|
174
|
+
const headers = {};
|
|
175
|
+
const queryParameters = {};
|
|
176
|
+
const request = {
|
|
177
|
+
method: 'POST',
|
|
178
|
+
path: requestPath,
|
|
179
|
+
queryParameters,
|
|
180
|
+
headers,
|
|
181
|
+
data: sourceCreate,
|
|
182
|
+
};
|
|
183
|
+
return transporter.request(request, requestOptions);
|
|
184
|
+
},
|
|
185
|
+
/**
|
|
186
|
+
* Create a task.
|
|
187
|
+
*
|
|
188
|
+
* @summary Create a task.
|
|
189
|
+
* @param taskCreate -.
|
|
190
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
191
|
+
*/
|
|
192
|
+
createTask(taskCreate, requestOptions) {
|
|
193
|
+
if (!taskCreate) {
|
|
194
|
+
throw new Error('Parameter `taskCreate` is required when calling `createTask`.');
|
|
195
|
+
}
|
|
196
|
+
if (!taskCreate.sourceID) {
|
|
197
|
+
throw new Error('Parameter `taskCreate.sourceID` is required when calling `createTask`.');
|
|
198
|
+
}
|
|
199
|
+
if (!taskCreate.destinationID) {
|
|
200
|
+
throw new Error('Parameter `taskCreate.destinationID` is required when calling `createTask`.');
|
|
201
|
+
}
|
|
202
|
+
if (!taskCreate.trigger) {
|
|
203
|
+
throw new Error('Parameter `taskCreate.trigger` is required when calling `createTask`.');
|
|
204
|
+
}
|
|
205
|
+
if (!taskCreate.action) {
|
|
206
|
+
throw new Error('Parameter `taskCreate.action` is required when calling `createTask`.');
|
|
207
|
+
}
|
|
208
|
+
const requestPath = '/1/tasks';
|
|
209
|
+
const headers = {};
|
|
210
|
+
const queryParameters = {};
|
|
211
|
+
const request = {
|
|
212
|
+
method: 'POST',
|
|
213
|
+
path: requestPath,
|
|
214
|
+
queryParameters,
|
|
215
|
+
headers,
|
|
216
|
+
data: taskCreate,
|
|
217
|
+
};
|
|
218
|
+
return transporter.request(request, requestOptions);
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
222
|
+
*
|
|
223
|
+
* @summary Send requests to the Algolia REST API.
|
|
224
|
+
* @param customDelete - The customDelete object.
|
|
225
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
226
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
227
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
228
|
+
*/
|
|
229
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
230
|
+
if (!path) {
|
|
231
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
232
|
+
}
|
|
233
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
234
|
+
const headers = {};
|
|
235
|
+
const queryParameters = parameters ? parameters : {};
|
|
236
|
+
const request = {
|
|
237
|
+
method: 'DELETE',
|
|
238
|
+
path: requestPath,
|
|
239
|
+
queryParameters,
|
|
240
|
+
headers,
|
|
241
|
+
};
|
|
242
|
+
return transporter.request(request, requestOptions);
|
|
243
|
+
},
|
|
244
|
+
/**
|
|
245
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
246
|
+
*
|
|
247
|
+
* @summary Send requests to the Algolia REST API.
|
|
248
|
+
* @param customGet - The customGet object.
|
|
249
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
250
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
251
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
252
|
+
*/
|
|
253
|
+
customGet({ path, parameters }, requestOptions) {
|
|
254
|
+
if (!path) {
|
|
255
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
256
|
+
}
|
|
257
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
258
|
+
const headers = {};
|
|
259
|
+
const queryParameters = parameters ? parameters : {};
|
|
260
|
+
const request = {
|
|
261
|
+
method: 'GET',
|
|
262
|
+
path: requestPath,
|
|
263
|
+
queryParameters,
|
|
264
|
+
headers,
|
|
265
|
+
};
|
|
266
|
+
return transporter.request(request, requestOptions);
|
|
267
|
+
},
|
|
268
|
+
/**
|
|
269
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
270
|
+
*
|
|
271
|
+
* @summary Send requests to the Algolia REST API.
|
|
272
|
+
* @param customPost - The customPost object.
|
|
273
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
274
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
275
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
276
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
277
|
+
*/
|
|
278
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
279
|
+
if (!path) {
|
|
280
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
281
|
+
}
|
|
282
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
283
|
+
const headers = {};
|
|
284
|
+
const queryParameters = parameters ? parameters : {};
|
|
285
|
+
const request = {
|
|
286
|
+
method: 'POST',
|
|
287
|
+
path: requestPath,
|
|
288
|
+
queryParameters,
|
|
289
|
+
headers,
|
|
290
|
+
data: body ? body : {},
|
|
291
|
+
};
|
|
292
|
+
return transporter.request(request, requestOptions);
|
|
293
|
+
},
|
|
294
|
+
/**
|
|
295
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
296
|
+
*
|
|
297
|
+
* @summary Send requests to the Algolia REST API.
|
|
298
|
+
* @param customPut - The customPut object.
|
|
299
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
300
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
301
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
302
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
303
|
+
*/
|
|
304
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
305
|
+
if (!path) {
|
|
306
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
307
|
+
}
|
|
308
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
309
|
+
const headers = {};
|
|
310
|
+
const queryParameters = parameters ? parameters : {};
|
|
311
|
+
const request = {
|
|
312
|
+
method: 'PUT',
|
|
313
|
+
path: requestPath,
|
|
314
|
+
queryParameters,
|
|
315
|
+
headers,
|
|
316
|
+
data: body ? body : {},
|
|
317
|
+
};
|
|
318
|
+
return transporter.request(request, requestOptions);
|
|
319
|
+
},
|
|
320
|
+
/**
|
|
321
|
+
* Soft delete the authentication of the given authenticationID.
|
|
322
|
+
*
|
|
323
|
+
* @summary Delete a authentication.
|
|
324
|
+
* @param deleteAuthentication - The deleteAuthentication object.
|
|
325
|
+
* @param deleteAuthentication.authenticationID - The authentication UUID.
|
|
326
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
327
|
+
*/
|
|
328
|
+
deleteAuthentication({ authenticationID }, requestOptions) {
|
|
329
|
+
if (!authenticationID) {
|
|
330
|
+
throw new Error('Parameter `authenticationID` is required when calling `deleteAuthentication`.');
|
|
331
|
+
}
|
|
332
|
+
const requestPath = '/1/authentications/{authenticationID}'.replace('{authenticationID}', encodeURIComponent(authenticationID));
|
|
333
|
+
const headers = {};
|
|
334
|
+
const queryParameters = {};
|
|
335
|
+
const request = {
|
|
336
|
+
method: 'DELETE',
|
|
337
|
+
path: requestPath,
|
|
338
|
+
queryParameters,
|
|
339
|
+
headers,
|
|
340
|
+
};
|
|
341
|
+
return transporter.request(request, requestOptions);
|
|
342
|
+
},
|
|
343
|
+
/**
|
|
344
|
+
* Soft delete the destination of the given destinationID.
|
|
345
|
+
*
|
|
346
|
+
* @summary Delete a destination.
|
|
347
|
+
* @param deleteDestination - The deleteDestination object.
|
|
348
|
+
* @param deleteDestination.destinationID - The destination UUID.
|
|
349
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
350
|
+
*/
|
|
351
|
+
deleteDestination({ destinationID }, requestOptions) {
|
|
352
|
+
if (!destinationID) {
|
|
353
|
+
throw new Error('Parameter `destinationID` is required when calling `deleteDestination`.');
|
|
354
|
+
}
|
|
355
|
+
const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
|
|
356
|
+
const headers = {};
|
|
357
|
+
const queryParameters = {};
|
|
358
|
+
const request = {
|
|
359
|
+
method: 'DELETE',
|
|
360
|
+
path: requestPath,
|
|
361
|
+
queryParameters,
|
|
362
|
+
headers,
|
|
363
|
+
};
|
|
364
|
+
return transporter.request(request, requestOptions);
|
|
365
|
+
},
|
|
366
|
+
/**
|
|
367
|
+
* Soft delete the source of the given sourceID.
|
|
368
|
+
*
|
|
369
|
+
* @summary Delete a source.
|
|
370
|
+
* @param deleteSource - The deleteSource object.
|
|
371
|
+
* @param deleteSource.sourceID - The source UUID.
|
|
372
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
373
|
+
*/
|
|
374
|
+
deleteSource({ sourceID }, requestOptions) {
|
|
375
|
+
if (!sourceID) {
|
|
376
|
+
throw new Error('Parameter `sourceID` is required when calling `deleteSource`.');
|
|
377
|
+
}
|
|
378
|
+
const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
379
|
+
const headers = {};
|
|
380
|
+
const queryParameters = {};
|
|
381
|
+
const request = {
|
|
382
|
+
method: 'DELETE',
|
|
383
|
+
path: requestPath,
|
|
384
|
+
queryParameters,
|
|
385
|
+
headers,
|
|
386
|
+
};
|
|
387
|
+
return transporter.request(request, requestOptions);
|
|
388
|
+
},
|
|
389
|
+
/**
|
|
390
|
+
* Soft delete the task of the given taskID.
|
|
391
|
+
*
|
|
392
|
+
* @summary Delete a task.
|
|
393
|
+
* @param deleteTask - The deleteTask object.
|
|
394
|
+
* @param deleteTask.taskID - The task UUID.
|
|
395
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
396
|
+
*/
|
|
397
|
+
deleteTask({ taskID }, requestOptions) {
|
|
398
|
+
if (!taskID) {
|
|
399
|
+
throw new Error('Parameter `taskID` is required when calling `deleteTask`.');
|
|
400
|
+
}
|
|
401
|
+
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
402
|
+
const headers = {};
|
|
403
|
+
const queryParameters = {};
|
|
404
|
+
const request = {
|
|
405
|
+
method: 'DELETE',
|
|
406
|
+
path: requestPath,
|
|
407
|
+
queryParameters,
|
|
408
|
+
headers,
|
|
409
|
+
};
|
|
410
|
+
return transporter.request(request, requestOptions);
|
|
411
|
+
},
|
|
412
|
+
/**
|
|
413
|
+
* Disable the task of the given taskID.
|
|
414
|
+
*
|
|
415
|
+
* @summary Disable a task.
|
|
416
|
+
* @param disableTask - The disableTask object.
|
|
417
|
+
* @param disableTask.taskID - The task UUID.
|
|
418
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
419
|
+
*/
|
|
420
|
+
disableTask({ taskID }, requestOptions) {
|
|
421
|
+
if (!taskID) {
|
|
422
|
+
throw new Error('Parameter `taskID` is required when calling `disableTask`.');
|
|
423
|
+
}
|
|
424
|
+
const requestPath = '/1/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID));
|
|
425
|
+
const headers = {};
|
|
426
|
+
const queryParameters = {};
|
|
427
|
+
const request = {
|
|
428
|
+
method: 'PUT',
|
|
429
|
+
path: requestPath,
|
|
430
|
+
queryParameters,
|
|
431
|
+
headers,
|
|
432
|
+
};
|
|
433
|
+
return transporter.request(request, requestOptions);
|
|
434
|
+
},
|
|
435
|
+
/**
|
|
436
|
+
* Enable the task of the given taskID.
|
|
437
|
+
*
|
|
438
|
+
* @summary Enable a task.
|
|
439
|
+
* @param enableTask - The enableTask object.
|
|
440
|
+
* @param enableTask.taskID - The task UUID.
|
|
441
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
442
|
+
*/
|
|
443
|
+
enableTask({ taskID }, requestOptions) {
|
|
444
|
+
if (!taskID) {
|
|
445
|
+
throw new Error('Parameter `taskID` is required when calling `enableTask`.');
|
|
446
|
+
}
|
|
447
|
+
const requestPath = '/1/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID));
|
|
448
|
+
const headers = {};
|
|
449
|
+
const queryParameters = {};
|
|
450
|
+
const request = {
|
|
451
|
+
method: 'PUT',
|
|
452
|
+
path: requestPath,
|
|
453
|
+
queryParameters,
|
|
454
|
+
headers,
|
|
455
|
+
};
|
|
456
|
+
return transporter.request(request, requestOptions);
|
|
457
|
+
},
|
|
458
|
+
/**
|
|
459
|
+
* Get the authentication of the given authenticationID.
|
|
460
|
+
*
|
|
461
|
+
* @summary Get a authentication.
|
|
462
|
+
* @param getAuthentication - The getAuthentication object.
|
|
463
|
+
* @param getAuthentication.authenticationID - The authentication UUID.
|
|
464
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
465
|
+
*/
|
|
466
|
+
getAuthentication({ authenticationID }, requestOptions) {
|
|
467
|
+
if (!authenticationID) {
|
|
468
|
+
throw new Error('Parameter `authenticationID` is required when calling `getAuthentication`.');
|
|
469
|
+
}
|
|
470
|
+
const requestPath = '/1/authentications/{authenticationID}'.replace('{authenticationID}', encodeURIComponent(authenticationID));
|
|
471
|
+
const headers = {};
|
|
472
|
+
const queryParameters = {};
|
|
473
|
+
const request = {
|
|
474
|
+
method: 'GET',
|
|
475
|
+
path: requestPath,
|
|
476
|
+
queryParameters,
|
|
477
|
+
headers,
|
|
478
|
+
};
|
|
479
|
+
return transporter.request(request, requestOptions);
|
|
480
|
+
},
|
|
481
|
+
/**
|
|
482
|
+
* Get a list of authentications for the given query parameters, with pagination details.
|
|
483
|
+
*
|
|
484
|
+
* @summary Get a list of authentications.
|
|
485
|
+
* @param getAuthentications - The getAuthentications object.
|
|
486
|
+
* @param getAuthentications.itemsPerPage - The number of items per page to return.
|
|
487
|
+
* @param getAuthentications.page - The page number to fetch, starting at 1.
|
|
488
|
+
* @param getAuthentications.type - The type of the authentications to retrieve.
|
|
489
|
+
* @param getAuthentications.platform - The platform of the authentications to retrieve.
|
|
490
|
+
* @param getAuthentications.sort - The key by which the list should be sorted.
|
|
491
|
+
* @param getAuthentications.order - The order of the returned list.
|
|
492
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
493
|
+
*/
|
|
494
|
+
getAuthentications({ itemsPerPage, page, type, platform, sort, order, } = {}, requestOptions = undefined) {
|
|
495
|
+
const requestPath = '/1/authentications';
|
|
496
|
+
const headers = {};
|
|
497
|
+
const queryParameters = {};
|
|
498
|
+
if (itemsPerPage !== undefined) {
|
|
499
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
500
|
+
}
|
|
501
|
+
if (page !== undefined) {
|
|
502
|
+
queryParameters.page = page.toString();
|
|
503
|
+
}
|
|
504
|
+
if (type !== undefined) {
|
|
505
|
+
queryParameters.type = type.toString();
|
|
506
|
+
}
|
|
507
|
+
if (platform !== undefined) {
|
|
508
|
+
queryParameters.platform = platform.toString();
|
|
509
|
+
}
|
|
510
|
+
if (sort !== undefined) {
|
|
511
|
+
queryParameters.sort = sort.toString();
|
|
512
|
+
}
|
|
513
|
+
if (order !== undefined) {
|
|
514
|
+
queryParameters.order = order.toString();
|
|
515
|
+
}
|
|
516
|
+
const request = {
|
|
517
|
+
method: 'GET',
|
|
518
|
+
path: requestPath,
|
|
519
|
+
queryParameters,
|
|
520
|
+
headers,
|
|
521
|
+
};
|
|
522
|
+
return transporter.request(request, requestOptions);
|
|
523
|
+
},
|
|
524
|
+
/**
|
|
525
|
+
* Get the destination of the given destinationID.
|
|
526
|
+
*
|
|
527
|
+
* @summary Get a destination.
|
|
528
|
+
* @param getDestination - The getDestination object.
|
|
529
|
+
* @param getDestination.destinationID - The destination UUID.
|
|
530
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
531
|
+
*/
|
|
532
|
+
getDestination({ destinationID }, requestOptions) {
|
|
533
|
+
if (!destinationID) {
|
|
534
|
+
throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
|
|
535
|
+
}
|
|
536
|
+
const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
|
|
537
|
+
const headers = {};
|
|
538
|
+
const queryParameters = {};
|
|
539
|
+
const request = {
|
|
540
|
+
method: 'GET',
|
|
541
|
+
path: requestPath,
|
|
542
|
+
queryParameters,
|
|
543
|
+
headers,
|
|
544
|
+
};
|
|
545
|
+
return transporter.request(request, requestOptions);
|
|
546
|
+
},
|
|
547
|
+
/**
|
|
548
|
+
* Get a list of destinations for the given query parameters, with pagination details.
|
|
549
|
+
*
|
|
550
|
+
* @summary Get a list of destinations.
|
|
551
|
+
* @param getDestinations - The getDestinations object.
|
|
552
|
+
* @param getDestinations.itemsPerPage - The number of items per page to return.
|
|
553
|
+
* @param getDestinations.page - The page number to fetch, starting at 1.
|
|
554
|
+
* @param getDestinations.type - The type of the destinations to retrive.
|
|
555
|
+
* @param getDestinations.authenticationID - The authenticationIDs of the destinations to retrive.
|
|
556
|
+
* @param getDestinations.sort - The key by which the list should be sorted.
|
|
557
|
+
* @param getDestinations.order - The order of the returned list.
|
|
558
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
559
|
+
*/
|
|
560
|
+
getDestinations({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
|
|
561
|
+
const requestPath = '/1/destinations';
|
|
562
|
+
const headers = {};
|
|
563
|
+
const queryParameters = {};
|
|
564
|
+
if (itemsPerPage !== undefined) {
|
|
565
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
566
|
+
}
|
|
567
|
+
if (page !== undefined) {
|
|
568
|
+
queryParameters.page = page.toString();
|
|
569
|
+
}
|
|
570
|
+
if (type !== undefined) {
|
|
571
|
+
queryParameters.type = type.toString();
|
|
572
|
+
}
|
|
573
|
+
if (authenticationID !== undefined) {
|
|
574
|
+
queryParameters.authenticationID = authenticationID.toString();
|
|
575
|
+
}
|
|
576
|
+
if (sort !== undefined) {
|
|
577
|
+
queryParameters.sort = sort.toString();
|
|
578
|
+
}
|
|
579
|
+
if (order !== undefined) {
|
|
580
|
+
queryParameters.order = order.toString();
|
|
581
|
+
}
|
|
582
|
+
const request = {
|
|
583
|
+
method: 'GET',
|
|
584
|
+
path: requestPath,
|
|
585
|
+
queryParameters,
|
|
586
|
+
headers,
|
|
587
|
+
};
|
|
588
|
+
return transporter.request(request, requestOptions);
|
|
589
|
+
},
|
|
590
|
+
/**
|
|
591
|
+
* Retrieve a stream listing for a given Singer specification compatible docker type source ID.
|
|
592
|
+
*
|
|
593
|
+
* @summary Retrieve a stream listing.
|
|
594
|
+
* @param getDockerSourceStreams - The getDockerSourceStreams object.
|
|
595
|
+
* @param getDockerSourceStreams.sourceID - The source UUID.
|
|
596
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
597
|
+
*/
|
|
598
|
+
getDockerSourceStreams({ sourceID }, requestOptions) {
|
|
599
|
+
if (!sourceID) {
|
|
600
|
+
throw new Error('Parameter `sourceID` is required when calling `getDockerSourceStreams`.');
|
|
601
|
+
}
|
|
602
|
+
const requestPath = '/1/sources/{sourceID}/discover'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
603
|
+
const headers = {};
|
|
604
|
+
const queryParameters = {};
|
|
605
|
+
const request = {
|
|
606
|
+
method: 'GET',
|
|
607
|
+
path: requestPath,
|
|
608
|
+
queryParameters,
|
|
609
|
+
headers,
|
|
610
|
+
};
|
|
611
|
+
return transporter.request(request, requestOptions);
|
|
612
|
+
},
|
|
613
|
+
/**
|
|
614
|
+
* Get a single event for a specific runID.
|
|
615
|
+
*
|
|
616
|
+
* @summary Get an event.
|
|
617
|
+
* @param getEvent - The getEvent object.
|
|
618
|
+
* @param getEvent.runID - The run UUID.
|
|
619
|
+
* @param getEvent.eventID - The event UUID.
|
|
620
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
621
|
+
*/
|
|
622
|
+
getEvent({ runID, eventID }, requestOptions) {
|
|
623
|
+
if (!runID) {
|
|
624
|
+
throw new Error('Parameter `runID` is required when calling `getEvent`.');
|
|
625
|
+
}
|
|
626
|
+
if (!eventID) {
|
|
627
|
+
throw new Error('Parameter `eventID` is required when calling `getEvent`.');
|
|
628
|
+
}
|
|
629
|
+
const requestPath = '/1/runs/{runID}/events/{eventID}'
|
|
630
|
+
.replace('{runID}', encodeURIComponent(runID))
|
|
631
|
+
.replace('{eventID}', encodeURIComponent(eventID));
|
|
632
|
+
const headers = {};
|
|
633
|
+
const queryParameters = {};
|
|
634
|
+
const request = {
|
|
635
|
+
method: 'GET',
|
|
636
|
+
path: requestPath,
|
|
637
|
+
queryParameters,
|
|
638
|
+
headers,
|
|
639
|
+
};
|
|
640
|
+
return transporter.request(request, requestOptions);
|
|
641
|
+
},
|
|
642
|
+
/**
|
|
643
|
+
* Get a list of events associated to the given runID, for the given query parameters.
|
|
644
|
+
*
|
|
645
|
+
* @summary Get a list of events.
|
|
646
|
+
* @param getEvents - The getEvents object.
|
|
647
|
+
* @param getEvents.runID - The run UUID.
|
|
648
|
+
* @param getEvents.itemsPerPage - The number of items per page to return.
|
|
649
|
+
* @param getEvents.page - The page number to fetch, starting at 1.
|
|
650
|
+
* @param getEvents.status - Filter the status of the events.
|
|
651
|
+
* @param getEvents.type - Filter the type of the events.
|
|
652
|
+
* @param getEvents.sort - The key by which the list should be sorted.
|
|
653
|
+
* @param getEvents.order - The order of the returned list.
|
|
654
|
+
* @param getEvents.startDate - The start date (in RFC3339 format) of the events fetching window. Defaults to \'now\'-3 hours if omitted.
|
|
655
|
+
* @param getEvents.endDate - The end date (in RFC3339 format) of the events fetching window. Defaults to \'now\' days if omitted.
|
|
656
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
657
|
+
*/
|
|
658
|
+
getEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
|
|
659
|
+
if (!runID) {
|
|
660
|
+
throw new Error('Parameter `runID` is required when calling `getEvents`.');
|
|
661
|
+
}
|
|
662
|
+
const requestPath = '/1/runs/{runID}/events'.replace('{runID}', encodeURIComponent(runID));
|
|
663
|
+
const headers = {};
|
|
664
|
+
const queryParameters = {};
|
|
665
|
+
if (itemsPerPage !== undefined) {
|
|
666
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
667
|
+
}
|
|
668
|
+
if (page !== undefined) {
|
|
669
|
+
queryParameters.page = page.toString();
|
|
670
|
+
}
|
|
671
|
+
if (status !== undefined) {
|
|
672
|
+
queryParameters.status = status.toString();
|
|
673
|
+
}
|
|
674
|
+
if (type !== undefined) {
|
|
675
|
+
queryParameters.type = type.toString();
|
|
676
|
+
}
|
|
677
|
+
if (sort !== undefined) {
|
|
678
|
+
queryParameters.sort = sort.toString();
|
|
679
|
+
}
|
|
680
|
+
if (order !== undefined) {
|
|
681
|
+
queryParameters.order = order.toString();
|
|
682
|
+
}
|
|
683
|
+
if (startDate !== undefined) {
|
|
684
|
+
queryParameters.startDate = startDate.toString();
|
|
685
|
+
}
|
|
686
|
+
if (endDate !== undefined) {
|
|
687
|
+
queryParameters.endDate = endDate.toString();
|
|
688
|
+
}
|
|
689
|
+
const request = {
|
|
690
|
+
method: 'GET',
|
|
691
|
+
path: requestPath,
|
|
692
|
+
queryParameters,
|
|
693
|
+
headers,
|
|
694
|
+
};
|
|
695
|
+
return transporter.request(request, requestOptions);
|
|
696
|
+
},
|
|
697
|
+
/**
|
|
698
|
+
* Get a single run for the given ID.
|
|
699
|
+
*
|
|
700
|
+
* @summary Get a run.
|
|
701
|
+
* @param getRun - The getRun object.
|
|
702
|
+
* @param getRun.runID - The run UUID.
|
|
703
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
704
|
+
*/
|
|
705
|
+
getRun({ runID }, requestOptions) {
|
|
706
|
+
if (!runID) {
|
|
707
|
+
throw new Error('Parameter `runID` is required when calling `getRun`.');
|
|
708
|
+
}
|
|
709
|
+
const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
|
|
710
|
+
const headers = {};
|
|
711
|
+
const queryParameters = {};
|
|
712
|
+
const request = {
|
|
713
|
+
method: 'GET',
|
|
714
|
+
path: requestPath,
|
|
715
|
+
queryParameters,
|
|
716
|
+
headers,
|
|
717
|
+
};
|
|
718
|
+
return transporter.request(request, requestOptions);
|
|
719
|
+
},
|
|
720
|
+
/**
|
|
721
|
+
* Get a list of runs for the given query parameters, with pagination details.
|
|
722
|
+
*
|
|
723
|
+
* @summary Get a list of runs.
|
|
724
|
+
* @param getRuns - The getRuns object.
|
|
725
|
+
* @param getRuns.itemsPerPage - The number of items per page to return.
|
|
726
|
+
* @param getRuns.page - The page number to fetch, starting at 1.
|
|
727
|
+
* @param getRuns.status - Filter the status of the runs.
|
|
728
|
+
* @param getRuns.taskID - Filter by taskID.
|
|
729
|
+
* @param getRuns.sort - The key by which the list should be sorted.
|
|
730
|
+
* @param getRuns.order - The order of the returned list.
|
|
731
|
+
* @param getRuns.startDate - The start date (in RFC3339 format) of the runs fetching window. Defaults to \'now\'-7 days if omitted.
|
|
732
|
+
* @param getRuns.endDate - The end date (in RFC3339 format) of the runs fetching window. Defaults to \'now\' days if omitted.
|
|
733
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
734
|
+
*/
|
|
735
|
+
getRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
|
|
736
|
+
const requestPath = '/1/runs';
|
|
737
|
+
const headers = {};
|
|
738
|
+
const queryParameters = {};
|
|
739
|
+
if (itemsPerPage !== undefined) {
|
|
740
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
741
|
+
}
|
|
742
|
+
if (page !== undefined) {
|
|
743
|
+
queryParameters.page = page.toString();
|
|
744
|
+
}
|
|
745
|
+
if (status !== undefined) {
|
|
746
|
+
queryParameters.status = status.toString();
|
|
747
|
+
}
|
|
748
|
+
if (taskID !== undefined) {
|
|
749
|
+
queryParameters.taskID = taskID.toString();
|
|
750
|
+
}
|
|
751
|
+
if (sort !== undefined) {
|
|
752
|
+
queryParameters.sort = sort.toString();
|
|
753
|
+
}
|
|
754
|
+
if (order !== undefined) {
|
|
755
|
+
queryParameters.order = order.toString();
|
|
756
|
+
}
|
|
757
|
+
if (startDate !== undefined) {
|
|
758
|
+
queryParameters.startDate = startDate.toString();
|
|
759
|
+
}
|
|
760
|
+
if (endDate !== undefined) {
|
|
761
|
+
queryParameters.endDate = endDate.toString();
|
|
762
|
+
}
|
|
763
|
+
const request = {
|
|
764
|
+
method: 'GET',
|
|
765
|
+
path: requestPath,
|
|
766
|
+
queryParameters,
|
|
767
|
+
headers,
|
|
768
|
+
};
|
|
769
|
+
return transporter.request(request, requestOptions);
|
|
770
|
+
},
|
|
771
|
+
/**
|
|
772
|
+
* Get the source of the given sourceID.
|
|
773
|
+
*
|
|
774
|
+
* @summary Get a source.
|
|
775
|
+
* @param getSource - The getSource object.
|
|
776
|
+
* @param getSource.sourceID - The source UUID.
|
|
777
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
778
|
+
*/
|
|
779
|
+
getSource({ sourceID }, requestOptions) {
|
|
780
|
+
if (!sourceID) {
|
|
781
|
+
throw new Error('Parameter `sourceID` is required when calling `getSource`.');
|
|
782
|
+
}
|
|
783
|
+
const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
784
|
+
const headers = {};
|
|
785
|
+
const queryParameters = {};
|
|
786
|
+
const request = {
|
|
787
|
+
method: 'GET',
|
|
788
|
+
path: requestPath,
|
|
789
|
+
queryParameters,
|
|
790
|
+
headers,
|
|
791
|
+
};
|
|
792
|
+
return transporter.request(request, requestOptions);
|
|
793
|
+
},
|
|
794
|
+
/**
|
|
795
|
+
* Get a list of sources for the given query parameters, with pagination details.
|
|
796
|
+
*
|
|
797
|
+
* @summary Get a list of sources.
|
|
798
|
+
* @param getSources - The getSources object.
|
|
799
|
+
* @param getSources.itemsPerPage - The number of items per page to return.
|
|
800
|
+
* @param getSources.page - The page number to fetch, starting at 1.
|
|
801
|
+
* @param getSources.type - The type of the sources to retrieve.
|
|
802
|
+
* @param getSources.authenticationID - The authenticationIDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication.
|
|
803
|
+
* @param getSources.sort - The key by which the list should be sorted.
|
|
804
|
+
* @param getSources.order - The order of the returned list.
|
|
805
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
806
|
+
*/
|
|
807
|
+
getSources({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
|
|
808
|
+
const requestPath = '/1/sources';
|
|
809
|
+
const headers = {};
|
|
810
|
+
const queryParameters = {};
|
|
811
|
+
if (itemsPerPage !== undefined) {
|
|
812
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
813
|
+
}
|
|
814
|
+
if (page !== undefined) {
|
|
815
|
+
queryParameters.page = page.toString();
|
|
816
|
+
}
|
|
817
|
+
if (type !== undefined) {
|
|
818
|
+
queryParameters.type = type.toString();
|
|
819
|
+
}
|
|
820
|
+
if (authenticationID !== undefined) {
|
|
821
|
+
queryParameters.authenticationID = authenticationID.toString();
|
|
822
|
+
}
|
|
823
|
+
if (sort !== undefined) {
|
|
824
|
+
queryParameters.sort = sort.toString();
|
|
825
|
+
}
|
|
826
|
+
if (order !== undefined) {
|
|
827
|
+
queryParameters.order = order.toString();
|
|
828
|
+
}
|
|
829
|
+
const request = {
|
|
830
|
+
method: 'GET',
|
|
831
|
+
path: requestPath,
|
|
832
|
+
queryParameters,
|
|
833
|
+
headers,
|
|
834
|
+
};
|
|
835
|
+
return transporter.request(request, requestOptions);
|
|
836
|
+
},
|
|
837
|
+
/**
|
|
838
|
+
* Get the task of the given taskID.
|
|
839
|
+
*
|
|
840
|
+
* @summary Get a task.
|
|
841
|
+
* @param getTask - The getTask object.
|
|
842
|
+
* @param getTask.taskID - The task UUID.
|
|
843
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
844
|
+
*/
|
|
845
|
+
getTask({ taskID }, requestOptions) {
|
|
846
|
+
if (!taskID) {
|
|
847
|
+
throw new Error('Parameter `taskID` is required when calling `getTask`.');
|
|
848
|
+
}
|
|
849
|
+
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
850
|
+
const headers = {};
|
|
851
|
+
const queryParameters = {};
|
|
852
|
+
const request = {
|
|
853
|
+
method: 'GET',
|
|
854
|
+
path: requestPath,
|
|
855
|
+
queryParameters,
|
|
856
|
+
headers,
|
|
857
|
+
};
|
|
858
|
+
return transporter.request(request, requestOptions);
|
|
859
|
+
},
|
|
860
|
+
/**
|
|
861
|
+
* Get a list of tasks for the given query parameters, with pagination details.
|
|
862
|
+
*
|
|
863
|
+
* @summary Get a list of tasks.
|
|
864
|
+
* @param getTasks - The getTasks object.
|
|
865
|
+
* @param getTasks.itemsPerPage - The number of items per page to return.
|
|
866
|
+
* @param getTasks.page - The page number to fetch, starting at 1.
|
|
867
|
+
* @param getTasks.action - The action of the tasks to retrieve.
|
|
868
|
+
* @param getTasks.enabled - Whether the task is enabled or not.
|
|
869
|
+
* @param getTasks.sourceID - The sourceIDs of the tasks to retrive.
|
|
870
|
+
* @param getTasks.destinationID - The destinationIDs of the tasks to retrive.
|
|
871
|
+
* @param getTasks.triggerType - The trigger type of the task.
|
|
872
|
+
* @param getTasks.sort - The key by which the list should be sorted.
|
|
873
|
+
* @param getTasks.order - The order of the returned list.
|
|
874
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
875
|
+
*/
|
|
876
|
+
getTasks({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
|
|
877
|
+
const requestPath = '/1/tasks';
|
|
878
|
+
const headers = {};
|
|
879
|
+
const queryParameters = {};
|
|
880
|
+
if (itemsPerPage !== undefined) {
|
|
881
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
882
|
+
}
|
|
883
|
+
if (page !== undefined) {
|
|
884
|
+
queryParameters.page = page.toString();
|
|
885
|
+
}
|
|
886
|
+
if (action !== undefined) {
|
|
887
|
+
queryParameters.action = action.toString();
|
|
888
|
+
}
|
|
889
|
+
if (enabled !== undefined) {
|
|
890
|
+
queryParameters.enabled = enabled.toString();
|
|
891
|
+
}
|
|
892
|
+
if (sourceID !== undefined) {
|
|
893
|
+
queryParameters.sourceID = sourceID.toString();
|
|
894
|
+
}
|
|
895
|
+
if (destinationID !== undefined) {
|
|
896
|
+
queryParameters.destinationID = destinationID.toString();
|
|
897
|
+
}
|
|
898
|
+
if (triggerType !== undefined) {
|
|
899
|
+
queryParameters.triggerType = triggerType.toString();
|
|
900
|
+
}
|
|
901
|
+
if (sort !== undefined) {
|
|
902
|
+
queryParameters.sort = sort.toString();
|
|
903
|
+
}
|
|
904
|
+
if (order !== undefined) {
|
|
905
|
+
queryParameters.order = order.toString();
|
|
906
|
+
}
|
|
907
|
+
const request = {
|
|
908
|
+
method: 'GET',
|
|
909
|
+
path: requestPath,
|
|
910
|
+
queryParameters,
|
|
911
|
+
headers,
|
|
912
|
+
};
|
|
913
|
+
return transporter.request(request, requestOptions);
|
|
914
|
+
},
|
|
915
|
+
/**
|
|
916
|
+
* Run the task of the given taskID.
|
|
917
|
+
*
|
|
918
|
+
* @summary Run a task.
|
|
919
|
+
* @param runTask - The runTask object.
|
|
920
|
+
* @param runTask.taskID - The task UUID.
|
|
921
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
922
|
+
*/
|
|
923
|
+
runTask({ taskID }, requestOptions) {
|
|
924
|
+
if (!taskID) {
|
|
925
|
+
throw new Error('Parameter `taskID` is required when calling `runTask`.');
|
|
926
|
+
}
|
|
927
|
+
const requestPath = '/1/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
|
|
928
|
+
const headers = {};
|
|
929
|
+
const queryParameters = {};
|
|
930
|
+
const request = {
|
|
931
|
+
method: 'POST',
|
|
932
|
+
path: requestPath,
|
|
933
|
+
queryParameters,
|
|
934
|
+
headers,
|
|
935
|
+
};
|
|
936
|
+
return transporter.request(request, requestOptions);
|
|
937
|
+
},
|
|
938
|
+
/**
|
|
939
|
+
* Search among authentications with a defined set of parameters.
|
|
940
|
+
*
|
|
941
|
+
* @summary Search among authentications.
|
|
942
|
+
* @param authenticationSearch - The authenticationSearch object.
|
|
943
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
944
|
+
*/
|
|
945
|
+
searchAuthentications(authenticationSearch, requestOptions) {
|
|
946
|
+
if (!authenticationSearch) {
|
|
947
|
+
throw new Error('Parameter `authenticationSearch` is required when calling `searchAuthentications`.');
|
|
948
|
+
}
|
|
949
|
+
if (!authenticationSearch.authenticationIDs) {
|
|
950
|
+
throw new Error('Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.');
|
|
951
|
+
}
|
|
952
|
+
const requestPath = '/1/authentications/search';
|
|
953
|
+
const headers = {};
|
|
954
|
+
const queryParameters = {};
|
|
955
|
+
const request = {
|
|
956
|
+
method: 'POST',
|
|
957
|
+
path: requestPath,
|
|
958
|
+
queryParameters,
|
|
959
|
+
headers,
|
|
960
|
+
data: authenticationSearch,
|
|
961
|
+
};
|
|
962
|
+
return transporter.request(request, requestOptions);
|
|
963
|
+
},
|
|
964
|
+
/**
|
|
965
|
+
* Search among destinations with a defined set of parameters.
|
|
966
|
+
*
|
|
967
|
+
* @summary Search among destinations.
|
|
968
|
+
* @param destinationSearch - The destinationSearch object.
|
|
969
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
970
|
+
*/
|
|
971
|
+
searchDestinations(destinationSearch, requestOptions) {
|
|
972
|
+
if (!destinationSearch) {
|
|
973
|
+
throw new Error('Parameter `destinationSearch` is required when calling `searchDestinations`.');
|
|
974
|
+
}
|
|
975
|
+
if (!destinationSearch.destinationIDs) {
|
|
976
|
+
throw new Error('Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.');
|
|
977
|
+
}
|
|
978
|
+
const requestPath = '/1/destinations/search';
|
|
979
|
+
const headers = {};
|
|
980
|
+
const queryParameters = {};
|
|
981
|
+
const request = {
|
|
982
|
+
method: 'POST',
|
|
983
|
+
path: requestPath,
|
|
984
|
+
queryParameters,
|
|
985
|
+
headers,
|
|
986
|
+
data: destinationSearch,
|
|
987
|
+
};
|
|
988
|
+
return transporter.request(request, requestOptions);
|
|
989
|
+
},
|
|
990
|
+
/**
|
|
991
|
+
* Search among sources with a defined set of parameters.
|
|
992
|
+
*
|
|
993
|
+
* @summary Search among sources.
|
|
994
|
+
* @param sourceSearch - The sourceSearch object.
|
|
995
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
996
|
+
*/
|
|
997
|
+
searchSources(sourceSearch, requestOptions) {
|
|
998
|
+
if (!sourceSearch) {
|
|
999
|
+
throw new Error('Parameter `sourceSearch` is required when calling `searchSources`.');
|
|
1000
|
+
}
|
|
1001
|
+
if (!sourceSearch.sourceIDs) {
|
|
1002
|
+
throw new Error('Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.');
|
|
1003
|
+
}
|
|
1004
|
+
const requestPath = '/1/sources/search';
|
|
1005
|
+
const headers = {};
|
|
1006
|
+
const queryParameters = {};
|
|
1007
|
+
const request = {
|
|
1008
|
+
method: 'POST',
|
|
1009
|
+
path: requestPath,
|
|
1010
|
+
queryParameters,
|
|
1011
|
+
headers,
|
|
1012
|
+
data: sourceSearch,
|
|
1013
|
+
};
|
|
1014
|
+
return transporter.request(request, requestOptions);
|
|
1015
|
+
},
|
|
1016
|
+
/**
|
|
1017
|
+
* Search among tasks with a defined set of parameters.
|
|
1018
|
+
*
|
|
1019
|
+
* @summary Search among tasks.
|
|
1020
|
+
* @param taskSearch - The taskSearch object.
|
|
1021
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1022
|
+
*/
|
|
1023
|
+
searchTasks(taskSearch, requestOptions) {
|
|
1024
|
+
if (!taskSearch) {
|
|
1025
|
+
throw new Error('Parameter `taskSearch` is required when calling `searchTasks`.');
|
|
1026
|
+
}
|
|
1027
|
+
if (!taskSearch.taskIDs) {
|
|
1028
|
+
throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.');
|
|
1029
|
+
}
|
|
1030
|
+
const requestPath = '/1/tasks/search';
|
|
1031
|
+
const headers = {};
|
|
1032
|
+
const queryParameters = {};
|
|
1033
|
+
const request = {
|
|
1034
|
+
method: 'POST',
|
|
1035
|
+
path: requestPath,
|
|
1036
|
+
queryParameters,
|
|
1037
|
+
headers,
|
|
1038
|
+
data: taskSearch,
|
|
1039
|
+
};
|
|
1040
|
+
return transporter.request(request, requestOptions);
|
|
1041
|
+
},
|
|
1042
|
+
/**
|
|
1043
|
+
* Trigger a stream listing request for a Singer specification compatible docker type source.
|
|
1044
|
+
*
|
|
1045
|
+
* @summary Trigger a stream listing request.
|
|
1046
|
+
* @param triggerDockerSourceDiscover - The triggerDockerSourceDiscover object.
|
|
1047
|
+
* @param triggerDockerSourceDiscover.sourceID - The source UUID.
|
|
1048
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1049
|
+
*/
|
|
1050
|
+
triggerDockerSourceDiscover({ sourceID }, requestOptions) {
|
|
1051
|
+
if (!sourceID) {
|
|
1052
|
+
throw new Error('Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.');
|
|
1053
|
+
}
|
|
1054
|
+
const requestPath = '/1/sources/{sourceID}/discover'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
1055
|
+
const headers = {};
|
|
1056
|
+
const queryParameters = {};
|
|
1057
|
+
const request = {
|
|
1058
|
+
method: 'POST',
|
|
1059
|
+
path: requestPath,
|
|
1060
|
+
queryParameters,
|
|
1061
|
+
headers,
|
|
1062
|
+
};
|
|
1063
|
+
return transporter.request(request, requestOptions);
|
|
1064
|
+
},
|
|
1065
|
+
/**
|
|
1066
|
+
* Update the authentication of the given authenticationID.
|
|
1067
|
+
*
|
|
1068
|
+
* @summary Update a authentication.
|
|
1069
|
+
* @param updateAuthentication - The updateAuthentication object.
|
|
1070
|
+
* @param updateAuthentication.authenticationID - The authentication UUID.
|
|
1071
|
+
* @param updateAuthentication.authenticationUpdate - The authenticationUpdate object.
|
|
1072
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1073
|
+
*/
|
|
1074
|
+
updateAuthentication({ authenticationID, authenticationUpdate }, requestOptions) {
|
|
1075
|
+
if (!authenticationID) {
|
|
1076
|
+
throw new Error('Parameter `authenticationID` is required when calling `updateAuthentication`.');
|
|
1077
|
+
}
|
|
1078
|
+
if (!authenticationUpdate) {
|
|
1079
|
+
throw new Error('Parameter `authenticationUpdate` is required when calling `updateAuthentication`.');
|
|
1080
|
+
}
|
|
1081
|
+
const requestPath = '/1/authentications/{authenticationID}'.replace('{authenticationID}', encodeURIComponent(authenticationID));
|
|
1082
|
+
const headers = {};
|
|
1083
|
+
const queryParameters = {};
|
|
1084
|
+
const request = {
|
|
1085
|
+
method: 'PATCH',
|
|
1086
|
+
path: requestPath,
|
|
1087
|
+
queryParameters,
|
|
1088
|
+
headers,
|
|
1089
|
+
data: authenticationUpdate,
|
|
1090
|
+
};
|
|
1091
|
+
return transporter.request(request, requestOptions);
|
|
1092
|
+
},
|
|
1093
|
+
/**
|
|
1094
|
+
* Update the destination of the given destinationID.
|
|
1095
|
+
*
|
|
1096
|
+
* @summary Update a destination.
|
|
1097
|
+
* @param updateDestination - The updateDestination object.
|
|
1098
|
+
* @param updateDestination.destinationID - The destination UUID.
|
|
1099
|
+
* @param updateDestination.destinationUpdate - The destinationUpdate object.
|
|
1100
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1101
|
+
*/
|
|
1102
|
+
updateDestination({ destinationID, destinationUpdate }, requestOptions) {
|
|
1103
|
+
if (!destinationID) {
|
|
1104
|
+
throw new Error('Parameter `destinationID` is required when calling `updateDestination`.');
|
|
1105
|
+
}
|
|
1106
|
+
if (!destinationUpdate) {
|
|
1107
|
+
throw new Error('Parameter `destinationUpdate` is required when calling `updateDestination`.');
|
|
1108
|
+
}
|
|
1109
|
+
const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
|
|
1110
|
+
const headers = {};
|
|
1111
|
+
const queryParameters = {};
|
|
1112
|
+
const request = {
|
|
1113
|
+
method: 'PATCH',
|
|
1114
|
+
path: requestPath,
|
|
1115
|
+
queryParameters,
|
|
1116
|
+
headers,
|
|
1117
|
+
data: destinationUpdate,
|
|
1118
|
+
};
|
|
1119
|
+
return transporter.request(request, requestOptions);
|
|
1120
|
+
},
|
|
1121
|
+
/**
|
|
1122
|
+
* Update the source of the given sourceID.
|
|
1123
|
+
*
|
|
1124
|
+
* @summary Update a source.
|
|
1125
|
+
* @param updateSource - The updateSource object.
|
|
1126
|
+
* @param updateSource.sourceID - The source UUID.
|
|
1127
|
+
* @param updateSource.sourceUpdate - The sourceUpdate object.
|
|
1128
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1129
|
+
*/
|
|
1130
|
+
updateSource({ sourceID, sourceUpdate }, requestOptions) {
|
|
1131
|
+
if (!sourceID) {
|
|
1132
|
+
throw new Error('Parameter `sourceID` is required when calling `updateSource`.');
|
|
1133
|
+
}
|
|
1134
|
+
if (!sourceUpdate) {
|
|
1135
|
+
throw new Error('Parameter `sourceUpdate` is required when calling `updateSource`.');
|
|
1136
|
+
}
|
|
1137
|
+
const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
1138
|
+
const headers = {};
|
|
1139
|
+
const queryParameters = {};
|
|
1140
|
+
const request = {
|
|
1141
|
+
method: 'PATCH',
|
|
1142
|
+
path: requestPath,
|
|
1143
|
+
queryParameters,
|
|
1144
|
+
headers,
|
|
1145
|
+
data: sourceUpdate,
|
|
1146
|
+
};
|
|
1147
|
+
return transporter.request(request, requestOptions);
|
|
1148
|
+
},
|
|
1149
|
+
/**
|
|
1150
|
+
* Update the task of the given taskID.
|
|
1151
|
+
*
|
|
1152
|
+
* @summary Update a task.
|
|
1153
|
+
* @param updateTask - The updateTask object.
|
|
1154
|
+
* @param updateTask.taskID - The task UUID.
|
|
1155
|
+
* @param updateTask.taskUpdate - The taskUpdate object.
|
|
1156
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1157
|
+
*/
|
|
1158
|
+
updateTask({ taskID, taskUpdate }, requestOptions) {
|
|
1159
|
+
if (!taskID) {
|
|
1160
|
+
throw new Error('Parameter `taskID` is required when calling `updateTask`.');
|
|
1161
|
+
}
|
|
1162
|
+
if (!taskUpdate) {
|
|
1163
|
+
throw new Error('Parameter `taskUpdate` is required when calling `updateTask`.');
|
|
1164
|
+
}
|
|
1165
|
+
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1166
|
+
const headers = {};
|
|
1167
|
+
const queryParameters = {};
|
|
1168
|
+
const request = {
|
|
1169
|
+
method: 'PATCH',
|
|
1170
|
+
path: requestPath,
|
|
1171
|
+
queryParameters,
|
|
1172
|
+
headers,
|
|
1173
|
+
data: taskUpdate,
|
|
1174
|
+
};
|
|
1175
|
+
return transporter.request(request, requestOptions);
|
|
1176
|
+
},
|
|
1177
|
+
};
|
|
794
1178
|
}
|
|
795
1179
|
|
|
796
|
-
//
|
|
797
|
-
function ingestionClient(appId, apiKey, region, options) {
|
|
798
|
-
if (!appId || typeof appId !== 'string') {
|
|
799
|
-
throw new Error('`appId` is missing.');
|
|
800
|
-
}
|
|
801
|
-
if (!apiKey || typeof apiKey !== 'string') {
|
|
802
|
-
throw new Error('`apiKey` is missing.');
|
|
803
|
-
}
|
|
804
|
-
if (!region ||
|
|
805
|
-
(region && (typeof region !== 'string' || !REGIONS.includes(region)))) {
|
|
806
|
-
throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`);
|
|
807
|
-
}
|
|
808
|
-
return createIngestionClient({
|
|
809
|
-
appId,
|
|
810
|
-
apiKey,
|
|
811
|
-
region,
|
|
812
|
-
timeouts: {
|
|
813
|
-
connect: DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
814
|
-
read: DEFAULT_READ_TIMEOUT_NODE,
|
|
815
|
-
write: DEFAULT_WRITE_TIMEOUT_NODE,
|
|
816
|
-
},
|
|
817
|
-
requester: createHttpRequester(),
|
|
818
|
-
algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
|
|
819
|
-
responsesCache: createNullCache(),
|
|
820
|
-
requestsCache: createNullCache(),
|
|
821
|
-
hostsCache: createMemoryCache(),
|
|
822
|
-
...options,
|
|
823
|
-
});
|
|
1180
|
+
// 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.
|
|
1181
|
+
function ingestionClient(appId, apiKey, region, options) {
|
|
1182
|
+
if (!appId || typeof appId !== 'string') {
|
|
1183
|
+
throw new Error('`appId` is missing.');
|
|
1184
|
+
}
|
|
1185
|
+
if (!apiKey || typeof apiKey !== 'string') {
|
|
1186
|
+
throw new Error('`apiKey` is missing.');
|
|
1187
|
+
}
|
|
1188
|
+
if (!region ||
|
|
1189
|
+
(region && (typeof region !== 'string' || !REGIONS.includes(region)))) {
|
|
1190
|
+
throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`);
|
|
1191
|
+
}
|
|
1192
|
+
return createIngestionClient({
|
|
1193
|
+
appId,
|
|
1194
|
+
apiKey,
|
|
1195
|
+
region,
|
|
1196
|
+
timeouts: {
|
|
1197
|
+
connect: DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
1198
|
+
read: DEFAULT_READ_TIMEOUT_NODE,
|
|
1199
|
+
write: DEFAULT_WRITE_TIMEOUT_NODE,
|
|
1200
|
+
},
|
|
1201
|
+
requester: createHttpRequester(),
|
|
1202
|
+
algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
|
|
1203
|
+
responsesCache: createNullCache(),
|
|
1204
|
+
requestsCache: createNullCache(),
|
|
1205
|
+
hostsCache: createMemoryCache(),
|
|
1206
|
+
...options,
|
|
1207
|
+
});
|
|
824
1208
|
}
|
|
825
1209
|
|
|
826
|
-
export { apiClientVersion, ingestionClient };
|
|
1210
|
+
export { apiClientVersion, ingestionClient, isOnDemandTrigger, isScheduleTrigger, isSubscriptionTrigger };
|