hatchet-sdk 0.0.0 → 0.1.0.pre.alpha

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 (443) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -2
  3. data/CLAUDE.md +61 -4
  4. data/INTEGRATION_TESTING.md +176 -0
  5. data/LICENSE.txt +1 -1
  6. data/REST_API_GENERATION.md +257 -0
  7. data/Rakefile +9 -0
  8. data/Rakefile.rest +133 -0
  9. data/config/openapi_generator_config.json +31 -0
  10. data/lib/hatchet/clients/rest/.gitignore +39 -0
  11. data/lib/hatchet/clients/rest/.gitlab-ci.yml +26 -0
  12. data/lib/hatchet/clients/rest/.openapi-generator/FILES +420 -0
  13. data/lib/hatchet/clients/rest/.openapi-generator/VERSION +1 -0
  14. data/lib/hatchet/clients/rest/.openapi-generator-ignore +23 -0
  15. data/lib/hatchet/clients/rest/.rspec +2 -0
  16. data/lib/hatchet/clients/rest/.rubocop.yml +148 -0
  17. data/lib/hatchet/clients/rest/.travis.yml +11 -0
  18. data/lib/hatchet/clients/rest/Gemfile +9 -0
  19. data/lib/hatchet/clients/rest/README.md +420 -0
  20. data/lib/hatchet/clients/rest/Rakefile +10 -0
  21. data/lib/hatchet/clients/rest/docs/APIError.md +24 -0
  22. data/lib/hatchet/clients/rest/docs/APIErrors.md +18 -0
  23. data/lib/hatchet/clients/rest/docs/APIMeta.md +30 -0
  24. data/lib/hatchet/clients/rest/docs/APIMetaAuth.md +18 -0
  25. data/lib/hatchet/clients/rest/docs/APIMetaIntegration.md +20 -0
  26. data/lib/hatchet/clients/rest/docs/APIMetaPosthog.md +20 -0
  27. data/lib/hatchet/clients/rest/docs/APIResourceMeta.md +22 -0
  28. data/lib/hatchet/clients/rest/docs/APIToken.md +22 -0
  29. data/lib/hatchet/clients/rest/docs/APITokenApi.md +235 -0
  30. data/lib/hatchet/clients/rest/docs/AcceptInviteRequest.md +18 -0
  31. data/lib/hatchet/clients/rest/docs/BulkCreateEventRequest.md +18 -0
  32. data/lib/hatchet/clients/rest/docs/CancelEventRequest.md +18 -0
  33. data/lib/hatchet/clients/rest/docs/ConcurrencyLimitStrategy.md +15 -0
  34. data/lib/hatchet/clients/rest/docs/CreateAPITokenRequest.md +20 -0
  35. data/lib/hatchet/clients/rest/docs/CreateAPITokenResponse.md +18 -0
  36. data/lib/hatchet/clients/rest/docs/CreateCronWorkflowTriggerRequest.md +26 -0
  37. data/lib/hatchet/clients/rest/docs/CreateEventRequest.md +26 -0
  38. data/lib/hatchet/clients/rest/docs/CreatePullRequestFromStepRun.md +18 -0
  39. data/lib/hatchet/clients/rest/docs/CreateSNSIntegrationRequest.md +18 -0
  40. data/lib/hatchet/clients/rest/docs/CreateTenantAlertEmailGroupRequest.md +18 -0
  41. data/lib/hatchet/clients/rest/docs/CreateTenantInviteRequest.md +20 -0
  42. data/lib/hatchet/clients/rest/docs/CreateTenantRequest.md +24 -0
  43. data/lib/hatchet/clients/rest/docs/CronWorkflows.md +40 -0
  44. data/lib/hatchet/clients/rest/docs/CronWorkflowsList.md +20 -0
  45. data/lib/hatchet/clients/rest/docs/CronWorkflowsMethod.md +15 -0
  46. data/lib/hatchet/clients/rest/docs/CronWorkflowsOrderByField.md +15 -0
  47. data/lib/hatchet/clients/rest/docs/DefaultApi.md +602 -0
  48. data/lib/hatchet/clients/rest/docs/Event.md +28 -0
  49. data/lib/hatchet/clients/rest/docs/EventApi.md +809 -0
  50. data/lib/hatchet/clients/rest/docs/EventData.md +18 -0
  51. data/lib/hatchet/clients/rest/docs/EventKeyList.md +20 -0
  52. data/lib/hatchet/clients/rest/docs/EventList.md +20 -0
  53. data/lib/hatchet/clients/rest/docs/EventOrderByDirection.md +15 -0
  54. data/lib/hatchet/clients/rest/docs/EventOrderByField.md +15 -0
  55. data/lib/hatchet/clients/rest/docs/EventUpdateCancel200Response.md +18 -0
  56. data/lib/hatchet/clients/rest/docs/EventWorkflowRunSummary.md +28 -0
  57. data/lib/hatchet/clients/rest/docs/Events.md +20 -0
  58. data/lib/hatchet/clients/rest/docs/FilterApi.md +402 -0
  59. data/lib/hatchet/clients/rest/docs/GetStepRunDiffResponse.md +18 -0
  60. data/lib/hatchet/clients/rest/docs/GithubApi.md +73 -0
  61. data/lib/hatchet/clients/rest/docs/HealthcheckApi.md +129 -0
  62. data/lib/hatchet/clients/rest/docs/InfoGetVersion200Response.md +18 -0
  63. data/lib/hatchet/clients/rest/docs/Job.md +30 -0
  64. data/lib/hatchet/clients/rest/docs/JobRun.md +48 -0
  65. data/lib/hatchet/clients/rest/docs/JobRunStatus.md +15 -0
  66. data/lib/hatchet/clients/rest/docs/ListAPITokensResponse.md +20 -0
  67. data/lib/hatchet/clients/rest/docs/ListPullRequestsResponse.md +18 -0
  68. data/lib/hatchet/clients/rest/docs/ListSNSIntegrations.md +20 -0
  69. data/lib/hatchet/clients/rest/docs/ListSlackWebhooks.md +20 -0
  70. data/lib/hatchet/clients/rest/docs/LogApi.md +171 -0
  71. data/lib/hatchet/clients/rest/docs/LogLine.md +22 -0
  72. data/lib/hatchet/clients/rest/docs/LogLineLevel.md +15 -0
  73. data/lib/hatchet/clients/rest/docs/LogLineList.md +20 -0
  74. data/lib/hatchet/clients/rest/docs/LogLineOrderByDirection.md +15 -0
  75. data/lib/hatchet/clients/rest/docs/LogLineOrderByField.md +15 -0
  76. data/lib/hatchet/clients/rest/docs/MetadataApi.md +203 -0
  77. data/lib/hatchet/clients/rest/docs/PaginationResponse.md +22 -0
  78. data/lib/hatchet/clients/rest/docs/PullRequest.md +32 -0
  79. data/lib/hatchet/clients/rest/docs/PullRequestState.md +15 -0
  80. data/lib/hatchet/clients/rest/docs/QueueMetrics.md +22 -0
  81. data/lib/hatchet/clients/rest/docs/RateLimit.md +28 -0
  82. data/lib/hatchet/clients/rest/docs/RateLimitList.md +20 -0
  83. data/lib/hatchet/clients/rest/docs/RateLimitOrderByDirection.md +15 -0
  84. data/lib/hatchet/clients/rest/docs/RateLimitOrderByField.md +15 -0
  85. data/lib/hatchet/clients/rest/docs/RateLimitsApi.md +94 -0
  86. data/lib/hatchet/clients/rest/docs/RecentStepRuns.md +30 -0
  87. data/lib/hatchet/clients/rest/docs/RejectInviteRequest.md +18 -0
  88. data/lib/hatchet/clients/rest/docs/ReplayEventRequest.md +18 -0
  89. data/lib/hatchet/clients/rest/docs/ReplayWorkflowRunsRequest.md +18 -0
  90. data/lib/hatchet/clients/rest/docs/ReplayWorkflowRunsResponse.md +18 -0
  91. data/lib/hatchet/clients/rest/docs/RerunStepRunRequest.md +18 -0
  92. data/lib/hatchet/clients/rest/docs/SNSApi.md +235 -0
  93. data/lib/hatchet/clients/rest/docs/SNSIntegration.md +24 -0
  94. data/lib/hatchet/clients/rest/docs/ScheduleWorkflowRunRequest.md +24 -0
  95. data/lib/hatchet/clients/rest/docs/ScheduledRunStatus.md +15 -0
  96. data/lib/hatchet/clients/rest/docs/ScheduledWorkflows.md +44 -0
  97. data/lib/hatchet/clients/rest/docs/ScheduledWorkflowsList.md +20 -0
  98. data/lib/hatchet/clients/rest/docs/ScheduledWorkflowsMethod.md +15 -0
  99. data/lib/hatchet/clients/rest/docs/ScheduledWorkflowsOrderByField.md +15 -0
  100. data/lib/hatchet/clients/rest/docs/SemaphoreSlots.md +28 -0
  101. data/lib/hatchet/clients/rest/docs/SlackApi.md +156 -0
  102. data/lib/hatchet/clients/rest/docs/SlackWebhook.md +28 -0
  103. data/lib/hatchet/clients/rest/docs/Step.md +32 -0
  104. data/lib/hatchet/clients/rest/docs/StepRun.md +68 -0
  105. data/lib/hatchet/clients/rest/docs/StepRunApi.md +560 -0
  106. data/lib/hatchet/clients/rest/docs/StepRunArchive.md +50 -0
  107. data/lib/hatchet/clients/rest/docs/StepRunArchiveList.md +20 -0
  108. data/lib/hatchet/clients/rest/docs/StepRunDiff.md +22 -0
  109. data/lib/hatchet/clients/rest/docs/StepRunEvent.md +36 -0
  110. data/lib/hatchet/clients/rest/docs/StepRunEventList.md +20 -0
  111. data/lib/hatchet/clients/rest/docs/StepRunEventReason.md +15 -0
  112. data/lib/hatchet/clients/rest/docs/StepRunEventSeverity.md +15 -0
  113. data/lib/hatchet/clients/rest/docs/StepRunStatus.md +15 -0
  114. data/lib/hatchet/clients/rest/docs/TaskApi.md +566 -0
  115. data/lib/hatchet/clients/rest/docs/Tenant.md +30 -0
  116. data/lib/hatchet/clients/rest/docs/TenantAlertEmailGroup.md +20 -0
  117. data/lib/hatchet/clients/rest/docs/TenantAlertEmailGroupList.md +20 -0
  118. data/lib/hatchet/clients/rest/docs/TenantAlertingSettings.md +30 -0
  119. data/lib/hatchet/clients/rest/docs/TenantApi.md +1362 -0
  120. data/lib/hatchet/clients/rest/docs/TenantInvite.md +28 -0
  121. data/lib/hatchet/clients/rest/docs/TenantInviteList.md +20 -0
  122. data/lib/hatchet/clients/rest/docs/TenantList.md +20 -0
  123. data/lib/hatchet/clients/rest/docs/TenantMember.md +24 -0
  124. data/lib/hatchet/clients/rest/docs/TenantMemberList.md +20 -0
  125. data/lib/hatchet/clients/rest/docs/TenantMemberRole.md +15 -0
  126. data/lib/hatchet/clients/rest/docs/TenantQueueMetrics.md +22 -0
  127. data/lib/hatchet/clients/rest/docs/TenantResource.md +15 -0
  128. data/lib/hatchet/clients/rest/docs/TenantResourceLimit.md +30 -0
  129. data/lib/hatchet/clients/rest/docs/TenantResourcePolicy.md +18 -0
  130. data/lib/hatchet/clients/rest/docs/TenantStepRunQueueMetrics.md +18 -0
  131. data/lib/hatchet/clients/rest/docs/TenantUIVersion.md +15 -0
  132. data/lib/hatchet/clients/rest/docs/TenantVersion.md +15 -0
  133. data/lib/hatchet/clients/rest/docs/TriggerWorkflowRunRequest.md +20 -0
  134. data/lib/hatchet/clients/rest/docs/UpdateTenantAlertEmailGroupRequest.md +18 -0
  135. data/lib/hatchet/clients/rest/docs/UpdateTenantInviteRequest.md +18 -0
  136. data/lib/hatchet/clients/rest/docs/UpdateTenantRequest.md +34 -0
  137. data/lib/hatchet/clients/rest/docs/UpdateWorkerRequest.md +18 -0
  138. data/lib/hatchet/clients/rest/docs/User.md +28 -0
  139. data/lib/hatchet/clients/rest/docs/UserApi.md +805 -0
  140. data/lib/hatchet/clients/rest/docs/UserChangePasswordRequest.md +20 -0
  141. data/lib/hatchet/clients/rest/docs/UserLoginRequest.md +20 -0
  142. data/lib/hatchet/clients/rest/docs/UserRegisterRequest.md +22 -0
  143. data/lib/hatchet/clients/rest/docs/UserTenantMembershipsList.md +20 -0
  144. data/lib/hatchet/clients/rest/docs/UserTenantPublic.md +20 -0
  145. data/lib/hatchet/clients/rest/docs/V1CancelTaskRequest.md +20 -0
  146. data/lib/hatchet/clients/rest/docs/V1CancelledTasks.md +18 -0
  147. data/lib/hatchet/clients/rest/docs/V1CreateFilterRequest.md +24 -0
  148. data/lib/hatchet/clients/rest/docs/V1DagChildren.md +20 -0
  149. data/lib/hatchet/clients/rest/docs/V1Event.md +36 -0
  150. data/lib/hatchet/clients/rest/docs/V1EventList.md +20 -0
  151. data/lib/hatchet/clients/rest/docs/V1EventTriggeredRun.md +20 -0
  152. data/lib/hatchet/clients/rest/docs/V1EventWorkflowRunSummary.md +26 -0
  153. data/lib/hatchet/clients/rest/docs/V1Filter.md +28 -0
  154. data/lib/hatchet/clients/rest/docs/V1FilterList.md +20 -0
  155. data/lib/hatchet/clients/rest/docs/V1LogLine.md +28 -0
  156. data/lib/hatchet/clients/rest/docs/V1LogLineLevel.md +15 -0
  157. data/lib/hatchet/clients/rest/docs/V1LogLineList.md +20 -0
  158. data/lib/hatchet/clients/rest/docs/V1ReplayTaskRequest.md +20 -0
  159. data/lib/hatchet/clients/rest/docs/V1ReplayedTasks.md +18 -0
  160. data/lib/hatchet/clients/rest/docs/V1TaskEvent.md +38 -0
  161. data/lib/hatchet/clients/rest/docs/V1TaskEventList.md +20 -0
  162. data/lib/hatchet/clients/rest/docs/V1TaskEventType.md +15 -0
  163. data/lib/hatchet/clients/rest/docs/V1TaskFilter.md +26 -0
  164. data/lib/hatchet/clients/rest/docs/V1TaskPointMetric.md +22 -0
  165. data/lib/hatchet/clients/rest/docs/V1TaskPointMetrics.md +18 -0
  166. data/lib/hatchet/clients/rest/docs/V1TaskRunMetric.md +20 -0
  167. data/lib/hatchet/clients/rest/docs/V1TaskRunStatus.md +15 -0
  168. data/lib/hatchet/clients/rest/docs/V1TaskStatus.md +15 -0
  169. data/lib/hatchet/clients/rest/docs/V1TaskSummary.md +72 -0
  170. data/lib/hatchet/clients/rest/docs/V1TaskSummaryList.md +20 -0
  171. data/lib/hatchet/clients/rest/docs/V1TaskTiming.md +46 -0
  172. data/lib/hatchet/clients/rest/docs/V1TaskTimingList.md +20 -0
  173. data/lib/hatchet/clients/rest/docs/V1TriggerWorkflowRunRequest.md +24 -0
  174. data/lib/hatchet/clients/rest/docs/V1UpdateFilterRequest.md +22 -0
  175. data/lib/hatchet/clients/rest/docs/V1WorkflowRun.md +46 -0
  176. data/lib/hatchet/clients/rest/docs/V1WorkflowRunDetails.md +26 -0
  177. data/lib/hatchet/clients/rest/docs/V1WorkflowRunDisplayName.md +20 -0
  178. data/lib/hatchet/clients/rest/docs/V1WorkflowRunDisplayNameList.md +20 -0
  179. data/lib/hatchet/clients/rest/docs/V1WorkflowType.md +15 -0
  180. data/lib/hatchet/clients/rest/docs/WebhookWorker.md +22 -0
  181. data/lib/hatchet/clients/rest/docs/WebhookWorkerCreateRequest.md +22 -0
  182. data/lib/hatchet/clients/rest/docs/WebhookWorkerCreateResponse.md +18 -0
  183. data/lib/hatchet/clients/rest/docs/WebhookWorkerCreated.md +24 -0
  184. data/lib/hatchet/clients/rest/docs/WebhookWorkerListResponse.md +20 -0
  185. data/lib/hatchet/clients/rest/docs/WebhookWorkerRequest.md +22 -0
  186. data/lib/hatchet/clients/rest/docs/WebhookWorkerRequestListResponse.md +18 -0
  187. data/lib/hatchet/clients/rest/docs/WebhookWorkerRequestMethod.md +15 -0
  188. data/lib/hatchet/clients/rest/docs/Worker.md +48 -0
  189. data/lib/hatchet/clients/rest/docs/WorkerApi.md +234 -0
  190. data/lib/hatchet/clients/rest/docs/WorkerLabel.md +22 -0
  191. data/lib/hatchet/clients/rest/docs/WorkerList.md +20 -0
  192. data/lib/hatchet/clients/rest/docs/WorkerRuntimeInfo.md +26 -0
  193. data/lib/hatchet/clients/rest/docs/WorkerRuntimeSDKs.md +15 -0
  194. data/lib/hatchet/clients/rest/docs/WorkerType.md +15 -0
  195. data/lib/hatchet/clients/rest/docs/Workflow.md +32 -0
  196. data/lib/hatchet/clients/rest/docs/WorkflowApi.md +1480 -0
  197. data/lib/hatchet/clients/rest/docs/WorkflowConcurrency.md +22 -0
  198. data/lib/hatchet/clients/rest/docs/WorkflowKind.md +15 -0
  199. data/lib/hatchet/clients/rest/docs/WorkflowList.md +22 -0
  200. data/lib/hatchet/clients/rest/docs/WorkflowMetrics.md +20 -0
  201. data/lib/hatchet/clients/rest/docs/WorkflowRun.md +48 -0
  202. data/lib/hatchet/clients/rest/docs/WorkflowRunApi.md +477 -0
  203. data/lib/hatchet/clients/rest/docs/WorkflowRunList.md +20 -0
  204. data/lib/hatchet/clients/rest/docs/WorkflowRunOrderByDirection.md +15 -0
  205. data/lib/hatchet/clients/rest/docs/WorkflowRunOrderByField.md +15 -0
  206. data/lib/hatchet/clients/rest/docs/WorkflowRunShape.md +50 -0
  207. data/lib/hatchet/clients/rest/docs/WorkflowRunShapeItemForWorkflowRunDetails.md +24 -0
  208. data/lib/hatchet/clients/rest/docs/WorkflowRunStatus.md +15 -0
  209. data/lib/hatchet/clients/rest/docs/WorkflowRunTriggeredBy.md +26 -0
  210. data/lib/hatchet/clients/rest/docs/WorkflowRunsApi.md +572 -0
  211. data/lib/hatchet/clients/rest/docs/WorkflowRunsCancelRequest.md +18 -0
  212. data/lib/hatchet/clients/rest/docs/WorkflowRunsMetrics.md +18 -0
  213. data/lib/hatchet/clients/rest/docs/WorkflowRunsMetricsCounts.md +28 -0
  214. data/lib/hatchet/clients/rest/docs/WorkflowTag.md +20 -0
  215. data/lib/hatchet/clients/rest/docs/WorkflowTriggerCronRef.md +20 -0
  216. data/lib/hatchet/clients/rest/docs/WorkflowTriggerEventRef.md +20 -0
  217. data/lib/hatchet/clients/rest/docs/WorkflowTriggers.md +26 -0
  218. data/lib/hatchet/clients/rest/docs/WorkflowUpdateRequest.md +18 -0
  219. data/lib/hatchet/clients/rest/docs/WorkflowVersion.md +40 -0
  220. data/lib/hatchet/clients/rest/docs/WorkflowVersionDefinition.md +18 -0
  221. data/lib/hatchet/clients/rest/docs/WorkflowVersionMeta.md +26 -0
  222. data/lib/hatchet/clients/rest/docs/WorkflowWorkersCount.md +22 -0
  223. data/lib/hatchet/clients/rest/git_push.sh +57 -0
  224. data/lib/hatchet/clients/rest/hatchet-sdk-rest.gemspec +41 -0
  225. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/api_token_api.rb +242 -0
  226. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/default_api.rb +622 -0
  227. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/event_api.rb +836 -0
  228. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/filter_api.rb +449 -0
  229. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/github_api.rb +107 -0
  230. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/healthcheck_api.rb +132 -0
  231. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/log_api.rb +182 -0
  232. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/metadata_api.rb +193 -0
  233. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/rate_limits_api.rb +108 -0
  234. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/slack_api.rb +164 -0
  235. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/sns_api.rb +242 -0
  236. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb +615 -0
  237. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb +599 -0
  238. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +1327 -0
  239. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/user_api.rb +729 -0
  240. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/worker_api.rb +246 -0
  241. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_api.rb +1654 -0
  242. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_run_api.rb +540 -0
  243. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_runs_api.rb +614 -0
  244. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_client.rb +437 -0
  245. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_error.rb +58 -0
  246. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/configuration.rb +399 -0
  247. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/accept_invite_request.rb +255 -0
  248. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_error.rb +268 -0
  249. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_errors.rb +239 -0
  250. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta.rb +279 -0
  251. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta_auth.rb +223 -0
  252. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta_integration.rb +265 -0
  253. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta_posthog.rb +231 -0
  254. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_resource_meta.rb +310 -0
  255. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_token.rb +300 -0
  256. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/bulk_create_event_request.rb +239 -0
  257. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cancel_event_request.rb +239 -0
  258. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/concurrency_limit_strategy.rb +42 -0
  259. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_request.rb +257 -0
  260. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_response.rb +238 -0
  261. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_cron_workflow_trigger_request.rb +352 -0
  262. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_event_request.rb +295 -0
  263. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_pull_request_from_step_run.rb +237 -0
  264. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_sns_integration_request.rb +238 -0
  265. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_alert_email_group_request.rb +240 -0
  266. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_invite_request.rb +287 -0
  267. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_request.rb +307 -0
  268. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows.rb +509 -0
  269. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows_list.rb +231 -0
  270. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows_method.rb +40 -0
  271. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows_order_by_field.rb +40 -0
  272. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event.rb +321 -0
  273. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_data.rb +238 -0
  274. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_key_list.rb +231 -0
  275. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_list.rb +231 -0
  276. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_order_by_direction.rb +40 -0
  277. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_order_by_field.rb +39 -0
  278. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_update_cancel200_response.rb +222 -0
  279. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_workflow_run_summary.rb +271 -0
  280. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/events.rb +266 -0
  281. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/get_step_run_diff_response.rb +239 -0
  282. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/info_get_version200_response.rb +237 -0
  283. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job.rb +363 -0
  284. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job_run.rb +464 -0
  285. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job_run_status.rb +44 -0
  286. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_api_tokens_response.rb +231 -0
  287. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_pull_requests_response.rb +239 -0
  288. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_slack_webhooks.rb +265 -0
  289. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_sns_integrations.rb +265 -0
  290. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line.rb +292 -0
  291. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_level.rb +42 -0
  292. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_list.rb +231 -0
  293. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_order_by_direction.rb +40 -0
  294. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_order_by_field.rb +39 -0
  295. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pagination_response.rb +241 -0
  296. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pull_request.rb +441 -0
  297. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pull_request_state.rb +40 -0
  298. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/queue_metrics.rb +292 -0
  299. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit.rb +373 -0
  300. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit_list.rb +231 -0
  301. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit_order_by_direction.rb +40 -0
  302. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit_order_by_field.rb +41 -0
  303. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/recent_step_runs.rb +365 -0
  304. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/reject_invite_request.rb +255 -0
  305. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/replay_event_request.rb +239 -0
  306. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/replay_workflow_runs_request.rb +239 -0
  307. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/replay_workflow_runs_response.rb +239 -0
  308. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rerun_step_run_request.rb +237 -0
  309. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/schedule_workflow_run_request.rb +326 -0
  310. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_run_status.rb +45 -0
  311. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows.rb +538 -0
  312. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows_list.rb +231 -0
  313. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows_method.rb +40 -0
  314. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows_order_by_field.rb +40 -0
  315. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/semaphore_slots.rb +343 -0
  316. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/slack_webhook.rb +372 -0
  317. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/sns_integration.rb +301 -0
  318. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step.rb +374 -0
  319. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run.rb +556 -0
  320. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb +432 -0
  321. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive_list.rb +231 -0
  322. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_diff.rb +289 -0
  323. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event.rb +442 -0
  324. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event_list.rb +231 -0
  325. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event_reason.rb +55 -0
  326. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event_severity.rb +41 -0
  327. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_status.rb +47 -0
  328. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant.rb +370 -0
  329. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_alert_email_group.rb +266 -0
  330. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_alert_email_group_list.rb +231 -0
  331. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_alerting_settings.rb +314 -0
  332. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_invite.rb +377 -0
  333. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_invite_list.rb +231 -0
  334. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_list.rb +231 -0
  335. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member.rb +323 -0
  336. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member_list.rb +231 -0
  337. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member_role.rb +41 -0
  338. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_queue_metrics.rb +243 -0
  339. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource.rb +45 -0
  340. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource_limit.rb +370 -0
  341. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource_policy.rb +240 -0
  342. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_step_run_queue_metrics.rb +220 -0
  343. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_ui_version.rb +40 -0
  344. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_version.rb +40 -0
  345. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_workflow_run_request.rb +246 -0
  346. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_alert_email_group_request.rb +240 -0
  347. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_invite_request.rb +260 -0
  348. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_request.rb +323 -0
  349. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_worker_request.rb +221 -0
  350. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user.rb +321 -0
  351. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_change_password_request.rb +265 -0
  352. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_login_request.rb +265 -0
  353. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_register_request.rb +292 -0
  354. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_tenant_memberships_list.rb +231 -0
  355. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_tenant_public.rb +248 -0
  356. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_cancel_task_request.rb +232 -0
  357. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_cancelled_tasks.rb +223 -0
  358. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_filter_request.rb +320 -0
  359. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_dag_children.rb +231 -0
  360. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event.rb +380 -0
  361. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_list.rb +231 -0
  362. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_triggered_run.rb +266 -0
  363. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_workflow_run_summary.rb +346 -0
  364. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_filter.rb +390 -0
  365. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_filter_list.rb +231 -0
  366. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line.rb +344 -0
  367. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line_level.rb +42 -0
  368. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line_list.rb +231 -0
  369. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_replay_task_request.rb +232 -0
  370. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_replayed_tasks.rb +223 -0
  371. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event.rb +419 -0
  372. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_list.rb +231 -0
  373. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_type.rb +58 -0
  374. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_filter.rb +279 -0
  375. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_point_metric.rb +289 -0
  376. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_point_metrics.rb +222 -0
  377. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_metric.rb +285 -0
  378. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_status.rb +43 -0
  379. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_status.rb +43 -0
  380. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb +812 -0
  381. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary_list.rb +266 -0
  382. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing.rb +581 -0
  383. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing_list.rb +266 -0
  384. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb +283 -0
  385. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_filter_request.rb +241 -0
  386. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run.rb +544 -0
  387. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run_details.rb +331 -0
  388. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run_display_name.rb +263 -0
  389. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run_display_name_list.rb +266 -0
  390. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_type.rb +40 -0
  391. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker.rb +291 -0
  392. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_create_request.rb +294 -0
  393. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_create_response.rb +220 -0
  394. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_created.rb +318 -0
  395. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_list_response.rb +231 -0
  396. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_request.rb +314 -0
  397. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_request_list_response.rb +223 -0
  398. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_request_method.rb +41 -0
  399. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker.rb +489 -0
  400. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_label.rb +274 -0
  401. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_list.rb +231 -0
  402. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_runtime_info.rb +278 -0
  403. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_runtime_sdks.rb +41 -0
  404. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_type.rb +41 -0
  405. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow.rb +346 -0
  406. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_concurrency.rb +314 -0
  407. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_kind.rb +41 -0
  408. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_list.rb +240 -0
  409. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_metrics.rb +231 -0
  410. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run.rb +524 -0
  411. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_list.rb +231 -0
  412. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_order_by_direction.rb +40 -0
  413. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_order_by_field.rb +42 -0
  414. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_shape.rb +533 -0
  415. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_shape_item_for_workflow_run_details.rb +353 -0
  416. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_status.rb +45 -0
  417. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_triggered_by.rb +273 -0
  418. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_runs_cancel_request.rb +239 -0
  419. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_runs_metrics.rb +220 -0
  420. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_runs_metrics_counts.rb +265 -0
  421. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_tag.rb +265 -0
  422. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_trigger_cron_ref.rb +229 -0
  423. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_trigger_event_ref.rb +229 -0
  424. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_triggers.rb +260 -0
  425. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_update_request.rb +221 -0
  426. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version.rb +392 -0
  427. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_definition.rb +238 -0
  428. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_meta.rb +325 -0
  429. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_workers_count.rb +238 -0
  430. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/version.rb +15 -0
  431. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +241 -0
  432. data/lib/hatchet/clients/rest/spec/spec_helper.rb +111 -0
  433. data/lib/hatchet/clients/rest.rb +126 -0
  434. data/lib/hatchet/clients.rb +71 -0
  435. data/lib/hatchet/config.rb +482 -0
  436. data/lib/hatchet/features/events.rb +265 -0
  437. data/lib/hatchet/features/runs.rb +423 -0
  438. data/lib/hatchet/version.rb +1 -1
  439. data/lib/hatchet-sdk.rb +74 -3
  440. data/scripts/generate.sh +167 -0
  441. data/scripts/generate_api.rb +174 -0
  442. data/sig/hatchet-sdk.rbs +525 -1
  443. metadata +491 -1
