temporalio 1.8.0 → 1.10.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 (152) hide show
  1. checksums.yaml +4 -4
  2. data/Cargo.lock +268 -73
  3. data/README.md +3 -3
  4. data/Rakefile +28 -0
  5. data/ext/Cargo.toml +3 -3
  6. data/lib/temporalio/activity/info.rb +0 -3
  7. data/lib/temporalio/api/activity/v1/message.rb +2 -1
  8. data/lib/temporalio/api/callback/v1/message.rb +1 -1
  9. data/lib/temporalio/api/common/v1/message.rb +3 -1
  10. data/lib/temporalio/api/compute/v1/config.rb +1 -1
  11. data/lib/temporalio/api/enums/v1/common.rb +1 -1
  12. data/lib/temporalio/api/enums/v1/failed_cause.rb +2 -1
  13. data/lib/temporalio/api/export/v1/message.rb +4 -1
  14. data/lib/temporalio/api/history/v1/message.rb +2 -1
  15. data/lib/temporalio/api/nexus/v1/message.rb +2 -1
  16. data/lib/temporalio/api/nexusoperation/v1/message.rb +26 -0
  17. data/lib/temporalio/api/notificationservice/v1/request_response.rb +25 -0
  18. data/lib/temporalio/api/payload_visitor.rb +54 -0
  19. data/lib/temporalio/api/replication/v1/message.rb +2 -1
  20. data/lib/temporalio/api/update/v1/message.rb +2 -1
  21. data/lib/temporalio/api/worker/v1/message.rb +1 -1
  22. data/lib/temporalio/api/workflow/v1/message.rb +2 -1
  23. data/lib/temporalio/api/workflowservice/v1/request_response.rb +2 -1
  24. data/lib/temporalio/client/activity_execution.rb +1 -5
  25. data/lib/temporalio/client/activity_execution_count.rb +0 -4
  26. data/lib/temporalio/client/activity_execution_status.rb +0 -2
  27. data/lib/temporalio/client/activity_handle.rb +9 -6
  28. data/lib/temporalio/client/activity_id_reference.rb +0 -4
  29. data/lib/temporalio/client/interceptor.rb +1 -29
  30. data/lib/temporalio/client/pending_activity_state.rb +0 -2
  31. data/lib/temporalio/client/schedule.rb +8 -7
  32. data/lib/temporalio/client/with_start_workflow_operation.rb +1 -1
  33. data/lib/temporalio/client.rb +10 -20
  34. data/lib/temporalio/common_enums.rb +0 -4
  35. data/lib/temporalio/converters/external_storage.rb +90 -0
  36. data/lib/temporalio/converters/external_storage_concurrency.rb +52 -0
  37. data/lib/temporalio/converters/storage_driver.rb +56 -0
  38. data/lib/temporalio/converters/storage_driver_activity_info.rb +38 -0
  39. data/lib/temporalio/converters/storage_driver_claim.rb +30 -0
  40. data/lib/temporalio/converters/storage_driver_limiter.rb +37 -0
  41. data/lib/temporalio/converters/storage_driver_retrieve_context.rb +30 -0
  42. data/lib/temporalio/converters/storage_driver_select_context.rb +26 -0
  43. data/lib/temporalio/converters/storage_driver_store_context.rb +31 -0
  44. data/lib/temporalio/converters/storage_driver_workflow_info.rb +40 -0
  45. data/lib/temporalio/converters.rb +11 -0
  46. data/lib/temporalio/error/failure.rb +16 -2
  47. data/lib/temporalio/error.rb +17 -2
  48. data/lib/temporalio/internal/bridge/api/activity_result/activity_result.rb +2 -1
  49. data/lib/temporalio/internal/bridge/api/child_workflow/child_workflow.rb +1 -1
  50. data/lib/temporalio/internal/bridge/api/external_data/external_data.rb +1 -1
  51. data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +2 -1
  52. data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +3 -1
  53. data/lib/temporalio/internal/client/implementation.rb +6 -1
  54. data/lib/temporalio/internal/external_storage_references.rb +62 -0
  55. data/lib/temporalio/internal/worker/workflow_instance/context.rb +2 -0
  56. data/lib/temporalio/internal/worker/workflow_instance/outbound_implementation.rb +21 -3
  57. data/lib/temporalio/testing/activity_environment.rb +1 -1
  58. data/lib/temporalio/testing/workflow_environment.rb +4 -4
  59. data/lib/temporalio/version.rb +1 -1
  60. data/lib/temporalio/versioning_override.rb +28 -1
  61. data/lib/temporalio/worker/interceptor.rb +1 -0
  62. data/lib/temporalio/workflow.rb +14 -4
  63. data/rbi/temporalio/api/activity/v1/message.rbi +39 -2
  64. data/rbi/temporalio/api/callback/v1/message.rbi +22 -2
  65. data/rbi/temporalio/api/common/v1/message.rbi +294 -4
  66. data/rbi/temporalio/api/compute/v1/config.rbi +39 -5
  67. data/rbi/temporalio/api/enums/v1/common.rbi +1 -0
  68. data/rbi/temporalio/api/enums/v1/failed_cause.rbi +20 -0
  69. data/rbi/temporalio/api/export/v1/message.rbi +136 -2
  70. data/rbi/temporalio/api/history/v1/message.rbi +38 -4
  71. data/rbi/temporalio/api/nexus/v1/message.rbi +88 -0
  72. data/rbi/temporalio/api/nexusoperation/v1/message.rbi +287 -0
  73. data/rbi/temporalio/api/notificationservice/v1/request_response.rbi +151 -0
  74. data/rbi/temporalio/api/payload_visitor.rbi +21 -0
  75. data/rbi/temporalio/api/replication/v1/message.rbi +22 -2
  76. data/rbi/temporalio/api/update/v1/message.rbi +19 -2
  77. data/rbi/temporalio/api/worker/v1/message.rbi +2 -0
  78. data/rbi/temporalio/api/workflow/v1/message.rbi +41 -4
  79. data/rbi/temporalio/api/workflowservice/v1/request_response.rbi +294 -20
  80. data/rbi/temporalio/api/workflowservice/v1/service_services.rbi +0 -13
  81. data/rbi/temporalio/client/activity_execution.rbi +1 -1
  82. data/rbi/temporalio/client/interceptor.rbi +1 -1
  83. data/rbi/temporalio/client/schedule.rbi +2 -2
  84. data/rbi/temporalio/client.rbi +4 -4
  85. data/rbi/temporalio/converters/external_storage.rbi +49 -0
  86. data/rbi/temporalio/converters/external_storage_concurrency.rbi +26 -0
  87. data/rbi/temporalio/converters/storage_driver.rbi +27 -0
  88. data/rbi/temporalio/converters/storage_driver_activity_info.rbi +36 -0
  89. data/rbi/temporalio/converters/storage_driver_claim.rbi +20 -0
  90. data/rbi/temporalio/converters/storage_driver_limiter.rbi +13 -0
  91. data/rbi/temporalio/converters/storage_driver_retrieve_context.rbi +23 -0
  92. data/rbi/temporalio/converters/storage_driver_select_context.rbi +42 -0
  93. data/rbi/temporalio/converters/storage_driver_store_context.rbi +46 -0
  94. data/rbi/temporalio/converters/storage_driver_workflow_info.rbi +36 -0
  95. data/rbi/temporalio/error.rbi +17 -0
  96. data/rbi/temporalio/internal/bridge/api/activity_result/activity_result.rbi +41 -2
  97. data/rbi/temporalio/internal/bridge/api/child_workflow/child_workflow.rbi +2 -0
  98. data/rbi/temporalio/internal/bridge/api/external_data/external_data.rbi +29 -2
  99. data/rbi/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rbi +88 -14
  100. data/rbi/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rbi +91 -6
  101. data/rbi/temporalio/internal/external_storage_references.rbi +26 -0
  102. data/rbi/temporalio/internal/worker/workflow_instance/context.rbi +2 -0
  103. data/rbi/temporalio/versioning_override.rbi +8 -0
  104. data/rbi/temporalio/worker/interceptor.rbi +3 -0
  105. data/rbi/temporalio/workflow.rbi +4 -0
  106. data/sig/temporalio/api/activity/v1/message.rbs +18 -0
  107. data/sig/temporalio/api/callback/v1/message.rbs +10 -0
  108. data/sig/temporalio/api/common/v1/message.rbs +133 -4
  109. data/sig/temporalio/api/compute/v1/config.rbs +17 -1
  110. data/sig/temporalio/api/enums/v1/common.rbs +7 -4
  111. data/sig/temporalio/api/enums/v1/failed_cause.rbs +42 -5
  112. data/sig/temporalio/api/export/v1/message.rbs +50 -2
  113. data/sig/temporalio/api/history/v1/message.rbs +19 -0
  114. data/sig/temporalio/api/nexus/v1/message.rbs +37 -0
  115. data/sig/temporalio/api/nexusoperation/v1/message.rbs +125 -0
  116. data/sig/temporalio/api/notificationservice/v1/request_response.rbs +81 -0
  117. data/sig/temporalio/api/payload_visitor.rbs +7 -0
  118. data/sig/temporalio/api/replication/v1/message.rbs +11 -0
  119. data/sig/temporalio/api/update/v1/message.rbs +9 -0
  120. data/sig/temporalio/api/worker/v1/message.rbs +9 -3
  121. data/sig/temporalio/api/workflow/v1/message.rbs +19 -0
  122. data/sig/temporalio/api/workflowservice/v1/request_response.rbs +136 -0
  123. data/sig/temporalio/client/activity_execution.rbs +1 -1
  124. data/sig/temporalio/client/interceptor.rbs +2 -2
  125. data/sig/temporalio/client/schedule.rbs +3 -2
  126. data/sig/temporalio/client.rbs +2 -2
  127. data/sig/temporalio/converters/external_storage.rbs +25 -0
  128. data/sig/temporalio/converters/external_storage_concurrency.rbs +16 -0
  129. data/sig/temporalio/converters/storage_driver.rbs +16 -0
  130. data/sig/temporalio/converters/storage_driver_activity_info.rbs +17 -0
  131. data/sig/temporalio/converters/storage_driver_claim.rbs +9 -0
  132. data/sig/temporalio/converters/storage_driver_limiter.rbs +7 -0
  133. data/sig/temporalio/converters/storage_driver_retrieve_context.rbs +13 -0
  134. data/sig/temporalio/converters/storage_driver_select_context.rbs +13 -0
  135. data/sig/temporalio/converters/storage_driver_store_context.rbs +15 -0
  136. data/sig/temporalio/converters/storage_driver_target_info.rbs +5 -0
  137. data/sig/temporalio/converters/storage_driver_workflow_info.rbs +17 -0
  138. data/sig/temporalio/error/failure.rbs +8 -0
  139. data/sig/temporalio/error.rbs +4 -0
  140. data/sig/temporalio/internal/bridge/api/activity_result/activity_result.rbs +46 -0
  141. data/sig/temporalio/internal/bridge/api/child_workflow/child_workflow.rbs +7 -3
  142. data/sig/temporalio/internal/bridge/api/external_data/external_data.rbs +16 -0
  143. data/sig/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rbs +42 -2
  144. data/sig/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rbs +42 -0
  145. data/sig/temporalio/internal/external_storage_references.rbs +18 -0
  146. data/sig/temporalio/internal/worker/workflow_instance/context.rbs +1 -0
  147. data/sig/temporalio/testing/activity_environment.rbs +1 -1
  148. data/sig/temporalio/versioning_override.rbs +7 -0
  149. data/sig/temporalio/worker/interceptor.rbs +2 -0
  150. data/sig/temporalio/workflow.rbs +2 -0
  151. data/temporalio.gemspec +1 -0
  152. metadata +56 -2
