@elevenlabs/elevenlabs-js 2.12.0 → 2.12.2

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 (218) hide show
  1. package/Client.d.ts +0 -160
  2. package/Client.js +2 -687
  3. package/api/index.d.ts +0 -1
  4. package/api/index.js +0 -1
  5. package/api/resources/conversationalAi/client/Client.d.ts +3 -0
  6. package/api/resources/conversationalAi/client/Client.js +25 -20
  7. package/api/resources/conversationalAi/resources/agents/client/Client.d.ts +18 -0
  8. package/api/resources/conversationalAi/resources/agents/client/Client.js +80 -0
  9. package/api/{client → resources/conversationalAi/resources/agents/client}/requests/RunAgentTestsRequestModel.d.ts +1 -1
  10. package/api/resources/conversationalAi/resources/agents/client/requests/index.d.ts +1 -0
  11. package/api/resources/conversationalAi/resources/index.d.ts +3 -0
  12. package/api/resources/conversationalAi/resources/index.js +4 -1
  13. package/api/resources/conversationalAi/resources/tests/client/Client.d.ts +147 -0
  14. package/api/resources/conversationalAi/resources/tests/client/Client.js +537 -0
  15. package/api/resources/conversationalAi/resources/tests/client/index.d.ts +2 -0
  16. package/{dist/api → api/resources/conversationalAi/resources/tests}/client/requests/CreateUnitTestRequest.d.ts +2 -2
  17. package/api/{client/requests/ListChatResponseTestsRouteRequest.d.ts → resources/conversationalAi/resources/tests/client/requests/TestsListRequest.d.ts} +1 -1
  18. package/api/{client → resources/conversationalAi/resources/tests/client}/requests/UpdateUnitTestRequest.d.ts +2 -2
  19. package/api/resources/conversationalAi/resources/tests/client/requests/index.d.ts +4 -0
  20. package/api/resources/conversationalAi/resources/tests/index.d.ts +3 -0
  21. package/api/resources/conversationalAi/resources/tests/index.js +19 -0
  22. package/api/resources/conversationalAi/resources/tests/resources/index.d.ts +2 -0
  23. package/api/resources/conversationalAi/resources/tests/resources/index.js +41 -0
  24. package/api/resources/conversationalAi/resources/tests/resources/invocations/client/Client.d.ts +63 -0
  25. package/api/resources/conversationalAi/resources/tests/resources/invocations/client/Client.js +201 -0
  26. package/api/resources/conversationalAi/resources/tests/resources/invocations/client/index.d.ts +2 -0
  27. package/{dist/api → api/resources/conversationalAi/resources/tests/resources/invocations}/client/requests/ResubmitTestsRequestModel.d.ts +1 -1
  28. package/api/resources/conversationalAi/resources/tests/resources/invocations/client/requests/index.d.ts +1 -0
  29. package/api/resources/conversationalAi/resources/tests/resources/invocations/index.d.ts +1 -0
  30. package/api/resources/conversationalAi/resources/tests/resources/invocations/index.js +17 -0
  31. package/api/resources/conversationalAi/resources/tests/types/index.d.ts +2 -0
  32. package/api/resources/conversationalAi/resources/tests/types/index.js +18 -0
  33. package/api/types/ClientEvent.d.ts +2 -1
  34. package/api/types/ClientEvent.js +1 -0
  35. package/api/types/FeaturesUsageCommonModel.d.ts +1 -0
  36. package/api/types/TestsFeatureUsageCommonModel.d.ts +8 -0
  37. package/api/types/UnitTestRunResponseModel.d.ts +1 -0
  38. package/api/types/index.d.ts +1 -2
  39. package/api/types/index.js +1 -2
  40. package/dist/Client.d.ts +0 -160
  41. package/dist/Client.js +2 -687
  42. package/dist/api/index.d.ts +0 -1
  43. package/dist/api/index.js +0 -1
  44. package/dist/api/resources/conversationalAi/client/Client.d.ts +3 -0
  45. package/dist/api/resources/conversationalAi/client/Client.js +25 -20
  46. package/dist/api/resources/conversationalAi/resources/agents/client/Client.d.ts +18 -0
  47. package/dist/api/resources/conversationalAi/resources/agents/client/Client.js +80 -0
  48. package/dist/api/{client → resources/conversationalAi/resources/agents/client}/requests/RunAgentTestsRequestModel.d.ts +1 -1
  49. package/dist/api/resources/conversationalAi/resources/agents/client/requests/index.d.ts +1 -0
  50. package/dist/api/resources/conversationalAi/resources/index.d.ts +3 -0
  51. package/dist/api/resources/conversationalAi/resources/index.js +4 -1
  52. package/dist/api/resources/conversationalAi/resources/tests/client/Client.d.ts +147 -0
  53. package/dist/api/resources/conversationalAi/resources/tests/client/Client.js +537 -0
  54. package/dist/api/resources/conversationalAi/resources/tests/client/index.d.ts +2 -0
  55. package/{api → dist/api/resources/conversationalAi/resources/tests}/client/requests/CreateUnitTestRequest.d.ts +2 -2
  56. package/dist/api/{client/requests/ListChatResponseTestsRouteRequest.d.ts → resources/conversationalAi/resources/tests/client/requests/TestsListRequest.d.ts} +1 -1
  57. package/dist/api/{client → resources/conversationalAi/resources/tests/client}/requests/UpdateUnitTestRequest.d.ts +2 -2
  58. package/dist/api/resources/conversationalAi/resources/tests/client/requests/index.d.ts +4 -0
  59. package/dist/api/resources/conversationalAi/resources/tests/client/requests/index.js +2 -0
  60. package/dist/api/resources/conversationalAi/resources/tests/index.d.ts +3 -0
  61. package/dist/api/resources/conversationalAi/resources/tests/index.js +19 -0
  62. package/dist/api/resources/conversationalAi/resources/tests/resources/index.d.ts +2 -0
  63. package/dist/api/resources/conversationalAi/resources/tests/resources/index.js +41 -0
  64. package/dist/api/resources/conversationalAi/resources/tests/resources/invocations/client/Client.d.ts +63 -0
  65. package/dist/api/resources/conversationalAi/resources/tests/resources/invocations/client/Client.js +201 -0
  66. package/dist/api/resources/conversationalAi/resources/tests/resources/invocations/client/index.d.ts +2 -0
  67. package/{api → dist/api/resources/conversationalAi/resources/tests/resources/invocations}/client/requests/ResubmitTestsRequestModel.d.ts +1 -1
  68. package/dist/api/resources/conversationalAi/resources/tests/resources/invocations/client/requests/index.d.ts +1 -0
  69. package/dist/api/resources/conversationalAi/resources/tests/resources/invocations/client/requests/index.js +2 -0
  70. package/dist/api/resources/conversationalAi/resources/tests/resources/invocations/index.d.ts +1 -0
  71. package/dist/api/resources/conversationalAi/resources/tests/resources/invocations/index.js +17 -0
  72. package/dist/api/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.js +5 -0
  73. package/dist/api/resources/conversationalAi/resources/tests/types/index.d.ts +2 -0
  74. package/dist/api/resources/conversationalAi/resources/tests/types/index.js +18 -0
  75. package/dist/api/types/ClientEvent.d.ts +2 -1
  76. package/dist/api/types/ClientEvent.js +1 -0
  77. package/dist/api/types/FeaturesUsageCommonModel.d.ts +1 -0
  78. package/dist/api/types/TestsFeatureUsageCommonModel.d.ts +8 -0
  79. package/dist/api/types/TestsFeatureUsageCommonModel.js +5 -0
  80. package/dist/api/types/UnitTestRunResponseModel.d.ts +1 -0
  81. package/dist/api/types/index.d.ts +1 -2
  82. package/dist/api/types/index.js +1 -2
  83. package/dist/serialization/index.d.ts +0 -1
  84. package/dist/serialization/index.js +0 -1
  85. package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/RunAgentTestsRequestModel.d.ts +15 -0
  86. package/dist/serialization/{client → resources/conversationalAi/resources/agents/client}/requests/RunAgentTestsRequestModel.js +3 -3
  87. package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/index.d.ts +1 -0
  88. package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/index.js +3 -1
  89. package/dist/serialization/resources/conversationalAi/resources/index.d.ts +3 -0
  90. package/dist/serialization/resources/conversationalAi/resources/index.js +4 -1
  91. package/dist/serialization/resources/conversationalAi/resources/tests/client/index.js +17 -0
  92. package/dist/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/CreateUnitTestRequest.d.ts +8 -8
  93. package/dist/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/CreateUnitTestRequest.js +5 -5
  94. package/dist/serialization/resources/conversationalAi/resources/tests/client/requests/ListTestsByIdsRequestModel.d.ts +12 -0
  95. package/{serialization → dist/serialization/resources/conversationalAi/resources/tests}/client/requests/ListTestsByIdsRequestModel.js +1 -1
  96. package/dist/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/UpdateUnitTestRequest.d.ts +8 -8
  97. package/dist/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/UpdateUnitTestRequest.js +5 -5
  98. package/dist/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/index.d.ts +0 -2
  99. package/{serialization → dist/serialization/resources/conversationalAi/resources/tests}/client/requests/index.js +1 -5
  100. package/dist/serialization/resources/conversationalAi/resources/tests/index.d.ts +3 -0
  101. package/dist/serialization/resources/conversationalAi/resources/tests/index.js +19 -0
  102. package/dist/serialization/resources/conversationalAi/resources/tests/resources/index.d.ts +2 -0
  103. package/dist/serialization/resources/conversationalAi/resources/tests/resources/index.js +41 -0
  104. package/dist/serialization/resources/conversationalAi/resources/tests/resources/invocations/client/index.js +17 -0
  105. package/{serialization → dist/serialization/resources/conversationalAi/resources/tests/resources/invocations}/client/requests/ResubmitTestsRequestModel.d.ts +5 -5
  106. package/{serialization → dist/serialization/resources/conversationalAi/resources/tests/resources/invocations}/client/requests/ResubmitTestsRequestModel.js +2 -2
  107. package/dist/serialization/resources/conversationalAi/resources/tests/resources/invocations/client/requests/index.d.ts +1 -0
  108. package/dist/serialization/resources/conversationalAi/resources/tests/resources/invocations/client/requests/index.js +5 -0
  109. package/dist/serialization/resources/conversationalAi/resources/tests/resources/invocations/index.d.ts +1 -0
  110. package/dist/serialization/resources/conversationalAi/resources/tests/resources/invocations/index.js +17 -0
  111. package/dist/serialization/resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.d.ts +10 -0
  112. package/{serialization → dist/serialization/resources/conversationalAi/resources/tests}/types/CreateUnitTestRequestDynamicVariablesValue.js +1 -1
  113. package/dist/serialization/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.d.ts +10 -0
  114. package/{serialization → dist/serialization/resources/conversationalAi/resources/tests}/types/UpdateUnitTestRequestDynamicVariablesValue.js +1 -1
  115. package/dist/serialization/resources/conversationalAi/resources/tests/types/index.d.ts +2 -0
  116. package/dist/serialization/resources/conversationalAi/resources/tests/types/index.js +18 -0
  117. package/dist/serialization/types/ClientEvent.d.ts +1 -1
  118. package/dist/serialization/types/ClientEvent.js +1 -0
  119. package/dist/serialization/types/FeaturesUsageCommonModel.d.ts +2 -0
  120. package/dist/serialization/types/FeaturesUsageCommonModel.js +2 -0
  121. package/dist/serialization/types/TestsFeatureUsageCommonModel.d.ts +14 -0
  122. package/dist/serialization/types/TestsFeatureUsageCommonModel.js +45 -0
  123. package/dist/serialization/types/UnitTestRunResponseModel.d.ts +1 -0
  124. package/dist/serialization/types/UnitTestRunResponseModel.js +1 -0
  125. package/dist/serialization/types/index.d.ts +1 -2
  126. package/dist/serialization/types/index.js +1 -2
  127. package/dist/version.d.ts +1 -1
  128. package/dist/version.js +1 -1
  129. package/package.json +1 -1
  130. package/reference.md +648 -0
  131. package/serialization/index.d.ts +0 -1
  132. package/serialization/index.js +0 -1
  133. package/serialization/resources/conversationalAi/resources/agents/client/requests/RunAgentTestsRequestModel.d.ts +15 -0
  134. package/serialization/{client → resources/conversationalAi/resources/agents/client}/requests/RunAgentTestsRequestModel.js +3 -3
  135. package/serialization/resources/conversationalAi/resources/agents/client/requests/index.d.ts +1 -0
  136. package/serialization/resources/conversationalAi/resources/agents/client/requests/index.js +3 -1
  137. package/serialization/resources/conversationalAi/resources/index.d.ts +3 -0
  138. package/serialization/resources/conversationalAi/resources/index.js +4 -1
  139. package/serialization/resources/conversationalAi/resources/tests/client/index.js +17 -0
  140. package/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/CreateUnitTestRequest.d.ts +8 -8
  141. package/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/CreateUnitTestRequest.js +5 -5
  142. package/serialization/resources/conversationalAi/resources/tests/client/requests/ListTestsByIdsRequestModel.d.ts +12 -0
  143. package/{dist/serialization → serialization/resources/conversationalAi/resources/tests}/client/requests/ListTestsByIdsRequestModel.js +1 -1
  144. package/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/UpdateUnitTestRequest.d.ts +8 -8
  145. package/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/UpdateUnitTestRequest.js +5 -5
  146. package/serialization/{client → resources/conversationalAi/resources/tests/client}/requests/index.d.ts +0 -2
  147. package/{dist/serialization → serialization/resources/conversationalAi/resources/tests}/client/requests/index.js +1 -5
  148. package/serialization/resources/conversationalAi/resources/tests/index.d.ts +3 -0
  149. package/serialization/resources/conversationalAi/resources/tests/index.js +19 -0
  150. package/serialization/resources/conversationalAi/resources/tests/resources/index.d.ts +2 -0
  151. package/serialization/resources/conversationalAi/resources/tests/resources/index.js +41 -0
  152. package/serialization/resources/conversationalAi/resources/tests/resources/invocations/client/index.js +17 -0
  153. package/{dist/serialization → serialization/resources/conversationalAi/resources/tests/resources/invocations}/client/requests/ResubmitTestsRequestModel.d.ts +5 -5
  154. package/{dist/serialization → serialization/resources/conversationalAi/resources/tests/resources/invocations}/client/requests/ResubmitTestsRequestModel.js +2 -2
  155. package/serialization/resources/conversationalAi/resources/tests/resources/invocations/client/requests/index.d.ts +1 -0
  156. package/serialization/resources/conversationalAi/resources/tests/resources/invocations/client/requests/index.js +5 -0
  157. package/serialization/resources/conversationalAi/resources/tests/resources/invocations/index.d.ts +1 -0
  158. package/serialization/resources/conversationalAi/resources/tests/resources/invocations/index.js +17 -0
  159. package/serialization/resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.d.ts +10 -0
  160. package/{dist/serialization → serialization/resources/conversationalAi/resources/tests}/types/CreateUnitTestRequestDynamicVariablesValue.js +1 -1
  161. package/serialization/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.d.ts +10 -0
  162. package/{dist/serialization → serialization/resources/conversationalAi/resources/tests}/types/UpdateUnitTestRequestDynamicVariablesValue.js +1 -1
  163. package/serialization/resources/conversationalAi/resources/tests/types/index.d.ts +2 -0
  164. package/serialization/resources/conversationalAi/resources/tests/types/index.js +18 -0
  165. package/serialization/types/ClientEvent.d.ts +1 -1
  166. package/serialization/types/ClientEvent.js +1 -0
  167. package/serialization/types/FeaturesUsageCommonModel.d.ts +2 -0
  168. package/serialization/types/FeaturesUsageCommonModel.js +2 -0
  169. package/serialization/types/TestsFeatureUsageCommonModel.d.ts +14 -0
  170. package/serialization/types/TestsFeatureUsageCommonModel.js +45 -0
  171. package/serialization/types/UnitTestRunResponseModel.d.ts +1 -0
  172. package/serialization/types/UnitTestRunResponseModel.js +1 -0
  173. package/serialization/types/index.d.ts +1 -2
  174. package/serialization/types/index.js +1 -2
  175. package/version.d.ts +1 -1
  176. package/version.js +1 -1
  177. package/api/client/requests/index.d.ts +0 -6
  178. package/dist/api/client/requests/index.d.ts +0 -6
  179. package/dist/serialization/client/requests/ListTestsByIdsRequestModel.d.ts +0 -12
  180. package/dist/serialization/client/requests/RunAgentTestsRequestModel.d.ts +0 -15
  181. package/dist/serialization/types/CreateUnitTestRequestDynamicVariablesValue.d.ts +0 -10
  182. package/dist/serialization/types/UpdateUnitTestRequestDynamicVariablesValue.d.ts +0 -10
  183. package/serialization/client/requests/ListTestsByIdsRequestModel.d.ts +0 -12
  184. package/serialization/client/requests/RunAgentTestsRequestModel.d.ts +0 -15
  185. package/serialization/types/CreateUnitTestRequestDynamicVariablesValue.d.ts +0 -10
  186. package/serialization/types/UpdateUnitTestRequestDynamicVariablesValue.d.ts +0 -10
  187. /package/api/{client → resources/conversationalAi/resources/agents/client}/requests/RunAgentTestsRequestModel.js +0 -0
  188. /package/api/{client → resources/conversationalAi/resources/tests/client}/index.js +0 -0
  189. /package/api/{client → resources/conversationalAi/resources/tests/client}/requests/CreateUnitTestRequest.js +0 -0
  190. /package/api/{client → resources/conversationalAi/resources/tests/client}/requests/ListTestsByIdsRequestModel.d.ts +0 -0
  191. /package/api/{client → resources/conversationalAi/resources/tests/client}/requests/ListTestsByIdsRequestModel.js +0 -0
  192. /package/api/{client/requests/ListChatResponseTestsRouteRequest.js → resources/conversationalAi/resources/tests/client/requests/TestsListRequest.js} +0 -0
  193. /package/api/{client → resources/conversationalAi/resources/tests/client}/requests/UpdateUnitTestRequest.js +0 -0
  194. /package/api/{client → resources/conversationalAi/resources/tests/client}/requests/index.js +0 -0
  195. /package/{dist/api → api/resources/conversationalAi/resources/tests/resources/invocations}/client/index.js +0 -0
  196. /package/api/{client → resources/conversationalAi/resources/tests/resources/invocations/client}/requests/ResubmitTestsRequestModel.js +0 -0
  197. /package/{dist/api → api/resources/conversationalAi/resources/tests/resources/invocations}/client/requests/index.js +0 -0
  198. /package/api/{types → resources/conversationalAi/resources/tests/types}/CreateUnitTestRequestDynamicVariablesValue.d.ts +0 -0
  199. /package/api/{types → resources/conversationalAi/resources/tests/types}/CreateUnitTestRequestDynamicVariablesValue.js +0 -0
  200. /package/api/{types → resources/conversationalAi/resources/tests/types}/UpdateUnitTestRequestDynamicVariablesValue.d.ts +0 -0
  201. /package/api/{types → resources/conversationalAi/resources/tests/types}/UpdateUnitTestRequestDynamicVariablesValue.js +0 -0
  202. /package/{dist/api/client/requests/CreateUnitTestRequest.js → api/types/TestsFeatureUsageCommonModel.js} +0 -0
  203. /package/dist/api/{client → resources/conversationalAi/resources/agents/client}/requests/RunAgentTestsRequestModel.js +0 -0
  204. /package/dist/{serialization → api/resources/conversationalAi/resources/tests}/client/index.js +0 -0
  205. /package/dist/api/{client/requests/ListChatResponseTestsRouteRequest.js → resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.js} +0 -0
  206. /package/dist/api/{client → resources/conversationalAi/resources/tests/client}/requests/ListTestsByIdsRequestModel.d.ts +0 -0
  207. /package/dist/api/{client → resources/conversationalAi/resources/tests/client}/requests/ListTestsByIdsRequestModel.js +0 -0
  208. /package/dist/api/{client/requests/ResubmitTestsRequestModel.js → resources/conversationalAi/resources/tests/client/requests/TestsListRequest.js} +0 -0
  209. /package/dist/api/{client → resources/conversationalAi/resources/tests/client}/requests/UpdateUnitTestRequest.js +0 -0
  210. /package/{serialization → dist/api/resources/conversationalAi/resources/tests/resources/invocations}/client/index.js +0 -0
  211. /package/dist/api/{types/CreateUnitTestRequestDynamicVariablesValue.js → resources/conversationalAi/resources/tests/resources/invocations/client/requests/ResubmitTestsRequestModel.js} +0 -0
  212. /package/dist/api/{types → resources/conversationalAi/resources/tests/types}/CreateUnitTestRequestDynamicVariablesValue.d.ts +0 -0
  213. /package/dist/api/{types/UpdateUnitTestRequestDynamicVariablesValue.js → resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.js} +0 -0
  214. /package/dist/api/{types → resources/conversationalAi/resources/tests/types}/UpdateUnitTestRequestDynamicVariablesValue.d.ts +0 -0
  215. /package/{api → dist/serialization/resources/conversationalAi/resources/tests}/client/index.d.ts +0 -0
  216. /package/dist/{api → serialization/resources/conversationalAi/resources/tests/resources/invocations}/client/index.d.ts +0 -0
  217. /package/{dist/serialization → serialization/resources/conversationalAi/resources/tests}/client/index.d.ts +0 -0
  218. /package/serialization/{client → resources/conversationalAi/resources/tests/resources/invocations/client}/index.d.ts +0 -0
