revox 0.1.0 → 0.2.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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +71 -0
  3. data/README.md +39 -14
  4. data/lib/revox/client.rb +15 -1
  5. data/lib/revox/internal/transport/base_client.rb +5 -0
  6. data/lib/revox/internal/util.rb +22 -7
  7. data/lib/revox/models/assistant_create_params.rb +1038 -13
  8. data/lib/revox/models/assistant_create_response.rb +1071 -11
  9. data/lib/revox/models/assistant_list_response.rb +1070 -11
  10. data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
  11. data/lib/revox/models/assistant_update_params.rb +1038 -13
  12. data/lib/revox/models/assistant_update_response.rb +1097 -12
  13. data/lib/revox/models/call_create_params.rb +1065 -13
  14. data/lib/revox/models/call_create_response.rb +1813 -101
  15. data/lib/revox/models/call_retrieve_response.rb +1815 -101
  16. data/lib/revox/models/campaign_create_params.rb +67 -2
  17. data/lib/revox/models/campaign_create_response.rb +1314 -59
  18. data/lib/revox/models/campaign_get_rows_params.rb +1 -46
  19. data/lib/revox/models/campaign_get_rows_response.rb +1837 -129
  20. data/lib/revox/models/campaign_list_response.rb +1312 -59
  21. data/lib/revox/models/campaign_retrieve_response.rb +1312 -56
  22. data/lib/revox/models/users/me_retrieve_response.rb +13 -1
  23. data/lib/revox/models/users/me_update_response.rb +13 -1
  24. data/lib/revox/models/voice_list_response.rb +55 -1
  25. data/lib/revox/models/voice_preview_params.rb +49 -1
  26. data/lib/revox/models.rb +0 -2
  27. data/lib/revox/resources/assistants.rb +116 -8
  28. data/lib/revox/resources/call.rb +0 -29
  29. data/lib/revox/resources/campaigns.rb +12 -17
  30. data/lib/revox/resources/voices.rb +16 -10
  31. data/lib/revox/version.rb +1 -1
  32. data/lib/revox.rb +0 -2
  33. data/rbi/revox/internal/util.rbi +8 -0
  34. data/rbi/revox/models/assistant_create_params.rbi +2138 -103
  35. data/rbi/revox/models/assistant_create_response.rbi +2454 -199
  36. data/rbi/revox/models/assistant_list_response.rbi +2448 -195
  37. data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
  38. data/rbi/revox/models/assistant_update_params.rbi +2138 -103
  39. data/rbi/revox/models/assistant_update_response.rbi +2504 -198
  40. data/rbi/revox/models/call_create_params.rbi +2382 -225
  41. data/rbi/revox/models/call_create_response.rbi +4104 -384
  42. data/rbi/revox/models/call_retrieve_response.rbi +4104 -382
  43. data/rbi/revox/models/campaign_create_params.rbi +136 -0
  44. data/rbi/revox/models/campaign_create_response.rbi +2911 -231
  45. data/rbi/revox/models/campaign_get_rows_params.rbi +2 -82
  46. data/rbi/revox/models/campaign_get_rows_response.rbi +4135 -410
  47. data/rbi/revox/models/campaign_list_response.rbi +2904 -230
  48. data/rbi/revox/models/campaign_retrieve_response.rbi +2911 -231
  49. data/rbi/revox/models/users/me_retrieve_response.rbi +13 -3
  50. data/rbi/revox/models/users/me_update_response.rbi +13 -3
  51. data/rbi/revox/models/voice_list_response.rbi +105 -3
  52. data/rbi/revox/models/voice_preview_params.rbi +69 -0
  53. data/rbi/revox/models.rbi +0 -2
  54. data/rbi/revox/resources/assistants.rbi +284 -8
  55. data/rbi/revox/resources/call.rbi +0 -21
  56. data/rbi/revox/resources/campaigns.rbi +12 -19
  57. data/rbi/revox/resources/voices.rbi +17 -9
  58. data/sig/revox/internal/util.rbs +4 -0
  59. data/sig/revox/models/assistant_create_params.rbs +844 -11
  60. data/sig/revox/models/assistant_create_response.rbs +860 -3
  61. data/sig/revox/models/assistant_list_response.rbs +860 -3
  62. data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
  63. data/sig/revox/models/assistant_update_params.rbs +844 -11
  64. data/sig/revox/models/assistant_update_response.rbs +886 -6
  65. data/sig/revox/models/call_create_params.rbs +847 -13
  66. data/sig/revox/models/call_create_response.rbs +1514 -34
  67. data/sig/revox/models/call_retrieve_response.rbs +1514 -34
  68. data/sig/revox/models/campaign_create_params.rbs +54 -0
  69. data/sig/revox/models/campaign_create_response.rbs +1034 -6
  70. data/sig/revox/models/campaign_get_rows_params.rbs +2 -64
  71. data/sig/revox/models/campaign_get_rows_response.rbs +1522 -54
  72. data/sig/revox/models/campaign_list_response.rbs +1034 -6
  73. data/sig/revox/models/campaign_retrieve_response.rbs +1034 -6
  74. data/sig/revox/models/users/me_retrieve_response.rbs +8 -3
  75. data/sig/revox/models/users/me_update_response.rbs +8 -3
  76. data/sig/revox/models/voice_list_response.rbs +45 -3
  77. data/sig/revox/models/voice_preview_params.rbs +42 -1
  78. data/sig/revox/models.rbs +0 -2
  79. data/sig/revox/resources/assistants.rbs +56 -2
  80. data/sig/revox/resources/call.rbs +0 -7
  81. data/sig/revox/resources/campaigns.rbs +2 -5
  82. data/sig/revox/resources/voices.rbs +4 -0
  83. metadata +2 -8
  84. data/lib/revox/models/call_list_params.rb +0 -52
  85. data/lib/revox/models/call_list_response.rb +0 -259
  86. data/rbi/revox/models/call_list_params.rbi +0 -94
  87. data/rbi/revox/models/call_list_response.rbi +0 -563
  88. data/sig/revox/models/call_list_params.rbs +0 -63
  89. data/sig/revox/models/call_list_response.rbs +0 -226
