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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -2
- data/CLAUDE.md +61 -4
- data/INTEGRATION_TESTING.md +176 -0
- data/LICENSE.txt +1 -1
- data/REST_API_GENERATION.md +257 -0
- data/Rakefile +9 -0
- data/Rakefile.rest +133 -0
- data/config/openapi_generator_config.json +31 -0
- data/lib/hatchet/clients/rest/.gitignore +39 -0
- data/lib/hatchet/clients/rest/.gitlab-ci.yml +26 -0
- data/lib/hatchet/clients/rest/.openapi-generator/FILES +420 -0
- data/lib/hatchet/clients/rest/.openapi-generator/VERSION +1 -0
- data/lib/hatchet/clients/rest/.openapi-generator-ignore +23 -0
- data/lib/hatchet/clients/rest/.rspec +2 -0
- data/lib/hatchet/clients/rest/.rubocop.yml +148 -0
- data/lib/hatchet/clients/rest/.travis.yml +11 -0
- data/lib/hatchet/clients/rest/Gemfile +9 -0
- data/lib/hatchet/clients/rest/README.md +420 -0
- data/lib/hatchet/clients/rest/Rakefile +10 -0
- data/lib/hatchet/clients/rest/docs/APIError.md +24 -0
- data/lib/hatchet/clients/rest/docs/APIErrors.md +18 -0
- data/lib/hatchet/clients/rest/docs/APIMeta.md +30 -0
- data/lib/hatchet/clients/rest/docs/APIMetaAuth.md +18 -0
- data/lib/hatchet/clients/rest/docs/APIMetaIntegration.md +20 -0
- data/lib/hatchet/clients/rest/docs/APIMetaPosthog.md +20 -0
- data/lib/hatchet/clients/rest/docs/APIResourceMeta.md +22 -0
- data/lib/hatchet/clients/rest/docs/APIToken.md +22 -0
- data/lib/hatchet/clients/rest/docs/APITokenApi.md +235 -0
- data/lib/hatchet/clients/rest/docs/AcceptInviteRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/BulkCreateEventRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/CancelEventRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/ConcurrencyLimitStrategy.md +15 -0
- data/lib/hatchet/clients/rest/docs/CreateAPITokenRequest.md +20 -0
- data/lib/hatchet/clients/rest/docs/CreateAPITokenResponse.md +18 -0
- data/lib/hatchet/clients/rest/docs/CreateCronWorkflowTriggerRequest.md +26 -0
- data/lib/hatchet/clients/rest/docs/CreateEventRequest.md +26 -0
- data/lib/hatchet/clients/rest/docs/CreatePullRequestFromStepRun.md +18 -0
- data/lib/hatchet/clients/rest/docs/CreateSNSIntegrationRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/CreateTenantAlertEmailGroupRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/CreateTenantInviteRequest.md +20 -0
- data/lib/hatchet/clients/rest/docs/CreateTenantRequest.md +24 -0
- data/lib/hatchet/clients/rest/docs/CronWorkflows.md +40 -0
- data/lib/hatchet/clients/rest/docs/CronWorkflowsList.md +20 -0
- data/lib/hatchet/clients/rest/docs/CronWorkflowsMethod.md +15 -0
- data/lib/hatchet/clients/rest/docs/CronWorkflowsOrderByField.md +15 -0
- data/lib/hatchet/clients/rest/docs/DefaultApi.md +602 -0
- data/lib/hatchet/clients/rest/docs/Event.md +28 -0
- data/lib/hatchet/clients/rest/docs/EventApi.md +809 -0
- data/lib/hatchet/clients/rest/docs/EventData.md +18 -0
- data/lib/hatchet/clients/rest/docs/EventKeyList.md +20 -0
- data/lib/hatchet/clients/rest/docs/EventList.md +20 -0
- data/lib/hatchet/clients/rest/docs/EventOrderByDirection.md +15 -0
- data/lib/hatchet/clients/rest/docs/EventOrderByField.md +15 -0
- data/lib/hatchet/clients/rest/docs/EventUpdateCancel200Response.md +18 -0
- data/lib/hatchet/clients/rest/docs/EventWorkflowRunSummary.md +28 -0
- data/lib/hatchet/clients/rest/docs/Events.md +20 -0
- data/lib/hatchet/clients/rest/docs/FilterApi.md +402 -0
- data/lib/hatchet/clients/rest/docs/GetStepRunDiffResponse.md +18 -0
- data/lib/hatchet/clients/rest/docs/GithubApi.md +73 -0
- data/lib/hatchet/clients/rest/docs/HealthcheckApi.md +129 -0
- data/lib/hatchet/clients/rest/docs/InfoGetVersion200Response.md +18 -0
- data/lib/hatchet/clients/rest/docs/Job.md +30 -0
- data/lib/hatchet/clients/rest/docs/JobRun.md +48 -0
- data/lib/hatchet/clients/rest/docs/JobRunStatus.md +15 -0
- data/lib/hatchet/clients/rest/docs/ListAPITokensResponse.md +20 -0
- data/lib/hatchet/clients/rest/docs/ListPullRequestsResponse.md +18 -0
- data/lib/hatchet/clients/rest/docs/ListSNSIntegrations.md +20 -0
- data/lib/hatchet/clients/rest/docs/ListSlackWebhooks.md +20 -0
- data/lib/hatchet/clients/rest/docs/LogApi.md +171 -0
- data/lib/hatchet/clients/rest/docs/LogLine.md +22 -0
- data/lib/hatchet/clients/rest/docs/LogLineLevel.md +15 -0
- data/lib/hatchet/clients/rest/docs/LogLineList.md +20 -0
- data/lib/hatchet/clients/rest/docs/LogLineOrderByDirection.md +15 -0
- data/lib/hatchet/clients/rest/docs/LogLineOrderByField.md +15 -0
- data/lib/hatchet/clients/rest/docs/MetadataApi.md +203 -0
- data/lib/hatchet/clients/rest/docs/PaginationResponse.md +22 -0
- data/lib/hatchet/clients/rest/docs/PullRequest.md +32 -0
- data/lib/hatchet/clients/rest/docs/PullRequestState.md +15 -0
- data/lib/hatchet/clients/rest/docs/QueueMetrics.md +22 -0
- data/lib/hatchet/clients/rest/docs/RateLimit.md +28 -0
- data/lib/hatchet/clients/rest/docs/RateLimitList.md +20 -0
- data/lib/hatchet/clients/rest/docs/RateLimitOrderByDirection.md +15 -0
- data/lib/hatchet/clients/rest/docs/RateLimitOrderByField.md +15 -0
- data/lib/hatchet/clients/rest/docs/RateLimitsApi.md +94 -0
- data/lib/hatchet/clients/rest/docs/RecentStepRuns.md +30 -0
- data/lib/hatchet/clients/rest/docs/RejectInviteRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/ReplayEventRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/ReplayWorkflowRunsRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/ReplayWorkflowRunsResponse.md +18 -0
- data/lib/hatchet/clients/rest/docs/RerunStepRunRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/SNSApi.md +235 -0
- data/lib/hatchet/clients/rest/docs/SNSIntegration.md +24 -0
- data/lib/hatchet/clients/rest/docs/ScheduleWorkflowRunRequest.md +24 -0
- data/lib/hatchet/clients/rest/docs/ScheduledRunStatus.md +15 -0
- data/lib/hatchet/clients/rest/docs/ScheduledWorkflows.md +44 -0
- data/lib/hatchet/clients/rest/docs/ScheduledWorkflowsList.md +20 -0
- data/lib/hatchet/clients/rest/docs/ScheduledWorkflowsMethod.md +15 -0
- data/lib/hatchet/clients/rest/docs/ScheduledWorkflowsOrderByField.md +15 -0
- data/lib/hatchet/clients/rest/docs/SemaphoreSlots.md +28 -0
- data/lib/hatchet/clients/rest/docs/SlackApi.md +156 -0
- data/lib/hatchet/clients/rest/docs/SlackWebhook.md +28 -0
- data/lib/hatchet/clients/rest/docs/Step.md +32 -0
- data/lib/hatchet/clients/rest/docs/StepRun.md +68 -0
- data/lib/hatchet/clients/rest/docs/StepRunApi.md +560 -0
- data/lib/hatchet/clients/rest/docs/StepRunArchive.md +50 -0
- data/lib/hatchet/clients/rest/docs/StepRunArchiveList.md +20 -0
- data/lib/hatchet/clients/rest/docs/StepRunDiff.md +22 -0
- data/lib/hatchet/clients/rest/docs/StepRunEvent.md +36 -0
- data/lib/hatchet/clients/rest/docs/StepRunEventList.md +20 -0
- data/lib/hatchet/clients/rest/docs/StepRunEventReason.md +15 -0
- data/lib/hatchet/clients/rest/docs/StepRunEventSeverity.md +15 -0
- data/lib/hatchet/clients/rest/docs/StepRunStatus.md +15 -0
- data/lib/hatchet/clients/rest/docs/TaskApi.md +566 -0
- data/lib/hatchet/clients/rest/docs/Tenant.md +30 -0
- data/lib/hatchet/clients/rest/docs/TenantAlertEmailGroup.md +20 -0
- data/lib/hatchet/clients/rest/docs/TenantAlertEmailGroupList.md +20 -0
- data/lib/hatchet/clients/rest/docs/TenantAlertingSettings.md +30 -0
- data/lib/hatchet/clients/rest/docs/TenantApi.md +1362 -0
- data/lib/hatchet/clients/rest/docs/TenantInvite.md +28 -0
- data/lib/hatchet/clients/rest/docs/TenantInviteList.md +20 -0
- data/lib/hatchet/clients/rest/docs/TenantList.md +20 -0
- data/lib/hatchet/clients/rest/docs/TenantMember.md +24 -0
- data/lib/hatchet/clients/rest/docs/TenantMemberList.md +20 -0
- data/lib/hatchet/clients/rest/docs/TenantMemberRole.md +15 -0
- data/lib/hatchet/clients/rest/docs/TenantQueueMetrics.md +22 -0
- data/lib/hatchet/clients/rest/docs/TenantResource.md +15 -0
- data/lib/hatchet/clients/rest/docs/TenantResourceLimit.md +30 -0
- data/lib/hatchet/clients/rest/docs/TenantResourcePolicy.md +18 -0
- data/lib/hatchet/clients/rest/docs/TenantStepRunQueueMetrics.md +18 -0
- data/lib/hatchet/clients/rest/docs/TenantUIVersion.md +15 -0
- data/lib/hatchet/clients/rest/docs/TenantVersion.md +15 -0
- data/lib/hatchet/clients/rest/docs/TriggerWorkflowRunRequest.md +20 -0
- data/lib/hatchet/clients/rest/docs/UpdateTenantAlertEmailGroupRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/UpdateTenantInviteRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/UpdateTenantRequest.md +34 -0
- data/lib/hatchet/clients/rest/docs/UpdateWorkerRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/User.md +28 -0
- data/lib/hatchet/clients/rest/docs/UserApi.md +805 -0
- data/lib/hatchet/clients/rest/docs/UserChangePasswordRequest.md +20 -0
- data/lib/hatchet/clients/rest/docs/UserLoginRequest.md +20 -0
- data/lib/hatchet/clients/rest/docs/UserRegisterRequest.md +22 -0
- data/lib/hatchet/clients/rest/docs/UserTenantMembershipsList.md +20 -0
- data/lib/hatchet/clients/rest/docs/UserTenantPublic.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1CancelTaskRequest.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1CancelledTasks.md +18 -0
- data/lib/hatchet/clients/rest/docs/V1CreateFilterRequest.md +24 -0
- data/lib/hatchet/clients/rest/docs/V1DagChildren.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1Event.md +36 -0
- data/lib/hatchet/clients/rest/docs/V1EventList.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1EventTriggeredRun.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1EventWorkflowRunSummary.md +26 -0
- data/lib/hatchet/clients/rest/docs/V1Filter.md +28 -0
- data/lib/hatchet/clients/rest/docs/V1FilterList.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1LogLine.md +28 -0
- data/lib/hatchet/clients/rest/docs/V1LogLineLevel.md +15 -0
- data/lib/hatchet/clients/rest/docs/V1LogLineList.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1ReplayTaskRequest.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1ReplayedTasks.md +18 -0
- data/lib/hatchet/clients/rest/docs/V1TaskEvent.md +38 -0
- data/lib/hatchet/clients/rest/docs/V1TaskEventList.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1TaskEventType.md +15 -0
- data/lib/hatchet/clients/rest/docs/V1TaskFilter.md +26 -0
- data/lib/hatchet/clients/rest/docs/V1TaskPointMetric.md +22 -0
- data/lib/hatchet/clients/rest/docs/V1TaskPointMetrics.md +18 -0
- data/lib/hatchet/clients/rest/docs/V1TaskRunMetric.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1TaskRunStatus.md +15 -0
- data/lib/hatchet/clients/rest/docs/V1TaskStatus.md +15 -0
- data/lib/hatchet/clients/rest/docs/V1TaskSummary.md +72 -0
- data/lib/hatchet/clients/rest/docs/V1TaskSummaryList.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1TaskTiming.md +46 -0
- data/lib/hatchet/clients/rest/docs/V1TaskTimingList.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1TriggerWorkflowRunRequest.md +24 -0
- data/lib/hatchet/clients/rest/docs/V1UpdateFilterRequest.md +22 -0
- data/lib/hatchet/clients/rest/docs/V1WorkflowRun.md +46 -0
- data/lib/hatchet/clients/rest/docs/V1WorkflowRunDetails.md +26 -0
- data/lib/hatchet/clients/rest/docs/V1WorkflowRunDisplayName.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1WorkflowRunDisplayNameList.md +20 -0
- data/lib/hatchet/clients/rest/docs/V1WorkflowType.md +15 -0
- data/lib/hatchet/clients/rest/docs/WebhookWorker.md +22 -0
- data/lib/hatchet/clients/rest/docs/WebhookWorkerCreateRequest.md +22 -0
- data/lib/hatchet/clients/rest/docs/WebhookWorkerCreateResponse.md +18 -0
- data/lib/hatchet/clients/rest/docs/WebhookWorkerCreated.md +24 -0
- data/lib/hatchet/clients/rest/docs/WebhookWorkerListResponse.md +20 -0
- data/lib/hatchet/clients/rest/docs/WebhookWorkerRequest.md +22 -0
- data/lib/hatchet/clients/rest/docs/WebhookWorkerRequestListResponse.md +18 -0
- data/lib/hatchet/clients/rest/docs/WebhookWorkerRequestMethod.md +15 -0
- data/lib/hatchet/clients/rest/docs/Worker.md +48 -0
- data/lib/hatchet/clients/rest/docs/WorkerApi.md +234 -0
- data/lib/hatchet/clients/rest/docs/WorkerLabel.md +22 -0
- data/lib/hatchet/clients/rest/docs/WorkerList.md +20 -0
- data/lib/hatchet/clients/rest/docs/WorkerRuntimeInfo.md +26 -0
- data/lib/hatchet/clients/rest/docs/WorkerRuntimeSDKs.md +15 -0
- data/lib/hatchet/clients/rest/docs/WorkerType.md +15 -0
- data/lib/hatchet/clients/rest/docs/Workflow.md +32 -0
- data/lib/hatchet/clients/rest/docs/WorkflowApi.md +1480 -0
- data/lib/hatchet/clients/rest/docs/WorkflowConcurrency.md +22 -0
- data/lib/hatchet/clients/rest/docs/WorkflowKind.md +15 -0
- data/lib/hatchet/clients/rest/docs/WorkflowList.md +22 -0
- data/lib/hatchet/clients/rest/docs/WorkflowMetrics.md +20 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRun.md +48 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunApi.md +477 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunList.md +20 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunOrderByDirection.md +15 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunOrderByField.md +15 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunShape.md +50 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunShapeItemForWorkflowRunDetails.md +24 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunStatus.md +15 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunTriggeredBy.md +26 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunsApi.md +572 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunsCancelRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunsMetrics.md +18 -0
- data/lib/hatchet/clients/rest/docs/WorkflowRunsMetricsCounts.md +28 -0
- data/lib/hatchet/clients/rest/docs/WorkflowTag.md +20 -0
- data/lib/hatchet/clients/rest/docs/WorkflowTriggerCronRef.md +20 -0
- data/lib/hatchet/clients/rest/docs/WorkflowTriggerEventRef.md +20 -0
- data/lib/hatchet/clients/rest/docs/WorkflowTriggers.md +26 -0
- data/lib/hatchet/clients/rest/docs/WorkflowUpdateRequest.md +18 -0
- data/lib/hatchet/clients/rest/docs/WorkflowVersion.md +40 -0
- data/lib/hatchet/clients/rest/docs/WorkflowVersionDefinition.md +18 -0
- data/lib/hatchet/clients/rest/docs/WorkflowVersionMeta.md +26 -0
- data/lib/hatchet/clients/rest/docs/WorkflowWorkersCount.md +22 -0
- data/lib/hatchet/clients/rest/git_push.sh +57 -0
- data/lib/hatchet/clients/rest/hatchet-sdk-rest.gemspec +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/api_token_api.rb +242 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/default_api.rb +622 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/event_api.rb +836 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/filter_api.rb +449 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/github_api.rb +107 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/healthcheck_api.rb +132 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/log_api.rb +182 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/metadata_api.rb +193 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/rate_limits_api.rb +108 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/slack_api.rb +164 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/sns_api.rb +242 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb +615 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb +599 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +1327 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/user_api.rb +729 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/worker_api.rb +246 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_api.rb +1654 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_run_api.rb +540 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_runs_api.rb +614 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_client.rb +437 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_error.rb +58 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/configuration.rb +399 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/accept_invite_request.rb +255 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_error.rb +268 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_errors.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta.rb +279 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta_auth.rb +223 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta_integration.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta_posthog.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_resource_meta.rb +310 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_token.rb +300 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/bulk_create_event_request.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cancel_event_request.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/concurrency_limit_strategy.rb +42 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_request.rb +257 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_response.rb +238 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_cron_workflow_trigger_request.rb +352 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_event_request.rb +295 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_pull_request_from_step_run.rb +237 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_sns_integration_request.rb +238 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_alert_email_group_request.rb +240 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_invite_request.rb +287 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_request.rb +307 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows.rb +509 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows_method.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows_order_by_field.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event.rb +321 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_data.rb +238 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_key_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_order_by_direction.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_order_by_field.rb +39 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_update_cancel200_response.rb +222 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_workflow_run_summary.rb +271 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/events.rb +266 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/get_step_run_diff_response.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/info_get_version200_response.rb +237 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job.rb +363 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job_run.rb +464 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job_run_status.rb +44 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_api_tokens_response.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_pull_requests_response.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_slack_webhooks.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_sns_integrations.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line.rb +292 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_level.rb +42 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_order_by_direction.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_order_by_field.rb +39 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pagination_response.rb +241 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pull_request.rb +441 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pull_request_state.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/queue_metrics.rb +292 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit.rb +373 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit_order_by_direction.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit_order_by_field.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/recent_step_runs.rb +365 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/reject_invite_request.rb +255 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/replay_event_request.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/replay_workflow_runs_request.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/replay_workflow_runs_response.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rerun_step_run_request.rb +237 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/schedule_workflow_run_request.rb +326 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_run_status.rb +45 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows.rb +538 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows_method.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows_order_by_field.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/semaphore_slots.rb +343 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/slack_webhook.rb +372 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/sns_integration.rb +301 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step.rb +374 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run.rb +556 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb +432 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_diff.rb +289 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event.rb +442 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event_reason.rb +55 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event_severity.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_status.rb +47 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant.rb +370 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_alert_email_group.rb +266 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_alert_email_group_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_alerting_settings.rb +314 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_invite.rb +377 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_invite_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member.rb +323 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member_role.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_queue_metrics.rb +243 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource.rb +45 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource_limit.rb +370 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource_policy.rb +240 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_step_run_queue_metrics.rb +220 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_ui_version.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_version.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_workflow_run_request.rb +246 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_alert_email_group_request.rb +240 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_invite_request.rb +260 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_request.rb +323 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_worker_request.rb +221 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user.rb +321 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_change_password_request.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_login_request.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_register_request.rb +292 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_tenant_memberships_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_tenant_public.rb +248 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_cancel_task_request.rb +232 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_cancelled_tasks.rb +223 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_filter_request.rb +320 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_dag_children.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event.rb +380 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_triggered_run.rb +266 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_workflow_run_summary.rb +346 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_filter.rb +390 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_filter_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line.rb +344 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line_level.rb +42 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_replay_task_request.rb +232 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_replayed_tasks.rb +223 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event.rb +419 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_type.rb +58 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_filter.rb +279 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_point_metric.rb +289 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_point_metrics.rb +222 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_metric.rb +285 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_status.rb +43 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_status.rb +43 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb +812 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary_list.rb +266 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing.rb +581 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing_list.rb +266 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb +283 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_filter_request.rb +241 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run.rb +544 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run_details.rb +331 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run_display_name.rb +263 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run_display_name_list.rb +266 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_type.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker.rb +291 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_create_request.rb +294 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_create_response.rb +220 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_created.rb +318 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_list_response.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_request.rb +314 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_request_list_response.rb +223 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_request_method.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker.rb +489 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_label.rb +274 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_runtime_info.rb +278 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_runtime_sdks.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_type.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow.rb +346 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_concurrency.rb +314 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_kind.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_list.rb +240 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_metrics.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run.rb +524 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_order_by_direction.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_order_by_field.rb +42 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_shape.rb +533 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_shape_item_for_workflow_run_details.rb +353 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_status.rb +45 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_triggered_by.rb +273 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_runs_cancel_request.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_runs_metrics.rb +220 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_runs_metrics_counts.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_tag.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_trigger_cron_ref.rb +229 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_trigger_event_ref.rb +229 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_triggers.rb +260 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_update_request.rb +221 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version.rb +392 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_definition.rb +238 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_meta.rb +325 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_workers_count.rb +238 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/version.rb +15 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +241 -0
- data/lib/hatchet/clients/rest/spec/spec_helper.rb +111 -0
- data/lib/hatchet/clients/rest.rb +126 -0
- data/lib/hatchet/clients.rb +71 -0
- data/lib/hatchet/config.rb +482 -0
- data/lib/hatchet/features/events.rb +265 -0
- data/lib/hatchet/features/runs.rb +423 -0
- data/lib/hatchet/version.rb +1 -1
- data/lib/hatchet-sdk.rb +74 -3
- data/scripts/generate.sh +167 -0
- data/scripts/generate_api.rb +174 -0
- data/sig/hatchet-sdk.rbs +525 -1
- metadata +491 -1
data/lib/hatchet-sdk.rb
CHANGED
|
@@ -1,15 +1,86 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
# typed: strict
|
|
2
3
|
|
|
3
4
|
require_relative "hatchet/version"
|
|
5
|
+
require_relative "hatchet/config"
|
|
6
|
+
require_relative "hatchet/clients"
|
|
7
|
+
require_relative "hatchet/features/events"
|
|
8
|
+
require_relative "hatchet/features/runs"
|
|
4
9
|
|
|
10
|
+
# Ruby SDK for Hatchet workflow engine
|
|
11
|
+
#
|
|
12
|
+
# @see https://docs.hatchet.run for Hatchet documentation
|
|
5
13
|
module Hatchet
|
|
14
|
+
# Base error class for all Hatchet-related errors
|
|
6
15
|
class Error < StandardError; end
|
|
7
16
|
|
|
17
|
+
# The main client for interacting with Hatchet services.
|
|
18
|
+
#
|
|
19
|
+
# @example Basic usage with API token
|
|
20
|
+
# hatchet = Hatchet::Client.new()
|
|
21
|
+
#
|
|
22
|
+
# @example With custom configuration
|
|
23
|
+
# hatchet = Hatchet::Client.new(
|
|
24
|
+
# token: "your-jwt-token",
|
|
25
|
+
# namespace: "production"
|
|
26
|
+
# )
|
|
8
27
|
class Client
|
|
9
|
-
|
|
28
|
+
# @return [Config] The configuration object used by this client
|
|
29
|
+
attr_reader :config
|
|
10
30
|
|
|
11
|
-
|
|
12
|
-
|
|
31
|
+
# Initialize a new Hatchet client with the given configuration options.
|
|
32
|
+
#
|
|
33
|
+
# @param options [Hash] Configuration options for the client
|
|
34
|
+
# @option options [String] :token The JWT token for authentication (required)
|
|
35
|
+
# @option options [String] :tenant_id Override tenant ID (extracted from JWT token 'sub' field if not provided)
|
|
36
|
+
# @option options [String] :host_port gRPC server host and port (default: "localhost:7070")
|
|
37
|
+
# @option options [String] :server_url Server URL for HTTP requests (default: "https://app.dev.hatchet-tools.com")
|
|
38
|
+
# @option options [String] :namespace Namespace prefix for resource names (default: "")
|
|
39
|
+
# @option options [Logger] :logger Custom logger instance (default: Logger.new($stdout))
|
|
40
|
+
# @option options [Integer] :listener_v2_timeout Timeout for listener v2 in milliseconds
|
|
41
|
+
# @option options [Integer] :grpc_max_recv_message_length Maximum gRPC receive message length (default: 4MB)
|
|
42
|
+
# @option options [Integer] :grpc_max_send_message_length Maximum gRPC send message length (default: 4MB)
|
|
43
|
+
# @option options [Hash] :worker_preset_labels Hash of preset labels for workers
|
|
44
|
+
# @option options [Boolean] :enable_force_kill_sync_threads Enable force killing of sync threads (default: false)
|
|
45
|
+
# @option options [Boolean] :enable_thread_pool_monitoring Enable thread pool monitoring (default: false)
|
|
46
|
+
# @option options [Integer] :terminate_worker_after_num_tasks Terminate worker after this many tasks
|
|
47
|
+
# @option options [Boolean] :disable_log_capture Disable log capture (default: false)
|
|
48
|
+
# @option options [Boolean] :grpc_enable_fork_support Enable gRPC fork support (default: false)
|
|
49
|
+
# @option options [TLSConfig] :tls_config Custom TLS configuration
|
|
50
|
+
# @option options [HealthcheckConfig] :healthcheck Custom healthcheck configuration
|
|
51
|
+
# @option options [OpenTelemetryConfig] :otel Custom OpenTelemetry configuration
|
|
52
|
+
#
|
|
53
|
+
# @raise [Error] if token or configuration is missing or invalid
|
|
54
|
+
#
|
|
55
|
+
# @example Initialize with minimal configuration
|
|
56
|
+
# client = Hatchet::Client.new()
|
|
57
|
+
#
|
|
58
|
+
# @example Initialize with custom options
|
|
59
|
+
# client = Hatchet::Client.new(
|
|
60
|
+
# token: "eyJhbGciOiJIUzI1NiJ9...",
|
|
61
|
+
# namespace: "my_app",
|
|
62
|
+
# worker_preset_labels: { "env" => "production", "version" => "1.0.0" }
|
|
63
|
+
# )
|
|
64
|
+
def initialize(**options)
|
|
65
|
+
@config = Config.new(**options)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def rest_client
|
|
69
|
+
@rest_client ||= Hatchet::Clients.rest_client(@config)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Feature Client for interacting with Hatchet events
|
|
73
|
+
# @return [Hatchet::Features::Events] The events client for interacting with Hatchet events
|
|
74
|
+
def events
|
|
75
|
+
# @type [Hatchet::Features::Events]
|
|
76
|
+
@events ||= Hatchet::Features::Events.new(rest_client, @config)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Feature Client for interacting with Hatchet workflow runs
|
|
80
|
+
# @return [Hatchet::Features::Runs] The runs client for interacting with Hatchet workflow runs
|
|
81
|
+
def runs
|
|
82
|
+
# @type [Hatchet::Features::Runs]
|
|
83
|
+
@runs ||= Hatchet::Features::Runs.new(rest_client, @config)
|
|
13
84
|
end
|
|
14
85
|
end
|
|
15
86
|
end
|
data/scripts/generate.sh
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Ruby SDK REST API Client Generation Script
|
|
4
|
+
# Similar to the Python SDK's generate.sh
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Colors for output
|
|
9
|
+
RED='\033[0;31m'
|
|
10
|
+
GREEN='\033[0;32m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
BLUE='\033[0;34m'
|
|
13
|
+
NC='\033[0m' # No Color
|
|
14
|
+
|
|
15
|
+
# Configuration
|
|
16
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
17
|
+
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
18
|
+
OPENAPI_SPEC="$PROJECT_ROOT/../../../../bin/oas/openapi.yaml"
|
|
19
|
+
OUTPUT_DIR="$PROJECT_ROOT/lib/hatchet/clients/rest"
|
|
20
|
+
CONFIG_FILE="$PROJECT_ROOT/config/openapi_generator_config.json"
|
|
21
|
+
|
|
22
|
+
echo -e "${BLUE}๐ Starting Ruby REST API Client Generation${NC}"
|
|
23
|
+
echo "Project Root: $PROJECT_ROOT"
|
|
24
|
+
|
|
25
|
+
# Function to check if a command exists
|
|
26
|
+
command_exists() {
|
|
27
|
+
command -v "$1" >/dev/null 2>&1
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
# Function to install OpenAPI Generator CLI
|
|
31
|
+
install_openapi_generator() {
|
|
32
|
+
echo -e "${YELLOW}๐ฆ Installing OpenAPI Generator CLI...${NC}"
|
|
33
|
+
|
|
34
|
+
if command_exists npm; then
|
|
35
|
+
npm install -g @openapitools/openapi-generator-cli@7.13.0
|
|
36
|
+
echo -e "${GREEN}โ
OpenAPI Generator CLI installed${NC}"
|
|
37
|
+
else
|
|
38
|
+
echo -e "${RED}โ npm not found. Please install Node.js and npm first.${NC}"
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
# Function to validate OpenAPI spec
|
|
44
|
+
validate_spec() {
|
|
45
|
+
echo -e "${BLUE}๐ Validating OpenAPI specification...${NC}"
|
|
46
|
+
|
|
47
|
+
if [ ! -f "$OPENAPI_SPEC" ]; then
|
|
48
|
+
echo -e "${RED}โ OpenAPI spec not found at: $OPENAPI_SPEC${NC}"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
openapi-generator-cli validate -i "$OPENAPI_SPEC"
|
|
53
|
+
echo -e "${GREEN}โ
OpenAPI specification is valid${NC}"
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
# Function to generate the REST client
|
|
57
|
+
generate_client() {
|
|
58
|
+
echo -e "${BLUE}๐๏ธ Generating Ruby REST client...${NC}"
|
|
59
|
+
|
|
60
|
+
# Create output directory
|
|
61
|
+
mkdir -p "$OUTPUT_DIR"
|
|
62
|
+
|
|
63
|
+
# Additional properties for Ruby generation
|
|
64
|
+
ADDITIONAL_PROPS="gemName=hatchet-sdk-rest,moduleName=Hatchet::Clients::Rest,gemVersion=0.0.1,gemDescription=Ruby REST client for Hatchet API,gemAuthor=Hatchet Team,gemHomepage=https://github.com/hatchet-dev/hatchet,gemLicense=MIT,library=faraday,httpLibrary=faraday"
|
|
65
|
+
|
|
66
|
+
# Generate the client
|
|
67
|
+
openapi-generator-cli generate \
|
|
68
|
+
-i "$OPENAPI_SPEC" \
|
|
69
|
+
-g ruby \
|
|
70
|
+
-o "$OUTPUT_DIR" \
|
|
71
|
+
-c "$CONFIG_FILE" \
|
|
72
|
+
--skip-validate-spec \
|
|
73
|
+
--global-property apiTests=false,modelTests=false,apiDocs=true,modelDocs=true \
|
|
74
|
+
--additional-properties "$ADDITIONAL_PROPS"
|
|
75
|
+
|
|
76
|
+
echo -e "${GREEN}โ
Ruby REST client generated${NC}"
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
# Function to apply custom patches
|
|
80
|
+
apply_patches() {
|
|
81
|
+
echo -e "${BLUE}๐ง Applying custom patches...${NC}"
|
|
82
|
+
|
|
83
|
+
echo -e "${GREEN}โ
Custom patches applied${NC}"
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# Function to update dependencies
|
|
87
|
+
update_dependencies() {
|
|
88
|
+
echo -e "${BLUE}๐ฆ Updating Ruby dependencies...${NC}"
|
|
89
|
+
|
|
90
|
+
cd "$PROJECT_ROOT"
|
|
91
|
+
|
|
92
|
+
# Add required gems to Gemfile if not present
|
|
93
|
+
if ! grep -q "gem ['\"]faraday['\"]" Gemfile 2>/dev/null; then
|
|
94
|
+
echo "gem 'faraday', '~> 2.0'" >> Gemfile
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
if ! grep -q "gem ['\"]faraday-multipart['\"]" Gemfile 2>/dev/null; then
|
|
98
|
+
echo "gem 'faraday-multipart'" >> Gemfile
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
# Install/update dependencies
|
|
102
|
+
bundle install
|
|
103
|
+
|
|
104
|
+
echo -e "${GREEN}โ
Dependencies updated${NC}"
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
# Function to run tests on generated code
|
|
108
|
+
run_tests() {
|
|
109
|
+
echo -e "${BLUE}๐งช Running tests...${NC}"
|
|
110
|
+
|
|
111
|
+
cd "$PROJECT_ROOT"
|
|
112
|
+
|
|
113
|
+
# Run RSpec tests
|
|
114
|
+
bundle exec rspec
|
|
115
|
+
|
|
116
|
+
# Run RuboCop
|
|
117
|
+
bundle exec rubocop --auto-correct
|
|
118
|
+
|
|
119
|
+
echo -e "${GREEN}โ
Tests completed${NC}"
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
# Main execution
|
|
123
|
+
main() {
|
|
124
|
+
echo -e "${BLUE}Starting Ruby REST API generation process...${NC}"
|
|
125
|
+
|
|
126
|
+
# Check if OpenAPI Generator CLI is installed
|
|
127
|
+
if ! command_exists openapi-generator-cli; then
|
|
128
|
+
echo -e "${YELLOW}OpenAPI Generator CLI not found${NC}"
|
|
129
|
+
install_openapi_generator
|
|
130
|
+
else
|
|
131
|
+
echo -e "${GREEN}โ
OpenAPI Generator CLI found${NC}"
|
|
132
|
+
fi
|
|
133
|
+
|
|
134
|
+
# Validate the OpenAPI specification
|
|
135
|
+
validate_spec
|
|
136
|
+
|
|
137
|
+
# Generate the REST client
|
|
138
|
+
generate_client
|
|
139
|
+
|
|
140
|
+
# Apply custom patches
|
|
141
|
+
apply_patches
|
|
142
|
+
|
|
143
|
+
# Update dependencies
|
|
144
|
+
update_dependencies
|
|
145
|
+
|
|
146
|
+
# Run tests (optional, can be disabled with --skip-tests)
|
|
147
|
+
if [[ "$*" != *"--skip-tests"* ]]; then
|
|
148
|
+
run_tests
|
|
149
|
+
fi
|
|
150
|
+
|
|
151
|
+
echo -e "${GREEN}๐ Ruby REST API client generation completed successfully!${NC}"
|
|
152
|
+
echo -e "${BLUE}Generated files are in: $OUTPUT_DIR${NC}"
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
# Handle command line arguments
|
|
156
|
+
case "$1" in
|
|
157
|
+
--help|-h)
|
|
158
|
+
echo "Usage: $0 [OPTIONS]"
|
|
159
|
+
echo "Options:"
|
|
160
|
+
echo " --skip-tests Skip running tests after generation"
|
|
161
|
+
echo " --help, -h Show this help message"
|
|
162
|
+
exit 0
|
|
163
|
+
;;
|
|
164
|
+
*)
|
|
165
|
+
main "$@"
|
|
166
|
+
;;
|
|
167
|
+
esac
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# Script to generate Ruby REST API client from OpenAPI specification
|
|
5
|
+
# Similar to the Python SDK's generate.sh script
|
|
6
|
+
|
|
7
|
+
require "fileutils"
|
|
8
|
+
require "json"
|
|
9
|
+
require "open3"
|
|
10
|
+
|
|
11
|
+
class ApiGenerator
|
|
12
|
+
OPENAPI_SPEC_PATH = "../../../../bin/oas/openapi.yaml"
|
|
13
|
+
GENERATOR_CONFIG_PATH = "../config/openapi_generator_config.json"
|
|
14
|
+
OUTPUT_DIR = "../lib/hatchet/clients/rest"
|
|
15
|
+
TEMP_DIR = "../tmp/openapi_generation"
|
|
16
|
+
|
|
17
|
+
def initialize
|
|
18
|
+
@root_dir = __dir__
|
|
19
|
+
@patches_applied = 0
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def generate
|
|
23
|
+
puts "๐ Starting Ruby REST API client generation..."
|
|
24
|
+
|
|
25
|
+
setup_directories
|
|
26
|
+
install_openapi_generator if needed
|
|
27
|
+
generate_client_code
|
|
28
|
+
apply_custom_patches
|
|
29
|
+
cleanup_temp_files
|
|
30
|
+
|
|
31
|
+
puts "โ
Ruby REST API client generation completed successfully!"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
private
|
|
35
|
+
|
|
36
|
+
def setup_directories
|
|
37
|
+
puts "๐ Setting up directories..."
|
|
38
|
+
FileUtils.mkdir_p(OUTPUT_DIR)
|
|
39
|
+
FileUtils.mkdir_p(TEMP_DIR)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def install_openapi_generator
|
|
43
|
+
puts "๐ง Checking OpenAPI Generator installation..."
|
|
44
|
+
|
|
45
|
+
# Check if openapi-generator-cli is available
|
|
46
|
+
stdout, stderr, status = Open3.capture3("which openapi-generator-cli")
|
|
47
|
+
|
|
48
|
+
if status.success?
|
|
49
|
+
puts "โ
OpenAPI Generator CLI found"
|
|
50
|
+
else
|
|
51
|
+
puts "๐ฆ Installing OpenAPI Generator CLI via npm..."
|
|
52
|
+
system("npm install -g @openapitools/openapi-generator-cli@7.13.0") ||
|
|
53
|
+
raise("Failed to install OpenAPI Generator CLI")
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def generate_client_code
|
|
58
|
+
puts "๐๏ธ Generating Ruby client code from OpenAPI spec..."
|
|
59
|
+
|
|
60
|
+
openapi_spec = File.expand_path(OPENAPI_SPEC_PATH, @root_dir)
|
|
61
|
+
config_file = File.expand_path(GENERATOR_CONFIG_PATH, @root_dir)
|
|
62
|
+
output_path = File.expand_path(OUTPUT_DIR, @root_dir)
|
|
63
|
+
|
|
64
|
+
unless File.exist?(openapi_spec)
|
|
65
|
+
raise "OpenAPI spec not found at #{openapi_spec}"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
unless File.exist?(config_file)
|
|
69
|
+
puts "โ ๏ธ Config file not found at #{config_file}, using default configuration"
|
|
70
|
+
config_file = nil
|
|
71
|
+
else
|
|
72
|
+
puts "โ
Using config file: #{config_file}"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Generate Ruby client using OpenAPI Generator
|
|
76
|
+
additional_props = build_additional_properties
|
|
77
|
+
|
|
78
|
+
cmd = [
|
|
79
|
+
"openapi-generator-cli", "generate",
|
|
80
|
+
"-i", openapi_spec,
|
|
81
|
+
"-g", "ruby",
|
|
82
|
+
"-o", output_path,
|
|
83
|
+
"--skip-validate-spec",
|
|
84
|
+
"--global-property", "apiTests=false,modelTests=false,apiDocs=true,modelDocs=true",
|
|
85
|
+
"--additional-properties", additional_props
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
cmd += ["-c", config_file] if config_file
|
|
89
|
+
|
|
90
|
+
puts "Running: #{cmd.join(' ')}"
|
|
91
|
+
puts "Additional properties: #{additional_props}"
|
|
92
|
+
system(*cmd) || raise("Failed to generate Ruby client code")
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def build_additional_properties
|
|
96
|
+
[
|
|
97
|
+
"gemName=hatchet-sdk-rest",
|
|
98
|
+
"moduleName=HatchetSdkRest",
|
|
99
|
+
"gemVersion=0.0.1",
|
|
100
|
+
"gemDescription=HatchetRubySDKRestClient",
|
|
101
|
+
"gemAuthor=HatchetTeam",
|
|
102
|
+
"gemHomepage=https://github.com/hatchet-dev/hatchet",
|
|
103
|
+
"gemLicense=MIT",
|
|
104
|
+
"library=faraday"
|
|
105
|
+
].join(",")
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def apply_custom_patches
|
|
109
|
+
puts "๐ง Applying custom patches..."
|
|
110
|
+
|
|
111
|
+
# Apply Ruby-specific patches here
|
|
112
|
+
patch_require_statements
|
|
113
|
+
patch_cookie_auth
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def patch_require_statements
|
|
117
|
+
puts " ๐ Patching require statements..."
|
|
118
|
+
|
|
119
|
+
# Find all generated Ruby files and fix require statements
|
|
120
|
+
Dir.glob("#{OUTPUT_DIR}/**/*.rb").each do |file|
|
|
121
|
+
content = File.read(file)
|
|
122
|
+
|
|
123
|
+
# Update require paths to be relative to the gem structure
|
|
124
|
+
content.gsub!(/require ['"]hatchet-sdk-rest\//, "require 'hatchet/clients/rest/")
|
|
125
|
+
|
|
126
|
+
# Ensure consistent module naming
|
|
127
|
+
content.gsub!(/module HatchetSdkRest/, "module Hatchet\n module Clients\n module Rest")
|
|
128
|
+
content.gsub!(/^end$/, " end\n end\nend") if content.include?("module Hatchet")
|
|
129
|
+
|
|
130
|
+
File.write(file, content)
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def patch_cookie_auth
|
|
135
|
+
puts " ๐ช Enhancing cookie auth..."
|
|
136
|
+
# find the auth_settings hash in the configuration.rb file
|
|
137
|
+
output_path = File.expand_path(OUTPUT_DIR, @root_dir)
|
|
138
|
+
config_file = File.join(output_path, "lib/hatchet-sdk-rest/configuration.rb")
|
|
139
|
+
if not File.exist?(config_file)
|
|
140
|
+
puts "config_file does not exist"
|
|
141
|
+
return false
|
|
142
|
+
end
|
|
143
|
+
content = File.read(config_file)
|
|
144
|
+
|
|
145
|
+
# Apply the fix - replace 'in: ,' with 'in: 'header','
|
|
146
|
+
if content.gsub!(/in:\s*,/, "in: 'header',")
|
|
147
|
+
puts " โ
Successfully applied cookie auth patch"
|
|
148
|
+
File.write(config_file, content)
|
|
149
|
+
@patches_applied += 1
|
|
150
|
+
else
|
|
151
|
+
puts " โ Failed to apply cookie auth patch - no matches found"
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def cleanup_temp_files
|
|
156
|
+
puts "๐งน Cleaning up temporary files..."
|
|
157
|
+
FileUtils.rm_rf(TEMP_DIR) if Dir.exist?(TEMP_DIR)
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
def needed
|
|
161
|
+
!system("which openapi-generator-cli > /dev/null 2>&1")
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Run the generator if this script is executed directly
|
|
166
|
+
if __FILE__ == $0
|
|
167
|
+
begin
|
|
168
|
+
ApiGenerator.new.generate
|
|
169
|
+
rescue => e
|
|
170
|
+
puts "โ Generation failed: #{e.message}"
|
|
171
|
+
puts e.backtrace.join("\n") if ENV["DEBUG"]
|
|
172
|
+
exit 1
|
|
173
|
+
end
|
|
174
|
+
end
|