@kestra-io/kestra-sdk 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/README.md +879 -0
  2. package/dist/ApiClient.js +704 -0
  3. package/dist/KestraClient.js +97 -0
  4. package/dist/api/AIApi.js +85 -0
  5. package/dist/api/AppsApi.js +1017 -0
  6. package/dist/api/AuditLogsApi.js +253 -0
  7. package/dist/api/AuthsApi.js +236 -0
  8. package/dist/api/BannersApi.js +184 -0
  9. package/dist/api/BindingsApi.js +269 -0
  10. package/dist/api/BlueprintTagsApi.js +134 -0
  11. package/dist/api/BlueprintsApi.js +528 -0
  12. package/dist/api/ClusterApi.js +100 -0
  13. package/dist/api/DashboardsApi.js +535 -0
  14. package/dist/api/DefaultApi.js +274 -0
  15. package/dist/api/ExecutionsApi.js +2942 -0
  16. package/dist/api/FilesApi.js +471 -0
  17. package/dist/api/FlowsApi.js +1509 -0
  18. package/dist/api/GroupsApi.js +567 -0
  19. package/dist/api/InvitationsApi.js +300 -0
  20. package/dist/api/KVApi.js +280 -0
  21. package/dist/api/LogsApi.js +371 -0
  22. package/dist/api/MaintenanceApi.js +100 -0
  23. package/dist/api/MetricsApi.js +393 -0
  24. package/dist/api/MiscApi.js +385 -0
  25. package/dist/api/NamespacesApi.js +653 -0
  26. package/dist/api/PluginsApi.js +755 -0
  27. package/dist/api/RolesApi.js +352 -0
  28. package/dist/api/SCIMApi.js +815 -0
  29. package/dist/api/SCIMConfigurationApi.js +264 -0
  30. package/dist/api/SCIMGroupsApi.js +423 -0
  31. package/dist/api/SCIMUsersApi.js +423 -0
  32. package/dist/api/SecurityIntegrationsApi.js +290 -0
  33. package/dist/api/ServiceAccountApi.js +213 -0
  34. package/dist/api/ServicesApi.js +164 -0
  35. package/dist/api/TenantAccessApi.js +268 -0
  36. package/dist/api/TenantsApi.js +325 -0
  37. package/dist/api/TestSuitesApi.js +594 -0
  38. package/dist/api/TriggersApi.js +885 -0
  39. package/dist/api/UsersApi.js +894 -0
  40. package/dist/api/WorkerGroupsApi.js +224 -0
  41. package/dist/index.js +2967 -0
  42. package/dist/model/AbstractFlow.js +252 -0
  43. package/dist/model/AbstractFlowLabels.js +158 -0
  44. package/dist/model/AbstractGraph.js +110 -0
  45. package/dist/model/AbstractGraphBranchType.js +63 -0
  46. package/dist/model/AbstractMetricEntryObject.js +162 -0
  47. package/dist/model/AbstractTrigger.js +264 -0
  48. package/dist/model/AbstractTriggerForExecution.js +138 -0
  49. package/dist/model/AbstractUser.js +277 -0
  50. package/dist/model/AbstractUserTenantIdentityProvider.js +157 -0
  51. package/dist/model/Action.js +68 -0
  52. package/dist/model/ApiAuth.js +113 -0
  53. package/dist/model/ApiAutocomplete.js +101 -0
  54. package/dist/model/ApiGroupSummary.js +101 -0
  55. package/dist/model/ApiIds.js +89 -0
  56. package/dist/model/ApiRoleSummary.js +117 -0
  57. package/dist/model/ApiSecretListResponse.js +148 -0
  58. package/dist/model/ApiSecretMeta.js +112 -0
  59. package/dist/model/ApiSecretMetaEE.js +166 -0
  60. package/dist/model/ApiSecretTag.js +126 -0
  61. package/dist/model/ApiSecretValue.js +168 -0
  62. package/dist/model/ApiTenant.js +315 -0
  63. package/dist/model/ApiUser.js +361 -0
  64. package/dist/model/AppResponse.js +115 -0
  65. package/dist/model/AppResponseUILayout.js +89 -0
  66. package/dist/model/AppsControllerApiApp.js +173 -0
  67. package/dist/model/AppsControllerApiAppCatalogItem.js +137 -0
  68. package/dist/model/AppsControllerApiAppSource.js +161 -0
  69. package/dist/model/AppsControllerApiAppTags.js +89 -0
  70. package/dist/model/AppsControllerApiBulkImportResponse.js +122 -0
  71. package/dist/model/AppsControllerApiBulkImportResponseError.js +101 -0
  72. package/dist/model/AppsControllerApiBulkOperationRequest.js +89 -0
  73. package/dist/model/Assertion.js +325 -0
  74. package/dist/model/AssertionResult.js +178 -0
  75. package/dist/model/AssertionRunError.js +124 -0
  76. package/dist/model/AttributeReference.js +149 -0
  77. package/dist/model/AuditLog.js +257 -0
  78. package/dist/model/AuditLogControllerAuditLogDiff.js +101 -0
  79. package/dist/model/AuditLogControllerAuditLogOption.js +109 -0
  80. package/dist/model/AuditLogControllerAuditLogWithUser.js +105 -0
  81. package/dist/model/AuditLogControllerFindRequest.js +105 -0
  82. package/dist/model/AuditLogDetail.js +149 -0
  83. package/dist/model/AuthControllerAuth.js +105 -0
  84. package/dist/model/AuthControllerInvitationUserRequest.js +140 -0
  85. package/dist/model/AuthControllerResetPasswordRequest.js +101 -0
  86. package/dist/model/Backfill.js +180 -0
  87. package/dist/model/Banner.js +169 -0
  88. package/dist/model/BannerType.js +63 -0
  89. package/dist/model/BaseAuditLog.js +195 -0
  90. package/dist/model/BaseResourcePatchRequest.js +89 -0
  91. package/dist/model/BaseResourceScimResource.js +89 -0
  92. package/dist/model/BaseResourceSearchRequest.js +89 -0
  93. package/dist/model/Binding.js +171 -0
  94. package/dist/model/BindingType.js +58 -0
  95. package/dist/model/Blueprint.js +178 -0
  96. package/dist/model/BlueprintControllerApiBlueprintItem.js +145 -0
  97. package/dist/model/BlueprintControllerApiBlueprintItemWithSource.js +196 -0
  98. package/dist/model/BlueprintControllerApiBlueprintTagItem.js +109 -0
  99. package/dist/model/BlueprintControllerKind.js +63 -0
  100. package/dist/model/BlueprintWithFlow.js +226 -0
  101. package/dist/model/Breakpoint.js +124 -0
  102. package/dist/model/BulkErrorResponse.js +97 -0
  103. package/dist/model/BulkResponse.js +85 -0
  104. package/dist/model/Cache.js +120 -0
  105. package/dist/model/ChartChartOption.js +134 -0
  106. package/dist/model/ChartFiltersOverrides.js +164 -0
  107. package/dist/model/Concurrency.js +119 -0
  108. package/dist/model/ConcurrencyBehavior.js +63 -0
  109. package/dist/model/Condition.js +112 -0
  110. package/dist/model/ConfigurationUsage.js +133 -0
  111. package/dist/model/ConversionServiceProvider.js +108 -0
  112. package/dist/model/ConvertibleMultiValuesString.js +139 -0
  113. package/dist/model/ConvertibleValuesListString.js +126 -0
  114. package/dist/model/CreateApiTokenRequest.js +144 -0
  115. package/dist/model/CreateApiTokenResponse.js +113 -0
  116. package/dist/model/CreateSecurityIntegrationRequest.js +140 -0
  117. package/dist/model/CrudEventType.js +93 -0
  118. package/dist/model/CustomLink.js +113 -0
  119. package/dist/model/DailyExecutionStatistics.js +150 -0
  120. package/dist/model/DailyExecutionStatisticsDuration.js +164 -0
  121. package/dist/model/DailyExecutionStatisticsExecutionCounts.js +197 -0
  122. package/dist/model/Dashboard.js +180 -0
  123. package/dist/model/DashboardControllerPreviewRequest.js +126 -0
  124. package/dist/model/DeleteExecutionsByQueryRequest.js +111 -0
  125. package/dist/model/DeletedInterface.js +85 -0
  126. package/dist/model/DependsOn.js +101 -0
  127. package/dist/model/DocumentationWithSchema.js +103 -0
  128. package/dist/model/Email.js +110 -0
  129. package/dist/model/EventAppResponse.js +139 -0
  130. package/dist/model/EventExecution.js +139 -0
  131. package/dist/model/EventExecutionStatusEvent.js +139 -0
  132. package/dist/model/EventLogEntry.js +139 -0
  133. package/dist/model/ExecutableTaskSubflowId.js +109 -0
  134. package/dist/model/Execution.js +407 -0
  135. package/dist/model/ExecutionControllerApiValidateExecutionInputsResponse.js +134 -0
  136. package/dist/model/ExecutionControllerApiValidateExecutionInputsResponseApiInputAndValue.js +140 -0
  137. package/dist/model/ExecutionControllerApiValidateExecutionInputsResponseApiInputError.js +89 -0
  138. package/dist/model/ExecutionControllerEvalResult.js +113 -0
  139. package/dist/model/ExecutionControllerExecutionResponse.js +505 -0
  140. package/dist/model/ExecutionControllerLastExecutionResponse.js +130 -0
  141. package/dist/model/ExecutionControllerSetLabelsByIdsRequest.js +122 -0
  142. package/dist/model/ExecutionControllerStateRequest.js +98 -0
  143. package/dist/model/ExecutionControllerWebhookResponse.js +216 -0
  144. package/dist/model/ExecutionKind.js +63 -0
  145. package/dist/model/ExecutionMetadata.js +93 -0
  146. package/dist/model/ExecutionRepositoryInterfaceChildFilter.js +58 -0
  147. package/dist/model/ExecutionRepositoryInterfaceFlowFilter.js +126 -0
  148. package/dist/model/ExecutionStatusEvent.js +139 -0
  149. package/dist/model/ExecutionTrigger.js +148 -0
  150. package/dist/model/ExecutionUsage.js +139 -0
  151. package/dist/model/FileAttributes.js +132 -0
  152. package/dist/model/FileAttributesFileType.js +58 -0
  153. package/dist/model/FileMetas.js +108 -0
  154. package/dist/model/Filter.js +97 -0
  155. package/dist/model/Fixtures.js +144 -0
  156. package/dist/model/Flow.js +601 -0
  157. package/dist/model/FlowAllOfLabels.js +158 -0
  158. package/dist/model/FlowControllerTaskValidationType.js +58 -0
  159. package/dist/model/FlowForExecution.js +447 -0
  160. package/dist/model/FlowForExecutionAllOfLabels.js +158 -0
  161. package/dist/model/FlowGenerationPrompt.js +126 -0
  162. package/dist/model/FlowGraph.js +182 -0
  163. package/dist/model/FlowGraphCluster.js +139 -0
  164. package/dist/model/FlowGraphEdge.js +115 -0
  165. package/dist/model/FlowId.js +121 -0
  166. package/dist/model/FlowInterface.js +350 -0
  167. package/dist/model/FlowNode.js +136 -0
  168. package/dist/model/FlowRelation.js +58 -0
  169. package/dist/model/FlowScope.js +58 -0
  170. package/dist/model/FlowTopologyGraph.js +140 -0
  171. package/dist/model/FlowTopologyGraphEdge.js +110 -0
  172. package/dist/model/FlowUsage.js +123 -0
  173. package/dist/model/FlowWithSource.js +695 -0
  174. package/dist/model/FlowWithSourceAllOfLabels.js +158 -0
  175. package/dist/model/Group.js +160 -0
  176. package/dist/model/GroupIdentifier.js +118 -0
  177. package/dist/model/GroupIdentifierMembership.js +58 -0
  178. package/dist/model/GroupUsage.js +85 -0
  179. package/dist/model/HostUsage.js +131 -0
  180. package/dist/model/HostUsageHardware.js +125 -0
  181. package/dist/model/HostUsageJvm.js +113 -0
  182. package/dist/model/HostUsageOs.js +125 -0
  183. package/dist/model/HttpParameters.js +152 -0
  184. package/dist/model/IAMBindingControllerApiBindingDetail.js +152 -0
  185. package/dist/model/IAMBindingControllerApiBindingGroup.js +101 -0
  186. package/dist/model/IAMBindingControllerApiBindingSummary.js +152 -0
  187. package/dist/model/IAMBindingControllerApiBindingUser.js +122 -0
  188. package/dist/model/IAMBindingControllerApiCreateBindingRequest.js +149 -0
  189. package/dist/model/IAMBindingControllerApiRole.js +101 -0
  190. package/dist/model/IAMGroupControllerApiCreateGroupRequest.js +136 -0
  191. package/dist/model/IAMGroupControllerApiGroupDetail.js +113 -0
  192. package/dist/model/IAMGroupControllerApiGroupMember.js +146 -0
  193. package/dist/model/IAMGroupControllerApiGroupMembership.js +118 -0
  194. package/dist/model/IAMGroupControllerApiUpdateGroupRequest.js +127 -0
  195. package/dist/model/IAMInvitationControllerApiInvitationCreateRequest.js +170 -0
  196. package/dist/model/IAMInvitationControllerApiInvitationDetail.js +229 -0
  197. package/dist/model/IAMInvitationControllerApiInvitationRole.js +124 -0
  198. package/dist/model/IAMRoleControllerApiRoleCreateOrUpdateRequest.js +148 -0
  199. package/dist/model/IAMRoleControllerApiRoleCreateOrUpdateRequestPermissions.js +365 -0
  200. package/dist/model/IAMRoleControllerApiRoleDetail.js +143 -0
  201. package/dist/model/IAMServiceAccountControllerApiGroup.js +89 -0
  202. package/dist/model/IAMServiceAccountControllerApiServiceAccountRequest.js +163 -0
  203. package/dist/model/IAMServiceAccountControllerApiServiceAccountResponse.js +178 -0
  204. package/dist/model/IAMTenantAccessControllerApiAuthentication.js +101 -0
  205. package/dist/model/IAMTenantAccessControllerApiCreateTenantAccessRequest.js +112 -0
  206. package/dist/model/IAMTenantAccessControllerApiGroup.js +109 -0
  207. package/dist/model/IAMTenantAccessControllerApiRoleAssignment.js +167 -0
  208. package/dist/model/IAMTenantAccessControllerApiTenantAccess.js +196 -0
  209. package/dist/model/IAMTenantAccessControllerApiUserPermission.js +99 -0
  210. package/dist/model/IAMTenantAccessControllerApiUserTenantAccess.js +188 -0
  211. package/dist/model/IAMTenantAccessControllerUserApiAutocomplete.js +127 -0
  212. package/dist/model/IAMUserControllerApiCreateOrUpdateUserRequest.js +188 -0
  213. package/dist/model/IAMUserControllerApiGroup.js +101 -0
  214. package/dist/model/IAMUserControllerApiPatchRestrictedRequest.js +108 -0
  215. package/dist/model/IAMUserControllerApiPatchSuperAdminRequest.js +108 -0
  216. package/dist/model/IAMUserControllerApiPatchUserPasswordRequest.js +112 -0
  217. package/dist/model/IAMUserControllerApiTenant.js +101 -0
  218. package/dist/model/IAMUserControllerApiUser.js +258 -0
  219. package/dist/model/IAMUserControllerApiUserAuth.js +113 -0
  220. package/dist/model/IAMUserControllerApiUserSummary.js +184 -0
  221. package/dist/model/IAMUserGroupControllerApiUpdateUserGroupsRequest.js +89 -0
  222. package/dist/model/IdWithNamespace.js +101 -0
  223. package/dist/model/IdentityProvider.js +123 -0
  224. package/dist/model/InputObject.js +189 -0
  225. package/dist/model/InputType.js +101 -0
  226. package/dist/model/InstanceControllerApiActiveService.js +94 -0
  227. package/dist/model/InstanceControllerApiActiveServiceList.js +118 -0
  228. package/dist/model/InstanceControllerApiCreateOrUpdateWorkerGroupRequest.js +139 -0
  229. package/dist/model/InstanceControllerApiPluginArtifact.js +137 -0
  230. package/dist/model/InstanceControllerApiPluginArtifactListPluginArtifact.js +97 -0
  231. package/dist/model/InstanceControllerApiPluginArtifactListPluginResolutionResult.js +97 -0
  232. package/dist/model/InstanceControllerApiPluginListRequest.js +89 -0
  233. package/dist/model/InstanceControllerApiPluginVersionDetails.js +182 -0
  234. package/dist/model/InstanceControllerApiPluginVersionDetailsApiPluginClass.js +101 -0
  235. package/dist/model/InstanceControllerApiPluginVersionDetailsApiPluginClasses.js +122 -0
  236. package/dist/model/InstanceControllerApiPluginVersions.js +134 -0
  237. package/dist/model/InstanceControllerApiPluginVersionsApiPluginVersionAndMetadata.js +103 -0
  238. package/dist/model/InstanceControllerApiServerInstance.js +122 -0
  239. package/dist/model/InstanceControllerApiServiceInstance.js +137 -0
  240. package/dist/model/InstanceControllerApiWorkerGroup.js +129 -0
  241. package/dist/model/InstanceControllerApiWorkerGroupDetails.js +163 -0
  242. package/dist/model/InstanceControllerApiWorkerGroupItem.js +126 -0
  243. package/dist/model/InstanceControllerApiWorkerGroupList.js +112 -0
  244. package/dist/model/Invitation.js +258 -0
  245. package/dist/model/InvitationInvitationStatus.js +63 -0
  246. package/dist/model/Isolation.js +98 -0
  247. package/dist/model/KVControllerApiDeleteBulkRequest.js +89 -0
  248. package/dist/model/KVControllerApiDeleteBulkResponse.js +89 -0
  249. package/dist/model/KVControllerTypedValue.js +94 -0
  250. package/dist/model/KVEntry.js +125 -0
  251. package/dist/model/KVType.js +83 -0
  252. package/dist/model/Label.js +126 -0
  253. package/dist/model/Level.js +73 -0
  254. package/dist/model/Listener.js +172 -0
  255. package/dist/model/LogEntry.js +242 -0
  256. package/dist/model/MapObjectObject.js +85 -0
  257. package/dist/model/MeControllerApiMe.js +182 -0
  258. package/dist/model/MeControllerApiProfile.js +125 -0
  259. package/dist/model/MeControllerApiTenant.js +113 -0
  260. package/dist/model/MeControllerApiUpdatePasswordRequest.js +101 -0
  261. package/dist/model/MeControllerApiUserDetailsRequest.js +113 -0
  262. package/dist/model/Meta.js +129 -0
  263. package/dist/model/Metric.js +166 -0
  264. package/dist/model/MetricAggregation.js +130 -0
  265. package/dist/model/MetricAggregations.js +144 -0
  266. package/dist/model/MetricEntry.js +239 -0
  267. package/dist/model/MetricTag.js +101 -0
  268. package/dist/model/MiscControllerBasicAuthCredentials.js +113 -0
  269. package/dist/model/MiscControllerConfiguration.js +266 -0
  270. package/dist/model/MiscControllerEEConfiguration.js +494 -0
  271. package/dist/model/MiscControllerEnvironment.js +101 -0
  272. package/dist/model/MiscControllerLicenseInfo.js +129 -0
  273. package/dist/model/MiscControllerPluginIdAndVersion.js +101 -0
  274. package/dist/model/MiscControllerPreview.js +93 -0
  275. package/dist/model/MiscControllerTenantConfigurationInfo.js +93 -0
  276. package/dist/model/Name.js +102 -0
  277. package/dist/model/Namespace.js +350 -0
  278. package/dist/model/NamespaceAllowedNamespace.js +112 -0
  279. package/dist/model/NamespaceAllowedTrigger.js +124 -0
  280. package/dist/model/NamespaceLight.js +122 -0
  281. package/dist/model/NamespaceUsage.js +85 -0
  282. package/dist/model/NamespaceWithDisabled.js +370 -0
  283. package/dist/model/Output.js +157 -0
  284. package/dist/model/PageRequest.js +93 -0
  285. package/dist/model/PagedResultsApiGroupSummary.js +140 -0
  286. package/dist/model/PagedResultsApiRoleSummary.js +140 -0
  287. package/dist/model/PagedResultsAppsControllerApiApp.js +140 -0
  288. package/dist/model/PagedResultsAppsControllerApiAppCatalogItem.js +140 -0
  289. package/dist/model/PagedResultsAuditLogControllerAuditLogWithUser.js +140 -0
  290. package/dist/model/PagedResultsBlueprint.js +140 -0
  291. package/dist/model/PagedResultsBlueprintControllerApiBlueprintItem.js +140 -0
  292. package/dist/model/PagedResultsDashboard.js +140 -0
  293. package/dist/model/PagedResultsExecution.js +140 -0
  294. package/dist/model/PagedResultsFlow.js +140 -0
  295. package/dist/model/PagedResultsIAMBindingControllerApiBindingDetail.js +140 -0
  296. package/dist/model/PagedResultsIAMBindingControllerApiBindingSummary.js +140 -0
  297. package/dist/model/PagedResultsIAMGroupControllerApiGroupMember.js +140 -0
  298. package/dist/model/PagedResultsIAMInvitationControllerApiInvitationDetail.js +140 -0
  299. package/dist/model/PagedResultsIAMTenantAccessControllerApiUserTenantAccess.js +140 -0
  300. package/dist/model/PagedResultsIAMUserControllerApiUserSummary.js +140 -0
  301. package/dist/model/PagedResultsInstanceControllerApiPluginArtifact.js +140 -0
  302. package/dist/model/PagedResultsInstanceControllerApiServiceInstance.js +140 -0
  303. package/dist/model/PagedResultsLogEntry.js +140 -0
  304. package/dist/model/PagedResultsMapStringObject.js +124 -0
  305. package/dist/model/PagedResultsMetricEntry.js +140 -0
  306. package/dist/model/PagedResultsNamespaceWithDisabled.js +140 -0
  307. package/dist/model/PagedResultsSearchResultFlow.js +140 -0
  308. package/dist/model/PagedResultsTaskRun.js +140 -0
  309. package/dist/model/PagedResultsTenant.js +140 -0
  310. package/dist/model/PagedResultsTestSuite.js +140 -0
  311. package/dist/model/PagedResultsTrigger.js +140 -0
  312. package/dist/model/PagedResultsTriggerControllerTriggers.js +140 -0
  313. package/dist/model/PatchOperation.js +108 -0
  314. package/dist/model/PatchOperationPath.js +91 -0
  315. package/dist/model/PatchOperationType.js +63 -0
  316. package/dist/model/PatchRequest.js +132 -0
  317. package/dist/model/Permission.js +168 -0
  318. package/dist/model/Plugin.js +601 -0
  319. package/dist/model/PluginArtifact.js +149 -0
  320. package/dist/model/PluginArtifactMetadata.js +125 -0
  321. package/dist/model/PluginControllerApiPluginVersions.js +101 -0
  322. package/dist/model/PluginDefault.js +130 -0
  323. package/dist/model/PluginIcon.js +109 -0
  324. package/dist/model/PluginMetric.js +113 -0
  325. package/dist/model/PluginPluginElementMetadata.js +97 -0
  326. package/dist/model/PluginSchema.js +107 -0
  327. package/dist/model/PluginSubGroupPluginCategory.js +118 -0
  328. package/dist/model/PluginUsage.js +87 -0
  329. package/dist/model/PreviewAppRequest.js +91 -0
  330. package/dist/model/PropertyBoolean.js +97 -0
  331. package/dist/model/PropertyDouble.js +97 -0
  332. package/dist/model/PropertyDuration.js +101 -0
  333. package/dist/model/PropertyListString.js +101 -0
  334. package/dist/model/PropertyObject.js +97 -0
  335. package/dist/model/PropertyString.js +101 -0
  336. package/dist/model/QueryFilter.js +103 -0
  337. package/dist/model/QueryFilterField.js +123 -0
  338. package/dist/model/QueryFilterFieldOp.js +134 -0
  339. package/dist/model/QueryFilterOp.js +113 -0
  340. package/dist/model/QueryFilterOperation.js +101 -0
  341. package/dist/model/QueryFilterResourceField.js +122 -0
  342. package/dist/model/RBACServiceRoleAssignmentRoleOrigin.js +58 -0
  343. package/dist/model/Relation.js +98 -0
  344. package/dist/model/RelationType.js +83 -0
  345. package/dist/model/ResourceType.js +339 -0
  346. package/dist/model/ResourceTypeSchemaExtensionConfiguration.js +97 -0
  347. package/dist/model/Role.js +178 -0
  348. package/dist/model/RoleUsage.js +85 -0
  349. package/dist/model/SLA.js +148 -0
  350. package/dist/model/SLABehavior.js +63 -0
  351. package/dist/model/SLAType.js +58 -0
  352. package/dist/model/Schema.js +180 -0
  353. package/dist/model/SchemaAttribute.js +274 -0
  354. package/dist/model/SchemaAttributeMutability.js +68 -0
  355. package/dist/model/SchemaAttributeReturned.js +68 -0
  356. package/dist/model/SchemaAttributeType.js +88 -0
  357. package/dist/model/SchemaAttributeUniqueness.js +63 -0
  358. package/dist/model/SchemaType.js +88 -0
  359. package/dist/model/ScimExtension.js +89 -0
  360. package/dist/model/ScimResource.js +195 -0
  361. package/dist/model/ScimResourceWithOptionalId.js +228 -0
  362. package/dist/model/ScimUser.js +336 -0
  363. package/dist/model/SearchRequest.js +241 -0
  364. package/dist/model/SearchResultFlow.js +103 -0
  365. package/dist/model/SecurityIntegrationType.js +53 -0
  366. package/dist/model/ServerConfig.js +136 -0
  367. package/dist/model/ServerConfigLiveness.js +169 -0
  368. package/dist/model/ServerInstance.js +165 -0
  369. package/dist/model/ServerInstanceType.js +58 -0
  370. package/dist/model/ServerType.js +78 -0
  371. package/dist/model/ServiceInstance.js +232 -0
  372. package/dist/model/ServiceInstanceTimestampedEvent.js +118 -0
  373. package/dist/model/ServiceProviderConfiguration.js +384 -0
  374. package/dist/model/ServiceProviderConfigurationAuthenticationSchema.js +134 -0
  375. package/dist/model/ServiceProviderConfigurationAuthenticationSchemaType.js +73 -0
  376. package/dist/model/ServiceProviderConfigurationBulkConfiguration.js +111 -0
  377. package/dist/model/ServiceProviderConfigurationFilterConfiguration.js +103 -0
  378. package/dist/model/ServiceProviderConfigurationSupportedConfiguration.js +85 -0
  379. package/dist/model/ServiceServiceState.js +98 -0
  380. package/dist/model/ServiceType.js +73 -0
  381. package/dist/model/ServiceUsage.js +110 -0
  382. package/dist/model/ServiceUsageDailyServiceStatistics.js +122 -0
  383. package/dist/model/ServiceUsageDailyStatistics.js +109 -0
  384. package/dist/model/SetupConfiguration.js +145 -0
  385. package/dist/model/SetupConfigurationSetupData.js +115 -0
  386. package/dist/model/SortOrder.js +58 -0
  387. package/dist/model/SortRequest.js +100 -0
  388. package/dist/model/State.js +167 -0
  389. package/dist/model/StateHistory.js +119 -0
  390. package/dist/model/StateType.js +123 -0
  391. package/dist/model/Task.js +253 -0
  392. package/dist/model/TaskFixture.js +157 -0
  393. package/dist/model/TaskForExecution.js +211 -0
  394. package/dist/model/TaskRun.js +284 -0
  395. package/dist/model/TaskRunAttempt.js +168 -0
  396. package/dist/model/Tenant.js +245 -0
  397. package/dist/model/TenantInterface.js +89 -0
  398. package/dist/model/TenantUsage.js +85 -0
  399. package/dist/model/TestState.js +68 -0
  400. package/dist/model/TestSuite.js +212 -0
  401. package/dist/model/TestSuiteControllerSearchTestsLastResult.js +110 -0
  402. package/dist/model/TestSuiteControllerTestSuiteApiId.js +126 -0
  403. package/dist/model/TestSuiteControllerTestSuiteBulkRequest.js +130 -0
  404. package/dist/model/TestSuiteControllerTestsLastResultResponse.js +110 -0
  405. package/dist/model/TestSuiteRunResult.js +215 -0
  406. package/dist/model/TheLabelsToPassToTheExecutionCreated.js +158 -0
  407. package/dist/model/TimeWindow.js +101 -0
  408. package/dist/model/Trigger.js +287 -0
  409. package/dist/model/TriggerContext.js +205 -0
  410. package/dist/model/TriggerControllerSetDisabledRequest.js +140 -0
  411. package/dist/model/TriggerControllerTriggers.js +105 -0
  412. package/dist/model/TriggerFixture.js +136 -0
  413. package/dist/model/Type.js +143 -0
  414. package/dist/model/UnitTest.js +192 -0
  415. package/dist/model/UnitTestResult.js +239 -0
  416. package/dist/model/UpdateFlow200Response.js +261 -0
  417. package/dist/model/UpdateFlowsInNamespaceFromJson200Response.js +141 -0
  418. package/dist/model/Usage.js +343 -0
  419. package/dist/model/UsageEE.js +483 -0
  420. package/dist/model/UserGroup.js +122 -0
  421. package/dist/model/UserGroupType.js +58 -0
  422. package/dist/model/UserType.js +58 -0
  423. package/dist/model/UserUsage.js +138 -0
  424. package/dist/model/UsernamePasswordCredentials.js +150 -0
  425. package/dist/model/ValidateConstraintViolation.js +188 -0
  426. package/dist/model/ValuePathExpression.js +99 -0
  427. package/dist/model/WorkerGroup.js +98 -0
  428. package/dist/model/WorkerGroupFallback.js +63 -0
  429. package/dist/model/WorkerTaskRestartStrategy.js +63 -0
  430. package/package.json +46 -0
