hatchet-sdk 0.11.2 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +1 -0
  4. data/lib/hatchet/clients/rest/.openapi-generator/FILES +13 -0
  5. data/lib/hatchet/clients/rest/README.md +15 -0
  6. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/concurrency_api.rb +188 -0
  7. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/serverless_api.rb +77 -0
  8. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_token.rb +28 -1
  9. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_request.rb +11 -1
  10. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_id.rb +2 -1
  11. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_entitlements.rb +30 -4
  12. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_key.rb +326 -0
  13. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_key_list.rb +275 -0
  14. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_limit_strategy.rb +44 -0
  15. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_scope.rb +41 -0
  16. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy.rb +676 -0
  17. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy_list.rb +239 -0
  18. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy_usage.rb +307 -0
  19. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_serverless_endpoint_request.rb +1 -1
  20. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_check_stage.rb +42 -0
  21. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event.rb +363 -0
  22. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event_details.rb +358 -0
  23. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event_kind.rb +44 -0
  24. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event_list.rb +239 -0
  25. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_kind.rb +2 -1
  26. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_stream_topic.rb +31 -4
  27. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +13 -0
  28. data/lib/hatchet/contracts/v1/streams_pb.rb +28 -0
  29. data/lib/hatchet/contracts/v1/streams_services_pb.rb +26 -0
  30. data/lib/hatchet/features/streams.rb +498 -0
  31. data/lib/hatchet/version.rb +1 -1
  32. data/lib/hatchet-sdk.rb +11 -0
  33. data/sig/hatchet/features/streams.rbs +39 -0
  34. data/sig/hatchet-sdk.rbs +1 -0
  35. metadata +19 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 390993a3e85820439f06eda23d822d5e1bb90a8ecdfebd42f386ba021857aaa9
4
- data.tar.gz: 67eec42dbdae14a6296302b539301775f08462bddf5d9480e9e7187488cb6f82
3
+ metadata.gz: b79792bcf8e6ee0ff6ffdf9018abdb3e232129af4e51fbc2677eef8776557b31
4
+ data.tar.gz: ff8bdc0f1e08d871fb4f1447ca578fd87f31e5aca1327db5e117772fa6683d28
5
5
  SHA512:
6
- metadata.gz: df70e77eebc7a28fbbc73ace20a6a8c80b6313225f6b306a0076a00338221b29168f085cb1bb77473f20c7424e7c5f361291ffc1a4b62172b5c9eb938b3d2007
7
- data.tar.gz: 7f8c8e83c5e8a85518c5acaedcaaae377417bd805aff2f132f77a2ed91424172fcc73922e046980db018308747e8135cd7dd4ed2a2061fbd9769aa6c7e402d43
6
+ metadata.gz: 90a62ce007dccc543c338238e031a932d6018b9a74d43e1b6ab8937735f14ab17001bf31251ce88fa996005990f1557f29f7aa391541ba0225ecb5319e700596
7
+ data.tar.gz: 426acb26968a1b44a6777cb757633622c1a7b3dba38e5e7c7faa67aca2a77efef7ba049c8713f24243385864a88ab12f282fe46d74caa31fc2caf8953b61285a
data/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ 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.12.1] - 2026-11-02
9
+
10
+ ### Added
11
+
12
+ - `TenantEntitlements#sandbox_operator`, the tenant's sandbox entitlement.
13
+
14
+ ## [0.12.0] - 2026-10-26
15
+
16
+ ### Added
17
+
18
+ - Adds `hatchet.streams`, a client for durable streams: topics that store messages independent of any run, which readers can resume from a cursor. `publish` returns once a message is stored, keeps a client's messages to a topic in call order, and batches publishes queued behind an in-flight request (`batch_timeout:` holds a message to gather more). Payloads over 4 MiB are uploaded over REST, up to 64 MiB. `subscribe` reads a topic from the oldest retained message or a `cursor:`, yielding to a block or returning an `Enumerator`, and resubscribes from the last event read when the connection drops. `reset` starts new readers after the latest message or a given cursor, and `topic_metadata` describes a topic's retained messages.
19
+
8
20
  ## [0.11.2] - 2026-10-27
9
21
 
10
22
  ### Changed
