revox 0.0.2 → 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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +96 -0
  3. data/README.md +88 -22
  4. data/lib/revox/client.rb +19 -1
  5. data/lib/revox/internal/transport/base_client.rb +5 -0
  6. data/lib/revox/internal/type/base_model.rb +3 -3
  7. data/lib/revox/internal/util.rb +53 -7
  8. data/lib/revox/models/assistant_create_params.rb +1036 -11
  9. data/lib/revox/models/assistant_create_response.rb +1071 -11
  10. data/lib/revox/models/assistant_delete_params.rb +7 -1
  11. data/lib/revox/models/assistant_list_response.rb +1070 -11
  12. data/lib/revox/models/assistant_retrieve_params.rb +7 -1
  13. data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
  14. data/lib/revox/models/assistant_update_params.rb +1043 -11
  15. data/lib/revox/models/assistant_update_response.rb +1097 -12
  16. data/lib/revox/models/call_create_params.rb +1063 -11
  17. data/lib/revox/models/call_create_response.rb +2507 -87
  18. data/lib/revox/models/call_retrieve_params.rb +7 -1
  19. data/lib/revox/models/call_retrieve_response.rb +2512 -87
  20. data/lib/revox/models/campaign_cancel_params.rb +20 -0
  21. data/lib/revox/models/campaign_cancel_response.rb +16 -0
  22. data/lib/revox/models/campaign_create_params.rb +239 -0
  23. data/lib/revox/models/campaign_create_response.rb +2030 -0
  24. data/lib/revox/models/campaign_delete_params.rb +20 -0
  25. data/lib/revox/models/campaign_delete_response.rb +16 -0
  26. data/lib/revox/models/campaign_export_rows_params.rb +20 -0
  27. data/lib/revox/models/campaign_export_rows_response.rb +22 -0
  28. data/lib/revox/models/campaign_get_rows_params.rb +20 -0
  29. data/lib/revox/models/campaign_get_rows_response.rb +3176 -0
  30. data/lib/revox/models/campaign_list_params.rb +14 -0
  31. data/lib/revox/models/campaign_list_response.rb +2024 -0
  32. data/lib/revox/models/campaign_retrieve_params.rb +20 -0
  33. data/lib/revox/models/campaign_retrieve_response.rb +2032 -0
  34. data/lib/revox/models/users/me_retrieve_response.rb +13 -1
  35. data/lib/revox/models/users/me_update_response.rb +13 -1
  36. data/lib/revox/models/voice_list_response.rb +55 -1
  37. data/lib/revox/models/voice_preview_params.rb +43 -3
  38. data/lib/revox/models/voice_retrieve_params.rb +7 -1
  39. data/lib/revox/models.rb +14 -2
  40. data/lib/revox/resources/assistants.rb +138 -6
  41. data/lib/revox/resources/call.rb +10 -27
  42. data/lib/revox/resources/campaigns.rb +176 -0
  43. data/lib/revox/resources/voices.rb +17 -7
  44. data/lib/revox/version.rb +1 -1
  45. data/lib/revox.rb +15 -2
  46. data/rbi/revox/client.rbi +3 -0
  47. data/rbi/revox/internal/util.rbi +28 -0
  48. data/rbi/revox/models/assistant_create_params.rbi +2135 -102
  49. data/rbi/revox/models/assistant_create_response.rbi +2454 -199
  50. data/rbi/revox/models/assistant_delete_params.rbi +11 -5
  51. data/rbi/revox/models/assistant_list_response.rbi +2448 -195
  52. data/rbi/revox/models/assistant_retrieve_params.rbi +11 -5
  53. data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
  54. data/rbi/revox/models/assistant_update_params.rbi +2139 -100
  55. data/rbi/revox/models/assistant_update_response.rbi +2504 -198
  56. data/rbi/revox/models/call_create_params.rbi +2377 -222
  57. data/rbi/revox/models/call_create_response.rbi +5840 -594
  58. data/rbi/revox/models/call_retrieve_params.rbi +11 -5
  59. data/rbi/revox/models/call_retrieve_response.rbi +5872 -618
  60. data/rbi/revox/models/campaign_cancel_params.rbi +33 -0
  61. data/rbi/revox/models/campaign_cancel_response.rbi +23 -0
  62. data/rbi/revox/models/campaign_create_params.rbi +433 -0
  63. data/rbi/revox/models/campaign_create_response.rbi +4170 -0
  64. data/rbi/revox/models/campaign_delete_params.rbi +33 -0
  65. data/rbi/revox/models/campaign_delete_response.rbi +23 -0
  66. data/rbi/revox/models/campaign_export_rows_params.rbi +33 -0
  67. data/rbi/revox/models/campaign_export_rows_response.rbi +29 -0
  68. data/rbi/revox/models/campaign_get_rows_params.rbi +33 -0
  69. data/rbi/revox/models/campaign_get_rows_response.rbi +6706 -0
  70. data/rbi/revox/models/campaign_list_params.rbi +27 -0
  71. data/rbi/revox/models/campaign_list_response.rbi +4156 -0
  72. data/rbi/revox/models/campaign_retrieve_params.rbi +33 -0
  73. data/rbi/revox/models/campaign_retrieve_response.rbi +4175 -0
  74. data/rbi/revox/models/users/me_retrieve_response.rbi +13 -3
  75. data/rbi/revox/models/users/me_update_response.rbi +13 -3
  76. data/rbi/revox/models/voice_list_response.rbi +105 -3
  77. data/rbi/revox/models/voice_preview_params.rbi +60 -2
  78. data/rbi/revox/models/voice_retrieve_params.rbi +6 -1
  79. data/rbi/revox/models.rbi +14 -2
  80. data/rbi/revox/resources/assistants.rbi +301 -6
  81. data/rbi/revox/resources/call.rbi +10 -19
  82. data/rbi/revox/resources/campaigns.rbi +121 -0
  83. data/rbi/revox/resources/voices.rbi +15 -5
  84. data/sig/revox/client.rbs +2 -0
  85. data/sig/revox/internal/util.rbs +14 -0
  86. data/sig/revox/models/assistant_create_params.rbs +841 -4
  87. data/sig/revox/models/assistant_create_response.rbs +860 -3
  88. data/sig/revox/models/assistant_delete_params.rbs +8 -3
  89. data/sig/revox/models/assistant_list_response.rbs +860 -3
  90. data/sig/revox/models/assistant_retrieve_params.rbs +8 -3
  91. data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
  92. data/sig/revox/models/assistant_update_params.rbs +846 -4
  93. data/sig/revox/models/assistant_update_response.rbs +886 -6
  94. data/sig/revox/models/call_create_params.rbs +844 -6
  95. data/sig/revox/models/call_create_response.rbs +2166 -79
  96. data/sig/revox/models/call_retrieve_params.rbs +9 -3
  97. data/sig/revox/models/call_retrieve_response.rbs +2166 -79
  98. data/sig/revox/models/campaign_cancel_params.rbs +20 -0
  99. data/sig/revox/models/campaign_cancel_response.rbs +13 -0
  100. data/sig/revox/models/campaign_create_params.rbs +203 -0
  101. data/sig/revox/models/campaign_create_response.rbs +1694 -0
  102. data/sig/revox/models/campaign_delete_params.rbs +20 -0
  103. data/sig/revox/models/campaign_delete_response.rbs +13 -0
  104. data/sig/revox/models/campaign_export_rows_params.rbs +20 -0
  105. data/sig/revox/models/campaign_export_rows_response.rbs +15 -0
  106. data/sig/revox/models/campaign_get_rows_params.rbs +20 -0
  107. data/sig/revox/models/campaign_get_rows_response.rbs +2688 -0
  108. data/sig/revox/models/campaign_list_params.rbs +14 -0
  109. data/sig/revox/models/campaign_list_response.rbs +1694 -0
  110. data/sig/revox/models/campaign_retrieve_params.rbs +20 -0
  111. data/sig/revox/models/campaign_retrieve_response.rbs +1694 -0
  112. data/sig/revox/models/users/me_retrieve_response.rbs +8 -3
  113. data/sig/revox/models/users/me_update_response.rbs +8 -3
  114. data/sig/revox/models/voice_list_response.rbs +45 -3
  115. data/sig/revox/models/voice_preview_params.rbs +35 -1
  116. data/sig/revox/models/voice_retrieve_params.rbs +5 -1
  117. data/sig/revox/models.rbs +14 -2
  118. data/sig/revox/resources/assistants.rbs +54 -0
  119. data/sig/revox/resources/call.rbs +0 -6
  120. data/sig/revox/resources/campaigns.rbs +49 -0
  121. data/sig/revox/resources/voices.rbs +3 -0
  122. metadata +47 -8
  123. data/lib/revox/models/call_list_params.rb +0 -29
  124. data/lib/revox/models/call_list_response.rb +0 -197
  125. data/rbi/revox/models/call_list_params.rbi +0 -47
  126. data/rbi/revox/models/call_list_response.rbi +0 -401
  127. data/sig/revox/models/call_list_params.rbs +0 -28
  128. data/sig/revox/models/call_list_response.rbs +0 -171
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d1f941b71b36c901ec274276697c8dcf693173bd4d145274f796e21051e72d7
4
- data.tar.gz: ff2b649eca49ad723ef282ad3e66341d6215593e56d519425b3fc95f9bc85aaa
3
+ metadata.gz: 8049f2cfd29f2b0b6a033f073e9c827b037fef2cc88d401a346bde3a52173c08
4
+ data.tar.gz: d4af5e75bc76ba13ba56f86ba56e5f2daf96d3c77a6113988b8b02f4f322217e
5
5
  SHA512:
