phonic 0.30.14 → 0.30.16
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/README.md +18 -1
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/tools/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/tools/client/Client.js +2 -1
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +4 -1
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +2 -0
- package/dist/cjs/api/types/Tool.d.ts +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/tools/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/tools/client/Client.mjs +2 -1
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +4 -1
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +2 -0
- package/dist/esm/api/types/Tool.d.mts +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1 -0
package/README.md
CHANGED
|
@@ -5,6 +5,23 @@
|
|
|
5
5
|
|
|
6
6
|
The Phonic TypeScript library provides convenient access to the Phonic APIs from TypeScript.
|
|
7
7
|
|
|
8
|
+
## Table of Contents
|
|
9
|
+
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Reference](#reference)
|
|
12
|
+
- [Usage](#usage)
|
|
13
|
+
- [Request and Response Types](#request-and-response-types)
|
|
14
|
+
- [Exception Handling](#exception-handling)
|
|
15
|
+
- [Advanced](#advanced)
|
|
16
|
+
- [Additional Headers](#additional-headers)
|
|
17
|
+
- [Additional Query String Parameters](#additional-query-string-parameters)
|
|
18
|
+
- [Retries](#retries)
|
|
19
|
+
- [Timeouts](#timeouts)
|
|
20
|
+
- [Aborting Requests](#aborting-requests)
|
|
21
|
+
- [Access Raw Response Data](#access-raw-response-data)
|
|
22
|
+
- [Runtime Compatibility](#runtime-compatibility)
|
|
23
|
+
- [Contributing](#contributing)
|
|
24
|
+
|
|
8
25
|
## Installation
|
|
9
26
|
|
|
10
27
|
```sh
|
|
@@ -56,7 +73,7 @@ await client.agents.create({
|
|
|
56
73
|
});
|
|
57
74
|
```
|
|
58
75
|
|
|
59
|
-
## Request
|
|
76
|
+
## Request and Response Types
|
|
60
77
|
|
|
61
78
|
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
|
62
79
|
following namespace:
|
package/dist/cjs/Client.js
CHANGED
|
@@ -50,8 +50,8 @@ class PhonicClient {
|
|
|
50
50
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
51
51
|
"X-Fern-Language": "JavaScript",
|
|
52
52
|
"X-Fern-SDK-Name": "phonic",
|
|
53
|
-
"X-Fern-SDK-Version": "0.30.
|
|
54
|
-
"User-Agent": "phonic/0.30.
|
|
53
|
+
"X-Fern-SDK-Version": "0.30.15",
|
|
54
|
+
"User-Agent": "phonic/0.30.15",
|
|
55
55
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
56
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
57
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -107,7 +107,8 @@ export declare class Tools {
|
|
|
107
107
|
* description: "Transfers the caller to the support team",
|
|
108
108
|
* type: "built_in_transfer_to_phone_number",
|
|
109
109
|
* execution_mode: "sync",
|
|
110
|
-
* phone_number: "+15551234567"
|
|
110
|
+
* phone_number: "+15551234567",
|
|
111
|
+
* dtmf: "1234"
|
|
111
112
|
* })
|
|
112
113
|
*/
|
|
113
114
|
create(request: Phonic.CreateToolRequest, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Phonic.ToolsCreateResponse>;
|
|
@@ -195,7 +195,8 @@ class Tools {
|
|
|
195
195
|
* description: "Transfers the caller to the support team",
|
|
196
196
|
* type: "built_in_transfer_to_phone_number",
|
|
197
197
|
* execution_mode: "sync",
|
|
198
|
-
* phone_number: "+15551234567"
|
|
198
|
+
* phone_number: "+15551234567",
|
|
199
|
+
* dtmf: "1234"
|
|
199
200
|
* })
|
|
200
201
|
*/
|
|
201
202
|
create(request, requestOptions) {
|
|
@@ -55,7 +55,8 @@ import * as Phonic from "../../../../index.js";
|
|
|
55
55
|
* description: "Transfers the caller to the support team",
|
|
56
56
|
* type: "built_in_transfer_to_phone_number",
|
|
57
57
|
* execution_mode: "sync",
|
|
58
|
-
* phone_number: "+15551234567"
|
|
58
|
+
* phone_number: "+15551234567",
|
|
59
|
+
* dtmf: "1234"
|
|
59
60
|
* }
|
|
60
61
|
*/
|
|
61
62
|
export interface CreateToolRequest {
|
|
@@ -88,6 +89,8 @@ export interface CreateToolRequest {
|
|
|
88
89
|
tool_call_output_timeout_ms?: number;
|
|
89
90
|
/** The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools. */
|
|
90
91
|
phone_number?: string;
|
|
92
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
|
|
93
|
+
dtmf?: string | null;
|
|
91
94
|
}
|
|
92
95
|
export declare namespace CreateToolRequest {
|
|
93
96
|
/**
|
|
@@ -39,6 +39,8 @@ export interface UpdateToolRequest {
|
|
|
39
39
|
tool_call_output_timeout_ms?: number;
|
|
40
40
|
/** The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools. */
|
|
41
41
|
phone_number?: string;
|
|
42
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. */
|
|
43
|
+
dtmf?: string | null;
|
|
42
44
|
}
|
|
43
45
|
export declare namespace UpdateToolRequest {
|
|
44
46
|
/**
|
|
@@ -28,6 +28,8 @@ export interface Tool {
|
|
|
28
28
|
tool_call_output_timeout_ms?: number;
|
|
29
29
|
/** The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools. */
|
|
30
30
|
phone_number?: string;
|
|
31
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
|
|
32
|
+
dtmf?: string | null;
|
|
31
33
|
}
|
|
32
34
|
export declare namespace Tool {
|
|
33
35
|
interface Project {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.30.
|
|
1
|
+
export declare const SDK_VERSION = "0.30.15";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -14,8 +14,8 @@ export class PhonicClient {
|
|
|
14
14
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
15
15
|
"X-Fern-Language": "JavaScript",
|
|
16
16
|
"X-Fern-SDK-Name": "phonic",
|
|
17
|
-
"X-Fern-SDK-Version": "0.30.
|
|
18
|
-
"User-Agent": "phonic/0.30.
|
|
17
|
+
"X-Fern-SDK-Version": "0.30.15",
|
|
18
|
+
"User-Agent": "phonic/0.30.15",
|
|
19
19
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
20
20
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
21
21
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -107,7 +107,8 @@ export declare class Tools {
|
|
|
107
107
|
* description: "Transfers the caller to the support team",
|
|
108
108
|
* type: "built_in_transfer_to_phone_number",
|
|
109
109
|
* execution_mode: "sync",
|
|
110
|
-
* phone_number: "+15551234567"
|
|
110
|
+
* phone_number: "+15551234567",
|
|
111
|
+
* dtmf: "1234"
|
|
111
112
|
* })
|
|
112
113
|
*/
|
|
113
114
|
create(request: Phonic.CreateToolRequest, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Phonic.ToolsCreateResponse>;
|
|
@@ -159,7 +159,8 @@ export class Tools {
|
|
|
159
159
|
* description: "Transfers the caller to the support team",
|
|
160
160
|
* type: "built_in_transfer_to_phone_number",
|
|
161
161
|
* execution_mode: "sync",
|
|
162
|
-
* phone_number: "+15551234567"
|
|
162
|
+
* phone_number: "+15551234567",
|
|
163
|
+
* dtmf: "1234"
|
|
163
164
|
* })
|
|
164
165
|
*/
|
|
165
166
|
create(request, requestOptions) {
|
|
@@ -55,7 +55,8 @@ import * as Phonic from "../../../../index.mjs";
|
|
|
55
55
|
* description: "Transfers the caller to the support team",
|
|
56
56
|
* type: "built_in_transfer_to_phone_number",
|
|
57
57
|
* execution_mode: "sync",
|
|
58
|
-
* phone_number: "+15551234567"
|
|
58
|
+
* phone_number: "+15551234567",
|
|
59
|
+
* dtmf: "1234"
|
|
59
60
|
* }
|
|
60
61
|
*/
|
|
61
62
|
export interface CreateToolRequest {
|
|
@@ -88,6 +89,8 @@ export interface CreateToolRequest {
|
|
|
88
89
|
tool_call_output_timeout_ms?: number;
|
|
89
90
|
/** The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools. */
|
|
90
91
|
phone_number?: string;
|
|
92
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
|
|
93
|
+
dtmf?: string | null;
|
|
91
94
|
}
|
|
92
95
|
export declare namespace CreateToolRequest {
|
|
93
96
|
/**
|
|
@@ -39,6 +39,8 @@ export interface UpdateToolRequest {
|
|
|
39
39
|
tool_call_output_timeout_ms?: number;
|
|
40
40
|
/** The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools. */
|
|
41
41
|
phone_number?: string;
|
|
42
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. */
|
|
43
|
+
dtmf?: string | null;
|
|
42
44
|
}
|
|
43
45
|
export declare namespace UpdateToolRequest {
|
|
44
46
|
/**
|
|
@@ -28,6 +28,8 @@ export interface Tool {
|
|
|
28
28
|
tool_call_output_timeout_ms?: number;
|
|
29
29
|
/** The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools. */
|
|
30
30
|
phone_number?: string;
|
|
31
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
|
|
32
|
+
dtmf?: string | null;
|
|
31
33
|
}
|
|
32
34
|
export declare namespace Tool {
|
|
33
35
|
interface Project {
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.30.
|
|
1
|
+
export declare const SDK_VERSION = "0.30.15";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.30.
|
|
1
|
+
export const SDK_VERSION = "0.30.15";
|
package/package.json
CHANGED