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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 39266ae76d015db9cfae9ab50c45b45772a71a6e83196a8f50d696427df1188f
|
|
4
|
+
data.tar.gz: '0989914579fb062642a4ffb31242632a0bfc5fd4bc510fbfac1c8b91a256de74'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 610bc9c45ce11f4615d9858e66348c4fcae1f0af0f85be8763d6e5b43d6eba26b2ad3af7b521b6b058357b39cd4e386c9c13f3046043f0d056dcf86d52232387
|
|
7
|
+
data.tar.gz: 53f3136c6ff7f902df3e71b8626391ef02294c21d0333f24c6de2ae924e2d12a04754340b2b9b8f9b3d3046bc5fe438e917b8799b79e849259023d3b0cf2d14e
|
data/CHANGELOG.md
CHANGED
data/CLAUDE.md
CHANGED
|
@@ -4,7 +4,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
4
4
|
|
|
5
5
|
## Project Overview
|
|
6
6
|
|
|
7
|
-
This is the Ruby SDK for Hatchet (gem name: hatchet-sdk), currently in early development (version 0.0.0). The project follows standard Ruby gem conventions with a simple structure containing a main `Hatchet` module with a `Client` class for
|
|
7
|
+
This is the Ruby SDK for Hatchet (gem name: hatchet-sdk), currently in early development (version 0.0.0). The project follows standard Ruby gem conventions with a simple structure containing a main `Hatchet` module with a `Client` class for JWT token authentication.
|
|
8
|
+
|
|
9
|
+
The SDK includes comprehensive documentation and type signatures for excellent IDE support, including parameter hints, auto-completion, and type checking.
|
|
8
10
|
|
|
9
11
|
## Common Commands
|
|
10
12
|
|
|
@@ -25,18 +27,73 @@ This is the Ruby SDK for Hatchet (gem name: hatchet-sdk), currently in early dev
|
|
|
25
27
|
**Gem Management:**
|
|
26
28
|
- `bundle exec rake release` - Release new version (updates version, creates git tag, pushes to rubygems)
|
|
27
29
|
|
|
30
|
+
**Documentation:**
|
|
31
|
+
- `yard doc` - Generate YARD documentation (if yard gem is installed)
|
|
32
|
+
- `rbs validate` - Validate RBS type signatures for syntax errors
|
|
33
|
+
|
|
34
|
+
**REST API Generation:**
|
|
35
|
+
- `rake api:generate` - Generate REST API client from OpenAPI specification
|
|
36
|
+
- `rake api:clean` - Remove generated REST API client files
|
|
37
|
+
- `rake api:regenerate` - Clean and regenerate REST API client
|
|
38
|
+
- `rake api:validate` - Validate OpenAPI specification
|
|
39
|
+
- `rake api:info` - Show OpenAPI specification information
|
|
40
|
+
- `./scripts/generate.sh` - Alternative shell script for generation
|
|
41
|
+
|
|
28
42
|
## Architecture
|
|
29
43
|
|
|
30
44
|
**Core Structure:**
|
|
31
45
|
- `lib/hatchet-sdk.rb` - Main entry point, defines `Hatchet` module with `Error` and `Client` classes
|
|
32
46
|
- `lib/hatchet/version.rb` - Version constant
|
|
33
|
-
- `
|
|
34
|
-
- `
|
|
47
|
+
- `lib/hatchet/config.rb` - Configuration classes with comprehensive JWT token support
|
|
48
|
+
- `lib/hatchet/clients.rb` - Client factory and REST client integration
|
|
49
|
+
- `lib/hatchet/clients/rest/` - Generated REST API client (created via `rake api:generate`)
|
|
50
|
+
- `spec/` - RSpec tests with monkey patching disabled (36+ test cases)
|
|
51
|
+
- `sig/hatchet-sdk.rbs` - Ruby type signatures for IDE integration
|
|
52
|
+
- `scripts/` - Code generation and maintenance scripts
|
|
35
53
|
|
|
36
54
|
**Key Classes:**
|
|
37
|
-
- `Hatchet::Client` - Main client class that accepts
|
|
55
|
+
- `Hatchet::Client` - Main client class that accepts JWT token for authentication
|
|
56
|
+
- `Hatchet::Config` - Configuration class supporting multiple sources (params, env vars, JWT payload)
|
|
57
|
+
- `Hatchet::Clients` - Factory for creating REST and other protocol clients
|
|
58
|
+
- `Hatchet::Clients::Rest::*` - Generated REST API clients (WorkflowApi, EventApi, etc.)
|
|
59
|
+
- `Hatchet::TLSConfig` - TLS configuration for secure connections
|
|
60
|
+
- `Hatchet::HealthcheckConfig` - Worker health monitoring configuration
|
|
61
|
+
- `Hatchet::OpenTelemetryConfig` - Observability configuration
|
|
38
62
|
- `Hatchet::Error` - Base error class for gem-specific exceptions
|
|
39
63
|
|
|
64
|
+
**Configuration Sources (priority order):**
|
|
65
|
+
1. Explicit constructor parameters (highest priority)
|
|
66
|
+
2. Environment variables (`HATCHET_CLIENT_*`)
|
|
67
|
+
3. JWT token payload (tenant_id extracted from 'sub' field)
|
|
68
|
+
4. Default values (lowest priority)
|
|
69
|
+
|
|
70
|
+
**Documentation & IDE Support:**
|
|
71
|
+
- **YARD documentation** - Comprehensive JSDoc-style comments with examples
|
|
72
|
+
- **RBS type signatures** - Complete type definitions for IDE parameter hints
|
|
73
|
+
- **Sorbet compatibility** - Tagged with `# typed: strict` for type checking
|
|
74
|
+
- IDEs with Ruby LSP/RubyMine will show parameter hints, auto-completion, and types
|
|
75
|
+
|
|
40
76
|
The codebase uses frozen string literals and follows Ruby 3.1+ requirements.
|
|
41
77
|
|
|
78
|
+
## Development Notes
|
|
79
|
+
|
|
80
|
+
**When adding new configuration options:**
|
|
81
|
+
1. Add the parameter to `Config#initialize` method
|
|
82
|
+
2. Update the `@option` YARD documentation in both `Client` and `Config` classes
|
|
83
|
+
3. Add the parameter to RBS type signatures in `sig/hatchet-sdk.rbs`
|
|
84
|
+
4. Add comprehensive test coverage in `spec/hatchet/config_spec.rb`
|
|
85
|
+
5. Update this CLAUDE.md file with any architectural changes
|
|
86
|
+
|
|
87
|
+
**REST API Client Generation:**
|
|
88
|
+
- The SDK can generate a complete REST API client from the OpenAPI spec at `../../../../bin/oas/openapi.yaml`
|
|
89
|
+
- Use `rake api:generate` to create Ruby bindings for all Hatchet REST endpoints
|
|
90
|
+
- Generated client integrates with `Hatchet::Config` for authentication and configuration
|
|
91
|
+
- Supports both sync and async operations with comprehensive error handling
|
|
92
|
+
- See `REST_API_GENERATION.md` for detailed instructions
|
|
93
|
+
|
|
94
|
+
**Testing JWT token functionality:**
|
|
95
|
+
- Use `Base64.encode64('{"sub":"tenant-id"}').gsub(/\n/, "").gsub(/=+$/, "")` to create test JWT payloads
|
|
96
|
+
- The config extracts tenant_id from the 'sub' field in JWT tokens
|
|
97
|
+
- Test both explicit tenant_id override and JWT extraction scenarios
|
|
98
|
+
|
|
42
99
|
Keep the CLAUDE.md instructions up to date as the project continues to develop.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Integration Testing Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how to run integration tests for the Hatchet Ruby SDK that make actual API calls to test the real functionality.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Ruby SDK includes two types of tests:
|
|
8
|
+
|
|
9
|
+
1. **Unit Tests** (`spec/hatchet/`) - Fast tests that use mocks and don't require API credentials
|
|
10
|
+
2. **Integration Tests** (`spec/integration/`) - Tests that make real API calls and require valid credentials
|
|
11
|
+
|
|
12
|
+
## Running Unit Tests
|
|
13
|
+
|
|
14
|
+
Unit tests run by default and don't require any setup:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
bundle exec rspec
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Running Integration Tests
|
|
21
|
+
|
|
22
|
+
Integration tests require a valid Hatchet API token and will be skipped automatically if no credentials are found.
|
|
23
|
+
|
|
24
|
+
### Prerequisites
|
|
25
|
+
|
|
26
|
+
1. Valid Hatchet API token (JWT)
|
|
27
|
+
2. Access to a Hatchet tenant with some workflow/task run data
|
|
28
|
+
|
|
29
|
+
### Setup
|
|
30
|
+
|
|
31
|
+
Set your API credentials as environment variables:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
export HATCHET_CLIENT_TOKEN="your-jwt-token-here"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Running Integration Tests
|
|
38
|
+
|
|
39
|
+
#### Run only integration tests:
|
|
40
|
+
```bash
|
|
41
|
+
bundle exec rspec spec/integration/ --tag integration
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Run all tests including integration:
|
|
45
|
+
```bash
|
|
46
|
+
bundle exec rspec
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### Force integration tests even without token (will skip individual tests):
|
|
50
|
+
```bash
|
|
51
|
+
RUN_INTEGRATION_TESTS=true bundle exec rspec spec/integration/
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### What Integration Tests Cover
|
|
55
|
+
|
|
56
|
+
The integration tests for the Runs feature test:
|
|
57
|
+
|
|
58
|
+
#### ✅ Basic API Connectivity
|
|
59
|
+
- List workflow runs
|
|
60
|
+
- List with pagination
|
|
61
|
+
- Filter operations
|
|
62
|
+
- Empty result handling
|
|
63
|
+
|
|
64
|
+
#### ✅ Workflow Run Operations
|
|
65
|
+
- Get workflow run details
|
|
66
|
+
- Get workflow run status
|
|
67
|
+
- Get workflow run results
|
|
68
|
+
- Data structure validation
|
|
69
|
+
|
|
70
|
+
#### ✅ Task Run Operations
|
|
71
|
+
- Get task run details
|
|
72
|
+
- Data structure validation
|
|
73
|
+
|
|
74
|
+
#### ✅ Workflow Creation (Conditional)
|
|
75
|
+
- Attempt to create workflow runs
|
|
76
|
+
- Gracefully handles missing test workflows
|
|
77
|
+
|
|
78
|
+
#### ✅ Error Handling
|
|
79
|
+
- Invalid IDs
|
|
80
|
+
- Invalid date ranges
|
|
81
|
+
- Network errors
|
|
82
|
+
|
|
83
|
+
#### ✅ Data Structure Validation
|
|
84
|
+
- Response object structure
|
|
85
|
+
- Required fields
|
|
86
|
+
- Data types
|
|
87
|
+
|
|
88
|
+
#### ⚠️ Bulk Operations (Structure Only)
|
|
89
|
+
- Tests helper classes
|
|
90
|
+
- Does NOT test actual bulk cancel/replay (too dangerous for integration tests)
|
|
91
|
+
|
|
92
|
+
## Sample Output
|
|
93
|
+
|
|
94
|
+
### With Valid Credentials
|
|
95
|
+
```
|
|
96
|
+
🔗 Running integration tests with real API credentials
|
|
97
|
+
Tenant ID: abc123-def456
|
|
98
|
+
Server URL: https://app.dev.hatchet-tools.com
|
|
99
|
+
|
|
100
|
+
Hatchet::Features::Runs Integration
|
|
101
|
+
API connectivity and basic operations
|
|
102
|
+
✓ can list workflow runs without error
|
|
103
|
+
✓ returns a TaskSummaryList when listing runs
|
|
104
|
+
✓ can list runs with pagination without error
|
|
105
|
+
✓ returns an array when using list_with_pagination
|
|
106
|
+
✓ can filter runs by various parameters
|
|
107
|
+
✓ handles empty results gracefully
|
|
108
|
+
workflow run operations
|
|
109
|
+
✓ can retrieve workflow run details
|
|
110
|
+
✓ returns WorkflowRunDetails when getting a workflow run
|
|
111
|
+
✓ can get workflow run status
|
|
112
|
+
✓ returns a TaskStatus when getting status
|
|
113
|
+
✓ can get workflow run result
|
|
114
|
+
...
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Without Credentials
|
|
118
|
+
```
|
|
119
|
+
⚠️ Integration tests skipped (no HATCHET_CLIENT_TOKEN found)
|
|
120
|
+
Set HATCHET_CLIENT_TOKEN or RUN_INTEGRATION_TESTS=true to run integration tests
|
|
121
|
+
|
|
122
|
+
Finished in 0.00123 seconds
|
|
123
|
+
0 examples, 0 failures (all integration tests skipped)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Safety Considerations
|
|
127
|
+
|
|
128
|
+
The integration tests are designed to be safe:
|
|
129
|
+
|
|
130
|
+
- ✅ **Read Operations**: Tests safely read existing data
|
|
131
|
+
- ✅ **Safe Creation**: May attempt to create test workflows but handles failures gracefully
|
|
132
|
+
- ❌ **No Destructive Operations**: Does not actually cancel or replay runs in integration tests
|
|
133
|
+
- ❌ **No Data Modification**: Does not modify or delete existing workflow runs
|
|
134
|
+
|
|
135
|
+
## Troubleshooting
|
|
136
|
+
|
|
137
|
+
### "No recent workflow runs found for testing"
|
|
138
|
+
- Your tenant needs some historical workflow runs to test against
|
|
139
|
+
- Try running some workflows first, or use a tenant with existing data
|
|
140
|
+
|
|
141
|
+
### "Integration tests require HATCHET_CLIENT_TOKEN to be set"
|
|
142
|
+
- Make sure your JWT token is properly set in the environment
|
|
143
|
+
- Verify the token is valid and not expired
|
|
144
|
+
|
|
145
|
+
### API Connection Errors
|
|
146
|
+
- Check your network connection
|
|
147
|
+
- Verify `HATCHET_CLIENT_SERVER_URL` is correct
|
|
148
|
+
- Ensure your token has the necessary permissions
|
|
149
|
+
|
|
150
|
+
### Workflow Creation Failures
|
|
151
|
+
- This is expected if you don't have a workflow named "test-workflow"
|
|
152
|
+
- The test will show a warning but won't fail
|
|
153
|
+
- Create a simple test workflow if you want to test the full creation flow
|
|
154
|
+
|
|
155
|
+
## Contributing
|
|
156
|
+
|
|
157
|
+
When adding new integration tests:
|
|
158
|
+
|
|
159
|
+
1. Always tag them with `:integration`
|
|
160
|
+
2. Use the `IntegrationHelper` methods
|
|
161
|
+
3. Handle missing test data gracefully with `skip` or `safely_attempt_operation`
|
|
162
|
+
4. Avoid destructive operations
|
|
163
|
+
5. Validate response data structures
|
|
164
|
+
6. Add appropriate documentation
|
|
165
|
+
|
|
166
|
+
## CI/CD Integration
|
|
167
|
+
|
|
168
|
+
For automated testing pipelines:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Run only unit tests (fast, no credentials needed)
|
|
172
|
+
bundle exec rspec --tag ~integration
|
|
173
|
+
|
|
174
|
+
# Run integration tests with credentials (slower, requires setup)
|
|
175
|
+
HATCHET_CLIENT_TOKEN=$SECRET_TOKEN bundle exec rspec --tag integration
|
|
176
|
+
```
|
data/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025
|
|
3
|
+
Copyright (c) 2025 Hatchet Technologies, Inc.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# REST API Generation for Hatchet Ruby SDK
|
|
2
|
+
|
|
3
|
+
This document explains how to generate and use the REST API client for the Hatchet Ruby SDK from the OpenAPI specification.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Hatchet Ruby SDK can generate a comprehensive REST API client from the OpenAPI specification located at `../../../../bin/oas/openapi.yaml`. This provides Ruby bindings for all Hatchet REST API endpoints with full type safety and documentation.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Node.js and npm** - Required for OpenAPI Generator CLI
|
|
12
|
+
2. **Ruby 3.1+** - For running the generation scripts
|
|
13
|
+
3. **Bundler** - For dependency management
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### 1. Install OpenAPI Generator CLI
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @openapitools/openapi-generator-cli@latest
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### 2. Generate the REST API Client
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Using Rake (recommended)
|
|
27
|
+
rake api:generate
|
|
28
|
+
|
|
29
|
+
# Or using the shell script directly
|
|
30
|
+
./scripts/generate.sh
|
|
31
|
+
|
|
32
|
+
# Or using the Ruby script
|
|
33
|
+
ruby scripts/generate_api.rb
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 3. Use the Generated Client
|
|
37
|
+
|
|
38
|
+
```ruby
|
|
39
|
+
require 'hatchet-sdk'
|
|
40
|
+
|
|
41
|
+
# Create main Hatchet configuration
|
|
42
|
+
config = Hatchet::Config.new(token: "your-jwt-token")
|
|
43
|
+
|
|
44
|
+
# Create REST API client
|
|
45
|
+
rest_client = Hatchet::Clients.rest_client(config)
|
|
46
|
+
|
|
47
|
+
# Use specific API endpoints
|
|
48
|
+
workflows_api = Hatchet::Clients::Rest::WorkflowApi.new(rest_client)
|
|
49
|
+
events_api = Hatchet::Clients::Rest::EventApi.new(rest_client)
|
|
50
|
+
|
|
51
|
+
# Make API calls
|
|
52
|
+
workflows = workflows_api.list_workflows
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Available Rake Tasks
|
|
56
|
+
|
|
57
|
+
- `rake api:generate` - Generate REST API client from OpenAPI spec
|
|
58
|
+
- `rake api:clean` - Remove generated REST API client files
|
|
59
|
+
- `rake api:regenerate` - Clean and regenerate (clean + generate)
|
|
60
|
+
- `rake api:validate` - Validate the OpenAPI specification
|
|
61
|
+
- `rake api:install_generator` - Install OpenAPI Generator CLI if not present
|
|
62
|
+
- `rake api:info` - Show information about the OpenAPI specification
|
|
63
|
+
|
|
64
|
+
## Generated Structure
|
|
65
|
+
|
|
66
|
+
After generation, you'll have:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
lib/hatchet/clients/rest/
|
|
70
|
+
├── api_client.rb # Main API client
|
|
71
|
+
├── configuration.rb # Client configuration
|
|
72
|
+
├── api_error.rb # Error handling
|
|
73
|
+
├── api/ # API endpoint classes
|
|
74
|
+
│ ├── workflow_api.rb # Workflow operations
|
|
75
|
+
│ ├── event_api.rb # Event operations
|
|
76
|
+
│ ├── step_run_api.rb # Step run operations
|
|
77
|
+
│ └── ... (other APIs)
|
|
78
|
+
└── models/ # Data models
|
|
79
|
+
├── workflow.rb # Workflow model
|
|
80
|
+
├── event.rb # Event model
|
|
81
|
+
└── ... (other models)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Configuration
|
|
85
|
+
|
|
86
|
+
### OpenAPI Generator Configuration
|
|
87
|
+
|
|
88
|
+
The generation is controlled by `config/openapi_generator_config.json`:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"gemName": "hatchet-sdk-rest",
|
|
93
|
+
"moduleName": "Hatchet::Clients::Rest",
|
|
94
|
+
"library": "faraday",
|
|
95
|
+
"httpLibrary": "faraday",
|
|
96
|
+
"useAutoload": true,
|
|
97
|
+
"sortParamsByRequiredFlag": true,
|
|
98
|
+
"generateExceptionClass": true
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Custom Patches
|
|
103
|
+
|
|
104
|
+
The generation process applies custom patches via `scripts/patch_generated_code.rb`:
|
|
105
|
+
|
|
106
|
+
1. **Module Structure** - Ensures proper Ruby module nesting
|
|
107
|
+
2. **Require Statements** - Fixes require paths for gem structure
|
|
108
|
+
3. **Documentation** - Adds comprehensive YARD documentation
|
|
109
|
+
4. **Error Handling** - Integrates with `Hatchet::Error`
|
|
110
|
+
5. **Configuration Integration** - Connects with `Hatchet::Config`
|
|
111
|
+
6. **Sorbet Types** - Adds type signatures for better IDE support
|
|
112
|
+
|
|
113
|
+
## Integration with Main SDK
|
|
114
|
+
|
|
115
|
+
The REST client integrates seamlessly with the main SDK:
|
|
116
|
+
|
|
117
|
+
```ruby
|
|
118
|
+
# Main configuration
|
|
119
|
+
hatchet_config = Hatchet::Config.new(
|
|
120
|
+
token: "your-jwt-token",
|
|
121
|
+
server_url: "https://api.hatchet.com"
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
# REST client automatically inherits configuration
|
|
125
|
+
rest_client = Hatchet::Clients.rest_client(hatchet_config)
|
|
126
|
+
|
|
127
|
+
# All configuration options are passed through:
|
|
128
|
+
# - Authentication token
|
|
129
|
+
# - Server URL
|
|
130
|
+
# - Timeouts
|
|
131
|
+
# - Custom headers
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Error Handling
|
|
135
|
+
|
|
136
|
+
Generated API errors inherit from `Hatchet::Error`:
|
|
137
|
+
|
|
138
|
+
```ruby
|
|
139
|
+
begin
|
|
140
|
+
workflows = workflows_api.list_workflows
|
|
141
|
+
rescue Hatchet::Clients::Rest::ApiError => e
|
|
142
|
+
puts "API Error: #{e.message}"
|
|
143
|
+
puts "Status: #{e.code}"
|
|
144
|
+
puts "Headers: #{e.response_headers}"
|
|
145
|
+
puts "Body: #{e.response_body}"
|
|
146
|
+
end
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Type Safety and IDE Support
|
|
150
|
+
|
|
151
|
+
The generated client includes:
|
|
152
|
+
|
|
153
|
+
- **YARD documentation** - Comprehensive method and parameter documentation
|
|
154
|
+
- **RBS type signatures** - For IDE parameter hints and type checking
|
|
155
|
+
- **Sorbet compatibility** - Type annotations for static analysis
|
|
156
|
+
- **Parameter validation** - Runtime validation of required parameters
|
|
157
|
+
|
|
158
|
+
## Customization
|
|
159
|
+
|
|
160
|
+
### Adding Custom Methods
|
|
161
|
+
|
|
162
|
+
You can extend the generated API classes:
|
|
163
|
+
|
|
164
|
+
```ruby
|
|
165
|
+
module Hatchet
|
|
166
|
+
module Clients
|
|
167
|
+
module Rest
|
|
168
|
+
class WorkflowApi
|
|
169
|
+
# Add custom convenience methods
|
|
170
|
+
def get_workflow_by_name(name)
|
|
171
|
+
workflows = list_workflows
|
|
172
|
+
workflows.find { |w| w.name == name }
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Custom Configuration
|
|
181
|
+
|
|
182
|
+
Create specialized configurations:
|
|
183
|
+
|
|
184
|
+
```ruby
|
|
185
|
+
# Custom REST configuration
|
|
186
|
+
rest_config = Hatchet::Clients::Rest::Configuration.new
|
|
187
|
+
rest_config.access_token = "custom-token"
|
|
188
|
+
rest_config.host = "custom-host.com"
|
|
189
|
+
rest_config.timeout = 30
|
|
190
|
+
|
|
191
|
+
rest_client = Hatchet::Clients::Rest::ApiClient.new(rest_config)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Development and Debugging
|
|
195
|
+
|
|
196
|
+
### Debugging Generation
|
|
197
|
+
|
|
198
|
+
Set the `DEBUG` environment variable for verbose output:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
DEBUG=1 rake api:generate
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Validation
|
|
205
|
+
|
|
206
|
+
Always validate the OpenAPI spec before generation:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
rake api:validate
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Regeneration
|
|
213
|
+
|
|
214
|
+
When the OpenAPI spec changes, regenerate the client:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
rake api:regenerate
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
This will clean existing files and generate fresh ones.
|
|
221
|
+
|
|
222
|
+
## Troubleshooting
|
|
223
|
+
|
|
224
|
+
### Common Issues
|
|
225
|
+
|
|
226
|
+
1. **OpenAPI Generator CLI not found**
|
|
227
|
+
```bash
|
|
228
|
+
rake api:install_generator
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
2. **Module loading errors**
|
|
232
|
+
- Ensure you've run `bundle install` after generation
|
|
233
|
+
- Check that all required gems are installed
|
|
234
|
+
|
|
235
|
+
3. **Authentication failures**
|
|
236
|
+
- Verify your JWT token is valid
|
|
237
|
+
- Check server URL configuration
|
|
238
|
+
|
|
239
|
+
4. **Type errors with Sorbet**
|
|
240
|
+
- Run `bundle exec srb tc` to check types
|
|
241
|
+
- Update RBS signatures if needed
|
|
242
|
+
|
|
243
|
+
### Getting Help
|
|
244
|
+
|
|
245
|
+
- Check `rake api:info` for OpenAPI spec information
|
|
246
|
+
- Review generated documentation in the `api/` and `models/` directories
|
|
247
|
+
- Consult the main Hatchet API documentation at https://docs.hatchet.run
|
|
248
|
+
|
|
249
|
+
## Maintenance
|
|
250
|
+
|
|
251
|
+
The REST API generation setup requires minimal maintenance:
|
|
252
|
+
|
|
253
|
+
1. **OpenAPI Spec Updates** - Regenerate when the spec changes
|
|
254
|
+
2. **Dependency Updates** - Keep OpenAPI Generator CLI updated
|
|
255
|
+
3. **Custom Patches** - Update patches when generation patterns change
|
|
256
|
+
|
|
257
|
+
The generation process is designed to be idempotent and safe to run multiple times.
|
data/Rakefile
CHANGED
|
@@ -9,4 +9,13 @@ require "rubocop/rake_task"
|
|
|
9
9
|
|
|
10
10
|
RuboCop::RakeTask.new
|
|
11
11
|
|
|
12
|
+
# Load REST API generation tasks
|
|
13
|
+
load File.expand_path("Rakefile.rest", __dir__)
|
|
14
|
+
|
|
15
|
+
# Generate REST API client before building the gem
|
|
16
|
+
task :build => "api:generate"
|
|
17
|
+
|
|
18
|
+
# Generate REST API client before running tests (for CI)
|
|
19
|
+
task :spec => "api:generate_if_missing"
|
|
20
|
+
|
|
12
21
|
task default: %i[spec rubocop]
|
data/Rakefile.rest
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Additional Rake tasks for REST API client generation
|
|
4
|
+
|
|
5
|
+
require "rake"
|
|
6
|
+
|
|
7
|
+
namespace :api do
|
|
8
|
+
desc "Generate REST API client from OpenAPI specification"
|
|
9
|
+
task :generate do
|
|
10
|
+
puts "Generating REST API client from OpenAPI specification..."
|
|
11
|
+
|
|
12
|
+
ruby_script = File.join(__dir__, "scripts", "generate_api.rb")
|
|
13
|
+
|
|
14
|
+
unless File.exist?(ruby_script)
|
|
15
|
+
puts "❌ Generator script not found at #{ruby_script}"
|
|
16
|
+
exit 1
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Make the script executable
|
|
20
|
+
File.chmod(0755, ruby_script)
|
|
21
|
+
|
|
22
|
+
# Execute the generation script
|
|
23
|
+
system("ruby #{ruby_script}") || begin
|
|
24
|
+
puts "❌ API generation failed"
|
|
25
|
+
exit 1
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
puts "✅ REST API client generation completed"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
desc "Clean generated REST API client files"
|
|
32
|
+
task :clean do
|
|
33
|
+
rest_client_dir = File.join(__dir__, "lib", "hatchet", "clients", "rest")
|
|
34
|
+
|
|
35
|
+
if Dir.exist?(rest_client_dir)
|
|
36
|
+
puts "🧹 Cleaning generated REST API client files..."
|
|
37
|
+
require "fileutils"
|
|
38
|
+
FileUtils.rm_rf(rest_client_dir)
|
|
39
|
+
puts "✅ REST API client files cleaned"
|
|
40
|
+
else
|
|
41
|
+
puts "ℹ️ No REST API client files to clean"
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
desc "Regenerate REST API client (clean + generate)"
|
|
46
|
+
task regenerate: [:clean, :generate]
|
|
47
|
+
|
|
48
|
+
desc "Generate REST API client only if not already present"
|
|
49
|
+
task :generate_if_missing do
|
|
50
|
+
rest_client_dir = File.join(__dir__, "lib", "hatchet", "clients", "rest")
|
|
51
|
+
main_client_file = File.join(rest_client_dir, "lib", "hatchet-sdk-rest.rb")
|
|
52
|
+
|
|
53
|
+
unless File.exist?(main_client_file)
|
|
54
|
+
puts "🔄 REST API client not found, generating..."
|
|
55
|
+
Rake::Task["api:generate"].invoke
|
|
56
|
+
else
|
|
57
|
+
puts "✅ REST API client already exists, skipping generation"
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
desc "Validate OpenAPI specification"
|
|
62
|
+
task :validate do
|
|
63
|
+
openapi_spec = File.join(__dir__, "..", "..", "..", "bin", "oas", "openapi.yaml")
|
|
64
|
+
|
|
65
|
+
unless File.exist?(openapi_spec)
|
|
66
|
+
puts "❌ OpenAPI specification not found at #{openapi_spec}"
|
|
67
|
+
exit 1
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
puts "🔍 Validating OpenAPI specification..."
|
|
71
|
+
|
|
72
|
+
# Use openapi-generator-cli to validate the spec
|
|
73
|
+
cmd = ["openapi-generator-cli", "validate", "-i", openapi_spec]
|
|
74
|
+
|
|
75
|
+
if system(*cmd)
|
|
76
|
+
puts "✅ OpenAPI specification is valid"
|
|
77
|
+
else
|
|
78
|
+
puts "❌ OpenAPI specification validation failed"
|
|
79
|
+
exit 1
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
desc "Install OpenAPI Generator CLI if not present"
|
|
84
|
+
task :install_generator do
|
|
85
|
+
puts "🔧 Checking OpenAPI Generator CLI installation..."
|
|
86
|
+
|
|
87
|
+
if system("which openapi-generator-cli > /dev/null 2>&1")
|
|
88
|
+
puts "✅ OpenAPI Generator CLI is already installed"
|
|
89
|
+
else
|
|
90
|
+
puts "📦 Installing OpenAPI Generator CLI..."
|
|
91
|
+
|
|
92
|
+
if system("npm install -g @openapitools/openapi-generator-cli@7.13.0")
|
|
93
|
+
puts "✅ OpenAPI Generator CLI installed successfully"
|
|
94
|
+
else
|
|
95
|
+
puts "❌ Failed to install OpenAPI Generator CLI"
|
|
96
|
+
puts "Please install it manually: npm install -g @openapitools/openapi-generator-cli"
|
|
97
|
+
exit 1
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
desc "Show information about the OpenAPI specification"
|
|
103
|
+
task :info do
|
|
104
|
+
openapi_spec = File.join(__dir__, "..", "..", "..", "bin", "oas", "openapi.yaml")
|
|
105
|
+
|
|
106
|
+
unless File.exist?(openapi_spec)
|
|
107
|
+
puts "❌ OpenAPI specification not found at #{openapi_spec}"
|
|
108
|
+
exit 1
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
puts "📊 OpenAPI Specification Information:"
|
|
112
|
+
puts " File: #{openapi_spec}"
|
|
113
|
+
puts " Size: #{File.size(openapi_spec)} bytes"
|
|
114
|
+
puts " Modified: #{File.mtime(openapi_spec)}"
|
|
115
|
+
|
|
116
|
+
# Try to parse and show basic info
|
|
117
|
+
begin
|
|
118
|
+
require "yaml"
|
|
119
|
+
spec = YAML.load_file(openapi_spec)
|
|
120
|
+
|
|
121
|
+
puts " OpenAPI Version: #{spec.dig('openapi')}"
|
|
122
|
+
puts " API Version: #{spec.dig('info', 'version')}"
|
|
123
|
+
puts " API Title: #{spec.dig('info', 'title')}"
|
|
124
|
+
puts " Paths: #{spec.dig('paths')&.keys&.count || 0}"
|
|
125
|
+
puts " Components: #{spec.dig('components', 'schemas')&.keys&.count || 0} schemas"
|
|
126
|
+
rescue => e
|
|
127
|
+
puts " ⚠️ Could not parse specification: #{e.message}"
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Add REST API tasks to the default rake task
|
|
133
|
+
task default: ["api:validate"]
|