revox 0.2.0 → 0.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/README.md +38 -38
- data/lib/revox/client.rb +8 -0
- data/lib/revox/internal/type/base_model.rb +3 -3
- data/lib/revox/models/assistant_clone_params.rb +20 -0
- data/lib/revox/models/assistant_clone_response.rb +1616 -0
- data/lib/revox/models/assistant_create_params.rb +90 -66
- data/lib/revox/models/assistant_create_response.rb +87 -65
- data/lib/revox/models/assistant_list_response.rb +87 -65
- data/lib/revox/models/assistant_retrieve_response.rb +86 -65
- data/lib/revox/models/assistant_update_params.rb +90 -66
- data/lib/revox/models/assistant_update_response.rb +87 -65
- data/lib/revox/models/auth_status_retrieve_params.rb +14 -0
- data/lib/revox/models/auth_status_retrieve_response.rb +17 -0
- data/lib/revox/models/call_cancel_params.rb +20 -0
- data/lib/revox/models/call_cancel_response.rb +16 -0
- data/lib/revox/models/call_create_params.rb +117 -90
- data/lib/revox/models/call_create_response.rb +680 -90
- data/lib/revox/models/call_export_params.rb +203 -0
- data/lib/revox/models/call_export_response.rb +22 -0
- data/lib/revox/models/call_pause_params.rb +20 -0
- data/lib/revox/models/call_pause_response.rb +16 -0
- data/lib/revox/models/call_phone_history_params.rb +14 -0
- data/lib/revox/models/call_phone_history_response.rb +95 -0
- data/lib/revox/models/call_resume_params.rb +20 -0
- data/lib/revox/models/call_resume_response.rb +16 -0
- data/lib/revox/models/call_retrieve_response.rb +681 -90
- data/lib/revox/models/call_search_params.rb +169 -0
- data/lib/revox/models/call_search_response.rb +3694 -0
- data/lib/revox/models/campaign_create_params.rb +7 -57
- data/lib/revox/models/campaign_create_response.rb +108 -119
- data/lib/revox/models/campaign_get_rows_response.rb +682 -90
- data/lib/revox/models/campaign_list_response.rb +108 -119
- data/lib/revox/models/campaign_pause_params.rb +20 -0
- data/lib/revox/models/campaign_pause_response.rb +16 -0
- data/lib/revox/models/campaign_resume_params.rb +20 -0
- data/lib/revox/models/campaign_resume_response.rb +16 -0
- data/lib/revox/models/campaign_retrieve_response.rb +108 -119
- data/lib/revox/models/campaign_statistics_params.rb +20 -0
- data/lib/revox/models/campaign_statistics_response.rb +514 -0
- data/lib/revox/models/campaign_update_params.rb +165 -0
- data/lib/revox/models/campaign_update_response.rb +2019 -0
- data/lib/revox/models/phone_number_delete_params.rb +20 -0
- data/lib/revox/models/phone_number_delete_response.rb +16 -0
- data/lib/revox/models/phone_number_list_params.rb +14 -0
- data/lib/revox/models/phone_number_list_response.rb +1799 -0
- data/lib/revox/models/phone_number_update_params.rb +32 -0
- data/lib/revox/models/phone_number_update_response.rb +1799 -0
- data/lib/revox/models/user_retrieve_params.rb +14 -0
- data/lib/revox/models/user_retrieve_response.rb +99 -0
- data/lib/revox/models/voice_clone_params.rb +78 -0
- data/lib/revox/models/voice_clone_response.rb +40 -0
- data/lib/revox/models/voice_delete_params.rb +20 -0
- data/lib/revox/models/voice_delete_response.rb +16 -0
- data/lib/revox/models/voice_list_response.rb +1 -0
- data/lib/revox/models/voice_preview_params.rb +1 -0
- data/lib/revox/models/voice_retrieve_params.rb +1 -0
- data/lib/revox/models.rb +35 -1
- data/lib/revox/resources/assistants.rb +31 -10
- data/lib/revox/resources/auth_status.rb +32 -0
- data/lib/revox/resources/call.rb +149 -4
- data/lib/revox/resources/campaigns.rb +110 -11
- data/lib/revox/resources/phone_numbers.rb +74 -0
- data/lib/revox/resources/users.rb +17 -3
- data/lib/revox/resources/voices.rb +50 -0
- data/lib/revox/version.rb +1 -1
- data/lib/revox.rb +38 -5
- data/rbi/revox/client.rbi +6 -0
- data/rbi/revox/models/assistant_clone_params.rbi +33 -0
- data/rbi/revox/models/assistant_clone_response.rbi +3351 -0
- data/rbi/revox/models/assistant_create_params.rbi +148 -162
- data/rbi/revox/models/assistant_create_response.rbi +157 -147
- data/rbi/revox/models/assistant_list_response.rbi +157 -147
- data/rbi/revox/models/assistant_retrieve_response.rbi +153 -147
- data/rbi/revox/models/assistant_update_params.rbi +148 -162
- data/rbi/revox/models/assistant_update_response.rbi +157 -147
- data/rbi/revox/models/auth_status_retrieve_params.rbi +27 -0
- data/rbi/revox/models/auth_status_retrieve_response.rbi +30 -0
- data/rbi/revox/models/call_cancel_params.rbi +33 -0
- data/rbi/revox/models/call_cancel_response.rbi +23 -0
- data/rbi/revox/models/call_create_params.rbi +190 -187
- data/rbi/revox/models/call_create_response.rbi +1150 -227
- data/rbi/revox/models/call_export_params.rbi +446 -0
- data/rbi/revox/models/call_export_response.rbi +26 -0
- data/rbi/revox/models/call_pause_params.rbi +31 -0
- data/rbi/revox/models/call_pause_response.rbi +23 -0
- data/rbi/revox/models/call_phone_history_params.rbi +27 -0
- data/rbi/revox/models/call_phone_history_response.rbi +209 -0
- data/rbi/revox/models/call_resume_params.rbi +33 -0
- data/rbi/revox/models/call_resume_response.rbi +23 -0
- data/rbi/revox/models/call_retrieve_response.rbi +1150 -227
- data/rbi/revox/models/call_search_params.rbi +281 -0
- data/rbi/revox/models/call_search_response.rbi +7504 -0
- data/rbi/revox/models/campaign_create_params.rbi +9 -87
- data/rbi/revox/models/campaign_create_response.rbi +188 -266
- data/rbi/revox/models/campaign_get_rows_response.rbi +1150 -225
- data/rbi/revox/models/campaign_list_response.rbi +188 -262
- data/rbi/revox/models/campaign_pause_params.rbi +33 -0
- data/rbi/revox/models/campaign_pause_response.rbi +23 -0
- data/rbi/revox/models/campaign_resume_params.rbi +33 -0
- data/rbi/revox/models/campaign_resume_response.rbi +23 -0
- data/rbi/revox/models/campaign_retrieve_response.rbi +188 -266
- data/rbi/revox/models/campaign_statistics_params.rbi +33 -0
- data/rbi/revox/models/campaign_statistics_response.rbi +1069 -0
- data/rbi/revox/models/campaign_update_params.rbi +313 -0
- data/rbi/revox/models/campaign_update_response.rbi +4092 -0
- data/rbi/revox/models/phone_number_delete_params.rbi +33 -0
- data/rbi/revox/models/phone_number_delete_response.rbi +26 -0
- data/rbi/revox/models/phone_number_list_params.rbi +27 -0
- data/rbi/revox/models/phone_number_list_response.rbi +3690 -0
- data/rbi/revox/models/phone_number_update_params.rbi +53 -0
- data/rbi/revox/models/phone_number_update_response.rbi +3693 -0
- data/rbi/revox/models/user_retrieve_params.rbi +27 -0
- data/rbi/revox/models/user_retrieve_response.rbi +140 -0
- data/rbi/revox/models/voice_clone_params.rbi +141 -0
- data/rbi/revox/models/voice_clone_response.rbi +53 -0
- data/rbi/revox/models/voice_delete_params.rbi +33 -0
- data/rbi/revox/models/voice_delete_response.rbi +23 -0
- data/rbi/revox/models/voice_list_response.rbi +5 -0
- data/rbi/revox/models/voice_preview_params.rbi +2 -0
- data/rbi/revox/models/voice_retrieve_params.rbi +2 -0
- data/rbi/revox/models.rbi +35 -1
- data/rbi/revox/resources/assistants.rbi +52 -22
- data/rbi/revox/resources/auth_status.rbi +21 -0
- data/rbi/revox/resources/call.rbi +114 -4
- data/rbi/revox/resources/campaigns.rbi +77 -15
- data/rbi/revox/resources/phone_numbers.rbi +43 -0
- data/rbi/revox/resources/users.rbi +8 -2
- data/rbi/revox/resources/voices.rbi +39 -0
- data/sig/revox/client.rbs +4 -0
- data/sig/revox/models/assistant_clone_params.rbs +20 -0
- data/sig/revox/models/assistant_clone_response.rbs +1310 -0
- data/sig/revox/models/assistant_create_params.rbs +39 -58
- data/sig/revox/models/assistant_create_response.rbs +46 -54
- data/sig/revox/models/assistant_list_response.rbs +46 -54
- data/sig/revox/models/assistant_retrieve_response.rbs +46 -54
- data/sig/revox/models/assistant_update_params.rbs +39 -58
- data/sig/revox/models/assistant_update_response.rbs +46 -54
- data/sig/revox/models/auth_status_retrieve_params.rbs +15 -0
- data/sig/revox/models/auth_status_retrieve_response.rbs +13 -0
- data/sig/revox/models/call_cancel_params.rbs +20 -0
- data/sig/revox/models/call_cancel_response.rbs +13 -0
- data/sig/revox/models/call_create_params.rbs +50 -71
- data/sig/revox/models/call_create_response.rbs +473 -77
- data/sig/revox/models/call_export_params.rbs +230 -0
- data/sig/revox/models/call_export_response.rbs +15 -0
- data/sig/revox/models/call_pause_params.rbs +20 -0
- data/sig/revox/models/call_pause_response.rbs +13 -0
- data/sig/revox/models/call_phone_history_params.rbs +15 -0
- data/sig/revox/models/call_phone_history_response.rbs +93 -0
- data/sig/revox/models/call_resume_params.rbs +20 -0
- data/sig/revox/models/call_resume_response.rbs +13 -0
- data/sig/revox/models/call_retrieve_response.rbs +473 -77
- data/sig/revox/models/call_search_params.rbs +194 -0
- data/sig/revox/models/call_search_response.rbs +3045 -0
- data/sig/revox/models/campaign_create_params.rbs +5 -50
- data/sig/revox/models/campaign_create_response.rbs +62 -98
- data/sig/revox/models/campaign_get_rows_response.rbs +472 -73
- data/sig/revox/models/campaign_list_response.rbs +62 -98
- data/sig/revox/models/campaign_pause_params.rbs +20 -0
- data/sig/revox/models/campaign_pause_response.rbs +13 -0
- data/sig/revox/models/campaign_resume_params.rbs +20 -0
- data/sig/revox/models/campaign_resume_response.rbs +13 -0
- data/sig/revox/models/campaign_retrieve_response.rbs +62 -98
- data/sig/revox/models/campaign_statistics_params.rbs +20 -0
- data/sig/revox/models/campaign_statistics_response.rbs +489 -0
- data/sig/revox/models/campaign_update_params.rbs +135 -0
- data/sig/revox/models/campaign_update_response.rbs +1658 -0
- data/sig/revox/models/phone_number_delete_params.rbs +20 -0
- data/sig/revox/models/phone_number_delete_response.rbs +13 -0
- data/sig/revox/models/phone_number_list_params.rbs +15 -0
- data/sig/revox/models/phone_number_list_response.rbs +1454 -0
- data/sig/revox/models/phone_number_update_params.rbs +32 -0
- data/sig/revox/models/phone_number_update_response.rbs +1452 -0
- data/sig/revox/models/user_retrieve_params.rbs +14 -0
- data/sig/revox/models/user_retrieve_response.rbs +71 -0
- data/sig/revox/models/voice_clone_params.rbs +79 -0
- data/sig/revox/models/voice_clone_response.rbs +40 -0
- data/sig/revox/models/voice_delete_params.rbs +20 -0
- data/sig/revox/models/voice_delete_response.rbs +13 -0
- data/sig/revox/models/voice_list_response.rbs +2 -1
- data/sig/revox/models/voice_preview_params.rbs +2 -1
- data/sig/revox/models/voice_retrieve_params.rbs +2 -1
- data/sig/revox/models.rbs +35 -1
- data/sig/revox/resources/assistants.rbs +9 -4
- data/sig/revox/resources/auth_status.rbs +11 -0
- data/sig/revox/resources/call.rbs +46 -1
- data/sig/revox/resources/campaigns.rbs +24 -3
- data/sig/revox/resources/phone_numbers.rbs +23 -0
- data/sig/revox/resources/users.rbs +3 -1
- data/sig/revox/resources/voices.rbs +13 -0
- metadata +116 -17
- data/lib/revox/models/users/me_retrieve_params.rb +0 -16
- data/lib/revox/models/users/me_retrieve_response.rb +0 -101
- data/lib/revox/models/users/me_update_params.rb +0 -22
- data/lib/revox/models/users/me_update_response.rb +0 -101
- data/lib/revox/resources/users/me.rb +0 -55
- data/rbi/revox/models/users/me_retrieve_params.rbi +0 -29
- data/rbi/revox/models/users/me_retrieve_response.rbi +0 -149
- data/rbi/revox/models/users/me_update_params.rbi +0 -43
- data/rbi/revox/models/users/me_update_response.rbi +0 -149
- data/rbi/revox/resources/users/me.rbi +0 -33
- data/sig/revox/models/users/me_retrieve_params.rbs +0 -16
- data/sig/revox/models/users/me_retrieve_response.rbs +0 -75
- data/sig/revox/models/users/me_update_params.rbs +0 -28
- data/sig/revox/models/users/me_update_response.rbs +0 -75
- data/sig/revox/resources/users/me.rbs +0 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b1b4de98cd33754972b65ef99449f76c9078cde99b079302b8a7dab710f14d5e
|
|
4
|
+
data.tar.gz: d2c9bd5a34e61764f65a4152373865f0f4d408eea3c27f2e7163269bf02c559a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 377e6d49e2bd561db5e07927c6bc6ac918f79c7ec04e9a420c2c2e529cd526b66336186265ec05b52d757d2bf6330676170515892e9295f67052db114485189f
|
|
7
|
+
data.tar.gz: 57474f614ce033b82000f7cbc94555b861c9bb806c588575ca833a35b036309de28b3453b2fda6bb3e06661679ece275a6ea8aab017f146ac738c04896ff3861
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0 (2026-08-21)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.3.0...v0.4.0](https://github.com/revoxai/revox-ruby/compare/v0.3.0...v0.4.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([d4a9861](https://github.com/revoxai/revox-ruby/commit/d4a9861ba0312255adf3330b74635d5ee2c5a769))
|
|
10
|
+
* **api:** api update ([d725894](https://github.com/revoxai/revox-ruby/commit/d7258942e389e61f1bb562e0941f80bedb56e321))
|
|
11
|
+
* **api:** api update ([04ceb82](https://github.com/revoxai/revox-ruby/commit/04ceb82dd278caa1d06c6dfb885d99c5808573f8))
|
|
12
|
+
* **api:** api update ([a3b901f](https://github.com/revoxai/revox-ruby/commit/a3b901f6e40b2573a54851874d4c04a588aab6be))
|
|
13
|
+
* **api:** api update ([d72f880](https://github.com/revoxai/revox-ruby/commit/d72f88091b38259374054f908598fc15fa0ad38b))
|
|
14
|
+
* **api:** api update ([44eeb0d](https://github.com/revoxai/revox-ruby/commit/44eeb0df9e5a2dd9ded7562ef180eb0d6fa59a14))
|
|
15
|
+
* **api:** api update ([e760b05](https://github.com/revoxai/revox-ruby/commit/e760b0543518efaf6e3d12bde7f9c20ed0a5301e))
|
|
16
|
+
* **api:** api update ([1705ab1](https://github.com/revoxai/revox-ruby/commit/1705ab1e768706dc0ce9143427a18397c682fa52))
|
|
17
|
+
* **api:** api update ([eeba1ab](https://github.com/revoxai/revox-ruby/commit/eeba1abe2eac35934a3c53745b8666ad4b7807ed))
|
|
18
|
+
* **api:** api update ([9c1e6d5](https://github.com/revoxai/revox-ruby/commit/9c1e6d55985430b6ee51f0fed7138aeca80d8222))
|
|
19
|
+
* **api:** api update ([30302e0](https://github.com/revoxai/revox-ruby/commit/30302e05ae8a8b9a046a6c11021570109fd57ed5))
|
|
20
|
+
* **api:** api update ([0040c51](https://github.com/revoxai/revox-ruby/commit/0040c51ff33cf9c09d105a7caf94bbd0d3b3301f))
|
|
21
|
+
* **api:** api update ([de26330](https://github.com/revoxai/revox-ruby/commit/de26330fd53b845427c10e272b9446774f9655dc))
|
|
22
|
+
* **api:** api update ([c2cac44](https://github.com/revoxai/revox-ruby/commit/c2cac44d1de1509836a5bd9aa53ead2a125fda2f))
|
|
23
|
+
* **api:** api update ([87b5f5d](https://github.com/revoxai/revox-ruby/commit/87b5f5df3311d745e32383ef6797e40f623109d9))
|
|
24
|
+
* **api:** api update ([554ab31](https://github.com/revoxai/revox-ruby/commit/554ab312afd64805475bbceaec5b44f8c65f6fe5))
|
|
25
|
+
* **api:** api update ([ddaef2b](https://github.com/revoxai/revox-ruby/commit/ddaef2bbf4947483638b8ca82f8c156b71d76489))
|
|
26
|
+
* **api:** api update ([82c8134](https://github.com/revoxai/revox-ruby/commit/82c81348c12a478dd9b9abb33dd32e5ab87cd59f))
|
|
27
|
+
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([702ae8f](https://github.com/revoxai/revox-ruby/commit/702ae8ff3cfd4e6785d909f23b4393a83f2c3c1b))
|
|
28
|
+
|
|
29
|
+
## 0.3.0 (2026-07-17)
|
|
30
|
+
|
|
31
|
+
Full Changelog: [v0.2.0...v0.3.0](https://github.com/revoxai/revox-ruby/compare/v0.2.0...v0.3.0)
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **api:** api update ([49535bb](https://github.com/revoxai/revox-ruby/commit/49535bb8942ced9795f69014549d814277fb15ad))
|
|
36
|
+
* **api:** manual updates ([1eca36b](https://github.com/revoxai/revox-ruby/commit/1eca36baf641a9ba79b6fa6d1344e3773975ec0f))
|
|
37
|
+
* **api:** manual updates - user ([2c14fbe](https://github.com/revoxai/revox-ruby/commit/2c14fbe560a105e2d1a7f1769e67909e2123c50a))
|
|
38
|
+
|
|
3
39
|
## 0.2.0 (2026-07-15)
|
|
4
40
|
|
|
5
41
|
Full Changelog: [v0.1.0...v0.2.0](https://github.com/revoxai/revox-ruby/compare/v0.1.0...v0.2.0)
|
data/README.md
CHANGED
|
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
24
24
|
<!-- x-release-please-start-version -->
|
|
25
25
|
|
|
26
26
|
```ruby
|
|
27
|
-
gem "revox", "~> 0.
|
|
27
|
+
gem "revox", "~> 0.4.0"
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
<!-- x-release-please-end -->
|
|
@@ -41,10 +41,10 @@ revox = Revox::Client.new(
|
|
|
41
41
|
|
|
42
42
|
campaign = revox.campaigns.create(
|
|
43
43
|
assistant_id: "REPLACE_ME",
|
|
44
|
-
contacts: [{prompt_variables: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
contacts: [{prompt_variables: {
|
|
45
|
+
|
|
46
|
+
}, to_phone_number: "to_phone_number"}],
|
|
47
|
+
name: "REPLACE_ME"
|
|
48
48
|
)
|
|
49
49
|
|
|
50
50
|
puts(campaign.campaign)
|
|
@@ -58,10 +58,10 @@ When the library is unable to connect to the API, or if the API returns a non-su
|
|
|
58
58
|
begin
|
|
59
59
|
campaign = revox.campaigns.create(
|
|
60
60
|
assistant_id: "REPLACE_ME",
|
|
61
|
-
contacts: [{prompt_variables: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
contacts: [{prompt_variables: {
|
|
62
|
+
|
|
63
|
+
}, to_phone_number: "to_phone_number"}],
|
|
64
|
+
name: "REPLACE_ME"
|
|
65
65
|
)
|
|
66
66
|
rescue Revox::Errors::APIConnectionError => e
|
|
67
67
|
puts("The server could not be reached")
|
|
@@ -107,10 +107,10 @@ revox = Revox::Client.new(
|
|
|
107
107
|
# Or, configure per-request:
|
|
108
108
|
revox.campaigns.create(
|
|
109
109
|
assistant_id: "REPLACE_ME",
|
|
110
|
-
contacts: [{prompt_variables: {
|
|
111
|
-
|
|
110
|
+
contacts: [{prompt_variables: {
|
|
111
|
+
|
|
112
|
+
}, to_phone_number: "to_phone_number"}],
|
|
112
113
|
name: "REPLACE_ME",
|
|
113
|
-
type: "regular",
|
|
114
114
|
request_options: {max_retries: 5}
|
|
115
115
|
)
|
|
116
116
|
```
|
|
@@ -128,10 +128,10 @@ revox = Revox::Client.new(
|
|
|
128
128
|
# Or, configure per-request:
|
|
129
129
|
revox.campaigns.create(
|
|
130
130
|
assistant_id: "REPLACE_ME",
|
|
131
|
-
contacts: [{prompt_variables: {
|
|
132
|
-
|
|
131
|
+
contacts: [{prompt_variables: {
|
|
132
|
+
|
|
133
|
+
}, to_phone_number: "to_phone_number"}],
|
|
133
134
|
name: "REPLACE_ME",
|
|
134
|
-
type: "regular",
|
|
135
135
|
request_options: {timeout: 5}
|
|
136
136
|
)
|
|
137
137
|
```
|
|
@@ -166,10 +166,10 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
|
|
|
166
166
|
campaign =
|
|
167
167
|
revox.campaigns.create(
|
|
168
168
|
assistant_id: "REPLACE_ME",
|
|
169
|
-
contacts: [{prompt_variables: {
|
|
170
|
-
|
|
169
|
+
contacts: [{prompt_variables: {
|
|
170
|
+
|
|
171
|
+
}, to_phone_number: "to_phone_number"}],
|
|
171
172
|
name: "REPLACE_ME",
|
|
172
|
-
type: "regular",
|
|
173
173
|
request_options: {
|
|
174
174
|
extra_query: {my_query_parameter: value},
|
|
175
175
|
extra_body: {my_body_parameter: value},
|
|
@@ -219,13 +219,13 @@ revox.campaigns.create(
|
|
|
219
219
|
assistant_id: "REPLACE_ME",
|
|
220
220
|
contacts: [
|
|
221
221
|
Revox::CampaignCreateParams::Contact.new(
|
|
222
|
-
prompt_variables: {
|
|
222
|
+
prompt_variables: {
|
|
223
|
+
|
|
224
|
+
},
|
|
223
225
|
to_phone_number: "to_phone_number"
|
|
224
226
|
)
|
|
225
227
|
],
|
|
226
|
-
|
|
227
|
-
name: "REPLACE_ME",
|
|
228
|
-
type: "regular"
|
|
228
|
+
name: "REPLACE_ME"
|
|
229
229
|
)
|
|
230
230
|
```
|
|
231
231
|
|
|
@@ -235,10 +235,10 @@ Or, equivalently:
|
|
|
235
235
|
# Hashes work, but are not typesafe:
|
|
236
236
|
revox.campaigns.create(
|
|
237
237
|
assistant_id: "REPLACE_ME",
|
|
238
|
-
contacts: [{prompt_variables: {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
contacts: [{prompt_variables: {
|
|
239
|
+
|
|
240
|
+
}, to_phone_number: "to_phone_number"}],
|
|
241
|
+
name: "REPLACE_ME"
|
|
242
242
|
)
|
|
243
243
|
|
|
244
244
|
# You can also splat a full Params class:
|
|
@@ -246,13 +246,13 @@ params = Revox::CampaignCreateParams.new(
|
|
|
246
246
|
assistant_id: "REPLACE_ME",
|
|
247
247
|
contacts: [
|
|
248
248
|
Revox::CampaignCreateParams::Contact.new(
|
|
249
|
-
prompt_variables: {
|
|
249
|
+
prompt_variables: {
|
|
250
|
+
|
|
251
|
+
},
|
|
250
252
|
to_phone_number: "to_phone_number"
|
|
251
253
|
)
|
|
252
254
|
],
|
|
253
|
-
|
|
254
|
-
name: "REPLACE_ME",
|
|
255
|
-
type: "regular"
|
|
255
|
+
name: "REPLACE_ME"
|
|
256
256
|
)
|
|
257
257
|
revox.campaigns.create(**params)
|
|
258
258
|
```
|
|
@@ -262,25 +262,25 @@ revox.campaigns.create(**params)
|
|
|
262
262
|
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:
|
|
263
263
|
|
|
264
264
|
```ruby
|
|
265
|
-
# :
|
|
266
|
-
puts(Revox::
|
|
265
|
+
# :generated
|
|
266
|
+
puts(Revox::AssistantCreateParams::FirstSentenceMode::GENERATED)
|
|
267
267
|
|
|
268
|
-
# Revealed type: `T.all(Revox::
|
|
269
|
-
T.reveal_type(Revox::
|
|
268
|
+
# Revealed type: `T.all(Revox::AssistantCreateParams::FirstSentenceMode, Symbol)`
|
|
269
|
+
T.reveal_type(Revox::AssistantCreateParams::FirstSentenceMode::GENERATED)
|
|
270
270
|
```
|
|
271
271
|
|
|
272
272
|
Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
|
|
273
273
|
|
|
274
274
|
```ruby
|
|
275
275
|
# Using the enum constants preserves the tagged type information:
|
|
276
|
-
revox.
|
|
277
|
-
|
|
276
|
+
revox.assistants.create(
|
|
277
|
+
first_sentence_mode: Revox::AssistantCreateParams::FirstSentenceMode::GENERATED,
|
|
278
278
|
# …
|
|
279
279
|
)
|
|
280
280
|
|
|
281
281
|
# Literal values are also permissible:
|
|
282
|
-
revox.
|
|
283
|
-
|
|
282
|
+
revox.assistants.create(
|
|
283
|
+
first_sentence_mode: :generated,
|
|
284
284
|
# …
|
|
285
285
|
)
|
|
286
286
|
```
|
data/lib/revox/client.rb
CHANGED
|
@@ -18,9 +18,15 @@ module Revox
|
|
|
18
18
|
# @return [String]
|
|
19
19
|
attr_reader :api_key
|
|
20
20
|
|
|
21
|
+
# @return [Revox::Resources::AuthStatus]
|
|
22
|
+
attr_reader :auth_status
|
|
23
|
+
|
|
21
24
|
# @return [Revox::Resources::Campaigns]
|
|
22
25
|
attr_reader :campaigns
|
|
23
26
|
|
|
27
|
+
# @return [Revox::Resources::PhoneNumbers]
|
|
28
|
+
attr_reader :phone_numbers
|
|
29
|
+
|
|
24
30
|
# @return [Revox::Resources::Assistants]
|
|
25
31
|
attr_reader :assistants
|
|
26
32
|
|
|
@@ -94,7 +100,9 @@ module Revox
|
|
|
94
100
|
headers: headers
|
|
95
101
|
)
|
|
96
102
|
|
|
103
|
+
@auth_status = Revox::Resources::AuthStatus.new(client: self)
|
|
97
104
|
@campaigns = Revox::Resources::Campaigns.new(client: self)
|
|
105
|
+
@phone_numbers = Revox::Resources::PhoneNumbers.new(client: self)
|
|
98
106
|
@assistants = Revox::Resources::Assistants.new(client: self)
|
|
99
107
|
@call = Revox::Resources::Call.new(client: self)
|
|
100
108
|
@voices = Revox::Resources::Voices.new(client: self)
|
|
@@ -438,9 +438,9 @@ module Revox
|
|
|
438
438
|
# @return [Hash{Symbol=>Object}]
|
|
439
439
|
#
|
|
440
440
|
# @example
|
|
441
|
-
# # `
|
|
442
|
-
#
|
|
443
|
-
#
|
|
441
|
+
# # `auth_status_retrieve_response` is a `Revox::Models::AuthStatusRetrieveResponse`
|
|
442
|
+
# auth_status_retrieve_response => {
|
|
443
|
+
# authenticated: authenticated
|
|
444
444
|
# }
|
|
445
445
|
def deconstruct_keys(keys)
|
|
446
446
|
(keys || self.class.known_fields.keys)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Revox
|
|
4
|
+
module Models
|
|
5
|
+
# @see Revox::Resources::Assistants#clone_
|
|
6
|
+
class AssistantCloneParams < Revox::Internal::Type::BaseModel
|
|
7
|
+
extend Revox::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Revox::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|