phonic 0.32.10 → 0.32.12
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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +17 -12
- package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/agents/client/Client.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.ts +10 -7
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +4 -0
- package/dist/cjs/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.ts +1 -1
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +5 -1
- package/dist/cjs/api/resources/externalStoragePolicies/client/Client.d.ts +117 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/Client.js +427 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/index.js +17 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/CreateExternalStoragePolicyRequest.d.ts +43 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/CreateExternalStoragePolicyRequest.js +13 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesDeleteRequest.d.ts +10 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesGetRequest.d.ts +10 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesGetRequest.js +3 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesListRequest.d.ts +10 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesListRequest.js +3 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/UpdateExternalStoragePolicyRequest.d.ts +37 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/UpdateExternalStoragePolicyRequest.js +13 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/externalStoragePolicies/client/requests/index.js +7 -0
- package/dist/cjs/api/resources/externalStoragePolicies/exports.d.ts +2 -0
- package/dist/cjs/api/resources/externalStoragePolicies/exports.js +21 -0
- package/dist/cjs/api/resources/externalStoragePolicies/index.d.ts +2 -0
- package/dist/cjs/api/resources/externalStoragePolicies/index.js +18 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesCreateResponse.d.ts +6 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesCreateResponse.js +3 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesDeleteResponse.d.ts +4 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesDeleteResponse.js +3 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesGetResponse.d.ts +4 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesGetResponse.js +3 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesListResponse.d.ts +4 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesListResponse.js +3 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesUpdateResponse.d.ts +4 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesUpdateResponse.js +3 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/externalStoragePolicies/types/index.js +21 -0
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +13 -1
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.js +9 -0
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +10 -0
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +6 -0
- package/dist/cjs/api/types/Agent.d.ts +4 -0
- package/dist/cjs/api/types/AudioChunkPayload.d.ts +1 -1
- package/dist/cjs/api/types/BuiltInToolConfig.d.ts +16 -0
- package/dist/cjs/api/types/BuiltInToolConfig.js +13 -0
- package/dist/cjs/api/types/BuiltInToolConfigs.d.ts +5 -0
- package/dist/cjs/api/types/BuiltInToolConfigs.js +3 -0
- package/dist/cjs/api/types/BuiltInToolDefinition.d.ts +18 -0
- package/dist/cjs/api/types/BuiltInToolDefinition.js +12 -0
- package/dist/cjs/api/types/ConfigOptions.d.ts +4 -2
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +5 -1
- package/dist/cjs/api/types/ExternalStoragePolicy.d.ts +30 -0
- package/dist/cjs/api/types/ExternalStoragePolicy.js +13 -0
- package/dist/cjs/api/types/GenerateReplyPayload.d.ts +2 -0
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +1 -1
- package/dist/cjs/api/types/Tool.d.ts +12 -0
- package/dist/cjs/api/types/Tool.js +9 -0
- package/dist/cjs/api/types/ToolDefinition.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +4 -0
- package/dist/cjs/api/types/index.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/agents/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/agents/client/Client.mjs +3 -0
- package/dist/esm/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.mts +10 -7
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +4 -0
- package/dist/esm/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.mts +1 -1
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +5 -1
- package/dist/esm/api/resources/externalStoragePolicies/client/Client.d.mts +117 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/Client.mjs +390 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/index.d.mts +1 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/index.mjs +1 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/CreateExternalStoragePolicyRequest.d.mts +43 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/CreateExternalStoragePolicyRequest.mjs +10 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesDeleteRequest.d.mts +10 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesGetRequest.d.mts +10 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesGetRequest.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesListRequest.d.mts +10 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/ExternalStoragePoliciesListRequest.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/UpdateExternalStoragePolicyRequest.d.mts +37 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/UpdateExternalStoragePolicyRequest.mjs +10 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/externalStoragePolicies/client/requests/index.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/exports.d.mts +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/exports.mjs +3 -0
- package/dist/esm/api/resources/externalStoragePolicies/index.d.mts +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/index.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesCreateResponse.d.mts +6 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesCreateResponse.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesDeleteResponse.d.mts +4 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesDeleteResponse.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesGetResponse.d.mts +4 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesGetResponse.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesListResponse.d.mts +4 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesListResponse.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesUpdateResponse.d.mts +4 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/ExternalStoragePoliciesUpdateResponse.mjs +2 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/index.d.mts +5 -0
- package/dist/esm/api/resources/externalStoragePolicies/types/index.mjs +5 -0
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +13 -1
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.mjs +9 -0
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +10 -0
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +6 -0
- package/dist/esm/api/types/Agent.d.mts +4 -0
- package/dist/esm/api/types/AudioChunkPayload.d.mts +1 -1
- package/dist/esm/api/types/BuiltInToolConfig.d.mts +16 -0
- package/dist/esm/api/types/BuiltInToolConfig.mjs +10 -0
- package/dist/esm/api/types/BuiltInToolConfigs.d.mts +5 -0
- package/dist/esm/api/types/BuiltInToolConfigs.mjs +2 -0
- package/dist/esm/api/types/BuiltInToolDefinition.d.mts +18 -0
- package/dist/esm/api/types/BuiltInToolDefinition.mjs +9 -0
- package/dist/esm/api/types/ConfigOptions.d.mts +4 -2
- package/dist/esm/api/types/CreateAgentRequest.d.mts +5 -1
- package/dist/esm/api/types/ExternalStoragePolicy.d.mts +30 -0
- package/dist/esm/api/types/ExternalStoragePolicy.mjs +10 -0
- package/dist/esm/api/types/GenerateReplyPayload.d.mts +2 -0
- package/dist/esm/api/types/OutboundCallConfig.d.mts +1 -1
- package/dist/esm/api/types/Tool.d.mts +12 -0
- package/dist/esm/api/types/Tool.mjs +9 -0
- package/dist/esm/api/types/ToolDefinition.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +4 -0
- package/dist/esm/api/types/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -1
- package/reference.md +363 -0
package/dist/esm/Client.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.mjs";
|
|
|
3
3
|
import { AuthClient } from "./api/resources/auth/client/Client.mjs";
|
|
4
4
|
import { ConversationItemsClient } from "./api/resources/conversationItems/client/Client.mjs";
|
|
5
5
|
import { ConversationsClient } from "./api/resources/conversations/client/Client.mjs";
|
|
6
|
+
import { ExternalStoragePoliciesClient } from "./api/resources/externalStoragePolicies/client/Client.mjs";
|
|
6
7
|
import { ExtractionSchemasClient } from "./api/resources/extractionSchemas/client/Client.mjs";
|
|
7
8
|
import { ProjectsClient } from "./api/resources/projects/client/Client.mjs";
|
|
8
9
|
import { ToolsClient } from "./api/resources/tools/client/Client.mjs";
|
|
@@ -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.
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.mjs";
|
|
|
13
13
|
import { AuthClient } from "./api/resources/auth/client/Client.mjs";
|
|
14
14
|
import { ConversationItemsClient } from "./api/resources/conversationItems/client/Client.mjs";
|
|
15
15
|
import { ConversationsClient } from "./api/resources/conversations/client/Client.mjs";
|
|
16
|
+
import { ExternalStoragePoliciesClient } from "./api/resources/externalStoragePolicies/client/Client.mjs";
|
|
16
17
|
import { ExtractionSchemasClient } from "./api/resources/extractionSchemas/client/Client.mjs";
|
|
17
18
|
import { ProjectsClient } from "./api/resources/projects/client/Client.mjs";
|
|
18
19
|
import { ToolsClient } from "./api/resources/tools/client/Client.mjs";
|
|
@@ -70,6 +71,10 @@ export class PhonicClient {
|
|
|
70
71
|
var _a;
|
|
71
72
|
return ((_a = this._workspace) !== null && _a !== void 0 ? _a : (this._workspace = new WorkspaceClient(this._options)));
|
|
72
73
|
}
|
|
74
|
+
get externalStoragePolicies() {
|
|
75
|
+
var _a;
|
|
76
|
+
return ((_a = this._externalStoragePolicies) !== null && _a !== void 0 ? _a : (this._externalStoragePolicies = new ExternalStoragePoliciesClient(this._options)));
|
|
77
|
+
}
|
|
73
78
|
/**
|
|
74
79
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
75
80
|
* This is useful for making requests to endpoints not yet supported in the SDK.
|
|
@@ -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: {
|
|
@@ -529,6 +529,9 @@ export class AgentsClient {
|
|
|
529
529
|
*
|
|
530
530
|
* @example
|
|
531
531
|
* await client.agents.addCustomPhoneNumber("nameOrId", {
|
|
532
|
+
* "X-Sip-Address": "X-Sip-Address",
|
|
533
|
+
* "X-Sip-Auth-Username": "X-Sip-Auth-Username",
|
|
534
|
+
* "X-Sip-Auth-Password": "X-Sip-Auth-Password",
|
|
532
535
|
* project: "main",
|
|
533
536
|
* phone_number: "+15551234567",
|
|
534
537
|
* configuration_endpoint: {
|
package/dist/esm/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.mts
CHANGED
|
@@ -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.
|
|
19
|
-
"X-Sip-Address"
|
|
20
|
-
/** SIP auth username.
|
|
21
|
-
"X-Sip-Auth-Username"
|
|
22
|
-
/** SIP auth password.
|
|
23
|
-
"X-Sip-Auth-Password"
|
|
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;
|
|
@@ -83,6 +83,8 @@ export interface AgentsCreateRequest {
|
|
|
83
83
|
template_variables?: Record<string, Phonic.CreateAgentRequest.TemplateVariables.Value>;
|
|
84
84
|
/** Array of built-in or custom tool names to use. */
|
|
85
85
|
tools?: Phonic.CreateAgentRequest.Tools.Item[];
|
|
86
|
+
/** Configuration overrides for built-in tools, keyed by built-in tool ID. Built-in tools not listed here use their default configuration. */
|
|
87
|
+
built_in_tool_configs?: Phonic.BuiltInToolConfigs;
|
|
86
88
|
/** Array of task objects with `name` and `description` fields. */
|
|
87
89
|
tasks?: Phonic.Task[];
|
|
88
90
|
/** Whether to have the no-input poke text be generated by AI. */
|
|
@@ -137,4 +139,6 @@ export interface AgentsCreateRequest {
|
|
|
137
139
|
mcp_server_ids?: string[];
|
|
138
140
|
/** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
|
|
139
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;
|
|
140
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;
|
|
@@ -83,6 +83,8 @@ export interface UpdateAgentRequest {
|
|
|
83
83
|
template_variables?: Record<string, UpdateAgentRequest.TemplateVariables.Value>;
|
|
84
84
|
/** Array of built-in or custom tool names to use. */
|
|
85
85
|
tools?: UpdateAgentRequest.Tools.Item[];
|
|
86
|
+
/** Configuration overrides for built-in tools, keyed by built-in tool ID. Built-in tools not listed here use their default configuration. */
|
|
87
|
+
built_in_tool_configs?: Phonic.BuiltInToolConfigs;
|
|
86
88
|
/** Array of task objects with `name` and `description` fields. */
|
|
87
89
|
tasks?: Phonic.Task[];
|
|
88
90
|
/** Whether to have the no-input poke text be generated by AI. */
|
|
@@ -143,6 +145,8 @@ export interface UpdateAgentRequest {
|
|
|
143
145
|
mcp_server_ids?: string[];
|
|
144
146
|
/** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
|
|
145
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;
|
|
146
150
|
}
|
|
147
151
|
export declare namespace UpdateAgentRequest {
|
|
148
152
|
const PhoneNumber: {
|
|
@@ -203,7 +207,7 @@ export declare namespace UpdateAgentRequest {
|
|
|
203
207
|
* When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.
|
|
204
208
|
*/
|
|
205
209
|
interface ConfigurationEndpoint {
|
|
206
|
-
/** URL to call */
|
|
210
|
+
/** URL to call. Must be a publicly routable HTTPS URL without embedded credentials. */
|
|
207
211
|
url: string;
|
|
208
212
|
/** Object of key-value pairs. */
|
|
209
213
|
headers?: Record<string, string> | undefined;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../core/index.mjs";
|
|
4
|
+
import * as Phonic from "../../../index.mjs";
|
|
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
|
+
}
|