hatchet-sdk 0.4.0 → 0.5.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 +6 -0
- data/lib/hatchet/clients/rest/.openapi-generator/FILES +24 -0
- data/lib/hatchet/clients/rest/README.md +31 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/durable_tasks_api.rb +113 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/feature_flags_api.rb +107 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/log_api.rb +156 -52
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/observability_api.rb +114 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/rate_limits_api.rb +78 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb +71 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +3 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/worker_api.rb +9 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_api.rb +170 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_runs_api.rb +94 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_model_base.rb +88 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta.rb +44 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_evaluation_result.rb +238 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_id.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span.rb +525 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_kind.rb +44 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_list.rb +242 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_status_code.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/task_status_stat.rb +13 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant.rb +24 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_run_result.rb +256 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_additional_metadata_operator.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_request.rb +310 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_response.rb +310 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_api_key.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_base.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_basic_auth.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_hmac.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_entry.rb +470 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_kind.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition.rb +286 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition_kind.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line.rb +49 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metric.rb +341 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metrics.rb +222 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_restore_task_response.rb +237 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_detail_count.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_filter.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_type.rb +3 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_metric.rb +13 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb +34 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing.rb +11 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_webhook_request.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_wait_item.rb +280 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_webhook.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker.rb +1 -13
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_status.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_idempotency.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task.rb +393 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_desired_worker_label.rb +288 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_rate_limit.rb +271 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +24 -0
- data/lib/hatchet/contracts/v1/workflows_pb.rb +3 -1
- data/lib/hatchet/idempotency.rb +35 -1
- data/lib/hatchet/version.rb +1 -1
- data/lib/hatchet/workflow.rb +2 -2
- data/sig/hatchet/idempotency.rbs +8 -0
- metadata +31 -2
|
@@ -369,6 +369,91 @@ module HatchetSdkRest
|
|
|
369
369
|
return data, status_code, headers
|
|
370
370
|
end
|
|
371
371
|
|
|
372
|
+
# Trigger cron job workflow run immediately
|
|
373
|
+
# Trigger a cron workflow immediately for a tenant
|
|
374
|
+
# @param tenant [String] The tenant id
|
|
375
|
+
# @param cron_workflow [String] The cron job id
|
|
376
|
+
# @param [Hash] opts the optional parameters
|
|
377
|
+
# @return [TriggerRunResult]
|
|
378
|
+
def workflow_cron_trigger(tenant, cron_workflow, opts = {})
|
|
379
|
+
data, _status_code, _headers = workflow_cron_trigger_with_http_info(tenant, cron_workflow, opts)
|
|
380
|
+
data
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Trigger cron job workflow run immediately
|
|
384
|
+
# Trigger a cron workflow immediately for a tenant
|
|
385
|
+
# @param tenant [String] The tenant id
|
|
386
|
+
# @param cron_workflow [String] The cron job id
|
|
387
|
+
# @param [Hash] opts the optional parameters
|
|
388
|
+
# @return [Array<(TriggerRunResult, Integer, Hash)>] TriggerRunResult data, response status code and response headers
|
|
389
|
+
def workflow_cron_trigger_with_http_info(tenant, cron_workflow, opts = {})
|
|
390
|
+
if @api_client.config.debugging
|
|
391
|
+
@api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_cron_trigger ...'
|
|
392
|
+
end
|
|
393
|
+
# verify the required parameter 'tenant' is set
|
|
394
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
395
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_cron_trigger"
|
|
396
|
+
end
|
|
397
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
398
|
+
fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_cron_trigger, the character length must be smaller than or equal to 36.'
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
402
|
+
fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_cron_trigger, the character length must be greater than or equal to 36.'
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# verify the required parameter 'cron_workflow' is set
|
|
406
|
+
if @api_client.config.client_side_validation && cron_workflow.nil?
|
|
407
|
+
fail ArgumentError, "Missing the required parameter 'cron_workflow' when calling WorkflowApi.workflow_cron_trigger"
|
|
408
|
+
end
|
|
409
|
+
if @api_client.config.client_side_validation && cron_workflow.to_s.length > 36
|
|
410
|
+
fail ArgumentError, 'invalid value for "cron_workflow" when calling WorkflowApi.workflow_cron_trigger, the character length must be smaller than or equal to 36.'
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
if @api_client.config.client_side_validation && cron_workflow.to_s.length < 36
|
|
414
|
+
fail ArgumentError, 'invalid value for "cron_workflow" when calling WorkflowApi.workflow_cron_trigger, the character length must be greater than or equal to 36.'
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# resource path
|
|
418
|
+
local_var_path = '/api/v1/tenants/{tenant}/workflows/crons/{cron-workflow}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'cron-workflow' + '}', CGI.escape(cron_workflow.to_s))
|
|
419
|
+
|
|
420
|
+
# query parameters
|
|
421
|
+
query_params = opts[:query_params] || {}
|
|
422
|
+
|
|
423
|
+
# header parameters
|
|
424
|
+
header_params = opts[:header_params] || {}
|
|
425
|
+
# HTTP header 'Accept' (if needed)
|
|
426
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
427
|
+
|
|
428
|
+
# form parameters
|
|
429
|
+
form_params = opts[:form_params] || {}
|
|
430
|
+
|
|
431
|
+
# http body (model)
|
|
432
|
+
post_body = opts[:debug_body]
|
|
433
|
+
|
|
434
|
+
# return_type
|
|
435
|
+
return_type = opts[:debug_return_type] || 'TriggerRunResult'
|
|
436
|
+
|
|
437
|
+
# auth_names
|
|
438
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
439
|
+
|
|
440
|
+
new_options = opts.merge(
|
|
441
|
+
:operation => :"WorkflowApi.workflow_cron_trigger",
|
|
442
|
+
:header_params => header_params,
|
|
443
|
+
:query_params => query_params,
|
|
444
|
+
:form_params => form_params,
|
|
445
|
+
:body => post_body,
|
|
446
|
+
:auth_names => auth_names,
|
|
447
|
+
:return_type => return_type
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
451
|
+
if @api_client.config.debugging
|
|
452
|
+
@api_client.config.logger.debug "API called: WorkflowApi#workflow_cron_trigger\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
453
|
+
end
|
|
454
|
+
return data, status_code, headers
|
|
455
|
+
end
|
|
456
|
+
|
|
372
457
|
# Update cron job workflow run
|
|
373
458
|
# Update a cron workflow for a tenant
|
|
374
459
|
# @param tenant [String] The tenant id
|
|
@@ -1747,6 +1832,91 @@ module HatchetSdkRest
|
|
|
1747
1832
|
return data, status_code, headers
|
|
1748
1833
|
end
|
|
1749
1834
|
|
|
1835
|
+
# Trigger scheduled workflow run
|
|
1836
|
+
# Trigger a scheduled workflow run immediately for a tenant
|
|
1837
|
+
# @param tenant [String] The tenant id
|
|
1838
|
+
# @param scheduled_workflow_run [String] The scheduled workflow id
|
|
1839
|
+
# @param [Hash] opts the optional parameters
|
|
1840
|
+
# @return [TriggerRunResult]
|
|
1841
|
+
def workflow_scheduled_trigger(tenant, scheduled_workflow_run, opts = {})
|
|
1842
|
+
data, _status_code, _headers = workflow_scheduled_trigger_with_http_info(tenant, scheduled_workflow_run, opts)
|
|
1843
|
+
data
|
|
1844
|
+
end
|
|
1845
|
+
|
|
1846
|
+
# Trigger scheduled workflow run
|
|
1847
|
+
# Trigger a scheduled workflow run immediately for a tenant
|
|
1848
|
+
# @param tenant [String] The tenant id
|
|
1849
|
+
# @param scheduled_workflow_run [String] The scheduled workflow id
|
|
1850
|
+
# @param [Hash] opts the optional parameters
|
|
1851
|
+
# @return [Array<(TriggerRunResult, Integer, Hash)>] TriggerRunResult data, response status code and response headers
|
|
1852
|
+
def workflow_scheduled_trigger_with_http_info(tenant, scheduled_workflow_run, opts = {})
|
|
1853
|
+
if @api_client.config.debugging
|
|
1854
|
+
@api_client.config.logger.debug 'Calling API: WorkflowApi.workflow_scheduled_trigger ...'
|
|
1855
|
+
end
|
|
1856
|
+
# verify the required parameter 'tenant' is set
|
|
1857
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1858
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling WorkflowApi.workflow_scheduled_trigger"
|
|
1859
|
+
end
|
|
1860
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
1861
|
+
fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_scheduled_trigger, the character length must be smaller than or equal to 36.'
|
|
1862
|
+
end
|
|
1863
|
+
|
|
1864
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
1865
|
+
fail ArgumentError, 'invalid value for "tenant" when calling WorkflowApi.workflow_scheduled_trigger, the character length must be greater than or equal to 36.'
|
|
1866
|
+
end
|
|
1867
|
+
|
|
1868
|
+
# verify the required parameter 'scheduled_workflow_run' is set
|
|
1869
|
+
if @api_client.config.client_side_validation && scheduled_workflow_run.nil?
|
|
1870
|
+
fail ArgumentError, "Missing the required parameter 'scheduled_workflow_run' when calling WorkflowApi.workflow_scheduled_trigger"
|
|
1871
|
+
end
|
|
1872
|
+
if @api_client.config.client_side_validation && scheduled_workflow_run.to_s.length > 36
|
|
1873
|
+
fail ArgumentError, 'invalid value for "scheduled_workflow_run" when calling WorkflowApi.workflow_scheduled_trigger, the character length must be smaller than or equal to 36.'
|
|
1874
|
+
end
|
|
1875
|
+
|
|
1876
|
+
if @api_client.config.client_side_validation && scheduled_workflow_run.to_s.length < 36
|
|
1877
|
+
fail ArgumentError, 'invalid value for "scheduled_workflow_run" when calling WorkflowApi.workflow_scheduled_trigger, the character length must be greater than or equal to 36.'
|
|
1878
|
+
end
|
|
1879
|
+
|
|
1880
|
+
# resource path
|
|
1881
|
+
local_var_path = '/api/v1/tenants/{tenant}/workflows/scheduled/{scheduled-workflow-run}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'scheduled-workflow-run' + '}', CGI.escape(scheduled_workflow_run.to_s))
|
|
1882
|
+
|
|
1883
|
+
# query parameters
|
|
1884
|
+
query_params = opts[:query_params] || {}
|
|
1885
|
+
|
|
1886
|
+
# header parameters
|
|
1887
|
+
header_params = opts[:header_params] || {}
|
|
1888
|
+
# HTTP header 'Accept' (if needed)
|
|
1889
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1890
|
+
|
|
1891
|
+
# form parameters
|
|
1892
|
+
form_params = opts[:form_params] || {}
|
|
1893
|
+
|
|
1894
|
+
# http body (model)
|
|
1895
|
+
post_body = opts[:debug_body]
|
|
1896
|
+
|
|
1897
|
+
# return_type
|
|
1898
|
+
return_type = opts[:debug_return_type] || 'TriggerRunResult'
|
|
1899
|
+
|
|
1900
|
+
# auth_names
|
|
1901
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
1902
|
+
|
|
1903
|
+
new_options = opts.merge(
|
|
1904
|
+
:operation => :"WorkflowApi.workflow_scheduled_trigger",
|
|
1905
|
+
:header_params => header_params,
|
|
1906
|
+
:query_params => query_params,
|
|
1907
|
+
:form_params => form_params,
|
|
1908
|
+
:body => post_body,
|
|
1909
|
+
:auth_names => auth_names,
|
|
1910
|
+
:return_type => return_type
|
|
1911
|
+
)
|
|
1912
|
+
|
|
1913
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1914
|
+
if @api_client.config.debugging
|
|
1915
|
+
@api_client.config.logger.debug "API called: WorkflowApi#workflow_scheduled_trigger\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1916
|
+
end
|
|
1917
|
+
return data, status_code, headers
|
|
1918
|
+
end
|
|
1919
|
+
|
|
1750
1920
|
# Update scheduled workflow run
|
|
1751
1921
|
# Update (reschedule) a scheduled workflow run for a tenant
|
|
1752
1922
|
# @param tenant [String] The tenant id
|
|
@@ -19,6 +19,88 @@ module HatchetSdkRest
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Branch durable task
|
|
23
|
+
# Branch a durable task from a specific node, creating a new branch and re-processing its matches.
|
|
24
|
+
# @param tenant [String] The tenant id
|
|
25
|
+
# @param v1_branch_durable_task_request [V1BranchDurableTaskRequest] The branch request
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [V1BranchDurableTaskResponse]
|
|
28
|
+
def v1_durable_task_branch(tenant, v1_branch_durable_task_request, opts = {})
|
|
29
|
+
data, _status_code, _headers = v1_durable_task_branch_with_http_info(tenant, v1_branch_durable_task_request, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Branch durable task
|
|
34
|
+
# Branch a durable task from a specific node, creating a new branch and re-processing its matches.
|
|
35
|
+
# @param tenant [String] The tenant id
|
|
36
|
+
# @param v1_branch_durable_task_request [V1BranchDurableTaskRequest] The branch request
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(V1BranchDurableTaskResponse, Integer, Hash)>] V1BranchDurableTaskResponse data, response status code and response headers
|
|
39
|
+
def v1_durable_task_branch_with_http_info(tenant, v1_branch_durable_task_request, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: WorkflowRunsApi.v1_durable_task_branch ...'
|
|
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 WorkflowRunsApi.v1_durable_task_branch"
|
|
46
|
+
end
|
|
47
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
48
|
+
fail ArgumentError, 'invalid value for "tenant" when calling WorkflowRunsApi.v1_durable_task_branch, 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 WorkflowRunsApi.v1_durable_task_branch, the character length must be greater than or equal to 36.'
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# verify the required parameter 'v1_branch_durable_task_request' is set
|
|
56
|
+
if @api_client.config.client_side_validation && v1_branch_durable_task_request.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'v1_branch_durable_task_request' when calling WorkflowRunsApi.v1_durable_task_branch"
|
|
58
|
+
end
|
|
59
|
+
# resource path
|
|
60
|
+
local_var_path = '/api/v1/stable/tenants/{tenant}/durable-tasks/branch'.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_branch_durable_task_request)
|
|
80
|
+
|
|
81
|
+
# return_type
|
|
82
|
+
return_type = opts[:debug_return_type] || 'V1BranchDurableTaskResponse'
|
|
83
|
+
|
|
84
|
+
# auth_names
|
|
85
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
86
|
+
|
|
87
|
+
new_options = opts.merge(
|
|
88
|
+
:operation => :"WorkflowRunsApi.v1_durable_task_branch",
|
|
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: WorkflowRunsApi#v1_durable_task_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
100
|
+
end
|
|
101
|
+
return data, status_code, headers
|
|
102
|
+
end
|
|
103
|
+
|
|
22
104
|
# Create workflow run
|
|
23
105
|
# Trigger a new workflow run
|
|
24
106
|
# @param tenant [String] The tenant id
|
|
@@ -188,6 +270,7 @@ module HatchetSdkRest
|
|
|
188
270
|
# @option opts [Time] :_until The latest date to filter by
|
|
189
271
|
# @option opts [Array<String>] :additional_metadata Additional metadata k-v pairs to filter by
|
|
190
272
|
# @option opts [Array<String>] :workflow_ids The workflow ids to find runs for
|
|
273
|
+
# @option opts [V1RunningFilter] :running_filter Filter within the RUNNING status bucket. ALL returns both on-worker and evicted tasks, ON_WORKER returns only tasks running on a worker, EVICTED returns only evicted tasks. Defaults to ALL.
|
|
191
274
|
# @return [Array<String>]
|
|
192
275
|
def v1_workflow_run_external_ids_list(tenant, since, opts = {})
|
|
193
276
|
data, _status_code, _headers = v1_workflow_run_external_ids_list_with_http_info(tenant, since, opts)
|
|
@@ -203,6 +286,7 @@ module HatchetSdkRest
|
|
|
203
286
|
# @option opts [Time] :_until The latest date to filter by
|
|
204
287
|
# @option opts [Array<String>] :additional_metadata Additional metadata k-v pairs to filter by
|
|
205
288
|
# @option opts [Array<String>] :workflow_ids The workflow ids to find runs for
|
|
289
|
+
# @option opts [V1RunningFilter] :running_filter Filter within the RUNNING status bucket. ALL returns both on-worker and evicted tasks, ON_WORKER returns only tasks running on a worker, EVICTED returns only evicted tasks. Defaults to ALL.
|
|
206
290
|
# @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
|
|
207
291
|
def v1_workflow_run_external_ids_list_with_http_info(tenant, since, opts = {})
|
|
208
292
|
if @api_client.config.debugging
|
|
@@ -234,6 +318,7 @@ module HatchetSdkRest
|
|
|
234
318
|
query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
|
|
235
319
|
query_params[:'additional_metadata'] = @api_client.build_collection_param(opts[:'additional_metadata'], :multi) if !opts[:'additional_metadata'].nil?
|
|
236
320
|
query_params[:'workflow_ids'] = @api_client.build_collection_param(opts[:'workflow_ids'], :multi) if !opts[:'workflow_ids'].nil?
|
|
321
|
+
query_params[:'running_filter'] = opts[:'running_filter'] if !opts[:'running_filter'].nil?
|
|
237
322
|
|
|
238
323
|
# header parameters
|
|
239
324
|
header_params = opts[:header_params] || {}
|
|
@@ -496,11 +581,14 @@ module HatchetSdkRest
|
|
|
496
581
|
# @option opts [Array<V1TaskStatus>] :statuses A list of statuses to filter by
|
|
497
582
|
# @option opts [Time] :_until The latest date to filter by
|
|
498
583
|
# @option opts [Array<String>] :additional_metadata Additional metadata k-v pairs to filter by
|
|
584
|
+
# @option opts [V1AdditionalMetadataOperator] :additional_metadata_operator How to combine multiple additional_metadata pairs. OR matches runs containing any pair, AND matches runs containing all pairs. Defaults to OR.
|
|
499
585
|
# @option opts [Array<String>] :workflow_ids The workflow ids to find runs for
|
|
500
586
|
# @option opts [String] :worker_id The worker id to filter by
|
|
501
587
|
# @option opts [String] :parent_task_external_id The parent task external id to filter by
|
|
502
588
|
# @option opts [String] :triggering_event_external_id The external id of the event that triggered the workflow run
|
|
503
589
|
# @option opts [Boolean] :include_payloads A flag for whether or not to include the input and output payloads in the response. Defaults to `true` if unset.
|
|
590
|
+
# @option opts [V1RunningFilter] :running_filter Filter within the RUNNING status bucket. ALL returns both on-worker and evicted tasks, ON_WORKER returns only tasks running on a worker, EVICTED returns only evicted tasks. Defaults to ALL.
|
|
591
|
+
# @option opts [Array<String>] :idempotency_keys The idempotency key(s) to filter for
|
|
504
592
|
# @return [V1TaskSummaryList]
|
|
505
593
|
def v1_workflow_run_list(tenant, since, only_tasks, opts = {})
|
|
506
594
|
data, _status_code, _headers = v1_workflow_run_list_with_http_info(tenant, since, only_tasks, opts)
|
|
@@ -518,11 +606,14 @@ module HatchetSdkRest
|
|
|
518
606
|
# @option opts [Array<V1TaskStatus>] :statuses A list of statuses to filter by
|
|
519
607
|
# @option opts [Time] :_until The latest date to filter by
|
|
520
608
|
# @option opts [Array<String>] :additional_metadata Additional metadata k-v pairs to filter by
|
|
609
|
+
# @option opts [V1AdditionalMetadataOperator] :additional_metadata_operator How to combine multiple additional_metadata pairs. OR matches runs containing any pair, AND matches runs containing all pairs. Defaults to OR.
|
|
521
610
|
# @option opts [Array<String>] :workflow_ids The workflow ids to find runs for
|
|
522
611
|
# @option opts [String] :worker_id The worker id to filter by
|
|
523
612
|
# @option opts [String] :parent_task_external_id The parent task external id to filter by
|
|
524
613
|
# @option opts [String] :triggering_event_external_id The external id of the event that triggered the workflow run
|
|
525
614
|
# @option opts [Boolean] :include_payloads A flag for whether or not to include the input and output payloads in the response. Defaults to `true` if unset.
|
|
615
|
+
# @option opts [V1RunningFilter] :running_filter Filter within the RUNNING status bucket. ALL returns both on-worker and evicted tasks, ON_WORKER returns only tasks running on a worker, EVICTED returns only evicted tasks. Defaults to ALL.
|
|
616
|
+
# @option opts [Array<String>] :idempotency_keys The idempotency key(s) to filter for
|
|
526
617
|
# @return [Array<(V1TaskSummaryList, Integer, Hash)>] V1TaskSummaryList data, response status code and response headers
|
|
527
618
|
def v1_workflow_run_list_with_http_info(tenant, since, only_tasks, opts = {})
|
|
528
619
|
if @api_client.config.debugging
|
|
@@ -584,11 +675,14 @@ module HatchetSdkRest
|
|
|
584
675
|
query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if !opts[:'statuses'].nil?
|
|
585
676
|
query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
|
|
586
677
|
query_params[:'additional_metadata'] = @api_client.build_collection_param(opts[:'additional_metadata'], :multi) if !opts[:'additional_metadata'].nil?
|
|
678
|
+
query_params[:'additional_metadata_operator'] = opts[:'additional_metadata_operator'] if !opts[:'additional_metadata_operator'].nil?
|
|
587
679
|
query_params[:'workflow_ids'] = @api_client.build_collection_param(opts[:'workflow_ids'], :multi) if !opts[:'workflow_ids'].nil?
|
|
588
680
|
query_params[:'worker_id'] = opts[:'worker_id'] if !opts[:'worker_id'].nil?
|
|
589
681
|
query_params[:'parent_task_external_id'] = opts[:'parent_task_external_id'] if !opts[:'parent_task_external_id'].nil?
|
|
590
682
|
query_params[:'triggering_event_external_id'] = opts[:'triggering_event_external_id'] if !opts[:'triggering_event_external_id'].nil?
|
|
591
683
|
query_params[:'include_payloads'] = opts[:'include_payloads'] if !opts[:'include_payloads'].nil?
|
|
684
|
+
query_params[:'running_filter'] = opts[:'running_filter'] if !opts[:'running_filter'].nil?
|
|
685
|
+
query_params[:'idempotency_keys'] = @api_client.build_collection_param(opts[:'idempotency_keys'], :multi) if !opts[:'idempotency_keys'].nil?
|
|
592
686
|
|
|
593
687
|
# header parameters
|
|
594
688
|
header_params = opts[:header_params] || {}
|
|
@@ -0,0 +1,88 @@
|
|
|
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.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
module HatchetSdkRest
|
|
14
|
+
class ApiModelBase
|
|
15
|
+
# Deserializes the data based on type
|
|
16
|
+
# @param string type Data type
|
|
17
|
+
# @param string value Value to be deserialized
|
|
18
|
+
# @return [Object] Deserialized data
|
|
19
|
+
def self._deserialize(type, value)
|
|
20
|
+
case type.to_sym
|
|
21
|
+
when :Time
|
|
22
|
+
Time.parse(value)
|
|
23
|
+
when :Date
|
|
24
|
+
Date.parse(value)
|
|
25
|
+
when :String
|
|
26
|
+
value.to_s
|
|
27
|
+
when :Integer
|
|
28
|
+
value.to_i
|
|
29
|
+
when :Float
|
|
30
|
+
value.to_f
|
|
31
|
+
when :Boolean
|
|
32
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
33
|
+
true
|
|
34
|
+
else
|
|
35
|
+
false
|
|
36
|
+
end
|
|
37
|
+
when :Object
|
|
38
|
+
# generic object (usually a Hash), return directly
|
|
39
|
+
value
|
|
40
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
41
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
42
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
43
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
44
|
+
k_type = Regexp.last_match[:k_type]
|
|
45
|
+
v_type = Regexp.last_match[:v_type]
|
|
46
|
+
{}.tap do |hash|
|
|
47
|
+
value.each do |k, v|
|
|
48
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
else # model
|
|
52
|
+
# models (e.g. Pet) or oneOf
|
|
53
|
+
klass = HatchetSdkRest.const_get(type)
|
|
54
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns the string representation of the object
|
|
59
|
+
# @return [String] String presentation of the object
|
|
60
|
+
def to_s
|
|
61
|
+
to_hash.to_s
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
65
|
+
# @return [Hash] Returns the object in the form of hash
|
|
66
|
+
def to_body
|
|
67
|
+
to_hash
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Outputs non-array value in the form of hash
|
|
71
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
72
|
+
# @param [Object] value Any valid value
|
|
73
|
+
# @return [Hash] Returns the value in the form of hash
|
|
74
|
+
def _to_hash(value)
|
|
75
|
+
if value.is_a?(Array)
|
|
76
|
+
value.compact.map { |v| _to_hash(v) }
|
|
77
|
+
elsif value.is_a?(Hash)
|
|
78
|
+
{}.tap do |hash|
|
|
79
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
80
|
+
end
|
|
81
|
+
elsif value.respond_to? :to_hash
|
|
82
|
+
value.to_hash
|
|
83
|
+
else
|
|
84
|
+
value
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -34,6 +34,18 @@ module HatchetSdkRest
|
|
|
34
34
|
# whether or not users can change their password
|
|
35
35
|
attr_accessor :allow_change_password
|
|
36
36
|
|
|
37
|
+
# whether or not observability (trace collection) is enabled on this instance
|
|
38
|
+
attr_accessor :observability_enabled
|
|
39
|
+
|
|
40
|
+
# whether or not a Prometheus federation server is configured (SERVER_PROMETHEUS_SERVER_URL) on this instance
|
|
41
|
+
attr_accessor :prometheus_server_enabled
|
|
42
|
+
|
|
43
|
+
# whether or not authentication is disabled (authdisabled build) on this instance
|
|
44
|
+
attr_accessor :auth_disabled
|
|
45
|
+
|
|
46
|
+
# the embedded worker API token, only set on authdisabled builds
|
|
47
|
+
attr_accessor :auth_disabled_token
|
|
48
|
+
|
|
37
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
50
|
def self.attribute_map
|
|
39
51
|
{
|
|
@@ -43,7 +55,11 @@ module HatchetSdkRest
|
|
|
43
55
|
:'allow_signup' => :'allowSignup',
|
|
44
56
|
:'allow_invites' => :'allowInvites',
|
|
45
57
|
:'allow_create_tenant' => :'allowCreateTenant',
|
|
46
|
-
:'allow_change_password' => :'allowChangePassword'
|
|
58
|
+
:'allow_change_password' => :'allowChangePassword',
|
|
59
|
+
:'observability_enabled' => :'observabilityEnabled',
|
|
60
|
+
:'prometheus_server_enabled' => :'prometheusServerEnabled',
|
|
61
|
+
:'auth_disabled' => :'authDisabled',
|
|
62
|
+
:'auth_disabled_token' => :'authDisabledToken'
|
|
47
63
|
}
|
|
48
64
|
end
|
|
49
65
|
|
|
@@ -66,7 +82,11 @@ module HatchetSdkRest
|
|
|
66
82
|
:'allow_signup' => :'Boolean',
|
|
67
83
|
:'allow_invites' => :'Boolean',
|
|
68
84
|
:'allow_create_tenant' => :'Boolean',
|
|
69
|
-
:'allow_change_password' => :'Boolean'
|
|
85
|
+
:'allow_change_password' => :'Boolean',
|
|
86
|
+
:'observability_enabled' => :'Boolean',
|
|
87
|
+
:'prometheus_server_enabled' => :'Boolean',
|
|
88
|
+
:'auth_disabled' => :'Boolean',
|
|
89
|
+
:'auth_disabled_token' => :'String'
|
|
70
90
|
}
|
|
71
91
|
end
|
|
72
92
|
|
|
@@ -119,6 +139,22 @@ module HatchetSdkRest
|
|
|
119
139
|
if attributes.key?(:'allow_change_password')
|
|
120
140
|
self.allow_change_password = attributes[:'allow_change_password']
|
|
121
141
|
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'observability_enabled')
|
|
144
|
+
self.observability_enabled = attributes[:'observability_enabled']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'prometheus_server_enabled')
|
|
148
|
+
self.prometheus_server_enabled = attributes[:'prometheus_server_enabled']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'auth_disabled')
|
|
152
|
+
self.auth_disabled = attributes[:'auth_disabled']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'auth_disabled_token')
|
|
156
|
+
self.auth_disabled_token = attributes[:'auth_disabled_token']
|
|
157
|
+
end
|
|
122
158
|
end
|
|
123
159
|
|
|
124
160
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -147,7 +183,11 @@ module HatchetSdkRest
|
|
|
147
183
|
allow_signup == o.allow_signup &&
|
|
148
184
|
allow_invites == o.allow_invites &&
|
|
149
185
|
allow_create_tenant == o.allow_create_tenant &&
|
|
150
|
-
allow_change_password == o.allow_change_password
|
|
186
|
+
allow_change_password == o.allow_change_password &&
|
|
187
|
+
observability_enabled == o.observability_enabled &&
|
|
188
|
+
prometheus_server_enabled == o.prometheus_server_enabled &&
|
|
189
|
+
auth_disabled == o.auth_disabled &&
|
|
190
|
+
auth_disabled_token == o.auth_disabled_token
|
|
151
191
|
end
|
|
152
192
|
|
|
153
193
|
# @see the `==` method
|
|
@@ -159,7 +199,7 @@ module HatchetSdkRest
|
|
|
159
199
|
# Calculates hash code according to all attributes.
|
|
160
200
|
# @return [Integer] Hash code
|
|
161
201
|
def hash
|
|
162
|
-
[auth, pylon_app_id, posthog, allow_signup, allow_invites, allow_create_tenant, allow_change_password].hash
|
|
202
|
+
[auth, pylon_app_id, posthog, allow_signup, allow_invites, allow_create_tenant, allow_change_password, observability_enabled, prometheus_server_enabled, auth_disabled, auth_disabled_token].hash
|
|
163
203
|
end
|
|
164
204
|
|
|
165
205
|
# Builds the object from hash
|