@@ -19,12 +19,25 @@ module Revox
19
19
  # @return [Array<Revox::Models::CampaignCreateParams::Contact>]
20
20
  required :contacts, -> { Revox::Internal::Type::ArrayOf[Revox::CampaignCreateParams::Contact] }
21
21
 
22
+ # @!attribute launch
23
+ # Whether to launch the campaign immediately. Set to false to save as a draft.
24
+ #
25
+ # @return [Boolean]
26
+ required :launch, Revox::Internal::Type::Boolean
27
+
22
28
  # @!attribute name
23
29
  # The name of the campaign
24
30
  #
25
31
  # @return [String]
26
32
  required :name, String
27
33
 
34
+ # @!attribute type
35
+ # Campaign type. 'jump_in' campaigns only dial while someone is on the campaign
36
+ # page and auto-pause when unattended.
37
+ #
38
+ # @return [Symbol, Revox::Models::CampaignCreateParams::Type]
39
+ required :type, enum: -> { Revox::CampaignCreateParams::Type }
40
+
28
41
  # @!attribute call_retry_config
29
42
  # Override retry configuration for calls in this campaign. If not provided, uses
30
43
  # the assistant's retry config.
@@ -51,7 +64,7 @@ module Revox
51
64
  # @return [Time, Object, nil]
52
65
  optional :scheduled_at, union: -> { Revox::CampaignCreateParams::ScheduledAt }
53
66
 
54
- # @!method initialize(assistant_id:, contacts:, name:, call_retry_config: nil, from_phone_number: nil, max_concurrent_calls: nil, scheduled_at: nil, request_options: {})
67
+ # @!method initialize(assistant_id:, contacts:, launch:, name:, type:, call_retry_config: nil, from_phone_number: nil, max_concurrent_calls: nil, scheduled_at: nil, request_options: {})
55
68
  # Some parameter documentations has been truncated, see
56
69
  # {Revox::Models::CampaignCreateParams} for more details.
57
70
  #
@@ -59,8 +72,12 @@ module Revox
59
72
  #
60
73
  # @param contacts [Array<Revox::Models::CampaignCreateParams::Contact>] The list of contacts to call
61
74
  #
75
+ # @param launch [Boolean] Whether to launch the campaign immediately. Set to false to save as a draft.
76
+ #
62
77
  # @param name [String] The name of the campaign