package/api/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from "./resources";
2
2
  export * from "./types";
3
3
  export * from "./errors";
4
- export * from "./client";
package/api/index.js CHANGED
@@ -17,4 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./resources"), exports);
18
18
  __exportStar(require("./types"), exports);
19
19
  __exportStar(require("./errors"), exports);
20
- __exportStar(require("./client"), exports);
@@ -7,6 +7,7 @@ import * as ElevenLabs from "../../../index";
7
7
  import { Conversations } from "../resources/conversations/client/Client";
8
8
  import { Twilio } from "../resources/twilio/client/Client";
9
9
  import { Agents } from "../resources/agents/client/Client";
10
+ import { Tests } from "../resources/tests/client/Client";
10
11
  import { PhoneNumbers } from "../resources/phoneNumbers/client/Client";
11
12
  import { LlmUsage } from "../resources/llmUsage/client/Client";
12
13
  import { KnowledgeBase } from "../resources/knowledgeBase/client/Client";
@@ -45,6 +46,7 @@ export declare class ConversationalAi {
45
46
  protected _conversations: Conversations | undefined;
46
47
  protected _twilio: Twilio | undefined;
47
48
  protected _agents: Agents | undefined;
49
+ protected _tests: Tests | undefined;
48
50
  protected _phoneNumbers: PhoneNumbers | undefined;
49
51
  protected _llmUsage: LlmUsage | undefined;
50
52
  protected _knowledgeBase: KnowledgeBase | undefined;
@@ -59,6 +61,7 @@ export declare class ConversationalAi {
59
61
  get conversations(): Conversations;
60
62
  get twilio(): Twilio;
61
63
  get agents(): Agents;
64
+ get tests(): Tests;
62
65
  get phoneNumbers(): PhoneNumbers;
63
66
  get llmUsage(): LlmUsage;
64
67
  get knowledgeBase(): KnowledgeBase;
@@ -55,16 +55,17 @@ const errors = __importStar(require("../../../../errors/index"));
55
55
  const Client_1 = require("../resources/conversations/client/Client");
56
56
  const Client_2 = require("../resources/twilio/client/Client");
57
57
  const Client_3 = require("../resources/agents/client/Client");
58
- const Client_4 = require("../resources/phoneNumbers/client/Client");
59
- const Client_5 = require("../resources/llmUsage/client/Client");
60
- const Client_6 = require("../resources/knowledgeBase/client/Client");
61
- const Client_7 = require("../resources/tools/client/Client");
62
- const Client_8 = require("../resources/settings/client/Client");
63
- const Client_9 = require("../resources/secrets/client/Client");
64
- const Client_10 = require("../resources/batchCalls/client/Client");
65
- const Client_11 = require("../resources/sipTrunk/client/Client");
66
- const Client_12 = require("../resources/mcpServers/client/Client");
67
- const Client_13 = require("../resources/dashboard/client/Client");
58
+ const Client_4 = require("../resources/tests/client/Client");
59
+ const Client_5 = require("../resources/phoneNumbers/client/Client");
60
+ const Client_6 = require("../resources/llmUsage/client/Client");
61
+ const Client_7 = require("../resources/knowledgeBase/client/Client");
62
+ const Client_8 = require("../resources/tools/client/Client");
63
+ const Client_9 = require("../resources/settings/client/Client");
64
+ const Client_10 = require("../resources/secrets/client/Client");
65
+ const Client_11 = require("../resources/batchCalls/client/Client");
66
+ const Client_12 = require("../resources/sipTrunk/client/Client");
67
+ const Client_13 = require("../resources/mcpServers/client/Client");
68
+ const Client_14 = require("../resources/dashboard/client/Client");
68
69
  class ConversationalAi {
69
70
  constructor(_options = {}) {
70
71
  this._options = _options;
@@ -81,45 +82,49 @@ class ConversationalAi {
81
82
  var _a;
82
83
  return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_3.Agents(this._options)));
83
84
  }
85
+ get tests() {
86
+ var _a;
87
+ return ((_a = this._tests) !== null && _a !== void 0 ? _a : (this._tests = new Client_4.Tests(this._options)));
88
+ }
84
89
  get phoneNumbers() {
85
90
  var _a;
86
- return ((_a = this._phoneNumbers) !== null && _a !== void 0 ? _a : (this._phoneNumbers = new Client_4.PhoneNumbers(this._options)));
91
+ return ((_a = this._phoneNumbers) !== null && _a !== void 0 ? _a : (this._phoneNumbers = new Client_5.PhoneNumbers(this._options)));
87
92
  }
88
93
  get llmUsage() {
89
94
  var _a;
90
- return ((_a = this._llmUsage) !== null && _a !== void 0 ? _a : (this._llmUsage = new Client_5.LlmUsage(this._options)));
95
+ return ((_a = this._llmUsage) !== null && _a !== void 0 ? _a : (this._llmUsage = new Client_6.LlmUsage(this._options)));
91
96
  }
92
97
  get knowledgeBase() {
93
98
  var _a;
94
- return ((_a = this._knowledgeBase) !== null && _a !== void 0 ? _a : (this._knowledgeBase = new Client_6.KnowledgeBase(this._options)));
99
+ return ((_a = this._knowledgeBase) !== null && _a !== void 0 ? _a : (this._knowledgeBase = new Client_7.KnowledgeBase(this._options)));
95
100
  }
96
101
  get tools() {
97
102
  var _a;
98
- return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_7.Tools(this._options)));
103
+ return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_8.Tools(this._options)));
99
104
  }
