phonic 0.30.36 → 0.30.38
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 +1 -0
- package/dist/cjs/Client.js +2 -2
- 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/AgentsCreateRequest.d.ts +4 -1
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +4 -1
- package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +1 -0
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/conversations/client/Client.js +1 -0
- package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +1 -0
- package/dist/cjs/api/types/Agent.d.ts +3 -1
- package/dist/cjs/api/types/ConfigPayload.d.ts +3 -1
- package/dist/cjs/api/types/Conversation.d.ts +18 -3
- package/dist/cjs/api/types/Conversation.js +7 -0
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +3 -1
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +3 -1
- package/dist/cjs/api/types/Voice.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/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/AgentsCreateRequest.d.mts +4 -1
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +4 -1
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +1 -0
- package/dist/esm/api/resources/conversations/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/conversations/client/Client.mjs +1 -0
- package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +1 -0
- package/dist/esm/api/types/Agent.d.mts +3 -1
- package/dist/esm/api/types/ConfigPayload.d.mts +3 -1
- package/dist/esm/api/types/Conversation.d.mts +18 -3
- package/dist/esm/api/types/Conversation.mjs +7 -0
- package/dist/esm/api/types/CreateAgentRequest.d.mts +3 -1
- package/dist/esm/api/types/OutboundCallConfig.d.mts +3 -1
- package/dist/esm/api/types/Voice.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 +4 -0
package/README.md
CHANGED
package/dist/cjs/Client.js
CHANGED
|
@@ -51,8 +51,8 @@ class PhonicClient {
|
|
|
51
51
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "phonic",
|
|
54
|
-
"X-Fern-SDK-Version": "0.30.
|
|
55
|
-
"User-Agent": "phonic/0.30.
|
|
54
|
+
"X-Fern-SDK-Version": "0.30.38",
|
|
55
|
+
"User-Agent": "phonic/0.30.38",
|
|
56
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
58
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -76,6 +76,7 @@ export declare class Agents {
|
|
|
76
76
|
* }
|
|
77
77
|
* },
|
|
78
78
|
* tools: ["keypad_input"],
|
|
79
|
+
* generate_no_input_poke_text: false,
|
|
79
80
|
* no_input_poke_sec: 30,
|
|
80
81
|
* no_input_poke_text: "Are you still there?",
|
|
81
82
|
* languages: ["en", "es"],
|
|
@@ -121,6 +122,7 @@ export declare class Agents {
|
|
|
121
122
|
* }
|
|
122
123
|
* },
|
|
123
124
|
* tools: ["keypad_input"],
|
|
125
|
+
* generate_no_input_poke_text: false,
|
|
124
126
|
* no_input_poke_sec: 30,
|
|
125
127
|
* no_input_poke_text: "Are you still there?",
|
|
126
128
|
* languages: ["en", "es"],
|
|
@@ -202,6 +204,7 @@ export declare class Agents {
|
|
|
202
204
|
* }
|
|
203
205
|
* },
|
|
204
206
|
* tools: ["keypad_input"],
|
|
207
|
+
* generate_no_input_poke_text: false,
|
|
205
208
|
* no_input_poke_sec: 30,
|
|
206
209
|
* no_input_poke_text: "Are you still there?",
|
|
207
210
|
* languages: ["en", "es"],
|
|
@@ -166,6 +166,7 @@ class Agents {
|
|
|
166
166
|
* }
|
|
167
167
|
* },
|
|
168
168
|
* tools: ["keypad_input"],
|
|
169
|
+
* generate_no_input_poke_text: false,
|
|
169
170
|
* no_input_poke_sec: 30,
|
|
170
171
|
* no_input_poke_text: "Are you still there?",
|
|
171
172
|
* languages: ["en", "es"],
|
|
@@ -272,6 +273,7 @@ class Agents {
|
|
|
272
273
|
* }
|
|
273
274
|
* },
|
|
274
275
|
* tools: ["keypad_input"],
|
|
276
|
+
* generate_no_input_poke_text: false,
|
|
275
277
|
* no_input_poke_sec: 30,
|
|
276
278
|
* no_input_poke_text: "Are you still there?",
|
|
277
279
|
* languages: ["en", "es"],
|
|
@@ -518,6 +520,7 @@ class Agents {
|
|
|
518
520
|
* }
|
|
519
521
|
* },
|
|
520
522
|
* tools: ["keypad_input"],
|
|
523
|
+
* generate_no_input_poke_text: false,
|
|
521
524
|
* no_input_poke_sec: 30,
|
|
522
525
|
* no_input_poke_text: "Are you still there?",
|
|
523
526
|
* languages: ["en", "es"],
|
|
@@ -24,6 +24,7 @@ import * as Phonic from "../../../../index.js";
|
|
|
24
24
|
* }
|
|
25
25
|
* },
|
|
26
26
|
* tools: ["keypad_input"],
|
|
27
|
+
* generate_no_input_poke_text: false,
|
|
27
28
|
* no_input_poke_sec: 30,
|
|
28
29
|
* no_input_poke_text: "Are you still there?",
|
|
29
30
|
* languages: ["en", "es"],
|
|
@@ -72,9 +73,11 @@ export interface AgentsCreateRequest {
|
|
|
72
73
|
tools?: Phonic.CreateAgentRequest.Tools.Item[];
|
|
73
74
|
/** Array of task objects with `name` and `description` fields. */
|
|
74
75
|
tasks?: Phonic.Task[];
|
|
76
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
77
|
+
generate_no_input_poke_text?: boolean;
|
|
75
78
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
76
79
|
no_input_poke_sec?: number | null;
|
|
77
|
-
/** The message to send after the specified silence. */
|
|
80
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
78
81
|
no_input_poke_text?: string;
|
|
79
82
|
/** Seconds of silence before ending the conversation. */
|
|
80
83
|
no_input_end_conversation_sec?: number;
|
|
@@ -24,6 +24,7 @@ import * as Phonic from "../../../../index.js";
|
|
|
24
24
|
* }
|
|
25
25
|
* },
|
|
26
26
|
* tools: ["keypad_input"],
|
|
27
|
+
* generate_no_input_poke_text: false,
|
|
27
28
|
* no_input_poke_sec: 30,
|
|
28
29
|
* no_input_poke_text: "Are you still there?",
|
|
29
30
|
* languages: ["en", "es"],
|
|
@@ -72,9 +73,11 @@ export interface UpdateAgentRequest {
|
|
|
72
73
|
tools?: UpdateAgentRequest.Tools.Item[];
|
|
73
74
|
/** Array of task objects with `name` and `description` fields. */
|
|
74
75
|
tasks?: Phonic.Task[];
|
|
76
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
77
|
+
generate_no_input_poke_text?: boolean;
|
|
75
78
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
76
79
|
no_input_poke_sec?: number | null;
|
|
77
|
-
/** The message to send after the specified silence. */
|
|
80
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
78
81
|
no_input_poke_text?: string;
|
|
79
82
|
/** Seconds of silence before ending the conversation. */
|
|
80
83
|
no_input_end_conversation_sec?: number;
|
|
@@ -202,6 +202,7 @@ export declare class Conversations {
|
|
|
202
202
|
* "subject": "Chess"
|
|
203
203
|
* },
|
|
204
204
|
* voice_id: "sabrina",
|
|
205
|
+
* generate_no_input_poke_text: false,
|
|
205
206
|
* no_input_poke_sec: 30,
|
|
206
207
|
* no_input_poke_text: "Are you still there?",
|
|
207
208
|
* no_input_end_conversation_sec: 180,
|
|
@@ -15,6 +15,7 @@ import * as Phonic from "../../../../index.js";
|
|
|
15
15
|
* "subject": "Chess"
|
|
16
16
|
* },
|
|
17
17
|
* voice_id: "sabrina",
|
|
18
|
+
* generate_no_input_poke_text: false,
|
|
18
19
|
* no_input_poke_sec: 30,
|
|
19
20
|
* no_input_poke_text: "Are you still there?",
|
|
20
21
|
* no_input_end_conversation_sec: 180,
|
|
@@ -37,9 +37,11 @@ export interface Agent {
|
|
|
37
37
|
tools: Agent.Tools.Item[];
|
|
38
38
|
/** Tasks for the agent to complete during the conversation. */
|
|
39
39
|
tasks: Phonic.Task[];
|
|
40
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
41
|
+
generate_no_input_poke_text: boolean;
|
|
40
42
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
41
43
|
no_input_poke_sec: number | null;
|
|
42
|
-
/** The message to send after the specified silence. */
|
|
44
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
43
45
|
no_input_poke_text: string;
|
|
44
46
|
/** Seconds of silence before ending the conversation. */
|
|
45
47
|
no_input_end_conversation_sec: number;
|
|
@@ -39,9 +39,11 @@ export interface ConfigPayload {
|
|
|
39
39
|
enable_documents_rag?: boolean;
|
|
40
40
|
/** Enable transcript RAG */
|
|
41
41
|
enable_transcripts_rag?: boolean;
|
|
42
|
+
/** Whether to have the no-input poke text be generated by AI */
|
|
43
|
+
generate_no_input_poke_text?: boolean;
|
|
42
44
|
/** Seconds of silence before poke message */
|
|
43
45
|
no_input_poke_sec?: number | null;
|
|
44
|
-
/** Poke message text */
|
|
46
|
+
/** Poke message text. Ignored when generate_no_input_poke_text is true. */
|
|
45
47
|
no_input_poke_text?: string;
|
|
46
48
|
/** Seconds of silence before ending conversation */
|
|
47
49
|
no_input_end_conversation_sec?: number;
|
|
@@ -13,6 +13,8 @@ export interface Conversation {
|
|
|
13
13
|
project: Conversation.Project;
|
|
14
14
|
/** External ID for conversation tracking. */
|
|
15
15
|
external_id: string | null;
|
|
16
|
+
/** The origin of the conversation. */
|
|
17
|
+
origin: Conversation.Origin;
|
|
16
18
|
/** The STS model used. */
|
|
17
19
|
model: string;
|
|
18
20
|
/** Will be `true` if welcome message was automatically generated. */
|
|
@@ -35,10 +37,10 @@ export interface Conversation {
|
|
|
35
37
|
post_call_transcript: string | null;
|
|
36
38
|
/** Duration of the conversation in milliseconds. */
|
|
37
39
|
duration_ms: number;
|
|
38
|
-
/** Presigned URL to the conversation audio file. */
|
|
40
|
+
/** Presigned URL to the conversation audio file. Expires in 1 day. */
|
|
39
41
|
audio_url: string | null;
|
|
40
42
|
/** When the conversation started. */
|
|
41
|
-
started_at: string;
|
|
43
|
+
started_at: string | null;
|
|
42
44
|
/** When the conversation ended. */
|
|
43
45
|
ended_at: string | null;
|
|
44
46
|
/** Who or what ended the conversation. */
|
|
@@ -47,9 +49,11 @@ export interface Conversation {
|
|
|
47
49
|
boosted_keywords: string[] | null;
|
|
48
50
|
/** Array of ISO 639-1 language codes recognized by the model. */
|
|
49
51
|
languages: string[] | null;
|
|
52
|
+
/** Whether the no-input poke text was generated by AI. */
|
|
53
|
+
generate_no_input_poke_text?: boolean | null;
|
|
50
54
|
/** Number of seconds of silence before a poke message is sent. `null` means the poke message is disabled. */
|
|
51
55
|
no_input_poke_sec: number | null;
|
|
52
|
-
/** The message to send after the specified silence. Relevant only if `no_input_poke_sec` is not `null`. */
|
|
56
|
+
/** The message to send after the specified silence. Relevant only if `no_input_poke_sec` is not `null`. Ignored when generate_no_input_poke_text is true. */
|
|
53
57
|
no_input_poke_text: string | null;
|
|
54
58
|
/** Seconds of silence before the conversation is ended. */
|
|
55
59
|
no_input_end_conversation_sec: number | null;
|
|
@@ -83,6 +87,17 @@ export declare namespace Conversation {
|
|
|
83
87
|
/** The name of the project. */
|
|
84
88
|
name: string;
|
|
85
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* The origin of the conversation.
|
|
92
|
+
*/
|
|
93
|
+
type Origin = "web" | "direct" | "inbound" | "outbound" | "replay";
|
|
94
|
+
const Origin: {
|
|
95
|
+
readonly Web: "web";
|
|
96
|
+
readonly Direct: "direct";
|
|
97
|
+
readonly Inbound: "inbound";
|
|
98
|
+
readonly Outbound: "outbound";
|
|
99
|
+
readonly Replay: "replay";
|
|
100
|
+
};
|
|
86
101
|
/**
|
|
87
102
|
* The background noise type used in the conversation.
|
|
88
103
|
*/
|
|
@@ -6,6 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Conversation = void 0;
|
|
7
7
|
var Conversation;
|
|
8
8
|
(function (Conversation) {
|
|
9
|
+
Conversation.Origin = {
|
|
10
|
+
Web: "web",
|
|
11
|
+
Direct: "direct",
|
|
12
|
+
Inbound: "inbound",
|
|
13
|
+
Outbound: "outbound",
|
|
14
|
+
Replay: "replay",
|
|
15
|
+
};
|
|
9
16
|
Conversation.BackgroundNoise = {
|
|
10
17
|
Office: "office",
|
|
11
18
|
CallCenter: "call-center",
|
|
@@ -35,9 +35,11 @@ export interface CreateAgentRequest {
|
|
|
35
35
|
tools?: CreateAgentRequest.Tools.Item[];
|
|
36
36
|
/** Array of task objects with `name` and `description` fields. */
|
|
37
37
|
tasks?: Phonic.Task[];
|
|
38
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
39
|
+
generate_no_input_poke_text?: boolean;
|
|
38
40
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
39
41
|
no_input_poke_sec?: number | null;
|
|
40
|
-
/** The message to send after the specified silence. */
|
|
42
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
41
43
|
no_input_poke_text?: string;
|
|
42
44
|
/** Seconds of silence before ending the conversation. */
|
|
43
45
|
no_input_end_conversation_sec?: number;
|
|
@@ -18,9 +18,11 @@ export interface OutboundCallConfig {
|
|
|
18
18
|
template_variables?: Record<string, string>;
|
|
19
19
|
/** The voice ID to use for the agent. */
|
|
20
20
|
voice_id?: string;
|
|
21
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
22
|
+
generate_no_input_poke_text?: boolean;
|
|
21
23
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
22
24
|
no_input_poke_sec?: number | null;
|
|
23
|
-
/** The message to send after the specified silence. */
|
|
25
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
24
26
|
no_input_poke_text?: string;
|
|
25
27
|
/** Seconds of silence before ending the conversation. */
|
|
26
28
|
no_input_end_conversation_sec?: number;
|
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.38";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -15,8 +15,8 @@ export class PhonicClient {
|
|
|
15
15
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
16
16
|
"X-Fern-Language": "JavaScript",
|
|
17
17
|
"X-Fern-SDK-Name": "phonic",
|
|
18
|
-
"X-Fern-SDK-Version": "0.30.
|
|
19
|
-
"User-Agent": "phonic/0.30.
|
|
18
|
+
"X-Fern-SDK-Version": "0.30.38",
|
|
19
|
+
"User-Agent": "phonic/0.30.38",
|
|
20
20
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
21
21
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
22
22
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -76,6 +76,7 @@ export declare class Agents {
|
|
|
76
76
|
* }
|
|
77
77
|
* },
|
|
78
78
|
* tools: ["keypad_input"],
|
|
79
|
+
* generate_no_input_poke_text: false,
|
|
79
80
|
* no_input_poke_sec: 30,
|
|
80
81
|
* no_input_poke_text: "Are you still there?",
|
|
81
82
|
* languages: ["en", "es"],
|
|
@@ -121,6 +122,7 @@ export declare class Agents {
|
|
|
121
122
|
* }
|
|
122
123
|
* },
|
|
123
124
|
* tools: ["keypad_input"],
|
|
125
|
+
* generate_no_input_poke_text: false,
|
|
124
126
|
* no_input_poke_sec: 30,
|
|
125
127
|
* no_input_poke_text: "Are you still there?",
|
|
126
128
|
* languages: ["en", "es"],
|
|
@@ -202,6 +204,7 @@ export declare class Agents {
|
|
|
202
204
|
* }
|
|
203
205
|
* },
|
|
204
206
|
* tools: ["keypad_input"],
|
|
207
|
+
* generate_no_input_poke_text: false,
|
|
205
208
|
* no_input_poke_sec: 30,
|
|
206
209
|
* no_input_poke_text: "Are you still there?",
|
|
207
210
|
* languages: ["en", "es"],
|
|
@@ -130,6 +130,7 @@ export class Agents {
|
|
|
130
130
|
* }
|
|
131
131
|
* },
|
|
132
132
|
* tools: ["keypad_input"],
|
|
133
|
+
* generate_no_input_poke_text: false,
|
|
133
134
|
* no_input_poke_sec: 30,
|
|
134
135
|
* no_input_poke_text: "Are you still there?",
|
|
135
136
|
* languages: ["en", "es"],
|
|
@@ -236,6 +237,7 @@ export class Agents {
|
|
|
236
237
|
* }
|
|
237
238
|
* },
|
|
238
239
|
* tools: ["keypad_input"],
|
|
240
|
+
* generate_no_input_poke_text: false,
|
|
239
241
|
* no_input_poke_sec: 30,
|
|
240
242
|
* no_input_poke_text: "Are you still there?",
|
|
241
243
|
* languages: ["en", "es"],
|
|
@@ -482,6 +484,7 @@ export class Agents {
|
|
|
482
484
|
* }
|
|
483
485
|
* },
|
|
484
486
|
* tools: ["keypad_input"],
|
|
487
|
+
* generate_no_input_poke_text: false,
|
|
485
488
|
* no_input_poke_sec: 30,
|
|
486
489
|
* no_input_poke_text: "Are you still there?",
|
|
487
490
|
* languages: ["en", "es"],
|
|
@@ -24,6 +24,7 @@ import * as Phonic from "../../../../index.mjs";
|
|
|
24
24
|
* }
|
|
25
25
|
* },
|
|
26
26
|
* tools: ["keypad_input"],
|
|
27
|
+
* generate_no_input_poke_text: false,
|
|
27
28
|
* no_input_poke_sec: 30,
|
|
28
29
|
* no_input_poke_text: "Are you still there?",
|
|
29
30
|
* languages: ["en", "es"],
|
|
@@ -72,9 +73,11 @@ export interface AgentsCreateRequest {
|
|
|
72
73
|
tools?: Phonic.CreateAgentRequest.Tools.Item[];
|
|
73
74
|
/** Array of task objects with `name` and `description` fields. */
|
|
74
75
|
tasks?: Phonic.Task[];
|
|
76
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
77
|
+
generate_no_input_poke_text?: boolean;
|
|
75
78
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
76
79
|
no_input_poke_sec?: number | null;
|
|
77
|
-
/** The message to send after the specified silence. */
|
|
80
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
78
81
|
no_input_poke_text?: string;
|
|
79
82
|
/** Seconds of silence before ending the conversation. */
|
|
80
83
|
no_input_end_conversation_sec?: number;
|
|
@@ -24,6 +24,7 @@ import * as Phonic from "../../../../index.mjs";
|
|
|
24
24
|
* }
|
|
25
25
|
* },
|
|
26
26
|
* tools: ["keypad_input"],
|
|
27
|
+
* generate_no_input_poke_text: false,
|
|
27
28
|
* no_input_poke_sec: 30,
|
|
28
29
|
* no_input_poke_text: "Are you still there?",
|
|
29
30
|
* languages: ["en", "es"],
|
|
@@ -72,9 +73,11 @@ export interface UpdateAgentRequest {
|
|
|
72
73
|
tools?: UpdateAgentRequest.Tools.Item[];
|
|
73
74
|
/** Array of task objects with `name` and `description` fields. */
|
|
74
75
|
tasks?: Phonic.Task[];
|
|
76
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
77
|
+
generate_no_input_poke_text?: boolean;
|
|
75
78
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
76
79
|
no_input_poke_sec?: number | null;
|
|
77
|
-
/** The message to send after the specified silence. */
|
|
80
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
78
81
|
no_input_poke_text?: string;
|
|
79
82
|
/** Seconds of silence before ending the conversation. */
|
|
80
83
|
no_input_end_conversation_sec?: number;
|
|
@@ -202,6 +202,7 @@ export declare class Conversations {
|
|
|
202
202
|
* "subject": "Chess"
|
|
203
203
|
* },
|
|
204
204
|
* voice_id: "sabrina",
|
|
205
|
+
* generate_no_input_poke_text: false,
|
|
205
206
|
* no_input_poke_sec: 30,
|
|
206
207
|
* no_input_poke_text: "Are you still there?",
|
|
207
208
|
* no_input_end_conversation_sec: 180,
|
|
@@ -15,6 +15,7 @@ import * as Phonic from "../../../../index.mjs";
|
|
|
15
15
|
* "subject": "Chess"
|
|
16
16
|
* },
|
|
17
17
|
* voice_id: "sabrina",
|
|
18
|
+
* generate_no_input_poke_text: false,
|
|
18
19
|
* no_input_poke_sec: 30,
|
|
19
20
|
* no_input_poke_text: "Are you still there?",
|
|
20
21
|
* no_input_end_conversation_sec: 180,
|
|
@@ -37,9 +37,11 @@ export interface Agent {
|
|
|
37
37
|
tools: Agent.Tools.Item[];
|
|
38
38
|
/** Tasks for the agent to complete during the conversation. */
|
|
39
39
|
tasks: Phonic.Task[];
|
|
40
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
41
|
+
generate_no_input_poke_text: boolean;
|
|
40
42
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
41
43
|
no_input_poke_sec: number | null;
|
|
42
|
-
/** The message to send after the specified silence. */
|
|
44
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
43
45
|
no_input_poke_text: string;
|
|
44
46
|
/** Seconds of silence before ending the conversation. */
|
|
45
47
|
no_input_end_conversation_sec: number;
|
|
@@ -39,9 +39,11 @@ export interface ConfigPayload {
|
|
|
39
39
|
enable_documents_rag?: boolean;
|
|
40
40
|
/** Enable transcript RAG */
|
|
41
41
|
enable_transcripts_rag?: boolean;
|
|
42
|
+
/** Whether to have the no-input poke text be generated by AI */
|
|
43
|
+
generate_no_input_poke_text?: boolean;
|
|
42
44
|
/** Seconds of silence before poke message */
|
|
43
45
|
no_input_poke_sec?: number | null;
|
|
44
|
-
/** Poke message text */
|
|
46
|
+
/** Poke message text. Ignored when generate_no_input_poke_text is true. */
|
|
45
47
|
no_input_poke_text?: string;
|
|
46
48
|
/** Seconds of silence before ending conversation */
|
|
47
49
|
no_input_end_conversation_sec?: number;
|
|
@@ -13,6 +13,8 @@ export interface Conversation {
|
|
|
13
13
|
project: Conversation.Project;
|
|
14
14
|
/** External ID for conversation tracking. */
|
|
15
15
|
external_id: string | null;
|
|
16
|
+
/** The origin of the conversation. */
|
|
17
|
+
origin: Conversation.Origin;
|
|
16
18
|
/** The STS model used. */
|
|
17
19
|
model: string;
|
|
18
20
|
/** Will be `true` if welcome message was automatically generated. */
|
|
@@ -35,10 +37,10 @@ export interface Conversation {
|
|
|
35
37
|
post_call_transcript: string | null;
|
|
36
38
|
/** Duration of the conversation in milliseconds. */
|
|
37
39
|
duration_ms: number;
|
|
38
|
-
/** Presigned URL to the conversation audio file. */
|
|
40
|
+
/** Presigned URL to the conversation audio file. Expires in 1 day. */
|
|
39
41
|
audio_url: string | null;
|
|
40
42
|
/** When the conversation started. */
|
|
41
|
-
started_at: string;
|
|
43
|
+
started_at: string | null;
|
|
42
44
|
/** When the conversation ended. */
|
|
43
45
|
ended_at: string | null;
|
|
44
46
|
/** Who or what ended the conversation. */
|
|
@@ -47,9 +49,11 @@ export interface Conversation {
|
|
|
47
49
|
boosted_keywords: string[] | null;
|
|
48
50
|
/** Array of ISO 639-1 language codes recognized by the model. */
|
|
49
51
|
languages: string[] | null;
|
|
52
|
+
/** Whether the no-input poke text was generated by AI. */
|
|
53
|
+
generate_no_input_poke_text?: boolean | null;
|
|
50
54
|
/** Number of seconds of silence before a poke message is sent. `null` means the poke message is disabled. */
|
|
51
55
|
no_input_poke_sec: number | null;
|
|
52
|
-
/** The message to send after the specified silence. Relevant only if `no_input_poke_sec` is not `null`. */
|
|
56
|
+
/** The message to send after the specified silence. Relevant only if `no_input_poke_sec` is not `null`. Ignored when generate_no_input_poke_text is true. */
|
|
53
57
|
no_input_poke_text: string | null;
|
|
54
58
|
/** Seconds of silence before the conversation is ended. */
|
|
55
59
|
no_input_end_conversation_sec: number | null;
|
|
@@ -83,6 +87,17 @@ export declare namespace Conversation {
|
|
|
83
87
|
/** The name of the project. */
|
|
84
88
|
name: string;
|
|
85
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* The origin of the conversation.
|
|
92
|
+
*/
|
|
93
|
+
type Origin = "web" | "direct" | "inbound" | "outbound" | "replay";
|
|
94
|
+
const Origin: {
|
|
95
|
+
readonly Web: "web";
|
|
96
|
+
readonly Direct: "direct";
|
|
97
|
+
readonly Inbound: "inbound";
|
|
98
|
+
readonly Outbound: "outbound";
|
|
99
|
+
readonly Replay: "replay";
|
|
100
|
+
};
|
|
86
101
|
/**
|
|
87
102
|
* The background noise type used in the conversation.
|
|
88
103
|
*/
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export var Conversation;
|
|
5
5
|
(function (Conversation) {
|
|
6
|
+
Conversation.Origin = {
|
|
7
|
+
Web: "web",
|
|
8
|
+
Direct: "direct",
|
|
9
|
+
Inbound: "inbound",
|
|
10
|
+
Outbound: "outbound",
|
|
11
|
+
Replay: "replay",
|
|
12
|
+
};
|
|
6
13
|
Conversation.BackgroundNoise = {
|
|
7
14
|
Office: "office",
|
|
8
15
|
CallCenter: "call-center",
|
|
@@ -35,9 +35,11 @@ export interface CreateAgentRequest {
|
|
|
35
35
|
tools?: CreateAgentRequest.Tools.Item[];
|
|
36
36
|
/** Array of task objects with `name` and `description` fields. */
|
|
37
37
|
tasks?: Phonic.Task[];
|
|
38
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
39
|
+
generate_no_input_poke_text?: boolean;
|
|
38
40
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
39
41
|
no_input_poke_sec?: number | null;
|
|
40
|
-
/** The message to send after the specified silence. */
|
|
42
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
41
43
|
no_input_poke_text?: string;
|
|
42
44
|
/** Seconds of silence before ending the conversation. */
|
|
43
45
|
no_input_end_conversation_sec?: number;
|
|
@@ -18,9 +18,11 @@ export interface OutboundCallConfig {
|
|
|
18
18
|
template_variables?: Record<string, string>;
|
|
19
19
|
/** The voice ID to use for the agent. */
|
|
20
20
|
voice_id?: string;
|
|
21
|
+
/** Whether to have the no-input poke text be generated by AI. */
|
|
22
|
+
generate_no_input_poke_text?: boolean;
|
|
21
23
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
22
24
|
no_input_poke_sec?: number | null;
|
|
23
|
-
/** The message to send after the specified silence. */
|
|
25
|
+
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
24
26
|
no_input_poke_text?: string;
|
|
25
27
|
/** Seconds of silence before ending the conversation. */
|
|
26
28
|
no_input_end_conversation_sec?: number;
|
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.38";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.30.
|
|
1
|
+
export const SDK_VERSION = "0.30.38";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -113,6 +113,7 @@ await client.agents.create({
|
|
|
113
113
|
},
|
|
114
114
|
},
|
|
115
115
|
tools: ["keypad_input"],
|
|
116
|
+
generate_no_input_poke_text: false,
|
|
116
117
|
no_input_poke_sec: 30,
|
|
117
118
|
no_input_poke_text: "Are you still there?",
|
|
118
119
|
languages: ["en", "es"],
|
|
@@ -207,6 +208,7 @@ await client.agents.upsert({
|
|
|
207
208
|
},
|
|
208
209
|
},
|
|
209
210
|
tools: ["keypad_input"],
|
|
211
|
+
generate_no_input_poke_text: false,
|
|
210
212
|
no_input_poke_sec: 30,
|
|
211
213
|
no_input_poke_text: "Are you still there?",
|
|
212
214
|
languages: ["en", "es"],
|
|
@@ -447,6 +449,7 @@ await client.agents.update("nameOrId", {
|
|
|
447
449
|
},
|
|
448
450
|
},
|
|
449
451
|
tools: ["keypad_input"],
|
|
452
|
+
generate_no_input_poke_text: false,
|
|
450
453
|
no_input_poke_sec: 30,
|
|
451
454
|
no_input_poke_text: "Are you still there?",
|
|
452
455
|
languages: ["en", "es"],
|
|
@@ -2187,6 +2190,7 @@ await client.conversations.outboundCall({
|
|
|
2187
2190
|
subject: "Chess",
|
|
2188
2191
|
},
|
|
2189
2192
|
voice_id: "sabrina",
|
|
2193
|
+
generate_no_input_poke_text: false,
|
|
2190
2194
|
no_input_poke_sec: 30,
|
|
2191
2195
|
no_input_poke_text: "Are you still there?",
|
|
2192
2196
|
no_input_end_conversation_sec: 180,
|