@@ -61,8 +61,8 @@ class Temporalio::Api::Export::V1::WorkflowExecution
61
61
  end
62
62
  end
63
63
 
64
- # WorkflowExecutions is used by the Cloud Export feature to deserialize
65
- # the exported file. It encapsulates a collection of workflow execution information.
64
+ # WorkflowExecutions is the legacy Cloud Export file format containing only workflow executions.
65
+ # New exporters should use ExportedExecutions.
66
66
  class Temporalio::Api::Export::V1::WorkflowExecutions
67
67
  include ::Google::Protobuf::MessageExts
68
68
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -121,3 +121,137 @@ class Temporalio::Api::Export::V1::WorkflowExecutions
121
121
  def self.descriptor
122
122
  end
123
123
  end
124
+
125
+ class Temporalio::Api::Export::V1::ActivityExecution
126
+ include ::Google::Protobuf::MessageExts
127
+ extend ::Google::Protobuf::MessageExts::ClassMethods
128
+
129
+ sig do
130
+ params(
131
+ activity: T.nilable(Temporalio::Api::WorkflowService::V1::DescribeActivityExecutionResponse)
132
+ ).void
133
+ end
134
+ def initialize(
135
+ activity: nil
136
+ )
137
+ end
138
+
139
+ sig { returns(T.nilable(Temporalio::Api::WorkflowService::V1::DescribeActivityExecutionResponse)) }
140
+ def activity
141
+ end
142
+
143
+ sig { params(value: T.nilable(Temporalio::Api::WorkflowService::V1::DescribeActivityExecutionResponse)).void }
144
+ def activity=(value)
145
+ end
146
+
147
+ sig { void }
148
+ def clear_activity
149
+ end
150
+
151
+ sig { params(field: String).returns(T.untyped) }
152
+ def [](field)
153
+ end
154
+
155
+ sig { params(field: String, value: T.untyped).void }
156
+ def []=(field, value)
157
+ end
158
+
159
+ sig { returns(T::Hash[Symbol, T.untyped]) }
160
+ def to_h
161
+ end
162
+
163
+ sig { params(str: String).returns(Temporalio::Api::Export::V1::ActivityExecution) }
164
+ def self.decode(str)
165
+ end
166
+
167
+ sig { params(msg: Temporalio::Api::Export::V1::ActivityExecution).returns(String) }
168
+ def self.encode(msg)
169
+ end
170
+
171
+ sig { params(str: String, kw: T.untyped).returns(Temporalio::Api::Export::V1::ActivityExecution) }
172
+ def self.decode_json(str, **kw)
173
+ end
174
+
175
+ sig { params(msg: Temporalio::Api::Export::V1::ActivityExecution, kw: T.untyped).returns(String) }
176
+ def self.encode_json(msg, **kw)
177
+ end
178
+
179
+ sig { returns(::Google::Protobuf::Descriptor) }
180
+ def self.descriptor
181
+ end
182
+ end
183
+
184
+ # ExportedExecutions is used by the Cloud Export feature to deserialize the exported file.
185
+ # It encapsulates workflow execution information and contains other execution types.
186
+ class Temporalio::Api::Export::V1::ExportedExecutions
187
+ include ::Google::Protobuf::MessageExts
188
+ extend ::Google::Protobuf::MessageExts::ClassMethods
189
+
190
+ sig do
191
+ params(
192
+ workflows: T.nilable(T::Array[T.nilable(Temporalio::Api::Export::V1::WorkflowExecution)]),
193
+ activities: T.nilable(T::Array[T.nilable(Temporalio::Api::Export::V1::ActivityExecution)])
194
+ ).void
195
+ end
196
+ def initialize(
197
+ workflows: [],
198
+ activities: []
199
+ )
200
+ end
201
+
202
+ sig { returns(T::Array[T.nilable(Temporalio::Api::Export::V1::WorkflowExecution)]) }
203
+ def workflows
204
+ end
205
+
206
+ sig { params(value: ::Google::Protobuf::RepeatedField).void }
207
+ def workflows=(value)
208
+ end
209
+
210
+ sig { void }
211
+ def clear_workflows
212
+ end
213
+
214
+ sig { returns(T::Array[T.nilable(Temporalio::Api::Export::V1::ActivityExecution)]) }
215
+ def activities
216
+ end
217
+
218
+ sig { params(value: ::Google::Protobuf::RepeatedField).void }
219
+ def activities=(value)
220
+ end
221
+
222
+ sig { void }
223
+ def clear_activities
224
+ end
225
+
226
+ sig { params(field: String).returns(T.untyped) }
227
+ def [](field)
228
+ end
229
+
230
+ sig { params(field: String, value: T.untyped).void }
231
+ def []=(field, value)
232
+ end
233
+
234
+ sig { returns(T::Hash[Symbol, T.untyped]) }
235
+ def to_h
236
+ end
237
+
238
+ sig { params(str: String).returns(Temporalio::Api::Export::V1::ExportedExecutions) }
239
+ def self.decode(str)
240
+ end
241
+
242
+ sig { params(msg: Temporalio::Api::Export::V1::ExportedExecutions).returns(String) }
243
+ def self.encode(msg)
244
+ end
245
+
246
+ sig { params(str: String, kw: T.untyped).returns(Temporalio::Api::Export::V1::ExportedExecutions) }
247
+ def self.decode_json(str, **kw)
248
+ end
249
+
250
+ sig { params(msg: Temporalio::Api::Export::V1::ExportedExecutions, kw: T.untyped).returns(String) }
251
+ def self.encode_json(msg, **kw)
252
+ end
253
+
254
+ sig { returns(::Google::Protobuf::Descriptor) }
255
+ def self.descriptor
256
+ end
257
+ end
@@ -49,7 +49,8 @@ class Temporalio::Api::History::V1::WorkflowExecutionStartedEventAttributes
49
49
  eager_execution_accepted: T.nilable(T::Boolean),