100
105
  get settings() {
101
106
  var _a;
102
- return ((_a = this._settings) !== null && _a !== void 0 ? _a : (this._settings = new Client_8.Settings(this._options)));
107
+ return ((_a = this._settings) !== null && _a !== void 0 ? _a : (this._settings = new Client_9.Settings(this._options)));
103
108
  }
104
109
  get secrets() {
105
110
  var _a;
106
- return ((_a = this._secrets) !== null && _a !== void 0 ? _a : (this._secrets = new Client_9.Secrets(this._options)));
111
+ return ((_a = this._secrets) !== null && _a !== void 0 ? _a : (this._secrets = new Client_10.Secrets(this._options)));
107
112
  }
108
113
  get batchCalls() {
109
114
  var _a;
110
- return ((_a = this._batchCalls) !== null && _a !== void 0 ? _a : (this._batchCalls = new Client_10.BatchCalls(this._options)));
115
+ return ((_a = this._batchCalls) !== null && _a !== void 0 ? _a : (this._batchCalls = new Client_11.BatchCalls(this._options)));
111
116
  }
112
117
  get sipTrunk() {
113
118
  var _a;
114
- return ((_a = this._sipTrunk) !== null && _a !== void 0 ? _a : (this._sipTrunk = new Client_11.SipTrunk(this._options)));
119
+ return ((_a = this._sipTrunk) !== null && _a !== void 0 ? _a : (this._sipTrunk = new Client_12.SipTrunk(this._options)));
115
120
  }
