phonic 0.32.2 → 0.32.3

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 (212) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +23 -18
  4. package/dist/cjs/api/errors/TooManyRequestsError.d.ts +6 -0
  5. package/dist/cjs/api/errors/TooManyRequestsError.js +54 -0
  6. package/dist/cjs/api/errors/index.d.ts +1 -0
  7. package/dist/cjs/api/errors/index.js +1 -0
  8. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +8 -0
  9. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +14 -0
  10. package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +6 -0
  11. package/dist/cjs/api/resources/agents/types/AgentsUpdateResponse.d.ts +5 -0
  12. package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +79 -0
  13. package/dist/cjs/api/resources/apiKeys/client/Client.js +293 -0
  14. package/dist/cjs/api/resources/apiKeys/client/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/apiKeys/client/index.js +17 -0
  16. package/dist/cjs/api/resources/apiKeys/client/requests/CreateApiKeyRequest.d.ts +10 -0
  17. package/dist/cjs/api/resources/apiKeys/client/requests/CreateApiKeyRequest.js +3 -0
  18. package/dist/cjs/api/resources/apiKeys/client/requests/UpdateApiKeyRequest.d.ts +10 -0
  19. package/dist/cjs/api/resources/apiKeys/client/requests/UpdateApiKeyRequest.js +3 -0
  20. package/dist/cjs/api/resources/apiKeys/client/requests/index.d.ts +2 -0
  21. package/dist/cjs/api/resources/apiKeys/client/requests/index.js +2 -0
  22. package/dist/cjs/api/resources/apiKeys/exports.d.ts +2 -0
  23. package/dist/cjs/api/resources/apiKeys/exports.js +21 -0
  24. package/dist/cjs/api/resources/apiKeys/index.d.ts +2 -0
  25. package/dist/cjs/api/resources/apiKeys/index.js +18 -0
  26. package/dist/cjs/api/resources/apiKeys/types/ApiKeysDeleteResponse.d.ts +3 -0
  27. package/dist/cjs/api/resources/apiKeys/types/ApiKeysDeleteResponse.js +3 -0
  28. package/dist/cjs/api/resources/apiKeys/types/ApiKeysUpdateResponse.d.ts +3 -0
  29. package/dist/cjs/api/resources/apiKeys/types/ApiKeysUpdateResponse.js +3 -0
  30. package/dist/cjs/api/resources/apiKeys/types/index.d.ts +2 -0
  31. package/dist/cjs/api/resources/apiKeys/types/index.js +18 -0
  32. package/dist/cjs/api/resources/auth/client/Client.d.ts +20 -0
  33. package/dist/cjs/api/resources/auth/client/Client.js +70 -0
  34. package/dist/cjs/api/resources/auth/client/requests/CreateConversationTokenRequest.d.ts +13 -0
  35. package/dist/cjs/api/resources/auth/client/requests/CreateConversationTokenRequest.js +3 -0
  36. package/dist/cjs/api/resources/auth/client/requests/index.d.ts +1 -0
  37. package/dist/cjs/api/resources/auth/types/AuthCreateConversationTokenResponse.d.ts +6 -0
  38. package/dist/cjs/api/resources/auth/types/AuthCreateConversationTokenResponse.js +3 -0
  39. package/dist/cjs/api/resources/auth/types/index.d.ts +1 -0
  40. package/dist/cjs/api/resources/auth/types/index.js +1 -0
  41. package/dist/cjs/api/resources/conversations/client/Client.d.ts +26 -1
  42. package/dist/cjs/api/resources/conversations/client/Client.js +78 -0
  43. package/dist/cjs/api/resources/conversations/client/requests/ReplayConversationRequest.d.ts +10 -0
  44. package/dist/cjs/api/resources/conversations/client/requests/ReplayConversationRequest.js +3 -0
  45. package/dist/cjs/api/resources/conversations/client/requests/index.d.ts +1 -0
  46. package/dist/cjs/api/resources/conversations/types/ConversationsEvaluateResponse.d.ts +19 -0
  47. package/dist/cjs/api/resources/conversations/types/ConversationsEvaluateResponse.js +17 -0
  48. package/dist/cjs/api/resources/conversations/types/ConversationsReplayResponse.d.ts +4 -0
  49. package/dist/cjs/api/resources/conversations/types/ConversationsReplayResponse.js +3 -0
  50. package/dist/cjs/api/resources/conversations/types/index.d.ts +2 -0
  51. package/dist/cjs/api/resources/conversations/types/index.js +2 -0
  52. package/dist/cjs/api/resources/index.d.ts +4 -0
  53. package/dist/cjs/api/resources/index.js +5 -1
  54. package/dist/cjs/api/resources/projects/client/Client.d.ts +16 -0
  55. package/dist/cjs/api/resources/projects/client/Client.js +58 -0
  56. package/dist/cjs/api/resources/projects/types/ProjectsListEvalsResponse.d.ts +4 -0
  57. package/dist/cjs/api/resources/projects/types/ProjectsListEvalsResponse.js +3 -0
  58. package/dist/cjs/api/resources/projects/types/index.d.ts +1 -0
  59. package/dist/cjs/api/resources/projects/types/index.js +1 -0
  60. package/dist/cjs/api/resources/tools/client/Client.d.ts +2 -1
  61. package/dist/cjs/api/resources/tools/client/Client.js +2 -1
  62. package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +4 -1
  63. package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +5 -13
  64. package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +0 -8
  65. package/dist/cjs/api/resources/workspace/client/Client.d.ts +20 -0
  66. package/dist/cjs/api/resources/workspace/client/Client.js +65 -0
  67. package/dist/cjs/api/resources/workspace/client/index.d.ts +1 -1
  68. package/dist/cjs/api/resources/workspace/client/index.js +15 -0
  69. package/dist/cjs/api/resources/workspace/client/requests/UpdateWorkspaceRequest.d.ts +16 -0
  70. package/dist/cjs/api/resources/workspace/client/requests/UpdateWorkspaceRequest.js +3 -0
  71. package/dist/cjs/api/resources/workspace/client/requests/index.d.ts +1 -0
  72. package/dist/cjs/api/resources/workspace/client/requests/index.js +2 -0
  73. package/dist/cjs/api/resources/workspace/types/WorkspaceGetResponse.d.ts +6 -0
  74. package/dist/cjs/api/resources/workspace/types/WorkspaceUpdateResponse.d.ts +3 -0
  75. package/dist/cjs/api/resources/workspace/types/WorkspaceUpdateResponse.js +3 -0
  76. package/dist/cjs/api/resources/workspace/types/index.d.ts +1 -0
  77. package/dist/cjs/api/resources/workspace/types/index.js +1 -0
  78. package/dist/cjs/api/types/Agent.d.ts +9 -0
  79. package/dist/cjs/api/types/AgentIntegration.d.ts +13 -0
  80. package/dist/cjs/api/types/AgentIntegration.js +3 -0
  81. package/dist/cjs/api/types/ApiKeyWithSecret.d.ts +8 -0
  82. package/dist/cjs/api/types/ApiKeyWithSecret.js +3 -0
  83. package/dist/cjs/api/types/AudioChunkResponsePayload.d.ts +2 -0
  84. package/dist/cjs/api/types/ConfigOptions.d.ts +67 -0
  85. package/dist/cjs/api/types/Conversation.d.ts +23 -0
  86. package/dist/cjs/api/types/ConversationEval.d.ts +22 -1
  87. package/dist/cjs/api/types/ConversationEval.js +11 -0
  88. package/dist/cjs/api/types/ConversationEvalPromptInfo.d.ts +7 -0
  89. package/dist/cjs/api/types/ConversationEvalPromptInfo.js +3 -0
  90. package/dist/cjs/api/types/ConversationExtraction.d.ts +2 -4
  91. package/dist/cjs/api/types/ConversationItem.d.ts +4 -2
  92. package/dist/cjs/api/types/CreateAgentRequest.d.ts +8 -0
  93. package/dist/cjs/api/types/DataRetentionPolicy.d.ts +21 -0
  94. package/dist/cjs/api/types/DataRetentionPolicy.js +3 -0
  95. package/dist/cjs/api/types/DtmfPayload.d.ts +2 -0
  96. package/dist/cjs/api/types/ExtractionField.d.ts +2 -2
  97. package/dist/cjs/api/types/OutboundCallConfig.d.ts +40 -0
  98. package/dist/cjs/api/types/OutboundCallConfig.js +6 -0
  99. package/dist/cjs/api/types/OutboundNumberPool.d.ts +9 -0
  100. package/dist/cjs/api/types/OutboundNumberPool.js +3 -0
  101. package/dist/cjs/api/types/Tool.d.ts +3 -1
  102. package/dist/cjs/api/types/index.d.ts +5 -0
  103. package/dist/cjs/api/types/index.js +5 -0
  104. package/dist/cjs/version.d.ts +1 -1
  105. package/dist/cjs/version.js +1 -1
  106. package/dist/esm/BaseClient.mjs +2 -2
  107. package/dist/esm/Client.d.mts +3 -0
  108. package/dist/esm/Client.mjs +5 -0
  109. package/dist/esm/api/errors/TooManyRequestsError.d.mts +6 -0
  110. package/dist/esm/api/errors/TooManyRequestsError.mjs +17 -0
  111. package/dist/esm/api/errors/index.d.mts +1 -0
  112. package/dist/esm/api/errors/index.mjs +1 -0
  113. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +8 -0
  114. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +14 -0
  115. package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +6 -0
  116. package/dist/esm/api/resources/agents/types/AgentsUpdateResponse.d.mts +5 -0
  117. package/dist/esm/api/resources/apiKeys/client/Client.d.mts +79 -0
  118. package/dist/esm/api/resources/apiKeys/client/Client.mjs +256 -0
  119. package/dist/esm/api/resources/apiKeys/client/index.d.mts +1 -0
  120. package/dist/esm/api/resources/apiKeys/client/index.mjs +1 -0
  121. package/dist/esm/api/resources/apiKeys/client/requests/CreateApiKeyRequest.d.mts +10 -0
  122. package/dist/esm/api/resources/apiKeys/client/requests/CreateApiKeyRequest.mjs +2 -0
  123. package/dist/esm/api/resources/apiKeys/client/requests/UpdateApiKeyRequest.d.mts +10 -0
  124. package/dist/esm/api/resources/apiKeys/client/requests/UpdateApiKeyRequest.mjs +2 -0
  125. package/dist/esm/api/resources/apiKeys/client/requests/index.d.mts +2 -0
  126. package/dist/esm/api/resources/apiKeys/client/requests/index.mjs +1 -0
  127. package/dist/esm/api/resources/apiKeys/exports.d.mts +2 -0
  128. package/dist/esm/api/resources/apiKeys/exports.mjs +3 -0
  129. package/dist/esm/api/resources/apiKeys/index.d.mts +2 -0
  130. package/dist/esm/api/resources/apiKeys/index.mjs +2 -0
  131. package/dist/esm/api/resources/apiKeys/types/ApiKeysDeleteResponse.d.mts +3 -0
  132. package/dist/esm/api/resources/apiKeys/types/ApiKeysDeleteResponse.mjs +2 -0
  133. package/dist/esm/api/resources/apiKeys/types/ApiKeysUpdateResponse.d.mts +3 -0
  134. package/dist/esm/api/resources/apiKeys/types/ApiKeysUpdateResponse.mjs +2 -0
  135. package/dist/esm/api/resources/apiKeys/types/index.d.mts +2 -0
  136. package/dist/esm/api/resources/apiKeys/types/index.mjs +2 -0
  137. package/dist/esm/api/resources/auth/client/Client.d.mts +20 -0
  138. package/dist/esm/api/resources/auth/client/Client.mjs +70 -0
  139. package/dist/esm/api/resources/auth/client/requests/CreateConversationTokenRequest.d.mts +13 -0
  140. package/dist/esm/api/resources/auth/client/requests/CreateConversationTokenRequest.mjs +2 -0
  141. package/dist/esm/api/resources/auth/client/requests/index.d.mts +1 -0
  142. package/dist/esm/api/resources/auth/types/AuthCreateConversationTokenResponse.d.mts +6 -0
  143. package/dist/esm/api/resources/auth/types/AuthCreateConversationTokenResponse.mjs +2 -0
  144. package/dist/esm/api/resources/auth/types/index.d.mts +1 -0
  145. package/dist/esm/api/resources/auth/types/index.mjs +1 -0
  146. package/dist/esm/api/resources/conversations/client/Client.d.mts +26 -1
  147. package/dist/esm/api/resources/conversations/client/Client.mjs +78 -0
  148. package/dist/esm/api/resources/conversations/client/requests/ReplayConversationRequest.d.mts +10 -0
  149. package/dist/esm/api/resources/conversations/client/requests/ReplayConversationRequest.mjs +2 -0
  150. package/dist/esm/api/resources/conversations/client/requests/index.d.mts +1 -0
  151. package/dist/esm/api/resources/conversations/types/ConversationsEvaluateResponse.d.mts +19 -0
  152. package/dist/esm/api/resources/conversations/types/ConversationsEvaluateResponse.mjs +14 -0
  153. package/dist/esm/api/resources/conversations/types/ConversationsReplayResponse.d.mts +4 -0
  154. package/dist/esm/api/resources/conversations/types/ConversationsReplayResponse.mjs +2 -0
  155. package/dist/esm/api/resources/conversations/types/index.d.mts +2 -0
  156. package/dist/esm/api/resources/conversations/types/index.mjs +2 -0
  157. package/dist/esm/api/resources/index.d.mts +4 -0
  158. package/dist/esm/api/resources/index.mjs +4 -0
  159. package/dist/esm/api/resources/projects/client/Client.d.mts +16 -0
  160. package/dist/esm/api/resources/projects/client/Client.mjs +58 -0
  161. package/dist/esm/api/resources/projects/types/ProjectsListEvalsResponse.d.mts +4 -0
  162. package/dist/esm/api/resources/projects/types/ProjectsListEvalsResponse.mjs +2 -0
  163. package/dist/esm/api/resources/projects/types/index.d.mts +1 -0
  164. package/dist/esm/api/resources/projects/types/index.mjs +1 -0
  165. package/dist/esm/api/resources/tools/client/Client.d.mts +2 -1
  166. package/dist/esm/api/resources/tools/client/Client.mjs +2 -1
  167. package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +4 -1
  168. package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +5 -13
  169. package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +0 -8
  170. package/dist/esm/api/resources/workspace/client/Client.d.mts +20 -0
  171. package/dist/esm/api/resources/workspace/client/Client.mjs +65 -0
  172. package/dist/esm/api/resources/workspace/client/index.d.mts +1 -1
  173. package/dist/esm/api/resources/workspace/client/index.mjs +1 -1
  174. package/dist/esm/api/resources/workspace/client/requests/UpdateWorkspaceRequest.d.mts +16 -0
  175. package/dist/esm/api/resources/workspace/client/requests/UpdateWorkspaceRequest.mjs +2 -0
  176. package/dist/esm/api/resources/workspace/client/requests/index.d.mts +1 -0
  177. package/dist/esm/api/resources/workspace/client/requests/index.mjs +1 -0
  178. package/dist/esm/api/resources/workspace/types/WorkspaceGetResponse.d.mts +6 -0
  179. package/dist/esm/api/resources/workspace/types/WorkspaceUpdateResponse.d.mts +3 -0
  180. package/dist/esm/api/resources/workspace/types/WorkspaceUpdateResponse.mjs +2 -0
  181. package/dist/esm/api/resources/workspace/types/index.d.mts +1 -0
  182. package/dist/esm/api/resources/workspace/types/index.mjs +1 -0
  183. package/dist/esm/api/types/Agent.d.mts +9 -0
  184. package/dist/esm/api/types/AgentIntegration.d.mts +13 -0
  185. package/dist/esm/api/types/AgentIntegration.mjs +2 -0
  186. package/dist/esm/api/types/ApiKeyWithSecret.d.mts +8 -0
  187. package/dist/esm/api/types/ApiKeyWithSecret.mjs +2 -0
  188. package/dist/esm/api/types/AudioChunkResponsePayload.d.mts +2 -0
  189. package/dist/esm/api/types/ConfigOptions.d.mts +67 -0
  190. package/dist/esm/api/types/Conversation.d.mts +23 -0
  191. package/dist/esm/api/types/ConversationEval.d.mts +22 -1
  192. package/dist/esm/api/types/ConversationEval.mjs +10 -1
  193. package/dist/esm/api/types/ConversationEvalPromptInfo.d.mts +7 -0
  194. package/dist/esm/api/types/ConversationEvalPromptInfo.mjs +2 -0
  195. package/dist/esm/api/types/ConversationExtraction.d.mts +2 -4
  196. package/dist/esm/api/types/ConversationItem.d.mts +4 -2
  197. package/dist/esm/api/types/CreateAgentRequest.d.mts +8 -0
  198. package/dist/esm/api/types/DataRetentionPolicy.d.mts +21 -0
  199. package/dist/esm/api/types/DataRetentionPolicy.mjs +2 -0
  200. package/dist/esm/api/types/DtmfPayload.d.mts +2 -0
  201. package/dist/esm/api/types/ExtractionField.d.mts +2 -2
  202. package/dist/esm/api/types/OutboundCallConfig.d.mts +40 -0
  203. package/dist/esm/api/types/OutboundCallConfig.mjs +6 -0
  204. package/dist/esm/api/types/OutboundNumberPool.d.mts +9 -0
  205. package/dist/esm/api/types/OutboundNumberPool.mjs +2 -0
  206. package/dist/esm/api/types/Tool.d.mts +3 -1
  207. package/dist/esm/api/types/index.d.mts +5 -0
  208. package/dist/esm/api/types/index.mjs +5 -0
  209. package/dist/esm/version.d.mts +1 -1
  210. package/dist/esm/version.mjs +1 -1
  211. package/package.json +12 -1
  212. package/reference.md +540 -2