@@ -0,0 +1,1654 @@
1
+ =begin
2
+ #Hatchet API
3
+
4
+ #The Hatchet API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module HatchetSdkRest
16
+ class WorkflowApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get cron job workflows
23
+ # Get all cron job workflow triggers for a tenant
24
+ # @param tenant [String] The tenant id
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Integer] :offset The number to skip
27
+ # @option opts [Integer] :limit The number to limit by
28
+ # @option opts [String] :workflow_id The workflow id to get runs for.
29
+ # @option opts [String] :workflow_name The workflow name to get runs for.
30
+ # @option opts [String] :cron_name The cron name to get runs for.
31
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
32
+ # @option opts [CronWorkflowsOrderByField] :order_by_field The order by field
33
+ # @option opts [WorkflowRunOrderByDirection] :order_by_direction The order by direction
34
+ # @return [CronWorkflowsList]
35
+ def cron_workflow_list(tenant, opts = {})
36
+ data, _status_code, _headers = cron_workflow_list_with_http_info(tenant, opts)
37
+ data
38
+ end
39
+
40
+ # Get cron job workflows
41
+ # Get all cron job workflow triggers for a tenant
42
+ # @param tenant [String] The tenant id
43
+ # @param [Hash] opts the optional parameters
44
+ # @option opts [Integer] :offset The number to skip
45
+ # @option opts [Integer] :limit The number to limit by
46
+ # @option opts [String] :workflow_id The workflow id to get runs for.
47
+ # @option opts [String] :workflow_name The workflow name to get runs for.
48
+ # @option opts [String] :cron_name The cron name to get runs for.
49
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
50
+ # @option opts [CronWorkflowsOrderByField] :order_by_field The order by field
51
+ # @option opts [WorkflowRunOrderByDirection] :order_by_direction The order by direction
52
+ # @return [Array<(CronWorkflowsList, Integer, Hash)>] CronWorkflowsList data, response status code and response headers
53
+ def cron_workflow_list_with_http_info(tenant, opts = {})
54
+ if @api_client.config.debugging
55
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.cron_workflow_list ...'
56
+ end
57
+ # verify the required parameter 'tenant' is set
58
+ if @api_client.config.client_side_validation && tenant.nil?
59
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.cron_workflow_list"
60
+ end
61
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
62
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.cron_workflow_list, the character length must be smaller than or equal to 36.'
63
+ end
64
+
65
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
66
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.cron_workflow_list, the character length must be greater than or equal to 36.'
67
+ end
68
+
69
+ if @api_client.config.client_side_validation && !opts[:'workflow_id'].nil? && opts[:'workflow_id'].to_s.length > 36
70
+ fail ArgumentError, 'invalid value for "opts[:"workflow_id"]" when calling WorkflowApi.cron_workflow_list, the character length must be smaller than or equal to 36.'
71
+ end
72
+
73
+ if @api_client.config.client_side_validation && !opts[:'workflow_id'].nil? && opts[:'workflow_id'].to_s.length < 36
74
+ fail ArgumentError, 'invalid value for "opts[:"workflow_id"]" when calling WorkflowApi.cron_workflow_list, the character length must be greater than or equal to 36.'
75
+ end
76
+
77
+ # resource path
78
+ local_var_path = '/api/v1/tenants/{tenant}/workflows/crons'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
79
+
80
+ # query parameters
81
+ query_params = opts[:query_params] || {}
82
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
83
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
84
+ query_params[:'workflowId'] = opts[:'workflow_id'] if !opts[:'workflow_id'].nil?
85
+ query_params[:'workflowName'] = opts[:'workflow_name'] if !opts[:'workflow_name'].nil?
86
+ query_params[:'cronName'] = opts[:'cron_name'] if !opts[:'cron_name'].nil?
87
+ query_params[:'additionalMetadata'] = @api_client.build_collection_param(opts[:'additional_metadata'], :multi) if !opts[:'additional_metadata'].nil?
88
+ query_params[:'orderByField'] = opts[:'order_by_field'] if !opts[:'order_by_field'].nil?
89
+ query_params[:'orderByDirection'] = opts[:'order_by_direction'] if !opts[:'order_by_direction'].nil?
90
+
91
+ # header parameters
92
+ header_params = opts[:header_params] || {}
93
+ # HTTP header 'Accept' (if needed)
94
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
95
+
96
+ # form parameters
97
+ form_params = opts[:form_params] || {}
98
+
99
+ # http body (model)
100
+ post_body = opts[:debug_body]
101
+
102
+ # return_type
103
+ return_type = opts[:debug_return_type] || 'CronWorkflowsList'
104
+
105
+ # auth_names
106
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
107
+
108
+ new_options = opts.merge(
109
+ :operation => :"WorkflowApi.cron_workflow_list",
110
+ :header_params => header_params,
111
+ :query_params => query_params,
112
+ :form_params => form_params,
113
+ :body => post_body,
114
+ :auth_names => auth_names,
115
+ :return_type => return_type
116
+ )
117
+
118
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "API called: WorkflowApi#cron_workflow_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
121
+ end
122
+ return data, status_code, headers
123
+ end
124
+
125
+ # Get workflow metrics
126
+ # Get the queue metrics for the tenant
127
+ # @param tenant [String] The tenant id
128
+ # @param [Hash] opts the optional parameters
129
+ # @option opts [Array<String>] :workflows A list of workflow IDs to filter by
130
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
131
+ # @return [TenantQueueMetrics]
132
+ def tenant_get_queue_metrics(tenant, opts = {})
133
+ data, _status_code, _headers = tenant_get_queue_metrics_with_http_info(tenant, opts)
134
+ data
135
+ end
136
+
137
+ # Get workflow metrics
138
+ # Get the queue metrics for the tenant
139
+ # @param tenant [String] The tenant id
140
+ # @param [Hash] opts the optional parameters
141
+ # @option opts [Array<String>] :workflows A list of workflow IDs to filter by
142
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
143
+ # @return [Array<(TenantQueueMetrics, Integer, Hash)>] TenantQueueMetrics data, response status code and response headers
144
+ def tenant_get_queue_metrics_with_http_info(tenant, opts = {})
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.tenant_get_queue_metrics ...'
147
+ end
148
+ # verify the required parameter 'tenant' is set
149
+ if @api_client.config.client_side_validation && tenant.nil?
150
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.tenant_get_queue_metrics"
151
+ end
152
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
153
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.tenant_get_queue_metrics, the character length must be smaller than or equal to 36.'
154
+ end
155
+
156
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
157
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.tenant_get_queue_metrics, the character length must be greater than or equal to 36.'
158
+ end
159
+
160
+ # resource path
161
+ local_var_path = '/api/v1/tenants/{tenant}/queue-metrics'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
162
+
163
+ # query parameters
164
+ query_params = opts[:query_params] || {}
165
+ query_params[:'workflows'] = @api_client.build_collection_param(opts[:'workflows'], :multi) if !opts[:'workflows'].nil?
166
+ query_params[:'additionalMetadata'] = @api_client.build_collection_param(opts[:'additional_metadata'], :multi) if !opts[:'additional_metadata'].nil?
167
+
168
+ # header parameters
169
+ header_params = opts[:header_params] || {}
170
+ # HTTP header 'Accept' (if needed)
171
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
172
+
173
+ # form parameters
174
+ form_params = opts[:form_params] || {}
175
+
176
+ # http body (model)
177
+ post_body = opts[:debug_body]
178
+
179
+ # return_type
180
+ return_type = opts[:debug_return_type] || 'TenantQueueMetrics'
181
+
182
+ # auth_names
183
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
184
+
185
+ new_options = opts.merge(
186
+ :operation => :"WorkflowApi.tenant_get_queue_metrics",
187
+ :header_params => header_params,
188
+ :query_params => query_params,
189
+ :form_params => form_params,
190
+ :body => post_body,
191
+ :auth_names => auth_names,
192
+ :return_type => return_type
193
+ )
194
+
195
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
196
+ if @api_client.config.debugging
197
+ @api_client.config.logger.debug "API called: WorkflowApi#tenant_get_queue_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
+ end
199
+ return data, status_code, headers
200
+ end
201
+
202
+ # Delete cron job workflow run
203
+ # Delete a cron job workflow run for a tenant
204
+ # @param tenant [String] The tenant id
205
+ # @param cron_workflow [String] The cron job id
206
+ # @param [Hash] opts the optional parameters
207
+ # @return [nil]
208
+ def workflow_cron_delete(tenant, cron_workflow, opts = {})
209
+ workflow_cron_delete_with_http_info(tenant, cron_workflow, opts)
210
+ nil
211
+ end
212
+
213
+ # Delete cron job workflow run
214
+ # Delete a cron job workflow run for a tenant
215
+ # @param tenant [String] The tenant id
216
+ # @param cron_workflow [String] The cron job id
217
+ # @param [Hash] opts the optional parameters
218
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
219
+ def workflow_cron_delete_with_http_info(tenant, cron_workflow, opts = {})
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_cron_delete ...'
222
+ end
223
+ # verify the required parameter 'tenant' is set
224
+ if @api_client.config.client_side_validation && tenant.nil?
225
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_cron_delete"
226
+ end
227
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
228
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_cron_delete, the character length must be smaller than or equal to 36.'
229
+ end
230
+
231
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
232
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_cron_delete, the character length must be greater than or equal to 36.'
233
+ end
234
+
235
+ # verify the required parameter 'cron_workflow' is set
236
+ if @api_client.config.client_side_validation && cron_workflow.nil?
237
+ fail ArgumentError, "Missing the required parameter 'cron_workflow' when calling WorkflowApi.workflow_cron_delete"
238
+ end
239
+ if @api_client.config.client_side_validation && cron_workflow.to_s.length > 36
240
+ fail ArgumentError, 'invalid value for "cron_workflow" when calling WorkflowApi.workflow_cron_delete, the character length must be smaller than or equal to 36.'
241
+ end
242
+
243
+ if @api_client.config.client_side_validation && cron_workflow.to_s.length < 36
244
+ fail ArgumentError, 'invalid value for "cron_workflow" when calling WorkflowApi.workflow_cron_delete, the character length must be greater than or equal to 36.'
245
+ end
246
+
247
+ # resource path
248
+ local_var_path = '/api/v1/tenants/{tenant}/workflows/crons/{cron-workflow}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'cron-workflow' + '}', CGI.escape(cron_workflow.to_s))
249
+
250
+ # query parameters
251
+ query_params = opts[:query_params] || {}
252
+
253
+ # header parameters
254
+ header_params = opts[:header_params] || {}
255
+ # HTTP header 'Accept' (if needed)
256
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
257
+
258
+ # form parameters
259
+ form_params = opts[:form_params] || {}
260
+
261
+ # http body (model)
262
+ post_body = opts[:debug_body]
263
+
264
+ # return_type
265
+ return_type = opts[:debug_return_type]
266
+
267
+ # auth_names
268
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
269
+
270
+ new_options = opts.merge(
271
+ :operation => :"WorkflowApi.workflow_cron_delete",
272
+ :header_params => header_params,
273
+ :query_params => query_params,
274
+ :form_params => form_params,
275
+ :body => post_body,
276
+ :auth_names => auth_names,
277
+ :return_type => return_type
278
+ )
279
+
280
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
281
+ if @api_client.config.debugging
282
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_cron_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
283
+ end
284
+ return data, status_code, headers
285
+ end
286
+
287
+ # Get cron job workflow run
288
+ # Get a cron job workflow run for a tenant
289
+ # @param tenant [String] The tenant id
290
+ # @param cron_workflow [String] The cron job id
291
+ # @param [Hash] opts the optional parameters
292
+ # @return [CronWorkflows]
293
+ def workflow_cron_get(tenant, cron_workflow, opts = {})
294
+ data, _status_code, _headers = workflow_cron_get_with_http_info(tenant, cron_workflow, opts)
295
+ data
296
+ end
297
+
298
+ # Get cron job workflow run
299
+ # Get a cron job workflow run for a tenant
300
+ # @param tenant [String] The tenant id
301
+ # @param cron_workflow [String] The cron job id
302
+ # @param [Hash] opts the optional parameters
303
+ # @return [Array<(CronWorkflows, Integer, Hash)>] CronWorkflows data, response status code and response headers
304
+ def workflow_cron_get_with_http_info(tenant, cron_workflow, opts = {})
305
+ if @api_client.config.debugging
306
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_cron_get ...'
307
+ end
308
+ # verify the required parameter 'tenant' is set
309
+ if @api_client.config.client_side_validation && tenant.nil?
310
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_cron_get"
311
+ end
312
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
313
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_cron_get, the character length must be smaller than or equal to 36.'
314
+ end
315
+
316
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
317
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_cron_get, the character length must be greater than or equal to 36.'
318
+ end
319
+
320
+ # verify the required parameter 'cron_workflow' is set
321
+ if @api_client.config.client_side_validation && cron_workflow.nil?
322
+ fail ArgumentError, "Missing the required parameter 'cron_workflow' when calling WorkflowApi.workflow_cron_get"
323
+ end
324
+ if @api_client.config.client_side_validation && cron_workflow.to_s.length > 36
325
+ fail ArgumentError, 'invalid value for "cron_workflow" when calling WorkflowApi.workflow_cron_get, the character length must be smaller than or equal to 36.'
326
+ end
327
+
328
+ if @api_client.config.client_side_validation && cron_workflow.to_s.length < 36
329
+ fail ArgumentError, 'invalid value for "cron_workflow" when calling WorkflowApi.workflow_cron_get, the character length must be greater than or equal to 36.'
330
+ end
331
+
332
+ # resource path
333
+ local_var_path = '/api/v1/tenants/{tenant}/workflows/crons/{cron-workflow}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'cron-workflow' + '}', CGI.escape(cron_workflow.to_s))
334
+
335
+ # query parameters
336
+ query_params = opts[:query_params] || {}
337
+
338
+ # header parameters
339
+ header_params = opts[:header_params] || {}
340
+ # HTTP header 'Accept' (if needed)
341
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
342
+
343
+ # form parameters
344
+ form_params = opts[:form_params] || {}
345
+
346
+ # http body (model)
347
+ post_body = opts[:debug_body]
348
+
349
+ # return_type
350
+ return_type = opts[:debug_return_type] || 'CronWorkflows'
351
+
352
+ # auth_names
353
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
354
+
355
+ new_options = opts.merge(
356
+ :operation => :"WorkflowApi.workflow_cron_get",
357
+ :header_params => header_params,
358
+ :query_params => query_params,
359
+ :form_params => form_params,
360
+ :body => post_body,
361
+ :auth_names => auth_names,
362
+ :return_type => return_type
363
+ )
364
+
365
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_cron_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
368
+ end
369
+ return data, status_code, headers
370
+ end
371
+
372
+ # Delete workflow
373
+ # Delete a workflow for a tenant
374
+ # @param workflow [String] The workflow id
375
+ # @param [Hash] opts the optional parameters
376
+ # @return [nil]
377
+ def workflow_delete(workflow, opts = {})
378
+ workflow_delete_with_http_info(workflow, opts)
379
+ nil
380
+ end
381
+
382
+ # Delete workflow
383
+ # Delete a workflow for a tenant
384
+ # @param workflow [String] The workflow id
385
+ # @param [Hash] opts the optional parameters
386
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
387
+ def workflow_delete_with_http_info(workflow, opts = {})
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_delete ...'
390
+ end
391
+ # verify the required parameter 'workflow' is set
392
+ if @api_client.config.client_side_validation && workflow.nil?
393
+ fail ArgumentError, "Missing the required parameter 'workflow' when calling WorkflowApi.workflow_delete"
394
+ end
395
+ if @api_client.config.client_side_validation && workflow.to_s.length > 36
396
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_delete, the character length must be smaller than or equal to 36.'
397
+ end
398
+
399
+ if @api_client.config.client_side_validation && workflow.to_s.length < 36
400
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_delete, the character length must be greater than or equal to 36.'
401
+ end
402
+
403
+ # resource path
404
+ local_var_path = '/api/v1/workflows/{workflow}'.sub('{' + 'workflow' + '}', CGI.escape(workflow.to_s))
405
+
406
+ # query parameters
407
+ query_params = opts[:query_params] || {}
408
+
409
+ # header parameters
410
+ header_params = opts[:header_params] || {}
411
+ # HTTP header 'Accept' (if needed)
412
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
413
+
414
+ # form parameters
415
+ form_params = opts[:form_params] || {}
416
+
417
+ # http body (model)
418
+ post_body = opts[:debug_body]
419
+
420
+ # return_type
421
+ return_type = opts[:debug_return_type]
422
+
423
+ # auth_names
424
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
425
+
426
+ new_options = opts.merge(
427
+ :operation => :"WorkflowApi.workflow_delete",
428
+ :header_params => header_params,
429
+ :query_params => query_params,
430
+ :form_params => form_params,
431
+ :body => post_body,
432
+ :auth_names => auth_names,
433
+ :return_type => return_type
434
+ )
435
+
436
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
437
+ if @api_client.config.debugging
438
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
439
+ end
440
+ return data, status_code, headers
441
+ end
442
+
443
+ # Get workflow
444
+ # Get a workflow for a tenant
445
+ # @param workflow [String] The workflow id
446
+ # @param [Hash] opts the optional parameters
447
+ # @return [Workflow]
448
+ def workflow_get(workflow, opts = {})
449
+ data, _status_code, _headers = workflow_get_with_http_info(workflow, opts)
450
+ data
451
+ end
452
+
453
+ # Get workflow
454
+ # Get a workflow for a tenant
455
+ # @param workflow [String] The workflow id
456
+ # @param [Hash] opts the optional parameters
457
+ # @return [Array<(Workflow, Integer, Hash)>] Workflow data, response status code and response headers
458
+ def workflow_get_with_http_info(workflow, opts = {})
459
+ if @api_client.config.debugging
460
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_get ...'
461
+ end
462
+ # verify the required parameter 'workflow' is set
463
+ if @api_client.config.client_side_validation && workflow.nil?
464
+ fail ArgumentError, "Missing the required parameter 'workflow' when calling WorkflowApi.workflow_get"
465
+ end
466
+ if @api_client.config.client_side_validation && workflow.to_s.length > 36
467
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_get, the character length must be smaller than or equal to 36.'
468
+ end
469
+
470
+ if @api_client.config.client_side_validation && workflow.to_s.length < 36
471
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_get, the character length must be greater than or equal to 36.'
472
+ end
473
+
474
+ # resource path
475
+ local_var_path = '/api/v1/workflows/{workflow}'.sub('{' + 'workflow' + '}', CGI.escape(workflow.to_s))
476
+
477
+ # query parameters
478
+ query_params = opts[:query_params] || {}
479
+
480
+ # header parameters
481
+ header_params = opts[:header_params] || {}
482
+ # HTTP header 'Accept' (if needed)
483
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
484
+
485
+ # form parameters
486
+ form_params = opts[:form_params] || {}
487
+
488
+ # http body (model)
489
+ post_body = opts[:debug_body]
490
+
491
+ # return_type
492
+ return_type = opts[:debug_return_type] || 'Workflow'
493
+
494
+ # auth_names
495
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
496
+
497
+ new_options = opts.merge(
498
+ :operation => :"WorkflowApi.workflow_get",
499
+ :header_params => header_params,
500
+ :query_params => query_params,
501
+ :form_params => form_params,
502
+ :body => post_body,
503
+ :auth_names => auth_names,
504
+ :return_type => return_type
505
+ )
506
+
507
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
508
+ if @api_client.config.debugging
509
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
510
+ end
511
+ return data, status_code, headers
512
+ end
513
+
514
+ # Get workflow metrics
515
+ # Get the metrics for a workflow version
516
+ # @param workflow [String] The workflow id
517
+ # @param [Hash] opts the optional parameters
518
+ # @option opts [WorkflowRunStatus] :status A status of workflow run statuses to filter by
519
+ # @option opts [String] :group_key A group key to filter metrics by
520
+ # @return [WorkflowMetrics]
521
+ def workflow_get_metrics(workflow, opts = {})
522
+ data, _status_code, _headers = workflow_get_metrics_with_http_info(workflow, opts)
523
+ data
524
+ end
525
+
526
+ # Get workflow metrics
527
+ # Get the metrics for a workflow version
528
+ # @param workflow [String] The workflow id
529
+ # @param [Hash] opts the optional parameters
530
+ # @option opts [WorkflowRunStatus] :status A status of workflow run statuses to filter by
531
+ # @option opts [String] :group_key A group key to filter metrics by
532
+ # @return [Array<(WorkflowMetrics, Integer, Hash)>] WorkflowMetrics data, response status code and response headers
533
+ def workflow_get_metrics_with_http_info(workflow, opts = {})
534
+ if @api_client.config.debugging
535
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_get_metrics ...'
536
+ end
537
+ # verify the required parameter 'workflow' is set
538
+ if @api_client.config.client_side_validation && workflow.nil?
539
+ fail ArgumentError, "Missing the required parameter 'workflow' when calling WorkflowApi.workflow_get_metrics"
540
+ end
541
+ if @api_client.config.client_side_validation && workflow.to_s.length > 36
542
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_get_metrics, the character length must be smaller than or equal to 36.'
543
+ end
544
+
545
+ if @api_client.config.client_side_validation && workflow.to_s.length < 36
546
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_get_metrics, the character length must be greater than or equal to 36.'
547
+ end
548
+
549
+ # resource path
550
+ local_var_path = '/api/v1/workflows/{workflow}/metrics'.sub('{' + 'workflow' + '}', CGI.escape(workflow.to_s))
551
+
552
+ # query parameters
553
+ query_params = opts[:query_params] || {}
554
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
555
+ query_params[:'groupKey'] = opts[:'group_key'] if !opts[:'group_key'].nil?
556
+
557
+ # header parameters
558
+ header_params = opts[:header_params] || {}
559
+ # HTTP header 'Accept' (if needed)
560
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
561
+
562
+ # form parameters
563
+ form_params = opts[:form_params] || {}
564
+
565
+ # http body (model)
566
+ post_body = opts[:debug_body]
567
+
568
+ # return_type
569
+ return_type = opts[:debug_return_type] || 'WorkflowMetrics'
570
+
571
+ # auth_names
572
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
573
+
574
+ new_options = opts.merge(
575
+ :operation => :"WorkflowApi.workflow_get_metrics",
576
+ :header_params => header_params,
577
+ :query_params => query_params,
578
+ :form_params => form_params,
579
+ :body => post_body,
580
+ :auth_names => auth_names,
581
+ :return_type => return_type
582
+ )
583
+
584
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
585
+ if @api_client.config.debugging
586
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_get_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
587
+ end
588
+ return data, status_code, headers
589
+ end
590
+
591
+ # Get workflow worker count
592
+ # Get a count of the workers available for workflow
593
+ # @param tenant [String] The tenant id
594
+ # @param workflow [String] The workflow id
595
+ # @param [Hash] opts the optional parameters
596
+ # @return [WorkflowWorkersCount]
597
+ def workflow_get_workers_count(tenant, workflow, opts = {})
598
+ data, _status_code, _headers = workflow_get_workers_count_with_http_info(tenant, workflow, opts)
599
+ data
600
+ end
601
+
602
+ # Get workflow worker count
603
+ # Get a count of the workers available for workflow
604
+ # @param tenant [String] The tenant id
605
+ # @param workflow [String] The workflow id
606
+ # @param [Hash] opts the optional parameters
607
+ # @return [Array<(WorkflowWorkersCount, Integer, Hash)>] WorkflowWorkersCount data, response status code and response headers
608
+ def workflow_get_workers_count_with_http_info(tenant, workflow, opts = {})
609
+ if @api_client.config.debugging
610
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_get_workers_count ...'
611
+ end
612
+ # verify the required parameter 'tenant' is set
613
+ if @api_client.config.client_side_validation && tenant.nil?
614
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_get_workers_count"
615
+ end
616
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
617
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_get_workers_count, the character length must be smaller than or equal to 36.'
618
+ end
619
+
620
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
621
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_get_workers_count, the character length must be greater than or equal to 36.'
622
+ end
623
+
624
+ # verify the required parameter 'workflow' is set
625
+ if @api_client.config.client_side_validation && workflow.nil?
626
+ fail ArgumentError, "Missing the required parameter 'workflow' when calling WorkflowApi.workflow_get_workers_count"
627
+ end
628
+ if @api_client.config.client_side_validation && workflow.to_s.length > 36
629
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_get_workers_count, the character length must be smaller than or equal to 36.'
630
+ end
631
+
632
+ if @api_client.config.client_side_validation && workflow.to_s.length < 36
633
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_get_workers_count, the character length must be greater than or equal to 36.'
634
+ end
635
+
636
+ # resource path
637
+ local_var_path = '/api/v1/tenants/{tenant}/workflows/{workflow}/worker-count'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'workflow' + '}', CGI.escape(workflow.to_s))
638
+
639
+ # query parameters
640
+ query_params = opts[:query_params] || {}
641
+
642
+ # header parameters
643
+ header_params = opts[:header_params] || {}
644
+ # HTTP header 'Accept' (if needed)
645
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
646
+
647
+ # form parameters
648
+ form_params = opts[:form_params] || {}
649
+
650
+ # http body (model)
651
+ post_body = opts[:debug_body]
652
+
653
+ # return_type
654
+ return_type = opts[:debug_return_type] || 'WorkflowWorkersCount'
655
+
656
+ # auth_names
657
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
658
+
659
+ new_options = opts.merge(
660
+ :operation => :"WorkflowApi.workflow_get_workers_count",
661
+ :header_params => header_params,
662
+ :query_params => query_params,
663
+ :form_params => form_params,
664
+ :body => post_body,
665
+ :auth_names => auth_names,
666
+ :return_type => return_type
667
+ )
668
+
669
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
670
+ if @api_client.config.debugging
671
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_get_workers_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
672
+ end
673
+ return data, status_code, headers
674
+ end
675
+
676
+ # Get workflows
677
+ # Get all workflows for a tenant
678
+ # @param tenant [String] The tenant id
679
+ # @param [Hash] opts the optional parameters
680
+ # @option opts [Integer] :offset The number to skip (default to 0)
681
+ # @option opts [Integer] :limit The number to limit by (default to 50)
682
+ # @option opts [String] :name Search by name
683
+ # @return [WorkflowList]
684
+ def workflow_list(tenant, opts = {})
685
+ data, _status_code, _headers = workflow_list_with_http_info(tenant, opts)
686
+ data
687
+ end
688
+
689
+ # Get workflows
690
+ # Get all workflows for a tenant
691
+ # @param tenant [String] The tenant id
692
+ # @param [Hash] opts the optional parameters
693
+ # @option opts [Integer] :offset The number to skip (default to 0)
694
+ # @option opts [Integer] :limit The number to limit by (default to 50)
695
+ # @option opts [String] :name Search by name
696
+ # @return [Array<(WorkflowList, Integer, Hash)>] WorkflowList data, response status code and response headers
697
+ def workflow_list_with_http_info(tenant, opts = {})
698
+ if @api_client.config.debugging
699
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_list ...'
700
+ end
701
+ # verify the required parameter 'tenant' is set
702
+ if @api_client.config.client_side_validation && tenant.nil?
703
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_list"
704
+ end
705
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
706
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_list, the character length must be smaller than or equal to 36.'
707
+ end
708
+
709
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
710
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_list, the character length must be greater than or equal to 36.'
711
+ end
712
+
713
+ # resource path
714
+ local_var_path = '/api/v1/tenants/{tenant}/workflows'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
715
+
716
+ # query parameters
717
+ query_params = opts[:query_params] || {}
718
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
719
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
720
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
721
+
722
+ # header parameters
723
+ header_params = opts[:header_params] || {}
724
+ # HTTP header 'Accept' (if needed)
725
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
726
+
727
+ # form parameters
728
+ form_params = opts[:form_params] || {}
729
+
730
+ # http body (model)
731
+ post_body = opts[:debug_body]
732
+
733
+ # return_type
734
+ return_type = opts[:debug_return_type] || 'WorkflowList'
735
+
736
+ # auth_names
737
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
738
+
739
+ new_options = opts.merge(
740
+ :operation => :"WorkflowApi.workflow_list",
741
+ :header_params => header_params,
742
+ :query_params => query_params,
743
+ :form_params => form_params,
744
+ :body => post_body,
745
+ :auth_names => auth_names,
746
+ :return_type => return_type
747
+ )
748
+
749
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
750
+ if @api_client.config.debugging
751
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
752
+ end
753
+ return data, status_code, headers
754
+ end
755
+
756
+ # Get workflow run
757
+ # Get a workflow run for a tenant
758
+ # @param tenant [String] The tenant id
759
+ # @param workflow_run [String] The workflow run id
760
+ # @param [Hash] opts the optional parameters
761
+ # @return [WorkflowRun]
762
+ def workflow_run_get(tenant, workflow_run, opts = {})
763
+ data, _status_code, _headers = workflow_run_get_with_http_info(tenant, workflow_run, opts)
764
+ data
765
+ end
766
+
767
+ # Get workflow run
768
+ # Get a workflow run for a tenant
769
+ # @param tenant [String] The tenant id
770
+ # @param workflow_run [String] The workflow run id
771
+ # @param [Hash] opts the optional parameters
772
+ # @return [Array<(WorkflowRun, Integer, Hash)>] WorkflowRun data, response status code and response headers
773
+ def workflow_run_get_with_http_info(tenant, workflow_run, opts = {})
774
+ if @api_client.config.debugging
775
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_run_get ...'
776
+ end
777
+ # verify the required parameter 'tenant' is set
778
+ if @api_client.config.client_side_validation && tenant.nil?
779
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_run_get"
780
+ end
781
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
782
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_run_get, the character length must be smaller than or equal to 36.'
783
+ end
784
+
785
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
786
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_run_get, the character length must be greater than or equal to 36.'
787
+ end
788
+
789
+ # verify the required parameter 'workflow_run' is set
790
+ if @api_client.config.client_side_validation && workflow_run.nil?
791
+ fail ArgumentError, "Missing the required parameter 'workflow_run' when calling WorkflowApi.workflow_run_get"
792
+ end
793
+ if @api_client.config.client_side_validation && workflow_run.to_s.length > 36
794
+ fail ArgumentError, 'invalid value for "workflow_run" when calling WorkflowApi.workflow_run_get, the character length must be smaller than or equal to 36.'
795
+ end
796
+
797
+ if @api_client.config.client_side_validation && workflow_run.to_s.length < 36
798
+ fail ArgumentError, 'invalid value for "workflow_run" when calling WorkflowApi.workflow_run_get, the character length must be greater than or equal to 36.'
799
+ end
800
+
801
+ # resource path
802
+ local_var_path = '/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'workflow-run' + '}', CGI.escape(workflow_run.to_s))
803
+
804
+ # query parameters
805
+ query_params = opts[:query_params] || {}
806
+
807
+ # header parameters
808
+ header_params = opts[:header_params] || {}
809
+ # HTTP header 'Accept' (if needed)
810
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
811
+
812
+ # form parameters
813
+ form_params = opts[:form_params] || {}
814
+
815
+ # http body (model)
816
+ post_body = opts[:debug_body]
817
+
818
+ # return_type
819
+ return_type = opts[:debug_return_type] || 'WorkflowRun'
820
+
821
+ # auth_names
822
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
823
+
824
+ new_options = opts.merge(
825
+ :operation => :"WorkflowApi.workflow_run_get",
826
+ :header_params => header_params,
827
+ :query_params => query_params,
828
+ :form_params => form_params,
829
+ :body => post_body,
830
+ :auth_names => auth_names,
831
+ :return_type => return_type
832
+ )
833
+
834
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
835
+ if @api_client.config.debugging
836
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_run_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
837
+ end
838
+ return data, status_code, headers
839
+ end
840
+
841
+ # Get workflow runs metrics
842
+ # Get a summary of workflow run metrics for a tenant
843
+ # @param tenant [String] The tenant id
844
+ # @param [Hash] opts the optional parameters
845
+ # @option opts [String] :event_id The event id to get runs for.
846
+ # @option opts [String] :workflow_id The workflow id to get runs for.
847
+ # @option opts [String] :parent_workflow_run_id The parent workflow run id
848
+ # @option opts [String] :parent_step_run_id The parent step run id
849
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
850
+ # @option opts [Time] :created_after The time after the workflow run was created
851
+ # @option opts [Time] :created_before The time before the workflow run was created
852
+ # @return [WorkflowRunsMetrics]
853
+ def workflow_run_get_metrics(tenant, opts = {})
854
+ data, _status_code, _headers = workflow_run_get_metrics_with_http_info(tenant, opts)
855
+ data
856
+ end
857
+
858
+ # Get workflow runs metrics
859
+ # Get a summary of workflow run metrics for a tenant
860
+ # @param tenant [String] The tenant id
861
+ # @param [Hash] opts the optional parameters
862
+ # @option opts [String] :event_id The event id to get runs for.
863
+ # @option opts [String] :workflow_id The workflow id to get runs for.
864
+ # @option opts [String] :parent_workflow_run_id The parent workflow run id
865
+ # @option opts [String] :parent_step_run_id The parent step run id
866
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
867
+ # @option opts [Time] :created_after The time after the workflow run was created
868
+ # @option opts [Time] :created_before The time before the workflow run was created
869
+ # @return [Array<(WorkflowRunsMetrics, Integer, Hash)>] WorkflowRunsMetrics data, response status code and response headers
870
+ def workflow_run_get_metrics_with_http_info(tenant, opts = {})
871
+ if @api_client.config.debugging
872
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_run_get_metrics ...'
873
+ end
874
+ # verify the required parameter 'tenant' is set
875
+ if @api_client.config.client_side_validation && tenant.nil?
876
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_run_get_metrics"
877
+ end
878
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
879
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_run_get_metrics, the character length must be smaller than or equal to 36.'
880
+ end
881
+
882
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
883
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_run_get_metrics, the character length must be greater than or equal to 36.'
884
+ end
885
+
886
+ if @api_client.config.client_side_validation && !opts[:'event_id'].nil? && opts[:'event_id'].to_s.length > 36
887
+ fail ArgumentError, 'invalid value for "opts[:"event_id"]" when calling WorkflowApi.workflow_run_get_metrics, the character length must be smaller than or equal to 36.'
888
+ end
889
+
890
+ if @api_client.config.client_side_validation && !opts[:'event_id'].nil? && opts[:'event_id'].to_s.length < 36
891
+ fail ArgumentError, 'invalid value for "opts[:"event_id"]" when calling WorkflowApi.workflow_run_get_metrics, the character length must be greater than or equal to 36.'
892
+ end
893
+
894
+ if @api_client.config.client_side_validation && !opts[:'workflow_id'].nil? && opts[:'workflow_id'].to_s.length > 36
895
+ fail ArgumentError, 'invalid value for "opts[:"workflow_id"]" when calling WorkflowApi.workflow_run_get_metrics, the character length must be smaller than or equal to 36.'
896
+ end
897
+
898
+ if @api_client.config.client_side_validation && !opts[:'workflow_id'].nil? && opts[:'workflow_id'].to_s.length < 36
899
+ fail ArgumentError, 'invalid value for "opts[:"workflow_id"]" when calling WorkflowApi.workflow_run_get_metrics, the character length must be greater than or equal to 36.'
900
+ end
901
+
902
+ if @api_client.config.client_side_validation && !opts[:'parent_workflow_run_id'].nil? && opts[:'parent_workflow_run_id'].to_s.length > 36
903
+ fail ArgumentError, 'invalid value for "opts[:"parent_workflow_run_id"]" when calling WorkflowApi.workflow_run_get_metrics, the character length must be smaller than or equal to 36.'
904
+ end
905
+
906
+ if @api_client.config.client_side_validation && !opts[:'parent_workflow_run_id'].nil? && opts[:'parent_workflow_run_id'].to_s.length < 36
907
+ fail ArgumentError, 'invalid value for "opts[:"parent_workflow_run_id"]" when calling WorkflowApi.workflow_run_get_metrics, the character length must be greater than or equal to 36.'
908
+ end
909
+
910
+ if @api_client.config.client_side_validation && !opts[:'parent_step_run_id'].nil? && opts[:'parent_step_run_id'].to_s.length > 36
911
+ fail ArgumentError, 'invalid value for "opts[:"parent_step_run_id"]" when calling WorkflowApi.workflow_run_get_metrics, the character length must be smaller than or equal to 36.'
912
+ end
913
+
914
+ if @api_client.config.client_side_validation && !opts[:'parent_step_run_id'].nil? && opts[:'parent_step_run_id'].to_s.length < 36
915
+ fail ArgumentError, 'invalid value for "opts[:"parent_step_run_id"]" when calling WorkflowApi.workflow_run_get_metrics, the character length must be greater than or equal to 36.'
916
+ end
917
+
918
+ # resource path
919
+ local_var_path = '/api/v1/tenants/{tenant}/workflows/runs/metrics'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
920
+
921
+ # query parameters
922
+ query_params = opts[:query_params] || {}
923
+ query_params[:'eventId'] = opts[:'event_id'] if !opts[:'event_id'].nil?
924
+ query_params[:'workflowId'] = opts[:'workflow_id'] if !opts[:'workflow_id'].nil?
925
+ query_params[:'parentWorkflowRunId'] = opts[:'parent_workflow_run_id'] if !opts[:'parent_workflow_run_id'].nil?
926
+ query_params[:'parentStepRunId'] = opts[:'parent_step_run_id'] if !opts[:'parent_step_run_id'].nil?
927
+ query_params[:'additionalMetadata'] = @api_client.build_collection_param(opts[:'additional_metadata'], :multi) if !opts[:'additional_metadata'].nil?
928
+ query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
929
+ query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
930
+
931
+ # header parameters
932
+ header_params = opts[:header_params] || {}
933
+ # HTTP header 'Accept' (if needed)
934
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
935
+
936
+ # form parameters
937
+ form_params = opts[:form_params] || {}
938
+
939
+ # http body (model)
940
+ post_body = opts[:debug_body]
941
+
942
+ # return_type
943
+ return_type = opts[:debug_return_type] || 'WorkflowRunsMetrics'
944
+
945
+ # auth_names
946
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
947
+
948
+ new_options = opts.merge(
949
+ :operation => :"WorkflowApi.workflow_run_get_metrics",
950
+ :header_params => header_params,
951
+ :query_params => query_params,
952
+ :form_params => form_params,
953
+ :body => post_body,
954
+ :auth_names => auth_names,
955
+ :return_type => return_type
956
+ )
957
+
958
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
959
+ if @api_client.config.debugging
960
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_run_get_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
961
+ end
962
+ return data, status_code, headers
963
+ end
964
+
965
+ # Get workflow run
966
+ # Get a workflow run for a tenant
967
+ # @param tenant [String] The tenant id
968
+ # @param workflow_run [String] The workflow run id
969
+ # @param [Hash] opts the optional parameters
970
+ # @return [WorkflowRunShape]
971
+ def workflow_run_get_shape(tenant, workflow_run, opts = {})
972
+ data, _status_code, _headers = workflow_run_get_shape_with_http_info(tenant, workflow_run, opts)
973
+ data
974
+ end
975
+
976
+ # Get workflow run
977
+ # Get a workflow run for a tenant
978
+ # @param tenant [String] The tenant id
979
+ # @param workflow_run [String] The workflow run id
980
+ # @param [Hash] opts the optional parameters
981
+ # @return [Array<(WorkflowRunShape, Integer, Hash)>] WorkflowRunShape data, response status code and response headers
982
+ def workflow_run_get_shape_with_http_info(tenant, workflow_run, opts = {})
983
+ if @api_client.config.debugging
984
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_run_get_shape ...'
985
+ end
986
+ # verify the required parameter 'tenant' is set
987
+ if @api_client.config.client_side_validation && tenant.nil?
988
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_run_get_shape"
989
+ end
990
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
991
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_run_get_shape, the character length must be smaller than or equal to 36.'
992
+ end
993
+
994
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
995
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_run_get_shape, the character length must be greater than or equal to 36.'
996
+ end
997
+
998
+ # verify the required parameter 'workflow_run' is set
999
+ if @api_client.config.client_side_validation && workflow_run.nil?
1000
+ fail ArgumentError, "Missing the required parameter 'workflow_run' when calling WorkflowApi.workflow_run_get_shape"
1001
+ end
1002
+ if @api_client.config.client_side_validation && workflow_run.to_s.length > 36
1003
+ fail ArgumentError, 'invalid value for "workflow_run" when calling WorkflowApi.workflow_run_get_shape, the character length must be smaller than or equal to 36.'
1004
+ end
1005
+
1006
+ if @api_client.config.client_side_validation && workflow_run.to_s.length < 36
1007
+ fail ArgumentError, 'invalid value for "workflow_run" when calling WorkflowApi.workflow_run_get_shape, the character length must be greater than or equal to 36.'
1008
+ end
1009
+
1010
+ # resource path
1011
+ local_var_path = '/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/shape'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'workflow-run' + '}', CGI.escape(workflow_run.to_s))
1012
+
1013
+ # query parameters
1014
+ query_params = opts[:query_params] || {}
1015
+
1016
+ # header parameters
1017
+ header_params = opts[:header_params] || {}
1018
+ # HTTP header 'Accept' (if needed)
1019
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1020
+
1021
+ # form parameters
1022
+ form_params = opts[:form_params] || {}
1023
+
1024
+ # http body (model)
1025
+ post_body = opts[:debug_body]
1026
+
1027
+ # return_type
1028
+ return_type = opts[:debug_return_type] || 'WorkflowRunShape'
1029
+
1030
+ # auth_names
1031
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
1032
+
1033
+ new_options = opts.merge(
1034
+ :operation => :"WorkflowApi.workflow_run_get_shape",
1035
+ :header_params => header_params,
1036
+ :query_params => query_params,
1037
+ :form_params => form_params,
1038
+ :body => post_body,
1039
+ :auth_names => auth_names,
1040
+ :return_type => return_type
1041
+ )
1042
+
1043
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1044
+ if @api_client.config.debugging
1045
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_run_get_shape\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1046
+ end
1047
+ return data, status_code, headers
1048
+ end
1049
+
1050
+ # Get workflow runs
1051
+ # Get all workflow runs for a tenant
1052
+ # @param tenant [String] The tenant id
1053
+ # @param [Hash] opts the optional parameters
1054
+ # @option opts [Integer] :offset The number to skip
1055
+ # @option opts [Integer] :limit The number to limit by
1056
+ # @option opts [String] :event_id The event id to get runs for.
1057
+ # @option opts [String] :workflow_id The workflow id to get runs for.
1058
+ # @option opts [String] :parent_workflow_run_id The parent workflow run id
1059
+ # @option opts [String] :parent_step_run_id The parent step run id
1060
+ # @option opts [Array<WorkflowRunStatus>] :statuses A list of workflow run statuses to filter by
1061
+ # @option opts [Array<WorkflowKind>] :kinds A list of workflow kinds to filter by
1062
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
1063
+ # @option opts [Time] :created_after The time after the workflow run was created
1064
+ # @option opts [Time] :created_before The time before the workflow run was created
1065
+ # @option opts [Time] :finished_after The time after the workflow run was finished
1066
+ # @option opts [Time] :finished_before The time before the workflow run was finished
1067
+ # @option opts [WorkflowRunOrderByField] :order_by_field The order by field
1068
+ # @option opts [WorkflowRunOrderByDirection] :order_by_direction The order by direction
1069
+ # @return [WorkflowRunList]
1070
+ def workflow_run_list(tenant, opts = {})
1071
+ data, _status_code, _headers = workflow_run_list_with_http_info(tenant, opts)
1072
+ data
1073
+ end
1074
+
1075
+ # Get workflow runs
1076
+ # Get all workflow runs for a tenant
1077
+ # @param tenant [String] The tenant id
1078
+ # @param [Hash] opts the optional parameters
1079
+ # @option opts [Integer] :offset The number to skip
1080
+ # @option opts [Integer] :limit The number to limit by
1081
+ # @option opts [String] :event_id The event id to get runs for.
1082
+ # @option opts [String] :workflow_id The workflow id to get runs for.
1083
+ # @option opts [String] :parent_workflow_run_id The parent workflow run id
1084
+ # @option opts [String] :parent_step_run_id The parent step run id
1085
+ # @option opts [Array<WorkflowRunStatus>] :statuses A list of workflow run statuses to filter by
1086
+ # @option opts [Array<WorkflowKind>] :kinds A list of workflow kinds to filter by
1087
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
1088
+ # @option opts [Time] :created_after The time after the workflow run was created
1089
+ # @option opts [Time] :created_before The time before the workflow run was created
1090
+ # @option opts [Time] :finished_after The time after the workflow run was finished
1091
+ # @option opts [Time] :finished_before The time before the workflow run was finished
1092
+ # @option opts [WorkflowRunOrderByField] :order_by_field The order by field
1093
+ # @option opts [WorkflowRunOrderByDirection] :order_by_direction The order by direction
1094
+ # @return [Array<(WorkflowRunList, Integer, Hash)>] WorkflowRunList data, response status code and response headers
1095
+ def workflow_run_list_with_http_info(tenant, opts = {})
1096
+ if @api_client.config.debugging
1097
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_run_list ...'
1098
+ end
1099
+ # verify the required parameter 'tenant' is set
1100
+ if @api_client.config.client_side_validation && tenant.nil?
1101
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_run_list"
1102
+ end
1103
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
1104
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_run_list, the character length must be smaller than or equal to 36.'
1105
+ end
1106
+
1107
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
1108
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_run_list, the character length must be greater than or equal to 36.'
1109
+ end
1110
+
1111
+ if @api_client.config.client_side_validation && !opts[:'event_id'].nil? && opts[:'event_id'].to_s.length > 36
1112
+ fail ArgumentError, 'invalid value for "opts[:"event_id"]" when calling WorkflowApi.workflow_run_list, the character length must be smaller than or equal to 36.'
1113
+ end
1114
+
1115
+ if @api_client.config.client_side_validation && !opts[:'event_id'].nil? && opts[:'event_id'].to_s.length < 36
1116
+ fail ArgumentError, 'invalid value for "opts[:"event_id"]" when calling WorkflowApi.workflow_run_list, the character length must be greater than or equal to 36.'
1117
+ end
1118
+
1119
+ if @api_client.config.client_side_validation && !opts[:'workflow_id'].nil? && opts[:'workflow_id'].to_s.length > 36
1120
+ fail ArgumentError, 'invalid value for "opts[:"workflow_id"]" when calling WorkflowApi.workflow_run_list, the character length must be smaller than or equal to 36.'
1121
+ end
1122
+
1123
+ if @api_client.config.client_side_validation && !opts[:'workflow_id'].nil? && opts[:'workflow_id'].to_s.length < 36
1124
+ fail ArgumentError, 'invalid value for "opts[:"workflow_id"]" when calling WorkflowApi.workflow_run_list, the character length must be greater than or equal to 36.'
1125
+ end
1126
+
1127
+ if @api_client.config.client_side_validation && !opts[:'parent_workflow_run_id'].nil? && opts[:'parent_workflow_run_id'].to_s.length > 36
1128
+ fail ArgumentError, 'invalid value for "opts[:"parent_workflow_run_id"]" when calling WorkflowApi.workflow_run_list, the character length must be smaller than or equal to 36.'
1129
+ end
1130
+
1131
+ if @api_client.config.client_side_validation && !opts[:'parent_workflow_run_id'].nil? && opts[:'parent_workflow_run_id'].to_s.length < 36
1132
+ fail ArgumentError, 'invalid value for "opts[:"parent_workflow_run_id"]" when calling WorkflowApi.workflow_run_list, the character length must be greater than or equal to 36.'
1133
+ end
1134
+
1135
+ if @api_client.config.client_side_validation && !opts[:'parent_step_run_id'].nil? && opts[:'parent_step_run_id'].to_s.length > 36
1136
+ fail ArgumentError, 'invalid value for "opts[:"parent_step_run_id"]" when calling WorkflowApi.workflow_run_list, the character length must be smaller than or equal to 36.'
1137
+ end
1138
+
1139
+ if @api_client.config.client_side_validation && !opts[:'parent_step_run_id'].nil? && opts[:'parent_step_run_id'].to_s.length < 36
1140
+ fail ArgumentError, 'invalid value for "opts[:"parent_step_run_id"]" when calling WorkflowApi.workflow_run_list, the character length must be greater than or equal to 36.'
1141
+ end
1142
+
1143
+ # resource path
1144
+ local_var_path = '/api/v1/tenants/{tenant}/workflows/runs'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
1145
+
1146
+ # query parameters
1147
+ query_params = opts[:query_params] || {}
1148
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1149
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1150
+ query_params[:'eventId'] = opts[:'event_id'] if !opts[:'event_id'].nil?
1151
+ query_params[:'workflowId'] = opts[:'workflow_id'] if !opts[:'workflow_id'].nil?
1152
+ query_params[:'parentWorkflowRunId'] = opts[:'parent_workflow_run_id'] if !opts[:'parent_workflow_run_id'].nil?
1153
+ query_params[:'parentStepRunId'] = opts[:'parent_step_run_id'] if !opts[:'parent_step_run_id'].nil?
1154
+ query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if !opts[:'statuses'].nil?
1155
+ query_params[:'kinds'] = @api_client.build_collection_param(opts[:'kinds'], :multi) if !opts[:'kinds'].nil?
1156
+ query_params[:'additionalMetadata'] = @api_client.build_collection_param(opts[:'additional_metadata'], :multi) if !opts[:'additional_metadata'].nil?
1157
+ query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
1158
+ query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
1159
+ query_params[:'finishedAfter'] = opts[:'finished_after'] if !opts[:'finished_after'].nil?
1160
+ query_params[:'finishedBefore'] = opts[:'finished_before'] if !opts[:'finished_before'].nil?
1161
+ query_params[:'orderByField'] = opts[:'order_by_field'] if !opts[:'order_by_field'].nil?
1162
+ query_params[:'orderByDirection'] = opts[:'order_by_direction'] if !opts[:'order_by_direction'].nil?
1163
+
1164
+ # header parameters
1165
+ header_params = opts[:header_params] || {}
1166
+ # HTTP header 'Accept' (if needed)
1167
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1168
+
1169
+ # form parameters
1170
+ form_params = opts[:form_params] || {}
1171
+
1172
+ # http body (model)
1173
+ post_body = opts[:debug_body]
1174
+
1175
+ # return_type
1176
+ return_type = opts[:debug_return_type] || 'WorkflowRunList'
1177
+
1178
+ # auth_names
1179
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
1180
+
1181
+ new_options = opts.merge(
1182
+ :operation => :"WorkflowApi.workflow_run_list",
1183
+ :header_params => header_params,
1184
+ :query_params => query_params,
1185
+ :form_params => form_params,
1186
+ :body => post_body,
1187
+ :auth_names => auth_names,
1188
+ :return_type => return_type
1189
+ )
1190
+
1191
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1192
+ if @api_client.config.debugging
1193
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_run_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1194
+ end
1195
+ return data, status_code, headers
1196
+ end
1197
+
1198
+ # Delete scheduled workflow run
1199
+ # Delete a scheduled workflow run for a tenant
1200
+ # @param tenant [String] The tenant id
1201
+ # @param scheduled_workflow_run [String] The scheduled workflow id
1202
+ # @param [Hash] opts the optional parameters
1203
+ # @return [nil]
1204
+ def workflow_scheduled_delete(tenant, scheduled_workflow_run, opts = {})
1205
+ workflow_scheduled_delete_with_http_info(tenant, scheduled_workflow_run, opts)
1206
+ nil
1207
+ end
1208
+
1209
+ # Delete scheduled workflow run
1210
+ # Delete a scheduled workflow run for a tenant
1211
+ # @param tenant [String] The tenant id
1212
+ # @param scheduled_workflow_run [String] The scheduled workflow id
1213
+ # @param [Hash] opts the optional parameters
1214
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1215
+ def workflow_scheduled_delete_with_http_info(tenant, scheduled_workflow_run, opts = {})
1216
+ if @api_client.config.debugging
1217
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_scheduled_delete ...'
1218
+ end
1219
+ # verify the required parameter 'tenant' is set
1220
+ if @api_client.config.client_side_validation && tenant.nil?
1221
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_scheduled_delete"
1222
+ end
1223
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
1224
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_scheduled_delete, the character length must be smaller than or equal to 36.'
1225
+ end
1226
+
1227
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
1228
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_scheduled_delete, the character length must be greater than or equal to 36.'
1229
+ end
1230
+
1231
+ # verify the required parameter 'scheduled_workflow_run' is set
1232
+ if @api_client.config.client_side_validation && scheduled_workflow_run.nil?
1233
+ fail ArgumentError, "Missing the required parameter 'scheduled_workflow_run' when calling WorkflowApi.workflow_scheduled_delete"
1234
+ end
1235
+ if @api_client.config.client_side_validation && scheduled_workflow_run.to_s.length > 36
1236
+ fail ArgumentError, 'invalid value for "scheduled_workflow_run" when calling WorkflowApi.workflow_scheduled_delete, the character length must be smaller than or equal to 36.'
1237
+ end
1238
+
1239
+ if @api_client.config.client_side_validation && scheduled_workflow_run.to_s.length < 36
1240
+ fail ArgumentError, 'invalid value for "scheduled_workflow_run" when calling WorkflowApi.workflow_scheduled_delete, the character length must be greater than or equal to 36.'
1241
+ end
1242
+
1243
+ # resource path
1244
+ local_var_path = '/api/v1/tenants/{tenant}/workflows/scheduled/{scheduled-workflow-run}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'scheduled-workflow-run' + '}', CGI.escape(scheduled_workflow_run.to_s))
1245
+
1246
+ # query parameters
1247
+ query_params = opts[:query_params] || {}
1248
+
1249
+ # header parameters
1250
+ header_params = opts[:header_params] || {}
1251
+ # HTTP header 'Accept' (if needed)
1252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1253
+
1254
+ # form parameters
1255
+ form_params = opts[:form_params] || {}
1256
+
1257
+ # http body (model)
1258
+ post_body = opts[:debug_body]
1259
+
1260
+ # return_type
1261
+ return_type = opts[:debug_return_type]
1262
+
1263
+ # auth_names
1264
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
1265
+
1266
+ new_options = opts.merge(
1267
+ :operation => :"WorkflowApi.workflow_scheduled_delete",
1268
+ :header_params => header_params,
1269
+ :query_params => query_params,
1270
+ :form_params => form_params,
1271
+ :body => post_body,
1272
+ :auth_names => auth_names,
1273
+ :return_type => return_type
1274
+ )
1275
+
1276
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1277
+ if @api_client.config.debugging
1278
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_scheduled_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1279
+ end
1280
+ return data, status_code, headers
1281
+ end
1282
+
1283
+ # Get scheduled workflow run
1284
+ # Get a scheduled workflow run for a tenant
1285
+ # @param tenant [String] The tenant id
1286
+ # @param scheduled_workflow_run [String] The scheduled workflow id
1287
+ # @param [Hash] opts the optional parameters
1288
+ # @return [ScheduledWorkflows]
1289
+ def workflow_scheduled_get(tenant, scheduled_workflow_run, opts = {})
1290
+ data, _status_code, _headers = workflow_scheduled_get_with_http_info(tenant, scheduled_workflow_run, opts)
1291
+ data
1292
+ end
1293
+
1294
+ # Get scheduled workflow run
1295
+ # Get a scheduled workflow run for a tenant
1296
+ # @param tenant [String] The tenant id
1297
+ # @param scheduled_workflow_run [String] The scheduled workflow id
1298
+ # @param [Hash] opts the optional parameters
1299
+ # @return [Array<(ScheduledWorkflows, Integer, Hash)>] ScheduledWorkflows data, response status code and response headers
1300
+ def workflow_scheduled_get_with_http_info(tenant, scheduled_workflow_run, opts = {})
1301
+ if @api_client.config.debugging
1302
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_scheduled_get ...'
1303
+ end
1304
+ # verify the required parameter 'tenant' is set
1305
+ if @api_client.config.client_side_validation && tenant.nil?
1306
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_scheduled_get"
1307
+ end
1308
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
1309
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_scheduled_get, the character length must be smaller than or equal to 36.'
1310
+ end
1311
+
1312
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
1313
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_scheduled_get, the character length must be greater than or equal to 36.'
1314
+ end
1315
+
1316
+ # verify the required parameter 'scheduled_workflow_run' is set
1317
+ if @api_client.config.client_side_validation && scheduled_workflow_run.nil?
1318
+ fail ArgumentError, "Missing the required parameter 'scheduled_workflow_run' when calling WorkflowApi.workflow_scheduled_get"
1319
+ end
1320
+ if @api_client.config.client_side_validation && scheduled_workflow_run.to_s.length > 36
1321
+ fail ArgumentError, 'invalid value for "scheduled_workflow_run" when calling WorkflowApi.workflow_scheduled_get, the character length must be smaller than or equal to 36.'
1322
+ end
1323
+
1324
+ if @api_client.config.client_side_validation && scheduled_workflow_run.to_s.length < 36
1325
+ fail ArgumentError, 'invalid value for "scheduled_workflow_run" when calling WorkflowApi.workflow_scheduled_get, the character length must be greater than or equal to 36.'
1326
+ end
1327
+
1328
+ # resource path
1329
+ local_var_path = '/api/v1/tenants/{tenant}/workflows/scheduled/{scheduled-workflow-run}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'scheduled-workflow-run' + '}', CGI.escape(scheduled_workflow_run.to_s))
1330
+
1331
+ # query parameters
1332
+ query_params = opts[:query_params] || {}
1333
+
1334
+ # header parameters
1335
+ header_params = opts[:header_params] || {}
1336
+ # HTTP header 'Accept' (if needed)
1337
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1338
+
1339
+ # form parameters
1340
+ form_params = opts[:form_params] || {}
1341
+
1342
+ # http body (model)
1343
+ post_body = opts[:debug_body]
1344
+
1345
+ # return_type
1346
+ return_type = opts[:debug_return_type] || 'ScheduledWorkflows'
1347
+
1348
+ # auth_names
1349
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
1350
+
1351
+ new_options = opts.merge(
1352
+ :operation => :"WorkflowApi.workflow_scheduled_get",
1353
+ :header_params => header_params,
1354
+ :query_params => query_params,
1355
+ :form_params => form_params,
1356
+ :body => post_body,
1357
+ :auth_names => auth_names,
1358
+ :return_type => return_type
1359
+ )
1360
+
1361
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1362
+ if @api_client.config.debugging
1363
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_scheduled_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1364
+ end
1365
+ return data, status_code, headers
1366
+ end
1367
+
1368
+ # Get scheduled workflow runs
1369
+ # Get all scheduled workflow runs for a tenant
1370
+ # @param tenant [String] The tenant id
1371
+ # @param [Hash] opts the optional parameters
1372
+ # @option opts [Integer] :offset The number to skip
1373
+ # @option opts [Integer] :limit The number to limit by
1374
+ # @option opts [ScheduledWorkflowsOrderByField] :order_by_field The order by field
1375
+ # @option opts [WorkflowRunOrderByDirection] :order_by_direction The order by direction
1376
+ # @option opts [String] :workflow_id The workflow id to get runs for.
1377
+ # @option opts [String] :parent_workflow_run_id The parent workflow run id
1378
+ # @option opts [String] :parent_step_run_id The parent step run id
1379
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
1380
+ # @option opts [Array<ScheduledRunStatus>] :statuses A list of scheduled run statuses to filter by
1381
+ # @return [ScheduledWorkflowsList]
1382
+ def workflow_scheduled_list(tenant, opts = {})
1383
+ data, _status_code, _headers = workflow_scheduled_list_with_http_info(tenant, opts)
1384
+ data
1385
+ end
1386
+
1387
+ # Get scheduled workflow runs
1388
+ # Get all scheduled workflow runs for a tenant
1389
+ # @param tenant [String] The tenant id
1390
+ # @param [Hash] opts the optional parameters
1391
+ # @option opts [Integer] :offset The number to skip
1392
+ # @option opts [Integer] :limit The number to limit by
1393
+ # @option opts [ScheduledWorkflowsOrderByField] :order_by_field The order by field
1394
+ # @option opts [WorkflowRunOrderByDirection] :order_by_direction The order by direction
1395
+ # @option opts [String] :workflow_id The workflow id to get runs for.
1396
+ # @option opts [String] :parent_workflow_run_id The parent workflow run id
1397
+ # @option opts [String] :parent_step_run_id The parent step run id
1398
+ # @option opts [Array<String>] :additional_metadata A list of metadata key value pairs to filter by
1399
+ # @option opts [Array<ScheduledRunStatus>] :statuses A list of scheduled run statuses to filter by
1400
+ # @return [Array<(ScheduledWorkflowsList, Integer, Hash)>] ScheduledWorkflowsList data, response status code and response headers
1401
+ def workflow_scheduled_list_with_http_info(tenant, opts = {})
1402
+ if @api_client.config.debugging
1403
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_scheduled_list ...'
1404
+ end
1405
+ # verify the required parameter 'tenant' is set
1406
+ if @api_client.config.client_side_validation && tenant.nil?
1407
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_scheduled_list"
1408
+ end
1409
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
1410
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_scheduled_list, the character length must be smaller than or equal to 36.'
1411
+ end
1412
+
1413
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
1414
+ fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_scheduled_list, the character length must be greater than or equal to 36.'
1415
+ end
1416
+
1417
+ if @api_client.config.client_side_validation && !opts[:'workflow_id'].nil? && opts[:'workflow_id'].to_s.length > 36
1418
+ fail ArgumentError, 'invalid value for "opts[:"workflow_id"]" when calling WorkflowApi.workflow_scheduled_list, the character length must be smaller than or equal to 36.'
1419
+ end
1420
+
1421
+ if @api_client.config.client_side_validation && !opts[:'workflow_id'].nil? && opts[:'workflow_id'].to_s.length < 36
1422
+ fail ArgumentError, 'invalid value for "opts[:"workflow_id"]" when calling WorkflowApi.workflow_scheduled_list, the character length must be greater than or equal to 36.'
1423
+ end
1424
+
1425
+ if @api_client.config.client_side_validation && !opts[:'parent_workflow_run_id'].nil? && opts[:'parent_workflow_run_id'].to_s.length > 36
1426
+ fail ArgumentError, 'invalid value for "opts[:"parent_workflow_run_id"]" when calling WorkflowApi.workflow_scheduled_list, the character length must be smaller than or equal to 36.'
1427
+ end
1428
+
1429
+ if @api_client.config.client_side_validation && !opts[:'parent_workflow_run_id'].nil? && opts[:'parent_workflow_run_id'].to_s.length < 36
1430
+ fail ArgumentError, 'invalid value for "opts[:"parent_workflow_run_id"]" when calling WorkflowApi.workflow_scheduled_list, the character length must be greater than or equal to 36.'
1431
+ end
1432
+
1433
+ if @api_client.config.client_side_validation && !opts[:'parent_step_run_id'].nil? && opts[:'parent_step_run_id'].to_s.length > 36
1434
+ fail ArgumentError, 'invalid value for "opts[:"parent_step_run_id"]" when calling WorkflowApi.workflow_scheduled_list, the character length must be smaller than or equal to 36.'
1435
+ end
1436
+
1437
+ if @api_client.config.client_side_validation && !opts[:'parent_step_run_id'].nil? && opts[:'parent_step_run_id'].to_s.length < 36
1438
+ fail ArgumentError, 'invalid value for "opts[:"parent_step_run_id"]" when calling WorkflowApi.workflow_scheduled_list, the character length must be greater than or equal to 36.'
1439
+ end
1440
+
1441
+ # resource path
1442
+ local_var_path = '/api/v1/tenants/{tenant}/workflows/scheduled'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
1443
+
1444
+ # query parameters
1445
+ query_params = opts[:query_params] || {}
1446
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1447
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1448
+ query_params[:'orderByField'] = opts[:'order_by_field'] if !opts[:'order_by_field'].nil?
1449
+ query_params[:'orderByDirection'] = opts[:'order_by_direction'] if !opts[:'order_by_direction'].nil?
1450
+ query_params[:'workflowId'] = opts[:'workflow_id'] if !opts[:'workflow_id'].nil?
1451
+ query_params[:'parentWorkflowRunId'] = opts[:'parent_workflow_run_id'] if !opts[:'parent_workflow_run_id'].nil?
1452
+ query_params[:'parentStepRunId'] = opts[:'parent_step_run_id'] if !opts[:'parent_step_run_id'].nil?
1453
+ query_params[:'additionalMetadata'] = @api_client.build_collection_param(opts[:'additional_metadata'], :multi) if !opts[:'additional_metadata'].nil?
1454
+ query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if !opts[:'statuses'].nil?
1455
+
1456
+ # header parameters
1457
+ header_params = opts[:header_params] || {}
1458
+ # HTTP header 'Accept' (if needed)
1459
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1460
+
1461
+ # form parameters
1462
+ form_params = opts[:form_params] || {}
1463
+
1464
+ # http body (model)
1465
+ post_body = opts[:debug_body]
1466
+
1467
+ # return_type
1468
+ return_type = opts[:debug_return_type] || 'ScheduledWorkflowsList'
1469
+
1470
+ # auth_names
1471
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
1472
+
1473
+ new_options = opts.merge(
1474
+ :operation => :"WorkflowApi.workflow_scheduled_list",
1475
+ :header_params => header_params,
1476
+ :query_params => query_params,
1477
+ :form_params => form_params,
1478
+ :body => post_body,
1479
+ :auth_names => auth_names,
1480
+ :return_type => return_type
1481
+ )
1482
+
1483
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1484
+ if @api_client.config.debugging
1485
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_scheduled_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1486
+ end
1487
+ return data, status_code, headers
1488
+ end
1489
+
1490
+ # Update workflow
1491
+ # Update a workflow for a tenant
1492
+ # @param workflow [String] The workflow id
1493
+ # @param workflow_update_request [WorkflowUpdateRequest] The input to update the workflow
1494
+ # @param [Hash] opts the optional parameters
1495
+ # @return [Workflow]
1496
+ def workflow_update(workflow, workflow_update_request, opts = {})
1497
+ data, _status_code, _headers = workflow_update_with_http_info(workflow, workflow_update_request, opts)
1498
+ data
1499
+ end
1500
+
1501
+ # Update workflow
1502
+ # Update a workflow for a tenant
1503
+ # @param workflow [String] The workflow id
1504
+ # @param workflow_update_request [WorkflowUpdateRequest] The input to update the workflow
1505
+ # @param [Hash] opts the optional parameters
1506
+ # @return [Array<(Workflow, Integer, Hash)>] Workflow data, response status code and response headers
1507
+ def workflow_update_with_http_info(workflow, workflow_update_request, opts = {})
1508
+ if @api_client.config.debugging
1509
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_update ...'
1510
+ end
1511
+ # verify the required parameter 'workflow' is set
1512
+ if @api_client.config.client_side_validation && workflow.nil?
1513
+ fail ArgumentError, "Missing the required parameter 'workflow' when calling WorkflowApi.workflow_update"
1514
+ end
1515
+ if @api_client.config.client_side_validation && workflow.to_s.length > 36
1516
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_update, the character length must be smaller than or equal to 36.'
1517
+ end
1518
+
1519
+ if @api_client.config.client_side_validation && workflow.to_s.length < 36
1520
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_update, the character length must be greater than or equal to 36.'
1521
+ end
1522
+
1523
+ # verify the required parameter 'workflow_update_request' is set
1524
+ if @api_client.config.client_side_validation && workflow_update_request.nil?
1525
+ fail ArgumentError, "Missing the required parameter 'workflow_update_request' when calling WorkflowApi.workflow_update"
1526
+ end
1527
+ # resource path
1528
+ local_var_path = '/api/v1/workflows/{workflow}'.sub('{' + 'workflow' + '}', CGI.escape(workflow.to_s))
1529
+
1530
+ # query parameters
1531
+ query_params = opts[:query_params] || {}
1532
+
1533
+ # header parameters
1534
+ header_params = opts[:header_params] || {}
1535
+ # HTTP header 'Accept' (if needed)
1536
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1537
+ # HTTP header 'Content-Type'
1538
+ content_type = @api_client.select_header_content_type(['application/json'])
1539
+ if !content_type.nil?
1540
+ header_params['Content-Type'] = content_type
1541
+ end
1542
+
1543
+ # form parameters
1544
+ form_params = opts[:form_params] || {}
1545
+
1546
+ # http body (model)
1547
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_update_request)
1548
+
1549
+ # return_type
1550
+ return_type = opts[:debug_return_type] || 'Workflow'
1551
+
1552
+ # auth_names
1553
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
1554
+
1555
+ new_options = opts.merge(
1556
+ :operation => :"WorkflowApi.workflow_update",
1557
+ :header_params => header_params,
1558
+ :query_params => query_params,
1559
+ :form_params => form_params,
1560
+ :body => post_body,
1561
+ :auth_names => auth_names,
1562
+ :return_type => return_type
1563
+ )
1564
+
1565
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1566
+ if @api_client.config.debugging
1567
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1568
+ end
1569
+ return data, status_code, headers
1570
+ end
1571
+
1572
+ # Get workflow version
1573
+ # Get a workflow version for a tenant
1574
+ # @param workflow [String] The workflow id
1575
+ # @param [Hash] opts the optional parameters
1576
+ # @option opts [String] :version The workflow version. If not supplied, the latest version is fetched.
1577
+ # @return [WorkflowVersion]
1578
+ def workflow_version_get(workflow, opts = {})
1579
+ data, _status_code, _headers = workflow_version_get_with_http_info(workflow, opts)
1580
+ data
1581
+ end
1582
+
1583
+ # Get workflow version
1584
+ # Get a workflow version for a tenant
1585
+ # @param workflow [String] The workflow id
1586
+ # @param [Hash] opts the optional parameters
1587
+ # @option opts [String] :version The workflow version. If not supplied, the latest version is fetched.
1588
+ # @return [Array<(WorkflowVersion, Integer, Hash)>] WorkflowVersion data, response status code and response headers
1589
+ def workflow_version_get_with_http_info(workflow, opts = {})
1590
+ if @api_client.config.debugging
1591
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_version_get ...'
1592
+ end
1593
+ # verify the required parameter 'workflow' is set
1594
+ if @api_client.config.client_side_validation && workflow.nil?
1595
+ fail ArgumentError, "Missing the required parameter 'workflow' when calling WorkflowApi.workflow_version_get"
1596
+ end
1597
+ if @api_client.config.client_side_validation && workflow.to_s.length > 36
1598
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_version_get, the character length must be smaller than or equal to 36.'
1599
+ end
1600
+
1601
+ if @api_client.config.client_side_validation && workflow.to_s.length < 36
1602
+ fail ArgumentError, 'invalid value for "workflow" when calling WorkflowApi.workflow_version_get, the character length must be greater than or equal to 36.'
1603
+ end
1604
+
1605
+ if @api_client.config.client_side_validation && !opts[:'version'].nil? && opts[:'version'].to_s.length > 36
1606
+ fail ArgumentError, 'invalid value for "opts[:"version"]" when calling WorkflowApi.workflow_version_get, the character length must be smaller than or equal to 36.'
1607
+ end
1608
+
1609
+ if @api_client.config.client_side_validation && !opts[:'version'].nil? && opts[:'version'].to_s.length < 36
1610
+ fail ArgumentError, 'invalid value for "opts[:"version"]" when calling WorkflowApi.workflow_version_get, the character length must be greater than or equal to 36.'
1611
+ end
1612
+
1613
+ # resource path
1614
+ local_var_path = '/api/v1/workflows/{workflow}/versions'.sub('{' + 'workflow' + '}', CGI.escape(workflow.to_s))
1615
+
1616
+ # query parameters
1617
+ query_params = opts[:query_params] || {}
1618
+ query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
1619
+
1620
+ # header parameters
1621
+ header_params = opts[:header_params] || {}
1622
+ # HTTP header 'Accept' (if needed)
1623
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1624
+
1625
+ # form parameters
1626
+ form_params = opts[:form_params] || {}
1627
+
1628
+ # http body (model)
1629
+ post_body = opts[:debug_body]
1630
+
1631
+ # return_type
1632
+ return_type = opts[:debug_return_type] || 'WorkflowVersion'
1633
+
1634
+ # auth_names
1635
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
1636
+
1637
+ new_options = opts.merge(
1638
+ :operation => :"WorkflowApi.workflow_version_get",
1639
+ :header_params => header_params,
1640
+ :query_params => query_params,
1641
+ :form_params => form_params,
1642
+ :body => post_body,
1643
+ :auth_names => auth_names,
1644
+ :return_type => return_type
1645
+ )
1646
+
1647
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1648
+ if @api_client.config.debugging
1649
+ @api_client.config.logger.debug "API called: WorkflowApi#workflow_version_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1650
+ end
1651
+ return data, status_code, headers
1652
+ end
1653
+ end
1654
+ end