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.
- 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 +3 -1
- package/dist/cjs/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.ts +1 -1
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +4 -2
- 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/Client.d.ts +65 -0
- package/dist/cjs/api/resources/tools/client/Client.js +65 -0
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +100 -6
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.js +7 -0
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +27 -6
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +8 -1
- package/dist/cjs/api/types/Agent.d.ts +3 -1
- package/dist/cjs/api/types/ConfigOptions.d.ts +4 -2
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +4 -2
- package/dist/cjs/api/types/ExternalStoragePolicy.d.ts +30 -0
- package/dist/cjs/api/types/ExternalStoragePolicy.js +13 -0
- package/dist/cjs/api/types/InlineWebSocketTool.d.ts +2 -0
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +2 -2
- package/dist/cjs/api/types/Tool.d.ts +26 -2
- package/dist/cjs/api/types/Tool.js +7 -0
- package/dist/cjs/api/types/ToolParameter.d.ts +5 -2
- package/dist/cjs/api/types/ToolParameter.js +2 -1
- package/dist/cjs/api/types/ToolParametersJsonSchema.d.ts +15 -0
- package/dist/cjs/api/types/ToolParametersJsonSchema.js +3 -0
- package/dist/cjs/api/types/index.d.ts +2 -0
- package/dist/cjs/api/types/index.js +2 -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 +3 -1
- package/dist/esm/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.mts +1 -1
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +4 -2
- 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/Client.d.mts +65 -0
- package/dist/esm/api/resources/tools/client/Client.mjs +65 -0
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +100 -6
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.mjs +7 -0
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +27 -6
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +8 -1
- package/dist/esm/api/types/Agent.d.mts +3 -1
- package/dist/esm/api/types/ConfigOptions.d.mts +4 -2
- package/dist/esm/api/types/CreateAgentRequest.d.mts +4 -2
- package/dist/esm/api/types/ExternalStoragePolicy.d.mts +30 -0
- package/dist/esm/api/types/ExternalStoragePolicy.mjs +10 -0
- package/dist/esm/api/types/InlineWebSocketTool.d.mts +2 -0
- package/dist/esm/api/types/OutboundCallConfig.d.mts +2 -2
- package/dist/esm/api/types/Tool.d.mts +26 -2
- package/dist/esm/api/types/Tool.mjs +7 -0
- package/dist/esm/api/types/ToolParameter.d.mts +5 -2
- package/dist/esm/api/types/ToolParameter.mjs +2 -1
- package/dist/esm/api/types/ToolParametersJsonSchema.d.mts +15 -0
- package/dist/esm/api/types/ToolParametersJsonSchema.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/index.d.mts +240 -0
- package/dist/index.d.ts +240 -0
- package/dist/index.js +347 -0
- package/dist/index.mjs +310 -0
- package/package.json +12 -1
- package/reference.md +363 -0
|
@@ -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 = {}));
|
|
@@ -15,6 +15,8 @@ export interface InlineWebSocketTool {
|
|
|
15
15
|
wait_for_speech_before_tool_call?: boolean | undefined;
|
|
16
16
|
/** When true, prevents the assistant from speaking after executing the tool. */
|
|
17
17
|
forbid_speech_after_tool_call?: boolean | undefined;
|
|
18
|
+
/** When true, prevents the assistant from calling the tool right after it has spoken. */
|
|
19
|
+
forbid_tool_call_after_speech?: boolean | undefined;
|
|
18
20
|
/** When true, allows the assistant to call another tool after this tool. */
|
|
19
21
|
allow_tool_chaining?: boolean | undefined;
|
|
20
22
|
/** For async tools, when true, the assistant waits for the response and speaks when it arrives. */
|
|
@@ -47,7 +47,7 @@ export interface OutboundCallConfig {
|
|
|
47
47
|
min_words_to_interrupt?: number | undefined;
|
|
48
48
|
/** Array of built-in or custom tool names to use. */
|
|
49
49
|
tools?: OutboundCallConfig.Tools.Item[] | undefined;
|
|
50
|
-
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE
|
|
50
|
+
/** 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. */
|
|
51
51
|
enable_redaction?: boolean | undefined;
|
|
52
52
|
/** The speech-to-speech model to use. */
|
|
53
53
|
model?: "merritt" | undefined;
|
|
@@ -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;
|
|
@@ -11,8 +11,17 @@ export interface Tool {
|
|
|
11
11
|
type: Tool.Type;
|
|
12
12
|
/** Mode of operation - sync waits for response, async continues without waiting. */
|
|
13
13
|
execution_mode?: Tool.ExecutionMode | undefined;
|
|
14
|
-
/**
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The tool's parameters, returned in the same form they were defined in.
|
|
16
|
+
* Tools defined with a flat list of parameters return an array of parameter definitions (with `location` included inline for `custom_webhook` tools).
|
|
17
|
+
* Tools defined with a raw JSON Schema object return that object; for `custom_webhook` tools the parameter placement is then returned separately in `parameter_locations`.
|
|
18
|
+
*/
|
|
19
|
+
parameters: Tool.Parameters;
|
|
20
|
+
/**
|
|
21
|
+
* Where each top-level parameter is sent in the webhook request, as a map from parameter name to location.
|
|
22
|
+
* Only returned for `custom_webhook` tools whose `parameters` are a raw JSON Schema object. Tools defined with a flat list of parameters carry `location` inline on each parameter instead.
|
|
23
|
+
*/
|
|
24
|
+
parameter_locations?: Record<string, Tool.ParameterLocations.Value> | undefined;
|
|
16
25
|
/** HTTP method for webhook tools. */
|
|
17
26
|
endpoint_method?: Tool.EndpointMethod | undefined;
|
|
18
27
|
/** URL for webhook tools. */
|
|
@@ -43,6 +52,8 @@ export interface Tool {
|
|
|
43
52
|
wait_for_speech_before_tool_call?: boolean | undefined;
|
|
44
53
|
/** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
|
|
45
54
|
forbid_speech_after_tool_call?: boolean | undefined;
|
|
55
|
+
/** When true, forbids the agent from calling the tool right after it has spoken. Available for custom_webhook and custom_websocket tools. */
|
|
56
|
+
forbid_tool_call_after_speech?: boolean | undefined;
|
|
46
57
|
/** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
|
|
47
58
|
allow_tool_chaining?: boolean | undefined;
|
|
48
59
|
/** The agent doesn't typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools. */
|
|
@@ -73,6 +84,19 @@ export declare namespace Tool {
|
|
|
73
84
|
readonly Async: "async";
|
|
74
85
|
};
|
|
75
86
|
type ExecutionMode = (typeof ExecutionMode)[keyof typeof ExecutionMode];
|
|
87
|
+
/**
|
|
88
|
+
* The tool's parameters, returned in the same form they were defined in.
|
|
89
|
+
* Tools defined with a flat list of parameters return an array of parameter definitions (with `location` included inline for `custom_webhook` tools).
|
|
90
|
+
* Tools defined with a raw JSON Schema object return that object; for `custom_webhook` tools the parameter placement is then returned separately in `parameter_locations`.
|
|
91
|
+
*/
|
|
92
|
+
type Parameters = Phonic.ToolParameter[] | Phonic.ToolParametersJsonSchema;
|
|
93
|
+
namespace ParameterLocations {
|
|
94
|
+
const Value: {
|
|
95
|
+
readonly RequestBody: "request_body";
|
|
96
|
+
readonly QueryString: "query_string";
|
|
97
|
+
};
|
|
98
|
+
type Value = (typeof Value)[keyof typeof Value];
|
|
99
|
+
}
|
|
76
100
|
/** HTTP method for webhook tools. */
|
|
77
101
|
const EndpointMethod: {
|
|
78
102
|
readonly Get: "GET";
|
|
@@ -20,6 +20,13 @@ var Tool;
|
|
|
20
20
|
Sync: "sync",
|
|
21
21
|
Async: "async",
|
|
22
22
|
};
|
|
23
|
+
let ParameterLocations;
|
|
24
|
+
(function (ParameterLocations) {
|
|
25
|
+
ParameterLocations.Value = {
|
|
26
|
+
RequestBody: "request_body",
|
|
27
|
+
QueryString: "query_string",
|
|
28
|
+
};
|
|
29
|
+
})(ParameterLocations = Tool.ParameterLocations || (Tool.ParameterLocations = {}));
|
|
23
30
|
/** HTTP method for webhook tools. */
|
|
24
31
|
Tool.EndpointMethod = {
|
|
25
32
|
Get: "GET",
|
|
@@ -3,6 +3,8 @@ export interface ToolParameter {
|
|
|
3
3
|
type: ToolParameter.Type;
|
|
4
4
|
/** Required only when type is "array". The type of items in the array. */
|
|
5
5
|
item_type?: ToolParameter.ItemType | undefined;
|
|
6
|
+
/** Required only when type is "enum". The fixed set of allowed string values for the parameter. Values must be unique and non-empty. */
|
|
7
|
+
enum_values?: string[] | undefined;
|
|
6
8
|
/** The parameter name. */
|
|
7
9
|
name: string;
|
|
8
10
|
/** Description of the parameter. */
|
|
@@ -14,7 +16,7 @@ export interface ToolParameter {
|
|
|
14
16
|
* - For GET webhooks: defaults to `"query_string"` and `"request_body"` is not allowed.
|
|
15
17
|
* - For POST webhooks: required, can be either `"request_body"` or `"query_string"`.
|
|
16
18
|
* - Not allowed for `custom_websocket`, `built_in_transfer_to_phone_number`, or `built_in_transfer_to_agent` tools.
|
|
17
|
-
* When
|
|
19
|
+
* When switching a webhook tool's `endpoint_method` from POST to GET, its request body parameters must be re-sent with `"query_string"` locations.
|
|
18
20
|
*/
|
|
19
21
|
location?: ToolParameter.Location | undefined;
|
|
20
22
|
}
|
|
@@ -26,6 +28,7 @@ export declare namespace ToolParameter {
|
|
|
26
28
|
readonly Number: "number";
|
|
27
29
|
readonly Boolean: "boolean";
|
|
28
30
|
readonly Array: "array";
|
|
31
|
+
readonly Enum: "enum";
|
|
29
32
|
};
|
|
30
33
|
type Type = (typeof Type)[keyof typeof Type];
|
|
31
34
|
/** Required only when type is "array". The type of items in the array. */
|
|
@@ -41,7 +44,7 @@ export declare namespace ToolParameter {
|
|
|
41
44
|
* - For GET webhooks: defaults to `"query_string"` and `"request_body"` is not allowed.
|
|
42
45
|
* - For POST webhooks: required, can be either `"request_body"` or `"query_string"`.
|
|
43
46
|
* - Not allowed for `custom_websocket`, `built_in_transfer_to_phone_number`, or `built_in_transfer_to_agent` tools.
|
|
44
|
-
* When
|
|
47
|
+
* When switching a webhook tool's `endpoint_method` from POST to GET, its request body parameters must be re-sent with `"query_string"` locations.
|
|
45
48
|
*/
|
|
46
49
|
const Location: {
|
|
47
50
|
readonly RequestBody: "request_body";
|
|
@@ -11,6 +11,7 @@ var ToolParameter;
|
|
|
11
11
|
Number: "number",
|
|
12
12
|
Boolean: "boolean",
|
|
13
13
|
Array: "array",
|
|
14
|
+
Enum: "enum",
|
|
14
15
|
};
|
|
15
16
|
/** Required only when type is "array". The type of items in the array. */
|
|
16
17
|
ToolParameter.ItemType = {
|
|
@@ -24,7 +25,7 @@ var ToolParameter;
|
|
|
24
25
|
* - For GET webhooks: defaults to `"query_string"` and `"request_body"` is not allowed.
|
|
25
26
|
* - For POST webhooks: required, can be either `"request_body"` or `"query_string"`.
|
|
26
27
|
* - Not allowed for `custom_websocket`, `built_in_transfer_to_phone_number`, or `built_in_transfer_to_agent` tools.
|
|
27
|
-
* When
|
|
28
|
+
* When switching a webhook tool's `endpoint_method` from POST to GET, its request body parameters must be re-sent with `"query_string"` locations.
|
|
28
29
|
*/
|
|
29
30
|
ToolParameter.Location = {
|
|
30
31
|
RequestBody: "request_body",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tool's parameters expressed as a raw JSON Schema object, for parameters that the flat `ToolParameter` list cannot express: nested objects, arrays of objects, `anyOf` variants, `null`, and non-string enums.
|
|
3
|
+
* Each entry in `properties` is a JSON Schema value supporting `type` (`"string"`, `"integer"`, `"number"`, `"boolean"`, `"null"`, `"array"`, `"object"`), `description`, `enum` (string parameters only), `items` (for arrays), `properties`/`required`/`additionalProperties` (for objects) and `anyOf`. Values may be nested up to 5 levels deep.
|
|
4
|
+
* Parameter names cannot be any of the reserved names that Phonic injects into every tool call: `call_info`, `conversation_id`, `from_phone_number`, `to_phone_number`, `twilio_call_sid`.
|
|
5
|
+
* For `custom_webhook` tools, parameter placement is supplied separately in `parameter_locations` rather than inline on the schema.
|
|
6
|
+
*/
|
|
7
|
+
export interface ToolParametersJsonSchema {
|
|
8
|
+
type: "object";
|
|
9
|
+
/** The tool's top-level parameters, as a map from parameter name to its JSON Schema. */
|
|
10
|
+
properties: Record<string, unknown>;
|
|
11
|
+
/** The names of the required top-level parameters. Every name must be defined in `properties`. */
|
|
12
|
+
required?: string[] | undefined;
|
|
13
|
+
/** Must be `false`. Tool parameter schemas do not allow properties beyond the ones declared. */
|
|
14
|
+
additionalProperties?: false | undefined;
|
|
15
|
+
}
|
|
@@ -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";
|
|
@@ -67,6 +68,7 @@ export * from "./ToolCallPayload.js";
|
|
|
67
68
|
export * from "./ToolDefinition.js";
|
|
68
69
|
export * from "./ToolName.js";
|
|
69
70
|
export * from "./ToolParameter.js";
|
|
71
|
+
export * from "./ToolParametersJsonSchema.js";
|
|
70
72
|
export * from "./UnmutePayload.js";
|
|
71
73
|
export * from "./UpdateSystemPromptPayload.js";
|
|
72
74
|
export * from "./UpdateToolsSubsetPayload.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);
|
|
@@ -83,6 +84,7 @@ __exportStar(require("./ToolCallPayload.js"), exports);
|
|
|
83
84
|
__exportStar(require("./ToolDefinition.js"), exports);
|
|
84
85
|
__exportStar(require("./ToolName.js"), exports);
|
|
85
86
|
__exportStar(require("./ToolParameter.js"), exports);
|
|
87
|
+
__exportStar(require("./ToolParametersJsonSchema.js"), exports);
|
|
86
88
|
__exportStar(require("./UnmutePayload.js"), exports);
|
|
87
89
|
__exportStar(require("./UpdateSystemPromptPayload.js"), exports);
|
|
88
90
|
__exportStar(require("./UpdateToolsSubsetPayload.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.13";
|
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.13",
|
|
10
|
+
"User-Agent": "phonic/0.32.13",
|
|
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;
|
|
@@ -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
|
|
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
|
|
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.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
|
+
}
|