@@ -491,5 +491,63 @@ class ProjectsClient {
491
491
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/projects/{id}/conversation_eval_prompts");
492
492
  });
493
493
  }
494
+ /**
495
+ * Returns all conversation evaluation results for a project.
496
+ *
497
+ * @param {string} id - The ID of the project.
498
+ * @param {ProjectsClient.RequestOptions} requestOptions - Request-specific configuration.
499
+ *
500
+ * @throws {@link Phonic.UnauthorizedError}
501
+ * @throws {@link Phonic.ForbiddenError}
502
+ * @throws {@link Phonic.NotFoundError}
503
+ * @throws {@link Phonic.InternalServerError}
504
+ *
505
+ * @example
506
+ * await client.projects.listEvals("id")
507
+ */
508
+ listEvals(id, requestOptions) {
509
+ return core.HttpResponsePromise.fromPromise(this.__listEvals(id, requestOptions));
510
+ }
511
+ __listEvals(id, requestOptions) {
512
+ return __awaiter(this, void 0, void 0, function* () {
513
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
514
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
515
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
516
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
517
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
518
+ .base, `projects/${core.url.encodePathParam(id)}/conversation_evals`),
519
+ method: "GET",
520
+ headers: _headers,
521
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
522
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
523
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
524
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
525
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
526
+ logging: this._options.logging,
527
+ });
528
+ if (_response.ok) {
529
+ return { data: _response.body, rawResponse: _response.rawResponse };
530
+ }
531
+ if (_response.error.reason === "status-code") {
532
+ switch (_response.error.statusCode) {
533
+ case 401:
534
+ throw new Phonic.UnauthorizedError(_response.error.body, _response.rawResponse);
535
+ case 403:
536
+ throw new Phonic.ForbiddenError(_response.error.body, _response.rawResponse);
537
+ case 404:
538
+ throw new Phonic.NotFoundError(_response.error.body, _response.rawResponse);
539
+ case 500:
540
+ throw new Phonic.InternalServerError(_response.error.body, _response.rawResponse);
541
+ default:
542
+ throw new errors.PhonicError({
543
+ statusCode: _response.error.statusCode,
544
+ body: _response.error.body,
545
+ rawResponse: _response.rawResponse,
546
+ });
547
+ }
548
+ }
549
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/projects/{id}/conversation_evals");
550
+ });
551
+ }
494
552
  }
