zavudev 0.5.0 → 0.7.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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/zavudev/internal/util.rb +3 -1
  5. data/lib/zavudev/models/contact.rb +3 -153
  6. data/lib/zavudev/models/contact_channel.rb +155 -0
  7. data/lib/zavudev/models/message_send_params.rb +4 -3
  8. data/lib/zavudev/models/senders/agent/agent_flow.rb +6 -101
  9. data/lib/zavudev/models/senders/agent/agent_tool.rb +3 -53
  10. data/lib/zavudev/models/senders/agent/flow_create_params.rb +6 -100
  11. data/lib/zavudev/models/senders/agent/flow_step.rb +61 -0
  12. data/lib/zavudev/models/senders/agent/flow_trigger.rb +51 -0
  13. data/lib/zavudev/models/senders/agent/flow_update_params.rb +6 -100
  14. data/lib/zavudev/models/senders/agent/tool_create_params.rb +3 -52
  15. data/lib/zavudev/models/senders/agent/tool_parameters.rb +58 -0
  16. data/lib/zavudev/models/senders/agent/tool_update_params.rb +3 -52
  17. data/lib/zavudev/models/template.rb +33 -5
  18. data/lib/zavudev/models/template_create_params.rb +64 -2
  19. data/lib/zavudev/models.rb +2 -0
  20. data/lib/zavudev/resources/messages.rb +1 -1
  21. data/lib/zavudev/resources/senders/agent/flows.rb +4 -4
  22. data/lib/zavudev/resources/senders/agent/tools.rb +2 -2
  23. data/lib/zavudev/resources/templates.rb +14 -2
  24. data/lib/zavudev/version.rb +1 -1
  25. data/lib/zavudev.rb +4 -0
  26. data/rbi/zavudev/models/contact.rbi +4 -235
  27. data/rbi/zavudev/models/contact_channel.rbi +231 -0
  28. data/rbi/zavudev/models/message_send_params.rbi +6 -4
  29. data/rbi/zavudev/models/senders/agent/agent_flow.rbi +7 -233
  30. data/rbi/zavudev/models/senders/agent/agent_tool.rbi +4 -130
  31. data/rbi/zavudev/models/senders/agent/flow_create_params.rbi +7 -245
  32. data/rbi/zavudev/models/senders/agent/flow_step.rbi +115 -0
  33. data/rbi/zavudev/models/senders/agent/flow_trigger.rbi +108 -0
  34. data/rbi/zavudev/models/senders/agent/flow_update_params.rbi +8 -255
  35. data/rbi/zavudev/models/senders/agent/tool_create_params.rbi +4 -132
  36. data/rbi/zavudev/models/senders/agent/tool_parameters.rbi +124 -0
  37. data/rbi/zavudev/models/senders/agent/tool_update_params.rbi +4 -136
  38. data/rbi/zavudev/models/template.rbi +39 -4
  39. data/rbi/zavudev/models/template_create_params.rbi +105 -0
  40. data/rbi/zavudev/models.rbi +2 -0
  41. data/rbi/zavudev/resources/messages.rbi +3 -3
  42. data/rbi/zavudev/resources/senders/agent/flows.rbi +4 -12
  43. data/rbi/zavudev/resources/senders/agent/tools.rbi +2 -4
  44. data/rbi/zavudev/resources/templates.rbi +19 -0
  45. data/sig/zavudev/models/contact.rbs +6 -153
  46. data/sig/zavudev/models/contact_channel.rbs +150 -0
  47. data/sig/zavudev/models/senders/agent/agent_flow.rbs +8 -100
  48. data/sig/zavudev/models/senders/agent/agent_tool.rbs +4 -57
  49. data/sig/zavudev/models/senders/agent/flow_create_params.rbs +8 -100
  50. data/sig/zavudev/models/senders/agent/flow_step.rbs +55 -0
  51. data/sig/zavudev/models/senders/agent/flow_trigger.rbs +51 -0
  52. data/sig/zavudev/models/senders/agent/flow_update_params.rbs +12 -104
  53. data/sig/zavudev/models/senders/agent/tool_create_params.rbs +4 -57
  54. data/sig/zavudev/models/senders/agent/tool_parameters.rbs +60 -0
  55. data/sig/zavudev/models/senders/agent/tool_update_params.rbs +6 -59
  56. data/sig/zavudev/models/template.rbs +21 -0
  57. data/sig/zavudev/models/template_create_params.rbs +57 -0
  58. data/sig/zavudev/models.rbs +2 -0
  59. data/sig/zavudev/resources/senders/agent/flows.rbs +4 -4
  60. data/sig/zavudev/resources/senders/agent/tools.rbs +2 -2
  61. data/sig/zavudev/resources/templates.rbs +6 -0
  62. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4ef6b1c38f382a0031988389835d7a923e031d506e14fe9f760ffa0e1b653f1