116
121
  get mcpServers() {
117
122
  var _a;
118
- return ((_a = this._mcpServers) !== null && _a !== void 0 ? _a : (this._mcpServers = new Client_12.McpServers(this._options)));
123
+ return ((_a = this._mcpServers) !== null && _a !== void 0 ? _a : (this._mcpServers = new Client_13.McpServers(this._options)));
119
124
  }
120
125
  get dashboard() {
121
126
  var _a;
122
- return ((_a = this._dashboard) !== null && _a !== void 0 ? _a : (this._dashboard = new Client_13.Dashboard(this._options)));
127
+ return ((_a = this._dashboard) !== null && _a !== void 0 ? _a : (this._dashboard = new Client_14.Dashboard(this._options)));
123
128
  }
124
129
  /**
125
130
  * Upload a file or webpage URL to create a knowledge base document. <br> <Note> After creating the document, update the agent's knowledge base by calling [Update agent](/docs/api-reference/agents/update). </Note>
@@ -166,4 +166,22 @@ export declare class Agents {
166
166
  */
167
167
  simulateConversationStream(agentId: string, request: ElevenLabs.conversationalAi.BodySimulatesAConversationStreamV1ConvaiAgentsAgentIdSimulateConversationStreamPost, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<void>;
168
168
  private __simulateConversationStream;
169
+ /**
170
+ * Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration.
171
+ *
172
+ * @param {string} agentId - The id of an agent. This is returned on agent creation.
173
+ * @param {ElevenLabs.conversationalAi.RunAgentTestsRequestModel} request
174
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
175
+ *
176
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
177
+ *
178
+ * @example
179
+ * await client.conversationalAi.agents.runTests("21m00Tcm4TlvDq8ikWAM", {
180
+ * tests: [{
181
+ * testId: "test_id"
182
+ * }]
183
+ * })
184
+ */
185
+ runTests(agentId: string, request: ElevenLabs.conversationalAi.RunAgentTestsRequestModel, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetTestSuiteInvocationResponseModel>;
186
+ private __runTests;
169
187
  }
@@ -671,5 +671,85 @@ class Agents {
671
671
  }
672
672
  });