495
553
  exports.ProjectsClient = ProjectsClient;
@@ -0,0 +1,4 @@
1
+ import type * as Phonic from "../../../index.js";
2
+ export interface ProjectsListEvalsResponse {
3
+ evals: Phonic.ConversationEval[];
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,5 +3,6 @@ export * from "./ProjectsCreateResponse.js";
3
3
  export * from "./ProjectsDeleteResponse.js";
4
4
  export * from "./ProjectsGetResponse.js";
5
5
  export * from "./ProjectsListEvalPromptsResponse.js";
6
+ export * from "./ProjectsListEvalsResponse.js";
6
7
  export * from "./ProjectsListResponse.js";
7
8
  export * from "./ProjectsUpdateResponse.js";
@@ -19,5 +19,6 @@ __exportStar(require("./ProjectsCreateResponse.js"), exports);
19
19
  __exportStar(require("./ProjectsDeleteResponse.js"), exports);
20
20
  __exportStar(require("./ProjectsGetResponse.js"), exports);
21
21
  __exportStar(require("./ProjectsListEvalPromptsResponse.js"), exports);
22
+ __exportStar(require("./ProjectsListEvalsResponse.js"), exports);
22
23
  __exportStar(require("./ProjectsListResponse.js"), exports);
23
24
  __exportStar(require("./ProjectsUpdateResponse.js"), exports);
@@ -50,7 +50,8 @@ export declare class ToolsClient {
50
50
  * }],
