phonic 0.32.11 → 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 +2 -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 +3 -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 +1 -1
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +1 -0
- package/dist/cjs/api/types/Agent.d.ts +2 -0
- package/dist/cjs/api/types/ConfigOptions.d.ts +3 -1
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +3 -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/OutboundCallConfig.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -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 +2 -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 +3 -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 +1 -1
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +1 -0
- package/dist/esm/api/types/Agent.d.mts +2 -0
- package/dist/esm/api/types/ConfigOptions.d.mts +3 -1
- package/dist/esm/api/types/CreateAgentRequest.d.mts +3 -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/OutboundCallConfig.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ExternalStoragePoliciesClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "ExternalStoragePoliciesClient", { enumerable: true, get: function () { return Client_js_1.ExternalStoragePoliciesClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
18
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./ExternalStoragePoliciesCreateResponse.js";
|
|
2
|
+
export * from "./ExternalStoragePoliciesDeleteResponse.js";
|
|
3
|
+
export * from "./ExternalStoragePoliciesGetResponse.js";
|
|
4
|
+
export * from "./ExternalStoragePoliciesListResponse.js";
|
|
5
|
+
export * from "./ExternalStoragePoliciesUpdateResponse.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ExternalStoragePoliciesCreateResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./ExternalStoragePoliciesDeleteResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./ExternalStoragePoliciesGetResponse.js"), exports);
|
|
20
|
+
__exportStar(require("./ExternalStoragePoliciesListResponse.js"), exports);
|
|
21
|
+
__exportStar(require("./ExternalStoragePoliciesUpdateResponse.js"), exports);
|
|
@@ -12,6 +12,9 @@ export * as conversationItems from "./conversationItems/index.js";
|
|
|
12
12
|
export * from "./conversations/client/requests/index.js";
|
|
13
13
|
export * as conversations from "./conversations/index.js";
|
|
14
14
|
export * from "./conversations/types/index.js";
|
|
15
|
+
export * from "./externalStoragePolicies/client/requests/index.js";
|
|
16
|
+
export * as externalStoragePolicies from "./externalStoragePolicies/index.js";
|
|
17
|
+
export * from "./externalStoragePolicies/types/index.js";
|
|
15
18
|
export * from "./extractionSchemas/client/requests/index.js";
|
|
16
19
|
export * as extractionSchemas from "./extractionSchemas/index.js";
|
|
17
20
|
export * from "./extractionSchemas/types/index.js";
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.workspace = exports.voices = exports.tts = exports.tools = exports.projects = exports.extractionSchemas = exports.conversations = exports.conversationItems = exports.auth = exports.apiKeys = exports.agents = void 0;
|
|
39
|
+
exports.workspace = exports.voices = exports.tts = exports.tools = exports.projects = exports.extractionSchemas = exports.externalStoragePolicies = exports.conversations = exports.conversationItems = exports.auth = exports.apiKeys = exports.agents = void 0;
|
|
40
40
|
__exportStar(require("./agents/client/requests/index.js"), exports);
|
|
41
41
|
exports.agents = __importStar(require("./agents/index.js"));
|
|
42
42
|
__exportStar(require("./agents/types/index.js"), exports);
|
|
@@ -51,6 +51,9 @@ exports.conversationItems = __importStar(require("./conversationItems/index.js")
|
|
|
51
51
|
__exportStar(require("./conversations/client/requests/index.js"), exports);
|
|
52
52
|
exports.conversations = __importStar(require("./conversations/index.js"));
|
|
53
53
|
__exportStar(require("./conversations/types/index.js"), exports);
|
|
54
|
+
__exportStar(require("./externalStoragePolicies/client/requests/index.js"), exports);
|
|
55
|
+
exports.externalStoragePolicies = __importStar(require("./externalStoragePolicies/index.js"));
|
|
56
|
+
__exportStar(require("./externalStoragePolicies/types/index.js"), exports);
|
|
54
57
|
__exportStar(require("./extractionSchemas/client/requests/index.js"), exports);
|
|
55
58
|
exports.extractionSchemas = __importStar(require("./extractionSchemas/index.js"));
|
|
56
59
|
__exportStar(require("./extractionSchemas/types/index.js"), exports);
|
|
@@ -119,7 +119,7 @@ export interface CreateToolRequest {
|
|
|
119
119
|
parameters?: Phonic.ToolParameter[];
|
|
120
120
|
/** Required for webhook tools. HTTP method for the webhook endpoint. */
|
|
121
121
|
endpoint_method?: CreateToolRequest.EndpointMethod;
|
|
122
|
-
/** Required for webhook tools. */
|
|
122
|
+
/** Required for webhook tools. Must be a publicly routable HTTPS URL without embedded credentials. */
|
|
123
123
|
endpoint_url?: string;
|
|
124
124
|
/** Optional headers for webhook tools. */
|
|
125
125
|
endpoint_headers?: Record<string, string>;
|
|
@@ -30,6 +30,7 @@ export interface UpdateToolRequest {
|
|
|
30
30
|
parameters?: Phonic.ToolParameter[];
|
|
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
|
+
/** URL for webhook tools. Must be a publicly routable HTTPS URL without embedded credentials. */
|
|
33
34
|
endpoint_url?: string;
|
|
34
35
|
/** Headers for webhook tools. Set to null to clear existing headers. */
|
|
35
36
|
endpoint_headers?: Record<string, string | null> | null;
|
|
@@ -64,6 +64,8 @@ export interface Agent {
|
|
|
64
64
|
boosted_keywords: string[];
|
|
65
65
|
/** Names of observability integrations enabled for the agent. Each must be one of the supported providers. */
|
|
66
66
|
observability_integrations?: "braintrust"[] | undefined;
|
|
67
|
+
/** Name of the external storage policy that conversation artifacts are delivered to. `null` when the agent doesn't deliver artifacts to external storage. */
|
|
68
|
+
external_storage_policy?: (string | null) | undefined;
|
|
67
69
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
68
70
|
pronunciation_dictionary: Agent.PronunciationDictionary.Item[];
|
|
69
71
|
/** Minimum number of words required to interrupt the assistant. */
|
|
@@ -75,6 +75,8 @@ export interface ConfigOptions {
|
|
|
75
75
|
mcp_servers?: string[] | undefined;
|
|
76
76
|
/** Names of observability integrations to enable for the conversation. Each must be one of the supported providers. */
|
|
77
77
|
observability_integrations?: "braintrust"[] | undefined;
|
|
78
|
+
/** Name of an external storage policy in the same project that conversation artifacts are delivered to. Requires `data_retention_policy.zero_data_retention` to be `true` and cannot be combined with `enable_redaction`. Set to `null` to disable external delivery. */
|
|
79
|
+
external_storage_policy?: (string | null) | undefined;
|
|
78
80
|
/** Tasks the assistant should accomplish during the conversation. */
|
|
79
81
|
tasks?: ConfigOptions.Tasks.Item[] | undefined;
|
|
80
82
|
/** Pool of phone numbers to use as the caller ID for outbound calls. */
|
|
@@ -161,7 +163,7 @@ export declare namespace ConfigOptions {
|
|
|
161
163
|
* When not `null`, the agent will call this endpoint to get configuration options for the conversation.
|
|
162
164
|
*/
|
|
163
165
|
interface ConfigurationEndpoint {
|
|
164
|
-
/** URL to call. */
|
|
166
|
+
/** URL to call. Must be a publicly routable HTTPS URL without embedded credentials. */
|
|
165
167
|
url: string;
|
|
166
168
|
/** Object of key-value pairs sent as headers when calling the endpoint. */
|
|
167
169
|
headers?: Record<string, string> | undefined;
|
|
@@ -92,6 +92,8 @@ export interface CreateAgentRequest {
|
|
|
92
92
|
mcp_server_ids?: string[] | undefined;
|
|
93
93
|
/** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
|
|
94
94
|
observability_integrations?: "braintrust"[] | undefined;
|
|
95
|
+
/** 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`. */
|
|
96
|
+
external_storage_policy?: (string | null) | undefined;
|
|
95
97
|
}
|
|
96
98
|
export declare namespace CreateAgentRequest {
|
|
97
99
|
const PhoneNumber: {
|
|
@@ -152,7 +154,7 @@ export declare namespace CreateAgentRequest {
|
|
|
152
154
|
* When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.
|
|
153
155
|
*/
|
|
154
156
|
interface ConfigurationEndpoint {
|
|
155
|
-
/** URL to call */
|
|
157
|
+
/** URL to call. Must be a publicly routable HTTPS URL without embedded credentials. */
|
|
156
158
|
url: string;
|
|
157
159
|
/** Object of key-value pairs. */
|
|
158
160
|
headers?: Record<string, string> | undefined;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An S3-compatible destination that conversation artifacts are delivered to.
|
|
3
|
+
*/
|
|
4
|
+
export interface ExternalStoragePolicy {
|
|
5
|
+
/** The ID of the external storage policy. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** The name of the external storage policy. Agents reference the policy by this name. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** The S3-compatible endpoint URL that artifacts are uploaded to. */
|
|
10
|
+
endpoint_url: string;
|
|
11
|
+
/** The bucket that artifacts are uploaded to. */
|
|
12
|
+
bucket: string;
|
|
13
|
+
/** The region of the bucket. `null` when the endpoint doesn't require a region. */
|
|
14
|
+
region: string | null;
|
|
15
|
+
/** Prefix prepended to every object key. `null` when objects are written at the bucket root. */
|
|
16
|
+
key_prefix: string | null;
|
|
17
|
+
/** How bucket names are addressed in requests to the endpoint. */
|
|
18
|
+
addressing_style: ExternalStoragePolicy.AddressingStyle;
|
|
19
|
+
/** Number of agents currently referencing this external storage policy. */
|
|
20
|
+
agent_count: number;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace ExternalStoragePolicy {
|
|
23
|
+
/** How bucket names are addressed in requests to the endpoint. */
|
|
24
|
+
const AddressingStyle: {
|
|
25
|
+
readonly Auto: "auto";
|
|
26
|
+
readonly Virtual: "virtual";
|
|
27
|
+
readonly Path: "path";
|
|
28
|
+
};
|
|
29
|
+
type AddressingStyle = (typeof AddressingStyle)[keyof typeof AddressingStyle];
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ExternalStoragePolicy = void 0;
|
|
5
|
+
var ExternalStoragePolicy;
|
|
6
|
+
(function (ExternalStoragePolicy) {
|
|
7
|
+
/** How bucket names are addressed in requests to the endpoint. */
|
|
8
|
+
ExternalStoragePolicy.AddressingStyle = {
|
|
9
|
+
Auto: "auto",
|
|
10
|
+
Virtual: "virtual",
|
|
11
|
+
Path: "path",
|
|
12
|
+
};
|
|
13
|
+
})(ExternalStoragePolicy || (exports.ExternalStoragePolicy = ExternalStoragePolicy = {}));
|
|
@@ -113,7 +113,7 @@ export declare namespace OutboundCallConfig {
|
|
|
113
113
|
* When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.
|
|
114
114
|
*/
|
|
115
115
|
interface ConfigurationEndpoint {
|
|
116
|
-
/** URL to call */
|
|
116
|
+
/** URL to call. Must be a publicly routable HTTPS URL without embedded credentials. */
|
|
117
117
|
url: string;
|
|
118
118
|
/** Object of key-value pairs. */
|
|
119
119
|
headers?: Record<string, string> | undefined;
|
|
@@ -33,6 +33,7 @@ export * from "./DataRetentionPolicy.js";
|
|
|
33
33
|
export * from "./DtmfPayload.js";
|
|
34
34
|
export * from "./Error_.js";
|
|
35
35
|
export * from "./ErrorPayload.js";
|
|
36
|
+
export * from "./ExternalStoragePolicy.js";
|
|
36
37
|
export * from "./ExtractionField.js";
|
|
37
38
|
export * from "./ExtractionSchema.js";
|
|
38
39
|
export * from "./GenerateReplyPayload.js";
|
|
@@ -49,6 +49,7 @@ __exportStar(require("./DataRetentionPolicy.js"), exports);
|
|
|
49
49
|
__exportStar(require("./DtmfPayload.js"), exports);
|
|
50
50
|
__exportStar(require("./Error_.js"), exports);
|
|
51
51
|
__exportStar(require("./ErrorPayload.js"), exports);
|
|
52
|
+
__exportStar(require("./ExternalStoragePolicy.js"), exports);
|
|
52
53
|
__exportStar(require("./ExtractionField.js"), exports);
|
|
53
54
|
__exportStar(require("./ExtractionSchema.js"), exports);
|
|
54
55
|
__exportStar(require("./GenerateReplyPayload.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.32.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.12";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "phonic",
|
|
9
|
-
"X-Fern-SDK-Version": "0.32.
|
|
10
|
-
"User-Agent": "phonic/0.32.
|
|
9
|
+
"X-Fern-SDK-Version": "0.32.12",
|
|
10
|
+
"User-Agent": "phonic/0.32.12",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
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;
|
|
@@ -139,4 +139,6 @@ export interface AgentsCreateRequest {
|
|
|
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;
|
|
@@ -145,6 +145,8 @@ export interface UpdateAgentRequest {
|
|
|
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.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
|
+
}
|