673
673
  }
674
+ /**
675
+ * Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration.
676
+ *
677
+ * @param {string} agentId - The id of an agent. This is returned on agent creation.
678
+ * @param {ElevenLabs.conversationalAi.RunAgentTestsRequestModel} request
679
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
680
+ *
681
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
682
+ *
683
+ * @example
684
+ * await client.conversationalAi.agents.runTests("21m00Tcm4TlvDq8ikWAM", {
685
+ * tests: [{
686
+ * testId: "test_id"
687
+ * }]
688
+ * })
689
+ */
690
+ runTests(agentId, request, requestOptions) {
691
+ return core.HttpResponsePromise.fromPromise(this.__runTests(agentId, request, requestOptions));
692
+ }
693
+ __runTests(agentId, request, requestOptions) {
694
+ return __awaiter(this, void 0, void 0, function* () {
695
+ var _a, _b, _c;
696
+ const _response = yield core.fetcher({
697
+ url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production, `v1/convai/agents/${encodeURIComponent(agentId)}/run-tests`),
698
+ method: "POST",
699
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
700
+ contentType: "application/json",
701
+ requestType: "json",
702
+ body: serializers.conversationalAi.RunAgentTestsRequestModel.jsonOrThrow(request, {
703
+ unrecognizedObjectKeys: "strip",
704
+ }),
705
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
706
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
707
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
708
+ });
709
+ if (_response.ok) {
710
+ return {
711
+ data: serializers.GetTestSuiteInvocationResponseModel.parseOrThrow(_response.body, {
712
+ unrecognizedObjectKeys: "passthrough",
713
+ allowUnrecognizedUnionMembers: true,
714
+ allowUnrecognizedEnumValues: true,
715
+ breadcrumbsPrefix: ["response"],
716
+ }),
717
+ rawResponse: _response.rawResponse,
718
+ };
719
+ }
720
+ if (_response.error.reason === "status-code") {
721
+ switch (_response.error.statusCode) {
722
+ case 422:
723
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
724
+ unrecognizedObjectKeys: "passthrough",
725
+ allowUnrecognizedUnionMembers: true,
726
+ allowUnrecognizedEnumValues: true,
727
+ breadcrumbsPrefix: ["response"],
728
+ }), _response.rawResponse);
729
+ default:
730
+ throw new errors.ElevenLabsError({
731
+ statusCode: _response.error.statusCode,
732
+ body: _response.error.body,
733
+ rawResponse: _response.rawResponse,
734
+ });
735
+ }
736
+ }
737
+ switch (_response.error.reason) {
738
+ case "non-json":
739
+ throw new errors.ElevenLabsError({
740
+ statusCode: _response.error.statusCode,
741
+ body: _response.error.rawBody,
742
+ rawResponse: _response.rawResponse,
743
+ });
744
+ case "timeout":
745
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/convai/agents/{agent_id}/run-tests.");
746
+ case "unknown":
747
+ throw new errors.ElevenLabsError({
748
+ message: _response.error.errorMessage,
749
+ rawResponse: _response.rawResponse,
750
+ });
751
+ }
752
+ });
753
+ }
674
754
  }
