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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/lib/hatchet/clients/rest/.openapi-generator/FILES +24 -0
  4. data/lib/hatchet/clients/rest/README.md +31 -1
  5. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/durable_tasks_api.rb +113 -0
  6. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/feature_flags_api.rb +107 -0
  7. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/log_api.rb +156 -52
  8. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/observability_api.rb +114 -0
  9. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/rate_limits_api.rb +78 -0
  10. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb +71 -0
  11. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +3 -0
  12. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/worker_api.rb +9 -0
  13. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_api.rb +170 -0
  14. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_runs_api.rb +94 -0
  15. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_model_base.rb +88 -0
  16. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta.rb +44 -4
  17. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_evaluation_result.rb +238 -0
  18. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_id.rb +41 -0
  19. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span.rb +525 -0
  20. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_kind.rb +44 -0
  21. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_list.rb +242 -0
  22. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_status_code.rb +41 -0
  23. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/task_status_stat.rb +13 -4
  24. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant.rb +24 -4
  25. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member.rb +14 -4
  26. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_run_result.rb +256 -0
  27. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_additional_metadata_operator.rb +40 -0
  28. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_request.rb +310 -0
  29. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_response.rb +310 -0
  30. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_api_key.rb +14 -4
  31. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_base.rb +14 -4
  32. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_basic_auth.rb +14 -4
  33. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_hmac.rb +14 -4
  34. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_entry.rb +470 -0
  35. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_kind.rb +41 -0
  36. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition.rb +286 -0
  37. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition_kind.rb +41 -0
  38. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line.rb +49 -1
  39. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metric.rb +341 -0
  40. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metrics.rb +222 -0
  41. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_restore_task_response.rb +237 -0
  42. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_detail_count.rb +265 -0
  43. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_filter.rb +41 -0
  44. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_type.rb +3 -1
  45. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_metric.rb +13 -4
  46. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb +34 -4
  47. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing.rb +11 -1
  48. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb +14 -4
  49. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_webhook_request.rb +14 -4
  50. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_wait_item.rb +280 -0
  51. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_webhook.rb +14 -4
  52. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker.rb +1 -13
  53. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_status.rb +41 -0
  54. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_idempotency.rb +265 -0
  55. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task.rb +393 -0
  56. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_desired_worker_label.rb +288 -0
  57. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_rate_limit.rb +271 -0
  58. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +24 -0
  59. data/lib/hatchet/contracts/v1/workflows_pb.rb +3 -1
  60. data/lib/hatchet/idempotency.rb +35 -1
  61. data/lib/hatchet/version.rb +1 -1
  62. data/lib/hatchet/workflow.rb +2 -2
  63. data/sig/hatchet/idempotency.rbs +8 -0
  64. metadata +31 -2