@@ -0,0 +1,2942 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _BulkErrorResponse = _interopRequireDefault(require("../model/BulkErrorResponse"));
9
+ var _BulkResponse = _interopRequireDefault(require("../model/BulkResponse"));
10
+ var _DeleteExecutionsByQueryRequest = _interopRequireDefault(require("../model/DeleteExecutionsByQueryRequest"));
11
+ var _EventExecution = _interopRequireDefault(require("../model/EventExecution"));
12
+ var _EventExecutionStatusEvent = _interopRequireDefault(require("../model/EventExecutionStatusEvent"));
13
+ var _Execution = _interopRequireDefault(require("../model/Execution"));
14
+ var _ExecutionControllerApiValidateExecutionInputsResponse = _interopRequireDefault(require("../model/ExecutionControllerApiValidateExecutionInputsResponse"));
15
+ var _ExecutionControllerEvalResult = _interopRequireDefault(require("../model/ExecutionControllerEvalResult"));
16
+ var _ExecutionControllerExecutionResponse = _interopRequireDefault(require("../model/ExecutionControllerExecutionResponse"));
17
+ var _ExecutionControllerLastExecutionResponse = _interopRequireDefault(require("../model/ExecutionControllerLastExecutionResponse"));
18
+ var _ExecutionControllerSetLabelsByIdsRequest = _interopRequireDefault(require("../model/ExecutionControllerSetLabelsByIdsRequest"));
19
+ var _ExecutionControllerStateRequest = _interopRequireDefault(require("../model/ExecutionControllerStateRequest"));
20
+ var _ExecutionControllerWebhookResponse = _interopRequireDefault(require("../model/ExecutionControllerWebhookResponse"));
21
+ var _ExecutionKind = _interopRequireDefault(require("../model/ExecutionKind"));
22
+ var _ExecutionRepositoryInterfaceChildFilter = _interopRequireDefault(require("../model/ExecutionRepositoryInterfaceChildFilter"));
23
+ var _ExecutionRepositoryInterfaceFlowFilter = _interopRequireDefault(require("../model/ExecutionRepositoryInterfaceFlowFilter"));
24
+ var _FileMetas = _interopRequireDefault(require("../model/FileMetas"));
25
+ var _FlowForExecution = _interopRequireDefault(require("../model/FlowForExecution"));
26
+ var _FlowGraph = _interopRequireDefault(require("../model/FlowGraph"));
27
+ var _FlowScope = _interopRequireDefault(require("../model/FlowScope"));
28
+ var _Label = _interopRequireDefault(require("../model/Label"));
29
+ var _PagedResultsExecution = _interopRequireDefault(require("../model/PagedResultsExecution"));
30
+ var _PagedResultsTaskRun = _interopRequireDefault(require("../model/PagedResultsTaskRun"));
31
+ var _QueryFilter = _interopRequireDefault(require("../model/QueryFilter"));
32
+ var _StateType = _interopRequireDefault(require("../model/StateType"));
33
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
34
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
35
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
36
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
37
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
38
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
39
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
40
+ * Kestra EE
41
+ * All API operations, except for Superadmin-only endpoints, require a tenant identifier in the HTTP path.<br/> Endpoints designated as Superadmin-only are not tenant-scoped.
42
+ *
43
+ * The version of the OpenAPI document: v1
44
+ *
45
+ *
46
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
47
+ * https://openapi-generator.tech
48
+ * Do not edit the class manually.
49
+ *
50
+ */
51
+ /**
52
+ * Executions service.
53
+ * @module api/ExecutionsApi
54
+ * @version v0.24.0
55
+ */
56
+ var ExecutionsApi = exports["default"] = /*#__PURE__*/function () {
57
+ /**
58
+ * Constructs a new ExecutionsApi.
59
+ * @alias module:api/ExecutionsApi
60
+ * @class
61
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
62
+ * default to {@link module:ApiClient#instance} if unspecified.
63
+ */
64
+ function ExecutionsApi(apiClient) {
65
+ _classCallCheck(this, ExecutionsApi);
66
+ this.apiClient = apiClient || _ApiClient["default"].instance;
67
+ }
68
+
69
+ /**
70
+ * Callback function to receive the result of the createExecution operation.
71
+ * @callback module:api/ExecutionsApi~createExecutionCallback
72
+ * @param {String} error Error message, if any.
73
+ * @param {Array.<module:model/ExecutionControllerExecutionResponse>} data The data returned by the service call.
74
+ * @param {String} response The complete HTTP response.
75
+ */
76
+
77
+ /**
78
+ * Create a new execution for a flow
79
+ * @param {String} namespace The flow namespace
80
+ * @param {String} id The flow id
81
+ * @param {Boolean} wait If the server will wait the end of the execution
82
+ * @param {String} tenant
83
+ * @param {Object} opts Optional parameters
84
+ * @param {Array.<String>} [labels] The labels as a list of 'key:value'
85
+ * @param {Number} [revision] The flow revision or latest if null
86
+ * @param {Date} [scheduleDate] Schedule the flow on a specific date
87
+ * @param {String} [breakpoints] Set a list of breakpoints at specific tasks 'id.value', separated by a coma.
88
+ * @param {module:model/ExecutionKind} [kind] Specific execution kind
89
+ * @param {module:api/ExecutionsApi~createExecutionCallback} callback The callback function, accepting three arguments: error, data, response
90
+ * data is of type: {@link Array.<module:model/ExecutionControllerExecutionResponse>}
91
+ */
92
+ return _createClass(ExecutionsApi, [{
93
+ key: "createExecution",
94
+ value: function createExecution(namespace, id, wait, tenant, opts, callback) {
95
+ opts = opts || {};
96
+ var postBody = null;
97
+ // verify the required parameter 'namespace' is set
98
+ if (namespace === undefined || namespace === null) {
99
+ throw new Error("Missing the required parameter 'namespace' when calling createExecution");
100
+ }
101
+ // verify the required parameter 'id' is set
102
+ if (id === undefined || id === null) {
103
+ throw new Error("Missing the required parameter 'id' when calling createExecution");
104
+ }
105
+ // verify the required parameter 'wait' is set
106
+ if (wait === undefined || wait === null) {
107
+ throw new Error("Missing the required parameter 'wait' when calling createExecution");
108
+ }
109
+ // verify the required parameter 'tenant' is set
110
+ if (tenant === undefined || tenant === null) {
111
+ throw new Error("Missing the required parameter 'tenant' when calling createExecution");
112
+ }
113
+ var pathParams = {
114
+ 'namespace': namespace,
115
+ 'id': id,
116
+ 'tenant': tenant
117
+ };
118
+ var queryParams = {
119
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
120
+ 'wait': wait,
121
+ 'revision': opts['revision'],
122
+ 'scheduleDate': opts['scheduleDate'],
123
+ 'breakpoints': opts['breakpoints'],
124
+ 'kind': opts['kind']
125
+ };
126
+ var headerParams = {};
127
+ var formParams = {};
128
+ var authNames = ['basicAuth', 'bearerAuth'];
129
+ var contentTypes = ['multipart/form-data'];
130
+ var accepts = ['application/json'];
131
+ var returnType = [_ExecutionControllerExecutionResponse["default"]];
132
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{namespace}/{id}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
133
+ }
134
+
135
+ /**
136
+ * Callback function to receive the result of the deleteExecution operation.
137
+ * @callback module:api/ExecutionsApi~deleteExecutionCallback
138
+ * @param {String} error Error message, if any.
139
+ * @param data This operation does not return a value.
140
+ * @param {String} response The complete HTTP response.
141
+ */
142
+
143
+ /**
144
+ * Delete an execution
145
+ * @param {String} executionId The execution id
146
+ * @param {Boolean} deleteLogs Whether to delete execution logs
147
+ * @param {Boolean} deleteMetrics Whether to delete execution metrics
148
+ * @param {Boolean} deleteStorage Whether to delete execution files in the internal storage
149
+ * @param {String} tenant
150
+ * @param {module:api/ExecutionsApi~deleteExecutionCallback} callback The callback function, accepting three arguments: error, data, response
151
+ */
152
+ }, {
153
+ key: "deleteExecution",
154
+ value: function deleteExecution(executionId, deleteLogs, deleteMetrics, deleteStorage, tenant, callback) {
155
+ var postBody = null;
156
+ // verify the required parameter 'executionId' is set
157
+ if (executionId === undefined || executionId === null) {
158
+ throw new Error("Missing the required parameter 'executionId' when calling deleteExecution");
159
+ }
160
+ // verify the required parameter 'deleteLogs' is set
161
+ if (deleteLogs === undefined || deleteLogs === null) {
162
+ throw new Error("Missing the required parameter 'deleteLogs' when calling deleteExecution");
163
+ }
164
+ // verify the required parameter 'deleteMetrics' is set
165
+ if (deleteMetrics === undefined || deleteMetrics === null) {
166
+ throw new Error("Missing the required parameter 'deleteMetrics' when calling deleteExecution");
167
+ }
168
+ // verify the required parameter 'deleteStorage' is set
169
+ if (deleteStorage === undefined || deleteStorage === null) {
170
+ throw new Error("Missing the required parameter 'deleteStorage' when calling deleteExecution");
171
+ }
172
+ // verify the required parameter 'tenant' is set
173
+ if (tenant === undefined || tenant === null) {
174
+ throw new Error("Missing the required parameter 'tenant' when calling deleteExecution");
175
+ }
176
+ var pathParams = {
177
+ 'executionId': executionId,
178
+ 'tenant': tenant
179
+ };
180
+ var queryParams = {
181
+ 'deleteLogs': deleteLogs,
182
+ 'deleteMetrics': deleteMetrics,
183
+ 'deleteStorage': deleteStorage
184
+ };
185
+ var headerParams = {};
186
+ var formParams = {};
187
+ var authNames = ['basicAuth', 'bearerAuth'];
188
+ var contentTypes = [];
189
+ var accepts = [];
190
+ var returnType = null;
191
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
192
+ }
193
+
194
+ /**
195
+ * Callback function to receive the result of the deleteExecutionsByIds operation.
196
+ * @callback module:api/ExecutionsApi~deleteExecutionsByIdsCallback
197
+ * @param {String} error Error message, if any.
198
+ * @param {module:model/BulkResponse} data The data returned by the service call.
199
+ * @param {String} response The complete HTTP response.
200
+ */
201
+
202
+ /**
203
+ * Delete a list of executions
204
+ * @param {Boolean} deleteLogs Whether to delete execution logs
205
+ * @param {Boolean} deleteMetrics Whether to delete execution metrics
206
+ * @param {Boolean} deleteStorage Whether to delete execution files in the internal storage
207
+ * @param {String} tenant
208
+ * @param {Array.<String>} requestBody The execution id
209
+ * @param {Object} opts Optional parameters
210
+ * @param {Boolean} [includeNonTerminated = false)] Whether to delete non-terminated executions
211
+ * @param {module:api/ExecutionsApi~deleteExecutionsByIdsCallback} callback The callback function, accepting three arguments: error, data, response
212
+ * data is of type: {@link module:model/BulkResponse}
213
+ */
214
+ }, {
215
+ key: "deleteExecutionsByIds",
216
+ value: function deleteExecutionsByIds(deleteLogs, deleteMetrics, deleteStorage, tenant, requestBody, opts, callback) {
217
+ opts = opts || {};
218
+ var postBody = requestBody;
219
+ // verify the required parameter 'deleteLogs' is set
220
+ if (deleteLogs === undefined || deleteLogs === null) {
221
+ throw new Error("Missing the required parameter 'deleteLogs' when calling deleteExecutionsByIds");
222
+ }
223
+ // verify the required parameter 'deleteMetrics' is set
224
+ if (deleteMetrics === undefined || deleteMetrics === null) {
225
+ throw new Error("Missing the required parameter 'deleteMetrics' when calling deleteExecutionsByIds");
226
+ }
227
+ // verify the required parameter 'deleteStorage' is set
228
+ if (deleteStorage === undefined || deleteStorage === null) {
229
+ throw new Error("Missing the required parameter 'deleteStorage' when calling deleteExecutionsByIds");
230
+ }
231
+ // verify the required parameter 'tenant' is set
232
+ if (tenant === undefined || tenant === null) {
233
+ throw new Error("Missing the required parameter 'tenant' when calling deleteExecutionsByIds");
234
+ }
235
+ // verify the required parameter 'requestBody' is set
236
+ if (requestBody === undefined || requestBody === null) {
237
+ throw new Error("Missing the required parameter 'requestBody' when calling deleteExecutionsByIds");
238
+ }
239
+ var pathParams = {
240
+ 'tenant': tenant
241
+ };
242
+ var queryParams = {
243
+ 'includeNonTerminated': opts['includeNonTerminated'],
244
+ 'deleteLogs': deleteLogs,
245
+ 'deleteMetrics': deleteMetrics,
246
+ 'deleteStorage': deleteStorage
247
+ };
248
+ var headerParams = {};
249
+ var formParams = {};
250
+ var authNames = ['basicAuth', 'bearerAuth'];
251
+ var contentTypes = ['application/json'];
252
+ var accepts = ['application/json'];
253
+ var returnType = _BulkResponse["default"];
254
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/by-ids', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
255
+ }
256
+
257
+ /**
258
+ * Callback function to receive the result of the deleteExecutionsByQuery operation.
259
+ * @callback module:api/ExecutionsApi~deleteExecutionsByQueryCallback
260
+ * @param {String} error Error message, if any.
261
+ * @param {Object} data The data returned by the service call.
262
+ * @param {String} response The complete HTTP response.
263
+ */
264
+
265
+ /**
266
+ * Delete executions filter by query parameters
267
+ * @param {Boolean} deleteLogs Whether to delete execution logs
268
+ * @param {Boolean} deleteMetrics Whether to delete execution metrics
269
+ * @param {Boolean} deleteStorage Whether to delete execution files in the internal storage
270
+ * @param {String} tenant
271
+ * @param {module:model/DeleteExecutionsByQueryRequest} deleteExecutionsByQueryRequest
272
+ * @param {Object} opts Optional parameters
273
+ * @param {String} [q] A string filter
274
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
275
+ * @param {String} [namespace] A namespace filter prefix
276
+ * @param {String} [flowId] A flow id filter
277
+ * @param {Date} [startDate] The start datetime
278
+ * @param {Date} [endDate] The end datetime
279
+ * @param {String} [timeRange] A time range filter relative to the current time
280
+ * @param {Array.<module:model/StateType>} [state] A state filter
281
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
282
+ * @param {String} [triggerExecutionId] The trigger execution id
283
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
284
+ * @param {Boolean} [includeNonTerminated = false)] Whether to delete non-terminated executions
285
+ * @param {module:api/ExecutionsApi~deleteExecutionsByQueryCallback} callback The callback function, accepting three arguments: error, data, response
286
+ * data is of type: {@link Object}
287
+ */
288
+ }, {
289
+ key: "deleteExecutionsByQuery",
290
+ value: function deleteExecutionsByQuery(deleteLogs, deleteMetrics, deleteStorage, tenant, deleteExecutionsByQueryRequest, opts, callback) {
291
+ opts = opts || {};
292
+ var postBody = deleteExecutionsByQueryRequest;
293
+ // verify the required parameter 'deleteLogs' is set
294
+ if (deleteLogs === undefined || deleteLogs === null) {
295
+ throw new Error("Missing the required parameter 'deleteLogs' when calling deleteExecutionsByQuery");
296
+ }
297
+ // verify the required parameter 'deleteMetrics' is set
298
+ if (deleteMetrics === undefined || deleteMetrics === null) {
299
+ throw new Error("Missing the required parameter 'deleteMetrics' when calling deleteExecutionsByQuery");
300
+ }
301
+ // verify the required parameter 'deleteStorage' is set
302
+ if (deleteStorage === undefined || deleteStorage === null) {
303
+ throw new Error("Missing the required parameter 'deleteStorage' when calling deleteExecutionsByQuery");
304
+ }
305
+ // verify the required parameter 'tenant' is set
306
+ if (tenant === undefined || tenant === null) {
307
+ throw new Error("Missing the required parameter 'tenant' when calling deleteExecutionsByQuery");
308
+ }
309
+ // verify the required parameter 'deleteExecutionsByQueryRequest' is set
310
+ if (deleteExecutionsByQueryRequest === undefined || deleteExecutionsByQueryRequest === null) {
311
+ throw new Error("Missing the required parameter 'deleteExecutionsByQueryRequest' when calling deleteExecutionsByQuery");
312
+ }
313
+ var pathParams = {
314
+ 'tenant': tenant
315
+ };
316
+ var queryParams = {
317
+ 'q': opts['q'],
318
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
319
+ 'namespace': opts['namespace'],
320
+ 'flowId': opts['flowId'],
321
+ 'startDate': opts['startDate'],
322
+ 'endDate': opts['endDate'],
323
+ 'timeRange': opts['timeRange'],
324
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
325
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
326
+ 'triggerExecutionId': opts['triggerExecutionId'],
327
+ 'childFilter': opts['childFilter'],
328
+ 'includeNonTerminated': opts['includeNonTerminated'],
329
+ 'deleteLogs': deleteLogs,
330
+ 'deleteMetrics': deleteMetrics,
331
+ 'deleteStorage': deleteStorage
332
+ };
333
+ var headerParams = {};
334
+ var formParams = {};
335
+ var authNames = ['basicAuth', 'bearerAuth'];
336
+ var contentTypes = ['application/json'];
337
+ var accepts = ['application/json'];
338
+ var returnType = Object;
339
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/by-query', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
340
+ }
341
+
342
+ /**
343
+ * Callback function to receive the result of the downloadFileFromExecution operation.
344
+ * @callback module:api/ExecutionsApi~downloadFileFromExecutionCallback
345
+ * @param {String} error Error message, if any.
346
+ * @param {File} data The data returned by the service call.
347
+ * @param {String} response The complete HTTP response.
348
+ */
349
+
350
+ /**
351
+ * Download file for an execution
352
+ * @param {String} executionId The execution id
353
+ * @param {String} path The internal storage uri
354
+ * @param {String} tenant
355
+ * @param {module:api/ExecutionsApi~downloadFileFromExecutionCallback} callback The callback function, accepting three arguments: error, data, response
356
+ * data is of type: {@link File}
357
+ */
358
+ }, {
359
+ key: "downloadFileFromExecution",
360
+ value: function downloadFileFromExecution(executionId, path, tenant, callback) {
361
+ var postBody = null;
362
+ // verify the required parameter 'executionId' is set
363
+ if (executionId === undefined || executionId === null) {
364
+ throw new Error("Missing the required parameter 'executionId' when calling downloadFileFromExecution");
365
+ }
366
+ // verify the required parameter 'path' is set
367
+ if (path === undefined || path === null) {
368
+ throw new Error("Missing the required parameter 'path' when calling downloadFileFromExecution");
369
+ }
370
+ // verify the required parameter 'tenant' is set
371
+ if (tenant === undefined || tenant === null) {
372
+ throw new Error("Missing the required parameter 'tenant' when calling downloadFileFromExecution");
373
+ }
374
+ var pathParams = {
375
+ 'executionId': executionId,
376
+ 'tenant': tenant
377
+ };
378
+ var queryParams = {
379
+ 'path': path
380
+ };
381
+ var headerParams = {};
382
+ var formParams = {};
383
+ var authNames = ['basicAuth', 'bearerAuth'];
384
+ var contentTypes = [];
385
+ var accepts = ['application/octet-stream'];
386
+ var returnType = File;
387
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/file', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
388
+ }
389
+
390
+ /**
391
+ * Callback function to receive the result of the evalTaskRunExpression operation.
392
+ * @callback module:api/ExecutionsApi~evalTaskRunExpressionCallback
393
+ * @param {String} error Error message, if any.
394
+ * @param {module:model/ExecutionControllerEvalResult} data The data returned by the service call.
395
+ * @param {String} response The complete HTTP response.
396
+ */
397
+
398
+ /**
399
+ * Evaluate a variable expression for this taskrun
400
+ * @param {String} executionId The execution id
401
+ * @param {String} taskRunId The taskrun id
402
+ * @param {String} tenant
403
+ * @param {String} body The Pebble expression that should be evaluated
404
+ * @param {module:api/ExecutionsApi~evalTaskRunExpressionCallback} callback The callback function, accepting three arguments: error, data, response
405
+ * data is of type: {@link module:model/ExecutionControllerEvalResult}
406
+ */
407
+ }, {
408
+ key: "evalTaskRunExpression",
409
+ value: function evalTaskRunExpression(executionId, taskRunId, tenant, body, callback) {
410
+ var postBody = body;
411
+ // verify the required parameter 'executionId' is set
412
+ if (executionId === undefined || executionId === null) {
413
+ throw new Error("Missing the required parameter 'executionId' when calling evalTaskRunExpression");
414
+ }
415
+ // verify the required parameter 'taskRunId' is set
416
+ if (taskRunId === undefined || taskRunId === null) {
417
+ throw new Error("Missing the required parameter 'taskRunId' when calling evalTaskRunExpression");
418
+ }
419
+ // verify the required parameter 'tenant' is set
420
+ if (tenant === undefined || tenant === null) {
421
+ throw new Error("Missing the required parameter 'tenant' when calling evalTaskRunExpression");
422
+ }
423
+ // verify the required parameter 'body' is set
424
+ if (body === undefined || body === null) {
425
+ throw new Error("Missing the required parameter 'body' when calling evalTaskRunExpression");
426
+ }
427
+ var pathParams = {
428
+ 'executionId': executionId,
429
+ 'taskRunId': taskRunId,
430
+ 'tenant': tenant
431
+ };
432
+ var queryParams = {};
433
+ var headerParams = {};
434
+ var formParams = {};
435
+ var authNames = ['basicAuth', 'bearerAuth'];
436
+ var contentTypes = ['text/plain'];
437
+ var accepts = ['application/json'];
438
+ var returnType = _ExecutionControllerEvalResult["default"];
439
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/eval/{taskRunId}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
440
+ }
441
+
442
+ /**
443
+ * Callback function to receive the result of the followDependenciesExecutions operation.
444
+ * @callback module:api/ExecutionsApi~followDependenciesExecutionsCallback
445
+ * @param {String} error Error message, if any.
446
+ * @param {module:model/EventExecutionStatusEvent} data The data returned by the service call.
447
+ * @param {String} response The complete HTTP response.
448
+ */
449
+
450
+ /**
451
+ * Follow all execution dependencies executions
452
+ * @param {String} executionId The execution id
453
+ * @param {Boolean} destinationOnly If true, list only destination dependencies, otherwise list also source dependencies
454
+ * @param {Boolean} expandAll If true, expand all dependencies recursively
455
+ * @param {String} tenant
456
+ * @param {module:api/ExecutionsApi~followDependenciesExecutionsCallback} callback The callback function, accepting three arguments: error, data, response
457
+ * data is of type: {@link module:model/EventExecutionStatusEvent}
458
+ */
459
+ }, {
460
+ key: "followDependenciesExecutions",
461
+ value: function followDependenciesExecutions(executionId, destinationOnly, expandAll, tenant, callback) {
462
+ var postBody = null;
463
+ // verify the required parameter 'executionId' is set
464
+ if (executionId === undefined || executionId === null) {
465
+ throw new Error("Missing the required parameter 'executionId' when calling followDependenciesExecutions");
466
+ }
467
+ // verify the required parameter 'destinationOnly' is set
468
+ if (destinationOnly === undefined || destinationOnly === null) {
469
+ throw new Error("Missing the required parameter 'destinationOnly' when calling followDependenciesExecutions");
470
+ }
471
+ // verify the required parameter 'expandAll' is set
472
+ if (expandAll === undefined || expandAll === null) {
473
+ throw new Error("Missing the required parameter 'expandAll' when calling followDependenciesExecutions");
474
+ }
475
+ // verify the required parameter 'tenant' is set
476
+ if (tenant === undefined || tenant === null) {
477
+ throw new Error("Missing the required parameter 'tenant' when calling followDependenciesExecutions");
478
+ }
479
+ var pathParams = {
480
+ 'executionId': executionId,
481
+ 'tenant': tenant
482
+ };
483
+ var queryParams = {
484
+ 'destinationOnly': destinationOnly,
485
+ 'expandAll': expandAll
486
+ };
487
+ var headerParams = {};
488
+ var formParams = {};
489
+ var authNames = ['basicAuth', 'bearerAuth'];
490
+ var contentTypes = [];
491
+ var accepts = ['text/event-stream'];
492
+ var returnType = _EventExecutionStatusEvent["default"];
493
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/follow-dependencies', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
494
+ }
495
+
496
+ /**
497
+ * Callback function to receive the result of the followExecution operation.
498
+ * @callback module:api/ExecutionsApi~followExecutionCallback
499
+ * @param {String} error Error message, if any.
500
+ * @param {module:model/EventExecution} data The data returned by the service call.
501
+ * @param {String} response The complete HTTP response.
502
+ */
503
+
504
+ /**
505
+ * Follow an execution
506
+ * @param {String} executionId The execution id
507
+ * @param {String} tenant
508
+ * @param {module:api/ExecutionsApi~followExecutionCallback} callback The callback function, accepting three arguments: error, data, response
509
+ * data is of type: {@link module:model/EventExecution}
510
+ */
511
+ }, {
512
+ key: "followExecution",
513
+ value: function followExecution(executionId, tenant, callback) {
514
+ var postBody = null;
515
+ // verify the required parameter 'executionId' is set
516
+ if (executionId === undefined || executionId === null) {
517
+ throw new Error("Missing the required parameter 'executionId' when calling followExecution");
518
+ }
519
+ // verify the required parameter 'tenant' is set
520
+ if (tenant === undefined || tenant === null) {
521
+ throw new Error("Missing the required parameter 'tenant' when calling followExecution");
522
+ }
523
+ var pathParams = {
524
+ 'executionId': executionId,
525
+ 'tenant': tenant
526
+ };
527
+ var queryParams = {};
528
+ var headerParams = {};
529
+ var formParams = {};
530
+ var authNames = ['basicAuth', 'bearerAuth'];
531
+ var contentTypes = [];
532
+ var accepts = ['text/event-stream'];
533
+ var returnType = _EventExecution["default"];
534
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/follow', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
535
+ }
536
+
537
+ /**
538
+ * Callback function to receive the result of the forceRunByIds operation.
539
+ * @callback module:api/ExecutionsApi~forceRunByIdsCallback
540
+ * @param {String} error Error message, if any.
541
+ * @param {module:model/BulkResponse} data The data returned by the service call.
542
+ * @param {String} response The complete HTTP response.
543
+ */
544
+
545
+ /**
546
+ * Force run a list of executions
547
+ * @param {String} tenant
548
+ * @param {Array.<String>} requestBody The list of executions id
549
+ * @param {module:api/ExecutionsApi~forceRunByIdsCallback} callback The callback function, accepting three arguments: error, data, response
550
+ * data is of type: {@link module:model/BulkResponse}
551
+ */
552
+ }, {
553
+ key: "forceRunByIds",
554
+ value: function forceRunByIds(tenant, requestBody, callback) {
555
+ var postBody = requestBody;
556
+ // verify the required parameter 'tenant' is set
557
+ if (tenant === undefined || tenant === null) {
558
+ throw new Error("Missing the required parameter 'tenant' when calling forceRunByIds");
559
+ }
560
+ // verify the required parameter 'requestBody' is set
561
+ if (requestBody === undefined || requestBody === null) {
562
+ throw new Error("Missing the required parameter 'requestBody' when calling forceRunByIds");
563
+ }
564
+ var pathParams = {
565
+ 'tenant': tenant
566
+ };
567
+ var queryParams = {};
568
+ var headerParams = {};
569
+ var formParams = {};
570
+ var authNames = ['basicAuth', 'bearerAuth'];
571
+ var contentTypes = ['application/json'];
572
+ var accepts = ['application/json'];
573
+ var returnType = _BulkResponse["default"];
574
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/force-run/by-ids', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
575
+ }
576
+
577
+ /**
578
+ * Callback function to receive the result of the forceRunExecution operation.
579
+ * @callback module:api/ExecutionsApi~forceRunExecutionCallback
580
+ * @param {String} error Error message, if any.
581
+ * @param {module:model/Execution} data The data returned by the service call.
582
+ * @param {String} response The complete HTTP response.
583
+ */
584
+
585
+ /**
586
+ * Force run an execution
587
+ * @param {String} executionId The execution id
588
+ * @param {String} tenant
589
+ * @param {module:api/ExecutionsApi~forceRunExecutionCallback} callback The callback function, accepting three arguments: error, data, response
590
+ * data is of type: {@link module:model/Execution}
591
+ */
592
+ }, {
593
+ key: "forceRunExecution",
594
+ value: function forceRunExecution(executionId, tenant, callback) {
595
+ var postBody = null;
596
+ // verify the required parameter 'executionId' is set
597
+ if (executionId === undefined || executionId === null) {
598
+ throw new Error("Missing the required parameter 'executionId' when calling forceRunExecution");
599
+ }
600
+ // verify the required parameter 'tenant' is set
601
+ if (tenant === undefined || tenant === null) {
602
+ throw new Error("Missing the required parameter 'tenant' when calling forceRunExecution");
603
+ }
604
+ var pathParams = {
605
+ 'executionId': executionId,
606
+ 'tenant': tenant
607
+ };
608
+ var queryParams = {};
609
+ var headerParams = {};
610
+ var formParams = {};
611
+ var authNames = ['basicAuth', 'bearerAuth'];
612
+ var contentTypes = [];
613
+ var accepts = ['application/json'];
614
+ var returnType = _Execution["default"];
615
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/force-run', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
616
+ }
617
+
618
+ /**
619
+ * Callback function to receive the result of the forceRunExecutionsByQuery operation.
620
+ * @callback module:api/ExecutionsApi~forceRunExecutionsByQueryCallback
621
+ * @param {String} error Error message, if any.
622
+ * @param {Object} data The data returned by the service call.
623
+ * @param {String} response The complete HTTP response.
624
+ */
625
+
626
+ /**
627
+ * Force run executions filter by query parameters
628
+ * @param {String} tenant
629
+ * @param {module:model/DeleteExecutionsByQueryRequest} deleteExecutionsByQueryRequest
630
+ * @param {Object} opts Optional parameters
631
+ * @param {String} [q] A string filter
632
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
633
+ * @param {String} [namespace] A namespace filter prefix
634
+ * @param {String} [flowId] A flow id filter
635
+ * @param {Date} [startDate] The start datetime
636
+ * @param {Date} [endDate] The end datetime
637
+ * @param {String} [timeRange] A time range filter relative to the current time
638
+ * @param {Array.<module:model/StateType>} [state] A state filter
639
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
640
+ * @param {String} [triggerExecutionId] The trigger execution id
641
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
642
+ * @param {module:api/ExecutionsApi~forceRunExecutionsByQueryCallback} callback The callback function, accepting three arguments: error, data, response
643
+ * data is of type: {@link Object}
644
+ */
645
+ }, {
646
+ key: "forceRunExecutionsByQuery",
647
+ value: function forceRunExecutionsByQuery(tenant, deleteExecutionsByQueryRequest, opts, callback) {
648
+ opts = opts || {};
649
+ var postBody = deleteExecutionsByQueryRequest;
650
+ // verify the required parameter 'tenant' is set
651
+ if (tenant === undefined || tenant === null) {
652
+ throw new Error("Missing the required parameter 'tenant' when calling forceRunExecutionsByQuery");
653
+ }
654
+ // verify the required parameter 'deleteExecutionsByQueryRequest' is set
655
+ if (deleteExecutionsByQueryRequest === undefined || deleteExecutionsByQueryRequest === null) {
656
+ throw new Error("Missing the required parameter 'deleteExecutionsByQueryRequest' when calling forceRunExecutionsByQuery");
657
+ }
658
+ var pathParams = {
659
+ 'tenant': tenant
660
+ };
661
+ var queryParams = {
662
+ 'q': opts['q'],
663
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
664
+ 'namespace': opts['namespace'],
665
+ 'flowId': opts['flowId'],
666
+ 'startDate': opts['startDate'],
667
+ 'endDate': opts['endDate'],
668
+ 'timeRange': opts['timeRange'],
669
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
670
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
671
+ 'triggerExecutionId': opts['triggerExecutionId'],
672
+ 'childFilter': opts['childFilter']
673
+ };
674
+ var headerParams = {};
675
+ var formParams = {};
676
+ var authNames = ['basicAuth', 'bearerAuth'];
677
+ var contentTypes = ['application/json'];
678
+ var accepts = ['application/json'];
679
+ var returnType = Object;
680
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/force-run/by-query', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
681
+ }
682
+
683
+ /**
684
+ * Callback function to receive the result of the getExecution operation.
685
+ * @callback module:api/ExecutionsApi~getExecutionCallback
686
+ * @param {String} error Error message, if any.
687
+ * @param {module:model/Execution} data The data returned by the service call.
688
+ * @param {String} response The complete HTTP response.
689
+ */
690
+
691
+ /**
692
+ * Get an execution
693
+ * @param {String} executionId The execution id
694
+ * @param {String} tenant
695
+ * @param {module:api/ExecutionsApi~getExecutionCallback} callback The callback function, accepting three arguments: error, data, response
696
+ * data is of type: {@link module:model/Execution}
697
+ */
698
+ }, {
699
+ key: "getExecution",
700
+ value: function getExecution(executionId, tenant, callback) {
701
+ var postBody = null;
702
+ // verify the required parameter 'executionId' is set
703
+ if (executionId === undefined || executionId === null) {
704
+ throw new Error("Missing the required parameter 'executionId' when calling getExecution");
705
+ }
706
+ // verify the required parameter 'tenant' is set
707
+ if (tenant === undefined || tenant === null) {
708
+ throw new Error("Missing the required parameter 'tenant' when calling getExecution");
709
+ }
710
+ var pathParams = {
711
+ 'executionId': executionId,
712
+ 'tenant': tenant
713
+ };
714
+ var queryParams = {};
715
+ var headerParams = {};
716
+ var formParams = {};
717
+ var authNames = ['basicAuth', 'bearerAuth'];
718
+ var contentTypes = [];
719
+ var accepts = ['application/json'];
720
+ var returnType = _Execution["default"];
721
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
722
+ }
723
+
724
+ /**
725
+ * Callback function to receive the result of the getExecutionFlowGraph operation.
726
+ * @callback module:api/ExecutionsApi~getExecutionFlowGraphCallback
727
+ * @param {String} error Error message, if any.
728
+ * @param {module:model/FlowGraph} data The data returned by the service call.
729
+ * @param {String} response The complete HTTP response.
730
+ */
731
+
732
+ /**
733
+ * Generate a graph for an execution
734
+ * @param {String} executionId The execution id
735
+ * @param {String} tenant
736
+ * @param {Object} opts Optional parameters
737
+ * @param {Array.<String>} [subflows] The subflow tasks to display
738
+ * @param {module:api/ExecutionsApi~getExecutionFlowGraphCallback} callback The callback function, accepting three arguments: error, data, response
739
+ * data is of type: {@link module:model/FlowGraph}
740
+ */
741
+ }, {
742
+ key: "getExecutionFlowGraph",
743
+ value: function getExecutionFlowGraph(executionId, tenant, opts, callback) {
744
+ opts = opts || {};
745
+ var postBody = null;
746
+ // verify the required parameter 'executionId' is set
747
+ if (executionId === undefined || executionId === null) {
748
+ throw new Error("Missing the required parameter 'executionId' when calling getExecutionFlowGraph");
749
+ }
750
+ // verify the required parameter 'tenant' is set
751
+ if (tenant === undefined || tenant === null) {
752
+ throw new Error("Missing the required parameter 'tenant' when calling getExecutionFlowGraph");
753
+ }
754
+ var pathParams = {
755
+ 'executionId': executionId,
756
+ 'tenant': tenant
757
+ };
758
+ var queryParams = {
759
+ 'subflows': this.apiClient.buildCollectionParam(opts['subflows'], 'csv')
760
+ };
761
+ var headerParams = {};
762
+ var formParams = {};
763
+ var authNames = ['basicAuth', 'bearerAuth'];
764
+ var contentTypes = [];
765
+ var accepts = ['application/json'];
766
+ var returnType = _FlowGraph["default"];
767
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/graph', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
768
+ }
769
+
770
+ /**
771
+ * Callback function to receive the result of the getFileMetadatasFromExecution operation.
772
+ * @callback module:api/ExecutionsApi~getFileMetadatasFromExecutionCallback
773
+ * @param {String} error Error message, if any.
774
+ * @param {module:model/FileMetas} data The data returned by the service call.
775
+ * @param {String} response The complete HTTP response.
776
+ */
777
+
778
+ /**
779
+ * Get file meta information for an execution
780
+ * @param {String} executionId The execution id
781
+ * @param {String} path The internal storage uri
782
+ * @param {String} tenant
783
+ * @param {module:api/ExecutionsApi~getFileMetadatasFromExecutionCallback} callback The callback function, accepting three arguments: error, data, response
784
+ * data is of type: {@link module:model/FileMetas}
785
+ */
786
+ }, {
787
+ key: "getFileMetadatasFromExecution",
788
+ value: function getFileMetadatasFromExecution(executionId, path, tenant, callback) {
789
+ var postBody = null;
790
+ // verify the required parameter 'executionId' is set
791
+ if (executionId === undefined || executionId === null) {
792
+ throw new Error("Missing the required parameter 'executionId' when calling getFileMetadatasFromExecution");
793
+ }
794
+ // verify the required parameter 'path' is set
795
+ if (path === undefined || path === null) {
796
+ throw new Error("Missing the required parameter 'path' when calling getFileMetadatasFromExecution");
797
+ }
798
+ // verify the required parameter 'tenant' is set
799
+ if (tenant === undefined || tenant === null) {
800
+ throw new Error("Missing the required parameter 'tenant' when calling getFileMetadatasFromExecution");
801
+ }
802
+ var pathParams = {
803
+ 'executionId': executionId,
804
+ 'tenant': tenant
805
+ };
806
+ var queryParams = {
807
+ 'path': path
808
+ };
809
+ var headerParams = {};
810
+ var formParams = {};
811
+ var authNames = ['basicAuth', 'bearerAuth'];
812
+ var contentTypes = [];
813
+ var accepts = ['application/json'];
814
+ var returnType = _FileMetas["default"];
815
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/file/metas', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
816
+ }
817
+
818
+ /**
819
+ * Callback function to receive the result of the getFlowFromExecution operation.
820
+ * @callback module:api/ExecutionsApi~getFlowFromExecutionCallback
821
+ * @param {String} error Error message, if any.
822
+ * @param {module:model/FlowForExecution} data The data returned by the service call.
823
+ * @param {String} response The complete HTTP response.
824
+ */
825
+
826
+ /**
827
+ * Get flow information's for an execution
828
+ * @param {String} namespace The namespace of the flow
829
+ * @param {String} flowId The flow id
830
+ * @param {String} tenant
831
+ * @param {Object} opts Optional parameters
832
+ * @param {Number} [revision] The flow revision
833
+ * @param {module:api/ExecutionsApi~getFlowFromExecutionCallback} callback The callback function, accepting three arguments: error, data, response
834
+ * data is of type: {@link module:model/FlowForExecution}
835
+ */
836
+ }, {
837
+ key: "getFlowFromExecution",
838
+ value: function getFlowFromExecution(namespace, flowId, tenant, opts, callback) {
839
+ opts = opts || {};
840
+ var postBody = null;
841
+ // verify the required parameter 'namespace' is set
842
+ if (namespace === undefined || namespace === null) {
843
+ throw new Error("Missing the required parameter 'namespace' when calling getFlowFromExecution");
844
+ }
845
+ // verify the required parameter 'flowId' is set
846
+ if (flowId === undefined || flowId === null) {
847
+ throw new Error("Missing the required parameter 'flowId' when calling getFlowFromExecution");
848
+ }
849
+ // verify the required parameter 'tenant' is set
850
+ if (tenant === undefined || tenant === null) {
851
+ throw new Error("Missing the required parameter 'tenant' when calling getFlowFromExecution");
852
+ }
853
+ var pathParams = {
854
+ 'namespace': namespace,
855
+ 'flowId': flowId,
856
+ 'tenant': tenant
857
+ };
858
+ var queryParams = {
859
+ 'revision': opts['revision']
860
+ };
861
+ var headerParams = {};
862
+ var formParams = {};
863
+ var authNames = ['basicAuth', 'bearerAuth'];
864
+ var contentTypes = [];
865
+ var accepts = ['application/json'];
866
+ var returnType = _FlowForExecution["default"];
867
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/flows/{namespace}/{flowId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
868
+ }
869
+
870
+ /**
871
+ * Callback function to receive the result of the getFlowFromExecutionById operation.
872
+ * @callback module:api/ExecutionsApi~getFlowFromExecutionByIdCallback
873
+ * @param {String} error Error message, if any.
874
+ * @param {module:model/FlowForExecution} data The data returned by the service call.
875
+ * @param {String} response The complete HTTP response.
876
+ */
877
+
878
+ /**
879
+ * Get flow information's for an execution
880
+ * @param {String} executionId The execution that you want flow information's
881
+ * @param {String} tenant
882
+ * @param {module:api/ExecutionsApi~getFlowFromExecutionByIdCallback} callback The callback function, accepting three arguments: error, data, response
883
+ * data is of type: {@link module:model/FlowForExecution}
884
+ */
885
+ }, {
886
+ key: "getFlowFromExecutionById",
887
+ value: function getFlowFromExecutionById(executionId, tenant, callback) {
888
+ var postBody = null;
889
+ // verify the required parameter 'executionId' is set
890
+ if (executionId === undefined || executionId === null) {
891
+ throw new Error("Missing the required parameter 'executionId' when calling getFlowFromExecutionById");
892
+ }
893
+ // verify the required parameter 'tenant' is set
894
+ if (tenant === undefined || tenant === null) {
895
+ throw new Error("Missing the required parameter 'tenant' when calling getFlowFromExecutionById");
896
+ }
897
+ var pathParams = {
898
+ 'executionId': executionId,
899
+ 'tenant': tenant
900
+ };
901
+ var queryParams = {};
902
+ var headerParams = {};
903
+ var formParams = {};
904
+ var authNames = ['basicAuth', 'bearerAuth'];
905
+ var contentTypes = [];
906
+ var accepts = ['application/json'];
907
+ var returnType = _FlowForExecution["default"];
908
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/flow', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
909
+ }
910
+
911
+ /**
912
+ * Callback function to receive the result of the getLatestExecutions operation.
913
+ * @callback module:api/ExecutionsApi~getLatestExecutionsCallback
914
+ * @param {String} error Error message, if any.
915
+ * @param {Array.<module:model/ExecutionControllerLastExecutionResponse>} data The data returned by the service call.
916
+ * @param {String} response The complete HTTP response.
917
+ */
918
+
919
+ /**
920
+ * Get the latest execution for given flows
921
+ * @param {String} tenant
922
+ * @param {Array.<module:model/ExecutionRepositoryInterfaceFlowFilter>} executionRepositoryInterfaceFlowFilter
923
+ * @param {module:api/ExecutionsApi~getLatestExecutionsCallback} callback The callback function, accepting three arguments: error, data, response
924
+ * data is of type: {@link Array.<module:model/ExecutionControllerLastExecutionResponse>}
925
+ */
926
+ }, {
927
+ key: "getLatestExecutions",
928
+ value: function getLatestExecutions(tenant, executionRepositoryInterfaceFlowFilter, callback) {
929
+ var postBody = executionRepositoryInterfaceFlowFilter;
930
+ // verify the required parameter 'tenant' is set
931
+ if (tenant === undefined || tenant === null) {
932
+ throw new Error("Missing the required parameter 'tenant' when calling getLatestExecutions");
933
+ }
934
+ // verify the required parameter 'executionRepositoryInterfaceFlowFilter' is set
935
+ if (executionRepositoryInterfaceFlowFilter === undefined || executionRepositoryInterfaceFlowFilter === null) {
936
+ throw new Error("Missing the required parameter 'executionRepositoryInterfaceFlowFilter' when calling getLatestExecutions");
937
+ }
938
+ var pathParams = {
939
+ 'tenant': tenant
940
+ };
941
+ var queryParams = {};
942
+ var headerParams = {};
943
+ var formParams = {};
944
+ var authNames = ['basicAuth', 'bearerAuth'];
945
+ var contentTypes = ['application/json'];
946
+ var accepts = ['application/json'];
947
+ var returnType = [_ExecutionControllerLastExecutionResponse["default"]];
948
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/latest', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
949
+ }
950
+
951
+ /**
952
+ * Callback function to receive the result of the killExecution operation.
953
+ * @callback module:api/ExecutionsApi~killExecutionCallback
954
+ * @param {String} error Error message, if any.
955
+ * @param {Object} data The data returned by the service call.
956
+ * @param {String} response The complete HTTP response.
957
+ */
958
+
959
+ /**
960
+ * Kill an execution
961
+ * @param {String} executionId The execution id
962
+ * @param {Boolean} isOnKillCascade Specifies whether killing the execution also kill all subflow executions.
963
+ * @param {String} tenant
964
+ * @param {module:api/ExecutionsApi~killExecutionCallback} callback The callback function, accepting three arguments: error, data, response
965
+ * data is of type: {@link Object}
966
+ */
967
+ }, {
968
+ key: "killExecution",
969
+ value: function killExecution(executionId, isOnKillCascade, tenant, callback) {
970
+ var postBody = null;
971
+ // verify the required parameter 'executionId' is set
972
+ if (executionId === undefined || executionId === null) {
973
+ throw new Error("Missing the required parameter 'executionId' when calling killExecution");
974
+ }
975
+ // verify the required parameter 'isOnKillCascade' is set
976
+ if (isOnKillCascade === undefined || isOnKillCascade === null) {
977
+ throw new Error("Missing the required parameter 'isOnKillCascade' when calling killExecution");
978
+ }
979
+ // verify the required parameter 'tenant' is set
980
+ if (tenant === undefined || tenant === null) {
981
+ throw new Error("Missing the required parameter 'tenant' when calling killExecution");
982
+ }
983
+ var pathParams = {
984
+ 'executionId': executionId,
985
+ 'tenant': tenant
986
+ };
987
+ var queryParams = {
988
+ 'isOnKillCascade': isOnKillCascade
989
+ };
990
+ var headerParams = {};
991
+ var formParams = {};
992
+ var authNames = ['basicAuth', 'bearerAuth'];
993
+ var contentTypes = [];
994
+ var accepts = ['text/json'];
995
+ var returnType = Object;
996
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/kill', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
997
+ }
998
+
999
+ /**
1000
+ * Callback function to receive the result of the killExecutionsByIds operation.
1001
+ * @callback module:api/ExecutionsApi~killExecutionsByIdsCallback
1002
+ * @param {String} error Error message, if any.
1003
+ * @param {module:model/BulkResponse} data The data returned by the service call.
1004
+ * @param {String} response The complete HTTP response.
1005
+ */
1006
+
1007
+ /**
1008
+ * Kill a list of executions
1009
+ * @param {String} tenant
1010
+ * @param {Array.<String>} requestBody The list of executions id
1011
+ * @param {module:api/ExecutionsApi~killExecutionsByIdsCallback} callback The callback function, accepting three arguments: error, data, response
1012
+ * data is of type: {@link module:model/BulkResponse}
1013
+ */
1014
+ }, {
1015
+ key: "killExecutionsByIds",
1016
+ value: function killExecutionsByIds(tenant, requestBody, callback) {
1017
+ var postBody = requestBody;
1018
+ // verify the required parameter 'tenant' is set
1019
+ if (tenant === undefined || tenant === null) {
1020
+ throw new Error("Missing the required parameter 'tenant' when calling killExecutionsByIds");
1021
+ }
1022
+ // verify the required parameter 'requestBody' is set
1023
+ if (requestBody === undefined || requestBody === null) {
1024
+ throw new Error("Missing the required parameter 'requestBody' when calling killExecutionsByIds");
1025
+ }
1026
+ var pathParams = {
1027
+ 'tenant': tenant
1028
+ };
1029
+ var queryParams = {};
1030
+ var headerParams = {};
1031
+ var formParams = {};
1032
+ var authNames = ['basicAuth', 'bearerAuth'];
1033
+ var contentTypes = ['application/json'];
1034
+ var accepts = ['application/json'];
1035
+ var returnType = _BulkResponse["default"];
1036
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/kill/by-ids', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1037
+ }
1038
+
1039
+ /**
1040
+ * Callback function to receive the result of the killExecutionsByQuery operation.
1041
+ * @callback module:api/ExecutionsApi~killExecutionsByQueryCallback
1042
+ * @param {String} error Error message, if any.
1043
+ * @param {Object} data The data returned by the service call.
1044
+ * @param {String} response The complete HTTP response.
1045
+ */
1046
+
1047
+ /**
1048
+ * Kill executions filter by query parameters
1049
+ * @param {String} tenant
1050
+ * @param {module:model/DeleteExecutionsByQueryRequest} deleteExecutionsByQueryRequest
1051
+ * @param {Object} opts Optional parameters
1052
+ * @param {String} [q] A string filter
1053
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
1054
+ * @param {String} [namespace] A namespace filter prefix
1055
+ * @param {String} [flowId] A flow id filter
1056
+ * @param {Date} [startDate] The start datetime
1057
+ * @param {Date} [endDate] The end datetime
1058
+ * @param {String} [timeRange] A time range filter relative to the current time
1059
+ * @param {Array.<module:model/StateType>} [state] A state filter
1060
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
1061
+ * @param {String} [triggerExecutionId] The trigger execution id
1062
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
1063
+ * @param {module:api/ExecutionsApi~killExecutionsByQueryCallback} callback The callback function, accepting three arguments: error, data, response
1064
+ * data is of type: {@link Object}
1065
+ */
1066
+ }, {
1067
+ key: "killExecutionsByQuery",
1068
+ value: function killExecutionsByQuery(tenant, deleteExecutionsByQueryRequest, opts, callback) {
1069
+ opts = opts || {};
1070
+ var postBody = deleteExecutionsByQueryRequest;
1071
+ // verify the required parameter 'tenant' is set
1072
+ if (tenant === undefined || tenant === null) {
1073
+ throw new Error("Missing the required parameter 'tenant' when calling killExecutionsByQuery");
1074
+ }
1075
+ // verify the required parameter 'deleteExecutionsByQueryRequest' is set
1076
+ if (deleteExecutionsByQueryRequest === undefined || deleteExecutionsByQueryRequest === null) {
1077
+ throw new Error("Missing the required parameter 'deleteExecutionsByQueryRequest' when calling killExecutionsByQuery");
1078
+ }
1079
+ var pathParams = {
1080
+ 'tenant': tenant
1081
+ };
1082
+ var queryParams = {
1083
+ 'q': opts['q'],
1084
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
1085
+ 'namespace': opts['namespace'],
1086
+ 'flowId': opts['flowId'],
1087
+ 'startDate': opts['startDate'],
1088
+ 'endDate': opts['endDate'],
1089
+ 'timeRange': opts['timeRange'],
1090
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
1091
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
1092
+ 'triggerExecutionId': opts['triggerExecutionId'],
1093
+ 'childFilter': opts['childFilter']
1094
+ };
1095
+ var headerParams = {};
1096
+ var formParams = {};
1097
+ var authNames = ['basicAuth', 'bearerAuth'];
1098
+ var contentTypes = ['application/json'];
1099
+ var accepts = ['application/json'];
1100
+ var returnType = Object;
1101
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/kill/by-query', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1102
+ }
1103
+
1104
+ /**
1105
+ * Callback function to receive the result of the listExecutableDistinctNamespaces operation.
1106
+ * @callback module:api/ExecutionsApi~listExecutableDistinctNamespacesCallback
1107
+ * @param {String} error Error message, if any.
1108
+ * @param {Array.<String>} data The data returned by the service call.
1109
+ * @param {String} response The complete HTTP response.
1110
+ */
1111
+
1112
+ /**
1113
+ * Get all namespaces that have executable flows
1114
+ * @param {String} tenant
1115
+ * @param {module:api/ExecutionsApi~listExecutableDistinctNamespacesCallback} callback The callback function, accepting three arguments: error, data, response
1116
+ * data is of type: {@link Array.<String>}
1117
+ */
1118
+ }, {
1119
+ key: "listExecutableDistinctNamespaces",
1120
+ value: function listExecutableDistinctNamespaces(tenant, callback) {
1121
+ var postBody = null;
1122
+ // verify the required parameter 'tenant' is set
1123
+ if (tenant === undefined || tenant === null) {
1124
+ throw new Error("Missing the required parameter 'tenant' when calling listExecutableDistinctNamespaces");
1125
+ }
1126
+ var pathParams = {
1127
+ 'tenant': tenant
1128
+ };
1129
+ var queryParams = {};
1130
+ var headerParams = {};
1131
+ var formParams = {};
1132
+ var authNames = ['basicAuth', 'bearerAuth'];
1133
+ var contentTypes = [];
1134
+ var accepts = ['application/json'];
1135
+ var returnType = ['String'];
1136
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/namespaces', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1137
+ }
1138
+
1139
+ /**
1140
+ * Callback function to receive the result of the listFlowExecutionsByNamespace operation.
1141
+ * @callback module:api/ExecutionsApi~listFlowExecutionsByNamespaceCallback
1142
+ * @param {String} error Error message, if any.
1143
+ * @param {Array.<module:model/FlowForExecution>} data The data returned by the service call.
1144
+ * @param {String} response The complete HTTP response.
1145
+ */
1146
+
1147
+ /**
1148
+ * Get all flow ids for a namespace. Data returned are FlowForExecution containing minimal information about a Flow for when you are allowed to executing but not reading.
1149
+ * @param {String} namespace The namespace
1150
+ * @param {String} tenant
1151
+ * @param {module:api/ExecutionsApi~listFlowExecutionsByNamespaceCallback} callback The callback function, accepting three arguments: error, data, response
1152
+ * data is of type: {@link Array.<module:model/FlowForExecution>}
1153
+ */
1154
+ }, {
1155
+ key: "listFlowExecutionsByNamespace",
1156
+ value: function listFlowExecutionsByNamespace(namespace, tenant, callback) {
1157
+ var postBody = null;
1158
+ // verify the required parameter 'namespace' is set
1159
+ if (namespace === undefined || namespace === null) {
1160
+ throw new Error("Missing the required parameter 'namespace' when calling listFlowExecutionsByNamespace");
1161
+ }
1162
+ // verify the required parameter 'tenant' is set
1163
+ if (tenant === undefined || tenant === null) {
1164
+ throw new Error("Missing the required parameter 'tenant' when calling listFlowExecutionsByNamespace");
1165
+ }
1166
+ var pathParams = {
1167
+ 'namespace': namespace,
1168
+ 'tenant': tenant
1169
+ };
1170
+ var queryParams = {};
1171
+ var headerParams = {};
1172
+ var formParams = {};
1173
+ var authNames = ['basicAuth', 'bearerAuth'];
1174
+ var contentTypes = [];
1175
+ var accepts = ['application/json'];
1176
+ var returnType = [_FlowForExecution["default"]];
1177
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/namespaces/{namespace}/flows', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1178
+ }
1179
+
1180
+ /**
1181
+ * Callback function to receive the result of the pauseExecution operation.
1182
+ * @callback module:api/ExecutionsApi~pauseExecutionCallback
1183
+ * @param {String} error Error message, if any.
1184
+ * @param data This operation does not return a value.
1185
+ * @param {String} response The complete HTTP response.
1186
+ */
1187
+
1188
+ /**
1189
+ * Pause a running execution.
1190
+ * @param {String} executionId The execution id
1191
+ * @param {String} tenant
1192
+ * @param {module:api/ExecutionsApi~pauseExecutionCallback} callback The callback function, accepting three arguments: error, data, response
1193
+ */
1194
+ }, {
1195
+ key: "pauseExecution",
1196
+ value: function pauseExecution(executionId, tenant, callback) {
1197
+ var postBody = null;
1198
+ // verify the required parameter 'executionId' is set
1199
+ if (executionId === undefined || executionId === null) {
1200
+ throw new Error("Missing the required parameter 'executionId' when calling pauseExecution");
1201
+ }
1202
+ // verify the required parameter 'tenant' is set
1203
+ if (tenant === undefined || tenant === null) {
1204
+ throw new Error("Missing the required parameter 'tenant' when calling pauseExecution");
1205
+ }
1206
+ var pathParams = {
1207
+ 'executionId': executionId,
1208
+ 'tenant': tenant
1209
+ };
1210
+ var queryParams = {};
1211
+ var headerParams = {};
1212
+ var formParams = {};
1213
+ var authNames = ['basicAuth', 'bearerAuth'];
1214
+ var contentTypes = [];
1215
+ var accepts = [];
1216
+ var returnType = null;
1217
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/pause', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1218
+ }
1219
+
1220
+ /**
1221
+ * Callback function to receive the result of the pauseExecutionsByIds operation.
1222
+ * @callback module:api/ExecutionsApi~pauseExecutionsByIdsCallback
1223
+ * @param {String} error Error message, if any.
1224
+ * @param {module:model/BulkResponse} data The data returned by the service call.
1225
+ * @param {String} response The complete HTTP response.
1226
+ */
1227
+
1228
+ /**
1229
+ * Pause a list of running executions
1230
+ * @param {String} tenant
1231
+ * @param {Array.<String>} requestBody The list of executions id
1232
+ * @param {module:api/ExecutionsApi~pauseExecutionsByIdsCallback} callback The callback function, accepting three arguments: error, data, response
1233
+ * data is of type: {@link module:model/BulkResponse}
1234
+ */
1235
+ }, {
1236
+ key: "pauseExecutionsByIds",
1237
+ value: function pauseExecutionsByIds(tenant, requestBody, callback) {
1238
+ var postBody = requestBody;
1239
+ // verify the required parameter 'tenant' is set
1240
+ if (tenant === undefined || tenant === null) {
1241
+ throw new Error("Missing the required parameter 'tenant' when calling pauseExecutionsByIds");
1242
+ }
1243
+ // verify the required parameter 'requestBody' is set
1244
+ if (requestBody === undefined || requestBody === null) {
1245
+ throw new Error("Missing the required parameter 'requestBody' when calling pauseExecutionsByIds");
1246
+ }
1247
+ var pathParams = {
1248
+ 'tenant': tenant
1249
+ };
1250
+ var queryParams = {};
1251
+ var headerParams = {};
1252
+ var formParams = {};
1253
+ var authNames = ['basicAuth', 'bearerAuth'];
1254
+ var contentTypes = ['application/json'];
1255
+ var accepts = ['application/json'];
1256
+ var returnType = _BulkResponse["default"];
1257
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/pause/by-ids', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1258
+ }
1259
+
1260
+ /**
1261
+ * Callback function to receive the result of the pauseExecutionsByQuery operation.
1262
+ * @callback module:api/ExecutionsApi~pauseExecutionsByQueryCallback
1263
+ * @param {String} error Error message, if any.
1264
+ * @param {Object} data The data returned by the service call.
1265
+ * @param {String} response The complete HTTP response.
1266
+ */
1267
+
1268
+ /**
1269
+ * Pause executions filter by query parameters
1270
+ * @param {String} tenant
1271
+ * @param {module:model/DeleteExecutionsByQueryRequest} deleteExecutionsByQueryRequest
1272
+ * @param {Object} opts Optional parameters
1273
+ * @param {String} [q] A string filter
1274
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
1275
+ * @param {String} [namespace] A namespace filter prefix
1276
+ * @param {String} [flowId] A flow id filter
1277
+ * @param {Date} [startDate] The start datetime
1278
+ * @param {Date} [endDate] The end datetime
1279
+ * @param {String} [timeRange] A time range filter relative to the current time
1280
+ * @param {Array.<module:model/StateType>} [state] A state filter
1281
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
1282
+ * @param {String} [triggerExecutionId] The trigger execution id
1283
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
1284
+ * @param {module:api/ExecutionsApi~pauseExecutionsByQueryCallback} callback The callback function, accepting three arguments: error, data, response
1285
+ * data is of type: {@link Object}
1286
+ */
1287
+ }, {
1288
+ key: "pauseExecutionsByQuery",
1289
+ value: function pauseExecutionsByQuery(tenant, deleteExecutionsByQueryRequest, opts, callback) {
1290
+ opts = opts || {};
1291
+ var postBody = deleteExecutionsByQueryRequest;
1292
+ // verify the required parameter 'tenant' is set
1293
+ if (tenant === undefined || tenant === null) {
1294
+ throw new Error("Missing the required parameter 'tenant' when calling pauseExecutionsByQuery");
1295
+ }
1296
+ // verify the required parameter 'deleteExecutionsByQueryRequest' is set
1297
+ if (deleteExecutionsByQueryRequest === undefined || deleteExecutionsByQueryRequest === null) {
1298
+ throw new Error("Missing the required parameter 'deleteExecutionsByQueryRequest' when calling pauseExecutionsByQuery");
1299
+ }
1300
+ var pathParams = {
1301
+ 'tenant': tenant
1302
+ };
1303
+ var queryParams = {
1304
+ 'q': opts['q'],
1305
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
1306
+ 'namespace': opts['namespace'],
1307
+ 'flowId': opts['flowId'],
1308
+ 'startDate': opts['startDate'],
1309
+ 'endDate': opts['endDate'],
1310
+ 'timeRange': opts['timeRange'],
1311
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
1312
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
1313
+ 'triggerExecutionId': opts['triggerExecutionId'],
1314
+ 'childFilter': opts['childFilter']
1315
+ };
1316
+ var headerParams = {};
1317
+ var formParams = {};
1318
+ var authNames = ['basicAuth', 'bearerAuth'];
1319
+ var contentTypes = ['application/json'];
1320
+ var accepts = ['application/json'];
1321
+ var returnType = Object;
1322
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/pause/by-query', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1323
+ }
1324
+
1325
+ /**
1326
+ * Callback function to receive the result of the previewFileFromExecution operation.
1327
+ * @callback module:api/ExecutionsApi~previewFileFromExecutionCallback
1328
+ * @param {String} error Error message, if any.
1329
+ * @param {Object} data The data returned by the service call.
1330
+ * @param {String} response The complete HTTP response.
1331
+ */
1332
+
1333
+ /**
1334
+ * Get file preview for an execution
1335
+ * @param {String} executionId The execution id
1336
+ * @param {String} path The internal storage uri
1337
+ * @param {Number} maxRows The max row returns
1338
+ * @param {String} encoding The file encoding as Java charset name. Defaults to UTF-8
1339
+ * @param {String} tenant
1340
+ * @param {module:api/ExecutionsApi~previewFileFromExecutionCallback} callback The callback function, accepting three arguments: error, data, response
1341
+ * data is of type: {@link Object}
1342
+ */
1343
+ }, {
1344
+ key: "previewFileFromExecution",
1345
+ value: function previewFileFromExecution(executionId, path, maxRows, encoding, tenant, callback) {
1346
+ var postBody = null;
1347
+ // verify the required parameter 'executionId' is set
1348
+ if (executionId === undefined || executionId === null) {
1349
+ throw new Error("Missing the required parameter 'executionId' when calling previewFileFromExecution");
1350
+ }
1351
+ // verify the required parameter 'path' is set
1352
+ if (path === undefined || path === null) {
1353
+ throw new Error("Missing the required parameter 'path' when calling previewFileFromExecution");
1354
+ }
1355
+ // verify the required parameter 'maxRows' is set
1356
+ if (maxRows === undefined || maxRows === null) {
1357
+ throw new Error("Missing the required parameter 'maxRows' when calling previewFileFromExecution");
1358
+ }
1359
+ // verify the required parameter 'encoding' is set
1360
+ if (encoding === undefined || encoding === null) {
1361
+ throw new Error("Missing the required parameter 'encoding' when calling previewFileFromExecution");
1362
+ }
1363
+ // verify the required parameter 'tenant' is set
1364
+ if (tenant === undefined || tenant === null) {
1365
+ throw new Error("Missing the required parameter 'tenant' when calling previewFileFromExecution");
1366
+ }
1367
+ var pathParams = {
1368
+ 'executionId': executionId,
1369
+ 'tenant': tenant
1370
+ };
1371
+ var queryParams = {
1372
+ 'path': path,
1373
+ 'maxRows': maxRows,
1374
+ 'encoding': encoding
1375
+ };
1376
+ var headerParams = {};
1377
+ var formParams = {};
1378
+ var authNames = ['basicAuth', 'bearerAuth'];
1379
+ var contentTypes = [];
1380
+ var accepts = ['application/json'];
1381
+ var returnType = Object;
1382
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/file/preview', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1383
+ }
1384
+
1385
+ /**
1386
+ * Callback function to receive the result of the replayExecution operation.
1387
+ * @callback module:api/ExecutionsApi~replayExecutionCallback
1388
+ * @param {String} error Error message, if any.
1389
+ * @param {module:model/Execution} data The data returned by the service call.
1390
+ * @param {String} response The complete HTTP response.
1391
+ */
1392
+
1393
+ /**
1394
+ * Create a new execution from an old one and start it from a specified task run id
1395
+ * @param {String} executionId the original execution id to clone
1396
+ * @param {String} tenant
1397
+ * @param {Object} opts Optional parameters
1398
+ * @param {String} [taskRunId] The taskrun id
1399
+ * @param {Number} [revision] The flow revision to use for new execution
1400
+ * @param {String} [breakpoints] Set a list of breakpoints at specific tasks 'id.value', separated by a coma.
1401
+ * @param {module:api/ExecutionsApi~replayExecutionCallback} callback The callback function, accepting three arguments: error, data, response
1402
+ * data is of type: {@link module:model/Execution}
1403
+ */
1404
+ }, {
1405
+ key: "replayExecution",
1406
+ value: function replayExecution(executionId, tenant, opts, callback) {
1407
+ opts = opts || {};
1408
+ var postBody = null;
1409
+ // verify the required parameter 'executionId' is set
1410
+ if (executionId === undefined || executionId === null) {
1411
+ throw new Error("Missing the required parameter 'executionId' when calling replayExecution");
1412
+ }
1413
+ // verify the required parameter 'tenant' is set
1414
+ if (tenant === undefined || tenant === null) {
1415
+ throw new Error("Missing the required parameter 'tenant' when calling replayExecution");
1416
+ }
1417
+ var pathParams = {
1418
+ 'executionId': executionId,
1419
+ 'tenant': tenant
1420
+ };
1421
+ var queryParams = {
1422
+ 'taskRunId': opts['taskRunId'],
1423
+ 'revision': opts['revision'],
1424
+ 'breakpoints': opts['breakpoints']
1425
+ };
1426
+ var headerParams = {};
1427
+ var formParams = {};
1428
+ var authNames = ['basicAuth', 'bearerAuth'];
1429
+ var contentTypes = [];
1430
+ var accepts = ['application/json'];
1431
+ var returnType = _Execution["default"];
1432
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/replay', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1433
+ }
1434
+
1435
+ /**
1436
+ * Callback function to receive the result of the replayExecutionsByIds operation.
1437
+ * @callback module:api/ExecutionsApi~replayExecutionsByIdsCallback
1438
+ * @param {String} error Error message, if any.
1439
+ * @param {module:model/BulkResponse} data The data returned by the service call.
1440
+ * @param {String} response The complete HTTP response.
1441
+ */
1442
+
1443
+ /**
1444
+ * Create new executions from old ones. Keep the flow revision
1445
+ * @param {String} tenant
1446
+ * @param {Array.<String>} requestBody The list of executions id
1447
+ * @param {Object} opts Optional parameters
1448
+ * @param {Boolean} [latestRevision = false)] If latest revision should be used
1449
+ * @param {module:api/ExecutionsApi~replayExecutionsByIdsCallback} callback The callback function, accepting three arguments: error, data, response
1450
+ * data is of type: {@link module:model/BulkResponse}
1451
+ */
1452
+ }, {
1453
+ key: "replayExecutionsByIds",
1454
+ value: function replayExecutionsByIds(tenant, requestBody, opts, callback) {
1455
+ opts = opts || {};
1456
+ var postBody = requestBody;
1457
+ // verify the required parameter 'tenant' is set
1458
+ if (tenant === undefined || tenant === null) {
1459
+ throw new Error("Missing the required parameter 'tenant' when calling replayExecutionsByIds");
1460
+ }
1461
+ // verify the required parameter 'requestBody' is set
1462
+ if (requestBody === undefined || requestBody === null) {
1463
+ throw new Error("Missing the required parameter 'requestBody' when calling replayExecutionsByIds");
1464
+ }
1465
+ var pathParams = {
1466
+ 'tenant': tenant
1467
+ };
1468
+ var queryParams = {
1469
+ 'latestRevision': opts['latestRevision']
1470
+ };
1471
+ var headerParams = {};
1472
+ var formParams = {};
1473
+ var authNames = ['basicAuth', 'bearerAuth'];
1474
+ var contentTypes = ['application/json'];
1475
+ var accepts = ['application/json'];
1476
+ var returnType = _BulkResponse["default"];
1477
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/replay/by-ids', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1478
+ }
1479
+
1480
+ /**
1481
+ * Callback function to receive the result of the replayExecutionsByQuery operation.
1482
+ * @callback module:api/ExecutionsApi~replayExecutionsByQueryCallback
1483
+ * @param {String} error Error message, if any.
1484
+ * @param {Object} data The data returned by the service call.
1485
+ * @param {String} response The complete HTTP response.
1486
+ */
1487
+
1488
+ /**
1489
+ * Create new executions from old ones filter by query parameters. Keep the flow revision
1490
+ * @param {String} tenant
1491
+ * @param {module:model/DeleteExecutionsByQueryRequest} deleteExecutionsByQueryRequest
1492
+ * @param {Object} opts Optional parameters
1493
+ * @param {String} [q] A string filter
1494
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
1495
+ * @param {String} [namespace] A namespace filter prefix
1496
+ * @param {String} [flowId] A flow id filter
1497
+ * @param {Date} [startDate] The start datetime
1498
+ * @param {Date} [endDate] The end datetime
1499
+ * @param {String} [timeRange] A time range filter relative to the current time
1500
+ * @param {Array.<module:model/StateType>} [state] A state filter
1501
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
1502
+ * @param {String} [triggerExecutionId] The trigger execution id
1503
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
1504
+ * @param {Boolean} [latestRevision = false)] If latest revision should be used
1505
+ * @param {module:api/ExecutionsApi~replayExecutionsByQueryCallback} callback The callback function, accepting three arguments: error, data, response
1506
+ * data is of type: {@link Object}
1507
+ */
1508
+ }, {
1509
+ key: "replayExecutionsByQuery",
1510
+ value: function replayExecutionsByQuery(tenant, deleteExecutionsByQueryRequest, opts, callback) {
1511
+ opts = opts || {};
1512
+ var postBody = deleteExecutionsByQueryRequest;
1513
+ // verify the required parameter 'tenant' is set
1514
+ if (tenant === undefined || tenant === null) {
1515
+ throw new Error("Missing the required parameter 'tenant' when calling replayExecutionsByQuery");
1516
+ }
1517
+ // verify the required parameter 'deleteExecutionsByQueryRequest' is set
1518
+ if (deleteExecutionsByQueryRequest === undefined || deleteExecutionsByQueryRequest === null) {
1519
+ throw new Error("Missing the required parameter 'deleteExecutionsByQueryRequest' when calling replayExecutionsByQuery");
1520
+ }
1521
+ var pathParams = {
1522
+ 'tenant': tenant
1523
+ };
1524
+ var queryParams = {
1525
+ 'q': opts['q'],
1526
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
1527
+ 'namespace': opts['namespace'],
1528
+ 'flowId': opts['flowId'],
1529
+ 'startDate': opts['startDate'],
1530
+ 'endDate': opts['endDate'],
1531
+ 'timeRange': opts['timeRange'],
1532
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
1533
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
1534
+ 'triggerExecutionId': opts['triggerExecutionId'],
1535
+ 'childFilter': opts['childFilter'],
1536
+ 'latestRevision': opts['latestRevision']
1537
+ };
1538
+ var headerParams = {};
1539
+ var formParams = {};
1540
+ var authNames = ['basicAuth', 'bearerAuth'];
1541
+ var contentTypes = ['application/json'];
1542
+ var accepts = ['application/json'];
1543
+ var returnType = Object;
1544
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/replay/by-query', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1545
+ }
1546
+
1547
+ /**
1548
+ * Callback function to receive the result of the restartExecution operation.
1549
+ * @callback module:api/ExecutionsApi~restartExecutionCallback
1550
+ * @param {String} error Error message, if any.
1551
+ * @param {module:model/Execution} data The data returned by the service call.
1552
+ * @param {String} response The complete HTTP response.
1553
+ */
1554
+
1555
+ /**
1556
+ * Restart a new execution from an old one
1557
+ * @param {String} executionId The execution id
1558
+ * @param {String} tenant
1559
+ * @param {Object} opts Optional parameters
1560
+ * @param {Number} [revision] The flow revision to use for new execution
1561
+ * @param {module:api/ExecutionsApi~restartExecutionCallback} callback The callback function, accepting three arguments: error, data, response
1562
+ * data is of type: {@link module:model/Execution}
1563
+ */
1564
+ }, {
1565
+ key: "restartExecution",
1566
+ value: function restartExecution(executionId, tenant, opts, callback) {
1567
+ opts = opts || {};
1568
+ var postBody = null;
1569
+ // verify the required parameter 'executionId' is set
1570
+ if (executionId === undefined || executionId === null) {
1571
+ throw new Error("Missing the required parameter 'executionId' when calling restartExecution");
1572
+ }
1573
+ // verify the required parameter 'tenant' is set
1574
+ if (tenant === undefined || tenant === null) {
1575
+ throw new Error("Missing the required parameter 'tenant' when calling restartExecution");
1576
+ }
1577
+ var pathParams = {
1578
+ 'executionId': executionId,
1579
+ 'tenant': tenant
1580
+ };
1581
+ var queryParams = {
1582
+ 'revision': opts['revision']
1583
+ };
1584
+ var headerParams = {};
1585
+ var formParams = {};
1586
+ var authNames = ['basicAuth', 'bearerAuth'];
1587
+ var contentTypes = [];
1588
+ var accepts = ['application/json'];
1589
+ var returnType = _Execution["default"];
1590
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/restart', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1591
+ }
1592
+
1593
+ /**
1594
+ * Callback function to receive the result of the restartExecutionsByIds operation.
1595
+ * @callback module:api/ExecutionsApi~restartExecutionsByIdsCallback
1596
+ * @param {String} error Error message, if any.
1597
+ * @param {module:model/BulkResponse} data The data returned by the service call.
1598
+ * @param {String} response The complete HTTP response.
1599
+ */
1600
+
1601
+ /**
1602
+ * Restart a list of executions
1603
+ * @param {String} tenant
1604
+ * @param {Array.<String>} requestBody The list of executions id
1605
+ * @param {module:api/ExecutionsApi~restartExecutionsByIdsCallback} callback The callback function, accepting three arguments: error, data, response
1606
+ * data is of type: {@link module:model/BulkResponse}
1607
+ */
1608
+ }, {
1609
+ key: "restartExecutionsByIds",
1610
+ value: function restartExecutionsByIds(tenant, requestBody, callback) {
1611
+ var postBody = requestBody;
1612
+ // verify the required parameter 'tenant' is set
1613
+ if (tenant === undefined || tenant === null) {
1614
+ throw new Error("Missing the required parameter 'tenant' when calling restartExecutionsByIds");
1615
+ }
1616
+ // verify the required parameter 'requestBody' is set
1617
+ if (requestBody === undefined || requestBody === null) {
1618
+ throw new Error("Missing the required parameter 'requestBody' when calling restartExecutionsByIds");
1619
+ }
1620
+ var pathParams = {
1621
+ 'tenant': tenant
1622
+ };
1623
+ var queryParams = {};
1624
+ var headerParams = {};
1625
+ var formParams = {};
1626
+ var authNames = ['basicAuth', 'bearerAuth'];
1627
+ var contentTypes = ['application/json'];
1628
+ var accepts = ['application/json'];
1629
+ var returnType = _BulkResponse["default"];
1630
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/restart/by-ids', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1631
+ }
1632
+
1633
+ /**
1634
+ * Callback function to receive the result of the restartExecutionsByQuery operation.
1635
+ * @callback module:api/ExecutionsApi~restartExecutionsByQueryCallback
1636
+ * @param {String} error Error message, if any.
1637
+ * @param {Object} data The data returned by the service call.
1638
+ * @param {String} response The complete HTTP response.
1639
+ */
1640
+
1641
+ /**
1642
+ * Restart executions filter by query parameters
1643
+ * @param {String} tenant
1644
+ * @param {module:model/DeleteExecutionsByQueryRequest} deleteExecutionsByQueryRequest
1645
+ * @param {Object} opts Optional parameters
1646
+ * @param {String} [q] A string filter
1647
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
1648
+ * @param {String} [namespace] A namespace filter prefix
1649
+ * @param {String} [flowId] A flow id filter
1650
+ * @param {Date} [startDate] The start datetime
1651
+ * @param {Date} [endDate] The end datetime
1652
+ * @param {String} [timeRange] A time range filter relative to the current time
1653
+ * @param {Array.<module:model/StateType>} [state] A state filter
1654
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
1655
+ * @param {String} [triggerExecutionId] The trigger execution id
1656
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
1657
+ * @param {module:api/ExecutionsApi~restartExecutionsByQueryCallback} callback The callback function, accepting three arguments: error, data, response
1658
+ * data is of type: {@link Object}
1659
+ */
1660
+ }, {
1661
+ key: "restartExecutionsByQuery",
1662
+ value: function restartExecutionsByQuery(tenant, deleteExecutionsByQueryRequest, opts, callback) {
1663
+ opts = opts || {};
1664
+ var postBody = deleteExecutionsByQueryRequest;
1665
+ // verify the required parameter 'tenant' is set
1666
+ if (tenant === undefined || tenant === null) {
1667
+ throw new Error("Missing the required parameter 'tenant' when calling restartExecutionsByQuery");
1668
+ }
1669
+ // verify the required parameter 'deleteExecutionsByQueryRequest' is set
1670
+ if (deleteExecutionsByQueryRequest === undefined || deleteExecutionsByQueryRequest === null) {
1671
+ throw new Error("Missing the required parameter 'deleteExecutionsByQueryRequest' when calling restartExecutionsByQuery");
1672
+ }
1673
+ var pathParams = {
1674
+ 'tenant': tenant
1675
+ };
1676
+ var queryParams = {
1677
+ 'q': opts['q'],
1678
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
1679
+ 'namespace': opts['namespace'],
1680
+ 'flowId': opts['flowId'],
1681
+ 'startDate': opts['startDate'],
1682
+ 'endDate': opts['endDate'],
1683
+ 'timeRange': opts['timeRange'],
1684
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
1685
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
1686
+ 'triggerExecutionId': opts['triggerExecutionId'],
1687
+ 'childFilter': opts['childFilter']
1688
+ };
1689
+ var headerParams = {};
1690
+ var formParams = {};
1691
+ var authNames = ['basicAuth', 'bearerAuth'];
1692
+ var contentTypes = ['application/json'];
1693
+ var accepts = ['application/json'];
1694
+ var returnType = Object;
1695
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/restart/by-query', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1696
+ }
1697
+
1698
+ /**
1699
+ * Callback function to receive the result of the resumeExecution operation.
1700
+ * @callback module:api/ExecutionsApi~resumeExecutionCallback
1701
+ * @param {String} error Error message, if any.
1702
+ * @param {Object} data The data returned by the service call.
1703
+ * @param {String} response The complete HTTP response.
1704
+ */
1705
+
1706
+ /**
1707
+ * Resume a paused execution.
1708
+ * @param {String} executionId The execution id
1709
+ * @param {String} tenant
1710
+ * @param {module:api/ExecutionsApi~resumeExecutionCallback} callback The callback function, accepting three arguments: error, data, response
1711
+ * data is of type: {@link Object}
1712
+ */
1713
+ }, {
1714
+ key: "resumeExecution",
1715
+ value: function resumeExecution(executionId, tenant, callback) {
1716
+ var postBody = null;
1717
+ // verify the required parameter 'executionId' is set
1718
+ if (executionId === undefined || executionId === null) {
1719
+ throw new Error("Missing the required parameter 'executionId' when calling resumeExecution");
1720
+ }
1721
+ // verify the required parameter 'tenant' is set
1722
+ if (tenant === undefined || tenant === null) {
1723
+ throw new Error("Missing the required parameter 'tenant' when calling resumeExecution");
1724
+ }
1725
+ var pathParams = {
1726
+ 'executionId': executionId,
1727
+ 'tenant': tenant
1728
+ };
1729
+ var queryParams = {};
1730
+ var headerParams = {};
1731
+ var formParams = {};
1732
+ var authNames = ['basicAuth', 'bearerAuth'];
1733
+ var contentTypes = ['multipart/form-data'];
1734
+ var accepts = ['application/json'];
1735
+ var returnType = Object;
1736
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/resume', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1737
+ }
1738
+
1739
+ /**
1740
+ * Callback function to receive the result of the resumeExecutionFromBreakpoint operation.
1741
+ * @callback module:api/ExecutionsApi~resumeExecutionFromBreakpointCallback
1742
+ * @param {String} error Error message, if any.
1743
+ * @param data This operation does not return a value.
1744
+ * @param {String} response The complete HTTP response.
1745
+ */
1746
+
1747
+ /**
1748
+ * Resume an execution from a breakpoint (in the 'BREAKPOINT' state).
1749
+ * @param {String} executionId The execution id
1750
+ * @param {String} tenant
1751
+ * @param {Object} opts Optional parameters
1752
+ * @param {String} [breakpoints] \"Set a list of breakpoints at specific tasks 'id.value', separated by a coma.
1753
+ * @param {module:api/ExecutionsApi~resumeExecutionFromBreakpointCallback} callback The callback function, accepting three arguments: error, data, response
1754
+ */
1755
+ }, {
1756
+ key: "resumeExecutionFromBreakpoint",
1757
+ value: function resumeExecutionFromBreakpoint(executionId, tenant, opts, callback) {
1758
+ opts = opts || {};
1759
+ var postBody = null;
1760
+ // verify the required parameter 'executionId' is set
1761
+ if (executionId === undefined || executionId === null) {
1762
+ throw new Error("Missing the required parameter 'executionId' when calling resumeExecutionFromBreakpoint");
1763
+ }
1764
+ // verify the required parameter 'tenant' is set
1765
+ if (tenant === undefined || tenant === null) {
1766
+ throw new Error("Missing the required parameter 'tenant' when calling resumeExecutionFromBreakpoint");
1767
+ }
1768
+ var pathParams = {
1769
+ 'executionId': executionId,
1770
+ 'tenant': tenant
1771
+ };
1772
+ var queryParams = {
1773
+ 'breakpoints': opts['breakpoints']
1774
+ };
1775
+ var headerParams = {};
1776
+ var formParams = {};
1777
+ var authNames = ['basicAuth', 'bearerAuth'];
1778
+ var contentTypes = [];
1779
+ var accepts = [];
1780
+ var returnType = null;
1781
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/resume-from-breakpoint', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1782
+ }
1783
+
1784
+ /**
1785
+ * Callback function to receive the result of the resumeExecutionsByIds operation.
1786
+ * @callback module:api/ExecutionsApi~resumeExecutionsByIdsCallback
1787
+ * @param {String} error Error message, if any.
1788
+ * @param {module:model/BulkResponse} data The data returned by the service call.
1789
+ * @param {String} response The complete HTTP response.
1790
+ */
1791
+
1792
+ /**
1793
+ * Resume a list of paused executions
1794
+ * @param {String} tenant
1795
+ * @param {Array.<String>} requestBody The list of executions id
1796
+ * @param {module:api/ExecutionsApi~resumeExecutionsByIdsCallback} callback The callback function, accepting three arguments: error, data, response
1797
+ * data is of type: {@link module:model/BulkResponse}
1798
+ */
1799
+ }, {
1800
+ key: "resumeExecutionsByIds",
1801
+ value: function resumeExecutionsByIds(tenant, requestBody, callback) {
1802
+ var postBody = requestBody;
1803
+ // verify the required parameter 'tenant' is set
1804
+ if (tenant === undefined || tenant === null) {
1805
+ throw new Error("Missing the required parameter 'tenant' when calling resumeExecutionsByIds");
1806
+ }
1807
+ // verify the required parameter 'requestBody' is set
1808
+ if (requestBody === undefined || requestBody === null) {
1809
+ throw new Error("Missing the required parameter 'requestBody' when calling resumeExecutionsByIds");
1810
+ }
1811
+ var pathParams = {
1812
+ 'tenant': tenant
1813
+ };
1814
+ var queryParams = {};
1815
+ var headerParams = {};
1816
+ var formParams = {};
1817
+ var authNames = ['basicAuth', 'bearerAuth'];
1818
+ var contentTypes = ['application/json'];
1819
+ var accepts = ['application/json'];
1820
+ var returnType = _BulkResponse["default"];
1821
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/resume/by-ids', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1822
+ }
1823
+
1824
+ /**
1825
+ * Callback function to receive the result of the resumeExecutionsByQuery operation.
1826
+ * @callback module:api/ExecutionsApi~resumeExecutionsByQueryCallback
1827
+ * @param {String} error Error message, if any.
1828
+ * @param {Object} data The data returned by the service call.
1829
+ * @param {String} response The complete HTTP response.
1830
+ */
1831
+
1832
+ /**
1833
+ * Resume executions filter by query parameters
1834
+ * @param {String} tenant
1835
+ * @param {module:model/DeleteExecutionsByQueryRequest} deleteExecutionsByQueryRequest
1836
+ * @param {Object} opts Optional parameters
1837
+ * @param {String} [q] A string filter
1838
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
1839
+ * @param {String} [namespace] A namespace filter prefix
1840
+ * @param {String} [flowId] A flow id filter
1841
+ * @param {Date} [startDate] The start datetime
1842
+ * @param {Date} [endDate] The end datetime
1843
+ * @param {String} [timeRange] A time range filter relative to the current time
1844
+ * @param {Array.<module:model/StateType>} [state] A state filter
1845
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
1846
+ * @param {String} [triggerExecutionId] The trigger execution id
1847
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
1848
+ * @param {module:api/ExecutionsApi~resumeExecutionsByQueryCallback} callback The callback function, accepting three arguments: error, data, response
1849
+ * data is of type: {@link Object}
1850
+ */
1851
+ }, {
1852
+ key: "resumeExecutionsByQuery",
1853
+ value: function resumeExecutionsByQuery(tenant, deleteExecutionsByQueryRequest, opts, callback) {
1854
+ opts = opts || {};
1855
+ var postBody = deleteExecutionsByQueryRequest;
1856
+ // verify the required parameter 'tenant' is set
1857
+ if (tenant === undefined || tenant === null) {
1858
+ throw new Error("Missing the required parameter 'tenant' when calling resumeExecutionsByQuery");
1859
+ }
1860
+ // verify the required parameter 'deleteExecutionsByQueryRequest' is set
1861
+ if (deleteExecutionsByQueryRequest === undefined || deleteExecutionsByQueryRequest === null) {
1862
+ throw new Error("Missing the required parameter 'deleteExecutionsByQueryRequest' when calling resumeExecutionsByQuery");
1863
+ }
1864
+ var pathParams = {
1865
+ 'tenant': tenant
1866
+ };
1867
+ var queryParams = {
1868
+ 'q': opts['q'],
1869
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
1870
+ 'namespace': opts['namespace'],
1871
+ 'flowId': opts['flowId'],
1872
+ 'startDate': opts['startDate'],
1873
+ 'endDate': opts['endDate'],
1874
+ 'timeRange': opts['timeRange'],
1875
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
1876
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
1877
+ 'triggerExecutionId': opts['triggerExecutionId'],
1878
+ 'childFilter': opts['childFilter']
1879
+ };
1880
+ var headerParams = {};
1881
+ var formParams = {};
1882
+ var authNames = ['basicAuth', 'bearerAuth'];
1883
+ var contentTypes = ['application/json'];
1884
+ var accepts = ['application/json'];
1885
+ var returnType = Object;
1886
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/resume/by-query', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1887
+ }
1888
+
1889
+ /**
1890
+ * Callback function to receive the result of the searchExecutions operation.
1891
+ * @callback module:api/ExecutionsApi~searchExecutionsCallback
1892
+ * @param {String} error Error message, if any.
1893
+ * @param {module:model/PagedResultsExecution} data The data returned by the service call.
1894
+ * @param {String} response The complete HTTP response.
1895
+ */
1896
+
1897
+ /**
1898
+ * Search for executions
1899
+ * @param {Number} page The current page
1900
+ * @param {Number} size The current page size
1901
+ * @param {String} tenant
1902
+ * @param {Object} opts Optional parameters
1903
+ * @param {Array.<String>} [sort] The sort of current page
1904
+ * @param {Array.<module:model/QueryFilter>} [filters] Filters
1905
+ * @param {String} [q] A string filter
1906
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
1907
+ * @param {String} [namespace] A namespace filter prefix
1908
+ * @param {String} [flowId] A flow id filter
1909
+ * @param {Date} [startDate] The start datetime
1910
+ * @param {Date} [endDate] The end datetime
1911
+ * @param {String} [timeRange] A time range filter relative to the current time
1912
+ * @param {Array.<module:model/StateType>} [state] A state filter
1913
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
1914
+ * @param {String} [triggerExecutionId] The trigger execution id
1915
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
1916
+ * @param {module:api/ExecutionsApi~searchExecutionsCallback} callback The callback function, accepting three arguments: error, data, response
1917
+ * data is of type: {@link module:model/PagedResultsExecution}
1918
+ */
1919
+ }, {
1920
+ key: "searchExecutions",
1921
+ value: function searchExecutions(page, size, tenant, opts, callback) {
1922
+ opts = opts || {};
1923
+ var postBody = null;
1924
+ // verify the required parameter 'page' is set
1925
+ if (page === undefined || page === null) {
1926
+ throw new Error("Missing the required parameter 'page' when calling searchExecutions");
1927
+ }
1928
+ // verify the required parameter 'size' is set
1929
+ if (size === undefined || size === null) {
1930
+ throw new Error("Missing the required parameter 'size' when calling searchExecutions");
1931
+ }
1932
+ // verify the required parameter 'tenant' is set
1933
+ if (tenant === undefined || tenant === null) {
1934
+ throw new Error("Missing the required parameter 'tenant' when calling searchExecutions");
1935
+ }
1936
+ var pathParams = {
1937
+ 'tenant': tenant
1938
+ };
1939
+ var queryParams = {
1940
+ 'page': page,
1941
+ 'size': size,
1942
+ 'sort': this.apiClient.buildCollectionParam(opts['sort'], 'csv'),
1943
+ 'filters': this.apiClient.buildCollectionParam(opts['filters'], 'csv'),
1944
+ 'q': opts['q'],
1945
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
1946
+ 'namespace': opts['namespace'],
1947
+ 'flowId': opts['flowId'],
1948
+ 'startDate': opts['startDate'],
1949
+ 'endDate': opts['endDate'],
1950
+ 'timeRange': opts['timeRange'],
1951
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
1952
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
1953
+ 'triggerExecutionId': opts['triggerExecutionId'],
1954
+ 'childFilter': opts['childFilter']
1955
+ };
1956
+ var headerParams = {};
1957
+ var formParams = {};
1958
+ var authNames = ['basicAuth', 'bearerAuth'];
1959
+ var contentTypes = [];
1960
+ var accepts = ['application/json'];
1961
+ var returnType = _PagedResultsExecution["default"];
1962
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/search', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1963
+ }
1964
+
1965
+ /**
1966
+ * Callback function to receive the result of the searchExecutionsByFlowId operation.
1967
+ * @callback module:api/ExecutionsApi~searchExecutionsByFlowIdCallback
1968
+ * @param {String} error Error message, if any.
1969
+ * @param {module:model/PagedResultsExecution} data The data returned by the service call.
1970
+ * @param {String} response The complete HTTP response.
1971
+ */
1972
+
1973
+ /**
1974
+ * Search for executions for a flow
1975
+ * @param {String} namespace The flow namespace
1976
+ * @param {String} flowId The flow id
1977
+ * @param {Number} page The current page
1978
+ * @param {Number} size The current page size
1979
+ * @param {String} tenant
1980
+ * @param {module:api/ExecutionsApi~searchExecutionsByFlowIdCallback} callback The callback function, accepting three arguments: error, data, response
1981
+ * data is of type: {@link module:model/PagedResultsExecution}
1982
+ */
1983
+ }, {
1984
+ key: "searchExecutionsByFlowId",
1985
+ value: function searchExecutionsByFlowId(namespace, flowId, page, size, tenant, callback) {
1986
+ var postBody = null;
1987
+ // verify the required parameter 'namespace' is set
1988
+ if (namespace === undefined || namespace === null) {
1989
+ throw new Error("Missing the required parameter 'namespace' when calling searchExecutionsByFlowId");
1990
+ }
1991
+ // verify the required parameter 'flowId' is set
1992
+ if (flowId === undefined || flowId === null) {
1993
+ throw new Error("Missing the required parameter 'flowId' when calling searchExecutionsByFlowId");
1994
+ }
1995
+ // verify the required parameter 'page' is set
1996
+ if (page === undefined || page === null) {
1997
+ throw new Error("Missing the required parameter 'page' when calling searchExecutionsByFlowId");
1998
+ }
1999
+ // verify the required parameter 'size' is set
2000
+ if (size === undefined || size === null) {
2001
+ throw new Error("Missing the required parameter 'size' when calling searchExecutionsByFlowId");
2002
+ }
2003
+ // verify the required parameter 'tenant' is set
2004
+ if (tenant === undefined || tenant === null) {
2005
+ throw new Error("Missing the required parameter 'tenant' when calling searchExecutionsByFlowId");
2006
+ }
2007
+ var pathParams = {
2008
+ 'tenant': tenant
2009
+ };
2010
+ var queryParams = {
2011
+ 'namespace': namespace,
2012
+ 'flowId': flowId,
2013
+ 'page': page,
2014
+ 'size': size
2015
+ };
2016
+ var headerParams = {};
2017
+ var formParams = {};
2018
+ var authNames = ['basicAuth', 'bearerAuth'];
2019
+ var contentTypes = [];
2020
+ var accepts = ['application/json'];
2021
+ var returnType = _PagedResultsExecution["default"];
2022
+ return this.apiClient.callApi('/api/v1/{tenant}/executions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2023
+ }
2024
+
2025
+ /**
2026
+ * Callback function to receive the result of the searchTaskRun operation.
2027
+ * @callback module:api/ExecutionsApi~searchTaskRunCallback
2028
+ * @param {String} error Error message, if any.
2029
+ * @param {module:model/PagedResultsTaskRun} data The data returned by the service call.
2030
+ * @param {String} response The complete HTTP response.
2031
+ */
2032
+
2033
+ /**
2034
+ * Search for taskruns, only available with the Elasticsearch repository
2035
+ * @param {Number} page The current page
2036
+ * @param {Number} size The current page size
2037
+ * @param {String} tenant
2038
+ * @param {Object} opts Optional parameters
2039
+ * @param {Array.<String>} [sort] The sort of current page
2040
+ * @param {Array.<module:model/QueryFilter>} [filters] Filters
2041
+ * @param {String} [q] A string filter
2042
+ * @param {String} [namespace] A namespace filter prefix
2043
+ * @param {String} [flowId] A flow id filter
2044
+ * @param {Date} [startDate] The start datetime
2045
+ * @param {Date} [endDate] The end datetime
2046
+ * @param {String} [timeRange] A time range filter relative to the current time
2047
+ * @param {Array.<module:model/StateType>} [state] A state filter
2048
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
2049
+ * @param {String} [triggerExecutionId] The trigger execution id
2050
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
2051
+ * @param {module:api/ExecutionsApi~searchTaskRunCallback} callback The callback function, accepting three arguments: error, data, response
2052
+ * data is of type: {@link module:model/PagedResultsTaskRun}
2053
+ */
2054
+ }, {
2055
+ key: "searchTaskRun",
2056
+ value: function searchTaskRun(page, size, tenant, opts, callback) {
2057
+ opts = opts || {};
2058
+ var postBody = null;
2059
+ // verify the required parameter 'page' is set
2060
+ if (page === undefined || page === null) {
2061
+ throw new Error("Missing the required parameter 'page' when calling searchTaskRun");
2062
+ }
2063
+ // verify the required parameter 'size' is set
2064
+ if (size === undefined || size === null) {
2065
+ throw new Error("Missing the required parameter 'size' when calling searchTaskRun");
2066
+ }
2067
+ // verify the required parameter 'tenant' is set
2068
+ if (tenant === undefined || tenant === null) {
2069
+ throw new Error("Missing the required parameter 'tenant' when calling searchTaskRun");
2070
+ }
2071
+ var pathParams = {
2072
+ 'tenant': tenant
2073
+ };
2074
+ var queryParams = {
2075
+ 'page': page,
2076
+ 'size': size,
2077
+ 'sort': this.apiClient.buildCollectionParam(opts['sort'], 'csv'),
2078
+ 'filters': this.apiClient.buildCollectionParam(opts['filters'], 'csv'),
2079
+ 'q': opts['q'],
2080
+ 'namespace': opts['namespace'],
2081
+ 'flowId': opts['flowId'],
2082
+ 'startDate': opts['startDate'],
2083
+ 'endDate': opts['endDate'],
2084
+ 'timeRange': opts['timeRange'],
2085
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
2086
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
2087
+ 'triggerExecutionId': opts['triggerExecutionId'],
2088
+ 'childFilter': opts['childFilter']
2089
+ };
2090
+ var headerParams = {};
2091
+ var formParams = {};
2092
+ var authNames = ['basicAuth', 'bearerAuth'];
2093
+ var contentTypes = [];
2094
+ var accepts = ['application/json'];
2095
+ var returnType = _PagedResultsTaskRun["default"];
2096
+ return this.apiClient.callApi('/api/v1/{tenant}/taskruns/search', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2097
+ }
2098
+
2099
+ /**
2100
+ * Callback function to receive the result of the setLabelsOnTerminatedExecution operation.
2101
+ * @callback module:api/ExecutionsApi~setLabelsOnTerminatedExecutionCallback
2102
+ * @param {String} error Error message, if any.
2103
+ * @param {Object} data The data returned by the service call.
2104
+ * @param {String} response The complete HTTP response.
2105
+ */
2106
+
2107
+ /**
2108
+ * Add or update labels of a terminated execution
2109
+ * @param {String} executionId The execution id
2110
+ * @param {String} tenant
2111
+ * @param {Array.<module:model/Label>} label The labels to add to the execution
2112
+ * @param {module:api/ExecutionsApi~setLabelsOnTerminatedExecutionCallback} callback The callback function, accepting three arguments: error, data, response
2113
+ * data is of type: {@link Object}
2114
+ */
2115
+ }, {
2116
+ key: "setLabelsOnTerminatedExecution",
2117
+ value: function setLabelsOnTerminatedExecution(executionId, tenant, label, callback) {
2118
+ var postBody = label;
2119
+ // verify the required parameter 'executionId' is set
2120
+ if (executionId === undefined || executionId === null) {
2121
+ throw new Error("Missing the required parameter 'executionId' when calling setLabelsOnTerminatedExecution");
2122
+ }
2123
+ // verify the required parameter 'tenant' is set
2124
+ if (tenant === undefined || tenant === null) {
2125
+ throw new Error("Missing the required parameter 'tenant' when calling setLabelsOnTerminatedExecution");
2126
+ }
2127
+ // verify the required parameter 'label' is set
2128
+ if (label === undefined || label === null) {
2129
+ throw new Error("Missing the required parameter 'label' when calling setLabelsOnTerminatedExecution");
2130
+ }
2131
+ var pathParams = {
2132
+ 'executionId': executionId,
2133
+ 'tenant': tenant
2134
+ };
2135
+ var queryParams = {};
2136
+ var headerParams = {};
2137
+ var formParams = {};
2138
+ var authNames = ['basicAuth', 'bearerAuth'];
2139
+ var contentTypes = ['application/json'];
2140
+ var accepts = ['application/json'];
2141
+ var returnType = Object;
2142
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/labels', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2143
+ }
2144
+
2145
+ /**
2146
+ * Callback function to receive the result of the setLabelsOnTerminatedExecutionsByIds operation.
2147
+ * @callback module:api/ExecutionsApi~setLabelsOnTerminatedExecutionsByIdsCallback
2148
+ * @param {String} error Error message, if any.
2149
+ * @param {module:model/BulkResponse} data The data returned by the service call.
2150
+ * @param {String} response The complete HTTP response.
2151
+ */
2152
+
2153
+ /**
2154
+ * Set labels on a list of executions
2155
+ * @param {String} tenant
2156
+ * @param {module:model/ExecutionControllerSetLabelsByIdsRequest} executionControllerSetLabelsByIdsRequest The request containing a list of labels and a list of executions
2157
+ * @param {module:api/ExecutionsApi~setLabelsOnTerminatedExecutionsByIdsCallback} callback The callback function, accepting three arguments: error, data, response
2158
+ * data is of type: {@link module:model/BulkResponse}
2159
+ */
2160
+ }, {
2161
+ key: "setLabelsOnTerminatedExecutionsByIds",
2162
+ value: function setLabelsOnTerminatedExecutionsByIds(tenant, executionControllerSetLabelsByIdsRequest, callback) {
2163
+ var postBody = executionControllerSetLabelsByIdsRequest;
2164
+ // verify the required parameter 'tenant' is set
2165
+ if (tenant === undefined || tenant === null) {
2166
+ throw new Error("Missing the required parameter 'tenant' when calling setLabelsOnTerminatedExecutionsByIds");
2167
+ }
2168
+ // verify the required parameter 'executionControllerSetLabelsByIdsRequest' is set
2169
+ if (executionControllerSetLabelsByIdsRequest === undefined || executionControllerSetLabelsByIdsRequest === null) {
2170
+ throw new Error("Missing the required parameter 'executionControllerSetLabelsByIdsRequest' when calling setLabelsOnTerminatedExecutionsByIds");
2171
+ }
2172
+ var pathParams = {
2173
+ 'tenant': tenant
2174
+ };
2175
+ var queryParams = {};
2176
+ var headerParams = {};
2177
+ var formParams = {};
2178
+ var authNames = ['basicAuth', 'bearerAuth'];
2179
+ var contentTypes = ['application/json'];
2180
+ var accepts = ['application/json'];
2181
+ var returnType = _BulkResponse["default"];
2182
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/labels/by-ids', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2183
+ }
2184
+
2185
+ /**
2186
+ * Callback function to receive the result of the setLabelsOnTerminatedExecutionsByQuery operation.
2187
+ * @callback module:api/ExecutionsApi~setLabelsOnTerminatedExecutionsByQueryCallback
2188
+ * @param {String} error Error message, if any.
2189
+ * @param {Object} data The data returned by the service call.
2190
+ * @param {String} response The complete HTTP response.
2191
+ */
2192
+
2193
+ /**
2194
+ * Set label on executions filter by query parameters
2195
+ * @param {String} tenant
2196
+ * @param {module:model/Label} label The labels to add to the execution
2197
+ * @param {Object} opts Optional parameters
2198
+ * @param {String} [q] A string filter
2199
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
2200
+ * @param {String} [namespace] A namespace filter prefix
2201
+ * @param {String} [flowId] A flow id filter
2202
+ * @param {Date} [startDate] The start datetime
2203
+ * @param {Date} [endDate] The end datetime
2204
+ * @param {String} [timeRange] A time range filter relative to the current time
2205
+ * @param {Array.<module:model/StateType>} [state] A state filter
2206
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
2207
+ * @param {String} [triggerExecutionId] The trigger execution id
2208
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
2209
+ * @param {module:api/ExecutionsApi~setLabelsOnTerminatedExecutionsByQueryCallback} callback The callback function, accepting three arguments: error, data, response
2210
+ * data is of type: {@link Object}
2211
+ */
2212
+ }, {
2213
+ key: "setLabelsOnTerminatedExecutionsByQuery",
2214
+ value: function setLabelsOnTerminatedExecutionsByQuery(tenant, label, opts, callback) {
2215
+ opts = opts || {};
2216
+ var postBody = label;
2217
+ // verify the required parameter 'tenant' is set
2218
+ if (tenant === undefined || tenant === null) {
2219
+ throw new Error("Missing the required parameter 'tenant' when calling setLabelsOnTerminatedExecutionsByQuery");
2220
+ }
2221
+ // verify the required parameter 'label' is set
2222
+ if (label === undefined || label === null) {
2223
+ throw new Error("Missing the required parameter 'label' when calling setLabelsOnTerminatedExecutionsByQuery");
2224
+ }
2225
+ var pathParams = {
2226
+ 'tenant': tenant
2227
+ };
2228
+ var queryParams = {
2229
+ 'q': opts['q'],
2230
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
2231
+ 'namespace': opts['namespace'],
2232
+ 'flowId': opts['flowId'],
2233
+ 'startDate': opts['startDate'],
2234
+ 'endDate': opts['endDate'],
2235
+ 'timeRange': opts['timeRange'],
2236
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
2237
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
2238
+ 'triggerExecutionId': opts['triggerExecutionId'],
2239
+ 'childFilter': opts['childFilter']
2240
+ };
2241
+ var headerParams = {};
2242
+ var formParams = {};
2243
+ var authNames = ['basicAuth', 'bearerAuth'];
2244
+ var contentTypes = ['application/json'];
2245
+ var accepts = ['application/json'];
2246
+ var returnType = Object;
2247
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/labels/by-query', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2248
+ }
2249
+
2250
+ /**
2251
+ * Callback function to receive the result of the triggerExecution operation.
2252
+ * @callback module:api/ExecutionsApi~triggerExecutionCallback
2253
+ * @param {String} error Error message, if any.
2254
+ * @param {Array.<module:model/ExecutionControllerExecutionResponse>} data The data returned by the service call.
2255
+ * @param {String} response The complete HTTP response.
2256
+ */
2257
+
2258
+ /**
2259
+ * Trigger a new execution for a flow
2260
+ * @param {String} namespace The flow namespace
2261
+ * @param {String} id The flow id
2262
+ * @param {Boolean} wait If the server will wait the end of the execution
2263
+ * @param {String} tenant
2264
+ * @param {Object} opts Optional parameters
2265
+ * @param {Array.<String>} [labels] The labels as a list of 'key:value'
2266
+ * @param {Number} [revision] The flow revision or latest if null
2267
+ * @param {module:api/ExecutionsApi~triggerExecutionCallback} callback The callback function, accepting three arguments: error, data, response
2268
+ * data is of type: {@link Array.<module:model/ExecutionControllerExecutionResponse>}
2269
+ */
2270
+ }, {
2271
+ key: "triggerExecution",
2272
+ value: function triggerExecution(namespace, id, wait, tenant, opts, callback) {
2273
+ opts = opts || {};
2274
+ var postBody = null;
2275
+ // verify the required parameter 'namespace' is set
2276
+ if (namespace === undefined || namespace === null) {
2277
+ throw new Error("Missing the required parameter 'namespace' when calling triggerExecution");
2278
+ }
2279
+ // verify the required parameter 'id' is set
2280
+ if (id === undefined || id === null) {
2281
+ throw new Error("Missing the required parameter 'id' when calling triggerExecution");
2282
+ }
2283
+ // verify the required parameter 'wait' is set
2284
+ if (wait === undefined || wait === null) {
2285
+ throw new Error("Missing the required parameter 'wait' when calling triggerExecution");
2286
+ }
2287
+ // verify the required parameter 'tenant' is set
2288
+ if (tenant === undefined || tenant === null) {
2289
+ throw new Error("Missing the required parameter 'tenant' when calling triggerExecution");
2290
+ }
2291
+ var pathParams = {
2292
+ 'namespace': namespace,
2293
+ 'id': id,
2294
+ 'tenant': tenant
2295
+ };
2296
+ var queryParams = {
2297
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
2298
+ 'wait': wait,
2299
+ 'revision': opts['revision']
2300
+ };
2301
+ var headerParams = {};
2302
+ var formParams = {};
2303
+ var authNames = ['basicAuth', 'bearerAuth'];
2304
+ var contentTypes = ['multipart/form-data'];
2305
+ var accepts = ['application/json'];
2306
+ var returnType = [_ExecutionControllerExecutionResponse["default"]];
2307
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/trigger/{namespace}/{id}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2308
+ }
2309
+
2310
+ /**
2311
+ * Callback function to receive the result of the triggerExecutionByGetWebhook operation.
2312
+ * @callback module:api/ExecutionsApi~triggerExecutionByGetWebhookCallback
2313
+ * @param {String} error Error message, if any.
2314
+ * @param {module:model/ExecutionControllerWebhookResponse} data The data returned by the service call.
2315
+ * @param {String} response The complete HTTP response.
2316
+ */
2317
+
2318
+ /**
2319
+ * Trigger a new execution by GET webhook trigger
2320
+ * @param {String} namespace The flow namespace
2321
+ * @param {String} id The flow id
2322
+ * @param {String} key The webhook trigger uid
2323
+ * @param {String} tenant
2324
+ * @param {module:api/ExecutionsApi~triggerExecutionByGetWebhookCallback} callback The callback function, accepting three arguments: error, data, response
2325
+ * data is of type: {@link module:model/ExecutionControllerWebhookResponse}
2326
+ */
2327
+ }, {
2328
+ key: "triggerExecutionByGetWebhook",
2329
+ value: function triggerExecutionByGetWebhook(namespace, id, key, tenant, callback) {
2330
+ var postBody = null;
2331
+ // verify the required parameter 'namespace' is set
2332
+ if (namespace === undefined || namespace === null) {
2333
+ throw new Error("Missing the required parameter 'namespace' when calling triggerExecutionByGetWebhook");
2334
+ }
2335
+ // verify the required parameter 'id' is set
2336
+ if (id === undefined || id === null) {
2337
+ throw new Error("Missing the required parameter 'id' when calling triggerExecutionByGetWebhook");
2338
+ }
2339
+ // verify the required parameter 'key' is set
2340
+ if (key === undefined || key === null) {
2341
+ throw new Error("Missing the required parameter 'key' when calling triggerExecutionByGetWebhook");
2342
+ }
2343
+ // verify the required parameter 'tenant' is set
2344
+ if (tenant === undefined || tenant === null) {
2345
+ throw new Error("Missing the required parameter 'tenant' when calling triggerExecutionByGetWebhook");
2346
+ }
2347
+ var pathParams = {
2348
+ 'namespace': namespace,
2349
+ 'id': id,
2350
+ 'key': key,
2351
+ 'tenant': tenant
2352
+ };
2353
+ var queryParams = {};
2354
+ var headerParams = {};
2355
+ var formParams = {};
2356
+ var authNames = ['basicAuth', 'bearerAuth'];
2357
+ var contentTypes = [];
2358
+ var accepts = ['application/json'];
2359
+ var returnType = _ExecutionControllerWebhookResponse["default"];
2360
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/webhook/{namespace}/{id}/{key}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2361
+ }
2362
+
2363
+ /**
2364
+ * Callback function to receive the result of the triggerExecutionByPostWebhook operation.
2365
+ * @callback module:api/ExecutionsApi~triggerExecutionByPostWebhookCallback
2366
+ * @param {String} error Error message, if any.
2367
+ * @param {module:model/ExecutionControllerWebhookResponse} data The data returned by the service call.
2368
+ * @param {String} response The complete HTTP response.
2369
+ */
2370
+
2371
+ /**
2372
+ * Trigger a new execution by POST webhook trigger
2373
+ * @param {String} namespace The flow namespace
2374
+ * @param {String} id The flow id
2375
+ * @param {String} key The webhook trigger uid
2376
+ * @param {String} tenant
2377
+ * @param {module:api/ExecutionsApi~triggerExecutionByPostWebhookCallback} callback The callback function, accepting three arguments: error, data, response
2378
+ * data is of type: {@link module:model/ExecutionControllerWebhookResponse}
2379
+ */
2380
+ }, {
2381
+ key: "triggerExecutionByPostWebhook",
2382
+ value: function triggerExecutionByPostWebhook(namespace, id, key, tenant, callback) {
2383
+ var postBody = null;
2384
+ // verify the required parameter 'namespace' is set
2385
+ if (namespace === undefined || namespace === null) {
2386
+ throw new Error("Missing the required parameter 'namespace' when calling triggerExecutionByPostWebhook");
2387
+ }
2388
+ // verify the required parameter 'id' is set
2389
+ if (id === undefined || id === null) {
2390
+ throw new Error("Missing the required parameter 'id' when calling triggerExecutionByPostWebhook");
2391
+ }
2392
+ // verify the required parameter 'key' is set
2393
+ if (key === undefined || key === null) {
2394
+ throw new Error("Missing the required parameter 'key' when calling triggerExecutionByPostWebhook");
2395
+ }
2396
+ // verify the required parameter 'tenant' is set
2397
+ if (tenant === undefined || tenant === null) {
2398
+ throw new Error("Missing the required parameter 'tenant' when calling triggerExecutionByPostWebhook");
2399
+ }
2400
+ var pathParams = {
2401
+ 'namespace': namespace,
2402
+ 'id': id,
2403
+ 'key': key,
2404
+ 'tenant': tenant
2405
+ };
2406
+ var queryParams = {};
2407
+ var headerParams = {};
2408
+ var formParams = {};
2409
+ var authNames = ['basicAuth', 'bearerAuth'];
2410
+ var contentTypes = [];
2411
+ var accepts = ['application/json'];
2412
+ var returnType = _ExecutionControllerWebhookResponse["default"];
2413
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/webhook/{namespace}/{id}/{key}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2414
+ }
2415
+
2416
+ /**
2417
+ * Callback function to receive the result of the triggerExecutionByPutWebhook operation.
2418
+ * @callback module:api/ExecutionsApi~triggerExecutionByPutWebhookCallback
2419
+ * @param {String} error Error message, if any.
2420
+ * @param {module:model/ExecutionControllerWebhookResponse} data The data returned by the service call.
2421
+ * @param {String} response The complete HTTP response.
2422
+ */
2423
+
2424
+ /**
2425
+ * Trigger a new execution by PUT webhook trigger
2426
+ * @param {String} namespace The flow namespace
2427
+ * @param {String} id The flow id
2428
+ * @param {String} key The webhook trigger uid
2429
+ * @param {String} tenant
2430
+ * @param {module:api/ExecutionsApi~triggerExecutionByPutWebhookCallback} callback The callback function, accepting three arguments: error, data, response
2431
+ * data is of type: {@link module:model/ExecutionControllerWebhookResponse}
2432
+ */
2433
+ }, {
2434
+ key: "triggerExecutionByPutWebhook",
2435
+ value: function triggerExecutionByPutWebhook(namespace, id, key, tenant, callback) {
2436
+ var postBody = null;
2437
+ // verify the required parameter 'namespace' is set
2438
+ if (namespace === undefined || namespace === null) {
2439
+ throw new Error("Missing the required parameter 'namespace' when calling triggerExecutionByPutWebhook");
2440
+ }
2441
+ // verify the required parameter 'id' is set
2442
+ if (id === undefined || id === null) {
2443
+ throw new Error("Missing the required parameter 'id' when calling triggerExecutionByPutWebhook");
2444
+ }
2445
+ // verify the required parameter 'key' is set
2446
+ if (key === undefined || key === null) {
2447
+ throw new Error("Missing the required parameter 'key' when calling triggerExecutionByPutWebhook");
2448
+ }
2449
+ // verify the required parameter 'tenant' is set
2450
+ if (tenant === undefined || tenant === null) {
2451
+ throw new Error("Missing the required parameter 'tenant' when calling triggerExecutionByPutWebhook");
2452
+ }
2453
+ var pathParams = {
2454
+ 'namespace': namespace,
2455
+ 'id': id,
2456
+ 'key': key,
2457
+ 'tenant': tenant
2458
+ };
2459
+ var queryParams = {};
2460
+ var headerParams = {};
2461
+ var formParams = {};
2462
+ var authNames = ['basicAuth', 'bearerAuth'];
2463
+ var contentTypes = [];
2464
+ var accepts = ['application/json'];
2465
+ var returnType = _ExecutionControllerWebhookResponse["default"];
2466
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/webhook/{namespace}/{id}/{key}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2467
+ }
2468
+
2469
+ /**
2470
+ * Callback function to receive the result of the unqueueExecution operation.
2471
+ * @callback module:api/ExecutionsApi~unqueueExecutionCallback
2472
+ * @param {String} error Error message, if any.
2473
+ * @param {module:model/Execution} data The data returned by the service call.
2474
+ * @param {String} response The complete HTTP response.
2475
+ */
2476
+
2477
+ /**
2478
+ * Unqueue an execution
2479
+ * @param {String} executionId The execution id
2480
+ * @param {module:model/StateType} state The new state of the execution
2481
+ * @param {String} tenant
2482
+ * @param {module:api/ExecutionsApi~unqueueExecutionCallback} callback The callback function, accepting three arguments: error, data, response
2483
+ * data is of type: {@link module:model/Execution}
2484
+ */
2485
+ }, {
2486
+ key: "unqueueExecution",
2487
+ value: function unqueueExecution(executionId, state, tenant, callback) {
2488
+ var postBody = null;
2489
+ // verify the required parameter 'executionId' is set
2490
+ if (executionId === undefined || executionId === null) {
2491
+ throw new Error("Missing the required parameter 'executionId' when calling unqueueExecution");
2492
+ }
2493
+ // verify the required parameter 'state' is set
2494
+ if (state === undefined || state === null) {
2495
+ throw new Error("Missing the required parameter 'state' when calling unqueueExecution");
2496
+ }
2497
+ // verify the required parameter 'tenant' is set
2498
+ if (tenant === undefined || tenant === null) {
2499
+ throw new Error("Missing the required parameter 'tenant' when calling unqueueExecution");
2500
+ }
2501
+ var pathParams = {
2502
+ 'executionId': executionId,
2503
+ 'tenant': tenant
2504
+ };
2505
+ var queryParams = {
2506
+ 'state': state
2507
+ };
2508
+ var headerParams = {};
2509
+ var formParams = {};
2510
+ var authNames = ['basicAuth', 'bearerAuth'];
2511
+ var contentTypes = [];
2512
+ var accepts = ['application/json'];
2513
+ var returnType = _Execution["default"];
2514
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/unqueue', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2515
+ }
2516
+
2517
+ /**
2518
+ * Callback function to receive the result of the unqueueExecutionsByIds operation.
2519
+ * @callback module:api/ExecutionsApi~unqueueExecutionsByIdsCallback
2520
+ * @param {String} error Error message, if any.
2521
+ * @param {module:model/BulkResponse} data The data returned by the service call.
2522
+ * @param {String} response The complete HTTP response.
2523
+ */
2524
+
2525
+ /**
2526
+ * Unqueue a list of executions
2527
+ * @param {module:model/StateType} state The new state of the unqueued executions
2528
+ * @param {String} tenant
2529
+ * @param {Array.<String>} requestBody The list of executions id
2530
+ * @param {module:api/ExecutionsApi~unqueueExecutionsByIdsCallback} callback The callback function, accepting three arguments: error, data, response
2531
+ * data is of type: {@link module:model/BulkResponse}
2532
+ */
2533
+ }, {
2534
+ key: "unqueueExecutionsByIds",
2535
+ value: function unqueueExecutionsByIds(state, tenant, requestBody, callback) {
2536
+ var postBody = requestBody;
2537
+ // verify the required parameter 'state' is set
2538
+ if (state === undefined || state === null) {
2539
+ throw new Error("Missing the required parameter 'state' when calling unqueueExecutionsByIds");
2540
+ }
2541
+ // verify the required parameter 'tenant' is set
2542
+ if (tenant === undefined || tenant === null) {
2543
+ throw new Error("Missing the required parameter 'tenant' when calling unqueueExecutionsByIds");
2544
+ }
2545
+ // verify the required parameter 'requestBody' is set
2546
+ if (requestBody === undefined || requestBody === null) {
2547
+ throw new Error("Missing the required parameter 'requestBody' when calling unqueueExecutionsByIds");
2548
+ }
2549
+ var pathParams = {
2550
+ 'tenant': tenant
2551
+ };
2552
+ var queryParams = {
2553
+ 'state': state
2554
+ };
2555
+ var headerParams = {};
2556
+ var formParams = {};
2557
+ var authNames = ['basicAuth', 'bearerAuth'];
2558
+ var contentTypes = ['application/json'];
2559
+ var accepts = ['application/json'];
2560
+ var returnType = _BulkResponse["default"];
2561
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/unqueue/by-ids', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2562
+ }
2563
+
2564
+ /**
2565
+ * Callback function to receive the result of the unqueueExecutionsByQuery operation.
2566
+ * @callback module:api/ExecutionsApi~unqueueExecutionsByQueryCallback
2567
+ * @param {String} error Error message, if any.
2568
+ * @param {Object} data The data returned by the service call.
2569
+ * @param {String} response The complete HTTP response.
2570
+ */
2571
+
2572
+ /**
2573
+ * Unqueue executions filter by query parameters
2574
+ * @param {String} tenant
2575
+ * @param {module:model/DeleteExecutionsByQueryRequest} deleteExecutionsByQueryRequest
2576
+ * @param {Object} opts Optional parameters
2577
+ * @param {String} [q] A string filter
2578
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
2579
+ * @param {String} [namespace] A namespace filter prefix
2580
+ * @param {String} [flowId] A flow id filter
2581
+ * @param {Date} [startDate] The start datetime
2582
+ * @param {Date} [endDate] The end datetime
2583
+ * @param {String} [timeRange] A time range filter relative to the current time
2584
+ * @param {Array.<module:model/StateType>} [state] A state filter
2585
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
2586
+ * @param {String} [triggerExecutionId] The trigger execution id
2587
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
2588
+ * @param {module:model/StateType} [newState] The new state of the unqueued executions
2589
+ * @param {module:api/ExecutionsApi~unqueueExecutionsByQueryCallback} callback The callback function, accepting three arguments: error, data, response
2590
+ * data is of type: {@link Object}
2591
+ */
2592
+ }, {
2593
+ key: "unqueueExecutionsByQuery",
2594
+ value: function unqueueExecutionsByQuery(tenant, deleteExecutionsByQueryRequest, opts, callback) {
2595
+ opts = opts || {};
2596
+ var postBody = deleteExecutionsByQueryRequest;
2597
+ // verify the required parameter 'tenant' is set
2598
+ if (tenant === undefined || tenant === null) {
2599
+ throw new Error("Missing the required parameter 'tenant' when calling unqueueExecutionsByQuery");
2600
+ }
2601
+ // verify the required parameter 'deleteExecutionsByQueryRequest' is set
2602
+ if (deleteExecutionsByQueryRequest === undefined || deleteExecutionsByQueryRequest === null) {
2603
+ throw new Error("Missing the required parameter 'deleteExecutionsByQueryRequest' when calling unqueueExecutionsByQuery");
2604
+ }
2605
+ var pathParams = {
2606
+ 'tenant': tenant
2607
+ };
2608
+ var queryParams = {
2609
+ 'q': opts['q'],
2610
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
2611
+ 'namespace': opts['namespace'],
2612
+ 'flowId': opts['flowId'],
2613
+ 'startDate': opts['startDate'],
2614
+ 'endDate': opts['endDate'],
2615
+ 'timeRange': opts['timeRange'],
2616
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
2617
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
2618
+ 'triggerExecutionId': opts['triggerExecutionId'],
2619
+ 'childFilter': opts['childFilter'],
2620
+ 'newState': opts['newState']
2621
+ };
2622
+ var headerParams = {};
2623
+ var formParams = {};
2624
+ var authNames = ['basicAuth', 'bearerAuth'];
2625
+ var contentTypes = ['application/json'];
2626
+ var accepts = ['application/json'];
2627
+ var returnType = Object;
2628
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/unqueue/by-query', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2629
+ }
2630
+
2631
+ /**
2632
+ * Callback function to receive the result of the updateExecutionStatus operation.
2633
+ * @callback module:api/ExecutionsApi~updateExecutionStatusCallback
2634
+ * @param {String} error Error message, if any.
2635
+ * @param {module:model/Execution} data The data returned by the service call.
2636
+ * @param {String} response The complete HTTP response.
2637
+ */
2638
+
2639
+ /**
2640
+ * Change the state of an execution
2641
+ * @param {String} executionId The execution id
2642
+ * @param {module:model/StateType} status The new state of the execution
2643
+ * @param {String} tenant
2644
+ * @param {module:api/ExecutionsApi~updateExecutionStatusCallback} callback The callback function, accepting three arguments: error, data, response
2645
+ * data is of type: {@link module:model/Execution}
2646
+ */
2647
+ }, {
2648
+ key: "updateExecutionStatus",
2649
+ value: function updateExecutionStatus(executionId, status, tenant, callback) {
2650
+ var postBody = null;
2651
+ // verify the required parameter 'executionId' is set
2652
+ if (executionId === undefined || executionId === null) {
2653
+ throw new Error("Missing the required parameter 'executionId' when calling updateExecutionStatus");
2654
+ }
2655
+ // verify the required parameter 'status' is set
2656
+ if (status === undefined || status === null) {
2657
+ throw new Error("Missing the required parameter 'status' when calling updateExecutionStatus");
2658
+ }
2659
+ // verify the required parameter 'tenant' is set
2660
+ if (tenant === undefined || tenant === null) {
2661
+ throw new Error("Missing the required parameter 'tenant' when calling updateExecutionStatus");
2662
+ }
2663
+ var pathParams = {
2664
+ 'executionId': executionId,
2665
+ 'tenant': tenant
2666
+ };
2667
+ var queryParams = {
2668
+ 'status': status
2669
+ };
2670
+ var headerParams = {};
2671
+ var formParams = {};
2672
+ var authNames = ['basicAuth', 'bearerAuth'];
2673
+ var contentTypes = [];
2674
+ var accepts = ['application/json'];
2675
+ var returnType = _Execution["default"];
2676
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/change-status', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2677
+ }
2678
+
2679
+ /**
2680
+ * Callback function to receive the result of the updateExecutionsStatusByIds operation.
2681
+ * @callback module:api/ExecutionsApi~updateExecutionsStatusByIdsCallback
2682
+ * @param {String} error Error message, if any.
2683
+ * @param {module:model/BulkResponse} data The data returned by the service call.
2684
+ * @param {String} response The complete HTTP response.
2685
+ */
2686
+
2687
+ /**
2688
+ * Change executions state by id
2689
+ * @param {module:model/StateType} newStatus The new state of the executions
2690
+ * @param {String} tenant
2691
+ * @param {Array.<String>} requestBody The list of executions id
2692
+ * @param {module:api/ExecutionsApi~updateExecutionsStatusByIdsCallback} callback The callback function, accepting three arguments: error, data, response
2693
+ * data is of type: {@link module:model/BulkResponse}
2694
+ */
2695
+ }, {
2696
+ key: "updateExecutionsStatusByIds",
2697
+ value: function updateExecutionsStatusByIds(newStatus, tenant, requestBody, callback) {
2698
+ var postBody = requestBody;
2699
+ // verify the required parameter 'newStatus' is set
2700
+ if (newStatus === undefined || newStatus === null) {
2701
+ throw new Error("Missing the required parameter 'newStatus' when calling updateExecutionsStatusByIds");
2702
+ }
2703
+ // verify the required parameter 'tenant' is set
2704
+ if (tenant === undefined || tenant === null) {
2705
+ throw new Error("Missing the required parameter 'tenant' when calling updateExecutionsStatusByIds");
2706
+ }
2707
+ // verify the required parameter 'requestBody' is set
2708
+ if (requestBody === undefined || requestBody === null) {
2709
+ throw new Error("Missing the required parameter 'requestBody' when calling updateExecutionsStatusByIds");
2710
+ }
2711
+ var pathParams = {
2712
+ 'tenant': tenant
2713
+ };
2714
+ var queryParams = {
2715
+ 'newStatus': newStatus
2716
+ };
2717
+ var headerParams = {};
2718
+ var formParams = {};
2719
+ var authNames = ['basicAuth', 'bearerAuth'];
2720
+ var contentTypes = ['application/json'];
2721
+ var accepts = ['application/json'];
2722
+ var returnType = _BulkResponse["default"];
2723
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/change-status/by-ids', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2724
+ }
2725
+
2726
+ /**
2727
+ * Callback function to receive the result of the updateExecutionsStatusByQuery operation.
2728
+ * @callback module:api/ExecutionsApi~updateExecutionsStatusByQueryCallback
2729
+ * @param {String} error Error message, if any.
2730
+ * @param {module:model/BulkResponse} data The data returned by the service call.
2731
+ * @param {String} response The complete HTTP response.
2732
+ */
2733
+
2734
+ /**
2735
+ * Change executions state by query parameters
2736
+ * @param {module:model/StateType} newStatus The new state of the executions
2737
+ * @param {String} tenant
2738
+ * @param {module:model/DeleteExecutionsByQueryRequest} deleteExecutionsByQueryRequest
2739
+ * @param {Object} opts Optional parameters
2740
+ * @param {String} [q] A string filter
2741
+ * @param {Array.<module:model/FlowScope>} [scope] The scope of the executions to include
2742
+ * @param {String} [namespace] A namespace filter prefix
2743
+ * @param {String} [flowId] A flow id filter
2744
+ * @param {Date} [startDate] The start datetime
2745
+ * @param {Date} [endDate] The end datetime
2746
+ * @param {String} [timeRange] A time range filter relative to the current time
2747
+ * @param {Array.<module:model/StateType>} [state] A state filter
2748
+ * @param {Array.<String>} [labels] A labels filter as a list of 'key:value'
2749
+ * @param {String} [triggerExecutionId] The trigger execution id
2750
+ * @param {module:model/ExecutionRepositoryInterfaceChildFilter} [childFilter] A execution child filter
2751
+ * @param {module:api/ExecutionsApi~updateExecutionsStatusByQueryCallback} callback The callback function, accepting three arguments: error, data, response
2752
+ * data is of type: {@link module:model/BulkResponse}
2753
+ */
2754
+ }, {
2755
+ key: "updateExecutionsStatusByQuery",
2756
+ value: function updateExecutionsStatusByQuery(newStatus, tenant, deleteExecutionsByQueryRequest, opts, callback) {
2757
+ opts = opts || {};
2758
+ var postBody = deleteExecutionsByQueryRequest;
2759
+ // verify the required parameter 'newStatus' is set
2760
+ if (newStatus === undefined || newStatus === null) {
2761
+ throw new Error("Missing the required parameter 'newStatus' when calling updateExecutionsStatusByQuery");
2762
+ }
2763
+ // verify the required parameter 'tenant' is set
2764
+ if (tenant === undefined || tenant === null) {
2765
+ throw new Error("Missing the required parameter 'tenant' when calling updateExecutionsStatusByQuery");
2766
+ }
2767
+ // verify the required parameter 'deleteExecutionsByQueryRequest' is set
2768
+ if (deleteExecutionsByQueryRequest === undefined || deleteExecutionsByQueryRequest === null) {
2769
+ throw new Error("Missing the required parameter 'deleteExecutionsByQueryRequest' when calling updateExecutionsStatusByQuery");
2770
+ }
2771
+ var pathParams = {
2772
+ 'tenant': tenant
2773
+ };
2774
+ var queryParams = {
2775
+ 'q': opts['q'],
2776
+ 'scope': this.apiClient.buildCollectionParam(opts['scope'], 'csv'),
2777
+ 'namespace': opts['namespace'],
2778
+ 'flowId': opts['flowId'],
2779
+ 'startDate': opts['startDate'],
2780
+ 'endDate': opts['endDate'],
2781
+ 'timeRange': opts['timeRange'],
2782
+ 'state': this.apiClient.buildCollectionParam(opts['state'], 'csv'),
2783
+ 'labels': this.apiClient.buildCollectionParam(opts['labels'], 'multi'),
2784
+ 'triggerExecutionId': opts['triggerExecutionId'],
2785
+ 'childFilter': opts['childFilter'],
2786
+ 'newStatus': newStatus
2787
+ };
2788
+ var headerParams = {};
2789
+ var formParams = {};
2790
+ var authNames = ['basicAuth', 'bearerAuth'];
2791
+ var contentTypes = ['application/json'];
2792
+ var accepts = ['application/json'];
2793
+ var returnType = _BulkResponse["default"];
2794
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/change-status/by-query', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2795
+ }
2796
+
2797
+ /**
2798
+ * Callback function to receive the result of the updateTaskRunState operation.
2799
+ * @callback module:api/ExecutionsApi~updateTaskRunStateCallback
2800
+ * @param {String} error Error message, if any.
2801
+ * @param {module:model/Execution} data The data returned by the service call.
2802
+ * @param {String} response The complete HTTP response.
2803
+ */
2804
+
2805
+ /**
2806
+ * Change state for a taskrun in an execution
2807
+ * @param {String} executionId The execution id
2808
+ * @param {String} tenant
2809
+ * @param {module:model/ExecutionControllerStateRequest} executionControllerStateRequest the taskRun id and state to apply
2810
+ * @param {module:api/ExecutionsApi~updateTaskRunStateCallback} callback The callback function, accepting three arguments: error, data, response
2811
+ * data is of type: {@link module:model/Execution}
2812
+ */
2813
+ }, {
2814
+ key: "updateTaskRunState",
2815
+ value: function updateTaskRunState(executionId, tenant, executionControllerStateRequest, callback) {
2816
+ var postBody = executionControllerStateRequest;
2817
+ // verify the required parameter 'executionId' is set
2818
+ if (executionId === undefined || executionId === null) {
2819
+ throw new Error("Missing the required parameter 'executionId' when calling updateTaskRunState");
2820
+ }
2821
+ // verify the required parameter 'tenant' is set
2822
+ if (tenant === undefined || tenant === null) {
2823
+ throw new Error("Missing the required parameter 'tenant' when calling updateTaskRunState");
2824
+ }
2825
+ // verify the required parameter 'executionControllerStateRequest' is set
2826
+ if (executionControllerStateRequest === undefined || executionControllerStateRequest === null) {
2827
+ throw new Error("Missing the required parameter 'executionControllerStateRequest' when calling updateTaskRunState");
2828
+ }
2829
+ var pathParams = {
2830
+ 'executionId': executionId,
2831
+ 'tenant': tenant
2832
+ };
2833
+ var queryParams = {};
2834
+ var headerParams = {};
2835
+ var formParams = {};
2836
+ var authNames = ['basicAuth', 'bearerAuth'];
2837
+ var contentTypes = ['application/json'];
2838
+ var accepts = ['application/json'];
2839
+ var returnType = _Execution["default"];
2840
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/state', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2841
+ }
2842
+
2843
+ /**
2844
+ * Callback function to receive the result of the validateNewExecutionInputs operation.
2845
+ * @callback module:api/ExecutionsApi~validateNewExecutionInputsCallback
2846
+ * @param {String} error Error message, if any.
2847
+ * @param {Array.<module:model/ExecutionControllerApiValidateExecutionInputsResponse>} data The data returned by the service call.
2848
+ * @param {String} response The complete HTTP response.
2849
+ */
2850
+
2851
+ /**
2852
+ * Validate the creation of a new execution for a flow
2853
+ * @param {String} namespace The flow namespace
2854
+ * @param {String} id The flow id
2855
+ * @param {Array.<String>} labels The labels as a list of 'key:value'
2856
+ * @param {String} tenant
2857
+ * @param {Object} opts Optional parameters
2858
+ * @param {Number} [revision] The flow revision or latest if null
2859
+ * @param {module:api/ExecutionsApi~validateNewExecutionInputsCallback} callback The callback function, accepting three arguments: error, data, response
2860
+ * data is of type: {@link Array.<module:model/ExecutionControllerApiValidateExecutionInputsResponse>}
2861
+ */
2862
+ }, {
2863
+ key: "validateNewExecutionInputs",
2864
+ value: function validateNewExecutionInputs(namespace, id, labels, tenant, opts, callback) {
2865
+ opts = opts || {};
2866
+ var postBody = null;
2867
+ // verify the required parameter 'namespace' is set
2868
+ if (namespace === undefined || namespace === null) {
2869
+ throw new Error("Missing the required parameter 'namespace' when calling validateNewExecutionInputs");
2870
+ }
2871
+ // verify the required parameter 'id' is set
2872
+ if (id === undefined || id === null) {
2873
+ throw new Error("Missing the required parameter 'id' when calling validateNewExecutionInputs");
2874
+ }
2875
+ // verify the required parameter 'labels' is set
2876
+ if (labels === undefined || labels === null) {
2877
+ throw new Error("Missing the required parameter 'labels' when calling validateNewExecutionInputs");
2878
+ }
2879
+ // verify the required parameter 'tenant' is set
2880
+ if (tenant === undefined || tenant === null) {
2881
+ throw new Error("Missing the required parameter 'tenant' when calling validateNewExecutionInputs");
2882
+ }
2883
+ var pathParams = {
2884
+ 'namespace': namespace,
2885
+ 'id': id,
2886
+ 'tenant': tenant
2887
+ };
2888
+ var queryParams = {
2889
+ 'labels': this.apiClient.buildCollectionParam(labels, 'multi'),
2890
+ 'revision': opts['revision']
2891
+ };
2892
+ var headerParams = {};
2893
+ var formParams = {};
2894
+ var authNames = ['basicAuth', 'bearerAuth'];
2895
+ var contentTypes = ['multipart/form-data'];
2896
+ var accepts = ['application/json'];
2897
+ var returnType = [_ExecutionControllerApiValidateExecutionInputsResponse["default"]];
2898
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{namespace}/{id}/validate', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2899
+ }
2900
+
2901
+ /**
2902
+ * Callback function to receive the result of the validateResumeExecutionInputs operation.
2903
+ * @callback module:api/ExecutionsApi~validateResumeExecutionInputsCallback
2904
+ * @param {String} error Error message, if any.
2905
+ * @param {Array.<module:model/ExecutionControllerApiValidateExecutionInputsResponse>} data The data returned by the service call.
2906
+ * @param {String} response The complete HTTP response.
2907
+ */
2908
+
2909
+ /**
2910
+ * Validate inputs to resume a paused execution.
2911
+ * @param {String} executionId The execution id
2912
+ * @param {String} tenant
2913
+ * @param {module:api/ExecutionsApi~validateResumeExecutionInputsCallback} callback The callback function, accepting three arguments: error, data, response
2914
+ * data is of type: {@link Array.<module:model/ExecutionControllerApiValidateExecutionInputsResponse>}
2915
+ */
2916
+ }, {
2917
+ key: "validateResumeExecutionInputs",
2918
+ value: function validateResumeExecutionInputs(executionId, tenant, callback) {
2919
+ var postBody = null;
2920
+ // verify the required parameter 'executionId' is set
2921
+ if (executionId === undefined || executionId === null) {
2922
+ throw new Error("Missing the required parameter 'executionId' when calling validateResumeExecutionInputs");
2923
+ }
2924
+ // verify the required parameter 'tenant' is set
2925
+ if (tenant === undefined || tenant === null) {
2926
+ throw new Error("Missing the required parameter 'tenant' when calling validateResumeExecutionInputs");
2927
+ }
2928
+ var pathParams = {
2929
+ 'executionId': executionId,
2930
+ 'tenant': tenant
2931
+ };
2932
+ var queryParams = {};
2933
+ var headerParams = {};
2934
+ var formParams = {};
2935
+ var authNames = ['basicAuth', 'bearerAuth'];
2936
+ var contentTypes = ['multipart/form-data'];
2937
+ var accepts = ['application/json'];
2938
+ var returnType = [_ExecutionControllerApiValidateExecutionInputsResponse["default"]];
2939
+ return this.apiClient.callApi('/api/v1/{tenant}/executions/{executionId}/resume/validate', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
2940
+ }
2941
+ }]);
2942
+ }();