675
755
  exports.Agents = Agents;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as ElevenLabs from "../../index";
4
+ import * as ElevenLabs from "../../../../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {
@@ -4,3 +4,4 @@ export { type AgentsListRequest } from "./AgentsListRequest";
4
4
  export { type BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost } from "./BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost";
5
5
  export { type BodySimulatesAConversationV1ConvaiAgentsAgentIdSimulateConversationPost } from "./BodySimulatesAConversationV1ConvaiAgentsAgentIdSimulateConversationPost";
6
6
  export { type BodySimulatesAConversationStreamV1ConvaiAgentsAgentIdSimulateConversationStreamPost } from "./BodySimulatesAConversationStreamV1ConvaiAgentsAgentIdSimulateConversationStreamPost";
7
+ export { type RunAgentTestsRequestModel } from "./RunAgentTestsRequestModel";
@@ -1,5 +1,7 @@
1
1
  export * as conversations from "./conversations";
2
2
  export * from "./conversations/types";
3
+ export * as tests from "./tests";
4
+ export * from "./tests/types";
3
5
  export * as phoneNumbers from "./phoneNumbers";
4
6
  export * from "./phoneNumbers/types";
5
7
  export * as dashboard from "./dashboard";
@@ -16,6 +18,7 @@ export * as mcpServers from "./mcpServers";
16
18
  export * from "./conversations/client/requests";
