@roarkanalytics/sdk 8.0.0 → 9.0.0
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/CHANGELOG.md +23 -0
- package/client.d.mts +7 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -7
- package/client.d.ts.map +1 -1
- package/client.js +6 -3
- package/client.js.map +1 -1
- package/client.mjs +7 -4
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-connection.d.mts +0 -88
- package/resources/agent-connection.d.mts.map +1 -1
- package/resources/agent-connection.d.ts +0 -88
- package/resources/agent-connection.d.ts.map +1 -1
- package/resources/agent.d.mts +2 -200
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +2 -200
- package/resources/agent.d.ts.map +1 -1
- package/resources/conversation.d.mts +6 -95
- package/resources/conversation.d.mts.map +1 -1
- package/resources/conversation.d.ts +6 -95
- package/resources/conversation.d.ts.map +1 -1
- package/resources/conversation.js +5 -17
- package/resources/conversation.js.map +1 -1
- package/resources/conversation.mjs +5 -17
- package/resources/conversation.mjs.map +1 -1
- package/resources/customer-flow-folder.d.mts +157 -0
- package/resources/customer-flow-folder.d.mts.map +1 -0
- package/resources/customer-flow-folder.d.ts +157 -0
- package/resources/customer-flow-folder.d.ts.map +1 -0
- package/resources/customer-flow-folder.js +54 -0
- package/resources/customer-flow-folder.js.map +1 -0
- package/resources/customer-flow-folder.mjs +50 -0
- package/resources/customer-flow-folder.mjs.map +1 -0
- package/resources/customer-flow.d.mts +558 -2
- package/resources/customer-flow.d.mts.map +1 -1
- package/resources/customer-flow.d.ts +558 -2
- package/resources/customer-flow.d.ts.map +1 -1
- package/resources/customer-flow.js +2 -2
- package/resources/customer-flow.mjs +2 -2
- package/resources/dashboard.d.mts +3 -3
- package/resources/dashboard.d.ts +3 -3
- package/resources/dashboard.js +3 -3
- package/resources/dashboard.mjs +3 -3
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/live-report.d.mts +10 -10
- package/resources/live-report.d.ts +10 -10
- package/resources/me.d.mts +20 -19
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +20 -19
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +14 -13
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +14 -13
- package/resources/me.mjs.map +1 -1
- package/resources/metric.d.mts +60 -60
- package/resources/metric.d.ts +60 -60
- package/resources/simulation-group.d.mts +13 -13
- package/resources/simulation-group.d.ts +13 -13
- package/resources/simulation-group.js +5 -5
- package/resources/simulation-group.mjs +5 -5
- package/resources/simulation-run-group.d.mts +2 -2
- package/resources/simulation-run-group.d.ts +2 -2
- package/resources/simulation-run-group.js +2 -2
- package/resources/simulation-run-group.mjs +2 -2
- package/resources/simulation.d.mts +1086 -4
- package/resources/simulation.d.mts.map +1 -1
- package/resources/simulation.d.ts +1086 -4
- package/resources/simulation.d.ts.map +1 -1
- package/resources/simulation.js +106 -0
- package/resources/simulation.js.map +1 -1
- package/resources/simulation.mjs +106 -0
- package/resources/simulation.mjs.map +1 -1
- package/src/client.ts +42 -43
- package/src/resources/agent-connection.ts +0 -103
- package/src/resources/agent.ts +2 -317
- package/src/resources/conversation.ts +6 -126
- package/src/resources/customer-flow-folder.ts +235 -0
- package/src/resources/customer-flow.ts +862 -2
- package/src/resources/dashboard.ts +3 -3
- package/src/resources/index.ts +18 -20
- package/src/resources/live-report.ts +10 -10
- package/src/resources/me.ts +20 -19
- package/src/resources/metric.ts +60 -60
- package/src/resources/simulation-group.ts +13 -13
- package/src/resources/simulation-run-group.ts +2 -2
- package/src/resources/simulation.ts +1759 -52
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/agent-setup.d.mts +0 -1057
- package/resources/agent-setup.d.mts.map +0 -1
- package/resources/agent-setup.d.ts +0 -1057
- package/resources/agent-setup.d.ts.map +0 -1
- package/resources/agent-setup.js +0 -113
- package/resources/agent-setup.js.map +0 -1
- package/resources/agent-setup.mjs +0 -109
- package/resources/agent-setup.mjs.map +0 -1
- package/src/resources/agent-setup.ts +0 -1685
|
@@ -247,13 +247,6 @@ export namespace AgentConnectionCreateResponse {
|
|
|
247
247
|
*/
|
|
248
248
|
agentScope: 'ALL' | 'SELECTED' | null;
|
|
249
249
|
|
|
250
|
-
/**
|
|
251
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
252
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
253
|
-
* agent up by hand. Defaults to false.
|
|
254
|
-
*/
|
|
255
|
-
autoSetUpAgents: boolean;
|
|
256
|
-
|
|
257
250
|
capabilities: Array<'PULL_AGENTS' | 'PULL_CALLS' | 'PUSH_AGENT_CONFIG'>;
|
|
258
251
|
|
|
259
252
|
/**
|
|
@@ -486,13 +479,6 @@ export namespace AgentConnectionUpdateResponse {
|
|
|
486
479
|
*/
|
|
487
480
|
agentScope: 'ALL' | 'SELECTED' | null;
|
|
488
481
|
|
|
489
|
-
/**
|
|
490
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
491
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
492
|
-
* agent up by hand. Defaults to false.
|
|
493
|
-
*/
|
|
494
|
-
autoSetUpAgents: boolean;
|
|
495
|
-
|
|
496
482
|
capabilities: Array<'PULL_AGENTS' | 'PULL_CALLS' | 'PUSH_AGENT_CONFIG'>;
|
|
497
483
|
|
|
498
484
|
/**
|
|
@@ -720,13 +706,6 @@ export namespace AgentConnectionListResponse {
|
|
|
720
706
|
*/
|
|
721
707
|
agentScope: 'ALL' | 'SELECTED' | null;
|
|
722
708
|
|
|
723
|
-
/**
|
|
724
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
725
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
726
|
-
* agent up by hand. Defaults to false.
|
|
727
|
-
*/
|
|
728
|
-
autoSetUpAgents: boolean;
|
|
729
|
-
|
|
730
709
|
capabilities: Array<'PULL_AGENTS' | 'PULL_CALLS' | 'PUSH_AGENT_CONFIG'>;
|
|
731
710
|
|
|
732
711
|
/**
|
|
@@ -1052,13 +1031,6 @@ export namespace AgentConnectionGetByIDResponse {
|
|
|
1052
1031
|
*/
|
|
1053
1032
|
agentScope: 'ALL' | 'SELECTED' | null;
|
|
1054
1033
|
|
|
1055
|
-
/**
|
|
1056
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
1057
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
1058
|
-
* agent up by hand. Defaults to false.
|
|
1059
|
-
*/
|
|
1060
|
-
autoSetUpAgents: boolean;
|
|
1061
|
-
|
|
1062
1034
|
capabilities: Array<'PULL_AGENTS' | 'PULL_CALLS' | 'PUSH_AGENT_CONFIG'>;
|
|
1063
1035
|
|
|
1064
1036
|
/**
|
|
@@ -1340,11 +1312,6 @@ export namespace AgentConnectionListProvidersResponse {
|
|
|
1340
1312
|
*/
|
|
1341
1313
|
supportsAgentDiscovery: boolean;
|
|
1342
1314
|
|
|
1343
|
-
/**
|
|
1344
|
-
* Whether `autoSetUpAgents` applies.
|
|
1345
|
-
*/
|
|
1346
|
-
supportsAutoSetUp: boolean;
|
|
1347
|
-
|
|
1348
1315
|
/**
|
|
1349
1316
|
* Whether past calls can be imported with a backfill.
|
|
1350
1317
|
*/
|
|
@@ -1398,13 +1365,6 @@ export declare namespace AgentConnectionCreateParams {
|
|
|
1398
1365
|
*/
|
|
1399
1366
|
agentScope?: 'ALL' | 'SELECTED';
|
|
1400
1367
|
|
|
1401
|
-
/**
|
|
1402
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
1403
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
1404
|
-
* agent up by hand. Defaults to false.
|
|
1405
|
-
*/
|
|
1406
|
-
autoSetUpAgents?: boolean;
|
|
1407
|
-
|
|
1408
1368
|
/**
|
|
1409
1369
|
* What the connection does. Defaults to PULL_AGENTS and PULL_CALLS, plus
|
|
1410
1370
|
* PUSH_AGENT_CONFIG on Retell, Vapi and ElevenLabs.
|
|
@@ -1450,13 +1410,6 @@ export declare namespace AgentConnectionCreateParams {
|
|
|
1450
1410
|
*/
|
|
1451
1411
|
agentScope?: 'ALL' | 'SELECTED';
|
|
1452
1412
|
|
|
1453
|
-
/**
|
|
1454
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
1455
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
1456
|
-
* agent up by hand. Defaults to false.
|
|
1457
|
-
*/
|
|
1458
|
-
autoSetUpAgents?: boolean;
|
|
1459
|
-
|
|
1460
1413
|
/**
|
|
1461
1414
|
* What the connection does. Defaults to PULL_AGENTS and PULL_CALLS, plus
|
|
1462
1415
|
* PUSH_AGENT_CONFIG on Retell, Vapi and ElevenLabs.
|
|
@@ -1508,13 +1461,6 @@ export declare namespace AgentConnectionCreateParams {
|
|
|
1508
1461
|
*/
|
|
1509
1462
|
agentScope?: 'ALL' | 'SELECTED';
|
|
1510
1463
|
|
|
1511
|
-
/**
|
|
1512
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
1513
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
1514
|
-
* agent up by hand. Defaults to false.
|
|
1515
|
-
*/
|
|
1516
|
-
autoSetUpAgents?: boolean;
|
|
1517
|
-
|
|
1518
1464
|
/**
|
|
1519
1465
|
* What the connection does. Defaults to PULL_AGENTS and PULL_CALLS, plus
|
|
1520
1466
|
* PUSH_AGENT_CONFIG on Retell, Vapi and ElevenLabs.
|
|
@@ -1560,13 +1506,6 @@ export declare namespace AgentConnectionCreateParams {
|
|
|
1560
1506
|
*/
|
|
1561
1507
|
agentScope?: 'ALL' | 'SELECTED';
|
|
1562
1508
|
|
|
1563
|
-
/**
|
|
1564
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
1565
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
1566
|
-
* agent up by hand. Defaults to false.
|
|
1567
|
-
*/
|
|
1568
|
-
autoSetUpAgents?: boolean;
|
|
1569
|
-
|
|
1570
1509
|
/**
|
|
1571
1510
|
* What the connection does. Defaults to PULL_AGENTS and PULL_CALLS, plus
|
|
1572
1511
|
* PUSH_AGENT_CONFIG on Retell, Vapi and ElevenLabs.
|
|
@@ -1642,13 +1581,6 @@ export declare namespace AgentConnectionCreateParams {
|
|
|
1642
1581
|
*/
|
|
1643
1582
|
agentScope?: 'ALL' | 'SELECTED';
|
|
1644
1583
|
|
|
1645
|
-
/**
|
|
1646
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
1647
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
1648
|
-
* agent up by hand. Defaults to false.
|
|
1649
|
-
*/
|
|
1650
|
-
autoSetUpAgents?: boolean;
|
|
1651
|
-
|
|
1652
1584
|
/**
|
|
1653
1585
|
* Creates a LiveKit endpoint for each agent the connection brings in, so Roark can
|
|
1654
1586
|
* place test calls to it. Omit to create none; endpoints can be added later on the
|
|
@@ -1933,13 +1865,6 @@ export declare namespace AgentConnectionUpdateParams {
|
|
|
1933
1865
|
*/
|
|
1934
1866
|
apiKey?: string;
|
|
1935
1867
|
|
|
1936
|
-
/**
|
|
1937
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
1938
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
1939
|
-
* agent up by hand. Defaults to false.
|
|
1940
|
-
*/
|
|
1941
|
-
autoSetUpAgents?: boolean;
|
|
1942
|
-
|
|
1943
1868
|
/**
|
|
1944
1869
|
* What the connection does. Defaults to PULL_AGENTS and PULL_CALLS, plus
|
|
1945
1870
|
* PUSH_AGENT_CONFIG on Retell, Vapi and ElevenLabs.
|
|
@@ -1993,13 +1918,6 @@ export declare namespace AgentConnectionUpdateParams {
|
|
|
1993
1918
|
*/
|
|
1994
1919
|
apiKey?: string;
|
|
1995
1920
|
|
|
1996
|
-
/**
|
|
1997
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
1998
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
1999
|
-
* agent up by hand. Defaults to false.
|
|
2000
|
-
*/
|
|
2001
|
-
autoSetUpAgents?: boolean;
|
|
2002
|
-
|
|
2003
1921
|
/**
|
|
2004
1922
|
* What the connection does. Defaults to PULL_AGENTS and PULL_CALLS, plus
|
|
2005
1923
|
* PUSH_AGENT_CONFIG on Retell, Vapi and ElevenLabs.
|
|
@@ -2059,13 +1977,6 @@ export declare namespace AgentConnectionUpdateParams {
|
|
|
2059
1977
|
*/
|
|
2060
1978
|
apiKey?: string;
|
|
2061
1979
|
|
|
2062
|
-
/**
|
|
2063
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
2064
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
2065
|
-
* agent up by hand. Defaults to false.
|
|
2066
|
-
*/
|
|
2067
|
-
autoSetUpAgents?: boolean;
|
|
2068
|
-
|
|
2069
1980
|
/**
|
|
2070
1981
|
* What the connection does. Defaults to PULL_AGENTS and PULL_CALLS, plus
|
|
2071
1982
|
* PUSH_AGENT_CONFIG on Retell, Vapi and ElevenLabs.
|
|
@@ -2119,13 +2030,6 @@ export declare namespace AgentConnectionUpdateParams {
|
|
|
2119
2030
|
*/
|
|
2120
2031
|
apiKey?: string;
|
|
2121
2032
|
|
|
2122
|
-
/**
|
|
2123
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
2124
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
2125
|
-
* agent up by hand. Defaults to false.
|
|
2126
|
-
*/
|
|
2127
|
-
autoSetUpAgents?: boolean;
|
|
2128
|
-
|
|
2129
2033
|
/**
|
|
2130
2034
|
* What the connection does. Defaults to PULL_AGENTS and PULL_CALLS, plus
|
|
2131
2035
|
* PUSH_AGENT_CONFIG on Retell, Vapi and ElevenLabs.
|
|
@@ -2212,13 +2116,6 @@ export declare namespace AgentConnectionUpdateParams {
|
|
|
2212
2116
|
*/
|
|
2213
2117
|
apiSecret?: string;
|
|
2214
2118
|
|
|
2215
|
-
/**
|
|
2216
|
-
* When true, every agent this connection brings in is set up for testing as it
|
|
2217
|
-
* arrives: Roark drafts its customer flows and metrics, the same as setting the
|
|
2218
|
-
* agent up by hand. Defaults to false.
|
|
2219
|
-
*/
|
|
2220
|
-
autoSetUpAgents?: boolean;
|
|
2221
|
-
|
|
2222
2119
|
/**
|
|
2223
2120
|
* When the recording starts for a marked room. EAGER starts it at room creation;
|
|
2224
2121
|
* DEFERRED waits for the metadata. Needs `metadataFilteringEnabled`. Defaults to
|
package/src/resources/agent.ts
CHANGED
|
@@ -132,253 +132,11 @@ export namespace AgentCreateResponse {
|
|
|
132
132
|
*/
|
|
133
133
|
name: string;
|
|
134
134
|
|
|
135
|
-
/**
|
|
136
|
-
* The tests Roark generated for an agent, and why
|
|
137
|
-
*/
|
|
138
|
-
setup: Data.Setup | null;
|
|
139
|
-
|
|
140
135
|
/**
|
|
141
136
|
* Last update timestamp in ISO 8601 format
|
|
142
137
|
*/
|
|
143
138
|
updatedAt: string;
|
|
144
139
|
}
|
|
145
|
-
|
|
146
|
-
export namespace Data {
|
|
147
|
-
/**
|
|
148
|
-
* The tests Roark generated for an agent, and why
|
|
149
|
-
*/
|
|
150
|
-
export interface Setup {
|
|
151
|
-
/**
|
|
152
|
-
* Setup ID
|
|
153
|
-
*/
|
|
154
|
-
id: string;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* What setup did and said, in order
|
|
158
|
-
*/
|
|
159
|
-
activity: Array<Setup.Activity>;
|
|
160
|
-
|
|
161
|
-
agentId: string;
|
|
162
|
-
|
|
163
|
-
capabilities: Array<
|
|
164
|
-
| 'APPOINTMENT_BOOKING'
|
|
165
|
-
| 'FAQ'
|
|
166
|
-
| 'IDENTITY_VERIFICATION'
|
|
167
|
-
| 'ACCOUNT_MANAGEMENT'
|
|
168
|
-
| 'BILLING_AND_PAYMENTS'
|
|
169
|
-
| 'ORDER_MANAGEMENT'
|
|
170
|
-
| 'TROUBLESHOOTING'
|
|
171
|
-
| 'CALL_ROUTING'
|
|
172
|
-
| 'LEAD_QUALIFICATION'
|
|
173
|
-
| 'COLLECTIONS'
|
|
174
|
-
| 'OUTBOUND_CALLING'
|
|
175
|
-
>;
|
|
176
|
-
|
|
177
|
-
completedAt: string | null;
|
|
178
|
-
|
|
179
|
-
createdAt: string;
|
|
180
|
-
|
|
181
|
-
errorMessage: string | null;
|
|
182
|
-
|
|
183
|
-
explore: Setup.Explore;
|
|
184
|
-
|
|
185
|
-
industry:
|
|
186
|
-
| 'HEALTHCARE'
|
|
187
|
-
| 'FINANCIAL_SERVICES'
|
|
188
|
-
| 'INSURANCE'
|
|
189
|
-
| 'DEBT_COLLECTION'
|
|
190
|
-
| 'RETAIL'
|
|
191
|
-
| 'TRAVEL_AND_HOSPITALITY'
|
|
192
|
-
| 'TELECOMMUNICATIONS'
|
|
193
|
-
| 'TECHNOLOGY'
|
|
194
|
-
| 'PUBLIC_SECTOR'
|
|
195
|
-
| 'UTILITIES'
|
|
196
|
-
| 'LOGISTICS'
|
|
197
|
-
| 'AUTOMOTIVE'
|
|
198
|
-
| 'HOME_SERVICES'
|
|
199
|
-
| 'RESTAURANTS'
|
|
200
|
-
| 'EDUCATION'
|
|
201
|
-
| 'OTHER'
|
|
202
|
-
| null;
|
|
203
|
-
|
|
204
|
-
items: Array<Setup.Item>;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* The checklist setup works through
|
|
208
|
-
*/
|
|
209
|
-
layers: Array<Setup.Layer>;
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* The question setup is waiting on, while NEEDS_INPUT
|
|
213
|
-
*/
|
|
214
|
-
question: Setup.Question | null;
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* The run plan to start once setup completes
|
|
218
|
-
*/
|
|
219
|
-
runPlanId: string | null;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
|
|
223
|
-
* default if nobody answers), COMPLETED, FAILED or CANCELLED
|
|
224
|
-
*/
|
|
225
|
-
status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Test data the agent asked for that Roark did not have
|
|
229
|
-
*/
|
|
230
|
-
testDataNeeded: Array<Setup.TestDataNeeded>;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export namespace Setup {
|
|
234
|
-
/**
|
|
235
|
-
* One thing setup did or said, in order
|
|
236
|
-
*/
|
|
237
|
-
export interface Activity {
|
|
238
|
-
createdAt: string;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
|
|
242
|
-
*/
|
|
243
|
-
kind:
|
|
244
|
-
| 'STATUS'
|
|
245
|
-
| 'REASONING'
|
|
246
|
-
| 'ACTION'
|
|
247
|
-
| 'GUIDANCE'
|
|
248
|
-
| 'QUESTION'
|
|
249
|
-
| 'ANSWER'
|
|
250
|
-
| 'EXPLORATION'
|
|
251
|
-
| 'ERROR';
|
|
252
|
-
|
|
253
|
-
text: string;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export interface Explore {
|
|
257
|
-
conversationsUsed: number;
|
|
258
|
-
|
|
259
|
-
enabled: boolean;
|
|
260
|
-
|
|
261
|
-
maxConversationMinutes: number;
|
|
262
|
-
|
|
263
|
-
maxConversations: number;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Something setup created or chose to leave out, and why
|
|
268
|
-
*/
|
|
269
|
-
export interface Item {
|
|
270
|
-
id: string;
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* CREATED, or SKIPPED with the reason
|
|
274
|
-
*/
|
|
275
|
-
action: 'CREATED' | 'SKIPPED';
|
|
276
|
-
|
|
277
|
-
capability:
|
|
278
|
-
| 'APPOINTMENT_BOOKING'
|
|
279
|
-
| 'FAQ'
|
|
280
|
-
| 'IDENTITY_VERIFICATION'
|
|
281
|
-
| 'ACCOUNT_MANAGEMENT'
|
|
282
|
-
| 'BILLING_AND_PAYMENTS'
|
|
283
|
-
| 'ORDER_MANAGEMENT'
|
|
284
|
-
| 'TROUBLESHOOTING'
|
|
285
|
-
| 'CALL_ROUTING'
|
|
286
|
-
| 'LEAD_QUALIFICATION'
|
|
287
|
-
| 'COLLECTIONS'
|
|
288
|
-
| 'OUTBOUND_CALLING'
|
|
289
|
-
| null;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* A flow, a metric, or a pass or fail check
|
|
293
|
-
*/
|
|
294
|
-
kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
|
|
295
|
-
|
|
296
|
-
label: string;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
|
|
300
|
-
* prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
|
|
301
|
-
*/
|
|
302
|
-
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
|
|
306
|
-
* offered
|
|
307
|
-
*/
|
|
308
|
-
origin: 'DISCOVERED' | 'INFERRED' | null;
|
|
309
|
-
|
|
310
|
-
reason: string;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* The flow or metric it created
|
|
314
|
-
*/
|
|
315
|
-
resourceId: string | null;
|
|
316
|
-
|
|
317
|
-
source: Item.Source;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
export namespace Item {
|
|
321
|
-
export interface Source {
|
|
322
|
-
/**
|
|
323
|
-
* The exploration call it came from
|
|
324
|
-
*/
|
|
325
|
-
callId: string | null;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Where in the call
|
|
329
|
-
*/
|
|
330
|
-
offsetMs: number | null;
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* The words in the source that led to it
|
|
334
|
-
*/
|
|
335
|
-
quote: string | null;
|
|
336
|
-
|
|
337
|
-
type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* The page it came from, for website sources
|
|
341
|
-
*/
|
|
342
|
-
url: string | null;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Where one part of testing the agent stands
|
|
348
|
-
*/
|
|
349
|
-
export interface Layer {
|
|
350
|
-
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
|
|
354
|
-
* could not test it and said why. OPEN: not covered yet; setup does not finish
|
|
355
|
-
* while a layer is open. NOT_APPLICABLE: nothing to test it from.
|
|
356
|
-
*/
|
|
357
|
-
status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
|
|
358
|
-
|
|
359
|
-
summary: string;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* The question setup is waiting on, while NEEDS_INPUT
|
|
364
|
-
*/
|
|
365
|
-
export interface Question {
|
|
366
|
-
defaultOption: string;
|
|
367
|
-
|
|
368
|
-
options: Array<string>;
|
|
369
|
-
|
|
370
|
-
question: string;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
export interface TestDataNeeded {
|
|
374
|
-
callId: string | null;
|
|
375
|
-
|
|
376
|
-
label: string;
|
|
377
|
-
|
|
378
|
-
reason: string;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
140
|
}
|
|
383
141
|
|
|
384
142
|
export interface AgentUpdateResponse {
|
|
@@ -646,11 +404,6 @@ export interface AgentCreateParams {
|
|
|
646
404
|
*/
|
|
647
405
|
name: string;
|
|
648
406
|
|
|
649
|
-
/**
|
|
650
|
-
* Controls the flows, metrics and run plan Roark generates for the agent
|
|
651
|
-
*/
|
|
652
|
-
autoSetup?: AgentCreateParams.AutoSetup | null;
|
|
653
|
-
|
|
654
407
|
/**
|
|
655
408
|
* Custom identifier for the agent. Must be unique in the project.
|
|
656
409
|
*/
|
|
@@ -667,8 +420,7 @@ export interface AgentCreateParams {
|
|
|
667
420
|
endpoint?: AgentCreateParams.Endpoint | null;
|
|
668
421
|
|
|
669
422
|
/**
|
|
670
|
-
* The industry the agent serves.
|
|
671
|
-
* checks setup adds.
|
|
423
|
+
* The industry the agent serves.
|
|
672
424
|
*/
|
|
673
425
|
industry?:
|
|
674
426
|
| 'HEALTHCARE'
|
|
@@ -690,79 +442,12 @@ export interface AgentCreateParams {
|
|
|
690
442
|
| null;
|
|
691
443
|
|
|
692
444
|
/**
|
|
693
|
-
* The agent's system prompt.
|
|
445
|
+
* The agent's system prompt.
|
|
694
446
|
*/
|
|
695
447
|
prompt?: string | null;
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* What you want tested, in your own words. Each scenario you describe becomes a
|
|
699
|
-
* flow.
|
|
700
|
-
*/
|
|
701
|
-
testingInstructions?: string | null;
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* A page Roark reads to learn about the business.
|
|
705
|
-
*/
|
|
706
|
-
websiteUrl?: string | null;
|
|
707
448
|
}
|
|
708
449
|
|
|
709
450
|
export namespace AgentCreateParams {
|
|
710
|
-
/**
|
|
711
|
-
* Controls the flows, metrics and run plan Roark generates for the agent
|
|
712
|
-
*/
|
|
713
|
-
export interface AutoSetup {
|
|
714
|
-
/**
|
|
715
|
-
* The capabilities to test. Omit to let Roark work them out from the agent.
|
|
716
|
-
*/
|
|
717
|
-
capabilities?: Array<
|
|
718
|
-
| 'APPOINTMENT_BOOKING'
|
|
719
|
-
| 'FAQ'
|
|
720
|
-
| 'IDENTITY_VERIFICATION'
|
|
721
|
-
| 'ACCOUNT_MANAGEMENT'
|
|
722
|
-
| 'BILLING_AND_PAYMENTS'
|
|
723
|
-
| 'ORDER_MANAGEMENT'
|
|
724
|
-
| 'TROUBLESHOOTING'
|
|
725
|
-
| 'CALL_ROUTING'
|
|
726
|
-
| 'LEAD_QUALIFICATION'
|
|
727
|
-
| 'COLLECTIONS'
|
|
728
|
-
| 'OUTBOUND_CALLING'
|
|
729
|
-
>;
|
|
730
|
-
|
|
731
|
-
/**
|
|
732
|
-
* Set to false to skip setup. When omitted, setup runs if you pass a prompt,
|
|
733
|
-
* endpoint, website or testing instructions.
|
|
734
|
-
*/
|
|
735
|
-
enabled?: boolean;
|
|
736
|
-
|
|
737
|
-
/**
|
|
738
|
-
* Exploration settings
|
|
739
|
-
*/
|
|
740
|
-
explore?: AutoSetup.Explore;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
export namespace AutoSetup {
|
|
744
|
-
/**
|
|
745
|
-
* Exploration settings
|
|
746
|
-
*/
|
|
747
|
-
export interface Explore {
|
|
748
|
-
/**
|
|
749
|
-
* Whether Roark calls the agent to discover what it does before finishing setup.
|
|
750
|
-
* Exploration calls are billed.
|
|
751
|
-
*/
|
|
752
|
-
enabled?: boolean;
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* The longest a single exploration call may last, in minutes.
|
|
756
|
-
*/
|
|
757
|
-
maxConversationMinutes?: number;
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
* The most exploration calls Roark places.
|
|
761
|
-
*/
|
|
762
|
-
maxConversations?: number;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
|
|
766
451
|
/**
|
|
767
452
|
* The phone number or connection Roark calls to test the agent
|
|
768
453
|
*/
|
|
@@ -7,28 +7,12 @@ import { path } from '../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Conversation extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* both.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* const conversations = await client.conversation.list();
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
list(
|
|
21
|
-
query: ConversationListParams | null | undefined = {},
|
|
22
|
-
options?: RequestOptions,
|
|
23
|
-
): APIPromise<ConversationListResponse> {
|
|
24
|
-
return this._client.get('/v1/conversation', { query, ...options });
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* A call or chat by its id, whichever it is. One started through
|
|
10
|
+
* Fetches one conversation by its id, whether it is a call or a chat. The same
|
|
11
|
+
* endpoint reads both modalities, and `modality` in the response says which one it
|
|
12
|
+
* is, so you do not need to know it up front. A conversation started with
|
|
29
13
|
* `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
|
|
30
|
-
* created, before it is recorded. For its transcript and
|
|
31
|
-
* call or chat
|
|
14
|
+
* created, before it is recorded as a call or chat. For its transcript and
|
|
15
|
+
* metrics, use the call or chat endpoints that match its `modality`.
|
|
32
16
|
*
|
|
33
17
|
* @example
|
|
34
18
|
* ```ts
|
|
@@ -42,79 +26,6 @@ export class Conversation extends APIResource {
|
|
|
42
26
|
}
|
|
43
27
|
}
|
|
44
28
|
|
|
45
|
-
export interface ConversationListResponse {
|
|
46
|
-
data: Array<ConversationListResponse.Data>;
|
|
47
|
-
|
|
48
|
-
pagination: ConversationListResponse.Pagination;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export namespace ConversationListResponse {
|
|
52
|
-
export interface Data {
|
|
53
|
-
/**
|
|
54
|
-
* The conversation id: its call id or chat id. `modality` says which, and where to
|
|
55
|
-
* read its transcript and metrics (`/v1/call/{callId}` or `/v1/chat/{id}`).
|
|
56
|
-
*/
|
|
57
|
-
id: string;
|
|
58
|
-
|
|
59
|
-
createdAt: string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* How long it ran. Null until it ends.
|
|
63
|
-
*/
|
|
64
|
-
durationMs: number | null;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* When it ended (ISO 8601). Null until it ends.
|
|
68
|
-
*/
|
|
69
|
-
endedAt: string | null;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Your own id for it, if one was given.
|
|
73
|
-
*/
|
|
74
|
-
externalId: string | null;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* `voice` or `chat`. A voice conversation is recorded as a call
|
|
78
|
-
* (`/v1/call/{callId}`), a chat as a chat (`/v1/chat/{id}`).
|
|
79
|
-
*/
|
|
80
|
-
modality: 'voice' | 'chat';
|
|
81
|
-
|
|
82
|
-
projectId: string;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* When it started, or was created while pending (ISO 8601).
|
|
86
|
-
*/
|
|
87
|
-
startedAt: string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* `PENDING` until it starts (a call ringing, a chat nobody has joined yet),
|
|
91
|
-
* `IN_PROGRESS`, then `ENDED`.
|
|
92
|
-
*/
|
|
93
|
-
status: 'PENDING' | 'IN_PROGRESS' | 'ENDED';
|
|
94
|
-
|
|
95
|
-
summary: string | null;
|
|
96
|
-
|
|
97
|
-
title: string | null;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface Pagination {
|
|
101
|
-
/**
|
|
102
|
-
* Whether there are more items to fetch
|
|
103
|
-
*/
|
|
104
|
-
hasMore: boolean;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Cursor for the next page of items
|
|
108
|
-
*/
|
|
109
|
-
nextCursor: string | null;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Total number of items
|
|
113
|
-
*/
|
|
114
|
-
total: number;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
29
|
export interface ConversationGetByIDResponse {
|
|
119
30
|
data: ConversationGetByIDResponse.Data;
|
|
120
31
|
}
|
|
@@ -169,37 +80,6 @@ export namespace ConversationGetByIDResponse {
|
|
|
169
80
|
}
|
|
170
81
|
}
|
|
171
82
|
|
|
172
|
-
export interface ConversationListParams {
|
|
173
|
-
/**
|
|
174
|
-
* The `nextCursor` of the previous page.
|
|
175
|
-
*/
|
|
176
|
-
after?: string;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* How many to return (default 20, max 100).
|
|
180
|
-
*/
|
|
181
|
-
limit?: number;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Only `voice`, or only `chat`. Both by default.
|
|
185
|
-
*/
|
|
186
|
-
modality?: 'voice' | 'chat' | 'call';
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Only conversations that started at or after this time.
|
|
190
|
-
*/
|
|
191
|
-
startedFrom?: string;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Only conversations that started at or before this time.
|
|
195
|
-
*/
|
|
196
|
-
startedTo?: string;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
83
|
export declare namespace Conversation {
|
|
200
|
-
export {
|
|
201
|
-
type ConversationListResponse as ConversationListResponse,
|
|
202
|
-
type ConversationGetByIDResponse as ConversationGetByIDResponse,
|
|
203
|
-
type ConversationListParams as ConversationListParams,
|
|
204
|
-
};
|
|
84
|
+
export { type ConversationGetByIDResponse as ConversationGetByIDResponse };
|
|
205
85
|
}
|