51
51
  * require_speech_before_tool_call: false,
52
52
  * forbid_speech_after_tool_call: false,
53
- * allow_tool_chaining: true
53
+ * allow_tool_chaining: true,
54
+ * context: "Press the A button 5 times then gently shake the printer."
54
55
  * })
55
56
  *
56
57
  * @example
@@ -146,7 +146,8 @@ class ToolsClient {
146
146
  * }],
147
147
  * require_speech_before_tool_call: false,
148
148
  * forbid_speech_after_tool_call: false,
149
- * allow_tool_chaining: true
149
+ * allow_tool_chaining: true,
150
+ * context: "Press the A button 5 times then gently shake the printer."
150
151
  * })
151
152
  *
152
153
  * @example
@@ -15,7 +15,8 @@ import type * as Phonic from "../../../../index.js";
15
15
  * }],
16
16
  * require_speech_before_tool_call: false,
17
17
  * forbid_speech_after_tool_call: false,
18
- * allow_tool_chaining: true
18
+ * allow_tool_chaining: true,
19
+ * context: "Press the A button 5 times then gently shake the printer."
19
20
  * }
20
21
  *
21
22
  * @example
@@ -145,6 +146,8 @@ export interface CreateToolRequest {
145
146
  allow_tool_chaining?: boolean;
146
147
  /** The agent doesn't typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools. */
147
148
  wait_for_response?: boolean;
149
+ /** The static context returned to the agent. Required for custom_context tools. */
150
+ context?: string;
148
151
  }