17
19
  export * from "./twilio/client/requests";
18
20
  export * from "./agents/client/requests";
21
+ export * from "./tests/client/requests";
19
22
  export * from "./phoneNumbers/client/requests";
20
23
  export * from "./llmUsage/client/requests";
21
24
  export * from "./knowledgeBase/client/requests";
@@ -36,9 +36,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.mcpServers = exports.sipTrunk = exports.batchCalls = exports.secrets = exports.settings = exports.tools = exports.llmUsage = exports.agents = exports.twilio = exports.knowledgeBase = exports.dashboard = exports.phoneNumbers = exports.conversations = void 0;
39
+ exports.mcpServers = exports.sipTrunk = exports.batchCalls = exports.secrets = exports.settings = exports.tools = exports.llmUsage = exports.agents = exports.twilio = exports.knowledgeBase = exports.dashboard = exports.phoneNumbers = exports.tests = exports.conversations = void 0;
40
40
  exports.conversations = __importStar(require("./conversations"));
41
41
  __exportStar(require("./conversations/types"), exports);
42
+ exports.tests = __importStar(require("./tests"));
43
+ __exportStar(require("./tests/types"), exports);
42
44
  exports.phoneNumbers = __importStar(require("./phoneNumbers"));
43
45
  __exportStar(require("./phoneNumbers/types"), exports);
44
46
  exports.dashboard = __importStar(require("./dashboard"));
@@ -55,6 +57,7 @@ exports.mcpServers = __importStar(require("./mcpServers"));
55
57
  __exportStar(require("./conversations/client/requests"), exports);
56
58
  __exportStar(require("./twilio/client/requests"), exports);
57
59
  __exportStar(require("./agents/client/requests"), exports);
60
+ __exportStar(require("./tests/client/requests"), exports);
58
61
  __exportStar(require("./phoneNumbers/client/requests"), exports);
59
62
  __exportStar(require("./llmUsage/client/requests"), exports);
60
63
  __exportStar(require("./knowledgeBase/client/requests"), exports);