4
- data.tar.gz: 461d663dc49c09fbb91bf15feaae55818f8cb5a259dc1e551d7d408781436996
3
+ metadata.gz: 43ac6fc26b0f2546d6a1e03f243a1a541e22f4406124a9a4f605719f67ad98fd
4
+ data.tar.gz: e1e8d49af140178e191f46d68215e0bd0fa93da5dca1e79f1dd060f6d0c9c32d
5
5
  SHA512:
6
- metadata.gz: 429315f63bb85c17c6e0be83a569fec22516f393ce234a6f763a4b83b099f8dc116e609dcebfd9034ea6f3034653c6a8e5d571fffcf6763ab30f68db78725d94
7
- data.tar.gz: 7325d1f541ab42cdb0d40ecfbcc71b72f111cbb88747fb85344af03f49b5126ea0c554afae9379cb0bb0950055d330058cac51755088092c69b1dfcc0eeedccd
6
+ metadata.gz: 8cf64619c332b3b5f40880dc052f6213f9a16589de0638f0f73ea60c939a134d63c67dc9eb87ae6664cde8ef83111777374a8b7384b60f3df5731eb3c6381468
7
+ data.tar.gz: ba18ebd1bc14f1d53d59ec6c88f4a32d5d9b48c5f3e8fa23199ffde1b4c3f0f3f1346ffc9fba78bf27cb61e33c0d36ab476cba2c5842dc940bb43dd63b44caba
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0 (2026-04-14)
4
+
5
+ Full Changelog: [v0.6.0...v0.7.0](https://github.com/zavudev/sdk-ruby/compare/v0.6.0...v0.7.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([41435f8](https://github.com/zavudev/sdk-ruby/commit/41435f801be39bd358e6a17231995a60d6fb3cfb))
10
+ * **api:** manual updates ([4a30350](https://github.com/zavudev/sdk-ruby/commit/4a3035046417e34cbeba758a442d99b322d5458d))
11
+
12
+ ## 0.6.0 (2026-04-12)
13
+
14
+ Full Changelog: [v0.5.0...v0.6.0](https://github.com/zavudev/sdk-ruby/compare/v0.5.0...v0.6.0)
15
+
16
+ ### Features
17
+
18
+ * **api:** api update ([e8f0d51](https://github.com/zavudev/sdk-ruby/commit/e8f0d51ff5eab8b1a35aa443188197929ce80b66))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * multipart encoding for file arrays ([b578a65](https://github.com/zavudev/sdk-ruby/commit/b578a6587fc86e324b69dd9397a719db1b4e9f5a))
24
+
3
25
  ## 0.5.0 (2026-04-03)
4
26
 
5
27
  Full Changelog: [v0.4.1...v0.5.0](https://github.com/zavudev/sdk-ruby/compare/v0.4.1...v0.5.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "zavudev", "~> 0.5.0"
29
+ gem "zavudev", "~> 0.7.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -610,6 +610,7 @@ module Zavudev
610
610
  #
611
611
  # @return [Array(String, Enumerable<String>)]
612
612
  private def encode_multipart_streaming(body)
613
+ # rubocop:disable Style/CaseEquality
613
614
  # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
614
615
  boundary = SecureRandom.urlsafe_base64(46)
615
616
 
@@ -619,7 +620,7 @@ module Zavudev
619
620
  in Hash
620
621
  body.each do |key, val|
621
622
  case val
622
- in Array if val.all? { primitive?(_1) }
623
+ in Array if val.all? { primitive?(_1) || Zavudev::Internal::Type::FileInput === _1 }
623
624
  val.each do |v|
624
625
  write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
625
626
  end
@@ -635,6 +636,7 @@ module Zavudev
635
636
 
636
637
  fused_io = fused_enum(strio) { closing.each(&:call) }
637
638
  [boundary, fused_io]
639
+ # rubocop:enable Style/CaseEquality
638
640
  end
639
641
 
640
642
  # @api private
@@ -34,8 +34,8 @@ module Zavudev
34
34
  # @!attribute channels
35
35
  # All communication channels for this contact.
36
36
  #
37
- # @return [Array<Zavudev::Models::Contact::Channel>, nil]
38
- optional :channels, -> { Zavudev::Internal::Type::ArrayOf[Zavudev::Contact::Channel] }
37
+ # @return [Array<Zavudev::Models::ContactChannel>, nil]
38
+ optional :channels, -> { Zavudev::Internal::Type::ArrayOf[Zavudev::ContactChannel] }
39
39
 
40
40
  # @!attribute country_code
41
41
  #
@@ -100,7 +100,7 @@ module Zavudev
100
100
  #
101
101
  # @param verified [Boolean] Whether this contact has been verified.
102
102
  #
103
- # @param channels [Array<Zavudev::Models::Contact::Channel>] All communication channels for this contact.
103
+ # @param channels [Array<Zavudev::Models::ContactChannel>] All communication channels for this contact.
104
104
  #
105
105
  # @param country_code [String]
106
106
  #
@@ -120,156 +120,6 @@ module Zavudev
120
120
  #
121
121
  # @param updated_at [Time]
122
122
 
123
- class Channel < Zavudev::Internal::Type::BaseModel
124
- # @!attribute id
125
- #
126
- # @return [String]
127
- required :id, String
128
-
129
- # @!attribute channel
130
- # Channel type.
131
- #
132
- # @return [Symbol, Zavudev::Models::Contact::Channel::Channel]
133
- required :channel, enum: -> { Zavudev::Contact::Channel::Channel }
134
-
135
- # @!attribute created_at
136
- #
137
- # @return [Time]
138
- required :created_at, Time, api_name: :createdAt
139
-
140
- # @!attribute identifier
141
- # Channel identifier (phone number or email address).
142
- #
143
- # @return [String]
144
- required :identifier, String
145
-
146
- # @!attribute is_primary
147
- # Whether this is the primary channel for its type.
148
- #
149
- # @return [Boolean]
150
- required :is_primary, Zavudev::Internal::Type::Boolean, api_name: :isPrimary
151
-
152
- # @!attribute verified
153
- # Whether this channel has been verified.
154
- #
155
- # @return [Boolean]
156
- required :verified, Zavudev::Internal::Type::Boolean
157
-
158
- # @!attribute country_code
159
- # ISO country code for phone numbers.
160
- #
161
- # @return [String, nil]
162
- optional :country_code, String, api_name: :countryCode
163
-
164
- # @!attribute label
165
- # Optional label for the channel.
166
- #
167
- # @return [String, nil]
168
- optional :label, String
169
-
170
- # @!attribute last_inbound_at
171
- # Last time a message was received on this channel.
172
- #
173
- # @return [Time, nil]
174
- optional :last_inbound_at, Time, api_name: :lastInboundAt
175
-
176
- # @!attribute metadata
177
- #
178
- # @return [Hash{Symbol=>String}, nil]
179
- optional :metadata, Zavudev::Internal::Type::HashOf[String]
180
-
181
- # @!attribute metrics
182
- # Delivery metrics for this channel.
183
- #
184
- # @return [Zavudev::Models::Contact::Channel::Metrics, nil]
185
- optional :metrics, -> { Zavudev::Contact::Channel::Metrics }
186
-
187
- # @!attribute updated_at
188
- #
189
- # @return [Time, nil]
190
- optional :updated_at, Time, api_name: :updatedAt
191
-
192
- # @!method initialize(id:, channel:, created_at:, identifier:, is_primary:, verified:, country_code: nil, label: nil, last_inbound_at: nil, metadata: nil, metrics: nil, updated_at: nil)
193
- # A communication channel for a contact.
194
- #
195
- # @param id [String]
196
- #
197
- # @param channel [Symbol, Zavudev::Models::Contact::Channel::Channel] Channel type.
198
- #
199
- # @param created_at [Time]
200
- #
201
- # @param identifier [String] Channel identifier (phone number or email address).
202
- #
203
- # @param is_primary [Boolean] Whether this is the primary channel for its type.
204
- #
205
- # @param verified [Boolean] Whether this channel has been verified.
206
- #
207
- # @param country_code [String] ISO country code for phone numbers.
208
- #
209
- # @param label [String] Optional label for the channel.
210
- #
211
- # @param last_inbound_at [Time] Last time a message was received on this channel.
212
- #
213
- # @param metadata [Hash{Symbol=>String}]
214
- #
215
- # @param metrics [Zavudev::Models::Contact::Channel::Metrics] Delivery metrics for this channel.
216
- #
217
- # @param updated_at [Time]
218
-
219
- # Channel type.
220
- #
221
- # @see Zavudev::Models::Contact::Channel#channel
222
- module Channel
223
- extend Zavudev::Internal::Type::Enum
224
-
225
- SMS = :sms
226
- WHATSAPP = :whatsapp
227
- EMAIL = :email
228
- TELEGRAM = :telegram
229
- VOICE = :voice
230
-
231
- # @!method self.values
232
- # @return [Array<Symbol>]
233
- end
234
-
235
- # @see Zavudev::Models::Contact::Channel#metrics
236
- class Metrics < Zavudev::Internal::Type::BaseModel
237
- # @!attribute avg_delivery_time_ms
238
- #
239
- # @return [Float, nil]
240
- optional :avg_delivery_time_ms, Float, api_name: :avgDeliveryTimeMs
241
-
242
- # @!attribute failure_count
243
- #
244
- # @return [Integer, nil]
245
- optional :failure_count, Integer, api_name: :failureCount
246
-
247
- # @!attribute last_success_at
248
- #
249
- # @return [Time, nil]
250
- optional :last_success_at, Time, api_name: :lastSuccessAt
251
-
252
- # @!attribute success_count
253
- #
254
- # @return [Integer, nil]
255
- optional :success_count, Integer, api_name: :successCount
256
-
257
- # @!attribute total_attempts
258
- #
259
- # @return [Integer, nil]
260
- optional :total_attempts, Integer, api_name: :totalAttempts
261
-
262
- # @!method initialize(avg_delivery_time_ms: nil, failure_count: nil, last_success_at: nil, success_count: nil, total_attempts: nil)
263
- # Delivery metrics for this channel.
264
- #
265
- # @param avg_delivery_time_ms [Float]
266
- # @param failure_count [Integer]
267
- # @param last_success_at [Time]
268
- # @param success_count [Integer]
269
- # @param total_attempts [Integer]
270
- end
271
- end
272
-
273
123
  # Preferred channel for this contact.
274
124
  #
275
125
  # @see Zavudev::Models::Contact#default_channel
@@ -0,0 +1,155 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ class ContactChannel < Zavudev::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ #
8
+ # @return [String]
9
+ required :id, String
10
+
11
+ # @!attribute channel
12
+ # Channel type.
13
+ #
14
+ # @return [Symbol, Zavudev::Models::ContactChannel::Channel]
15
+ required :channel, enum: -> { Zavudev::ContactChannel::Channel }
16
+
17
+ # @!attribute created_at
18
+ #
19
+ # @return [Time]
20
+ required :created_at, Time, api_name: :createdAt
21
+
22
+ # @!attribute identifier
23
+ # Channel identifier (phone number or email address).
24
+ #
25
+ # @return [String]
26
+ required :identifier, String
27
+
28
+ # @!attribute is_primary
29
+ # Whether this is the primary channel for its type.
30
+ #
31
+ # @return [Boolean]
32
+ required :is_primary, Zavudev::Internal::Type::Boolean, api_name: :isPrimary
33
+
34
+ # @!attribute verified
35
+ # Whether this channel has been verified.
36
+ #
37
+ # @return [Boolean]
38
+ required :verified, Zavudev::Internal::Type::Boolean
39
+
40
+ # @!attribute country_code
41
+ # ISO country code for phone numbers.
42
+ #
43
+ # @return [String, nil]
44
+ optional :country_code, String, api_name: :countryCode
45
+
46
+ # @!attribute label
47
+ # Optional label for the channel.
48
+ #
49
+ # @return [String, nil]
50
+ optional :label, String
51
+
52
+ # @!attribute last_inbound_at
53
+ # Last time a message was received on this channel.
54
+ #
55
+ # @return [Time, nil]
56
+ optional :last_inbound_at, Time, api_name: :lastInboundAt
57
+
58
+ # @!attribute metadata
59
+ #
60
+ # @return [Hash{Symbol=>String}, nil]
61
+ optional :metadata, Zavudev::Internal::Type::HashOf[String]
62
+
63
+ # @!attribute metrics
64
+ # Delivery metrics for this channel.
65
+ #
66
+ # @return [Zavudev::Models::ContactChannel::Metrics, nil]
67
+ optional :metrics, -> { Zavudev::ContactChannel::Metrics }
68
+
69
+ # @!attribute updated_at
70
+ #
71
+ # @return [Time, nil]
72
+ optional :updated_at, Time, api_name: :updatedAt
73
+
74
+ # @!method initialize(id:, channel:, created_at:, identifier:, is_primary:, verified:, country_code: nil, label: nil, last_inbound_at: nil, metadata: nil, metrics: nil, updated_at: nil)
75
+ # A communication channel for a contact.
76
+ #
77
+ # @param id [String]
78
+ #
79
+ # @param channel [Symbol, Zavudev::Models::ContactChannel::Channel] Channel type.
80
+ #
81
+ # @param created_at [Time]
82
+ #
83
+ # @param identifier [String] Channel identifier (phone number or email address).
84
+ #
85
+ # @param is_primary [Boolean] Whether this is the primary channel for its type.
86
+ #
87
+ # @param verified [Boolean] Whether this channel has been verified.
88
+ #
89
+ # @param country_code [String] ISO country code for phone numbers.
90
+ #
91
+ # @param label [String] Optional label for the channel.
92
+ #
93
+ # @param last_inbound_at [Time] Last time a message was received on this channel.
94
+ #
95
+ # @param metadata [Hash{Symbol=>String}]
96
+ #
97
+ # @param metrics [Zavudev::Models::ContactChannel::Metrics] Delivery metrics for this channel.
98
+ #
99
+ # @param updated_at [Time]
100
+
101
+ # Channel type.
102
+ #
103
+ # @see Zavudev::Models::ContactChannel#channel
104
+ module Channel
105
+ extend Zavudev::Internal::Type::Enum
106
+
107
+ SMS = :sms
108
+ WHATSAPP = :whatsapp
109
+ EMAIL = :email
110
+ TELEGRAM = :telegram
111
+ VOICE = :voice
112
+
113
+ # @!method self.values
114
+ # @return [Array<Symbol>]
115
+ end
116
+
117
+ # @see Zavudev::Models::ContactChannel#metrics
118
+ class Metrics < Zavudev::Internal::Type::BaseModel
119
+ # @!attribute avg_delivery_time_ms
120
+ #
121
+ # @return [Float, nil]
122
+ optional :avg_delivery_time_ms, Float, api_name: :avgDeliveryTimeMs
123
+
124
+ # @!attribute failure_count
125
+ #
126
+ # @return [Integer, nil]
127
+ optional :failure_count, Integer, api_name: :failureCount
128
+
129
+ # @!attribute last_success_at
130
+ #
131
+ # @return [Time, nil]
132
+ optional :last_success_at, Time, api_name: :lastSuccessAt
133
+
134
+ # @!attribute success_count
135
+ #
136
+ # @return [Integer, nil]
137
+ optional :success_count, Integer, api_name: :successCount
138
+
139
+ # @!attribute total_attempts
140
+ #
141
+ # @return [Integer, nil]
142
+ optional :total_attempts, Integer, api_name: :totalAttempts
143
+
144
+ # @!method initialize(avg_delivery_time_ms: nil, failure_count: nil, last_success_at: nil, success_count: nil, total_attempts: nil)
145
+ # Delivery metrics for this channel.
146
+ #
147
+ # @param avg_delivery_time_ms [Float]
148
+ # @param failure_count [Integer]
149
+ # @param last_success_at [Time]
150
+ # @param success_count [Integer]
151
+ # @param total_attempts [Integer]
152
+ end
153
+ end
154
+ end
155
+ end
@@ -22,8 +22,9 @@ module Zavudev
22
22
  optional :attachments, -> { Zavudev::Internal::Type::ArrayOf[Zavudev::MessageSendParams::Attachment] }
23
23
 
24
24
  # @!attribute channel
25
- # Delivery channel. Use 'auto' for intelligent routing. If omitted with non-text
26
- # messageType, WhatsApp is used. For email recipients, defaults to 'email'.
25
+ # Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is
26
+ # auto-selected based on sender capabilities and recipient type. For email
27
+ # recipients, defaults to 'email'.
27
28
  #
28
29
  # @return [Symbol, Zavudev::Models::Channel, nil]
29
30
  optional :channel, enum: -> { Zavudev::Channel }
@@ -104,7 +105,7 @@ module Zavudev
104
105
  #
105
106
  # @param attachments [Array<Zavudev::Models::MessageSendParams::Attachment>] Email attachments. Only supported when channel is 'email'. Maximum 40MB total si
106
107
  #
107
- # @param channel [Symbol, Zavudev::Models::Channel] Delivery channel. Use 'auto' for intelligent routing. If omitted with non-text m
108
+ # @param channel [Symbol, Zavudev::Models::Channel] Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is aut
108
109
  #
109
110
  # @param content [Zavudev::Models::MessageContent] Additional content for non-text message types.
110
111
  #
@@ -39,13 +39,13 @@ module Zavudev
39
39
 
40
40
  # @!attribute steps
41
41
  #
42
- # @return [Array<Zavudev::Models::Senders::Agent::AgentFlow::Step>]
43
- required :steps, -> { Zavudev::Internal::Type::ArrayOf[Zavudev::Senders::Agent::AgentFlow::Step] }
42
+ # @return [Array<Zavudev::Models::Senders::Agent::FlowStep>]
43
+ required :steps, -> { Zavudev::Internal::Type::ArrayOf[Zavudev::Senders::Agent::FlowStep] }
44
44
 
45
45
  # @!attribute trigger
46
46
  #
47
- # @return [Zavudev::Models::Senders::Agent::AgentFlow::Trigger]
48
- required :trigger, -> { Zavudev::Senders::Agent::AgentFlow::Trigger }
47
+ # @return [Zavudev::Models::Senders::Agent::FlowTrigger]
48
+ required :trigger, -> { Zavudev::Senders::Agent::FlowTrigger }
49
49
 
50
50
  # @!attribute updated_at
51
51
  #
@@ -70,108 +70,13 @@ module Zavudev
70
70
  #
71
71
  # @param priority [Integer] Priority when multiple flows match (higher = more priority).
72
72
  #
73
- # @param steps [Array<Zavudev::Models::Senders::Agent::AgentFlow::Step>]
73
+ # @param steps [Array<Zavudev::Models::Senders::Agent::FlowStep>]
74
74
  #
75
- # @param trigger [Zavudev::Models::Senders::Agent::AgentFlow::Trigger]
75
+ # @param trigger [Zavudev::Models::Senders::Agent::FlowTrigger]
76
76
  #
77
77
  # @param updated_at [Time]
78
78
  #
79
79
  # @param description [String, nil]
80
-
81
- class Step < Zavudev::Internal::Type::BaseModel
82
- # @!attribute id
83
- # Unique step identifier.
84
- #
85
- # @return [String]
86
- required :id, String
87
-
88
- # @!attribute config
89
- # Step configuration (varies by type).
90
- #
91
- # @return [Hash{Symbol=>Object}]
92
- required :config, Zavudev::Internal::Type::HashOf[Zavudev::Internal::Type::Unknown]
93
-
94
- # @!attribute type
95
- # Type of flow step.
96
- #
97
- # @return [Symbol, Zavudev::Models::Senders::Agent::AgentFlow::Step::Type]
98
- required :type, enum: -> { Zavudev::Senders::Agent::AgentFlow::Step::Type }
99
-
100
- # @!attribute next_step_id
101
- # ID of the next step to execute.
102
- #
103
- # @return [String, nil]
104
- optional :next_step_id, String, api_name: :nextStepId, nil?: true
105
-
106
- # @!method initialize(id:, config:, type:, next_step_id: nil)
107
- # @param id [String] Unique step identifier.
108
- #
109
- # @param config [Hash{Symbol=>Object}] Step configuration (varies by type).
110
- #
111
- # @param type [Symbol, Zavudev::Models::Senders::Agent::AgentFlow::Step::Type] Type of flow step.
112
- #
113
- # @param next_step_id [String, nil] ID of the next step to execute.
114
-
115
- # Type of flow step.
116
- #
117
- # @see Zavudev::Models::Senders::Agent::AgentFlow::Step#type
118
- module Type
119
- extend Zavudev::Internal::Type::Enum
120
-
121
- MESSAGE = :message
122
- COLLECT = :collect
123
- CONDITION = :condition
124
- TOOL = :tool
125
- LLM = :llm
126
- TRANSFER = :transfer
127
-
128
- # @!method self.values
129
- # @return [Array<Symbol>]
130
- end
131
- end
132
-
133
- # @see Zavudev::Models::Senders::Agent::AgentFlow#trigger
134
- class Trigger < Zavudev::Internal::Type::BaseModel
135
- # @!attribute type
136
- # Type of trigger for a flow.
137
- #
138
- # @return [Symbol, Zavudev::Models::Senders::Agent::AgentFlow::Trigger::Type]
139
- required :type, enum: -> { Zavudev::Senders::Agent::AgentFlow::Trigger::Type }
140
-
141
- # @!attribute intent
142
- # Intent that triggers the flow (for intent type).
143
- #
144
- # @return [String, nil]
145
- optional :intent, String
146
-
147
- # @!attribute keywords
148
- # Keywords that trigger the flow (for keyword type).
149
- #
150
- # @return [Array<String>, nil]
151
- optional :keywords, Zavudev::Internal::Type::ArrayOf[String]
152
-
153
- # @!method initialize(type:, intent: nil, keywords: nil)
154
- # @param type [Symbol, Zavudev::Models::Senders::Agent::AgentFlow::Trigger::Type] Type of trigger for a flow.
155
- #
156
- # @param intent [String] Intent that triggers the flow (for intent type).
157
- #
158
- # @param keywords [Array<String>] Keywords that trigger the flow (for keyword type).
159
-
160
- # Type of trigger for a flow.
161
- #
162
- # @see Zavudev::Models::Senders::Agent::AgentFlow::Trigger#type
163
- module Type
164
- extend Zavudev::Internal::Type::Enum
165
-
166
- KEYWORD = :keyword
167
- INTENT = :intent
168
- ALWAYS = :always
169
- MANUAL = :manual
170
-
171
- # @!method self.values
172
- # @return [Array<Symbol>]
173
- end
174
- end
175
80
  end
176
81
  end
177
82
 
@@ -39,8 +39,8 @@ module Zavudev
39
39
 
40
40
  # @!attribute parameters
41
41
  #
42
- # @return [Zavudev::Models::Senders::Agent::AgentTool::Parameters]
43
- required :parameters, -> { Zavudev::Senders::Agent::AgentTool::Parameters }
42
+ # @return [Zavudev::Models::Senders::Agent::ToolParameters]
43
+ required :parameters, -> { Zavudev::Senders::Agent::ToolParameters }
44
44
 
45
45
  # @!attribute updated_at
46
46
  #
@@ -66,61 +66,11 @@ module Zavudev
66
66
  #
67
67
  # @param name [String]
68
68
  #
69
- # @param parameters [Zavudev::Models::Senders::Agent::AgentTool::Parameters]
69
+ # @param parameters [Zavudev::Models::Senders::Agent::ToolParameters]
70
70
  #
71
71
  # @param updated_at [Time]
72
72
  #
73
73
  # @param webhook_url [String] HTTPS URL to call when the tool is executed.
74
-
75
- # @see Zavudev::Models::Senders::Agent::AgentTool#parameters
76
- class Parameters < Zavudev::Internal::Type::BaseModel
77
- # @!attribute properties
78
- #
79
- # @return [Hash{Symbol=>Zavudev::Models::Senders::Agent::AgentTool::Parameters::Property}]
80
- required :properties,
81
- -> { Zavudev::Internal::Type::HashOf[Zavudev::Senders::Agent::AgentTool::Parameters::Property] }
82
-
83
- # @!attribute required
84
- #
85
- # @return [Array<String>]
86
- required :required, Zavudev::Internal::Type::ArrayOf[String]
87
-
88
- # @!attribute type
89
- #
90
- # @return [Symbol, Zavudev::Models::Senders::Agent::AgentTool::Parameters::Type]
91
- required :type, enum: -> { Zavudev::Senders::Agent::AgentTool::Parameters::Type }
92
-
93
- # @!method initialize(properties:, required:, type:)
94
- # @param properties [Hash{Symbol=>Zavudev::Models::Senders::Agent::AgentTool::Parameters::Property}]
95
- # @param required [Array<String>]
96
- # @param type [Symbol, Zavudev::Models::Senders::Agent::AgentTool::Parameters::Type]
97
-
98
- class Property < Zavudev::Internal::Type::BaseModel
99
- # @!attribute description
100
- #
101
- # @return [String, nil]
102
- optional :description, String
103
-
104
- # @!attribute type
105
- #
106
- # @return [String, nil]
107
- optional :type, String
108
-
109
- # @!method initialize(description: nil, type: nil)
110
- # @param description [String]
111
- # @param type [String]
112
- end
113
-
114
- # @see Zavudev::Models::Senders::Agent::AgentTool::Parameters#type
115
- module Type
116
- extend Zavudev::Internal::Type::Enum
117
-
118
- OBJECT = :object
119
-
120
- # @!method self.values
121
- # @return [Array<Symbol>]
122
- end
123
- end
124
74
  end
125
75
  end
126
76