phonic 0.32.11 → 0.32.13

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 (138) 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 +17 -12
  4. package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -0
  5. package/dist/cjs/api/resources/agents/client/Client.js +3 -0
  6. package/dist/cjs/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.ts +10 -7
  7. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +3 -1
  8. package/dist/cjs/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.ts +1 -1
  9. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +4 -2
  10. package/dist/cjs/api/resources/externalStoragePolicies/client/Client.d.ts +117 -0
  11. package/dist/cjs/api/resources/externalStoragePolicies/client/Client.js +427 -0
  12. package/dist/cjs/api/resources/externalStoragePolicies/client/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/externalStoragePolicies/client/index.js +17 -0
  14. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/CreateExternalStoragePolicyRequest.d.ts +43 -0
  15. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/CreateExternalStoragePolicyRequest.js +13 -0
  16. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesDeleteRequest.d.ts +10 -0
  17. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesDeleteRequest.js +3 -0
  18. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesGetRequest.d.ts +10 -0
  19. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesGetRequest.js +3 -0
  20. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesListRequest.d.ts +10 -0
  21. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesListRequest.js +3 -0
  22. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/UpdateExternalStoragePolicyRequest.d.ts +37 -0
  23. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/UpdateExternalStoragePolicyRequest.js +13 -0
  24. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/index.d.ts +5 -0
  25. package/dist/cjs/api/resources/externalStoragePolicies/client/requests/index.js +7 -0
  26. package/dist/cjs/api/resources/externalStoragePolicies/exports.d.ts +2 -0
  27. package/dist/cjs/api/resources/externalStoragePolicies/exports.js +21 -0
  28. package/dist/cjs/api/resources/externalStoragePolicies/index.d.ts +2 -0
  29. package/dist/cjs/api/resources/externalStoragePolicies/index.js +18 -0
  30. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesCreateResponse.d.ts +6 -0
  31. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesCreateResponse.js +3 -0
  32. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesDeleteResponse.d.ts +4 -0
  33. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesDeleteResponse.js +3 -0
  34. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesGetResponse.d.ts +4 -0
  35. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesGetResponse.js +3 -0
  36. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesListResponse.d.ts +4 -0
  37. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesListResponse.js +3 -0
  38. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesUpdateResponse.d.ts +4 -0
  39. package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesUpdateResponse.js +3 -0
  40. package/dist/cjs/api/resources/externalStoragePolicies/types/index.d.ts +5 -0
  41. package/dist/cjs/api/resources/externalStoragePolicies/types/index.js +21 -0
  42. package/dist/cjs/api/resources/index.d.ts +3 -0
  43. package/dist/cjs/api/resources/index.js +4 -1
  44. package/dist/cjs/api/resources/tools/client/Client.d.ts +65 -0
  45. package/dist/cjs/api/resources/tools/client/Client.js +65 -0
  46. package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +100 -6
  47. package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.js +7 -0
  48. package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +27 -6
  49. package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +8 -1
  50. package/dist/cjs/api/types/Agent.d.ts +3 -1
  51. package/dist/cjs/api/types/ConfigOptions.d.ts +4 -2
  52. package/dist/cjs/api/types/CreateAgentRequest.d.ts +4 -2
  53. package/dist/cjs/api/types/ExternalStoragePolicy.d.ts +30 -0
  54. package/dist/cjs/api/types/ExternalStoragePolicy.js +13 -0
  55. package/dist/cjs/api/types/InlineWebSocketTool.d.ts +2 -0
  56. package/dist/cjs/api/types/OutboundCallConfig.d.ts +2 -2
  57. package/dist/cjs/api/types/Tool.d.ts +26 -2
  58. package/dist/cjs/api/types/Tool.js +7 -0
  59. package/dist/cjs/api/types/ToolParameter.d.ts +5 -2
  60. package/dist/cjs/api/types/ToolParameter.js +2 -1
  61. package/dist/cjs/api/types/ToolParametersJsonSchema.d.ts +15 -0
  62. package/dist/cjs/api/types/ToolParametersJsonSchema.js +3 -0
  63. package/dist/cjs/api/types/index.d.ts +2 -0
  64. package/dist/cjs/api/types/index.js +2 -0
  65. package/dist/cjs/version.d.ts +1 -1
  66. package/dist/cjs/version.js +1 -1
  67. package/dist/esm/BaseClient.mjs +2 -2
  68. package/dist/esm/Client.d.mts +3 -0
  69. package/dist/esm/Client.mjs +5 -0
  70. package/dist/esm/api/resources/agents/client/Client.d.mts +3 -0
  71. package/dist/esm/api/resources/agents/client/Client.mjs +3 -0
  72. package/dist/esm/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.mts +10 -7
  73. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +3 -1
  74. package/dist/esm/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.mts +1 -1
  75. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +4 -2
  76. package/dist/esm/api/resources/externalStoragePolicies/client/Client.d.mts +117 -0
  77. package/dist/esm/api/resources/externalStoragePolicies/client/Client.mjs +390 -0
  78. package/dist/esm/api/resources/externalStoragePolicies/client/index.d.mts +1 -0
  79. package/dist/esm/api/resources/externalStoragePolicies/client/index.mjs +1 -0
  80. package/dist/esm/api/resources/externalStoragePolicies/client/requests/CreateExternalStoragePolicyRequest.d.mts +43 -0
  81. package/dist/esm/api/resources/externalStoragePolicies/client/requests/CreateExternalStoragePolicyRequest.mjs +10 -0
  82. package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesDeleteRequest.d.mts +10 -0
  83. package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesDeleteRequest.mjs +2 -0
  84. package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesGetRequest.d.mts +10 -0
  85. package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesGetRequest.mjs +2 -0
  86. package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesListRequest.d.mts +10 -0
  87. package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesListRequest.mjs +2 -0
  88. package/dist/esm/api/resources/externalStoragePolicies/client/requests/UpdateExternalStoragePolicyRequest.d.mts +37 -0
  89. package/dist/esm/api/resources/externalStoragePolicies/client/requests/UpdateExternalStoragePolicyRequest.mjs +10 -0
  90. package/dist/esm/api/resources/externalStoragePolicies/client/requests/index.d.mts +5 -0
  91. package/dist/esm/api/resources/externalStoragePolicies/client/requests/index.mjs +2 -0
  92. package/dist/esm/api/resources/externalStoragePolicies/exports.d.mts +2 -0
  93. package/dist/esm/api/resources/externalStoragePolicies/exports.mjs +3 -0
  94. package/dist/esm/api/resources/externalStoragePolicies/index.d.mts +2 -0
  95. package/dist/esm/api/resources/externalStoragePolicies/index.mjs +2 -0
  96. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesCreateResponse.d.mts +6 -0
  97. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesCreateResponse.mjs +2 -0
  98. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesDeleteResponse.d.mts +4 -0
  99. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesDeleteResponse.mjs +2 -0
  100. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesGetResponse.d.mts +4 -0
  101. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesGetResponse.mjs +2 -0
  102. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesListResponse.d.mts +4 -0
  103. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesListResponse.mjs +2 -0
  104. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesUpdateResponse.d.mts +4 -0
  105. package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesUpdateResponse.mjs +2 -0
  106. package/dist/esm/api/resources/externalStoragePolicies/types/index.d.mts +5 -0
  107. package/dist/esm/api/resources/externalStoragePolicies/types/index.mjs +5 -0
  108. package/dist/esm/api/resources/index.d.mts +3 -0
  109. package/dist/esm/api/resources/index.mjs +3 -0
  110. package/dist/esm/api/resources/tools/client/Client.d.mts +65 -0
  111. package/dist/esm/api/resources/tools/client/Client.mjs +65 -0
  112. package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +100 -6
  113. package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.mjs +7 -0
  114. package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +27 -6
  115. package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +8 -1
  116. package/dist/esm/api/types/Agent.d.mts +3 -1
  117. package/dist/esm/api/types/ConfigOptions.d.mts +4 -2
  118. package/dist/esm/api/types/CreateAgentRequest.d.mts +4 -2
  119. package/dist/esm/api/types/ExternalStoragePolicy.d.mts +30 -0
  120. package/dist/esm/api/types/ExternalStoragePolicy.mjs +10 -0
  121. package/dist/esm/api/types/InlineWebSocketTool.d.mts +2 -0
  122. package/dist/esm/api/types/OutboundCallConfig.d.mts +2 -2
  123. package/dist/esm/api/types/Tool.d.mts +26 -2
  124. package/dist/esm/api/types/Tool.mjs +7 -0
  125. package/dist/esm/api/types/ToolParameter.d.mts +5 -2
  126. package/dist/esm/api/types/ToolParameter.mjs +2 -1
  127. package/dist/esm/api/types/ToolParametersJsonSchema.d.mts +15 -0
  128. package/dist/esm/api/types/ToolParametersJsonSchema.mjs +2 -0
  129. package/dist/esm/api/types/index.d.mts +2 -0
  130. package/dist/esm/api/types/index.mjs +2 -0
  131. package/dist/esm/version.d.mts +1 -1
  132. package/dist/esm/version.mjs +1 -1
  133. package/dist/index.d.mts +240 -0
  134. package/dist/index.d.ts +240 -0
  135. package/dist/index.js +347 -0
  136. package/dist/index.mjs +310 -0
  137. package/package.json +12 -1
  138. package/reference.md +363 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "phonic",