50
50
  declined_target_version_upgrade: T.nilable(Temporalio::Api::History::V1::DeclinedTargetVersionUpgrade),
51
51
  time_skipping_config: T.nilable(Temporalio::Api::Common::V1::TimeSkippingConfig),
52
- time_skipping_state_propagation: T.nilable(Temporalio::Api::Common::V1::TimeSkippingStatePropagation)
52
+ time_skipping_state_propagation: T.nilable(Temporalio::Api::Common::V1::TimeSkippingStatePropagation),
53
+ propagated_nexus_serialization_context: T.nilable(Temporalio::Api::Nexus::V1::PropagatedSerializationContext)
53
54
  ).void
54
55
  end
55
56
  def initialize(
@@ -93,7 +94,8 @@ class Temporalio::Api::History::V1::WorkflowExecutionStartedEventAttributes
93
94
  eager_execution_accepted: false,
94
95
  declined_target_version_upgrade: nil,
95
96
  time_skipping_config: nil,
96
- time_skipping_state_propagation: nil
97
+ time_skipping_state_propagation: nil,
98
+ propagated_nexus_serialization_context: nil
97
99
  )
98
100
  end
99
101
 
@@ -970,6 +972,21 @@ class Temporalio::Api::History::V1::WorkflowExecutionStartedEventAttributes
970
972
  def clear_time_skipping_state_propagation
