hatchet-sdk 0.11.1 → 0.12.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.
Files changed (34) 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/api/user_api.rb +4 -0
  9. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_token.rb +28 -1
  10. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_request.rb +11 -1
  11. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_id.rb +2 -1
  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.rb +13 -0
  27. data/lib/hatchet/contracts/v1/streams_pb.rb +28 -0
  28. data/lib/hatchet/contracts/v1/streams_services_pb.rb +26 -0
  29. data/lib/hatchet/features/streams.rb +498 -0
  30. data/lib/hatchet/version.rb +1 -1
  31. data/lib/hatchet-sdk.rb +11 -0
  32. data/sig/hatchet/features/streams.rbs +39 -0
  33. data/sig/hatchet-sdk.rbs +1 -0
  34. metadata +19 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8061a1ca79c9741890e7228b266aba4551c91408c3edede118e8be8e108d73fd
4
- data.tar.gz: 3878c4f5d3e5c4c270cecd0b54ea08ef47cfbd540fe5e37c58f34211dd5905e0
3
+ metadata.gz: 8c6c7a691d590f1391d8803c31af9bb5539590c6c2b6a4476716a14d27b6be6c
4
+ data.tar.gz: d46fac7098baa91741aed231fa668c709f641a3b4c1ffacfb8649abf2a6fca48
5
5
  SHA512:
6
- metadata.gz: 5cb383edd73867ef24a2bb282963d32e83b1bd92840ca28e946c9b334f2656ca960e59804076cd13c5af3fd2c0d0fe1c7440bd440f5ee88a10a5af55a5f0512a
7
- data.tar.gz: a03d970376c65133dc0438b4f8315460924676b2bcb4dc5728343d8ec13af00f8417c48a1634f3bde9d1ec31b67100a2d49bcb692ab4a6c91fd1b1a041333ee6
6
+ metadata.gz: 93a22456715d4eefe6ddcc3b8f2a904e88bfd452da4e931f53c85b3f647cccec6f08d9f2c6e2681df4d4d09e30643eb0efe170874613434ce0daa3ea92c308b1
7
+ data.tar.gz: 41a4ceddd97213a73174863a9e0f7bc221b7bf444f66648a1aba443dc6f28c8d04bdf927ae99a2eb8c5faec103b6ded2b5537b28bba27cecfe83cb9d71cc7cc4
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.0] - 2026-10-26
9
+
10
+ ### Added
11
+
12
+ - 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.
13
+
14
+ ## [0.11.2] - 2026-10-27
15
+
16
+ ### Changed
17
+
18
+ - The REST client sends `Accept: application/json` on the Slack OAuth start and callback calls, since the API now declares a `429 Too Many Requests` response on every authenticated operation.
19
+
8
20
  ## [0.11.1] - 2026-10-23
9
21
 
10
22
  ### Fixed
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
@@ -627,6 +627,8 @@ module HatchetSdkRest
627
627
 
628
628
  # header parameters
629
629
  header_params = opts[:header_params] || {}
630
+ # HTTP header 'Accept' (if needed)
631
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
630
632
 
631
633
  # form parameters
632
634
  form_params = opts[:form_params] || {}
@@ -696,6 +698,8 @@ module HatchetSdkRest
696
698
 
697
699
  # header parameters
698
700
  header_params = opts[:header_params] || {}
701
+ # HTTP header 'Accept' (if needed)
702
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
699
703
 
700
704
  # form parameters
701
705
  form_params = opts[:form_params] || {}
@@ -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