63
78
  #
79
+ # @param type [Symbol, Revox::Models::CampaignCreateParams::Type] Campaign type. 'jump_in' campaigns only dial while someone is on the campaign pa
80
+ #
64
81
  # @param call_retry_config [Revox::Models::CampaignCreateParams::CallRetryConfig] Override retry configuration for calls in this campaign. If not provided, uses t
65
82
  #
66
83
  # @param from_phone_number [String] The phone number to use for outbound calls (E.164 format, e.g., +1234567890)
@@ -87,7 +104,36 @@ module Revox
87
104
  # @param to_phone_number [String]
88
105
  end
89
106
 
107
+ # Campaign type. 'jump_in' campaigns only dial while someone is on the campaign
108
+ # page and auto-pause when unattended.
109
+ module Type
110
+ extend Revox::Internal::Type::Enum
111
+
112
+ REGULAR = :regular
113
+ JUMP_IN = :jump_in
114
+
115
+ # @!method self.values
116
+ # @return [Array<Symbol>]
117
+ end
118
+
90
119
  class CallRetryConfig < Revox::Internal::Type::BaseModel
120
+ # @!attribute allowed_days
121
+ # Days of the week when calls are allowed, in the recipient's timezone. Default:
122
+ # Monday through Friday.
123
+ #
124
+ # @return [Array<Symbol, Revox::Models::CampaignCreateParams::CallRetryConfig::AllowedDay>]
125
+ required :allowed_days,
126
+ -> { Revox::Internal::Type::ArrayOf[enum: Revox::CampaignCreateParams::CallRetryConfig::AllowedDay] }
127
+
128
+ # @!attribute call_twice_in_a_row
129
+ # If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
130
+ # retry_delay_seconds) when attempt #1 didn't reach a human.
131
+ # Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
132
+ # Default: false.
133
+ #
134
+ # @return [Boolean]
135
+ required :call_twice_in_a_row, Revox::Internal::Type::Boolean
136
+
91
137
  # @!attribute calling_windows
92
138
  #
93
139
  # @return [Array<Revox::Models::CampaignCreateParams::CallRetryConfig::CallingWindow>]
@@ -108,19 +154,38 @@ module Revox
108
154
  # @return [String, nil]
109
155
  optional :timezone, String, nil?: true
110
156
 
111
- # @!method initialize(calling_windows:, max_retry_attempts:, timezone: nil)
157
+ # @!method initialize(allowed_days:, call_twice_in_a_row:, calling_windows:, max_retry_attempts:, timezone: nil)
112
158
  # Some parameter documentations has been truncated, see
113
159
  # {Revox::Models::CampaignCreateParams::CallRetryConfig} for more details.
114
160
  #
115
161
  # Override retry configuration for calls in this campaign. If not provided, uses
116
162
  # the assistant's retry config.
117
163
  #
164
+ # @param allowed_days [Array<Symbol, Revox::Models::CampaignCreateParams::CallRetryConfig::AllowedDay>] Days of the week when calls are allowed, in the recipient's timezone. Default: M
165
+ #
166
+ # @param call_twice_in_a_row [Boolean] If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping retr
167
+ #
118
168
  # @param calling_windows [Array<Revox::Models::CampaignCreateParams::CallRetryConfig::CallingWindow>]
119
169
  #
120
170
  # @param max_retry_attempts [Integer] Maximum number of call retry attempts. Default: 3.
121
171
  #
122
172
  # @param timezone [String, nil] Optional IANA timezone identifier to override the automatic timezone detection f
123
173
 
174
+ module AllowedDay
175
+ extend Revox::Internal::Type::Enum
176
+
177
+ MONDAY = :monday
178
+ TUESDAY = :tuesday
179
+ WEDNESDAY = :wednesday
180
+ THURSDAY = :thursday
181
+ FRIDAY = :friday
182
+ SATURDAY = :saturday
183
+ SUNDAY = :sunday
184
+
185
+ # @!method self.values
186
+ # @return [Array<Symbol>]
187
+ end
188
+
124
189
  class CallingWindow < Revox::Internal::Type::BaseModel
125
190
  # @!attribute calling_window_end_time
126
191
  # End time for the calling window in the recipient's timezone (or