46
- "X-Fern-SDK-Version": "0.32.11",
47
- "User-Agent": "phonic/0.32.11",
46
+ "X-Fern-SDK-Version": "0.32.13",
47
+ "User-Agent": "phonic/0.32.13",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -3,6 +3,7 @@ import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.js";
3
3
  import { AuthClient } from "./api/resources/auth/client/Client.js";
4
4
  import { ConversationItemsClient } from "./api/resources/conversationItems/client/Client.js";
5
5
  import { ConversationsClient } from "./api/resources/conversations/client/Client.js";
6
+ import { ExternalStoragePoliciesClient } from "./api/resources/externalStoragePolicies/client/Client.js";
6
7
  import { ExtractionSchemasClient } from "./api/resources/extractionSchemas/client/Client.js";
7
8
  import { ProjectsClient } from "./api/resources/projects/client/Client.js";
8
9
  import { ToolsClient } from "./api/resources/tools/client/Client.js";
@@ -39,6 +40,7 @@ export declare class PhonicClient {
39
40
  protected _auth: AuthClient | undefined;
40
41
  protected _projects: ProjectsClient | undefined;
41
42
  protected _workspace: WorkspaceClient | undefined;
43
+ protected _externalStoragePolicies: ExternalStoragePoliciesClient | undefined;
42
44
  constructor(options?: PhonicClient.Options);
43
45
  get agents(): AgentsClient;
44
46
  get apiKeys(): ApiKeysClient;
@@ -51,6 +53,7 @@ export declare class PhonicClient {
51
53
  get auth(): AuthClient;
52
54
  get projects(): ProjectsClient;
53
55
  get workspace(): WorkspaceClient;
56
+ get externalStoragePolicies(): ExternalStoragePoliciesClient;
54
57
  /**
55
58
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
56
59
  * This is useful for making requests to endpoints not yet supported in the SDK.
@@ -49,12 +49,13 @@ const Client_js_2 = require("./api/resources/apiKeys/client/Client.js");
49
49
  const Client_js_3 = require("./api/resources/auth/client/Client.js");
50
50
  const Client_js_4 = require("./api/resources/conversationItems/client/Client.js");
51
51
  const Client_js_5 = require("./api/resources/conversations/client/Client.js");
52
- const Client_js_6 = require("./api/resources/extractionSchemas/client/Client.js");
53
- const Client_js_7 = require("./api/resources/projects/client/Client.js");
54
- const Client_js_8 = require("./api/resources/tools/client/Client.js");
55
- const Client_js_9 = require("./api/resources/tts/client/Client.js");
56
- const Client_js_10 = require("./api/resources/voices/client/Client.js");
57
- const Client_js_11 = require("./api/resources/workspace/client/Client.js");
52
+ const Client_js_6 = require("./api/resources/externalStoragePolicies/client/Client.js");
53
+ const Client_js_7 = require("./api/resources/extractionSchemas/client/Client.js");
54
+ const Client_js_8 = require("./api/resources/projects/client/Client.js");
55
+ const Client_js_9 = require("./api/resources/tools/client/Client.js");
56
+ const Client_js_10 = require("./api/resources/tts/client/Client.js");
57
+ const Client_js_11 = require("./api/resources/voices/client/Client.js");
58
+ const Client_js_12 = require("./api/resources/workspace/client/Client.js");
58
59
  const BaseClient_js_1 = require("./BaseClient.js");
59
60
  const core = __importStar(require("./core/index.js"));
60
61
  const environments = __importStar(require("./environments.js"));
@@ -72,19 +73,19 @@ class PhonicClient {
72
73
  }
73
74
  get tools() {
74
75
  var _a;
75
- return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_8.ToolsClient(this._options)));
76
+ return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_9.ToolsClient(this._options)));
76
77
  }
77
78
  get extractionSchemas() {
78
79
  var _a;
79
- return ((_a = this._extractionSchemas) !== null && _a !== void 0 ? _a : (this._extractionSchemas = new Client_js_6.ExtractionSchemasClient(this._options)));
80
+ return ((_a = this._extractionSchemas) !== null && _a !== void 0 ? _a : (this._extractionSchemas = new Client_js_7.ExtractionSchemasClient(this._options)));
80
81
  }
81
82
  get tts() {
82
83
  var _a;
83
- return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new Client_js_9.TtsClient(this._options)));
84
+ return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new Client_js_10.TtsClient(this._options)));
84
85
  }
85
86
  get voices() {
86
87
  var _a;
87
- return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new Client_js_10.VoicesClient(this._options)));
88
+ return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new Client_js_11.VoicesClient(this._options)));
88
89
  }
89
90
  get conversations() {
90
91
  var _a;
@@ -100,11 +101,15 @@ class PhonicClient {
100
101
  }
101
102
  get projects() {
102
103
  var _a;
103
- return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_js_7.ProjectsClient(this._options)));
104
+ return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_js_8.ProjectsClient(this._options)));
104
105
  }
105
106
  get workspace() {
106
107
  var _a;
107
- return ((_a = this._workspace) !== null && _a !== void 0 ? _a : (this._workspace = new Client_js_11.WorkspaceClient(this._options)));
108
+ return ((_a = this._workspace) !== null && _a !== void 0 ? _a : (this._workspace = new Client_js_12.WorkspaceClient(this._options)));
109
+ }
110
+ get externalStoragePolicies() {
111
+ var _a;
112
+ return ((_a = this._externalStoragePolicies) !== null && _a !== void 0 ? _a : (this._externalStoragePolicies = new Client_js_6.ExternalStoragePoliciesClient(this._options)));
108
113
  }
109
114
  /**
110
115
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
@@ -242,6 +242,9 @@ export declare class AgentsClient {
242
242
  *
243
243
  * @example
244
244
  * await client.agents.addCustomPhoneNumber("nameOrId", {
245
+ * "X-Sip-Address": "X-Sip-Address",
246
+ * "X-Sip-Auth-Username": "X-Sip-Auth-Username",
247
+ * "X-Sip-Auth-Password": "X-Sip-Auth-Password",
245
248
  * project: "main",
246
249
  * phone_number: "+15551234567",
247
250
  * configuration_endpoint: {
@@ -565,6 +565,9 @@ class AgentsClient {
565
565
  *
566
566
  * @example
567
567
  * await client.agents.addCustomPhoneNumber("nameOrId", {
568
+ * "X-Sip-Address": "X-Sip-Address",
569
+ * "X-Sip-Auth-Username": "X-Sip-Auth-Username",
570
+ * "X-Sip-Auth-Password": "X-Sip-Auth-Password",
568
571
  * project: "main",
569
572
  * phone_number: "+15551234567",
570
573
  * configuration_endpoint: {
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
+ * "X-Sip-Address": "X-Sip-Address",
5
+ * "X-Sip-Auth-Username": "X-Sip-Auth-Username",
6
+ * "X-Sip-Auth-Password": "X-Sip-Auth-Password",
4
7
  * project: "main",
5
8
  * phone_number: "+15551234567",
6
9
  * configuration_endpoint: {
@@ -15,12 +18,12 @@
15
18
  export interface AgentsAddCustomPhoneNumberRequest {
16
19
  /** The name of the project containing the agent. Only used when `nameOrId` is a name. */
17
20
  project?: string;
18
- /** SIP address of the user's SIP trunk. Optional, but if provided, all three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. When these headers are provided, call transfers from the agent will use the provided SIP details. */
19
- "X-Sip-Address"?: string;
20
- /** SIP auth username. Optional, but if provided, all three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. When these headers are provided, call transfers from the agent will use the provided SIP details. */
21
- "X-Sip-Auth-Username"?: string;
22
- /** SIP auth password. Optional, but if provided, all three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. When these headers are provided, call transfers from the agent will use the provided SIP details. */
23
- "X-Sip-Auth-Password"?: string;
21
+ /** SIP address of the user's SIP trunk. Required. All three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. They are used for outbound calls and call transfers from the agent. */
22
+ "X-Sip-Address": string;
23
+ /** SIP auth username. Required. All three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. They are used for outbound calls and call transfers from the agent. */
24
+ "X-Sip-Auth-Username": string;
25
+ /** SIP auth password. Required. All three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. They are used for outbound calls and call transfers from the agent. */
26
+ "X-Sip-Auth-Password": string;
24
27
  /** The E.164 formatted phone number to add (e.g., "+15551234567"). */
25
28
  phone_number: string;
26
29
  /** When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number. */
@@ -31,7 +34,7 @@ export declare namespace AgentsAddCustomPhoneNumberRequest {
31
34
  * When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number.
32
35
  */
33
36
  interface ConfigurationEndpoint {
34
- /** URL to call */
37
+ /** URL to call. Must be a publicly routable HTTPS URL without embedded credentials. */
35
38
  url: string;
36
39
  /** Object of key-value pairs. */
37
40
  headers?: Record<string, string> | undefined;
@@ -133,10 +133,12 @@ export interface AgentsCreateRequest {
133
133
  vad_min_silence_duration_ms?: number;
134
134
  /** Voice activity detection threshold. */
135
135
  vad_threshold?: number;
136
- /** 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. */
136
+ /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
137
137
  enable_redaction?: boolean;
138
138
  /** Array of MCP server IDs to make available to the agent. */
139
139
  mcp_server_ids?: string[];
140
140
  /** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
141
141
  observability_integrations?: "braintrust"[];
142
+ /** Name of an external storage policy in the same project that conversation artifacts are delivered to. Requires zero data retention and cannot be combined with `enable_redaction`. */
143
+ external_storage_policy?: string | null;
142
144
  }
@@ -25,7 +25,7 @@ export declare namespace AgentsUpdatePhoneNumberRequest {
25
25
  * When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number.
26
26
  */
27
27
  interface ConfigurationEndpoint {
28
- /** URL to call */
28
+ /** URL to call. Must be a publicly routable HTTPS URL without embedded credentials. */
29
29
  url: string;
30
30
  /** Object of key-value pairs. */
31
31
  headers?: Record<string, string> | undefined;
@@ -139,12 +139,14 @@ export interface UpdateAgentRequest {
139
139
  vad_min_silence_duration_ms?: number;
140
140
  /** Voice activity detection threshold. */
141
141
  vad_threshold?: number;
142
- /** 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. */
142
+ /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
143
143
  enable_redaction?: boolean;
144
144
  /** Array of MCP server IDs to make available to the agent. */
145
145
  mcp_server_ids?: string[];
146
146
  /** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
147
147
  observability_integrations?: "braintrust"[];
148
+ /** Name of an external storage policy in the same project that conversation artifacts are delivered to. Set to `null` to stop delivering artifacts. Requires zero data retention and cannot be combined with `enable_redaction`. */
149
+ external_storage_policy?: string | null;
148
150
  }
149
151
  export declare namespace UpdateAgentRequest {
150
152
  const PhoneNumber: {
@@ -205,7 +207,7 @@ export declare namespace UpdateAgentRequest {
205
207
  * When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.
206
208
  */
207
209
  interface ConfigurationEndpoint {
208
- /** URL to call */
210
+ /** URL to call. Must be a publicly routable HTTPS URL without embedded credentials. */
209
211
  url: string;
210
212
  /** Object of key-value pairs. */
211
213
  headers?: Record<string, string> | undefined;
@@ -0,0 +1,117 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as Phonic from "../../../index.js";
5
+ export declare namespace ExternalStoragePoliciesClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class ExternalStoragePoliciesClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<ExternalStoragePoliciesClient.Options>;
12
+ constructor(options?: ExternalStoragePoliciesClient.Options);
13
+ /**
14
+ * Returns all external storage policies in a project.
15
+ *
16
+ * @param {Phonic.ExternalStoragePoliciesListRequest} request
17
+ * @param {ExternalStoragePoliciesClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link Phonic.NotFoundError}
20
+ * @throws {@link Phonic.InternalServerError}
21
+ *
22
+ * @example
23
+ * await client.externalStoragePolicies.list({
24
+ * project: "main"
25
+ * })
26
+ */
27
+ list(request?: Phonic.ExternalStoragePoliciesListRequest, requestOptions?: ExternalStoragePoliciesClient.RequestOptions): core.HttpResponsePromise<Phonic.ExternalStoragePoliciesListResponse>;
28
+ private __list;
29
+ /**
30
+ * Creates a new external storage policy in a project. Agents referencing the policy deliver their conversation artifacts to the configured S3-compatible bucket.
31
+ *
32
+ * @param {Phonic.CreateExternalStoragePolicyRequest} request
33
+ * @param {ExternalStoragePoliciesClient.RequestOptions} requestOptions - Request-specific configuration.
34
+ *
35
+ * @throws {@link Phonic.BadRequestError}
36
+ * @throws {@link Phonic.UnauthorizedError}
37
+ * @throws {@link Phonic.NotFoundError}
38
+ * @throws {@link Phonic.ConflictError}
39
+ * @throws {@link Phonic.InternalServerError}
40
+ *
41
+ * @example
42
+ * await client.externalStoragePolicies.create({
43
+ * project: "main",
44
+ * name: "conversation_archive",
45
+ * endpoint_url: "https://storage.example.com",
46
+ * bucket: "conversation-audio",
47
+ * region: "us-east-1",
48
+ * key_prefix: "phonic/conversations",
49
+ * addressing_style: "auto",
50
+ * access_key_id: "AKIAIOSFODNN7EXAMPLE",
51
+ * secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
52
+ * })
53
+ */
54
+ create(request: Phonic.CreateExternalStoragePolicyRequest, requestOptions?: ExternalStoragePoliciesClient.RequestOptions): core.HttpResponsePromise<Phonic.ExternalStoragePoliciesCreateResponse>;
55
+ private __create;
56
+ /**
57
+ * Returns an external storage policy by name or ID.
58
+ *
59
+ * @param {string} nameOrId - The name or the ID of the external storage policy to get.
60
+ * @param {Phonic.ExternalStoragePoliciesGetRequest} request
61
+ * @param {ExternalStoragePoliciesClient.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link Phonic.ForbiddenError}
64
+ * @throws {@link Phonic.NotFoundError}
65
+ * @throws {@link Phonic.InternalServerError}
66
+ *
67
+ * @example
68
+ * await client.externalStoragePolicies.get("nameOrId", {
69
+ * project: "main"
70
+ * })
71
+ */
72
+ get(nameOrId: string, request?: Phonic.ExternalStoragePoliciesGetRequest, requestOptions?: ExternalStoragePoliciesClient.RequestOptions): core.HttpResponsePromise<Phonic.ExternalStoragePoliciesGetResponse>;
73
+ private __get;
74
+ /**
75
+ * Deletes an external storage policy by name or ID. The policy must not be referenced by any agent.
76
+ *
77
+ * @param {string} nameOrId - The name or the ID of the external storage policy to delete.
78
+ * @param {Phonic.ExternalStoragePoliciesDeleteRequest} request
79
+ * @param {ExternalStoragePoliciesClient.RequestOptions} requestOptions - Request-specific configuration.
80
+ *
81
+ * @throws {@link Phonic.UnauthorizedError}
82
+ * @throws {@link Phonic.ForbiddenError}
83
+ * @throws {@link Phonic.NotFoundError}
84
+ * @throws {@link Phonic.ConflictError}
85
+ * @throws {@link Phonic.InternalServerError}
86
+ *
87
+ * @example
88
+ * await client.externalStoragePolicies.delete("nameOrId", {
89
+ * project: "main"
90
+ * })
91
+ */
92
+ delete(nameOrId: string, request?: Phonic.ExternalStoragePoliciesDeleteRequest, requestOptions?: ExternalStoragePoliciesClient.RequestOptions): core.HttpResponsePromise<Phonic.ExternalStoragePoliciesDeleteResponse>;
93
+ private __delete;
94
+ /**
95
+ * Updates an external storage policy by name or ID. Credentials can only be rotated by providing both `access_key_id` and `secret_access_key`.
96
+ *
97
+ * @param {string} nameOrId - The name or the ID of the external storage policy to update.
98
+ * @param {Phonic.UpdateExternalStoragePolicyRequest} request
99
+ * @param {ExternalStoragePoliciesClient.RequestOptions} requestOptions - Request-specific configuration.
100
+ *
101
+ * @throws {@link Phonic.BadRequestError}
102
+ * @throws {@link Phonic.UnauthorizedError}
103
+ * @throws {@link Phonic.ForbiddenError}
104
+ * @throws {@link Phonic.NotFoundError}
105
+ * @throws {@link Phonic.ConflictError}
106
+ * @throws {@link Phonic.InternalServerError}
107
+ *
108
+ * @example
109
+ * await client.externalStoragePolicies.update("nameOrId", {
110
+ * project: "main",
111
+ * bucket: "conversation-audio-archive",
112
+ * key_prefix: "phonic/archive"
113
+ * })
114
+ */
115
+ update(nameOrId: string, request?: Phonic.UpdateExternalStoragePolicyRequest, requestOptions?: ExternalStoragePoliciesClient.RequestOptions): core.HttpResponsePromise<Phonic.ExternalStoragePoliciesUpdateResponse>;
116
+ private __update;
117
+ }