data/README.md CHANGED
@@ -49,6 +49,7 @@ Ruby SDK reference (overview: https://docs.hatchet.run/reference/ruby.md):
49
49
  - Rate Limits: https://docs.hatchet.run/reference/ruby/feature-clients/rate_limits.md (guide: https://docs.hatchet.run/v1/rate-limits.md)
50
50
  - Runs: https://docs.hatchet.run/reference/ruby/feature-clients/runs.md (guide: https://docs.hatchet.run/v1/running-your-task.md)
51
51
  - Scheduled Runs: https://docs.hatchet.run/reference/ruby/feature-clients/scheduled.md (guide: https://docs.hatchet.run/v1/scheduled-runs.md)
52
+ - Streams: https://docs.hatchet.run/reference/ruby/feature-clients/streams.md
52
53
  - Tenant: https://docs.hatchet.run/reference/ruby/feature-clients/tenant.md
53
54
  - Workers: https://docs.hatchet.run/reference/ruby/feature-clients/workers.md (guide: https://docs.hatchet.run/v1/workers.md)
54
55
  - Workflows: https://docs.hatchet.run/reference/ruby/feature-clients/workflows.md (guide: https://docs.hatchet.run/v1/tasks.md)
@@ -11,6 +11,7 @@ hatchet-sdk-rest.gemspec
11
11
  lib/hatchet-sdk-rest.rb
12
12
  lib/hatchet-sdk-rest/api/api_token_api.rb
13
13
  lib/hatchet-sdk-rest/api/cel_api.rb
14
+ lib/hatchet-sdk-rest/api/concurrency_api.rb
14
15
  lib/hatchet-sdk-rest/api/default_api.rb
15
16
  lib/hatchet-sdk-rest/api/durable_tasks_api.rb
16
17
  lib/hatchet-sdk-rest/api/event_api.rb
@@ -182,6 +183,13 @@ lib/hatchet-sdk-rest/models/v1_cancelled_tasks.rb
182
183
  lib/hatchet-sdk-rest/models/v1_cel_debug_request.rb
183
184
  lib/hatchet-sdk-rest/models/v1_cel_debug_response.rb
184
185
  lib/hatchet-sdk-rest/models/v1_cel_debug_response_status.rb
186
+ lib/hatchet-sdk-rest/models/v1_concurrency_key.rb
187
+ lib/hatchet-sdk-rest/models/v1_concurrency_key_list.rb
188
+ lib/hatchet-sdk-rest/models/v1_concurrency_limit_strategy.rb
189
+ lib/hatchet-sdk-rest/models/v1_concurrency_scope.rb
190
+ lib/hatchet-sdk-rest/models/v1_concurrency_strategy.rb
191
+ lib/hatchet-sdk-rest/models/v1_concurrency_strategy_list.rb
192
+ lib/hatchet-sdk-rest/models/v1_concurrency_strategy_usage.rb
185
193
  lib/hatchet-sdk-rest/models/v1_create_filter_request.rb
186
194
  lib/hatchet-sdk-rest/models/v1_create_serverless_endpoint_request.rb
187
195
  lib/hatchet-sdk-rest/models/v1_create_webhook_request.rb
@@ -212,6 +220,11 @@ lib/hatchet-sdk-rest/models/v1_restore_task_response.rb
212
220
  lib/hatchet-sdk-rest/models/v1_running_detail_count.rb
213
221
  lib/hatchet-sdk-rest/models/v1_running_filter.rb
214
222
  lib/hatchet-sdk-rest/models/v1_serverless_endpoint.rb
223
+ lib/hatchet-sdk-rest/models/v1_serverless_endpoint_check_stage.rb
224
+ lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event.rb
225
+ lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event_details.rb
226
+ lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event_kind.rb
227
+ lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event_list.rb
215
228
  lib/hatchet-sdk-rest/models/v1_serverless_endpoint_kind.rb
216
229
  lib/hatchet-sdk-rest/models/v1_serverless_endpoint_list.rb
217
230
  lib/hatchet-sdk-rest/models/v1_serverless_endpoint_status.rb
@@ -100,6 +100,8 @@ Class | Method | HTTP request | Description
100
100
  *HatchetSdkRest::APITokenApi* | [**api_token_list**](docs/APITokenApi.md#api_token_list) | **GET** /api/v1/tenants/{tenant}/api-tokens | List API Tokens
101
101
  *HatchetSdkRest::APITokenApi* | [**api_token_update_revoke**](docs/APITokenApi.md#api_token_update_revoke) | **POST** /api/v1/api-tokens/{api-token} | Revoke API Token
102
102
  *HatchetSdkRest::CELApi* | [**v1_cel_debug**](docs/CELApi.md#v1_cel_debug) | **POST** /api/v1/stable/tenants/{tenant}/cel/debug | Debug a CEL expression
103
+ *HatchetSdkRest::ConcurrencyApi* | [**v1_concurrency_key_list**](docs/ConcurrencyApi.md#v1_concurrency_key_list) | **GET** /api/v1/stable/tenants/{tenant}/concurrency/strategies/{scope}/{strategy}/keys | List concurrency keys
104
+ *HatchetSdkRest::ConcurrencyApi* | [**v1_concurrency_strategy_list**](docs/ConcurrencyApi.md#v1_concurrency_strategy_list) | **GET** /api/v1/stable/tenants/{tenant}/concurrency/strategies | List concurrency strategies
103
105
  *HatchetSdkRest::DefaultApi* | [**info_get_version**](docs/DefaultApi.md#info_get_version) | **GET** /api/v1/version | We return the version for the currently running server
104
106
  *HatchetSdkRest::DefaultApi* | [**monitoring_post_run_probe**](docs/DefaultApi.md#monitoring_post_run_probe) | **POST** /api/v1/monitoring/{tenant}/probe | Detailed Health Probe For the Instance
105
107
  *HatchetSdkRest::DefaultApi* | [**tenant_invite_delete**](docs/DefaultApi.md#tenant_invite_delete) | **DELETE** /api/v1/tenants/{tenant}/invites/{tenant-invite} | Delete invite
@@ -144,6 +146,7 @@ Class | Method | HTTP request | Description
144
146
  *HatchetSdkRest::SNSApi* | [**sns_list**](docs/SNSApi.md#sns_list) | **GET** /api/v1/tenants/{tenant}/sns | List SNS integrations
145
147
  *HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_create**](docs/ServerlessApi.md#v1_serverless_endpoint_create) | **POST** /api/v1/stable/tenants/{tenant}/serverless/endpoints | Create a serverless endpoint
146
148
  *HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_delete**](docs/ServerlessApi.md#v1_serverless_endpoint_delete) | **DELETE** /api/v1/stable/serverless/endpoints/{v1-serverless-endpoint} | Delete a serverless endpoint
149
+ *HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_event_list**](docs/ServerlessApi.md#v1_serverless_endpoint_event_list) | **GET** /api/v1/stable/serverless/endpoints/{v1-serverless-endpoint}/events | List serverless endpoint events
147
150
  *HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_get**](docs/ServerlessApi.md#v1_serverless_endpoint_get) | **GET** /api/v1/stable/serverless/endpoints/{v1-serverless-endpoint} | Get a serverless endpoint
148
151
  *HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_list**](docs/ServerlessApi.md#v1_serverless_endpoint_list) | **GET** /api/v1/stable/tenants/{tenant}/serverless/endpoints | List serverless endpoints
149
152
  *HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_update**](docs/ServerlessApi.md#v1_serverless_endpoint_update) | **PATCH** /api/v1/stable/serverless/endpoints/{v1-serverless-endpoint} | Update a serverless endpoint
@@ -397,6 +400,13 @@ Class | Method | HTTP request | Description
397
400
  - [HatchetSdkRest::V1CELDebugResponseStatus](docs/V1CELDebugResponseStatus.md)
398
401
  - [HatchetSdkRest::V1CancelTaskRequest](docs/V1CancelTaskRequest.md)
399
402
  - [HatchetSdkRest::V1CancelledTasks](docs/V1CancelledTasks.md)
403
+ - [HatchetSdkRest::V1ConcurrencyKey](docs/V1ConcurrencyKey.md)
404
+ - [HatchetSdkRest::V1ConcurrencyKeyList](docs/V1ConcurrencyKeyList.md)
405
+ - [HatchetSdkRest::V1ConcurrencyLimitStrategy](docs/V1ConcurrencyLimitStrategy.md)
406
+ - [HatchetSdkRest::V1ConcurrencyScope](docs/V1ConcurrencyScope.md)
407
+ - [HatchetSdkRest::V1ConcurrencyStrategy](docs/V1ConcurrencyStrategy.md)
408
+ - [HatchetSdkRest::V1ConcurrencyStrategyList](docs/V1ConcurrencyStrategyList.md)
409
+ - [HatchetSdkRest::V1ConcurrencyStrategyUsage](docs/V1ConcurrencyStrategyUsage.md)
400
410
  - [HatchetSdkRest::V1CreateFilterRequest](docs/V1CreateFilterRequest.md)
401
411
  - [HatchetSdkRest::V1CreateServerlessEndpointRequest](docs/V1CreateServerlessEndpointRequest.md)
402
412
  - [HatchetSdkRest::V1CreateWebhookRequest](docs/V1CreateWebhookRequest.md)
@@ -427,6 +437,11 @@ Class | Method | HTTP request | Description
427
437
  - [HatchetSdkRest::V1RunningDetailCount](docs/V1RunningDetailCount.md)
428
438
  - [HatchetSdkRest::V1RunningFilter](docs/V1RunningFilter.md)
429
439
  - [HatchetSdkRest::V1ServerlessEndpoint](docs/V1ServerlessEndpoint.md)
440
+ - [HatchetSdkRest::V1ServerlessEndpointCheckStage](docs/V1ServerlessEndpointCheckStage.md)
441
+ - [HatchetSdkRest::V1ServerlessEndpointEvent](docs/V1ServerlessEndpointEvent.md)
442
+ - [HatchetSdkRest::V1ServerlessEndpointEventDetails](docs/V1ServerlessEndpointEventDetails.md)
443
+ - [HatchetSdkRest::V1ServerlessEndpointEventKind](docs/V1ServerlessEndpointEventKind.md)
444
+ - [HatchetSdkRest::V1ServerlessEndpointEventList](docs/V1ServerlessEndpointEventList.md)
430
445
  - [HatchetSdkRest::V1ServerlessEndpointKind](docs/V1ServerlessEndpointKind.md)
431
446
  - [HatchetSdkRest::V1ServerlessEndpointList](docs/V1ServerlessEndpointList.md)
432
447
  - [HatchetSdkRest::V1ServerlessEndpointStatus](docs/V1ServerlessEndpointStatus.md)
@@ -0,0 +1,188 @@
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 ConcurrencyApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List concurrency keys
23
+ # Lists the keys of a concurrency strategy that have running or queued runs, sorted by queued count, then oldest queued run.
24
+ # @param tenant [String] The tenant id
25
+ # @param scope [V1ConcurrencyScope] The strategy scope
26
+ # @param strategy [Integer] The strategy id
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :search Only return keys containing this string (case-insensitive)
29
+ # @option opts [Boolean] :only_queued Only return keys with at least one queued run
30
+ # @option opts [Integer] :offset The number to skip
31
+ # @option opts [Integer] :limit The number to limit by
32
+ # @return [V1ConcurrencyKeyList]
33
+ def v1_concurrency_key_list(tenant, scope, strategy, opts = {})
34
+ data, _status_code, _headers = v1_concurrency_key_list_with_http_info(tenant, scope, strategy, opts)
35
+ data
36
+ end
37
+
38
+ # List concurrency keys
39
+ # Lists the keys of a concurrency strategy that have running or queued runs, sorted by queued count, then oldest queued run.
40
+ # @param tenant [String] The tenant id
41
+ # @param scope [V1ConcurrencyScope] The strategy scope
42
+ # @param strategy [Integer] The strategy id
43
+ # @param [Hash] opts the optional parameters
44
+ # @option opts [String] :search Only return keys containing this string (case-insensitive)
45
+ # @option opts [Boolean] :only_queued Only return keys with at least one queued run
46
+ # @option opts [Integer] :offset The number to skip
47
+ # @option opts [Integer] :limit The number to limit by
48
+ # @return [Array<(V1ConcurrencyKeyList, Integer, Hash)>] V1ConcurrencyKeyList data, response status code and response headers
49
+ def v1_concurrency_key_list_with_http_info(tenant, scope, strategy, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug 'Calling API: ConcurrencyApi.v1_concurrency_key_list ...'
52
+ end
53
+ # verify the required parameter 'tenant' is set
54
+ if @api_client.config.client_side_validation && tenant.nil?
55
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling ConcurrencyApi.v1_concurrency_key_list"
56
+ end
57
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
58
+ fail ArgumentError, 'invalid value for "tenant" when calling ConcurrencyApi.v1_concurrency_key_list, the character length must be smaller than or equal to 36.'
59
+ end
60
+
61
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
62
+ fail ArgumentError, 'invalid value for "tenant" when calling ConcurrencyApi.v1_concurrency_key_list, the character length must be greater than or equal to 36.'
63
+ end
64
+
65
+ # verify the required parameter 'scope' is set
66
+ if @api_client.config.client_side_validation && scope.nil?
67
+ fail ArgumentError, "Missing the required parameter 'scope' when calling ConcurrencyApi.v1_concurrency_key_list"
68
+ end
69
+ # verify the required parameter 'strategy' is set
70
+ if @api_client.config.client_side_validation && strategy.nil?
71
+ fail ArgumentError, "Missing the required parameter 'strategy' when calling ConcurrencyApi.v1_concurrency_key_list"
72
+ end
73
+ # resource path
74
+ local_var_path = '/api/v1/stable/tenants/{tenant}/concurrency/strategies/{scope}/{strategy}/keys'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'scope' + '}', CGI.escape(scope.to_s)).sub('{' + 'strategy' + '}', CGI.escape(strategy.to_s))
75
+
76
+ # query parameters
77
+ query_params = opts[:query_params] || {}
78
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
79
+ query_params[:'onlyQueued'] = opts[:'only_queued'] if !opts[:'only_queued'].nil?
80
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
81
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
82
+
83
+ # header parameters
84
+ header_params = opts[:header_params] || {}
85
+ # HTTP header 'Accept' (if needed)
86
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
87
+
88
+ # form parameters
89
+ form_params = opts[:form_params] || {}
90
+
91
+ # http body (model)
92
+ post_body = opts[:debug_body]
93
+
94
+ # return_type
95
+ return_type = opts[:debug_return_type] || 'V1ConcurrencyKeyList'
96
+
97
+ # auth_names
98
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
99
+
100
+ new_options = opts.merge(
101
+ :operation => :"ConcurrencyApi.v1_concurrency_key_list",
102
+ :header_params => header_params,
103
+ :query_params => query_params,
104
+ :form_params => form_params,
105
+ :body => post_body,
106
+ :auth_names => auth_names,
107
+ :return_type => return_type
108
+ )
109
+
110
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
111
+ if @api_client.config.debugging
112
+ @api_client.config.logger.debug "API called: ConcurrencyApi#v1_concurrency_key_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
113
+ end
114
+ return data, status_code, headers
115
+ end
116
+
117
+ # List concurrency strategies
118
+ # Lists the concurrency strategies on the latest version of each workflow in a tenant, and the shared strategies their tasks use, with live slot counts.
119
+ # @param tenant [String] The tenant id
120
+ # @param [Hash] opts the optional parameters
121
+ # @return [V1ConcurrencyStrategyList]
122
+ def v1_concurrency_strategy_list(tenant, opts = {})
123
+ data, _status_code, _headers = v1_concurrency_strategy_list_with_http_info(tenant, opts)
124
+ data
125
+ end
126
+
127
+ # List concurrency strategies
128
+ # Lists the concurrency strategies on the latest version of each workflow in a tenant, and the shared strategies their tasks use, with live slot counts.
129
+ # @param tenant [String] The tenant id
130
+ # @param [Hash] opts the optional parameters
131
+ # @return [Array<(V1ConcurrencyStrategyList, Integer, Hash)>] V1ConcurrencyStrategyList data, response status code and response headers
132
+ def v1_concurrency_strategy_list_with_http_info(tenant, opts = {})
133
+ if @api_client.config.debugging
134
+ @api_client.config.logger.debug 'Calling API: ConcurrencyApi.v1_concurrency_strategy_list ...'
135
+ end
136
+ # verify the required parameter 'tenant' is set
137
+ if @api_client.config.client_side_validation && tenant.nil?
138
+ fail ArgumentError, "Missing the required parameter 'tenant' when calling ConcurrencyApi.v1_concurrency_strategy_list"
139
+ end
140
+ if @api_client.config.client_side_validation && tenant.to_s.length > 36
141
+ fail ArgumentError, 'invalid value for "tenant" when calling ConcurrencyApi.v1_concurrency_strategy_list, the character length must be smaller than or equal to 36.'
142
+ end
143
+
144
+ if @api_client.config.client_side_validation && tenant.to_s.length < 36
145
+ fail ArgumentError, 'invalid value for "tenant" when calling ConcurrencyApi.v1_concurrency_strategy_list, the character length must be greater than or equal to 36.'
146
+ end
147
+
148
+ # resource path
149
+ local_var_path = '/api/v1/stable/tenants/{tenant}/concurrency/strategies'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
150
+
151
+ # query parameters
152
+ query_params = opts[:query_params] || {}
153
+
154
+ # header parameters
155
+ header_params = opts[:header_params] || {}
156
+ # HTTP header 'Accept' (if needed)
157
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
158
+
159
+ # form parameters
160
+ form_params = opts[:form_params] || {}
161
+
162
+ # http body (model)
163
+ post_body = opts[:debug_body]
164
+
165
+ # return_type
166
+ return_type = opts[:debug_return_type] || 'V1ConcurrencyStrategyList'
167
+
168
+ # auth_names
169
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
170
+
171
+ new_options = opts.merge(
172
+ :operation => :"ConcurrencyApi.v1_concurrency_strategy_list",
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => return_type
179
+ )
180
+
181
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "API called: ConcurrencyApi#v1_concurrency_strategy_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
187
+ end
188
+ end
@@ -172,6 +172,83 @@ module HatchetSdkRest
172
172
  return data, status_code, headers
173
173
  end
174
174
 
175
+ # List serverless endpoint events
176
+ # Lists the most recent events the serverless operator recorded for an endpoint, newest first.
177
+ # @param v1_serverless_endpoint [String] The serverless endpoint id
178
+ # @param [Hash] opts the optional parameters
179
+ # @option opts [Integer] :limit The number of events to return, at most 500. Defaults to 100.
180
+ # @option opts [Time] :since Only return events created after this time
181
+ # @return [V1ServerlessEndpointEventList]
182
+ def v1_serverless_endpoint_event_list(v1_serverless_endpoint, opts = {})
183
+ data, _status_code, _headers = v1_serverless_endpoint_event_list_with_http_info(v1_serverless_endpoint, opts)
184
+ data
185
+ end
186
+
187
+ # List serverless endpoint events
188
+ # Lists the most recent events the serverless operator recorded for an endpoint, newest first.
189
+ # @param v1_serverless_endpoint [String] The serverless endpoint id
190
+ # @param [Hash] opts the optional parameters
191
+ # @option opts [Integer] :limit The number of events to return, at most 500. Defaults to 100.
192
+ # @option opts [Time] :since Only return events created after this time
193
+ # @return [Array<(V1ServerlessEndpointEventList, Integer, Hash)>] V1ServerlessEndpointEventList data, response status code and response headers
194
+ def v1_serverless_endpoint_event_list_with_http_info(v1_serverless_endpoint, opts = {})
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug 'Calling API: ServerlessApi.v1_serverless_endpoint_event_list ...'
197
+ end
198
+ # verify the required parameter 'v1_serverless_endpoint' is set
199
+ if @api_client.config.client_side_validation && v1_serverless_endpoint.nil?
200
+ fail ArgumentError, "Missing the required parameter 'v1_serverless_endpoint' when calling ServerlessApi.v1_serverless_endpoint_event_list"
201
+ end
202
+ if @api_client.config.client_side_validation && v1_serverless_endpoint.to_s.length > 36
203
+ fail ArgumentError, 'invalid value for "v1_serverless_endpoint" when calling ServerlessApi.v1_serverless_endpoint_event_list, the character length must be smaller than or equal to 36.'
204
+ end
205
+
206
+ if @api_client.config.client_side_validation && v1_serverless_endpoint.to_s.length < 36
207
+ fail ArgumentError, 'invalid value for "v1_serverless_endpoint" when calling ServerlessApi.v1_serverless_endpoint_event_list, the character length must be greater than or equal to 36.'
208
+ end
209
+
210
+ # resource path
211
+ local_var_path = '/api/v1/stable/serverless/endpoints/{v1-serverless-endpoint}/events'.sub('{' + 'v1-serverless-endpoint' + '}', CGI.escape(v1_serverless_endpoint.to_s))
212
+
213
+ # query parameters
214
+ query_params = opts[:query_params] || {}
215
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
216
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
217
+
218
+ # header parameters
219
+ header_params = opts[:header_params] || {}
220
+ # HTTP header 'Accept' (if needed)
221
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
222
+
223
+ # form parameters
224
+ form_params = opts[:form_params] || {}
225
+
226
+ # http body (model)
227
+ post_body = opts[:debug_body]
228
+
229
+ # return_type
230
+ return_type = opts[:debug_return_type] || 'V1ServerlessEndpointEventList'
231
+
232
+ # auth_names
233
+ auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
234
+
235
+ new_options = opts.merge(
236
+ :operation => :"ServerlessApi.v1_serverless_endpoint_event_list",
237
+ :header_params => header_params,
238
+ :query_params => query_params,
239
+ :form_params => form_params,
240
+ :body => post_body,
241
+ :auth_names => auth_names,
242
+ :return_type => return_type
243
+ )
244
+
245
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug "API called: ServerlessApi#v1_serverless_endpoint_event_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
248
+ end
249
+ return data, status_code, headers
250
+ end
251
+
175
252
  # Get a serverless endpoint
176
253
  # Get a serverless endpoint by its id
177
254
  # @param v1_serverless_endpoint [String] The serverless endpoint id
@@ -20,6 +20,9 @@ module HatchetSdkRest
20
20
  # The name of the API token.
21
21
  attr_accessor :name
22
22
 
23
+ # Whether the token is limited to viewer access over REST and cannot use gRPC.
24
+ attr_accessor :read_only
25
+
23
26
  # When the API token expires.
24
27
  attr_accessor :expires_at
25
28
 
@@ -28,6 +31,7 @@ module HatchetSdkRest
28
31
  {
29
32
  :'metadata' => :'metadata',
30
33
  :'name' => :'name',
34
+ :'read_only' => :'readOnly',
31
35
  :'expires_at' => :'expiresAt'
32
36
  }
33
37
  end
@@ -47,6 +51,7 @@ module HatchetSdkRest
47
51
  {
48
52
  :'metadata' => :'APIResourceMeta',
49
53
  :'name' => :'String',
54
+ :'read_only' => :'Boolean',
50
55
  :'expires_at' => :'Time'
51
56
  }
52
57
  end
@@ -85,6 +90,12 @@ module HatchetSdkRest
85
90
  self.name = nil
86
91
  end
87
92
 
93
+ if attributes.key?(:'read_only')
94
+ self.read_only = attributes[:'read_only']
95
+ else
96
+ self.read_only = nil
97
+ end
98
+
88
99
  if attributes.key?(:'expires_at')
89
100
  self.expires_at = attributes[:'expires_at']
90
101
  else
@@ -109,6 +120,10 @@ module HatchetSdkRest
109
120
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
110
121
  end
111
122
 
123
+ if @read_only.nil?
124
+ invalid_properties.push('invalid value for "read_only", read_only cannot be nil.')
125
+ end
126
+
112
127
  if @expires_at.nil?
113
128
  invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
114
129
  end
@@ -123,6 +138,7 @@ module HatchetSdkRest
123
138
  return false if @metadata.nil?
124
139
  return false if @name.nil?
125
140
  return false if @name.to_s.length > 255
141
+ return false if @read_only.nil?
126
142
  return false if @expires_at.nil?
127
143
  true
128
144
  end
@@ -151,6 +167,16 @@ module HatchetSdkRest
151
167
  @name = name
152
168
  end
153
169
 
170
+ # Custom attribute writer method with validation
171
+ # @param [Object] read_only Value to be assigned
172
+ def read_only=(read_only)
173
+ if read_only.nil?
174
+ fail ArgumentError, 'read_only cannot be nil'
175
+ end
176
+
177
+ @read_only = read_only
178
+ end
179
+
154
180
  # Custom attribute writer method with validation
155
181
  # @param [Object] expires_at Value to be assigned
156
182
  def expires_at=(expires_at)
@@ -168,6 +194,7 @@ module HatchetSdkRest
168
194
  self.class == o.class &&
169
195
  metadata == o.metadata &&
170
196
  name == o.name &&
197
+ read_only == o.read_only &&
171
198
  expires_at == o.expires_at
172
199
  end
173
200
 
@@ -180,7 +207,7 @@ module HatchetSdkRest
180
207
  # Calculates hash code according to all attributes.
181
208
  # @return [Integer] Hash code
182
209
  def hash
183
- [metadata, name, expires_at].hash
210
+ [metadata, name, read_only, expires_at].hash
184
211
  end
185
212
 
186
213
  # Builds the object from hash
@@ -18,6 +18,9 @@ module HatchetSdkRest
18
18
  # A name for the API token.
19
19
  attr_accessor :name
20
20
 
21
+ # Limit the token to viewer access over REST and deny all gRPC calls. Defaults to false.
22
+ attr_accessor :read_only
23
+
21
24
  # The duration for which the token is valid.
22
25
  attr_accessor :expires_in
23
26
 
@@ -25,6 +28,7 @@ module HatchetSdkRest
25
28
  def self.attribute_map
26
29
  {
27
30
  :'name' => :'name',
31
+ :'read_only' => :'readOnly',
28
32
  :'expires_in' => :'expiresIn'
29
33
  }
30
34
  end
@@ -43,6 +47,7 @@ module HatchetSdkRest
43
47
  def self.openapi_types
44
48
  {
45
49
  :'name' => :'String',
50
+ :'read_only' => :'Boolean',
46
51
  :'expires_in' => :'String'
47
52
  }
48
53
  end
@@ -75,6 +80,10 @@ module HatchetSdkRest
75
80
  self.name = nil
76
81
  end
77
82
 
83
+ if attributes.key?(:'read_only')
84
+ self.read_only = attributes[:'read_only']
85
+ end
86
+
78
87
  if attributes.key?(:'expires_in')
79
88
  self.expires_in = attributes[:'expires_in']
80
89
  end
@@ -125,6 +134,7 @@ module HatchetSdkRest
125
134
  return true if self.equal?(o)
126
135
  self.class == o.class &&
127
136
  name == o.name &&
137
+ read_only == o.read_only &&
128
138
  expires_in == o.expires_in
129
139
  end
130
140
 
@@ -137,7 +147,7 @@ module HatchetSdkRest
137
147
  # Calculates hash code according to all attributes.
138
148
  # @return [Integer] Hash code
139
149
  def hash
140
- [name, expires_in].hash
150
+ [name, read_only, expires_in].hash
141
151
  end
142
152
 
143
153
  # Builds the object from hash
@@ -19,9 +19,10 @@ module HatchetSdkRest
19
19
  TRACE_MINIMAP_ENABLED = "trace-minimap-enabled".freeze
20
20
  ORGANIZATION_SSO_ENABLED = "organization-sso-enabled".freeze
21
21
  OPERATOR_DETAILS_ENABLED = "operator-details-enabled".freeze
22
+ CONCURRENCY_PAGE_ENABLED = "concurrency-page-enabled".freeze
22
23
 
23
24
  def self.all_vars
24
- @all_vars ||= [TENANT_LOG_WORKFLOW_FILTER_ENABLED, TRACE_MINIMAP_ENABLED, ORGANIZATION_SSO_ENABLED, OPERATOR_DETAILS_ENABLED].freeze
25
+ @all_vars ||= [TENANT_LOG_WORKFLOW_FILTER_ENABLED, TRACE_MINIMAP_ENABLED, ORGANIZATION_SSO_ENABLED, OPERATOR_DETAILS_ENABLED, CONCURRENCY_PAGE_ENABLED].freeze
25
26
  end
26
27
 
27
28
  # Builds the enum from string
@@ -27,6 +27,8 @@ module HatchetSdkRest
27
27
 
28
28
  attr_accessor :serverless_operator
29
29
 
30
+ attr_accessor :sandbox_operator
31
+
30
32
  # Attribute mapping from ruby-style variable name to JSON key.
31
33
  def self.attribute_map
32
34
  {
@@ -35,7 +37,8 @@ module HatchetSdkRest
35
37
  :'strict_additional_metadata_filters' => :'strictAdditionalMetadataFilters',
36
38
  :'dag_operator' => :'dagOperator',
37
39
  :'durable_streams' => :'durableStreams',
38
- :'serverless_operator' => :'serverlessOperator'
40
+ :'serverless_operator' => :'serverlessOperator',
41
+ :'sandbox_operator' => :'sandboxOperator'
39
42
  }
40
43
  end
41
44
 
@@ -57,7 +60,8 @@ module HatchetSdkRest
57
60
  :'strict_additional_metadata_filters' => :'Boolean',
58
61
  :'dag_operator' => :'Boolean',
59
62
  :'durable_streams' => :'Boolean',
60
- :'serverless_operator' => :'Boolean'
63
+ :'serverless_operator' => :'Boolean',
64
+ :'sandbox_operator' => :'Boolean'
61
65
  }
62
66
  end
63
67
 
@@ -118,6 +122,12 @@ module HatchetSdkRest
118
122
  else
119
123
  self.serverless_operator = nil
120
124
  end
125
+
126
+ if attributes.key?(:'sandbox_operator')
127
+ self.sandbox_operator = attributes[:'sandbox_operator']
128
+ else
129
+ self.sandbox_operator = nil
130
+ end
121
131
  end
122
132
 
123
133
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -149,6 +159,10 @@ module HatchetSdkRest
149
159
  invalid_properties.push('invalid value for "serverless_operator", serverless_operator cannot be nil.')
150
160
  end
151
161
 
162
+ if @sandbox_operator.nil?
163
+ invalid_properties.push('invalid value for "sandbox_operator", sandbox_operator cannot be nil.')
164
+ end
165
+
152
166
  invalid_properties
153
167
  end
154
168
 
@@ -162,6 +176,7 @@ module HatchetSdkRest
162
176
  return false if @dag_operator.nil?
163
177
  return false if @durable_streams.nil?
164
178
  return false if @serverless_operator.nil?
179
+ return false if @sandbox_operator.nil?
165
180
  true
166
181
  end
167
182
 
@@ -225,6 +240,16 @@ module HatchetSdkRest
225
240
  @serverless_operator = serverless_operator
226
241
  end
227
242
 
243
+ # Custom attribute writer method with validation
244
+ # @param [Object] sandbox_operator Value to be assigned
245
+ def sandbox_operator=(sandbox_operator)
246
+ if sandbox_operator.nil?
247
+ fail ArgumentError, 'sandbox_operator cannot be nil'
248
+ end
249
+
250
+ @sandbox_operator = sandbox_operator
251
+ end
252
+
228
253
  # Checks equality by comparing each attribute.
229
254
  # @param [Object] Object to be compared
230
255
  def ==(o)
@@ -235,7 +260,8 @@ module HatchetSdkRest
235
260
  strict_additional_metadata_filters == o.strict_additional_metadata_filters &&
236
261
  dag_operator == o.dag_operator &&
237
262
  durable_streams == o.durable_streams &&
238
- serverless_operator == o.serverless_operator
263
+ serverless_operator == o.serverless_operator &&
264
+ sandbox_operator == o.sandbox_operator
239
265
  end
240
266
 
241
267
  # @see the `==` method
@@ -247,7 +273,7 @@ module HatchetSdkRest
247
273
  # Calculates hash code according to all attributes.
248
274
  # @return [Integer] Hash code
249
275
  def hash
250
- [audit_logs, prometheus_metrics, strict_additional_metadata_filters, dag_operator, durable_streams, serverless_operator].hash
276
+ [audit_logs, prometheus_metrics, strict_additional_metadata_filters, dag_operator, durable_streams, serverless_operator, sandbox_operator].hash
251
277
  end
252
278
 
253
279
  # Builds the object from hash