@@ -0,0 +1,310 @@
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 'date'
14
+ require 'time'
15
+
16
+ module HatchetSdkRest
17
+ class V1BranchDurableTaskResponse
18
+ # The external id of the durable task.
19
+ attr_accessor :task_external_id
20
+
21
+ # The node id of the new entry.
22
+ attr_accessor :node_id
23
+
24
+ # The branch id of the new entry.
25
+ attr_accessor :branch_id
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'task_external_id' => :'taskExternalId',
31
+ :'node_id' => :'nodeId',
32
+ :'branch_id' => :'branchId'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'task_external_id' => :'String',
50
+ :'node_id' => :'Integer',
51
+ :'branch_id' => :'Integer'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::V1BranchDurableTaskResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `HatchetSdkRest::V1BranchDurableTaskResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'task_external_id')
78
+ self.task_external_id = attributes[:'task_external_id']
79
+ else
80
+ self.task_external_id = nil
81
+ end
82
+
83
+ if attributes.key?(:'node_id')
84
+ self.node_id = attributes[:'node_id']
85
+ else
86
+ self.node_id = nil
87
+ end
88
+
89
+ if attributes.key?(:'branch_id')
90
+ self.branch_id = attributes[:'branch_id']
91
+ else
92
+ self.branch_id = nil
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ if @task_external_id.nil?
102
+ invalid_properties.push('invalid value for "task_external_id", task_external_id cannot be nil.')
103
+ end
104
+
105
+ if @task_external_id.to_s.length > 36
106
+ invalid_properties.push('invalid value for "task_external_id", the character length must be smaller than or equal to 36.')
107
+ end
108
+
109
+ if @task_external_id.to_s.length < 36
110
+ invalid_properties.push('invalid value for "task_external_id", the character length must be greater than or equal to 36.')
111
+ end
112
+
113
+ if @node_id.nil?
114
+ invalid_properties.push('invalid value for "node_id", node_id cannot be nil.')
115
+ end
116
+
117
+ if @branch_id.nil?
118
+ invalid_properties.push('invalid value for "branch_id", branch_id cannot be nil.')
119
+ end
120
+
121
+ invalid_properties
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ def valid?
127
+ warn '[DEPRECATED] the `valid?` method is obsolete'
128
+ return false if @task_external_id.nil?
129
+ return false if @task_external_id.to_s.length > 36
130
+ return false if @task_external_id.to_s.length < 36
131
+ return false if @node_id.nil?
132
+ return false if @branch_id.nil?
133
+ true
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param [Object] task_external_id Value to be assigned
138
+ def task_external_id=(task_external_id)
139
+ if task_external_id.nil?
140
+ fail ArgumentError, 'task_external_id cannot be nil'
141
+ end
142
+
143
+ if task_external_id.to_s.length > 36
144
+ fail ArgumentError, 'invalid value for "task_external_id", the character length must be smaller than or equal to 36.'
145
+ end
146
+
147
+ if task_external_id.to_s.length < 36
148
+ fail ArgumentError, 'invalid value for "task_external_id", the character length must be greater than or equal to 36.'
149
+ end
150
+
151
+ @task_external_id = task_external_id
152
+ end
153
+
154
+ # Custom attribute writer method with validation
155
+ # @param [Object] node_id Value to be assigned
156
+ def node_id=(node_id)
157
+ if node_id.nil?
158
+ fail ArgumentError, 'node_id cannot be nil'
159
+ end
160
+
161
+ @node_id = node_id
162
+ end
163
+
164
+ # Custom attribute writer method with validation
165
+ # @param [Object] branch_id Value to be assigned
166
+ def branch_id=(branch_id)
167
+ if branch_id.nil?
168
+ fail ArgumentError, 'branch_id cannot be nil'
169
+ end
170
+
171
+ @branch_id = branch_id
172
+ end
173
+
174
+ # Checks equality by comparing each attribute.
175
+ # @param [Object] Object to be compared
176
+ def ==(o)
177
+ return true if self.equal?(o)
178
+ self.class == o.class &&
179
+ task_external_id == o.task_external_id &&
180
+ node_id == o.node_id &&
181
+ branch_id == o.branch_id
182
+ end
183
+
184
+ # @see the `==` method
185
+ # @param [Object] Object to be compared
186
+ def eql?(o)
187
+ self == o
188
+ end
189
+
190
+ # Calculates hash code according to all attributes.
191
+ # @return [Integer] Hash code
192
+ def hash
193
+ [task_external_id, node_id, branch_id].hash
194
+ end
195
+
196
+ # Builds the object from hash
197
+ # @param [Hash] attributes Model attributes in the form of hash
198
+ # @return [Object] Returns the model itself
199
+ def self.build_from_hash(attributes)
200
+ return nil unless attributes.is_a?(Hash)
201
+ attributes = attributes.transform_keys(&:to_sym)
202
+ transformed_hash = {}
203
+ openapi_types.each_pair do |key, type|
204
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
205
+ transformed_hash["#{key}"] = nil
206
+ elsif type =~ /\AArray<(.*)>/i
207
+ # check to ensure the input is an array given that the attribute
208
+ # is documented as an array but the input is not
209
+ if attributes[attribute_map[key]].is_a?(Array)
210
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
211
+ end
212
+ elsif !attributes[attribute_map[key]].nil?
213
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
214
+ end
215
+ end
216
+ new(transformed_hash)
217
+ end
218
+
219
+ # Deserializes the data based on type
220
+ # @param string type Data type
221
+ # @param string value Value to be deserialized
222
+ # @return [Object] Deserialized data
223
+ def self._deserialize(type, value)
224
+ case type.to_sym
225
+ when :Time
226
+ Time.parse(value)
227
+ when :Date
228
+ Date.parse(value)
229
+ when :String
230
+ value.to_s
231
+ when :Integer
232
+ value.to_i
233
+ when :Float
234
+ value.to_f
235
+ when :Boolean
236
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
237
+ true
238
+ else
239
+ false
240
+ end
241
+ when :Object
242
+ # generic object (usually a Hash), return directly
243
+ value
244
+ when /\AArray<(?<inner_type>.+)>\z/
245
+ inner_type = Regexp.last_match[:inner_type]
246
+ value.map { |v| _deserialize(inner_type, v) }
247
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
248
+ k_type = Regexp.last_match[:k_type]
249
+ v_type = Regexp.last_match[:v_type]
250
+ {}.tap do |hash|
251
+ value.each do |k, v|
252
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
253
+ end
254
+ end
255
+ else # model
256
+ # models (e.g. Pet) or oneOf
257
+ klass = HatchetSdkRest.const_get(type)
258
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
259
+ end
260
+ end
261
+
262
+ # Returns the string representation of the object
263
+ # @return [String] String presentation of the object
264
+ def to_s
265
+ to_hash.to_s
266
+ end
267
+
268
+ # to_body is an alias to to_hash (backward compatibility)
269
+ # @return [Hash] Returns the object in the form of hash
270
+ def to_body
271
+ to_hash
272
+ end
273
+
274
+ # Returns the object in the form of hash
275
+ # @return [Hash] Returns the object in the form of hash
276
+ def to_hash
277
+ hash = {}
278
+ self.class.attribute_map.each_pair do |attr, param|
279
+ value = self.send(attr)
280
+ if value.nil?
281
+ is_nullable = self.class.openapi_nullable.include?(attr)
282
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
283
+ end
284
+
285
+ hash[param] = _to_hash(value)
286
+ end
287
+ hash
288
+ end
289
+
290
+ # Outputs non-array value in the form of hash
291
+ # For object, use to_hash. Otherwise, just return the value
292
+ # @param [Object] value Any valid value
293
+ # @return [Hash] Returns the value in the form of hash
294
+ def _to_hash(value)
295
+ if value.is_a?(Array)
296
+ value.compact.map { |v| _to_hash(v) }
297
+ elsif value.is_a?(Hash)
298
+ {}.tap do |hash|
299
+ value.each { |k, v| hash[k] = _to_hash(v) }
300
+ end
301
+ elsif value.respond_to? :to_hash
302
+ value.to_hash
303
+ else
304
+ value
305
+ end
306
+ end
307
+
308
+ end
309
+
310
+ end
@@ -35,6 +35,9 @@ module HatchetSdkRest
35
35
  # The static payload to use for the webhook. This is used to send a static payload with the webhook.
36
36
  attr_accessor :static_payload
37
37
 
38
+ # Whether to return the triggered event as the response payload when this webhook is triggered
39
+ attr_accessor :return_event_as_response_payload
40
+
38
41
  class EnumAttributeValidator
39
42
  attr_reader :datatype
40
43
  attr_reader :allowable_values
@@ -66,7 +69,8 @@ module HatchetSdkRest
66
69
  :'auth_type' => :'authType',
67
70
  :'auth' => :'auth',
68
71
  :'scope_expression' => :'scopeExpression',
69
- :'static_payload' => :'staticPayload'
72
+ :'static_payload' => :'staticPayload',
73
+ :'return_event_as_response_payload' => :'returnEventAsResponsePayload'
70
74
  }
71
75
  end
72
76
 
@@ -89,7 +93,8 @@ module HatchetSdkRest
89
93
  :'auth_type' => :'String',
90
94
  :'auth' => :'V1WebhookAPIKeyAuth',
91
95
  :'scope_expression' => :'String',
92
- :'static_payload' => :'Object'
96
+ :'static_payload' => :'Object',
97
+ :'return_event_as_response_payload' => :'Boolean'
93
98
  }
94
99
  end
95
100
 
@@ -159,6 +164,10 @@ module HatchetSdkRest
159
164
  if attributes.key?(:'static_payload')
160
165
  self.static_payload = attributes[:'static_payload']
161
166
  end
167
+
168
+ if attributes.key?(:'return_event_as_response_payload')
169
+ self.return_event_as_response_payload = attributes[:'return_event_as_response_payload']
170
+ end
162
171
  end
163
172
 
164
173
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -264,7 +273,8 @@ module HatchetSdkRest
264
273
  auth_type == o.auth_type &&
265
274
  auth == o.auth &&
266
275
  scope_expression == o.scope_expression &&
267
- static_payload == o.static_payload
276
+ static_payload == o.static_payload &&
277
+ return_event_as_response_payload == o.return_event_as_response_payload
268
278
  end
269
279
 
270
280
  # @see the `==` method
@@ -276,7 +286,7 @@ module HatchetSdkRest
276
286
  # Calculates hash code according to all attributes.
277
287
  # @return [Integer] Hash code
278
288
  def hash
279
- [source_name, name, event_key_expression, auth_type, auth, scope_expression, static_payload].hash
289
+ [source_name, name, event_key_expression, auth_type, auth, scope_expression, static_payload, return_event_as_response_payload].hash
280
290
  end
281
291
 
282
292
  # Builds the object from hash
@@ -30,6 +30,9 @@ module HatchetSdkRest
30
30
  # The static payload to use for the webhook. This is used to send a static payload with the webhook.
31
31
  attr_accessor :static_payload
32
32
 
33
+ # Whether to return the triggered event as the response payload when this webhook is triggered
34
+ attr_accessor :return_event_as_response_payload
35
+
33
36
  class EnumAttributeValidator
34
37
  attr_reader :datatype
35
38
  attr_reader :allowable_values
@@ -59,7 +62,8 @@ module HatchetSdkRest
59
62
  :'name' => :'name',
60
63
  :'event_key_expression' => :'eventKeyExpression',
61
64
  :'scope_expression' => :'scopeExpression',
62
- :'static_payload' => :'staticPayload'
65
+ :'static_payload' => :'staticPayload',
66
+ :'return_event_as_response_payload' => :'returnEventAsResponsePayload'
63
67
  }
64
68
  end
65
69
 
@@ -80,7 +84,8 @@ module HatchetSdkRest
80
84
  :'name' => :'String',
81
85
  :'event_key_expression' => :'String',
82
86
  :'scope_expression' => :'String',
83
- :'static_payload' => :'Object'
87
+ :'static_payload' => :'Object',
88
+ :'return_event_as_response_payload' => :'Boolean'
84
89
  }
85
90
  end
86
91
 
@@ -131,6 +136,10 @@ module HatchetSdkRest
131
136
  if attributes.key?(:'static_payload')
132
137
  self.static_payload = attributes[:'static_payload']
133
138
  end
139
+
140
+ if attributes.key?(:'return_event_as_response_payload')
141
+ self.return_event_as_response_payload = attributes[:'return_event_as_response_payload']
142
+ end
134
143
  end
135
144
 
136
145
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -202,7 +211,8 @@ module HatchetSdkRest
202
211
  name == o.name &&
203
212
  event_key_expression == o.event_key_expression &&
204
213
  scope_expression == o.scope_expression &&
205
- static_payload == o.static_payload
214
+ static_payload == o.static_payload &&
215
+ return_event_as_response_payload == o.return_event_as_response_payload
206
216
  end
207
217
 
208
218
  # @see the `==` method
@@ -214,7 +224,7 @@ module HatchetSdkRest
214
224
  # Calculates hash code according to all attributes.
215
225
  # @return [Integer] Hash code
216
226
  def hash
217
- [source_name, name, event_key_expression, scope_expression, static_payload].hash
227
+ [source_name, name, event_key_expression, scope_expression, static_payload, return_event_as_response_payload].hash
218
228
  end
219
229
 
220
230
  # Builds the object from hash
@@ -35,6 +35,9 @@ module HatchetSdkRest
35
35
  # The static payload to use for the webhook. This is used to send a static payload with the webhook.
36
36
  attr_accessor :static_payload
37
37
 
38
+ # Whether to return the triggered event as the response payload when this webhook is triggered
39
+ attr_accessor :return_event_as_response_payload
40
+
38
41
  class EnumAttributeValidator
39
42
  attr_reader :datatype
40
43
  attr_reader :allowable_values
@@ -66,7 +69,8 @@ module HatchetSdkRest
66
69
  :'auth_type' => :'authType',
67
70
  :'auth' => :'auth',
68
71
  :'scope_expression' => :'scopeExpression',
69
- :'static_payload' => :'staticPayload'
72
+ :'static_payload' => :'staticPayload',
73
+ :'return_event_as_response_payload' => :'returnEventAsResponsePayload'
70
74
  }
71
75
  end
72
76
 
@@ -89,7 +93,8 @@ module HatchetSdkRest
89
93
  :'auth_type' => :'String',
90
94
  :'auth' => :'V1WebhookBasicAuth',
91
95
  :'scope_expression' => :'String',
92
- :'static_payload' => :'Object'
96
+ :'static_payload' => :'Object',
97
+ :'return_event_as_response_payload' => :'Boolean'
93
98
  }
94
99
  end
95
100
 
@@ -159,6 +164,10 @@ module HatchetSdkRest
159
164
  if attributes.key?(:'static_payload')
160
165
  self.static_payload = attributes[:'static_payload']
161
166
  end
167
+
168
+ if attributes.key?(:'return_event_as_response_payload')
169
+ self.return_event_as_response_payload = attributes[:'return_event_as_response_payload']
170
+ end
162
171
  end
163
172
 
164
173
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -264,7 +273,8 @@ module HatchetSdkRest
264
273
  auth_type == o.auth_type &&
265
274
  auth == o.auth &&
266
275
  scope_expression == o.scope_expression &&
267
- static_payload == o.static_payload
276
+ static_payload == o.static_payload &&
277
+ return_event_as_response_payload == o.return_event_as_response_payload
268
278
  end
269
279
 
270
280
  # @see the `==` method
@@ -276,7 +286,7 @@ module HatchetSdkRest
276
286
  # Calculates hash code according to all attributes.
277
287
  # @return [Integer] Hash code
278
288
  def hash
279
- [source_name, name, event_key_expression, auth_type, auth, scope_expression, static_payload].hash
289
+ [source_name, name, event_key_expression, auth_type, auth, scope_expression, static_payload, return_event_as_response_payload].hash
280
290
  end
281
291
 
282
292
  # Builds the object from hash
@@ -35,6 +35,9 @@ module HatchetSdkRest
35
35
  # The static payload to use for the webhook. This is used to send a static payload with the webhook.
36
36
  attr_accessor :static_payload
37
37
 
38
+ # Whether to return the triggered event as the response payload when this webhook is triggered
39
+ attr_accessor :return_event_as_response_payload
40
+
38
41
  class EnumAttributeValidator
39
42
  attr_reader :datatype
40
43
  attr_reader :allowable_values
@@ -66,7 +69,8 @@ module HatchetSdkRest
66
69
  :'auth_type' => :'authType',
67
70
  :'auth' => :'auth',
68
71
  :'scope_expression' => :'scopeExpression',
69
- :'static_payload' => :'staticPayload'
72
+ :'static_payload' => :'staticPayload',
73
+ :'return_event_as_response_payload' => :'returnEventAsResponsePayload'
70
74
  }
71
75
  end
72
76
 
@@ -89,7 +93,8 @@ module HatchetSdkRest
89
93
  :'auth_type' => :'String',
90
94
  :'auth' => :'V1WebhookHMACAuth',
91
95
  :'scope_expression' => :'String',
92
- :'static_payload' => :'Object'
96
+ :'static_payload' => :'Object',
97
+ :'return_event_as_response_payload' => :'Boolean'
93
98
  }
94
99
  end
95
100
 
@@ -159,6 +164,10 @@ module HatchetSdkRest
159
164
  if attributes.key?(:'static_payload')
160
165
  self.static_payload = attributes[:'static_payload']
161
166
  end
167
+
168
+ if attributes.key?(:'return_event_as_response_payload')
169
+ self.return_event_as_response_payload = attributes[:'return_event_as_response_payload']
170
+ end
162
171
  end
163
172
 
164
173
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -264,7 +273,8 @@ module HatchetSdkRest
264
273
  auth_type == o.auth_type &&
265
274
  auth == o.auth &&
266
275
  scope_expression == o.scope_expression &&
267
- static_payload == o.static_payload
276
+ static_payload == o.static_payload &&
277
+ return_event_as_response_payload == o.return_event_as_response_payload
268
278
  end
269
279
 
270
280
  # @see the `==` method
@@ -276,7 +286,7 @@ module HatchetSdkRest
276
286
  # Calculates hash code according to all attributes.
277
287
  # @return [Integer] Hash code
278
288
  def hash
279
- [source_name, name, event_key_expression, auth_type, auth, scope_expression, static_payload].hash
289
+ [source_name, name, event_key_expression, auth_type, auth, scope_expression, static_payload, return_event_as_response_payload].hash
280
290
  end
281
291
 
282
292
  # Builds the object from hash