retell-sdk 5.49.1 → 5.49.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 (107) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +9 -9
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -9
  5. package/client.d.ts.map +1 -1
  6. package/package.json +1 -1
  7. package/resources/agent.d.mts +69 -69
  8. package/resources/agent.d.mts.map +1 -1
  9. package/resources/agent.d.ts +69 -69
  10. package/resources/agent.d.ts.map +1 -1
  11. package/resources/agent.js +30 -30
  12. package/resources/agent.js.map +1 -1
  13. package/resources/agent.mjs +30 -30
  14. package/resources/agent.mjs.map +1 -1
  15. package/resources/call.d.mts +1350 -1350
  16. package/resources/call.d.mts.map +1 -1
  17. package/resources/call.d.ts +1350 -1350
  18. package/resources/call.d.ts.map +1 -1
  19. package/resources/call.js +60 -60
  20. package/resources/call.js.map +1 -1
  21. package/resources/call.mjs +60 -60
  22. package/resources/call.mjs.map +1 -1
  23. package/resources/chat-agent.d.mts +70 -70
  24. package/resources/chat-agent.d.mts.map +1 -1
  25. package/resources/chat-agent.d.ts +70 -70
  26. package/resources/chat-agent.d.ts.map +1 -1
  27. package/resources/chat-agent.js +31 -31
  28. package/resources/chat-agent.js.map +1 -1
  29. package/resources/chat-agent.mjs +31 -31
  30. package/resources/chat-agent.mjs.map +1 -1
  31. package/resources/chat.d.mts +97 -97
  32. package/resources/chat.d.mts.map +1 -1
  33. package/resources/chat.d.ts +97 -97
  34. package/resources/chat.d.ts.map +1 -1
  35. package/resources/chat.js +55 -55
  36. package/resources/chat.js.map +1 -1
  37. package/resources/chat.mjs +55 -55
  38. package/resources/chat.mjs.map +1 -1
  39. package/resources/conversation-flow-component.d.mts +25 -25
  40. package/resources/conversation-flow-component.d.mts.map +1 -1
  41. package/resources/conversation-flow-component.d.ts +25 -25
  42. package/resources/conversation-flow-component.d.ts.map +1 -1
  43. package/resources/conversation-flow-component.js +12 -12
  44. package/resources/conversation-flow-component.js.map +1 -1
  45. package/resources/conversation-flow-component.mjs +12 -12
  46. package/resources/conversation-flow-component.mjs.map +1 -1
  47. package/resources/conversation-flow.d.mts +25 -25
  48. package/resources/conversation-flow.d.mts.map +1 -1
  49. package/resources/conversation-flow.d.ts +25 -25
  50. package/resources/conversation-flow.d.ts.map +1 -1
  51. package/resources/conversation-flow.js +12 -12
  52. package/resources/conversation-flow.js.map +1 -1
  53. package/resources/conversation-flow.mjs +12 -12
  54. package/resources/conversation-flow.mjs.map +1 -1
  55. package/resources/index.d.mts +9 -9
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +9 -9
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/llm.d.mts +24 -24
  60. package/resources/llm.d.mts.map +1 -1
  61. package/resources/llm.d.ts +24 -24
  62. package/resources/llm.d.ts.map +1 -1
  63. package/resources/llm.js +11 -11
  64. package/resources/llm.js.map +1 -1
  65. package/resources/llm.mjs +11 -11
  66. package/resources/llm.mjs.map +1 -1
  67. package/resources/phone-number.d.mts +130 -130
  68. package/resources/phone-number.d.mts.map +1 -1
  69. package/resources/phone-number.d.ts +130 -130
  70. package/resources/phone-number.d.ts.map +1 -1
  71. package/resources/phone-number.js +27 -27
  72. package/resources/phone-number.js.map +1 -1
  73. package/resources/phone-number.mjs +27 -27
  74. package/resources/phone-number.mjs.map +1 -1
  75. package/resources/tests.d.mts +95 -95
  76. package/resources/tests.d.mts.map +1 -1
  77. package/resources/tests.d.ts +95 -95
  78. package/resources/tests.d.ts.map +1 -1
  79. package/resources/tests.js +27 -27
  80. package/resources/tests.js.map +1 -1
  81. package/resources/tests.mjs +27 -27
  82. package/resources/tests.mjs.map +1 -1
  83. package/resources/voice.d.mts +8 -8
  84. package/resources/voice.d.mts.map +1 -1
  85. package/resources/voice.d.ts +8 -8
  86. package/resources/voice.d.ts.map +1 -1
  87. package/resources/voice.js +12 -12
  88. package/resources/voice.js.map +1 -1
  89. package/resources/voice.mjs +12 -12
  90. package/resources/voice.mjs.map +1 -1
  91. package/src/client.ts +18 -18
  92. package/src/resources/agent.ts +90 -90
  93. package/src/resources/call.ts +1821 -1821
  94. package/src/resources/chat-agent.ts +95 -95
  95. package/src/resources/chat.ts +112 -112
  96. package/src/resources/conversation-flow-component.ts +34 -34
  97. package/src/resources/conversation-flow.ts +34 -34
  98. package/src/resources/index.ts +18 -18
  99. package/src/resources/llm.ts +30 -30
  100. package/src/resources/phone-number.ts +152 -152
  101. package/src/resources/tests.ts +136 -136
  102. package/src/resources/voice.ts +12 -12
  103. package/src/version.ts +1 -1
  104. package/version.d.mts +1 -1
  105. package/version.d.ts +1 -1
  106. package/version.js +1 -1
  107. package/version.mjs +1 -1