971
973
  end
972
974
 
975
+ # Serialization context propagated from the Nexus caller that started this workflow.
976
+ sig { returns(T.nilable(Temporalio::Api::Nexus::V1::PropagatedSerializationContext)) }
977
+ def propagated_nexus_serialization_context
978
+ end
979
+
980
+ # Serialization context propagated from the Nexus caller that started this workflow.
981
+ sig { params(value: T.nilable(Temporalio::Api::Nexus::V1::PropagatedSerializationContext)).void }
982
+ def propagated_nexus_serialization_context=(value)
983
+ end
984
+
985
+ # Serialization context propagated from the Nexus caller that started this workflow.
986
+ sig { void }
987
+ def clear_propagated_nexus_serialization_context
988
+ end
989
+
973
990
  sig { params(field: String).returns(T.untyped) }
974
991
  def [](field)
975
992
  end
@@ -3300,7 +3317,8 @@ class Temporalio::Api::History::V1::ActivityTaskFailedEventAttributes
3300
3317
  started_event_id: T.nilable(Integer),
3301
3318
  identity: T.nilable(String),
3302
3319
  retry_state: T.nilable(T.any(Symbol, String, Integer)),
3303
- worker_version: T.nilable(Temporalio::Api::Common::V1::WorkerVersionStamp)
3320
+ worker_version: T.nilable(Temporalio::Api::Common::V1::WorkerVersionStamp),
3321
+ cause: T.nilable(T.any(Symbol, String, Integer))
3304
3322
  ).void