@@ -0,0 +1,147 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments";
5
+ import * as core from "../../../../../../core";
6
+ import * as ElevenLabs from "../../../../../index";
7
+ import { Invocations } from "../resources/invocations/client/Client";
8
+ export declare namespace Tests {
9
+ interface Options {
10
+ environment?: core.Supplier<environments.ElevenLabsEnvironment | string>;
11
+ /** Specify a custom URL to connect the client to. */
12
+ baseUrl?: core.Supplier<string>;
13
+ /** Override the xi-api-key header */
14
+ apiKey?: core.Supplier<string | undefined>;
15
+ /** Additional headers to include in requests. */
16
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
17
+ }
18
+ interface RequestOptions {
19
+ /** The maximum time to wait for a response in seconds. */
20
+ timeoutInSeconds?: number;
21
+ /** The number of times to retry the request. Defaults to 2. */
22
+ maxRetries?: number;
23
+ /** A hook to abort the request. */
24
+ abortSignal?: AbortSignal;
25
+ /** Override the xi-api-key header */
26
+ apiKey?: string | undefined;
27
+ /** Additional headers to include in the request. */
28
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
29
+ }
30
+ }
31
+ export declare class Tests {
32
+ protected readonly _options: Tests.Options;
33
+ protected _invocations: Invocations | undefined;
34
+ constructor(_options?: Tests.Options);
35
+ get invocations(): Invocations;
36
+ /**
37
+ * Creates a new agent response test.
38
+ *
39
+ * @param {ElevenLabs.conversationalAi.CreateUnitTestRequest} request
40
+ * @param {Tests.RequestOptions} requestOptions - Request-specific configuration.
41
+ *
42
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
43
+ *
44
+ * @example
45
+ * await client.conversationalAi.tests.create({
46
+ * chatHistory: [{
47
+ * role: "user",
48
+ * timeInCallSecs: 1
49
+ * }],
50
+ * successCondition: "success_condition",
51
+ * successExamples: [{
52
+ * response: "response",
53
+ * type: "success"
54
+ * }],
55
+ * failureExamples: [{
56
+ * response: "response",
57
+ * type: "failure"
58
+ * }],
59
+ * name: "name"
60
+ * })
61
+ */
62
+ create(request: ElevenLabs.conversationalAi.CreateUnitTestRequest, requestOptions?: Tests.RequestOptions): core.HttpResponsePromise<ElevenLabs.CreateUnitTestResponseModel>;
63
+ private __create;
64
+ /**
65
+ * Gets an agent response test by ID.
66
+ *
67
+ * @param {string} testId - The id of a chat response test. This is returned on test creation.
68
+ * @param {Tests.RequestOptions} requestOptions - Request-specific configuration.
69
+ *
70
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
71
+ *
72
+ * @example
73
+ * await client.conversationalAi.tests.get("TeaqRRdTcIfIu2i7BYfT")
74
+ */
75
+ get(testId: string, requestOptions?: Tests.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetUnitTestResponseModel>;
76
+ private __get;
77
+ /**
78
+ * Updates an agent response test by ID.
79
+ *
80
+ * @param {string} testId - The id of a chat response test. This is returned on test creation.
81
+ * @param {ElevenLabs.conversationalAi.UpdateUnitTestRequest} request
82
+ * @param {Tests.RequestOptions} requestOptions - Request-specific configuration.
83
+ *
84
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
85
+ *
86
+ * @example
87
+ * await client.conversationalAi.tests.update("TeaqRRdTcIfIu2i7BYfT", {
88
+ * chatHistory: [{
89
+ * role: "user",
90
+ * timeInCallSecs: 1
91
+ * }],
92
+ * successCondition: "success_condition",
93
+ * successExamples: [{
94
+ * response: "response",
95
+ * type: "success"
96
+ * }],
97
+ * failureExamples: [{
98
+ * response: "response",
99
+ * type: "failure"
100
+ * }],
101
+ * name: "name"
102
+ * })
103
+ */
104
+ update(testId: string, request: ElevenLabs.conversationalAi.UpdateUnitTestRequest, requestOptions?: Tests.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetUnitTestResponseModel>;
105
+ private __update;
106
+ /**
107
+ * Deletes an agent response test by ID.
108
+ *
109
+ * @param {string} testId - The id of a chat response test. This is returned on test creation.
110
+ * @param {Tests.RequestOptions} requestOptions - Request-specific configuration.
111
+ *
112
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
113
+ *
114
+ * @example
115
+ * await client.conversationalAi.tests.delete("TeaqRRdTcIfIu2i7BYfT")
116
+ */
117
+ delete(testId: string, requestOptions?: Tests.RequestOptions): core.HttpResponsePromise<unknown>;
118
+ private __delete;
119
+ /**
120
+ * Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries.
121
+ *
122
+ * @param {ElevenLabs.conversationalAi.ListTestsByIdsRequestModel} request
123
+ * @param {Tests.RequestOptions} requestOptions - Request-specific configuration.
124
+ *
125
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
126
+ *
127
+ * @example
128
+ * await client.conversationalAi.tests.summaries({
129
+ * testIds: ["test_id_1", "test_id_2"]
130
+ * })
131
+ */
132
+ summaries(request: ElevenLabs.conversationalAi.ListTestsByIdsRequestModel, requestOptions?: Tests.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetTestsSummariesByIdsResponseModel>;
133
+ private __summaries;
134
+ /**
135
+ * Lists all agent response tests with pagination support and optional search filtering.
136
+ *
137
+ * @param {ElevenLabs.conversationalAi.TestsListRequest} request
138
+ * @param {Tests.RequestOptions} requestOptions - Request-specific configuration.
139
+ *
140
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
141
+ *
142
+ * @example
143
+ * await client.conversationalAi.tests.list()
144
+ */
145
+ list(request?: ElevenLabs.conversationalAi.TestsListRequest, requestOptions?: Tests.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetTestsPageResponseModel>;
146
+ private __list;
147
+ }