149
152
  export declare namespace CreateToolRequest {
150
153
  /** The type of tool. */
@@ -17,13 +17,13 @@ export interface UpdateToolRequest {
17
17
  name?: string;
18
18
  /** A description of what the tool does. */
19
19
  description?: string;
20
- /** The type of tool. */
21
- type?: UpdateToolRequest.Type;
22
20
  /** Mode of operation. */
23
21
  execution_mode?: UpdateToolRequest.ExecutionMode;
22
+ /** The static context returned to the agent. Only applicable to custom_context tools. */
23
+ context?: string;
24
24
  /**
25
25
  * Array of parameter definitions.
26
- * When updating `type` or `endpoint_method`, all parameters must include explicit `location` values.
26
+ * When updating `endpoint_method`, all parameters must include explicit `location` values.
27
27
  * For `custom_webhook` tools: `location` is required for POST, defaults to `"query_string"` for GET.
28
28
  * For `custom_websocket`, `built_in_transfer_to_phone_number`, and `built_in_transfer_to_agent` tools: `location` must not be specified.
29
29
  */
@@ -31,7 +31,8 @@ export interface UpdateToolRequest {
31
31
  /** HTTP method for webhook tools. When changing this value, all parameters must include explicit `location` values. */
32
32
  endpoint_method?: UpdateToolRequest.EndpointMethod;
33
33
  endpoint_url?: string;
34
- endpoint_headers?: Record<string, string>;
34
+ /** Headers for webhook tools. Set to null to clear existing headers. */
35
+ endpoint_headers?: Record<string, string | null> | null;
35
36
  endpoint_timeout_ms?: number;
36
37
  tool_call_output_timeout_ms?: number;
37
38
  /** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
@@ -56,15 +57,6 @@ export interface UpdateToolRequest {
56
57
  wait_for_response?: boolean;
57
58
  }
58
59
  export declare namespace UpdateToolRequest {
59
- /** The type of tool. */
60
- const Type: {
61
- readonly CustomContext: "custom_context";
62
- readonly CustomWebhook: "custom_webhook";
63
- readonly CustomWebsocket: "custom_websocket";
64
- readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
65
- readonly BuiltInTransferToAgent: "built_in_transfer_to_agent";
66
- };
67
- type Type = (typeof Type)[keyof typeof Type];
68
60
  /** Mode of operation. */
69
61
  const ExecutionMode: {
70
62
  readonly Sync: "sync";
@@ -4,14 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.UpdateToolRequest = void 0;
5
5
  var UpdateToolRequest;
6
6
  (function (UpdateToolRequest) {
7
- /** The type of tool. */
8
- UpdateToolRequest.Type = {
9
- CustomContext: "custom_context",
10
- CustomWebhook: "custom_webhook",
11
- CustomWebsocket: "custom_websocket",
12
- BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number",
13
- BuiltInTransferToAgent: "built_in_transfer_to_agent",
14
- };
15
7
  /** Mode of operation. */
16
8
  UpdateToolRequest.ExecutionMode = {
17
9
  Sync: "sync",
@@ -23,4 +23,24 @@ export declare class WorkspaceClient {
23
23
  */
24
24
  get(requestOptions?: WorkspaceClient.RequestOptions): core.HttpResponsePromise<Phonic.WorkspaceGetResponse>;
25
25
  private __get;
26
+ /**
27
+ * Updates the workspace.
28
+ *
29
+ * @param {Phonic.UpdateWorkspaceRequest} request
30
+ * @param {WorkspaceClient.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @throws {@link Phonic.BadRequestError}
33
+ * @throws {@link Phonic.UnauthorizedError}
34
+ * @throws {@link Phonic.ForbiddenError}
35
+ * @throws {@link Phonic.InternalServerError}
36
+ *
37
+ * @example
38
+ * await client.workspace.update({
39
+ * logo_url: "https://example.com/logo.png",
40
+ * invite_link_allowed_domains: ["example.com"],
41
+ * ip_allowlist: ["203.0.113.0/24"]
42
+ * })
43
+ */
44
+ update(request?: Phonic.UpdateWorkspaceRequest, requestOptions?: WorkspaceClient.RequestOptions): core.HttpResponsePromise<Phonic.WorkspaceUpdateResponse>;
45
+ private __update;
26
46
  }
@@ -106,5 +106,70 @@ class WorkspaceClient {
106
106
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/workspace");
107
107
  });
108
108
  }
109
+ /**
110
+ * Updates the workspace.
111
+ *
112
+ * @param {Phonic.UpdateWorkspaceRequest} request
113
+ * @param {WorkspaceClient.RequestOptions} requestOptions - Request-specific configuration.
114
+ *
115
+ * @throws {@link Phonic.BadRequestError}
116
+ * @throws {@link Phonic.UnauthorizedError}
117
+ * @throws {@link Phonic.ForbiddenError}
118
+ * @throws {@link Phonic.InternalServerError}
119
+ *
120
+ * @example
121
+ * await client.workspace.update({
122
+ * logo_url: "https://example.com/logo.png",
123
+ * invite_link_allowed_domains: ["example.com"],
124
+ * ip_allowlist: ["203.0.113.0/24"]
125
+ * })
126
+ */
127
+ update(request = {}, requestOptions) {
128
+ return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
129
+ }
130
+ __update() {
131
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
132
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
133
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
134
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
135
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
136
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
137
+ .base, "workspace"),
138
+ method: "PATCH",
139
+ headers: _headers,
140
+ contentType: "application/json",
141
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
142
+ requestType: "json",
143
+ body: request,
144
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
145
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
146
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
147
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
148
+ logging: this._options.logging,
149
+ });
150
+ if (_response.ok) {
151
+ return { data: _response.body, rawResponse: _response.rawResponse };
152
+ }
153
+ if (_response.error.reason === "status-code") {
154
+ switch (_response.error.statusCode) {
155
+ case 400:
156
+ throw new Phonic.BadRequestError(_response.error.body, _response.rawResponse);
157
+ case 401:
158
+ throw new Phonic.UnauthorizedError(_response.error.body, _response.rawResponse);
159
+ case 403:
160
+ throw new Phonic.ForbiddenError(_response.error.body, _response.rawResponse);
161
+ case 500:
162
+ throw new Phonic.InternalServerError(_response.error.body, _response.rawResponse);
163
+ default:
164
+ throw new errors.PhonicError({
165
+ statusCode: _response.error.statusCode,
166
+ body: _response.error.body,
167
+ rawResponse: _response.rawResponse,
168
+ });
169
+ }
170
+ }
171
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/workspace");
172
+ });
173
+ }
109
174
  }