3305
3323
  end
3306
3324
  def initialize(
@@ -3309,7 +3327,8 @@ class Temporalio::Api::History::V1::ActivityTaskFailedEventAttributes
3309
3327
  started_event_id: 0,
3310
3328
  identity: "",
3311
3329
  retry_state: :RETRY_STATE_UNSPECIFIED,
3312
- worker_version: nil
3330
+ worker_version: nil,
3331
+ cause: :ACTIVITY_TASK_FAILED_CAUSE_UNSPECIFIED
3313
3332
  )
3314
3333
  end
3315
3334
 
@@ -3403,6 +3422,21 @@ class Temporalio::Api::History::V1::ActivityTaskFailedEventAttributes
3403
3422
  def clear_worker_version
3404
3423
  end
3405
3424
 
3425
+ # Why did the task fail? When unset, the failure is treated as an unspecified activity failure.
3426
+ sig { returns(T.any(Symbol, Integer)) }
3427
+ def cause
3428
+ end
3429
+
3430
+ # Why did the task fail? When unset, the failure is treated as an unspecified activity failure.
3431
+ sig { params(value: T.any(Symbol, String, Integer)).void }
3432
+ def cause=(value)
3433
+ end
3434
+
3435
+ # Why did the task fail? When unset, the failure is treated as an unspecified activity failure.
3436
+ sig { void }
3437
+ def clear_cause
3438
+ end
3439
+
3406
3440
  sig { params(field: String).returns(T.untyped) }
3407
3441
  def [](field)
3408
3442
  end
@@ -2,6 +2,94 @@
2
2
  # source: temporal/api/nexus/v1/message.proto
3
3
  # typed: strict
4
4
 