6
- metadata.gz: b986e4cc31e63b39c847069c46e13621161950be1f1c797ae17c90faf925059fdd2ccea38f659373bc2286555b770875a116b0e73ed6e2d1df5af0f759895965
7
- data.tar.gz: ee8f4d005dfd233c530a1463b1e5c7be1bda0e9c33622b620528b4b761171aaa8ec8c1217baae329a96a410cebfd75be88e53c4c52f0786444837f19ca742aeb
6
+ metadata.gz: c0c51795ea8733fc8abb5357d5602a497598e56791b11a648c5d3c623ca0a9d320a9535709c966a13c059d4297af3605dd5b25c118b8b11604707846649dd58f
7
+ data.tar.gz: bd43d8479786f0e3e77814fd88977b47132b0c0dca1082e4a0b1f77e53c312b18e46c1b40a4d6ef31e93d017909cde93d6827fbea020a26aa361307cb82d5741
data/CHANGELOG.md CHANGED
@@ -1,5 +1,101 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 (2026-07-15)
4
+
5
+ Full Changelog: [v0.1.0...v0.2.0](https://github.com/revoxai/revox-ruby/compare/v0.1.0...v0.2.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([8d240fd](https://github.com/revoxai/revox-ruby/commit/8d240fd35dc183da20d0247a33a0c6582b5db2db))
10
+ * **api:** api update ([9869b36](https://github.com/revoxai/revox-ruby/commit/9869b369d43989b2995febe9b198b1b604f33d8b))
11
+ * **api:** api update ([bf56a5b](https://github.com/revoxai/revox-ruby/commit/bf56a5bd81e2193a2eb43da9b946cb7a9b3603b1))
12
+ * **api:** api update ([112fcd3](https://github.com/revoxai/revox-ruby/commit/112fcd3dcf9982385791fd1168bab051745d0dd7))
13
+ * **api:** api update ([f5df56d](https://github.com/revoxai/revox-ruby/commit/f5df56da8ace157558e6947038496d43dab68af1))
14
+ * **api:** api update ([a7c53f8](https://github.com/revoxai/revox-ruby/commit/a7c53f83552e293123cbf007fb4968bbcf3d49a9))
15
+ * **api:** api update ([b513a69](https://github.com/revoxai/revox-ruby/commit/b513a69717d58eaf5c58b9bc1fb9a4d2eca40ad4))
16
+ * **api:** api update ([dddd00e](https://github.com/revoxai/revox-ruby/commit/dddd00e1b4341c123d49ea76573ae366ebc4516c))
17
+ * **api:** api update ([cde9973](https://github.com/revoxai/revox-ruby/commit/cde997321aa9ff51c1974e5cad84f1318870d235))
18
+ * **api:** api update ([5763976](https://github.com/revoxai/revox-ruby/commit/57639762cfe583bc79138ce9b023f42bf7038287))
19
+ * **api:** api update ([d666984](https://github.com/revoxai/revox-ruby/commit/d66698403b95d717d22db5f3aa7f1310f123c333))
20
+ * **api:** api update ([ca78762](https://github.com/revoxai/revox-ruby/commit/ca78762207935c2aaf2dad44836d310f744cdb40))
21
+ * **api:** api update ([cca54ce](https://github.com/revoxai/revox-ruby/commit/cca54ce1442922c21bfacc4ff0b15083c3b2d299))
22
+ * **api:** api update ([44f5157](https://github.com/revoxai/revox-ruby/commit/44f5157ef688fedba8214ae20bc0b10d38915bb7))
23
+ * **api:** api update ([ce7732a](https://github.com/revoxai/revox-ruby/commit/ce7732a68adef161474be5a89d59098522569408))
24
+ * **api:** api update ([05f0099](https://github.com/revoxai/revox-ruby/commit/05f0099da266211d30eb80ec4a3fc156d95f39d7))
25
+ * **api:** api update ([479acad](https://github.com/revoxai/revox-ruby/commit/479acad28f2524d1d3704442051fab3699a799cf))
26
+ * **api:** api update ([c56b37b](https://github.com/revoxai/revox-ruby/commit/c56b37b31501d7c2e6011df204ecacf4101b65b6))
27
+ * **api:** api update ([502e3cc](https://github.com/revoxai/revox-ruby/commit/502e3cca917fbab0044e6dabbcced3e4ba855e7e))
28
+ * **api:** api update ([3fbceb1](https://github.com/revoxai/revox-ruby/commit/3fbceb15567d3e619e3d67dcb2a2d4590476744c))
29
+ * **api:** api update ([d6283f7](https://github.com/revoxai/revox-ruby/commit/d6283f75a22b6df40ff16627973e8bb48233eb7f))
30
+ * **api:** api update ([7d52591](https://github.com/revoxai/revox-ruby/commit/7d5259112e7bf7527f85d20538e0cd5369c5f885))
31
+ * **api:** api update ([91f11fe](https://github.com/revoxai/revox-ruby/commit/91f11fea2ef847f8580f8b24595d891047ac0e02))
32
+ * **api:** api update ([6c778a4](https://github.com/revoxai/revox-ruby/commit/6c778a48d14822330ad9c068b79ba62222eb8547))
33
+ * **api:** api update ([0b8dc76](https://github.com/revoxai/revox-ruby/commit/0b8dc76c64992e49d67392a993cf3e518d449c59))
34
+ * **api:** api update ([3881854](https://github.com/revoxai/revox-ruby/commit/3881854b74cac11c732ac8770c8fedf9977aceb5))
35
+ * **api:** api update ([c160447](https://github.com/revoxai/revox-ruby/commit/c16044750e3c229cd5ff5731da1b36e7f3ce0911))
36
+ * **api:** api update ([2dd7e29](https://github.com/revoxai/revox-ruby/commit/2dd7e29c003c94e1a8fc54150ed018dee6fed4de))
37
+ * **api:** api update ([bcbccec](https://github.com/revoxai/revox-ruby/commit/bcbccecae3495b6167ea7b6a65270876b51c89e9))
38
+ * **api:** api update ([abce6d8](https://github.com/revoxai/revox-ruby/commit/abce6d8a69e93b724c4dd20c85e478c5f7a4bfc4))
39
+ * **api:** api update ([15e065f](https://github.com/revoxai/revox-ruby/commit/15e065f097f616b859c791b2d7308292be644c1e))
40
+ * **api:** api update ([90a90e5](https://github.com/revoxai/revox-ruby/commit/90a90e51673ff39e3eaa82ff1d1f34000e47ad0a))
41
+ * **api:** api update ([50bed77](https://github.com/revoxai/revox-ruby/commit/50bed77d93f041ec736e1f655bccd51acea5cf28))
42
+ * **api:** api update ([4d644b1](https://github.com/revoxai/revox-ruby/commit/4d644b1170d8fc3eaf3c612a7466badef78bb08e))
43
+ * **api:** api update ([06f4b29](https://github.com/revoxai/revox-ruby/commit/06f4b296792c0b210eb7bd3306ebbc135ae92da3))
44
+ * **api:** api update ([4aa4421](https://github.com/revoxai/revox-ruby/commit/4aa44212415460e534dda3f198087d2ce5a95827))
45
+ * **api:** api update ([0613739](https://github.com/revoxai/revox-ruby/commit/0613739387759e50815d005e58abc7f00ed85ac6))
46
+ * **api:** api update ([9869a45](https://github.com/revoxai/revox-ruby/commit/9869a4559dce66130f9929a24fb57332a89a99e4))
47
+ * **api:** api update ([1380dfb](https://github.com/revoxai/revox-ruby/commit/1380dfbc958d5f9b4ff72b3362d883c6509e7aa5))
48
+ * **api:** api update ([53ff933](https://github.com/revoxai/revox-ruby/commit/53ff9331c97f09223c69cb2de7dab148b478f36d))
49
+ * **api:** api update ([31b7dfe](https://github.com/revoxai/revox-ruby/commit/31b7dfe97b9c31e2549961ad0cc963f33976fe46))
50
+ * **api:** api update ([446753b](https://github.com/revoxai/revox-ruby/commit/446753b7dca2c432116d5d90b2e6914ae09d6a4c))
51
+ * support setting headers via env ([b4924cb](https://github.com/revoxai/revox-ruby/commit/b4924cb118f746f48dd79a6aec93e38d985f8f72))
52
+
53
+
54
+ ### Bug Fixes
55
+
56
+ * align path encoding with RFC 3986 section 3.3 ([12227d4](https://github.com/revoxai/revox-ruby/commit/12227d4d3b83941377114ff2f66ae8238a76c733))
57
+ * **client:** elide content type header on requests without body ([b066b04](https://github.com/revoxai/revox-ruby/commit/b066b049ed1abb7f0dad50b4655d869a93b0903f))
58
+ * **client:** send content-type header for requests with an omitted optional body ([d66d881](https://github.com/revoxai/revox-ruby/commit/d66d881b34056e539370711607d3cbc1a750a597))
59
+ * **internal:** correct multipart form field name encoding ([aad53d6](https://github.com/revoxai/revox-ruby/commit/aad53d61705ebb6f8787c539f5fea50591872394))
60
+ * multipart encoding for file arrays ([41edad7](https://github.com/revoxai/revox-ruby/commit/41edad7843f71bd02744d02326363a1aa766c9a7))
61
+ * variable name typo ([001a5e9](https://github.com/revoxai/revox-ruby/commit/001a5e9e03531812acaa8cff9544d85c5339b042))
62
+
63
+
64
+ ### Chores
65
+
66
+ * **ci:** skip lint on metadata-only changes ([38ff917](https://github.com/revoxai/revox-ruby/commit/38ff917c34e21ea87963b6a0e0d63e71a2a327a5))
67
+ * **ci:** support opting out of skipping builds on metadata-only commits ([bd897b8](https://github.com/revoxai/revox-ruby/commit/bd897b816c651cbc299e8936f8f722353b9d7495))
68
+ * configure new SDK language ([7966f1a](https://github.com/revoxai/revox-ruby/commit/7966f1a260dc020f620a46a11b3bc72085dd4b4f))
69
+ * **internal:** bound formatter parallelism to CPU count ([f159e56](https://github.com/revoxai/revox-ruby/commit/f159e567d712775a9f812692efd6bd51fe6874b4))
70
+ * **internal:** more robust bootstrap script ([b1b49f1](https://github.com/revoxai/revox-ruby/commit/b1b49f14eeaaa9a9fc609d651ee51c408d7d1219))
71
+ * **internal:** tweak CI branches ([cbb8d65](https://github.com/revoxai/revox-ruby/commit/cbb8d6531f3319c56ed3bd2a7411fae875815b42))
72
+ * **internal:** update gitignore ([1327cee](https://github.com/revoxai/revox-ruby/commit/1327ceea6b00fb9dc9879cc242147a2ba4bd12a1))
73
+
74
+ ## 0.1.0 (2026-03-11)
75
+
76
+ Full Changelog: [v0.0.2...v0.1.0](https://github.com/revoxai/revox-ruby/compare/v0.0.2...v0.1.0)
77
+
78
+ ### Features
79
+
80
+ * **api:** api update ([26b8dce](https://github.com/revoxai/revox-ruby/commit/26b8dce142fe60e4bb1973fa05070ac3448dbfa1))
81
+ * **api:** api update ([d14fa2f](https://github.com/revoxai/revox-ruby/commit/d14fa2f89269badb9d46dd3afa4a820bcbead622))
82
+ * **api:** manual updates ([dc9e13f](https://github.com/revoxai/revox-ruby/commit/dc9e13fb6e419133fe735d48d88e7e8474e24e2c))
83
+
84
+
85
+ ### Bug Fixes
86
+
87
+ * properly mock time in ruby ci tests ([ad9d571](https://github.com/revoxai/revox-ruby/commit/ad9d57106369993a3f96437ce0c49620c5ebe9e9))
88
+
89
+
90
+ ### Chores
91
+
92
+ * **ci:** add build step ([77847b4](https://github.com/revoxai/revox-ruby/commit/77847b4b7ee8f85a064caf68a1921cc5a5b073fa))
93
+ * **ci:** skip uploading artifacts on stainless-internal branches ([388307a](https://github.com/revoxai/revox-ruby/commit/388307a619f30dc9896e7bdfbd5dedb2c52cdf2c))
94
+ * configure new SDK language ([9f54c02](https://github.com/revoxai/revox-ruby/commit/9f54c0276bd7412aed447e23d2ccf8e58e3d5774))
95
+ * **internal:** codegen related update ([cfeb246](https://github.com/revoxai/revox-ruby/commit/cfeb24661d45158cdd9d84d3963d659634c085fd))
96
+ * **internal:** codegen related update ([2eb1fe1](https://github.com/revoxai/revox-ruby/commit/2eb1fe1363a17c960e90a734be8dd6ff772634f1))
97
+ * update SDK settings ([c60774d](https://github.com/revoxai/revox-ruby/commit/c60774d4c01b5590b11eb9f59d07c8621ac2d17c))
98
+
3
99
  ## 0.0.2 (2026-02-20)
4
100
 
5
101
  Full Changelog: [v0.0.1...v0.0.2](https://github.com/revoxai/revox-ruby/compare/v0.0.1...v0.0.2)
data/README.md CHANGED
@@ -4,6 +4,15 @@ The Revox Ruby library provides convenient access to the Revox REST API from any
4
4
 
5
5
  It is generated with [Stainless](https://www.stainless.com/).
6
6
 
7
+ ## MCP Server
8
+
9
+ Use the Revox MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
10
+
11
+ [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40revoxai%2Fsdk-mcp&config=eyJuYW1lIjoiQHJldm94YWkvc2RrLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL3Jldm94LW1jcC5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LXJldm94LWFwaS1rZXkiOiJNeSBBUEkgS2V5In19)
12
+ [![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40revoxai%2Fsdk-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Frevox-mcp.stlmcp.com%22%2C%22headers%22%3A%7B%22x-revox-api-key%22%3A%22My%20API%20Key%22%7D%7D)
13
+
14
+ > Note: You may need to set environment variables in your MCP client.
15
+
7
16
  ## Documentation
8
17
 
9
18
  Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/revox).
@@ -15,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
15
24
  <!-- x-release-please-start-version -->
16
25
 
17
26
  ```ruby
18
- gem "revox", "~> 0.0.2"
27
+ gem "revox", "~> 0.2.0"
19
28
  ```
20
29
 
21
30
  <!-- x-release-please-end -->
@@ -30,9 +39,15 @@ revox = Revox::Client.new(
30
39
  api_key: ENV["REVOX_API_KEY"] # This is the default and can be omitted
31
40
  )
32
41
 
33
- assistant = revox.assistants.create(name: "REPLACE_ME", prompt: "REPLACE_ME")
42
+ campaign = revox.campaigns.create(
43
+ assistant_id: "REPLACE_ME",
44
+ contacts: [{prompt_variables: {foo: "string"}, to_phone_number: "to_phone_number"}],
45
+ launch: true,
46
+ name: "REPLACE_ME",
47
+ type: "regular"
48
+ )
34
49
 
35
- puts(assistant.assistant)
50
+ puts(campaign.campaign)
36
51
  ```
37
52
 
38
53
  ### Handling errors
@@ -41,7 +56,13 @@ When the library is unable to connect to the API, or if the API returns a non-su
41
56
 
42
57
  ```ruby
43
58
  begin
44
- assistant = revox.assistants.create(name: "REPLACE_ME", prompt: "REPLACE_ME")
59
+ campaign = revox.campaigns.create(
60
+ assistant_id: "REPLACE_ME",
61
+ contacts: [{prompt_variables: {foo: "string"}, to_phone_number: "to_phone_number"}],
62
+ launch: true,
63
+ name: "REPLACE_ME",
64
+ type: "regular"
65
+ )
45
66
  rescue Revox::Errors::APIConnectionError => e
46
67
  puts("The server could not be reached")
47
68
  puts(e.cause) # an underlying Exception, likely raised within `net/http`
@@ -84,7 +105,14 @@ revox = Revox::Client.new(
84
105
  )
85
106
 
86
107
  # Or, configure per-request:
87
- revox.assistants.create(name: "REPLACE_ME", prompt: "REPLACE_ME", request_options: {max_retries: 5})
108
+ revox.campaigns.create(
109
+ assistant_id: "REPLACE_ME",
110
+ contacts: [{prompt_variables: {foo: "string"}, to_phone_number: "to_phone_number"}],
111
+ launch: true,
112
+ name: "REPLACE_ME",
113
+ type: "regular",
114
+ request_options: {max_retries: 5}
115
+ )
88
116
  ```
89
117
 
90
118
  ### Timeouts
@@ -98,7 +126,14 @@ revox = Revox::Client.new(
98
126
  )
99
127
 
100
128
  # Or, configure per-request:
101
- revox.assistants.create(name: "REPLACE_ME", prompt: "REPLACE_ME", request_options: {timeout: 5})
129
+ revox.campaigns.create(
130
+ assistant_id: "REPLACE_ME",
131
+ contacts: [{prompt_variables: {foo: "string"}, to_phone_number: "to_phone_number"}],
132
+ launch: true,
133
+ name: "REPLACE_ME",
134
+ type: "regular",
135
+ request_options: {timeout: 5}
136
+ )
102
137
  ```
103
138
 
104
139
  On timeout, `Revox::Errors::APITimeoutError` is raised.
@@ -128,10 +163,13 @@ You can send undocumented parameters to any endpoint, and read undocumented resp
128
163
  Note: the `extra_` parameters of the same name overrides the documented parameters.
129
164
 
130
165
  ```ruby
131
- assistant =
132
- revox.assistants.create(
166
+ campaign =
167
+ revox.campaigns.create(
168
+ assistant_id: "REPLACE_ME",
169
+ contacts: [{prompt_variables: {foo: "string"}, to_phone_number: "to_phone_number"}],
170
+ launch: true,
133
171
  name: "REPLACE_ME",
134
- prompt: "REPLACE_ME",
172
+ type: "regular",
135
173
  request_options: {
136
174
  extra_query: {my_query_parameter: value},
137
175
  extra_body: {my_body_parameter: value},
@@ -139,7 +177,7 @@ assistant =
139
177
  }
140
178
  )
141
179
 
142
- puts(assistant[:my_undocumented_property])
180
+ puts(campaign[:my_undocumented_property])
143
181
  ```
144
182
 
145
183
  #### Undocumented request params
@@ -177,18 +215,46 @@ This library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitio
177
215
  You can provide typesafe request parameters like so:
178
216
 
179
217
  ```ruby
180
- revox.assistants.create(name: "REPLACE_ME", prompt: "REPLACE_ME")
218
+ revox.campaigns.create(
219
+ assistant_id: "REPLACE_ME",
220
+ contacts: [
221
+ Revox::CampaignCreateParams::Contact.new(
222
+ prompt_variables: {foo: "string"},
223
+ to_phone_number: "to_phone_number"
224
+ )
225
+ ],
226
+ launch: true,
227
+ name: "REPLACE_ME",
228
+ type: "regular"
229
+ )
181
230
  ```
182
231
 
183
232
  Or, equivalently:
184
233
 
185
234
  ```ruby
186
235
  # Hashes work, but are not typesafe:
187
- revox.assistants.create(name: "REPLACE_ME", prompt: "REPLACE_ME")
236
+ revox.campaigns.create(
237
+ assistant_id: "REPLACE_ME",
238
+ contacts: [{prompt_variables: {foo: "string"}, to_phone_number: "to_phone_number"}],
239
+ launch: true,
240
+ name: "REPLACE_ME",
241
+ type: "regular"
242
+ )
188
243
 
189
244
  # You can also splat a full Params class:
190
- params = Revox::AssistantCreateParams.new(name: "REPLACE_ME", prompt: "REPLACE_ME")
191
- revox.assistants.create(**params)
245
+ params = Revox::CampaignCreateParams.new(
246
+ assistant_id: "REPLACE_ME",
247
+ contacts: [
248
+ Revox::CampaignCreateParams::Contact.new(
249
+ prompt_variables: {foo: "string"},
250
+ to_phone_number: "to_phone_number"
251
+ )
252
+ ],
253
+ launch: true,
254
+ name: "REPLACE_ME",
255
+ type: "regular"
256
+ )
257
+ revox.campaigns.create(**params)
192
258
  ```
193
259
 
194
260
  ### Enums
@@ -196,25 +262,25 @@ revox.assistants.create(**params)
196
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:
197
263
 
198
264
  ```ruby
199
- # :generated
200
- puts(Revox::AssistantCreateParams::FirstSentenceMode::GENERATED)
265
+ # :regular
266
+ puts(Revox::CampaignCreateParams::Type::REGULAR)
201
267
 
202
- # Revealed type: `T.all(Revox::AssistantCreateParams::FirstSentenceMode, Symbol)`
203
- T.reveal_type(Revox::AssistantCreateParams::FirstSentenceMode::GENERATED)
268
+ # Revealed type: `T.all(Revox::CampaignCreateParams::Type, Symbol)`
269
+ T.reveal_type(Revox::CampaignCreateParams::Type::REGULAR)
204
270
  ```
205
271
 
206
272
  Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
207
273
 
208
274
  ```ruby
209
275
  # Using the enum constants preserves the tagged type information:
210
- revox.assistants.create(
211
- first_sentence_mode: Revox::AssistantCreateParams::FirstSentenceMode::GENERATED,
276
+ revox.campaigns.create(
277
+ type: Revox::CampaignCreateParams::Type::REGULAR,
212
278
  # …
213
279
  )
214
280
 
215
281
  # Literal values are also permissible:
216
- revox.assistants.create(
217
- first_sentence_mode: :generated,
282
+ revox.campaigns.create(
283
+ type: :regular,
218
284
  # …
219
285
  )
220
286
  ```
data/lib/revox/client.rb CHANGED
@@ -18,6 +18,9 @@ module Revox
18
18
  # @return [String]
19
19
  attr_reader :api_key
20
20
 
21
+ # @return [Revox::Resources::Campaigns]
22
+ attr_reader :campaigns
23
+
21
24
  # @return [Revox::Resources::Assistants]
22
25
  attr_reader :assistants
23
26
 
@@ -67,6 +70,19 @@ module Revox
67
70
  raise ArgumentError.new("api_key is required, and can be set via environ: \"REVOX_API_KEY\"")
68
71
  end
69
72
 
73
+ headers = {}
74
+ custom_headers_env = ENV["REVOX_CUSTOM_HEADERS"]
75
+ unless custom_headers_env.nil?
76
+ parsed = {}
77
+ custom_headers_env.split("\n").each do |line|
78
+ colon = line.index(":")
79
+ unless colon.nil?
80
+ parsed[line[0...colon].strip] = line[(colon + 1)..].strip
81
+ end
82
+ end
83
+ headers = parsed.merge(headers)
84
+ end
85
+
70
86
  @api_key = api_key.to_s
71
87
 
72
88
  super(
@@ -74,9 +90,11 @@ module Revox
74
90
  timeout: timeout,
75
91
  max_retries: max_retries,
76
92
  initial_retry_delay: initial_retry_delay,
77
- max_retry_delay: max_retry_delay
93
+ max_retry_delay: max_retry_delay,
94
+ headers: headers
78
95
  )
79
96
 
97
+ @campaigns = Revox::Resources::Campaigns.new(client: self)
80
98
  @assistants = Revox::Resources::Assistants.new(client: self)
81
99
  @call = Revox::Resources::Call.new(client: self)
82
100
  @voices = Revox::Resources::Voices.new(client: self)
@@ -306,6 +306,11 @@ module Revox
306
306
  Revox::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
+ # Generated methods always pass `req[:body]` for operations that define a
310
+ # request body, so only elide the content-type header when the operation
311
+ # has no body at all, not when an optional body param was omitted.
312
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
313
+
309
314
  url = Revox::Internal::Util.join_parsed_uri(@base_url_components, {**req, path: path, query: query})
310
315
  headers, encoded = Revox::Internal::Util.encode_content(headers, body)
311
316
  {
@@ -438,9 +438,9 @@ module Revox
438
438
  # @return [Hash{Symbol=>Object}]
439
439
  #
440
440
  # @example
441
- # # `assistant_create_response` is a `Revox::Models::AssistantCreateResponse`
442
- # assistant_create_response => {
443
- # assistant: assistant
441
+ # # `campaign_create_response` is a `Revox::Models::CampaignCreateResponse`
442
+ # campaign_create_response => {
443
+ # campaign: campaign
444
444
  # }
445
445
  def deconstruct_keys(keys)
446
446
  (keys || self.class.known_fields.keys)
@@ -157,7 +157,7 @@ module Revox
157
157
  in Hash | nil => coerced
158
158
  coerced
159
159
  else
160
- message = "Expected a #{Hash} or #{Revox::Internal::Type::BaseModel}, got #{data.inspect}"
160
+ message = "Expected a #{Hash} or #{Revox::Internal::Type::BaseModel}, got #{input.inspect}"
161
161
  raise ArgumentError.new(message)
162
162
  end
163
163
  end
@@ -237,6 +237,11 @@ module Revox
237
237
  end
238
238
  end
239
239
 
240
+ # @type [Regexp]
241
+ #
242
+ # https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
243
+ RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/
244
+
240
245
  class << self
241
246
  # @api private
242
247
  #
@@ -247,6 +252,15 @@ module Revox
247
252
  "#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
248
253
  end
249
254
 
255
+ # @api private
256
+ #
257
+ # @param path [String, Integer]
258
+ #
259
+ # @return [String]
260
+ def encode_path(path)
261
+ path.to_s.gsub(Revox::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
262
+ end
263
+
250
264
  # @api private
251
265
  #
252
266
  # @param path [String, Array<String>]
@@ -259,7 +273,7 @@ module Revox
259
273
  in []
260
274
  ""
261
275
  in [String => p, *interpolations]
262
- encoded = interpolations.map { ERB::Util.url_encode(_1) }
276
+ encoded = interpolations.map { encode_path(_1) }
263
277
  format(p, *encoded)
264
278
  end
265
279
  end
@@ -490,6 +504,37 @@ module Revox
490
504
  JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
491
505
 
492
506
  class << self
507
+ # @api private
508
+ #
509
+ # @param query [Hash{Symbol=>Object}]
510
+ #
511
+ # @return [Hash{Symbol=>Object}]
512
+ def encode_query_params(query)
513
+ out = {}
514
+ query.each { write_query_param_element!(out, _1, _2) }
515
+ out
516
+ end
517
+
518
+ # @api private
519
+ #
520
+ # @param collection [Hash{Symbol=>Object}]
521
+ # @param key [String]
522
+ # @param element [Object]
523
+ #
524
+ # @return [nil]
525
+ private def write_query_param_element!(collection, key, element)
526
+ case element
527
+ in Hash
528
+ element.each do |name, value|
529
+ write_query_param_element!(collection, "#{key}[#{name}]", value)
530
+ end
531
+ in Array
532
+ collection[key] = element.map(&:to_s).join(",")
533
+ else
534
+ collection[key] = element.to_s
535
+ end
536
+ end
537
+
493
538
  # @api private
494
539
  #
495
540
  # @param y [Enumerator::Yielder]
@@ -540,16 +585,15 @@ module Revox
540
585
  y << "Content-Disposition: form-data"
541
586
 
542
587
  unless key.nil?
543
- name = ERB::Util.url_encode(key.to_s)
544
- y << "; name=\"#{name}\""
588
+ y << "; name=\"#{key}\""
545
589
  end
546
590
 
547
591
  case val
548
592
  in Revox::FilePart unless val.filename.nil?
549
- filename = ERB::Util.url_encode(val.filename)
593
+ filename = encode_path(val.filename)
550
594
  y << "; filename=\"#{filename}\""
551
595
  in Pathname | IO
552
- filename = ERB::Util.url_encode(::File.basename(val.to_path))
596
+ filename = encode_path(::File.basename(val.to_path))
553
597
  y << "; filename=\"#{filename}\""
554
598
  else
555
599
  end
@@ -566,6 +610,7 @@ module Revox
566
610
  #
567
611
  # @return [Array(String, Enumerable<String>)]
568
612
  private def encode_multipart_streaming(body)
613
+ # rubocop:disable Style/CaseEquality
569
614
  # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
570
615
  boundary = SecureRandom.urlsafe_base64(46)
571
616
 
@@ -575,7 +620,7 @@ module Revox
575
620
  in Hash
576
621
  body.each do |key, val|
577
622
  case val
578
- in Array if val.all? { primitive?(_1) }
623
+ in Array if val.all? { primitive?(_1) || Revox::Internal::Type::FileInput === _1 }
579
624
  val.each do |v|
580
625
  write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
581
626
  end
@@ -591,6 +636,7 @@ module Revox
591
636
 
592
637
  fused_io = fused_enum(strio) { closing.each(&:call) }
593
638
  [boundary, fused_io]
639
+ # rubocop:enable Style/CaseEquality
594
640
  end
595
641
 
596
642
  # @api private