110
175
  exports.WorkspaceClient = WorkspaceClient;
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests/index.js";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * logo_url: "https://example.com/logo.png",
5
+ * invite_link_allowed_domains: ["example.com"],
6
+ * ip_allowlist: ["203.0.113.0/24"]
7
+ * }
8
+ */
9
+ export interface UpdateWorkspaceRequest {
10
+ /** URL of the workspace logo. Must be an https URL ending in .png or .svg, or null to clear it. */
11
+ logo_url?: string | null;
12
+ /** Email domains allowed to join the workspace via invite link. */
13
+ invite_link_allowed_domains?: string[];
14
+ /** IP addresses or CIDR ranges allowed to access the workspace. */
15
+ ip_allowlist?: string[];
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { UpdateWorkspaceRequest } from "./UpdateWorkspaceRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,4 +3,10 @@ export interface WorkspaceGetResponse {
3
3
  active_conversations: number;
4
4
  /** Maximum number of concurrent conversations allowed for this workspace. */
5
5
  max_active_conversations: number;
6
+ /** URL of the workspace logo (PNG or SVG), or null if not set. */
7
+ logo_url: string | null;
8
+ /** Email domains allowed to join the workspace via invite link. */
9
+ invite_link_allowed_domains: string[];
10
+ /** IP addresses or CIDR ranges allowed to access the workspace. */
11
+ ip_allowlist: string[];
6
12
  }