5
+ # PropagatedSerializationContext represents the context of the Nexus caller that started this execution.
6
+ class Temporalio::Api::Nexus::V1::PropagatedSerializationContext
7
+ include ::Google::Protobuf::MessageExts
8
+ extend ::Google::Protobuf::MessageExts::ClassMethods
9
+
10
+ sig do
11
+ params(
12
+ endpoint: T.nilable(String),
13
+ service: T.nilable(String),
14
+ operation: T.nilable(String)
15
+ ).void
16
+ end
17
+ def initialize(
18
+ endpoint: "",
19
+ service: "",
20
+ operation: ""
21
+ )
22
+ end
23
+
24
+ sig { returns(String) }
25
+ def endpoint
26
+ end
27
+
28
+ sig { params(value: String).void }
29
+ def endpoint=(value)
30
+ end
31
+
32
+ sig { void }
33
+ def clear_endpoint
34
+ end
35
+
36
+ sig { returns(String) }
37
+ def service
38
+ end
39
+
40
+ sig { params(value: String).void }
41
+ def service=(value)
42
+ end
43
+
44
+ sig { void }
45
+ def clear_service
46
+ end
47
+
48
+ sig { returns(String) }
49
+ def operation
50
+ end
51
+
52
+ sig { params(value: String).void }
53
+ def operation=(value)
54
+ end
55
+
56
+ sig { void }
57
+ def clear_operation
58
+ end
59
+
60
+ sig { params(field: String).returns(T.untyped) }
61
+ def [](field)
62
+ end
63
+
64
+ sig { params(field: String, value: T.untyped).void }
65
+ def []=(field, value)
66
+ end
67
+
68
+ sig { returns(T::Hash[Symbol, T.untyped]) }
69
+ def to_h
70
+ end
71
+
72
+ sig { params(str: String).returns(Temporalio::Api::Nexus::V1::PropagatedSerializationContext) }
73
+ def self.decode(str)
74
+ end
75
+
76
+ sig { params(msg: Temporalio::Api::Nexus::V1::PropagatedSerializationContext).returns(String) }
77
+ def self.encode(msg)
78
+ end
79
+
80
+ sig { params(str: String, kw: T.untyped).returns(Temporalio::Api::Nexus::V1::PropagatedSerializationContext) }
81
+ def self.decode_json(str, **kw)
82
+ end
83
+
84
+ sig { params(msg: Temporalio::Api::Nexus::V1::PropagatedSerializationContext, kw: T.untyped).returns(String) }
85
+ def self.encode_json(msg, **kw)
86
+ end
87
+
88
+ sig { returns(::Google::Protobuf::Descriptor) }
89
+ def self.descriptor
90
+ end
91
+ end
92
+
5
93
  # A general purpose failure message.
6
94
  # See: https://github.com/nexus-rpc/api/blob/main/SPEC.md#failure
7
95
  class Temporalio::Api::Nexus::V1::Failure
