hatchet-sdk 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +45 -0
- data/lib/hatchet/clients/rest/.openapi-generator/FILES +9 -0
- data/lib/hatchet/clients/rest/README.md +16 -3
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/filter_api.rb +4 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/operator_api.rb +405 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/webhook_api.rb +2 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/worker_api.rb +3 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_runs_api.rb +3 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_invite_request.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_id.rb +2 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pause_workflow_request.rb +105 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pause_workflow_request_pause.rb +343 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pause_workflow_request_unpause.rb +262 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_invite.rb +11 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member.rb +11 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member_role.rb +2 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_invite_request.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_member_request.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_http_operator_request.rb +346 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_http_operator.rb +372 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_http_operator_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_http_operator_request.rb +252 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker.rb +24 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow.rb +43 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_pause_scheduled_cron_run_queue_behavior.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_update_request.rb +7 -8
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +9 -0
- data/lib/hatchet/concurrency.rb +85 -18
- data/lib/hatchet/context.rb +5 -2
- data/lib/hatchet/contracts/v1/workflows_pb.rb +1 -1
- data/lib/hatchet/durable_context.rb +5 -12
- data/lib/hatchet/features/cel.rb +2 -2
- data/lib/hatchet/features/cron.rb +5 -5
- data/lib/hatchet/features/events.rb +7 -7
- data/lib/hatchet/features/filters.rb +7 -7
- data/lib/hatchet/features/logs.rb +2 -2
- data/lib/hatchet/features/metrics.rb +6 -6
- data/lib/hatchet/features/rate_limits.rb +2 -2
- data/lib/hatchet/features/runs.rb +4 -5
- data/lib/hatchet/features/scheduled.rb +7 -7
- data/lib/hatchet/features/tenant.rb +2 -2
- data/lib/hatchet/features/workers.rb +5 -5
- data/lib/hatchet/features/workflows.rb +6 -6
- data/lib/hatchet/version.rb +1 -1
- data/lib/hatchet/workflow.rb +58 -33
- data/lib/hatchet-sdk.rb +65 -32
- data/sig/hatchet/concurrency.rbs +12 -2
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2e70af6a8a498aa205cbd60dfeda2777cbdcc66a1b7062605050e2ded013459c
|
|
4
|
+
data.tar.gz: fee0bf38bc650c7c92f1eae39f594732e2433d959a74264ab1f726a4ef9e6dea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0e09fdbad439ad82823517f8e568c71d326c93dca0b20ba14fdfbd7d7fadb43a00456db2b0a05b90b3b8d4f9f0d23dc80ec1489eaeeb70b9198ceb371cb5f46
|
|
7
|
+
data.tar.gz: 382c9b1dd855932d272ed724ab0cc04bb0a58e4251bc0a5f1170aad7ab2955b3c33f6d846cb0ff9d2d9e9f50fdc94b60ab845da950fc5c15f3fcd3e07497bd5d
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to Hatchet's Ruby SDK will be documented in this changelog.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.8.0] - 2026-09-02
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Added support for tenant-scoped shared concurrency strategies: declare a `ConcurrencyExpression` with `is_tenant_scoped: true` and a `name`, and every task declaring the same name (across workflows) consumes the same concurrency limit. Re-declaring a name updates the strategy in place, and tenant-scoped entries mix freely with workflow-scoped entries in one chain.
|
|
13
|
+
- `max_runs` on `ConcurrencyExpression` now accepts an `Integer` or a `String`: a string is a CEL expression over task input computing the max runs for each concurrency group, so different groups (e.g. pricing tiers) can have different limits.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [0.7.0] - 2026-08-26
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Adds support for `CANCEL_QUEUED_EXCEPT_NEWEST` and `CANCEL_QUEUED_EXCEPT_OLDEST` concurrency strategies.
|
|
21
|
+
|
|
22
|
+
|
|
8
23
|
## [0.6.0] - 2026-07-23
|
|
9
24
|
|
|
10
25
|
### Changed
|
data/README.md
CHANGED
|
@@ -10,6 +10,51 @@
|
|
|
10
10
|
|
|
11
11
|
This is the official Ruby SDK for [Hatchet](https://hatchet.run), a distributed, fault-tolerant task queue. The SDK allows you to easily integrate Hatchet's task scheduling and workflow orchestration capabilities into your Ruby applications.
|
|
12
12
|
|
|
13
|
+
<!-- hatchet-agent-docs:start -->
|
|
14
|
+
<!-- Generated by the SDK docs pipeline from frontend/docs/reference-map.json. Do not edit by hand. -->
|
|
15
|
+
|
|
16
|
+
## Documentation for agents
|
|
17
|
+
|
|
18
|
+
The linked pages serve plain markdown for tools and agents. Full docs index: https://docs.hatchet.run/llms.txt
|
|
19
|
+
|
|
20
|
+
Setup and local development:
|
|
21
|
+
|
|
22
|
+
- Quickstart: https://docs.hatchet.run/v1/quickstart.md
|
|
23
|
+
- Running Hatchet locally: https://docs.hatchet.run/v1/running-locally.md
|
|
24
|
+
|
|
25
|
+
Core concepts:
|
|
26
|
+
|
|
27
|
+
- Tasks: https://docs.hatchet.run/v1/tasks.md
|
|
28
|
+
- Workers: https://docs.hatchet.run/v1/workers.md
|
|
29
|
+
- Running tasks: https://docs.hatchet.run/v1/running-your-task.md
|
|
30
|
+
- DAGs: https://docs.hatchet.run/v1/directed-acyclic-graphs.md
|
|
31
|
+
- Durable execution: https://docs.hatchet.run/v1/durable-execution.md
|
|
32
|
+
|
|
33
|
+
Flow control:
|
|
34
|
+
|
|
35
|
+
- Concurrency: https://docs.hatchet.run/v1/concurrency.md
|
|
36
|
+
- Rate limits: https://docs.hatchet.run/v1/rate-limits.md
|
|
37
|
+
- Retries: https://docs.hatchet.run/v1/retry-policies.md
|
|
38
|
+
- Idempotency: https://docs.hatchet.run/v1/idempotency.md
|
|
39
|
+
- CEL expressions: https://docs.hatchet.run/v1/cel-expressions.md
|
|
40
|
+
|
|
41
|
+
Ruby SDK reference (overview: https://docs.hatchet.run/reference/ruby.md):
|
|
42
|
+
|
|
43
|
+
- CEL: https://docs.hatchet.run/reference/ruby/feature-clients/cel.md (guide: https://docs.hatchet.run/v1/cel-expressions.md)
|
|
44
|
+
- Crons: https://docs.hatchet.run/reference/ruby/feature-clients/cron.md (guide: https://docs.hatchet.run/v1/cron-runs.md)
|
|
45
|
+
- Events: https://docs.hatchet.run/reference/ruby/feature-clients/events.md (guide: https://docs.hatchet.run/v1/events.md)
|
|
46
|
+
- Filters: https://docs.hatchet.run/reference/ruby/feature-clients/filters.md (guide: https://docs.hatchet.run/v1/events.md)
|
|
47
|
+
- Logs: https://docs.hatchet.run/reference/ruby/feature-clients/logs.md (guide: https://docs.hatchet.run/v1/logging.md)
|
|
48
|
+
- Metrics: https://docs.hatchet.run/reference/ruby/feature-clients/metrics.md (guide: https://docs.hatchet.run/v1/prometheus-metrics.md)
|
|
49
|
+
- Rate Limits: https://docs.hatchet.run/reference/ruby/feature-clients/rate_limits.md (guide: https://docs.hatchet.run/v1/rate-limits.md)
|
|
50
|
+
- Runs: https://docs.hatchet.run/reference/ruby/feature-clients/runs.md (guide: https://docs.hatchet.run/v1/running-your-task.md)
|
|
51
|
+
- Scheduled Runs: https://docs.hatchet.run/reference/ruby/feature-clients/scheduled.md (guide: https://docs.hatchet.run/v1/scheduled-runs.md)
|
|
52
|
+
- Tenant: https://docs.hatchet.run/reference/ruby/feature-clients/tenant.md
|
|
53
|
+
- Workers: https://docs.hatchet.run/reference/ruby/feature-clients/workers.md (guide: https://docs.hatchet.run/v1/workers.md)
|
|
54
|
+
- Workflows: https://docs.hatchet.run/reference/ruby/feature-clients/workflows.md (guide: https://docs.hatchet.run/v1/tasks.md)
|
|
55
|
+
|
|
56
|
+
<!-- hatchet-agent-docs:end -->
|
|
57
|
+
|
|
13
58
|
## Installation
|
|
14
59
|
|
|
15
60
|
Add this line to your application's Gemfile:
|
|
@@ -21,6 +21,7 @@ lib/hatchet-sdk-rest/api/healthcheck_api.rb
|
|
|
21
21
|
lib/hatchet-sdk-rest/api/log_api.rb
|
|
22
22
|
lib/hatchet-sdk-rest/api/metadata_api.rb
|
|
23
23
|
lib/hatchet-sdk-rest/api/observability_api.rb
|
|
24
|
+
lib/hatchet-sdk-rest/api/operator_api.rb
|
|
24
25
|
lib/hatchet-sdk-rest/api/rate_limits_api.rb
|
|
25
26
|
lib/hatchet-sdk-rest/api/slack_api.rb
|
|
26
27
|
lib/hatchet-sdk-rest/api/sns_api.rb
|
|
@@ -94,6 +95,9 @@ lib/hatchet-sdk-rest/models/otel_span_kind.rb
|
|
|
94
95
|
lib/hatchet-sdk-rest/models/otel_span_list.rb
|
|
95
96
|
lib/hatchet-sdk-rest/models/otel_status_code.rb
|
|
96
97
|
lib/hatchet-sdk-rest/models/pagination_response.rb
|
|
98
|
+
lib/hatchet-sdk-rest/models/pause_workflow_request.rb
|
|
99
|
+
lib/hatchet-sdk-rest/models/pause_workflow_request_pause.rb
|
|
100
|
+
lib/hatchet-sdk-rest/models/pause_workflow_request_unpause.rb
|
|
97
101
|
lib/hatchet-sdk-rest/models/pull_request.rb
|
|
98
102
|
lib/hatchet-sdk-rest/models/pull_request_state.rb
|
|
99
103
|
lib/hatchet-sdk-rest/models/queue_metrics.rb
|
|
@@ -177,6 +181,7 @@ lib/hatchet-sdk-rest/models/v1_cel_debug_request.rb
|
|
|
177
181
|
lib/hatchet-sdk-rest/models/v1_cel_debug_response.rb
|
|
178
182
|
lib/hatchet-sdk-rest/models/v1_cel_debug_response_status.rb
|
|
179
183
|
lib/hatchet-sdk-rest/models/v1_create_filter_request.rb
|
|
184
|
+
lib/hatchet-sdk-rest/models/v1_create_http_operator_request.rb
|
|
180
185
|
lib/hatchet-sdk-rest/models/v1_create_webhook_request.rb
|
|
181
186
|
lib/hatchet-sdk-rest/models/v1_create_webhook_request_api_key.rb
|
|
182
187
|
lib/hatchet-sdk-rest/models/v1_create_webhook_request_base.rb
|
|
@@ -193,6 +198,8 @@ lib/hatchet-sdk-rest/models/v1_event_triggered_run.rb
|
|
|
193
198
|
lib/hatchet-sdk-rest/models/v1_event_workflow_run_summary.rb
|
|
194
199
|
lib/hatchet-sdk-rest/models/v1_filter.rb
|
|
195
200
|
lib/hatchet-sdk-rest/models/v1_filter_list.rb
|
|
201
|
+
lib/hatchet-sdk-rest/models/v1_http_operator.rb
|
|
202
|
+
lib/hatchet-sdk-rest/models/v1_http_operator_list.rb
|
|
196
203
|
lib/hatchet-sdk-rest/models/v1_log_line.rb
|
|
197
204
|
lib/hatchet-sdk-rest/models/v1_log_line_level.rb
|
|
198
205
|
lib/hatchet-sdk-rest/models/v1_log_line_list.rb
|
|
@@ -219,6 +226,7 @@ lib/hatchet-sdk-rest/models/v1_task_timing.rb
|
|
|
219
226
|
lib/hatchet-sdk-rest/models/v1_task_timing_list.rb
|
|
220
227
|
lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb
|
|
221
228
|
lib/hatchet-sdk-rest/models/v1_update_filter_request.rb
|
|
229
|
+
lib/hatchet-sdk-rest/models/v1_update_http_operator_request.rb
|
|
222
230
|
lib/hatchet-sdk-rest/models/v1_update_webhook_request.rb
|
|
223
231
|
lib/hatchet-sdk-rest/models/v1_wait_item.rb
|
|
224
232
|
lib/hatchet-sdk-rest/models/v1_webhook.rb
|
|
@@ -257,6 +265,7 @@ lib/hatchet-sdk-rest/models/workflow_concurrency.rb
|
|
|
257
265
|
lib/hatchet-sdk-rest/models/workflow_kind.rb
|
|
258
266
|
lib/hatchet-sdk-rest/models/workflow_list.rb
|
|
259
267
|
lib/hatchet-sdk-rest/models/workflow_metrics.rb
|
|
268
|
+
lib/hatchet-sdk-rest/models/workflow_pause_scheduled_cron_run_queue_behavior.rb
|
|
260
269
|
lib/hatchet-sdk-rest/models/workflow_run.rb
|
|
261
270
|
lib/hatchet-sdk-rest/models/workflow_run_list.rb
|
|
262
271
|
lib/hatchet-sdk-rest/models/workflow_run_order_by_direction.rb
|
|
@@ -123,10 +123,10 @@ Class | Method | HTTP request | Description
|
|
|
123
123
|
*HatchetSdkRest::EventApi* | [**v1_event_list**](docs/EventApi.md#v1_event_list) | **GET** /api/v1/stable/tenants/{tenant}/events | List events
|
|
124
124
|
*HatchetSdkRest::FeatureFlagsApi* | [**tenant_feature_flag_evaluate**](docs/FeatureFlagsApi.md#tenant_feature_flag_evaluate) | **GET** /api/v1/tenants/{tenant}/feature-flags | Evaluate a feature flag for a tenant
|
|
125
125
|
*HatchetSdkRest::FilterApi* | [**v1_filter_create**](docs/FilterApi.md#v1_filter_create) | **POST** /api/v1/stable/tenants/{tenant}/filters | Create a filter
|
|
126
|
-
*HatchetSdkRest::FilterApi* | [**v1_filter_delete**](docs/FilterApi.md#v1_filter_delete) | **DELETE** /api/v1/stable/tenants/{tenant}/filters/{v1-filter} |
|
|
126
|
+
*HatchetSdkRest::FilterApi* | [**v1_filter_delete**](docs/FilterApi.md#v1_filter_delete) | **DELETE** /api/v1/stable/tenants/{tenant}/filters/{v1-filter} | Delete a filter
|
|
127
127
|
*HatchetSdkRest::FilterApi* | [**v1_filter_get**](docs/FilterApi.md#v1_filter_get) | **GET** /api/v1/stable/tenants/{tenant}/filters/{v1-filter} | Get a filter
|
|
128
128
|
*HatchetSdkRest::FilterApi* | [**v1_filter_list**](docs/FilterApi.md#v1_filter_list) | **GET** /api/v1/stable/tenants/{tenant}/filters | List filters
|
|
129
|
-
*HatchetSdkRest::FilterApi* | [**v1_filter_update**](docs/FilterApi.md#v1_filter_update) | **PATCH** /api/v1/stable/tenants/{tenant}/filters/{v1-filter} |
|
|
129
|
+
*HatchetSdkRest::FilterApi* | [**v1_filter_update**](docs/FilterApi.md#v1_filter_update) | **PATCH** /api/v1/stable/tenants/{tenant}/filters/{v1-filter} | Update a filter
|
|
130
130
|
*HatchetSdkRest::GithubApi* | [**sns_update**](docs/GithubApi.md#sns_update) | **POST** /api/v1/sns/{tenant}/{event} | Github app tenant webhook
|
|
131
131
|
*HatchetSdkRest::HealthcheckApi* | [**liveness_get**](docs/HealthcheckApi.md#liveness_get) | **GET** /api/live | Get liveness
|
|
132
132
|
*HatchetSdkRest::HealthcheckApi* | [**readiness_get**](docs/HealthcheckApi.md#readiness_get) | **GET** /api/ready | Get readiness
|
|
@@ -137,6 +137,11 @@ Class | Method | HTTP request | Description
|
|
|
137
137
|
*HatchetSdkRest::MetadataApi* | [**metadata_get**](docs/MetadataApi.md#metadata_get) | **GET** /api/v1/meta | Get metadata
|
|
138
138
|
*HatchetSdkRest::MetadataApi* | [**metadata_list_integrations**](docs/MetadataApi.md#metadata_list_integrations) | **GET** /api/v1/meta/integrations | List integrations
|
|
139
139
|
*HatchetSdkRest::ObservabilityApi* | [**v1_observability_get_trace**](docs/ObservabilityApi.md#v1_observability_get_trace) | **GET** /api/v1/stable/tenants/{tenant}/traces | Get OTel trace
|
|
140
|
+
*HatchetSdkRest::OperatorApi* | [**v1_http_operator_create**](docs/OperatorApi.md#v1_http_operator_create) | **POST** /api/v1/stable/tenants/{tenant}/operators/http | Create an HTTP operator
|
|
141
|
+
*HatchetSdkRest::OperatorApi* | [**v1_http_operator_delete**](docs/OperatorApi.md#v1_http_operator_delete) | **DELETE** /api/v1/stable/operators/http/{v1-http-operator} | Delete an HTTP operator
|
|
142
|
+
*HatchetSdkRest::OperatorApi* | [**v1_http_operator_get**](docs/OperatorApi.md#v1_http_operator_get) | **GET** /api/v1/stable/operators/http/{v1-http-operator} | Get an HTTP operator
|
|
143
|
+
*HatchetSdkRest::OperatorApi* | [**v1_http_operator_list**](docs/OperatorApi.md#v1_http_operator_list) | **GET** /api/v1/stable/tenants/{tenant}/operators/http | List HTTP operators
|
|
144
|
+
*HatchetSdkRest::OperatorApi* | [**v1_http_operator_update**](docs/OperatorApi.md#v1_http_operator_update) | **PATCH** /api/v1/stable/operators/http/{v1-http-operator} | Update an HTTP operator
|
|
140
145
|
*HatchetSdkRest::RateLimitsApi* | [**rate_limit_delete**](docs/RateLimitsApi.md#rate_limit_delete) | **DELETE** /api/v1/tenants/{tenant}/rate-limits | Delete rate limit
|
|
141
146
|
*HatchetSdkRest::RateLimitsApi* | [**rate_limit_list**](docs/RateLimitsApi.md#rate_limit_list) | **GET** /api/v1/tenants/{tenant}/rate-limits | List rate limits
|
|
142
147
|
*HatchetSdkRest::SNSApi* | [**sns_create**](docs/SNSApi.md#sns_create) | **POST** /api/v1/tenants/{tenant}/sns | Create SNS integration
|
|
@@ -192,7 +197,7 @@ Class | Method | HTTP request | Description
|
|
|
192
197
|
*HatchetSdkRest::UserApi* | [**user_update_slack_oauth_callback**](docs/UserApi.md#user_update_slack_oauth_callback) | **GET** /api/v1/users/slack/callback | Complete OAuth flow
|
|
193
198
|
*HatchetSdkRest::UserApi* | [**user_update_slack_oauth_start**](docs/UserApi.md#user_update_slack_oauth_start) | **GET** /api/v1/tenants/{tenant}/slack/start | Start OAuth flow
|
|
194
199
|
*HatchetSdkRest::WebhookApi* | [**v1_webhook_create**](docs/WebhookApi.md#v1_webhook_create) | **POST** /api/v1/stable/tenants/{tenant}/webhooks | Create a webhook
|
|
195
|
-
*HatchetSdkRest::WebhookApi* | [**v1_webhook_delete**](docs/WebhookApi.md#v1_webhook_delete) | **DELETE** /api/v1/stable/tenants/{tenant}/webhooks/{v1-webhook} |
|
|
200
|
+
*HatchetSdkRest::WebhookApi* | [**v1_webhook_delete**](docs/WebhookApi.md#v1_webhook_delete) | **DELETE** /api/v1/stable/tenants/{tenant}/webhooks/{v1-webhook} | Delete a webhook
|
|
196
201
|
*HatchetSdkRest::WebhookApi* | [**v1_webhook_get**](docs/WebhookApi.md#v1_webhook_get) | **GET** /api/v1/stable/tenants/{tenant}/webhooks/{v1-webhook} | Get a webhook
|
|
197
202
|
*HatchetSdkRest::WebhookApi* | [**v1_webhook_list**](docs/WebhookApi.md#v1_webhook_list) | **GET** /api/v1/stable/tenants/{tenant}/webhooks | List webhooks
|
|
198
203
|
*HatchetSdkRest::WebhookApi* | [**v1_webhook_receive**](docs/WebhookApi.md#v1_webhook_receive) | **POST** /api/v1/stable/tenants/{tenant}/webhooks/{v1-webhook} | Post a webhook message
|
|
@@ -301,6 +306,9 @@ Class | Method | HTTP request | Description
|
|
|
301
306
|
- [HatchetSdkRest::OtelSpanList](docs/OtelSpanList.md)
|
|
302
307
|
- [HatchetSdkRest::OtelStatusCode](docs/OtelStatusCode.md)
|
|
303
308
|
- [HatchetSdkRest::PaginationResponse](docs/PaginationResponse.md)
|
|
309
|
+
- [HatchetSdkRest::PauseWorkflowRequest](docs/PauseWorkflowRequest.md)
|
|
310
|
+
- [HatchetSdkRest::PauseWorkflowRequestPause](docs/PauseWorkflowRequestPause.md)
|
|
311
|
+
- [HatchetSdkRest::PauseWorkflowRequestUnpause](docs/PauseWorkflowRequestUnpause.md)
|
|
304
312
|
- [HatchetSdkRest::PullRequest](docs/PullRequest.md)
|
|
305
313
|
- [HatchetSdkRest::PullRequestState](docs/PullRequestState.md)
|
|
306
314
|
- [HatchetSdkRest::QueueMetrics](docs/QueueMetrics.md)
|
|
@@ -384,6 +392,7 @@ Class | Method | HTTP request | Description
|
|
|
384
392
|
- [HatchetSdkRest::V1CancelTaskRequest](docs/V1CancelTaskRequest.md)
|
|
385
393
|
- [HatchetSdkRest::V1CancelledTasks](docs/V1CancelledTasks.md)
|
|
386
394
|
- [HatchetSdkRest::V1CreateFilterRequest](docs/V1CreateFilterRequest.md)
|
|
395
|
+
- [HatchetSdkRest::V1CreateHTTPOperatorRequest](docs/V1CreateHTTPOperatorRequest.md)
|
|
387
396
|
- [HatchetSdkRest::V1CreateWebhookRequest](docs/V1CreateWebhookRequest.md)
|
|
388
397
|
- [HatchetSdkRest::V1CreateWebhookRequestAPIKey](docs/V1CreateWebhookRequestAPIKey.md)
|
|
389
398
|
- [HatchetSdkRest::V1CreateWebhookRequestBase](docs/V1CreateWebhookRequestBase.md)
|
|
@@ -400,6 +409,8 @@ Class | Method | HTTP request | Description
|
|
|
400
409
|
- [HatchetSdkRest::V1EventWorkflowRunSummary](docs/V1EventWorkflowRunSummary.md)
|
|
401
410
|
- [HatchetSdkRest::V1Filter](docs/V1Filter.md)
|
|
402
411
|
- [HatchetSdkRest::V1FilterList](docs/V1FilterList.md)
|
|
412
|
+
- [HatchetSdkRest::V1HTTPOperator](docs/V1HTTPOperator.md)
|
|
413
|
+
- [HatchetSdkRest::V1HTTPOperatorList](docs/V1HTTPOperatorList.md)
|
|
403
414
|
- [HatchetSdkRest::V1LogLine](docs/V1LogLine.md)
|
|
404
415
|
- [HatchetSdkRest::V1LogLineLevel](docs/V1LogLineLevel.md)
|
|
405
416
|
- [HatchetSdkRest::V1LogLineList](docs/V1LogLineList.md)
|
|
@@ -426,6 +437,7 @@ Class | Method | HTTP request | Description
|
|
|
426
437
|
- [HatchetSdkRest::V1TaskTimingList](docs/V1TaskTimingList.md)
|
|
427
438
|
- [HatchetSdkRest::V1TriggerWorkflowRunRequest](docs/V1TriggerWorkflowRunRequest.md)
|
|
428
439
|
- [HatchetSdkRest::V1UpdateFilterRequest](docs/V1UpdateFilterRequest.md)
|
|
440
|
+
- [HatchetSdkRest::V1UpdateHTTPOperatorRequest](docs/V1UpdateHTTPOperatorRequest.md)
|
|
429
441
|
- [HatchetSdkRest::V1UpdateWebhookRequest](docs/V1UpdateWebhookRequest.md)
|
|
430
442
|
- [HatchetSdkRest::V1WaitItem](docs/V1WaitItem.md)
|
|
431
443
|
- [HatchetSdkRest::V1Webhook](docs/V1Webhook.md)
|
|
@@ -464,6 +476,7 @@ Class | Method | HTTP request | Description
|
|
|
464
476
|
- [HatchetSdkRest::WorkflowKind](docs/WorkflowKind.md)
|
|
465
477
|
- [HatchetSdkRest::WorkflowList](docs/WorkflowList.md)
|
|
466
478
|
- [HatchetSdkRest::WorkflowMetrics](docs/WorkflowMetrics.md)
|
|
479
|
+
- [HatchetSdkRest::WorkflowPauseScheduledCronRunQueueBehavior](docs/WorkflowPauseScheduledCronRunQueueBehavior.md)
|
|
467
480
|
- [HatchetSdkRest::WorkflowRun](docs/WorkflowRun.md)
|
|
468
481
|
- [HatchetSdkRest::WorkflowRunList](docs/WorkflowRunList.md)
|
|
469
482
|
- [HatchetSdkRest::WorkflowRunOrderByDirection](docs/WorkflowRunOrderByDirection.md)
|
|
@@ -101,6 +101,7 @@ module HatchetSdkRest
|
|
|
101
101
|
return data, status_code, headers
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
+
# Delete a filter
|
|
104
105
|
# Delete a filter
|
|
105
106
|
# @param tenant [String] The tenant id
|
|
106
107
|
# @param v1_filter [String] The filter id to delete
|
|
@@ -111,6 +112,7 @@ module HatchetSdkRest
|
|
|
111
112
|
data
|
|
112
113
|
end
|
|
113
114
|
|
|
115
|
+
# Delete a filter
|
|
114
116
|
# Delete a filter
|
|
115
117
|
# @param tenant [String] The tenant id
|
|
116
118
|
# @param v1_filter [String] The filter id to delete
|
|
@@ -352,6 +354,7 @@ module HatchetSdkRest
|
|
|
352
354
|
return data, status_code, headers
|
|
353
355
|
end
|
|
354
356
|
|
|
357
|
+
# Update a filter
|
|
355
358
|
# Update a filter
|
|
356
359
|
# @param tenant [String] The tenant id
|
|
357
360
|
# @param v1_filter [String] The filter id to update
|
|
@@ -363,6 +366,7 @@ module HatchetSdkRest
|
|
|
363
366
|
data
|
|
364
367
|
end
|
|
365
368
|
|
|
369
|
+
# Update a filter
|
|
366
370
|
# Update a filter
|
|
367
371
|
# @param tenant [String] The tenant id
|
|
368
372
|
# @param v1_filter [String] The filter id to update
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hatchet API
|
|
3
|
+
|
|
4
|
+
#The Hatchet API
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module HatchetSdkRest
|
|
16
|
+
class OperatorApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create an HTTP operator
|
|
23
|
+
# Create a new HTTP operator
|
|
24
|
+
# @param tenant [String] The tenant id
|
|
25
|
+
# @param v1_create_http_operator_request [V1CreateHTTPOperatorRequest] The input to the HTTP operator creation
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [V1HTTPOperator]
|
|
28
|
+
def v1_http_operator_create(tenant, v1_create_http_operator_request, opts = {})
|
|
29
|
+
data, _status_code, _headers = v1_http_operator_create_with_http_info(tenant, v1_create_http_operator_request, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Create an HTTP operator
|
|
34
|
+
# Create a new HTTP operator
|
|
35
|
+
# @param tenant [String] The tenant id
|
|
36
|
+
# @param v1_create_http_operator_request [V1CreateHTTPOperatorRequest] The input to the HTTP operator creation
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(V1HTTPOperator, Integer, Hash)>] V1HTTPOperator data, response status code and response headers
|
|
39
|
+
def v1_http_operator_create_with_http_info(tenant, v1_create_http_operator_request, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: OperatorApi.v1_http_operator_create ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'tenant' is set
|
|
44
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling OperatorApi.v1_http_operator_create"
|
|
46
|
+
end
|
|
47
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
48
|
+
fail ArgumentError, 'invalid value for "tenant" when calling OperatorApi.v1_http_operator_create, the character length must be smaller than or equal to 36.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
52
|
+
fail ArgumentError, 'invalid value for "tenant" when calling OperatorApi.v1_http_operator_create, the character length must be greater than or equal to 36.'
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# verify the required parameter 'v1_create_http_operator_request' is set
|
|
56
|
+
if @api_client.config.client_side_validation && v1_create_http_operator_request.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'v1_create_http_operator_request' when calling OperatorApi.v1_http_operator_create"
|
|
58
|
+
end
|
|
59
|
+
# resource path
|
|
60
|
+
local_var_path = '/api/v1/stable/tenants/{tenant}/operators/http'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
61
|
+
|
|
62
|
+
# query parameters
|
|
63
|
+
query_params = opts[:query_params] || {}
|
|
64
|
+
|
|
65
|
+
# header parameters
|
|
66
|
+
header_params = opts[:header_params] || {}
|
|
67
|
+
# HTTP header 'Accept' (if needed)
|
|
68
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
69
|
+
# HTTP header 'Content-Type'
|
|
70
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
71
|
+
if !content_type.nil?
|
|
72
|
+
header_params['Content-Type'] = content_type
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# form parameters
|
|
76
|
+
form_params = opts[:form_params] || {}
|
|
77
|
+
|
|
78
|
+
# http body (model)
|
|
79
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(v1_create_http_operator_request)
|
|
80
|
+
|
|
81
|
+
# return_type
|
|
82
|
+
return_type = opts[:debug_return_type] || 'V1HTTPOperator'
|
|
83
|
+
|
|
84
|
+
# auth_names
|
|
85
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
86
|
+
|
|
87
|
+
new_options = opts.merge(
|
|
88
|
+
:operation => :"OperatorApi.v1_http_operator_create",
|
|
89
|
+
:header_params => header_params,
|
|
90
|
+
:query_params => query_params,
|
|
91
|
+
:form_params => form_params,
|
|
92
|
+
:body => post_body,
|
|
93
|
+
:auth_names => auth_names,
|
|
94
|
+
:return_type => return_type
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
98
|
+
if @api_client.config.debugging
|
|
99
|
+
@api_client.config.logger.debug "API called: OperatorApi#v1_http_operator_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
100
|
+
end
|
|
101
|
+
return data, status_code, headers
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Delete an HTTP operator
|
|
105
|
+
# Delete an HTTP operator
|
|
106
|
+
# @param v1_http_operator [String] The id of the HTTP operator to delete
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @return [V1HTTPOperator]
|
|
109
|
+
def v1_http_operator_delete(v1_http_operator, opts = {})
|
|
110
|
+
data, _status_code, _headers = v1_http_operator_delete_with_http_info(v1_http_operator, opts)
|
|
111
|
+
data
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Delete an HTTP operator
|
|
115
|
+
# Delete an HTTP operator
|
|
116
|
+
# @param v1_http_operator [String] The id of the HTTP operator to delete
|
|
117
|
+
# @param [Hash] opts the optional parameters
|
|
118
|
+
# @return [Array<(V1HTTPOperator, Integer, Hash)>] V1HTTPOperator data, response status code and response headers
|
|
119
|
+
def v1_http_operator_delete_with_http_info(v1_http_operator, opts = {})
|
|
120
|
+
if @api_client.config.debugging
|
|
121
|
+
@api_client.config.logger.debug 'Calling API: OperatorApi.v1_http_operator_delete ...'
|
|
122
|
+
end
|
|
123
|
+
# verify the required parameter 'v1_http_operator' is set
|
|
124
|
+
if @api_client.config.client_side_validation && v1_http_operator.nil?
|
|
125
|
+
fail ArgumentError, "Missing the required parameter 'v1_http_operator' when calling OperatorApi.v1_http_operator_delete"
|
|
126
|
+
end
|
|
127
|
+
if @api_client.config.client_side_validation && v1_http_operator.to_s.length > 36
|
|
128
|
+
fail ArgumentError, 'invalid value for "v1_http_operator" when calling OperatorApi.v1_http_operator_delete, the character length must be smaller than or equal to 36.'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @api_client.config.client_side_validation && v1_http_operator.to_s.length < 36
|
|
132
|
+
fail ArgumentError, 'invalid value for "v1_http_operator" when calling OperatorApi.v1_http_operator_delete, the character length must be greater than or equal to 36.'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# resource path
|
|
136
|
+
local_var_path = '/api/v1/stable/operators/http/{v1-http-operator}'.sub('{' + 'v1-http-operator' + '}', CGI.escape(v1_http_operator.to_s))
|
|
137
|
+
|
|
138
|
+
# query parameters
|
|
139
|
+
query_params = opts[:query_params] || {}
|
|
140
|
+
|
|
141
|
+
# header parameters
|
|
142
|
+
header_params = opts[:header_params] || {}
|
|
143
|
+
# HTTP header 'Accept' (if needed)
|
|
144
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
145
|
+
|
|
146
|
+
# form parameters
|
|
147
|
+
form_params = opts[:form_params] || {}
|
|
148
|
+
|
|
149
|
+
# http body (model)
|
|
150
|
+
post_body = opts[:debug_body]
|
|
151
|
+
|
|
152
|
+
# return_type
|
|
153
|
+
return_type = opts[:debug_return_type] || 'V1HTTPOperator'
|
|
154
|
+
|
|
155
|
+
# auth_names
|
|
156
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
157
|
+
|
|
158
|
+
new_options = opts.merge(
|
|
159
|
+
:operation => :"OperatorApi.v1_http_operator_delete",
|
|
160
|
+
:header_params => header_params,
|
|
161
|
+
:query_params => query_params,
|
|
162
|
+
:form_params => form_params,
|
|
163
|
+
:body => post_body,
|
|
164
|
+
:auth_names => auth_names,
|
|
165
|
+
:return_type => return_type
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
169
|
+
if @api_client.config.debugging
|
|
170
|
+
@api_client.config.logger.debug "API called: OperatorApi#v1_http_operator_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
171
|
+
end
|
|
172
|
+
return data, status_code, headers
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Get an HTTP operator
|
|
176
|
+
# Get an HTTP operator by its id
|
|
177
|
+
# @param v1_http_operator [String] The HTTP operator id
|
|
178
|
+
# @param [Hash] opts the optional parameters
|
|
179
|
+
# @return [V1HTTPOperator]
|
|
180
|
+
def v1_http_operator_get(v1_http_operator, opts = {})
|
|
181
|
+
data, _status_code, _headers = v1_http_operator_get_with_http_info(v1_http_operator, opts)
|
|
182
|
+
data
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Get an HTTP operator
|
|
186
|
+
# Get an HTTP operator by its id
|
|
187
|
+
# @param v1_http_operator [String] The HTTP operator id
|
|
188
|
+
# @param [Hash] opts the optional parameters
|
|
189
|
+
# @return [Array<(V1HTTPOperator, Integer, Hash)>] V1HTTPOperator data, response status code and response headers
|
|
190
|
+
def v1_http_operator_get_with_http_info(v1_http_operator, opts = {})
|
|
191
|
+
if @api_client.config.debugging
|
|
192
|
+
@api_client.config.logger.debug 'Calling API: OperatorApi.v1_http_operator_get ...'
|
|
193
|
+
end
|
|
194
|
+
# verify the required parameter 'v1_http_operator' is set
|
|
195
|
+
if @api_client.config.client_side_validation && v1_http_operator.nil?
|
|
196
|
+
fail ArgumentError, "Missing the required parameter 'v1_http_operator' when calling OperatorApi.v1_http_operator_get"
|
|
197
|
+
end
|
|
198
|
+
if @api_client.config.client_side_validation && v1_http_operator.to_s.length > 36
|
|
199
|
+
fail ArgumentError, 'invalid value for "v1_http_operator" when calling OperatorApi.v1_http_operator_get, the character length must be smaller than or equal to 36.'
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if @api_client.config.client_side_validation && v1_http_operator.to_s.length < 36
|
|
203
|
+
fail ArgumentError, 'invalid value for "v1_http_operator" when calling OperatorApi.v1_http_operator_get, the character length must be greater than or equal to 36.'
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# resource path
|
|
207
|
+
local_var_path = '/api/v1/stable/operators/http/{v1-http-operator}'.sub('{' + 'v1-http-operator' + '}', CGI.escape(v1_http_operator.to_s))
|
|
208
|
+
|
|
209
|
+
# query parameters
|
|
210
|
+
query_params = opts[:query_params] || {}
|
|
211
|
+
|
|
212
|
+
# header parameters
|
|
213
|
+
header_params = opts[:header_params] || {}
|
|
214
|
+
# HTTP header 'Accept' (if needed)
|
|
215
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
216
|
+
|
|
217
|
+
# form parameters
|
|
218
|
+
form_params = opts[:form_params] || {}
|
|
219
|
+
|
|
220
|
+
# http body (model)
|
|
221
|
+
post_body = opts[:debug_body]
|
|
222
|
+
|
|
223
|
+
# return_type
|
|
224
|
+
return_type = opts[:debug_return_type] || 'V1HTTPOperator'
|
|
225
|
+
|
|
226
|
+
# auth_names
|
|
227
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
228
|
+
|
|
229
|
+
new_options = opts.merge(
|
|
230
|
+
:operation => :"OperatorApi.v1_http_operator_get",
|
|
231
|
+
:header_params => header_params,
|
|
232
|
+
:query_params => query_params,
|
|
233
|
+
:form_params => form_params,
|
|
234
|
+
:body => post_body,
|
|
235
|
+
:auth_names => auth_names,
|
|
236
|
+
:return_type => return_type
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
240
|
+
if @api_client.config.debugging
|
|
241
|
+
@api_client.config.logger.debug "API called: OperatorApi#v1_http_operator_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
242
|
+
end
|
|
243
|
+
return data, status_code, headers
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# List HTTP operators
|
|
247
|
+
# Lists all HTTP operators for a tenant.
|
|
248
|
+
# @param tenant [String] The tenant id
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @option opts [Integer] :offset The number to skip
|
|
251
|
+
# @option opts [Integer] :limit The number to limit by
|
|
252
|
+
# @return [V1HTTPOperatorList]
|
|
253
|
+
def v1_http_operator_list(tenant, opts = {})
|
|
254
|
+
data, _status_code, _headers = v1_http_operator_list_with_http_info(tenant, opts)
|
|
255
|
+
data
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# List HTTP operators
|
|
259
|
+
# Lists all HTTP operators for a tenant.
|
|
260
|
+
# @param tenant [String] The tenant id
|
|
261
|
+
# @param [Hash] opts the optional parameters
|
|
262
|
+
# @option opts [Integer] :offset The number to skip
|
|
263
|
+
# @option opts [Integer] :limit The number to limit by
|
|
264
|
+
# @return [Array<(V1HTTPOperatorList, Integer, Hash)>] V1HTTPOperatorList data, response status code and response headers
|
|
265
|
+
def v1_http_operator_list_with_http_info(tenant, opts = {})
|
|
266
|
+
if @api_client.config.debugging
|
|
267
|
+
@api_client.config.logger.debug 'Calling API: OperatorApi.v1_http_operator_list ...'
|
|
268
|
+
end
|
|
269
|
+
# verify the required parameter 'tenant' is set
|
|
270
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
271
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling OperatorApi.v1_http_operator_list"
|
|
272
|
+
end
|
|
273
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
274
|
+
fail ArgumentError, 'invalid value for "tenant" when calling OperatorApi.v1_http_operator_list, the character length must be smaller than or equal to 36.'
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
278
|
+
fail ArgumentError, 'invalid value for "tenant" when calling OperatorApi.v1_http_operator_list, the character length must be greater than or equal to 36.'
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# resource path
|
|
282
|
+
local_var_path = '/api/v1/stable/tenants/{tenant}/operators/http'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
283
|
+
|
|
284
|
+
# query parameters
|
|
285
|
+
query_params = opts[:query_params] || {}
|
|
286
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
287
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
288
|
+
|
|
289
|
+
# header parameters
|
|
290
|
+
header_params = opts[:header_params] || {}
|
|
291
|
+
# HTTP header 'Accept' (if needed)
|
|
292
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
293
|
+
|
|
294
|
+
# form parameters
|
|
295
|
+
form_params = opts[:form_params] || {}
|
|
296
|
+
|
|
297
|
+
# http body (model)
|
|
298
|
+
post_body = opts[:debug_body]
|
|
299
|
+
|
|
300
|
+
# return_type
|
|
301
|
+
return_type = opts[:debug_return_type] || 'V1HTTPOperatorList'
|
|
302
|
+
|
|
303
|
+
# auth_names
|
|
304
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
305
|
+
|
|
306
|
+
new_options = opts.merge(
|
|
307
|
+
:operation => :"OperatorApi.v1_http_operator_list",
|
|
308
|
+
:header_params => header_params,
|
|
309
|
+
:query_params => query_params,
|
|
310
|
+
:form_params => form_params,
|
|
311
|
+
:body => post_body,
|
|
312
|
+
:auth_names => auth_names,
|
|
313
|
+
:return_type => return_type
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
317
|
+
if @api_client.config.debugging
|
|
318
|
+
@api_client.config.logger.debug "API called: OperatorApi#v1_http_operator_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
319
|
+
end
|
|
320
|
+
return data, status_code, headers
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Update an HTTP operator
|
|
324
|
+
# Update an HTTP operator
|
|
325
|
+
# @param v1_http_operator [String] The id of the HTTP operator to update
|
|
326
|
+
# @param v1_update_http_operator_request [V1UpdateHTTPOperatorRequest] The fields to update on the HTTP operator
|
|
327
|
+
# @param [Hash] opts the optional parameters
|
|
328
|
+
# @return [V1HTTPOperator]
|
|
329
|
+
def v1_http_operator_update(v1_http_operator, v1_update_http_operator_request, opts = {})
|
|
330
|
+
data, _status_code, _headers = v1_http_operator_update_with_http_info(v1_http_operator, v1_update_http_operator_request, opts)
|
|
331
|
+
data
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Update an HTTP operator
|
|
335
|
+
# Update an HTTP operator
|
|
336
|
+
# @param v1_http_operator [String] The id of the HTTP operator to update
|
|
337
|
+
# @param v1_update_http_operator_request [V1UpdateHTTPOperatorRequest] The fields to update on the HTTP operator
|
|
338
|
+
# @param [Hash] opts the optional parameters
|
|
339
|
+
# @return [Array<(V1HTTPOperator, Integer, Hash)>] V1HTTPOperator data, response status code and response headers
|
|
340
|
+
def v1_http_operator_update_with_http_info(v1_http_operator, v1_update_http_operator_request, opts = {})
|
|
341
|
+
if @api_client.config.debugging
|
|
342
|
+
@api_client.config.logger.debug 'Calling API: OperatorApi.v1_http_operator_update ...'
|
|
343
|
+
end
|
|
344
|
+
# verify the required parameter 'v1_http_operator' is set
|
|
345
|
+
if @api_client.config.client_side_validation && v1_http_operator.nil?
|
|
346
|
+
fail ArgumentError, "Missing the required parameter 'v1_http_operator' when calling OperatorApi.v1_http_operator_update"
|
|
347
|
+
end
|
|
348
|
+
if @api_client.config.client_side_validation && v1_http_operator.to_s.length > 36
|
|
349
|
+
fail ArgumentError, 'invalid value for "v1_http_operator" when calling OperatorApi.v1_http_operator_update, the character length must be smaller than or equal to 36.'
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
if @api_client.config.client_side_validation && v1_http_operator.to_s.length < 36
|
|
353
|
+
fail ArgumentError, 'invalid value for "v1_http_operator" when calling OperatorApi.v1_http_operator_update, the character length must be greater than or equal to 36.'
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# verify the required parameter 'v1_update_http_operator_request' is set
|
|
357
|
+
if @api_client.config.client_side_validation && v1_update_http_operator_request.nil?
|
|
358
|
+
fail ArgumentError, "Missing the required parameter 'v1_update_http_operator_request' when calling OperatorApi.v1_http_operator_update"
|
|
359
|
+
end
|
|
360
|
+
# resource path
|
|
361
|
+
local_var_path = '/api/v1/stable/operators/http/{v1-http-operator}'.sub('{' + 'v1-http-operator' + '}', CGI.escape(v1_http_operator.to_s))
|
|
362
|
+
|
|
363
|
+
# query parameters
|
|
364
|
+
query_params = opts[:query_params] || {}
|
|
365
|
+
|
|
366
|
+
# header parameters
|
|
367
|
+
header_params = opts[:header_params] || {}
|
|
368
|
+
# HTTP header 'Accept' (if needed)
|
|
369
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
370
|
+
# HTTP header 'Content-Type'
|
|
371
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
372
|
+
if !content_type.nil?
|
|
373
|
+
header_params['Content-Type'] = content_type
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# form parameters
|
|
377
|
+
form_params = opts[:form_params] || {}
|
|
378
|
+
|
|
379
|
+
# http body (model)
|
|
380
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(v1_update_http_operator_request)
|
|
381
|
+
|
|
382
|
+
# return_type
|
|
383
|
+
return_type = opts[:debug_return_type] || 'V1HTTPOperator'
|
|
384
|
+
|
|
385
|
+
# auth_names
|
|
386
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
387
|
+
|
|
388
|
+
new_options = opts.merge(
|
|
389
|
+
:operation => :"OperatorApi.v1_http_operator_update",
|
|
390
|
+
:header_params => header_params,
|
|
391
|
+
:query_params => query_params,
|
|
392
|
+
:form_params => form_params,
|
|
393
|
+
:body => post_body,
|
|
394
|
+
:auth_names => auth_names,
|
|
395
|
+
:return_type => return_type
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
399
|
+
if @api_client.config.debugging
|
|
400
|
+
@api_client.config.logger.debug "API called: OperatorApi#v1_http_operator_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
401
|
+
end
|
|
402
|
+
return data, status_code, headers
|
|
403
|
+
end
|
|
404
|
+
end
|
|
405
|
+
end
|