@@ -0,0 +1,3 @@
1
+ export interface WorkspaceUpdateResponse {
2
+ success: boolean;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
1
  export * from "./WorkspaceGetResponse.js";
2
+ export * from "./WorkspaceUpdateResponse.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./WorkspaceGetResponse.js"), exports);
18
+ __exportStar(require("./WorkspaceUpdateResponse.js"), exports);
@@ -76,6 +76,15 @@ export interface Agent {
76
76
  vad_threshold?: number | undefined;
77
77
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
78
78
  enable_redaction?: boolean | undefined;
79
+ /** The URL-friendly slug of the agent. */
80
+ slug?: string | undefined;
81
+ /** When `true`, the assistant emits backchannel cues (e.g. "mm-hmm") while the user is speaking. */
82
+ enable_assistant_backchannel?: boolean | undefined;
83
+ /** How aggressively the assistant backchannels, from 0 to 1. */
84
+ assistant_backchannel_aggressiveness?: number | undefined;
85
+ /** Third-party integrations enabled for the agent. */
86
+ integrations?: Phonic.AgentIntegration[] | undefined;
87
+ data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
79
88
  }
80
89
  export declare namespace Agent {
81
90
  /**
@@ -0,0 +1,13 @@
1
+ /**
2
+ * A third-party integration enabled for an agent.
3
+ */
4
+ export interface AgentIntegration {
5
+ /** The connected account ID. */
6
+ account_id: string;
7
+ /** The connected account name. */
8
+ account_name: string | null;
9
+ /** The integration actions available to the agent. */
10
+ action_names: string[];
11
+ /** The slug identifying the integration app. */
12
+ app_slug: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface ApiKeyWithSecret {
2
+ /** The API key ID. */
3
+ id: string;
4
+ /** The name of the API key. */
5
+ name: string;
6
+ /** The API key secret. Only returned once, when the key is created or rotated. */
7
+ api_key: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,4 +4,6 @@ export interface AudioChunkResponsePayload {
4
4
  audio: string;
5
5
  /** Text corresponding to audio chunk */
6
6
  text: string;
7
+ /** Optional latency-breakdown metrics for the audio chunk, expressed as named millisecond durations. Only present on the first audio chunk of a turn. */
8
+ timings?: Record<string, number> | undefined;
7
9
  }
@@ -65,6 +65,23 @@ export interface ConfigOptions {
65
65
  template_variables?: Record<string, string> | undefined;
66
66
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
67
67
  enable_redaction?: boolean | undefined;
68
+ /** Names of pre-configured MCP servers to make available to the assistant. Names must be unique. */
69
+ mcp_servers?: string[] | undefined;
70
+ /** Tasks the assistant should accomplish during the conversation. */
71
+ tasks?: ConfigOptions.Tasks.Item[] | undefined;
72
+ /** Pool of phone numbers to use as the caller ID for outbound calls. */
73
+ outbound_number_pool?: (ConfigOptions.OutboundNumberPool | null) | undefined;
74
+ /** When `true`, the assistant will produce backchannel responses (e.g. "mm-hmm", "yeah") while the user is speaking. */
75
+ enable_assistant_backchannel?: boolean | undefined;
76
+ /** How aggressively the assistant produces backchannel responses. Only applies when `enable_assistant_backchannel` is `true`. */
77
+ assistant_backchannel_aggressiveness?: number | undefined;
78
+ /** When not `null`, the agent will call this endpoint to get configuration options for the conversation. */
79
+ configuration_endpoint?: (ConfigOptions.ConfigurationEndpoint | null) | undefined;
80
+ /**
81
+ * Policy controlling how long transcripts and audio recordings are retained before being deleted.
82
+ * When `zero_data_retention` is `true`, nothing is retained and `transcripts`/`audio_recordings` are omitted.
83
+ */
84
+ data_retention_policy?: ConfigOptions.DataRetentionPolicy | undefined;
68
85
  }
69
86
  export declare namespace ConfigOptions {
70
87
  /** Background noise type for the conversation */
@@ -104,4 +121,54 @@ export declare namespace ConfigOptions {
104
121
  pronunciation: string;
105
122
  }
106
123
  }
124
+ type Tasks = Tasks.Item[];
125
+ namespace Tasks {
126
+ interface Item {
127
+ /** Name of the task. */
128
+ name: string;
129
+ /** Description of the task. */
130
+ description: string;
131
+ }
132
+ }
133
+ /**
134
+ * Pool of phone numbers to use as the caller ID for outbound calls.
135
+ */
136
+ interface OutboundNumberPool {
137
+ /** Active E.164 phone numbers to use for outbound calls. Numbers must be unique. */
138
+ active: string[];
139
+ /** Blocked E.164 phone numbers that should not be used for outbound calls. */
140
+ blocked: string[];
141
+ }
142
+ /**
143
+ * When not `null`, the agent will call this endpoint to get configuration options for the conversation.
144
+ */
145
+ interface ConfigurationEndpoint {
146
+ /** URL to call. */
147
+ url: string;
148
+ /** Object of key-value pairs sent as headers when calling the endpoint. */
149
+ headers?: Record<string, string> | undefined;
150
+ /** Timeout in milliseconds for the endpoint call. */
151
+ timeout_ms?: number | undefined;
152
+ }
153
+ /**
154
+ * Policy controlling how long transcripts and audio recordings are retained before being deleted.
155
+ * When `zero_data_retention` is `true`, nothing is retained and `transcripts`/`audio_recordings` are omitted.
156
+ */
157
+ type DataRetentionPolicy =
158
+ /**
159
+ * Zero data retention mode. No transcripts or audio recordings are retained. */
160
+ {
161
+ zero_data_retention: true;
162
+ }
163
+ /**
164
+ * Standard data retention with configurable deletion windows. */
165
+ | {
166
+ zero_data_retention: false;
167
+ transcripts: {
168
+ delete_after_hours: number | null;
169
+ };
170
+ audio_recordings: {
171
+ delete_after_hours: number | null;
172
+ };
173
+ };
107
174
  }
@@ -86,6 +86,20 @@ export interface Conversation {
86
86
  call_info: Conversation.CallInfo | null;
87
87
  /** Analysis of the conversation including latencies and interruptions. */
88
88
  analysis: Phonic.ConversationAnalysis;
89
+ /** Whether PII and PHI have been redacted from the conversation. */
90
+ is_redacted?: boolean | undefined;
91
+ /** The redacted transcript of the conversation. `null` when the conversation is not redacted. */
92
+ redacted_transcript?: (string | null) | undefined;
93
+ /** Arbitrary metadata associated with the conversation. */
94
+ metadata?: (Record<string, unknown> | null) | undefined;
95
+ /** Controls how long transcripts and audio recordings are retained before deletion. */
96
+ data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
97
+ /** Information about when transcripts and audio recordings are or were scheduled to be deleted. */
98
+ deletion_info?: Conversation.DeletionInfo | undefined;
99
+ /** Whether the assistant produced backchannel responses during the conversation. */
100
+ enable_assistant_backchannel?: boolean | undefined;
101
+ /** How aggressively the assistant produced backchannel responses during the conversation. */
102
+ assistant_backchannel_aggressiveness?: number | undefined;
89
103
  }
90
104
  export declare namespace Conversation {
91
105
  /**
@@ -162,4 +176,13 @@ export declare namespace Conversation {
162
176
  /** Twilio Call SID. Only present for user SIP trunking calls. */
163
177
  twilio_call_sid?: string | undefined;
164
178
  }
179
+ /**
180
+ * Information about when transcripts and audio recordings are or were scheduled to be deleted.
181
+ */
182
+ interface DeletionInfo {
183
+ /** When the transcripts were deleted. `null` if not deleted. */
184
+ transcripts_deleted_at: string | null;
185
+ /** When the audio recordings were deleted. `null` if not deleted. */
186
+ audio_recordings_deleted_at: string | null;
187
+ }
165
188
  }
@@ -1 +1,22 @@
1
- export type ConversationEval = unknown;
1
+ import type * as Phonic from "../index.js";
2
+ export interface ConversationEval {
3
+ /** The evaluation ID. */
4
+ id: string;
5
+ /** The ID of the conversation that was evaluated. */
6
+ conversation_id: string;
7
+ prompt: Phonic.ConversationEvalPromptInfo;
8
+ /** The evaluation result. */
9
+ result: ConversationEval.Result;
10
+ /** When the evaluation was created. */
11
+ created_at: string;
12
+ }
13
+ export declare namespace ConversationEval {
14
+ /** The evaluation result. */
15
+ const Result: {
16
+ readonly Successful: "successful";
17
+ readonly Unsuccessful: "unsuccessful";
18
+ readonly Undecided: "undecided";
19
+ readonly Error: "error";
20
+ };
21
+ type Result = (typeof Result)[keyof typeof Result];
22
+ }
@@ -1,3 +1,14 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ConversationEval = void 0;
5
+ var ConversationEval;
6
+ (function (ConversationEval) {
7
+ /** The evaluation result. */
8
+ ConversationEval.Result = {
9
+ Successful: "successful",
10
+ Unsuccessful: "unsuccessful",
11
+ Undecided: "undecided",
12
+ Error: "error",
13
+ };
14
+ })(ConversationEval || (exports.ConversationEval = ConversationEval = {}));
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The evaluation prompt information.
3
+ */
4
+ export interface ConversationEvalPromptInfo {
5
+ id: string;
6
+ name: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +1,9 @@
1
1
  export interface ConversationExtraction {
2
2
  /** The extraction ID. */
3
3
  id: string;
4
- /** The conversation ID. */
5
- conversation_id?: string | undefined;
6
4
  schema: ConversationExtraction.Schema;
7
5
  /** The extracted data. */
8
6
  result: Record<string, unknown>;
9
- /** Error message if extraction failed. */
10
- error: string | null;
11
7
  /** When the extraction was created. */
12
8
  created_at: string;
13
9
  }
@@ -15,5 +11,7 @@ export declare namespace ConversationExtraction {
15
11
  interface Schema {
16
12
  id: string;
17
13
  name: string;
14
+ /** Whether the extraction schema has been deleted. */
15
+ isDeleted: boolean;
18
16
  }
19
17
  }
@@ -5,10 +5,12 @@ export interface ConversationItem {
5
5
  item_idx: number;
6
6
  /** Who spoke in this turn. */
7
7
  role: ConversationItem.Role;
8
- /** Live transcript of this turn. */
9
- live_transcript: string;
8
+ /** Live transcript of this turn. `null` when the turn has been redacted. */
9
+ live_transcript: string | null;
10
10
  /** Post-call processed transcript. */
11
11
  post_call_transcript: string | null;
12
+ /** The redacted transcript of this turn. `null` when the turn is not redacted. */
13
+ redacted_transcript?: (string | null) | undefined;
12
14
  /** Duration of this turn in milliseconds. */
13
15
  duration_ms: number;
14
16
  /** When this turn started. */