@@ -0,0 +1,287 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: temporal/api/nexusoperation/v1/message.proto
3
+ # typed: strict
4
+
5
+ # CallbackInfo contains the state of a callback attached to a standalone Nexus operation.
6
+ class Temporalio::Api::NexusOperation::V1::CallbackInfo
7
+ include ::Google::Protobuf::MessageExts
8
+ extend ::Google::Protobuf::MessageExts::ClassMethods
9
+
10
+ sig do
11
+ params(
12
+ trigger: T.nilable(Temporalio::Api::NexusOperation::V1::CallbackInfo::Trigger),
13
+ info: T.nilable(Temporalio::Api::Callback::V1::CallbackInfo)
14
+ ).void
15
+ end
16
+ def initialize(
17
+ trigger: nil,
18
+ info: nil
19
+ )
20
+ end
21
+
22
+ # Trigger for this callback.
23
+ sig { returns(T.nilable(Temporalio::Api::NexusOperation::V1::CallbackInfo::Trigger)) }
24
+ def trigger
25
+ end
26
+
27
+ # Trigger for this callback.
28
+ sig { params(value: T.nilable(Temporalio::Api::NexusOperation::V1::CallbackInfo::Trigger)).void }
29
+ def trigger=(value)
30
+ end
31
+
32
+ # Trigger for this callback.
33
+ sig { void }
34
+ def clear_trigger
35
+ end
36
+
37
+ # Common callback info.
38
+ sig { returns(T.nilable(Temporalio::Api::Callback::V1::CallbackInfo)) }
39
+ def info
40
+ end
41
+
42
+ # Common callback info.
43
+ sig { params(value: T.nilable(Temporalio::Api::Callback::V1::CallbackInfo)).void }
44
+ def info=(value)
45
+ end
46
+
47
+ # Common callback info.
48
+ sig { void }
49
+ def clear_info
50
+ end
51
+
52
+ sig { params(field: String).returns(T.untyped) }
53
+ def [](field)
54
+ end
55
+
56
+ sig { params(field: String, value: T.untyped).void }
57
+ def []=(field, value)
58
+ end
59
+
60
+ sig { returns(T::Hash[Symbol, T.untyped]) }
61
+ def to_h
62
+ end
63
+
64
+ sig { params(str: String).returns(Temporalio::Api::NexusOperation::V1::CallbackInfo) }
65
+ def self.decode(str)
66
+ end
67
+
68
+ sig { params(msg: Temporalio::Api::NexusOperation::V1::CallbackInfo).returns(String) }
69
+ def self.encode(msg)
70
+ end
71
+
72
+ sig { params(str: String, kw: T.untyped).returns(Temporalio::Api::NexusOperation::V1::CallbackInfo) }
73
+ def self.decode_json(str, **kw)
74
+ end
75
+
76
+ sig { params(msg: Temporalio::Api::NexusOperation::V1::CallbackInfo, kw: T.untyped).returns(String) }
77
+ def self.encode_json(msg, **kw)
78
+ end
79
+
80
+ sig { returns(::Google::Protobuf::Descriptor) }
81
+ def self.descriptor
82
+ end
83
+ end
84
+
85
+ # When StartNexusOperationExecutionRequest uses the conflict policy NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING
86
+ # and there is already an existing, running standalone Nexus operation, OnConflictOptions defines actions to be
87
+ # taken.
88
+ class Temporalio::Api::NexusOperation::V1::OnConflictOptions
89
+ include ::Google::Protobuf::MessageExts
90
+ extend ::Google::Protobuf::MessageExts::ClassMethods
91
+
92
+ sig do
93
+ params(
94
+ attach_request_id: T.nilable(T::Boolean),
95
+ attach_completion_callbacks: T.nilable(T::Boolean),
96
+ attach_links: T.nilable(T::Boolean)
97
+ ).void
98
+ end
99
+ def initialize(
100
+ attach_request_id: false,
101
+ attach_completion_callbacks: false,
102
+ attach_links: false
103
+ )
104
+ end
105
+
106
+ # Attaches the request ID to the running operation.
107
+ sig { returns(T::Boolean) }
108
+ def attach_request_id
109
+ end
110
+
111
+ # Attaches the request ID to the running operation.
112
+ sig { params(value: T::Boolean).void }
113
+ def attach_request_id=(value)
114
+ end
115
+
116
+ # Attaches the request ID to the running operation.
117
+ sig { void }
118
+ def clear_attach_request_id
119
+ end
120
+
121
+ # Attaches the completion callbacks to the running operation.
122
+ sig { returns(T::Boolean) }
123
+ def attach_completion_callbacks
124
+ end
125
+
126
+ # Attaches the completion callbacks to the running operation.
127
+ sig { params(value: T::Boolean).void }
128
+ def attach_completion_callbacks=(value)
129
+ end
130
+
131
+ # Attaches the completion callbacks to the running operation.
132
+ sig { void }
133
+ def clear_attach_completion_callbacks
134
+ end
135
+
136
+ # Attaches any new links to the running operation.
137
+ sig { returns(T::Boolean) }
138
+ def attach_links
139
+ end
140
+
141
+ # Attaches any new links to the running operation.
142
+ sig { params(value: T::Boolean).void }
143
+ def attach_links=(value)
144
+ end
145
+
146
+ # Attaches any new links to the running operation.
147
+ sig { void }
148
+ def clear_attach_links
149
+ end
150
+
151
+ sig { params(field: String).returns(T.untyped) }
152
+ def [](field)
153
+ end
154
+
155
+ sig { params(field: String, value: T.untyped).void }
156
+ def []=(field, value)
157
+ end
158
+
159
+ sig { returns(T::Hash[Symbol, T.untyped]) }
160
+ def to_h
161
+ end
162
+
163
+ sig { params(str: String).returns(Temporalio::Api::NexusOperation::V1::OnConflictOptions) }
164
+ def self.decode(str)
165
+ end
166
+
167
+ sig { params(msg: Temporalio::Api::NexusOperation::V1::OnConflictOptions).returns(String) }
168
+ def self.encode(msg)
169
+ end
170
+
171
+ sig { params(str: String, kw: T.untyped).returns(Temporalio::Api::NexusOperation::V1::OnConflictOptions) }
172
+ def self.decode_json(str, **kw)
173
+ end
174
+
175
+ sig { params(msg: Temporalio::Api::NexusOperation::V1::OnConflictOptions, kw: T.untyped).returns(String) }
176
+ def self.encode_json(msg, **kw)
177
+ end
178
+
179
+ sig { returns(::Google::Protobuf::Descriptor) }
180
+ def self.descriptor
181
+ end
182
+ end
183
+
184
+ # Trigger for when the Nexus operation is completed, covering both success cases as
185
+ # well as any type of failure.
186
+ class Temporalio::Api::NexusOperation::V1::CallbackInfo::OperationCompleted
187
+ include ::Google::Protobuf::MessageExts
188
+ extend ::Google::Protobuf::MessageExts::ClassMethods
189
+
190
+ sig {void}
191
+ def initialize; end
192
+
193
+ sig { params(field: String).returns(T.untyped) }
194
+ def [](field)
195
+ end
196
+
197
+ sig { params(field: String, value: T.untyped).void }
198
+ def []=(field, value)
199
+ end
200
+
201
+ sig { returns(T::Hash[Symbol, T.untyped]) }
202
+ def to_h
203
+ end
204
+
205
+ sig { params(str: String).returns(Temporalio::Api::NexusOperation::V1::CallbackInfo::OperationCompleted) }
206
+ def self.decode(str)
207
+ end
208
+
209
+ sig { params(msg: Temporalio::Api::NexusOperation::V1::CallbackInfo::OperationCompleted).returns(String) }
210
+ def self.encode(msg)
211
+ end
212
+
213
+ sig { params(str: String, kw: T.untyped).returns(Temporalio::Api::NexusOperation::V1::CallbackInfo::OperationCompleted) }
214
+ def self.decode_json(str, **kw)
215
+ end
216
+
217
+ sig { params(msg: Temporalio::Api::NexusOperation::V1::CallbackInfo::OperationCompleted, kw: T.untyped).returns(String) }
218
+ def self.encode_json(msg, **kw)
219
+ end
220
+
221
+ sig { returns(::Google::Protobuf::Descriptor) }
222
+ def self.descriptor
223
+ end
224
+ end
225
+
226
+ class Temporalio::Api::NexusOperation::V1::CallbackInfo::Trigger
227
+ include ::Google::Protobuf::MessageExts
228
+ extend ::Google::Protobuf::MessageExts::ClassMethods
229
+
230
+ sig do
231
+ params(
232
+ operation_completed: T.nilable(Temporalio::Api::NexusOperation::V1::CallbackInfo::OperationCompleted)
233
+ ).void
234
+ end
235
+ def initialize(
236
+ operation_completed: nil
237
+ )
238
+ end
239
+
240
+ sig { returns(T.nilable(Temporalio::Api::NexusOperation::V1::CallbackInfo::OperationCompleted)) }
241
+ def operation_completed
242
+ end
243
+
244
+ sig { params(value: T.nilable(Temporalio::Api::NexusOperation::V1::CallbackInfo::OperationCompleted)).void }
245
+ def operation_completed=(value)
246
+ end
247
+
248
+ sig { void }
249
+ def clear_operation_completed
250
+ end
251
+
252
+ sig { returns(T.nilable(Symbol)) }
253
+ def variant
254
+ end
255
+
256
+ sig { params(field: String).returns(T.untyped) }
257
+ def [](field)
258
+ end
259
+
260
+ sig { params(field: String, value: T.untyped).void }
261
+ def []=(field, value)
262
+ end
263
+
264
+ sig { returns(T::Hash[Symbol, T.untyped]) }
265
+ def to_h
266
+ end
267
+
268
+ sig { params(str: String).returns(Temporalio::Api::NexusOperation::V1::CallbackInfo::Trigger) }
269
+ def self.decode(str)
270
+ end
271
+
272
+ sig { params(msg: Temporalio::Api::NexusOperation::V1::CallbackInfo::Trigger).returns(String) }
273
+ def self.encode(msg)
274
+ end
275
+
276
+ sig { params(str: String, kw: T.untyped).returns(Temporalio::Api::NexusOperation::V1::CallbackInfo::Trigger) }
277
+ def self.decode_json(str, **kw)
278
+ end
279
+
280
+ sig { params(msg: Temporalio::Api::NexusOperation::V1::CallbackInfo::Trigger, kw: T.untyped).returns(String) }
281
+ def self.encode_json(msg, **kw)
282
+ end
283
+
284
+ sig { returns(::Google::Protobuf::Descriptor) }
285
+ def self.descriptor
286
+ end
287
+ end