@@ -7,6 +7,13 @@ import { RequestOptions } from '../internal/request-options';
7
7
  import { path } from '../internal/utils/path';
8
8
 
9
9
  export class Tests extends APIResource {
10
+ /**
11
+ * Create a batch test to run multiple test cases
12
+ */
13
+ createBatchTest(body: TestCreateBatchTestParams, options?: RequestOptions): APIPromise<BatchTestResponse> {
14
+ return this._client.post('/create-batch-test', { body, ...options });
15
+ }
16
+
10
17
  /**
11
18
  * Create a new test case definition
12
19
  */
@@ -18,58 +25,37 @@ export class Tests extends APIResource {
18
25
  }
19
26
 
20
27
  /**
21
- * Get a test case definition by ID
28
+ * Delete a test case definition
22
29
  */
23
- getTestCaseDefinition(
24
- testCaseDefinitionID: string,
25
- options?: RequestOptions,
26
- ): APIPromise<TestCaseDefinitionResponse> {
27
- return this._client.get(path`/get-test-case-definition/${testCaseDefinitionID}`, options);
30
+ deleteTestCaseDefinition(testCaseDefinitionID: string, options?: RequestOptions): APIPromise<void> {
31
+ return this._client.delete(path`/delete-test-case-definition/${testCaseDefinitionID}`, {
32
+ ...options,
33
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
34
+ });
28
35
  }
29
36
 
30
37
  /**
31
- * List test case definitions with pagination
38
+ * Get a batch test job by ID
32
39
  */
33
- listTestCaseDefinitions(
34
- query: TestListTestCaseDefinitionsParams,
35
- options?: RequestOptions,
36
- ): APIPromise<TestListTestCaseDefinitionsResponse> {
37
- return this._client.get('/v2/list-test-case-definitions', { query, ...options });
40
+ getBatchTest(testCaseBatchJobID: string, options?: RequestOptions): APIPromise<BatchTestResponse> {
41
+ return this._client.get(path`/get-batch-test/${testCaseBatchJobID}`, options);
38
42
  }
39
43
 
40
44
  /**
41
- * Update a test case definition
45
+ * Get a test case definition by ID
42
46
  */
43
- updateTestCaseDefinition(
47
+ getTestCaseDefinition(
44
48
  testCaseDefinitionID: string,
45
- body: TestUpdateTestCaseDefinitionParams,
46
49
  options?: RequestOptions,
47
50
  ): APIPromise<TestCaseDefinitionResponse> {
48
- return this._client.put(path`/update-test-case-definition/${testCaseDefinitionID}`, { body, ...options });
49
- }
50
-
51
- /**
52
- * Delete a test case definition
53
- */
54
- deleteTestCaseDefinition(testCaseDefinitionID: string, options?: RequestOptions): APIPromise<void> {
55
- return this._client.delete(path`/delete-test-case-definition/${testCaseDefinitionID}`, {
56
- ...options,
57
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
58
- });
59
- }
60
-
61
- /**
62
- * Create a batch test to run multiple test cases
63
- */
64
- createBatchTest(body: TestCreateBatchTestParams, options?: RequestOptions): APIPromise<BatchTestResponse> {
65
- return this._client.post('/create-batch-test', { body, ...options });
51
+ return this._client.get(path`/get-test-case-definition/${testCaseDefinitionID}`, options);
66
52
  }
67
53
 
68
54
  /**
69
- * Get a batch test job by ID
55
+ * Get a test case job (test run) by ID
70
56
  */
71
- getBatchTest(testCaseBatchJobID: string, options?: RequestOptions): APIPromise<BatchTestResponse> {
72
- return this._client.get(path`/get-batch-test/${testCaseBatchJobID}`, options);
57
+ getTestRun(testCaseJobID: string, options?: RequestOptions): APIPromise<TestCaseJobResponse> {
58
+ return this._client.get(path`/get-test-run/${testCaseJobID}`, options);
73
59
  }
74
60
 
75
61
  /**
@@ -83,10 +69,13 @@ export class Tests extends APIResource {
83
69
  }
84
70
 
85
71
  /**
86
- * Get a test case job (test run) by ID
72
+ * List test case definitions with pagination
87
73
  */
88
- getTestRun(testCaseJobID: string, options?: RequestOptions): APIPromise<TestCaseJobResponse> {
89
- return this._client.get(path`/get-test-run/${testCaseJobID}`, options);
74
+ listTestCaseDefinitions(
75
+ query: TestListTestCaseDefinitionsParams,
76
+ options?: RequestOptions,
77
+ ): APIPromise<TestListTestCaseDefinitionsResponse> {
78
+ return this._client.get('/v2/list-test-case-definitions', { query, ...options });
90
79
  }
91
80
 
92
81
  /**
@@ -99,6 +88,17 @@ export class Tests extends APIResource {
99
88
  ): APIPromise<TestListTestRunsResponse> {
100
89
  return this._client.get(path`/v2/list-test-runs/${testCaseBatchJobID}`, { query, ...options });
101
90
  }
91
+
92
+ /**
93
+ * Update a test case definition
94
+ */
95
+ updateTestCaseDefinition(
96
+ testCaseDefinitionID: string,
97
+ body: TestUpdateTestCaseDefinitionParams,
98
+ options?: RequestOptions,
99
+ ): APIPromise<TestCaseDefinitionResponse> {
100
+ return this._client.put(path`/update-test-case-definition/${testCaseDefinitionID}`, { body, ...options });
101
+ }
102
102
  }
103
103
 
104
104
  export interface BatchTestResponse {
@@ -457,6 +457,56 @@ export interface TestListTestRunsResponse {
457
457
  pagination_key?: string;
458
458
  }
459
459
 
460
+ export interface TestCreateBatchTestParams {
461
+ /**
462
+ * Response engine to use for the test cases. Custom LLM is not supported.
463
+ */
464
+ response_engine:
465
+ | TestCreateBatchTestParams.ResponseEngineRetellLm
466
+ | TestCreateBatchTestParams.ResponseEngineConversationFlow;
467
+
468
+ /**
469
+ * Array of test case definition IDs to run
470
+ */
471
+ test_case_definition_ids: Array<string>;
472
+ }
473
+
474
+ export namespace TestCreateBatchTestParams {
475
+ export interface ResponseEngineRetellLm {
476
+ /**
477
+ * id of the Retell LLM Response Engine.
478
+ */
479
+ llm_id: string;
480
+
481
+ /**
482
+ * type of the Response Engine.
483
+ */
484
+ type: 'retell-llm';
485
+
486
+ /**
487
+ * Version of the Retell LLM Response Engine.
488
+ */
489
+ version?: number | null;
490
+ }
491
+
492
+ export interface ResponseEngineConversationFlow {
493
+ /**
494
+ * ID of the Conversation Flow Response Engine.
495
+ */
496
+ conversation_flow_id: string;
497
+
498
+ /**
499
+ * type of the Response Engine.
500
+ */
501
+ type: 'conversation-flow';
502
+
503
+ /**
504
+ * Version of the Conversation Flow Response Engine.
505
+ */
506
+ version?: number | null;
507
+ }
508
+ }
509
+
460
510
  export interface TestCreateTestCaseDefinitionParams {
461
511
  /**
462
512
  * Array of metric names to evaluate
@@ -610,6 +660,38 @@ export namespace TestCreateTestCaseDefinitionParams {
610
660
  }
611
661
  }
612
662
 
663
+ export interface TestListBatchTestsParams {
664
+ /**
665
+ * Type of response engine
666
+ */
667
+ type: 'retell-llm' | 'conversation-flow';
668
+
669
+ /**
670
+ * Conversation flow ID (required when type is conversation-flow)
671
+ */
672
+ conversation_flow_id?: string;
673
+
674
+ /**
675
+ * Maximum number of items to return.
676
+ */
677
+ limit?: number;
678
+
679
+ /**
680
+ * LLM ID (required when type is retell-llm)
681
+ */
682
+ llm_id?: string;
683
+
684
+ /**
685
+ * Pagination key for fetching the next page.
686
+ */
687
+ pagination_key?: string;
688
+
689
+ /**
690
+ * Version of the response engine (defaults to latest)
691
+ */
692
+ version?: number;
693
+ }
694
+
613
695
  export interface TestListTestCaseDefinitionsParams {
614
696
  /**
615
697
  * Type of response engine
@@ -637,6 +719,18 @@ export interface TestListTestCaseDefinitionsParams {
637
719
  pagination_key?: string;
638
720
  }
639
721
 
722
+ export interface TestListTestRunsParams {
723
+ /**
724
+ * Maximum number of items to return.
725
+ */
726
+ limit?: number;
727
+
728
+ /**
729
+ * Pagination key for fetching the next page.
730
+ */
731
+ pagination_key?: string;
732
+ }
733
+
640
734
  export interface TestUpdateTestCaseDefinitionParams {
641
735
  /**
642
736
  * Dynamic variables to inject into the response engine
@@ -790,100 +884,6 @@ export namespace TestUpdateTestCaseDefinitionParams {
790
884
  }
791
885
  }
792
886
 
793
- export interface TestCreateBatchTestParams {
794
- /**
795
- * Response engine to use for the test cases. Custom LLM is not supported.
796
- */
797
- response_engine:
798
- | TestCreateBatchTestParams.ResponseEngineRetellLm
799
- | TestCreateBatchTestParams.ResponseEngineConversationFlow;
800
-
801
- /**
802
- * Array of test case definition IDs to run
803
- */
804
- test_case_definition_ids: Array<string>;
805
- }
806
-
807
- export namespace TestCreateBatchTestParams {
808
- export interface ResponseEngineRetellLm {
809
- /**
810
- * id of the Retell LLM Response Engine.
811
- */
812
- llm_id: string;
813
-
814
- /**
815
- * type of the Response Engine.
816
- */
817
- type: 'retell-llm';
818
-
819
- /**
820
- * Version of the Retell LLM Response Engine.
821
- */
822
- version?: number | null;
823
- }
824
-
825
- export interface ResponseEngineConversationFlow {
826
- /**
827
- * ID of the Conversation Flow Response Engine.
828
- */
829
- conversation_flow_id: string;
830
-
831
- /**
832
- * type of the Response Engine.
833
- */
834
- type: 'conversation-flow';
835
-
836
- /**
837
- * Version of the Conversation Flow Response Engine.
838
- */
839
- version?: number | null;
840
- }
841
- }
842
-
843
- export interface TestListBatchTestsParams {
844
- /**
845
- * Type of response engine
846
- */
847
- type: 'retell-llm' | 'conversation-flow';
848
-
849
- /**
850
- * Conversation flow ID (required when type is conversation-flow)
851
- */
852
- conversation_flow_id?: string;
853
-
854
- /**
855
- * Maximum number of items to return.
856
- */
857
- limit?: number;
858
-
859
- /**
860
- * LLM ID (required when type is retell-llm)
861
- */
862
- llm_id?: string;
863
-
864
- /**
865
- * Pagination key for fetching the next page.
866
- */
867
- pagination_key?: string;
868
-
869
- /**
870
- * Version of the response engine (defaults to latest)
871
- */
872
- version?: number;
873
- }
874
-
875
- export interface TestListTestRunsParams {
876
- /**
877
- * Maximum number of items to return.
878
- */
879
- limit?: number;
880
-
881
- /**
882
- * Pagination key for fetching the next page.
883
- */
884
- pagination_key?: string;
885
- }
886
-
887
887
  export declare namespace Tests {
888
888
  export {
889
889
  type BatchTestResponse as BatchTestResponse,
@@ -892,11 +892,11 @@ export declare namespace Tests {
892
892
  type TestListBatchTestsResponse as TestListBatchTestsResponse,
893
893
  type TestListTestCaseDefinitionsResponse as TestListTestCaseDefinitionsResponse,
894
894
  type TestListTestRunsResponse as TestListTestRunsResponse,
895
- type TestCreateTestCaseDefinitionParams as TestCreateTestCaseDefinitionParams,
896
- type TestListTestCaseDefinitionsParams as TestListTestCaseDefinitionsParams,
897
- type TestUpdateTestCaseDefinitionParams as TestUpdateTestCaseDefinitionParams,
898
895
  type TestCreateBatchTestParams as TestCreateBatchTestParams,
896
+ type TestCreateTestCaseDefinitionParams as TestCreateTestCaseDefinitionParams,
899
897
  type TestListBatchTestsParams as TestListBatchTestsParams,
898
+ type TestListTestCaseDefinitionsParams as TestListTestCaseDefinitionsParams,
900
899
  type TestListTestRunsParams as TestListTestRunsParams,
900
+ type TestUpdateTestCaseDefinitionParams as TestUpdateTestCaseDefinitionParams,
901
901
  };
902
902
  }
@@ -9,31 +9,31 @@ import { path } from '../internal/utils/path';
9
9
 
10
10
  export class Voice extends APIResource {
11
11
  /**
12
- * Add a community voice to the voice library
12
+ * Retrieve details of a specific voice
13
13
  */
14
- addResource(body: VoiceAddResourceParams, options?: RequestOptions): APIPromise<VoiceResponse> {
15
- return this._client.post('/add-community-voice', { body, ...options });
14
+ retrieve(voiceID: string, options?: RequestOptions): APIPromise<VoiceResponse> {
15
+ return this._client.get(path`/get-voice/${voiceID}`, options);
16
16
  }
17
17
 
18
18
  /**
19
- * Clone a voice from audio files
19
+ * List all voices available to the user
20
20
  */
21
- clone(body: VoiceCloneParams, options?: RequestOptions): APIPromise<VoiceResponse> {
22
- return this._client.post('/clone-voice', multipartFormRequestOptions({ body, ...options }, this._client));
21
+ list(options?: RequestOptions): APIPromise<VoiceListResponse> {
22
+ return this._client.get('/list-voices', options);
23
23
  }
24
24
 
25
25
  /**
26
- * Retrieve details of a specific voice
26
+ * Add a community voice to the voice library
27
27
  */
28
- retrieve(voiceID: string, options?: RequestOptions): APIPromise<VoiceResponse> {
29
- return this._client.get(path`/get-voice/${voiceID}`, options);
28
+ addResource(body: VoiceAddResourceParams, options?: RequestOptions): APIPromise<VoiceResponse> {
29
+ return this._client.post('/add-community-voice', { body, ...options });
30
30
  }
31
31
 
32
32
  /**
33
- * List all voices available to the user
33
+ * Clone a voice from audio files
34
34
  */
35
- list(options?: RequestOptions): APIPromise<VoiceListResponse> {
36
- return this._client.get('/list-voices', options);
35
+ clone(body: VoiceCloneParams, options?: RequestOptions): APIPromise<VoiceResponse> {
36
+ return this._client.post('/clone-voice', multipartFormRequestOptions({ body, ...options }, this._client));
37
37
  }
38
38
 
39
39
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '5.49.1'; // x-release-please-version
1
+ export const VERSION = '5.49.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "5.49.1";
1
+ export declare const VERSION = "5.49.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "5.49.1";
1
+ export declare const VERSION = "5.49.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '5.49.1'; // x-release-please-version
4
+ exports.VERSION = '5.49.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '5.49.1'; // x-release-please-version
1
+ export const VERSION = '5.49.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map