@algolia/ingestion 1.0.0-alpha.8 → 1.0.0-alpha.81

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