@roarkanalytics/sdk 7.9.0 → 8.0.1
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 +20 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +20 -5
- package/client.d.ts.map +1 -1
- package/client.js +21 -3
- package/client.js.map +1 -1
- package/client.mjs +21 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-connection.d.mts +1952 -0
- package/resources/agent-connection.d.mts.map +1 -0
- package/resources/agent-connection.d.ts +1952 -0
- package/resources/agent-connection.d.ts.map +1 -0
- package/resources/agent-connection.js +173 -0
- package/resources/agent-connection.js.map +1 -0
- package/resources/agent-connection.mjs +169 -0
- package/resources/agent-connection.mjs.map +1 -0
- package/resources/agent-conversation.d.mts +110 -0
- package/resources/agent-conversation.d.mts.map +1 -0
- package/resources/agent-conversation.d.ts +110 -0
- package/resources/agent-conversation.d.ts.map +1 -0
- package/resources/agent-conversation.js +41 -0
- package/resources/agent-conversation.js.map +1 -0
- package/resources/agent-conversation.mjs +37 -0
- package/resources/agent-conversation.mjs.map +1 -0
- package/resources/agent-draft.d.mts +101 -35
- package/resources/agent-draft.d.mts.map +1 -1
- package/resources/agent-draft.d.ts +101 -35
- package/resources/agent-draft.d.ts.map +1 -1
- package/resources/agent-endpoint.d.mts +4 -4
- package/resources/agent-endpoint.d.mts.map +1 -1
- package/resources/agent-endpoint.d.ts +4 -4
- package/resources/agent-endpoint.d.ts.map +1 -1
- package/resources/agent-setup.d.mts +1057 -0
- package/resources/agent-setup.d.mts.map +1 -0
- package/resources/agent-setup.d.ts +1057 -0
- package/resources/agent-setup.d.ts.map +1 -0
- package/resources/agent-setup.js +113 -0
- package/resources/agent-setup.js.map +1 -0
- package/resources/agent-setup.mjs +109 -0
- package/resources/agent-setup.mjs.map +1 -0
- package/resources/agent-version.d.mts +57 -18
- package/resources/agent-version.d.mts.map +1 -1
- package/resources/agent-version.d.ts +57 -18
- package/resources/agent-version.d.ts.map +1 -1
- package/resources/agent.d.mts +263 -4
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +263 -4
- package/resources/agent.d.ts.map +1 -1
- package/resources/calendar-connection.d.mts +834 -56
- package/resources/calendar-connection.d.mts.map +1 -1
- package/resources/calendar-connection.d.ts +834 -56
- package/resources/calendar-connection.d.ts.map +1 -1
- package/resources/calendar-connection.js +127 -8
- package/resources/calendar-connection.js.map +1 -1
- package/resources/calendar-connection.mjs +127 -8
- package/resources/calendar-connection.mjs.map +1 -1
- package/resources/call.d.mts +2 -2
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +2 -2
- package/resources/call.d.ts.map +1 -1
- package/resources/config.d.mts +78 -36
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +78 -36
- package/resources/config.d.ts.map +1 -1
- package/resources/conversation.d.mts +156 -0
- package/resources/conversation.d.mts.map +1 -0
- package/resources/conversation.d.ts +156 -0
- package/resources/conversation.d.ts.map +1 -0
- package/resources/conversation.js +40 -0
- package/resources/conversation.js.map +1 -0
- package/resources/conversation.mjs +36 -0
- package/resources/conversation.mjs.map +1 -0
- package/resources/customer-flow-edge-case.d.mts +637 -40
- package/resources/customer-flow-edge-case.d.mts.map +1 -1
- package/resources/customer-flow-edge-case.d.ts +637 -40
- package/resources/customer-flow-edge-case.d.ts.map +1 -1
- package/resources/customer-flow.d.mts +2583 -156
- package/resources/customer-flow.d.mts.map +1 -1
- package/resources/customer-flow.d.ts +2583 -156
- package/resources/customer-flow.d.ts.map +1 -1
- package/resources/{customer-profile.d.mts → customer.d.mts} +287 -92
- package/resources/customer.d.mts.map +1 -0
- package/resources/{customer-profile.d.ts → customer.d.ts} +287 -92
- package/resources/customer.d.ts.map +1 -0
- package/resources/customer.js +180 -0
- package/resources/customer.js.map +1 -0
- package/resources/customer.mjs +176 -0
- package/resources/customer.mjs.map +1 -0
- package/resources/index.d.mts +7 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +13 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp-server.d.mts +588 -0
- package/resources/mcp-server.d.mts.map +1 -0
- package/resources/mcp-server.d.ts +588 -0
- package/resources/mcp-server.d.ts.map +1 -0
- package/resources/mcp-server.js +109 -0
- package/resources/mcp-server.js.map +1 -0
- package/resources/mcp-server.mjs +105 -0
- package/resources/mcp-server.mjs.map +1 -0
- package/resources/metric-policy.d.mts +5 -4
- package/resources/metric-policy.d.mts.map +1 -1
- package/resources/metric-policy.d.ts +5 -4
- package/resources/metric-policy.d.ts.map +1 -1
- package/resources/metric-policy.js +1 -1
- package/resources/metric-policy.mjs +1 -1
- package/resources/metric-variant.d.mts +4 -1
- package/resources/metric-variant.d.mts.map +1 -1
- package/resources/metric-variant.d.ts +4 -1
- package/resources/metric-variant.d.ts.map +1 -1
- package/resources/metric.d.mts +7 -2
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +7 -2
- package/resources/metric.d.ts.map +1 -1
- package/resources/simulation-environment.d.mts +366 -0
- package/resources/simulation-environment.d.mts.map +1 -1
- package/resources/simulation-environment.d.ts +366 -0
- package/resources/simulation-environment.d.ts.map +1 -1
- package/resources/simulation-job.d.mts +12 -8
- package/resources/simulation-job.d.mts.map +1 -1
- package/resources/simulation-job.d.ts +12 -8
- package/resources/simulation-job.d.ts.map +1 -1
- package/resources/simulation-persona.d.mts +25 -15
- package/resources/simulation-persona.d.mts.map +1 -1
- package/resources/simulation-persona.d.ts +25 -15
- package/resources/simulation-persona.d.ts.map +1 -1
- package/resources/simulation-run-plan-job.d.mts +32 -6
- package/resources/simulation-run-plan-job.d.mts.map +1 -1
- package/resources/simulation-run-plan-job.d.ts +32 -6
- package/resources/simulation-run-plan-job.d.ts.map +1 -1
- package/resources/simulation-run-plan.d.mts +126 -13
- package/resources/simulation-run-plan.d.mts.map +1 -1
- package/resources/simulation-run-plan.d.ts +126 -13
- package/resources/simulation-run-plan.d.ts.map +1 -1
- package/resources/simulation-template.d.mts +1 -1
- package/resources/simulation-template.d.mts.map +1 -1
- package/resources/simulation-template.d.ts +1 -1
- package/resources/simulation-template.d.ts.map +1 -1
- package/resources/simulation.d.mts +35 -3
- package/resources/simulation.d.mts.map +1 -1
- package/resources/simulation.d.ts +35 -3
- package/resources/simulation.d.ts.map +1 -1
- package/resources/tool.d.mts +565 -6
- package/resources/tool.d.mts.map +1 -1
- package/resources/tool.d.ts +565 -6
- package/resources/tool.d.ts.map +1 -1
- package/resources/tool.js +9 -6
- package/resources/tool.js.map +1 -1
- package/resources/tool.mjs +9 -6
- package/resources/tool.mjs.map +1 -1
- package/resources/usage.d.mts +1 -1
- package/resources/usage.d.mts.map +1 -1
- package/resources/usage.d.ts +1 -1
- package/resources/usage.d.ts.map +1 -1
- package/resources/webhook.d.mts +4 -4
- package/resources/webhook.d.mts.map +1 -1
- package/resources/webhook.d.ts +4 -4
- package/resources/webhook.d.ts.map +1 -1
- package/src/client.ts +200 -34
- package/src/resources/agent-connection.ts +2523 -0
- package/src/resources/agent-conversation.ts +139 -0
- package/src/resources/agent-draft.ts +239 -35
- package/src/resources/agent-endpoint.ts +8 -4
- package/src/resources/agent-setup.ts +1685 -0
- package/src/resources/agent-version.ts +126 -18
- package/src/resources/agent.ts +506 -4
- package/src/resources/calendar-connection.ts +1035 -63
- package/src/resources/call.ts +12 -2
- package/src/resources/config.ts +198 -36
- package/src/resources/conversation.ts +205 -0
- package/src/resources/customer-flow-edge-case.ts +709 -40
- package/src/resources/customer-flow.ts +3141 -156
- package/src/resources/{customer-profile.ts → customer.ts} +406 -294
- package/src/resources/index.ts +91 -17
- package/src/resources/mcp-server.ts +786 -0
- package/src/resources/metric-policy.ts +5 -4
- package/src/resources/metric-variant.ts +4 -1
- package/src/resources/metric.ts +7 -2
- package/src/resources/simulation-environment.ts +414 -0
- package/src/resources/simulation-job.ts +14 -8
- package/src/resources/simulation-persona.ts +25 -15
- package/src/resources/simulation-run-plan-job.ts +47 -6
- package/src/resources/simulation-run-plan.ts +140 -0
- package/src/resources/simulation-template.ts +1 -0
- package/src/resources/simulation.ts +39 -0
- package/src/resources/tool.ts +697 -6
- package/src/resources/usage.ts +6 -1
- package/src/resources/webhook.ts +8 -0
- 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/customer-profile.d.mts.map +0 -1
- package/resources/customer-profile.d.ts.map +0 -1
- package/resources/customer-profile.js +0 -141
- package/resources/customer-profile.js.map +0 -1
- package/resources/customer-profile.mjs +0 -137
- package/resources/customer-profile.mjs.map +0 -1
|
@@ -0,0 +1,1685 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class AgentSetup extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Generates flows, metrics and a run plan for the agent. Runs in the background:
|
|
11
|
+
* watch the agent.setup.completed webhook, or poll GET /v1/agent/{agentId}/setup.
|
|
12
|
+
* Refuses while another setup for the agent is running. Needs the
|
|
13
|
+
* 'simulation:create' and 'metric:create' permissions. Exploration also needs
|
|
14
|
+
* 'simulation:run', and is turned off for keys without it unless explore.enabled
|
|
15
|
+
* is set.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const agentSetup = await client.agentSetup.create(
|
|
20
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(
|
|
25
|
+
agentID: string,
|
|
26
|
+
body: AgentSetupCreateParams | null | undefined = {},
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): APIPromise<AgentSetupCreateResponse> {
|
|
29
|
+
return this._client.post(path`/v1/agent/${agentID}/setup`, { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Answers the question a setup is waiting on (status NEEDS_INPUT). If nobody
|
|
34
|
+
* answers within 15 minutes, setup goes ahead with its default.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const response = await client.agentSetup.answerQuestion(
|
|
39
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
40
|
+
* {
|
|
41
|
+
* agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
42
|
+
* text: 'x',
|
|
43
|
+
* },
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
answerQuestion(
|
|
48
|
+
setupID: string,
|
|
49
|
+
params: AgentSetupAnswerQuestionParams,
|
|
50
|
+
options?: RequestOptions,
|
|
51
|
+
): APIPromise<AgentSetupAnswerQuestionResponse> {
|
|
52
|
+
const { agentId, ...body } = params;
|
|
53
|
+
return this._client.post(path`/v1/agent/${agentId}/setup/${setupID}/answer`, { body, ...options });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Stops a running setup. Flows and metrics it already created are kept; no run
|
|
58
|
+
* plan is made. Refused once setup has finished.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const response = await client.agentSetup.cancel(
|
|
63
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
64
|
+
* { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
65
|
+
* );
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
cancel(
|
|
69
|
+
setupID: string,
|
|
70
|
+
params: AgentSetupCancelParams,
|
|
71
|
+
options?: RequestOptions,
|
|
72
|
+
): APIPromise<AgentSetupCancelResponse> {
|
|
73
|
+
const { agentId } = params;
|
|
74
|
+
return this._client.post(path`/v1/agent/${agentId}/setup/${setupID}/cancel`, options);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Returns one setup, for example the one a webhook named.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const response = await client.agentSetup.getByID(
|
|
83
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
84
|
+
* { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
85
|
+
* );
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
getByID(
|
|
89
|
+
setupID: string,
|
|
90
|
+
params: AgentSetupGetByIDParams,
|
|
91
|
+
options?: RequestOptions,
|
|
92
|
+
): APIPromise<AgentSetupGetByIDResponse> {
|
|
93
|
+
const { agentId } = params;
|
|
94
|
+
return this._client.get(path`/v1/agent/${agentId}/setup/${setupID}`, options);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Returns the agent's most recent setup: its progress, the run plan it created,
|
|
99
|
+
* and every flow, metric and check it added or left out, with the reason and the
|
|
100
|
+
* source it came from.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const response = await client.agentSetup.getLatest(
|
|
105
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
106
|
+
* );
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
getLatest(agentID: string, options?: RequestOptions): APIPromise<AgentSetupGetLatestResponse> {
|
|
110
|
+
return this._client.get(path`/v1/agent/${agentID}/setup`, options);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Tells a running setup what to focus on or avoid, in your own words. It reads it
|
|
115
|
+
* on its next turn and it outranks setup's own plan. Refused once setup has
|
|
116
|
+
* finished.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* const response = await client.agentSetup.sendGuidance(
|
|
121
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
122
|
+
* {
|
|
123
|
+
* agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
124
|
+
* text: 'x',
|
|
125
|
+
* },
|
|
126
|
+
* );
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
sendGuidance(
|
|
130
|
+
setupID: string,
|
|
131
|
+
params: AgentSetupSendGuidanceParams,
|
|
132
|
+
options?: RequestOptions,
|
|
133
|
+
): APIPromise<AgentSetupSendGuidanceResponse> {
|
|
134
|
+
const { agentId, ...body } = params;
|
|
135
|
+
return this._client.post(path`/v1/agent/${agentId}/setup/${setupID}/guidance`, { body, ...options });
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface AgentSetupCreateResponse {
|
|
140
|
+
/**
|
|
141
|
+
* The tests Roark generated for an agent, and why
|
|
142
|
+
*/
|
|
143
|
+
data: AgentSetupCreateResponse.Data;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export namespace AgentSetupCreateResponse {
|
|
147
|
+
/**
|
|
148
|
+
* The tests Roark generated for an agent, and why
|
|
149
|
+
*/
|
|
150
|
+
export interface Data {
|
|
151
|
+
/**
|
|
152
|
+
* Setup ID
|
|
153
|
+
*/
|
|
154
|
+
id: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* What setup did and said, in order
|
|
158
|
+
*/
|
|
159
|
+
activity: Array<Data.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: Data.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<Data.Item>;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The checklist setup works through
|
|
208
|
+
*/
|
|
209
|
+
layers: Array<Data.Layer>;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
213
|
+
*/
|
|
214
|
+
question: Data.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<Data.TestDataNeeded>;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export namespace Data {
|
|
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: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
|
|
244
|
+
|
|
245
|
+
text: string;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface Explore {
|
|
249
|
+
conversationsUsed: number;
|
|
250
|
+
|
|
251
|
+
enabled: boolean;
|
|
252
|
+
|
|
253
|
+
maxConversationMinutes: number;
|
|
254
|
+
|
|
255
|
+
maxConversations: number;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Something setup created or chose to leave out, and why
|
|
260
|
+
*/
|
|
261
|
+
export interface Item {
|
|
262
|
+
id: string;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* CREATED, or SKIPPED with the reason
|
|
266
|
+
*/
|
|
267
|
+
action: 'CREATED' | 'SKIPPED';
|
|
268
|
+
|
|
269
|
+
capability:
|
|
270
|
+
| 'APPOINTMENT_BOOKING'
|
|
271
|
+
| 'FAQ'
|
|
272
|
+
| 'IDENTITY_VERIFICATION'
|
|
273
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
274
|
+
| 'BILLING_AND_PAYMENTS'
|
|
275
|
+
| 'ORDER_MANAGEMENT'
|
|
276
|
+
| 'TROUBLESHOOTING'
|
|
277
|
+
| 'CALL_ROUTING'
|
|
278
|
+
| 'LEAD_QUALIFICATION'
|
|
279
|
+
| 'COLLECTIONS'
|
|
280
|
+
| 'OUTBOUND_CALLING'
|
|
281
|
+
| null;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* A flow, a metric, or a pass or fail check
|
|
285
|
+
*/
|
|
286
|
+
kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
|
|
287
|
+
|
|
288
|
+
label: string;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
|
|
292
|
+
* prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
|
|
293
|
+
*/
|
|
294
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
|
|
298
|
+
* offered
|
|
299
|
+
*/
|
|
300
|
+
origin: 'DISCOVERED' | 'INFERRED' | null;
|
|
301
|
+
|
|
302
|
+
reason: string;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* The flow or metric it created
|
|
306
|
+
*/
|
|
307
|
+
resourceId: string | null;
|
|
308
|
+
|
|
309
|
+
source: Item.Source;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export namespace Item {
|
|
313
|
+
export interface Source {
|
|
314
|
+
/**
|
|
315
|
+
* The exploration call it came from
|
|
316
|
+
*/
|
|
317
|
+
callId: string | null;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Where in the call
|
|
321
|
+
*/
|
|
322
|
+
offsetMs: number | null;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* The words in the source that led to it
|
|
326
|
+
*/
|
|
327
|
+
quote: string | null;
|
|
328
|
+
|
|
329
|
+
type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* The page it came from, for website sources
|
|
333
|
+
*/
|
|
334
|
+
url: string | null;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Where one part of testing the agent stands
|
|
340
|
+
*/
|
|
341
|
+
export interface Layer {
|
|
342
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
|
|
346
|
+
* could not test it and said why. OPEN: not covered yet; setup does not finish
|
|
347
|
+
* while a layer is open. NOT_APPLICABLE: nothing to test it from.
|
|
348
|
+
*/
|
|
349
|
+
status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
|
|
350
|
+
|
|
351
|
+
summary: string;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
356
|
+
*/
|
|
357
|
+
export interface Question {
|
|
358
|
+
defaultOption: string;
|
|
359
|
+
|
|
360
|
+
options: Array<string>;
|
|
361
|
+
|
|
362
|
+
question: string;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export interface TestDataNeeded {
|
|
366
|
+
callId: string | null;
|
|
367
|
+
|
|
368
|
+
label: string;
|
|
369
|
+
|
|
370
|
+
reason: string;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface AgentSetupAnswerQuestionResponse {
|
|
376
|
+
/**
|
|
377
|
+
* The tests Roark generated for an agent, and why
|
|
378
|
+
*/
|
|
379
|
+
data: AgentSetupAnswerQuestionResponse.Data;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export namespace AgentSetupAnswerQuestionResponse {
|
|
383
|
+
/**
|
|
384
|
+
* The tests Roark generated for an agent, and why
|
|
385
|
+
*/
|
|
386
|
+
export interface Data {
|
|
387
|
+
/**
|
|
388
|
+
* Setup ID
|
|
389
|
+
*/
|
|
390
|
+
id: string;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* What setup did and said, in order
|
|
394
|
+
*/
|
|
395
|
+
activity: Array<Data.Activity>;
|
|
396
|
+
|
|
397
|
+
agentId: string;
|
|
398
|
+
|
|
399
|
+
capabilities: Array<
|
|
400
|
+
| 'APPOINTMENT_BOOKING'
|
|
401
|
+
| 'FAQ'
|
|
402
|
+
| 'IDENTITY_VERIFICATION'
|
|
403
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
404
|
+
| 'BILLING_AND_PAYMENTS'
|
|
405
|
+
| 'ORDER_MANAGEMENT'
|
|
406
|
+
| 'TROUBLESHOOTING'
|
|
407
|
+
| 'CALL_ROUTING'
|
|
408
|
+
| 'LEAD_QUALIFICATION'
|
|
409
|
+
| 'COLLECTIONS'
|
|
410
|
+
| 'OUTBOUND_CALLING'
|
|
411
|
+
>;
|
|
412
|
+
|
|
413
|
+
completedAt: string | null;
|
|
414
|
+
|
|
415
|
+
createdAt: string;
|
|
416
|
+
|
|
417
|
+
errorMessage: string | null;
|
|
418
|
+
|
|
419
|
+
explore: Data.Explore;
|
|
420
|
+
|
|
421
|
+
industry:
|
|
422
|
+
| 'HEALTHCARE'
|
|
423
|
+
| 'FINANCIAL_SERVICES'
|
|
424
|
+
| 'INSURANCE'
|
|
425
|
+
| 'DEBT_COLLECTION'
|
|
426
|
+
| 'RETAIL'
|
|
427
|
+
| 'TRAVEL_AND_HOSPITALITY'
|
|
428
|
+
| 'TELECOMMUNICATIONS'
|
|
429
|
+
| 'TECHNOLOGY'
|
|
430
|
+
| 'PUBLIC_SECTOR'
|
|
431
|
+
| 'UTILITIES'
|
|
432
|
+
| 'LOGISTICS'
|
|
433
|
+
| 'AUTOMOTIVE'
|
|
434
|
+
| 'HOME_SERVICES'
|
|
435
|
+
| 'RESTAURANTS'
|
|
436
|
+
| 'EDUCATION'
|
|
437
|
+
| 'OTHER'
|
|
438
|
+
| null;
|
|
439
|
+
|
|
440
|
+
items: Array<Data.Item>;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* The checklist setup works through
|
|
444
|
+
*/
|
|
445
|
+
layers: Array<Data.Layer>;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
449
|
+
*/
|
|
450
|
+
question: Data.Question | null;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* The run plan to start once setup completes
|
|
454
|
+
*/
|
|
455
|
+
runPlanId: string | null;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
|
|
459
|
+
* default if nobody answers), COMPLETED, FAILED or CANCELLED
|
|
460
|
+
*/
|
|
461
|
+
status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Test data the agent asked for that Roark did not have
|
|
465
|
+
*/
|
|
466
|
+
testDataNeeded: Array<Data.TestDataNeeded>;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export namespace Data {
|
|
470
|
+
/**
|
|
471
|
+
* One thing setup did or said, in order
|
|
472
|
+
*/
|
|
473
|
+
export interface Activity {
|
|
474
|
+
createdAt: string;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
|
|
478
|
+
*/
|
|
479
|
+
kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
|
|
480
|
+
|
|
481
|
+
text: string;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export interface Explore {
|
|
485
|
+
conversationsUsed: number;
|
|
486
|
+
|
|
487
|
+
enabled: boolean;
|
|
488
|
+
|
|
489
|
+
maxConversationMinutes: number;
|
|
490
|
+
|
|
491
|
+
maxConversations: number;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Something setup created or chose to leave out, and why
|
|
496
|
+
*/
|
|
497
|
+
export interface Item {
|
|
498
|
+
id: string;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* CREATED, or SKIPPED with the reason
|
|
502
|
+
*/
|
|
503
|
+
action: 'CREATED' | 'SKIPPED';
|
|
504
|
+
|
|
505
|
+
capability:
|
|
506
|
+
| 'APPOINTMENT_BOOKING'
|
|
507
|
+
| 'FAQ'
|
|
508
|
+
| 'IDENTITY_VERIFICATION'
|
|
509
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
510
|
+
| 'BILLING_AND_PAYMENTS'
|
|
511
|
+
| 'ORDER_MANAGEMENT'
|
|
512
|
+
| 'TROUBLESHOOTING'
|
|
513
|
+
| 'CALL_ROUTING'
|
|
514
|
+
| 'LEAD_QUALIFICATION'
|
|
515
|
+
| 'COLLECTIONS'
|
|
516
|
+
| 'OUTBOUND_CALLING'
|
|
517
|
+
| null;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* A flow, a metric, or a pass or fail check
|
|
521
|
+
*/
|
|
522
|
+
kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
|
|
523
|
+
|
|
524
|
+
label: string;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
|
|
528
|
+
* prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
|
|
529
|
+
*/
|
|
530
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
|
|
534
|
+
* offered
|
|
535
|
+
*/
|
|
536
|
+
origin: 'DISCOVERED' | 'INFERRED' | null;
|
|
537
|
+
|
|
538
|
+
reason: string;
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* The flow or metric it created
|
|
542
|
+
*/
|
|
543
|
+
resourceId: string | null;
|
|
544
|
+
|
|
545
|
+
source: Item.Source;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export namespace Item {
|
|
549
|
+
export interface Source {
|
|
550
|
+
/**
|
|
551
|
+
* The exploration call it came from
|
|
552
|
+
*/
|
|
553
|
+
callId: string | null;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Where in the call
|
|
557
|
+
*/
|
|
558
|
+
offsetMs: number | null;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* The words in the source that led to it
|
|
562
|
+
*/
|
|
563
|
+
quote: string | null;
|
|
564
|
+
|
|
565
|
+
type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* The page it came from, for website sources
|
|
569
|
+
*/
|
|
570
|
+
url: string | null;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Where one part of testing the agent stands
|
|
576
|
+
*/
|
|
577
|
+
export interface Layer {
|
|
578
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
|
|
582
|
+
* could not test it and said why. OPEN: not covered yet; setup does not finish
|
|
583
|
+
* while a layer is open. NOT_APPLICABLE: nothing to test it from.
|
|
584
|
+
*/
|
|
585
|
+
status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
|
|
586
|
+
|
|
587
|
+
summary: string;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
592
|
+
*/
|
|
593
|
+
export interface Question {
|
|
594
|
+
defaultOption: string;
|
|
595
|
+
|
|
596
|
+
options: Array<string>;
|
|
597
|
+
|
|
598
|
+
question: string;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export interface TestDataNeeded {
|
|
602
|
+
callId: string | null;
|
|
603
|
+
|
|
604
|
+
label: string;
|
|
605
|
+
|
|
606
|
+
reason: string;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export interface AgentSetupCancelResponse {
|
|
612
|
+
/**
|
|
613
|
+
* The tests Roark generated for an agent, and why
|
|
614
|
+
*/
|
|
615
|
+
data: AgentSetupCancelResponse.Data;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
export namespace AgentSetupCancelResponse {
|
|
619
|
+
/**
|
|
620
|
+
* The tests Roark generated for an agent, and why
|
|
621
|
+
*/
|
|
622
|
+
export interface Data {
|
|
623
|
+
/**
|
|
624
|
+
* Setup ID
|
|
625
|
+
*/
|
|
626
|
+
id: string;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* What setup did and said, in order
|
|
630
|
+
*/
|
|
631
|
+
activity: Array<Data.Activity>;
|
|
632
|
+
|
|
633
|
+
agentId: string;
|
|
634
|
+
|
|
635
|
+
capabilities: Array<
|
|
636
|
+
| 'APPOINTMENT_BOOKING'
|
|
637
|
+
| 'FAQ'
|
|
638
|
+
| 'IDENTITY_VERIFICATION'
|
|
639
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
640
|
+
| 'BILLING_AND_PAYMENTS'
|
|
641
|
+
| 'ORDER_MANAGEMENT'
|
|
642
|
+
| 'TROUBLESHOOTING'
|
|
643
|
+
| 'CALL_ROUTING'
|
|
644
|
+
| 'LEAD_QUALIFICATION'
|
|
645
|
+
| 'COLLECTIONS'
|
|
646
|
+
| 'OUTBOUND_CALLING'
|
|
647
|
+
>;
|
|
648
|
+
|
|
649
|
+
completedAt: string | null;
|
|
650
|
+
|
|
651
|
+
createdAt: string;
|
|
652
|
+
|
|
653
|
+
errorMessage: string | null;
|
|
654
|
+
|
|
655
|
+
explore: Data.Explore;
|
|
656
|
+
|
|
657
|
+
industry:
|
|
658
|
+
| 'HEALTHCARE'
|
|
659
|
+
| 'FINANCIAL_SERVICES'
|
|
660
|
+
| 'INSURANCE'
|
|
661
|
+
| 'DEBT_COLLECTION'
|
|
662
|
+
| 'RETAIL'
|
|
663
|
+
| 'TRAVEL_AND_HOSPITALITY'
|
|
664
|
+
| 'TELECOMMUNICATIONS'
|
|
665
|
+
| 'TECHNOLOGY'
|
|
666
|
+
| 'PUBLIC_SECTOR'
|
|
667
|
+
| 'UTILITIES'
|
|
668
|
+
| 'LOGISTICS'
|
|
669
|
+
| 'AUTOMOTIVE'
|
|
670
|
+
| 'HOME_SERVICES'
|
|
671
|
+
| 'RESTAURANTS'
|
|
672
|
+
| 'EDUCATION'
|
|
673
|
+
| 'OTHER'
|
|
674
|
+
| null;
|
|
675
|
+
|
|
676
|
+
items: Array<Data.Item>;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* The checklist setup works through
|
|
680
|
+
*/
|
|
681
|
+
layers: Array<Data.Layer>;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
685
|
+
*/
|
|
686
|
+
question: Data.Question | null;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* The run plan to start once setup completes
|
|
690
|
+
*/
|
|
691
|
+
runPlanId: string | null;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
|
|
695
|
+
* default if nobody answers), COMPLETED, FAILED or CANCELLED
|
|
696
|
+
*/
|
|
697
|
+
status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Test data the agent asked for that Roark did not have
|
|
701
|
+
*/
|
|
702
|
+
testDataNeeded: Array<Data.TestDataNeeded>;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export namespace Data {
|
|
706
|
+
/**
|
|
707
|
+
* One thing setup did or said, in order
|
|
708
|
+
*/
|
|
709
|
+
export interface Activity {
|
|
710
|
+
createdAt: string;
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
|
|
714
|
+
*/
|
|
715
|
+
kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
|
|
716
|
+
|
|
717
|
+
text: string;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export interface Explore {
|
|
721
|
+
conversationsUsed: number;
|
|
722
|
+
|
|
723
|
+
enabled: boolean;
|
|
724
|
+
|
|
725
|
+
maxConversationMinutes: number;
|
|
726
|
+
|
|
727
|
+
maxConversations: number;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Something setup created or chose to leave out, and why
|
|
732
|
+
*/
|
|
733
|
+
export interface Item {
|
|
734
|
+
id: string;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* CREATED, or SKIPPED with the reason
|
|
738
|
+
*/
|
|
739
|
+
action: 'CREATED' | 'SKIPPED';
|
|
740
|
+
|
|
741
|
+
capability:
|
|
742
|
+
| 'APPOINTMENT_BOOKING'
|
|
743
|
+
| 'FAQ'
|
|
744
|
+
| 'IDENTITY_VERIFICATION'
|
|
745
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
746
|
+
| 'BILLING_AND_PAYMENTS'
|
|
747
|
+
| 'ORDER_MANAGEMENT'
|
|
748
|
+
| 'TROUBLESHOOTING'
|
|
749
|
+
| 'CALL_ROUTING'
|
|
750
|
+
| 'LEAD_QUALIFICATION'
|
|
751
|
+
| 'COLLECTIONS'
|
|
752
|
+
| 'OUTBOUND_CALLING'
|
|
753
|
+
| null;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* A flow, a metric, or a pass or fail check
|
|
757
|
+
*/
|
|
758
|
+
kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
|
|
759
|
+
|
|
760
|
+
label: string;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
|
|
764
|
+
* prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
|
|
765
|
+
*/
|
|
766
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
|
|
770
|
+
* offered
|
|
771
|
+
*/
|
|
772
|
+
origin: 'DISCOVERED' | 'INFERRED' | null;
|
|
773
|
+
|
|
774
|
+
reason: string;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* The flow or metric it created
|
|
778
|
+
*/
|
|
779
|
+
resourceId: string | null;
|
|
780
|
+
|
|
781
|
+
source: Item.Source;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export namespace Item {
|
|
785
|
+
export interface Source {
|
|
786
|
+
/**
|
|
787
|
+
* The exploration call it came from
|
|
788
|
+
*/
|
|
789
|
+
callId: string | null;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Where in the call
|
|
793
|
+
*/
|
|
794
|
+
offsetMs: number | null;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* The words in the source that led to it
|
|
798
|
+
*/
|
|
799
|
+
quote: string | null;
|
|
800
|
+
|
|
801
|
+
type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* The page it came from, for website sources
|
|
805
|
+
*/
|
|
806
|
+
url: string | null;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Where one part of testing the agent stands
|
|
812
|
+
*/
|
|
813
|
+
export interface Layer {
|
|
814
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
|
|
818
|
+
* could not test it and said why. OPEN: not covered yet; setup does not finish
|
|
819
|
+
* while a layer is open. NOT_APPLICABLE: nothing to test it from.
|
|
820
|
+
*/
|
|
821
|
+
status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
|
|
822
|
+
|
|
823
|
+
summary: string;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
828
|
+
*/
|
|
829
|
+
export interface Question {
|
|
830
|
+
defaultOption: string;
|
|
831
|
+
|
|
832
|
+
options: Array<string>;
|
|
833
|
+
|
|
834
|
+
question: string;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
export interface TestDataNeeded {
|
|
838
|
+
callId: string | null;
|
|
839
|
+
|
|
840
|
+
label: string;
|
|
841
|
+
|
|
842
|
+
reason: string;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
export interface AgentSetupGetByIDResponse {
|
|
848
|
+
/**
|
|
849
|
+
* The tests Roark generated for an agent, and why
|
|
850
|
+
*/
|
|
851
|
+
data: AgentSetupGetByIDResponse.Data;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export namespace AgentSetupGetByIDResponse {
|
|
855
|
+
/**
|
|
856
|
+
* The tests Roark generated for an agent, and why
|
|
857
|
+
*/
|
|
858
|
+
export interface Data {
|
|
859
|
+
/**
|
|
860
|
+
* Setup ID
|
|
861
|
+
*/
|
|
862
|
+
id: string;
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* What setup did and said, in order
|
|
866
|
+
*/
|
|
867
|
+
activity: Array<Data.Activity>;
|
|
868
|
+
|
|
869
|
+
agentId: string;
|
|
870
|
+
|
|
871
|
+
capabilities: Array<
|
|
872
|
+
| 'APPOINTMENT_BOOKING'
|
|
873
|
+
| 'FAQ'
|
|
874
|
+
| 'IDENTITY_VERIFICATION'
|
|
875
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
876
|
+
| 'BILLING_AND_PAYMENTS'
|
|
877
|
+
| 'ORDER_MANAGEMENT'
|
|
878
|
+
| 'TROUBLESHOOTING'
|
|
879
|
+
| 'CALL_ROUTING'
|
|
880
|
+
| 'LEAD_QUALIFICATION'
|
|
881
|
+
| 'COLLECTIONS'
|
|
882
|
+
| 'OUTBOUND_CALLING'
|
|
883
|
+
>;
|
|
884
|
+
|
|
885
|
+
completedAt: string | null;
|
|
886
|
+
|
|
887
|
+
createdAt: string;
|
|
888
|
+
|
|
889
|
+
errorMessage: string | null;
|
|
890
|
+
|
|
891
|
+
explore: Data.Explore;
|
|
892
|
+
|
|
893
|
+
industry:
|
|
894
|
+
| 'HEALTHCARE'
|
|
895
|
+
| 'FINANCIAL_SERVICES'
|
|
896
|
+
| 'INSURANCE'
|
|
897
|
+
| 'DEBT_COLLECTION'
|
|
898
|
+
| 'RETAIL'
|
|
899
|
+
| 'TRAVEL_AND_HOSPITALITY'
|
|
900
|
+
| 'TELECOMMUNICATIONS'
|
|
901
|
+
| 'TECHNOLOGY'
|
|
902
|
+
| 'PUBLIC_SECTOR'
|
|
903
|
+
| 'UTILITIES'
|
|
904
|
+
| 'LOGISTICS'
|
|
905
|
+
| 'AUTOMOTIVE'
|
|
906
|
+
| 'HOME_SERVICES'
|
|
907
|
+
| 'RESTAURANTS'
|
|
908
|
+
| 'EDUCATION'
|
|
909
|
+
| 'OTHER'
|
|
910
|
+
| null;
|
|
911
|
+
|
|
912
|
+
items: Array<Data.Item>;
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* The checklist setup works through
|
|
916
|
+
*/
|
|
917
|
+
layers: Array<Data.Layer>;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
921
|
+
*/
|
|
922
|
+
question: Data.Question | null;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* The run plan to start once setup completes
|
|
926
|
+
*/
|
|
927
|
+
runPlanId: string | null;
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
|
|
931
|
+
* default if nobody answers), COMPLETED, FAILED or CANCELLED
|
|
932
|
+
*/
|
|
933
|
+
status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Test data the agent asked for that Roark did not have
|
|
937
|
+
*/
|
|
938
|
+
testDataNeeded: Array<Data.TestDataNeeded>;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export namespace Data {
|
|
942
|
+
/**
|
|
943
|
+
* One thing setup did or said, in order
|
|
944
|
+
*/
|
|
945
|
+
export interface Activity {
|
|
946
|
+
createdAt: string;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
|
|
950
|
+
*/
|
|
951
|
+
kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
|
|
952
|
+
|
|
953
|
+
text: string;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
export interface Explore {
|
|
957
|
+
conversationsUsed: number;
|
|
958
|
+
|
|
959
|
+
enabled: boolean;
|
|
960
|
+
|
|
961
|
+
maxConversationMinutes: number;
|
|
962
|
+
|
|
963
|
+
maxConversations: number;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Something setup created or chose to leave out, and why
|
|
968
|
+
*/
|
|
969
|
+
export interface Item {
|
|
970
|
+
id: string;
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* CREATED, or SKIPPED with the reason
|
|
974
|
+
*/
|
|
975
|
+
action: 'CREATED' | 'SKIPPED';
|
|
976
|
+
|
|
977
|
+
capability:
|
|
978
|
+
| 'APPOINTMENT_BOOKING'
|
|
979
|
+
| 'FAQ'
|
|
980
|
+
| 'IDENTITY_VERIFICATION'
|
|
981
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
982
|
+
| 'BILLING_AND_PAYMENTS'
|
|
983
|
+
| 'ORDER_MANAGEMENT'
|
|
984
|
+
| 'TROUBLESHOOTING'
|
|
985
|
+
| 'CALL_ROUTING'
|
|
986
|
+
| 'LEAD_QUALIFICATION'
|
|
987
|
+
| 'COLLECTIONS'
|
|
988
|
+
| 'OUTBOUND_CALLING'
|
|
989
|
+
| null;
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* A flow, a metric, or a pass or fail check
|
|
993
|
+
*/
|
|
994
|
+
kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
|
|
995
|
+
|
|
996
|
+
label: string;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
|
|
1000
|
+
* prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
|
|
1001
|
+
*/
|
|
1002
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
|
|
1006
|
+
* offered
|
|
1007
|
+
*/
|
|
1008
|
+
origin: 'DISCOVERED' | 'INFERRED' | null;
|
|
1009
|
+
|
|
1010
|
+
reason: string;
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* The flow or metric it created
|
|
1014
|
+
*/
|
|
1015
|
+
resourceId: string | null;
|
|
1016
|
+
|
|
1017
|
+
source: Item.Source;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
export namespace Item {
|
|
1021
|
+
export interface Source {
|
|
1022
|
+
/**
|
|
1023
|
+
* The exploration call it came from
|
|
1024
|
+
*/
|
|
1025
|
+
callId: string | null;
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Where in the call
|
|
1029
|
+
*/
|
|
1030
|
+
offsetMs: number | null;
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* The words in the source that led to it
|
|
1034
|
+
*/
|
|
1035
|
+
quote: string | null;
|
|
1036
|
+
|
|
1037
|
+
type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* The page it came from, for website sources
|
|
1041
|
+
*/
|
|
1042
|
+
url: string | null;
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* Where one part of testing the agent stands
|
|
1048
|
+
*/
|
|
1049
|
+
export interface Layer {
|
|
1050
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
|
|
1054
|
+
* could not test it and said why. OPEN: not covered yet; setup does not finish
|
|
1055
|
+
* while a layer is open. NOT_APPLICABLE: nothing to test it from.
|
|
1056
|
+
*/
|
|
1057
|
+
status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
|
|
1058
|
+
|
|
1059
|
+
summary: string;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
1064
|
+
*/
|
|
1065
|
+
export interface Question {
|
|
1066
|
+
defaultOption: string;
|
|
1067
|
+
|
|
1068
|
+
options: Array<string>;
|
|
1069
|
+
|
|
1070
|
+
question: string;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
export interface TestDataNeeded {
|
|
1074
|
+
callId: string | null;
|
|
1075
|
+
|
|
1076
|
+
label: string;
|
|
1077
|
+
|
|
1078
|
+
reason: string;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export interface AgentSetupGetLatestResponse {
|
|
1084
|
+
/**
|
|
1085
|
+
* The tests Roark generated for an agent, and why
|
|
1086
|
+
*/
|
|
1087
|
+
data: AgentSetupGetLatestResponse.Data;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
export namespace AgentSetupGetLatestResponse {
|
|
1091
|
+
/**
|
|
1092
|
+
* The tests Roark generated for an agent, and why
|
|
1093
|
+
*/
|
|
1094
|
+
export interface Data {
|
|
1095
|
+
/**
|
|
1096
|
+
* Setup ID
|
|
1097
|
+
*/
|
|
1098
|
+
id: string;
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* What setup did and said, in order
|
|
1102
|
+
*/
|
|
1103
|
+
activity: Array<Data.Activity>;
|
|
1104
|
+
|
|
1105
|
+
agentId: string;
|
|
1106
|
+
|
|
1107
|
+
capabilities: Array<
|
|
1108
|
+
| 'APPOINTMENT_BOOKING'
|
|
1109
|
+
| 'FAQ'
|
|
1110
|
+
| 'IDENTITY_VERIFICATION'
|
|
1111
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
1112
|
+
| 'BILLING_AND_PAYMENTS'
|
|
1113
|
+
| 'ORDER_MANAGEMENT'
|
|
1114
|
+
| 'TROUBLESHOOTING'
|
|
1115
|
+
| 'CALL_ROUTING'
|
|
1116
|
+
| 'LEAD_QUALIFICATION'
|
|
1117
|
+
| 'COLLECTIONS'
|
|
1118
|
+
| 'OUTBOUND_CALLING'
|
|
1119
|
+
>;
|
|
1120
|
+
|
|
1121
|
+
completedAt: string | null;
|
|
1122
|
+
|
|
1123
|
+
createdAt: string;
|
|
1124
|
+
|
|
1125
|
+
errorMessage: string | null;
|
|
1126
|
+
|
|
1127
|
+
explore: Data.Explore;
|
|
1128
|
+
|
|
1129
|
+
industry:
|
|
1130
|
+
| 'HEALTHCARE'
|
|
1131
|
+
| 'FINANCIAL_SERVICES'
|
|
1132
|
+
| 'INSURANCE'
|
|
1133
|
+
| 'DEBT_COLLECTION'
|
|
1134
|
+
| 'RETAIL'
|
|
1135
|
+
| 'TRAVEL_AND_HOSPITALITY'
|
|
1136
|
+
| 'TELECOMMUNICATIONS'
|
|
1137
|
+
| 'TECHNOLOGY'
|
|
1138
|
+
| 'PUBLIC_SECTOR'
|
|
1139
|
+
| 'UTILITIES'
|
|
1140
|
+
| 'LOGISTICS'
|
|
1141
|
+
| 'AUTOMOTIVE'
|
|
1142
|
+
| 'HOME_SERVICES'
|
|
1143
|
+
| 'RESTAURANTS'
|
|
1144
|
+
| 'EDUCATION'
|
|
1145
|
+
| 'OTHER'
|
|
1146
|
+
| null;
|
|
1147
|
+
|
|
1148
|
+
items: Array<Data.Item>;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* The checklist setup works through
|
|
1152
|
+
*/
|
|
1153
|
+
layers: Array<Data.Layer>;
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
1157
|
+
*/
|
|
1158
|
+
question: Data.Question | null;
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* The run plan to start once setup completes
|
|
1162
|
+
*/
|
|
1163
|
+
runPlanId: string | null;
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
|
|
1167
|
+
* default if nobody answers), COMPLETED, FAILED or CANCELLED
|
|
1168
|
+
*/
|
|
1169
|
+
status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Test data the agent asked for that Roark did not have
|
|
1173
|
+
*/
|
|
1174
|
+
testDataNeeded: Array<Data.TestDataNeeded>;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
export namespace Data {
|
|
1178
|
+
/**
|
|
1179
|
+
* One thing setup did or said, in order
|
|
1180
|
+
*/
|
|
1181
|
+
export interface Activity {
|
|
1182
|
+
createdAt: string;
|
|
1183
|
+
|
|
1184
|
+
/**
|
|
1185
|
+
* STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
|
|
1186
|
+
*/
|
|
1187
|
+
kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
|
|
1188
|
+
|
|
1189
|
+
text: string;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
export interface Explore {
|
|
1193
|
+
conversationsUsed: number;
|
|
1194
|
+
|
|
1195
|
+
enabled: boolean;
|
|
1196
|
+
|
|
1197
|
+
maxConversationMinutes: number;
|
|
1198
|
+
|
|
1199
|
+
maxConversations: number;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Something setup created or chose to leave out, and why
|
|
1204
|
+
*/
|
|
1205
|
+
export interface Item {
|
|
1206
|
+
id: string;
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* CREATED, or SKIPPED with the reason
|
|
1210
|
+
*/
|
|
1211
|
+
action: 'CREATED' | 'SKIPPED';
|
|
1212
|
+
|
|
1213
|
+
capability:
|
|
1214
|
+
| 'APPOINTMENT_BOOKING'
|
|
1215
|
+
| 'FAQ'
|
|
1216
|
+
| 'IDENTITY_VERIFICATION'
|
|
1217
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
1218
|
+
| 'BILLING_AND_PAYMENTS'
|
|
1219
|
+
| 'ORDER_MANAGEMENT'
|
|
1220
|
+
| 'TROUBLESHOOTING'
|
|
1221
|
+
| 'CALL_ROUTING'
|
|
1222
|
+
| 'LEAD_QUALIFICATION'
|
|
1223
|
+
| 'COLLECTIONS'
|
|
1224
|
+
| 'OUTBOUND_CALLING'
|
|
1225
|
+
| null;
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* A flow, a metric, or a pass or fail check
|
|
1229
|
+
*/
|
|
1230
|
+
kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
|
|
1231
|
+
|
|
1232
|
+
label: string;
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
|
|
1236
|
+
* prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
|
|
1237
|
+
*/
|
|
1238
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
|
|
1242
|
+
* offered
|
|
1243
|
+
*/
|
|
1244
|
+
origin: 'DISCOVERED' | 'INFERRED' | null;
|
|
1245
|
+
|
|
1246
|
+
reason: string;
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
* The flow or metric it created
|
|
1250
|
+
*/
|
|
1251
|
+
resourceId: string | null;
|
|
1252
|
+
|
|
1253
|
+
source: Item.Source;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
export namespace Item {
|
|
1257
|
+
export interface Source {
|
|
1258
|
+
/**
|
|
1259
|
+
* The exploration call it came from
|
|
1260
|
+
*/
|
|
1261
|
+
callId: string | null;
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* Where in the call
|
|
1265
|
+
*/
|
|
1266
|
+
offsetMs: number | null;
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* The words in the source that led to it
|
|
1270
|
+
*/
|
|
1271
|
+
quote: string | null;
|
|
1272
|
+
|
|
1273
|
+
type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* The page it came from, for website sources
|
|
1277
|
+
*/
|
|
1278
|
+
url: string | null;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Where one part of testing the agent stands
|
|
1284
|
+
*/
|
|
1285
|
+
export interface Layer {
|
|
1286
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
|
|
1290
|
+
* could not test it and said why. OPEN: not covered yet; setup does not finish
|
|
1291
|
+
* while a layer is open. NOT_APPLICABLE: nothing to test it from.
|
|
1292
|
+
*/
|
|
1293
|
+
status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
|
|
1294
|
+
|
|
1295
|
+
summary: string;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
1300
|
+
*/
|
|
1301
|
+
export interface Question {
|
|
1302
|
+
defaultOption: string;
|
|
1303
|
+
|
|
1304
|
+
options: Array<string>;
|
|
1305
|
+
|
|
1306
|
+
question: string;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
export interface TestDataNeeded {
|
|
1310
|
+
callId: string | null;
|
|
1311
|
+
|
|
1312
|
+
label: string;
|
|
1313
|
+
|
|
1314
|
+
reason: string;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
export interface AgentSetupSendGuidanceResponse {
|
|
1320
|
+
/**
|
|
1321
|
+
* The tests Roark generated for an agent, and why
|
|
1322
|
+
*/
|
|
1323
|
+
data: AgentSetupSendGuidanceResponse.Data;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
export namespace AgentSetupSendGuidanceResponse {
|
|
1327
|
+
/**
|
|
1328
|
+
* The tests Roark generated for an agent, and why
|
|
1329
|
+
*/
|
|
1330
|
+
export interface Data {
|
|
1331
|
+
/**
|
|
1332
|
+
* Setup ID
|
|
1333
|
+
*/
|
|
1334
|
+
id: string;
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* What setup did and said, in order
|
|
1338
|
+
*/
|
|
1339
|
+
activity: Array<Data.Activity>;
|
|
1340
|
+
|
|
1341
|
+
agentId: string;
|
|
1342
|
+
|
|
1343
|
+
capabilities: Array<
|
|
1344
|
+
| 'APPOINTMENT_BOOKING'
|
|
1345
|
+
| 'FAQ'
|
|
1346
|
+
| 'IDENTITY_VERIFICATION'
|
|
1347
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
1348
|
+
| 'BILLING_AND_PAYMENTS'
|
|
1349
|
+
| 'ORDER_MANAGEMENT'
|
|
1350
|
+
| 'TROUBLESHOOTING'
|
|
1351
|
+
| 'CALL_ROUTING'
|
|
1352
|
+
| 'LEAD_QUALIFICATION'
|
|
1353
|
+
| 'COLLECTIONS'
|
|
1354
|
+
| 'OUTBOUND_CALLING'
|
|
1355
|
+
>;
|
|
1356
|
+
|
|
1357
|
+
completedAt: string | null;
|
|
1358
|
+
|
|
1359
|
+
createdAt: string;
|
|
1360
|
+
|
|
1361
|
+
errorMessage: string | null;
|
|
1362
|
+
|
|
1363
|
+
explore: Data.Explore;
|
|
1364
|
+
|
|
1365
|
+
industry:
|
|
1366
|
+
| 'HEALTHCARE'
|
|
1367
|
+
| 'FINANCIAL_SERVICES'
|
|
1368
|
+
| 'INSURANCE'
|
|
1369
|
+
| 'DEBT_COLLECTION'
|
|
1370
|
+
| 'RETAIL'
|
|
1371
|
+
| 'TRAVEL_AND_HOSPITALITY'
|
|
1372
|
+
| 'TELECOMMUNICATIONS'
|
|
1373
|
+
| 'TECHNOLOGY'
|
|
1374
|
+
| 'PUBLIC_SECTOR'
|
|
1375
|
+
| 'UTILITIES'
|
|
1376
|
+
| 'LOGISTICS'
|
|
1377
|
+
| 'AUTOMOTIVE'
|
|
1378
|
+
| 'HOME_SERVICES'
|
|
1379
|
+
| 'RESTAURANTS'
|
|
1380
|
+
| 'EDUCATION'
|
|
1381
|
+
| 'OTHER'
|
|
1382
|
+
| null;
|
|
1383
|
+
|
|
1384
|
+
items: Array<Data.Item>;
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* The checklist setup works through
|
|
1388
|
+
*/
|
|
1389
|
+
layers: Array<Data.Layer>;
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
1393
|
+
*/
|
|
1394
|
+
question: Data.Question | null;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* The run plan to start once setup completes
|
|
1398
|
+
*/
|
|
1399
|
+
runPlanId: string | null;
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
|
|
1403
|
+
* default if nobody answers), COMPLETED, FAILED or CANCELLED
|
|
1404
|
+
*/
|
|
1405
|
+
status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* Test data the agent asked for that Roark did not have
|
|
1409
|
+
*/
|
|
1410
|
+
testDataNeeded: Array<Data.TestDataNeeded>;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
export namespace Data {
|
|
1414
|
+
/**
|
|
1415
|
+
* One thing setup did or said, in order
|
|
1416
|
+
*/
|
|
1417
|
+
export interface Activity {
|
|
1418
|
+
createdAt: string;
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
|
|
1422
|
+
*/
|
|
1423
|
+
kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
|
|
1424
|
+
|
|
1425
|
+
text: string;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
export interface Explore {
|
|
1429
|
+
conversationsUsed: number;
|
|
1430
|
+
|
|
1431
|
+
enabled: boolean;
|
|
1432
|
+
|
|
1433
|
+
maxConversationMinutes: number;
|
|
1434
|
+
|
|
1435
|
+
maxConversations: number;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* Something setup created or chose to leave out, and why
|
|
1440
|
+
*/
|
|
1441
|
+
export interface Item {
|
|
1442
|
+
id: string;
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* CREATED, or SKIPPED with the reason
|
|
1446
|
+
*/
|
|
1447
|
+
action: 'CREATED' | 'SKIPPED';
|
|
1448
|
+
|
|
1449
|
+
capability:
|
|
1450
|
+
| 'APPOINTMENT_BOOKING'
|
|
1451
|
+
| 'FAQ'
|
|
1452
|
+
| 'IDENTITY_VERIFICATION'
|
|
1453
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
1454
|
+
| 'BILLING_AND_PAYMENTS'
|
|
1455
|
+
| 'ORDER_MANAGEMENT'
|
|
1456
|
+
| 'TROUBLESHOOTING'
|
|
1457
|
+
| 'CALL_ROUTING'
|
|
1458
|
+
| 'LEAD_QUALIFICATION'
|
|
1459
|
+
| 'COLLECTIONS'
|
|
1460
|
+
| 'OUTBOUND_CALLING'
|
|
1461
|
+
| null;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* A flow, a metric, or a pass or fail check
|
|
1465
|
+
*/
|
|
1466
|
+
kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
|
|
1467
|
+
|
|
1468
|
+
label: string;
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
|
|
1472
|
+
* prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
|
|
1473
|
+
*/
|
|
1474
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
|
|
1478
|
+
* offered
|
|
1479
|
+
*/
|
|
1480
|
+
origin: 'DISCOVERED' | 'INFERRED' | null;
|
|
1481
|
+
|
|
1482
|
+
reason: string;
|
|
1483
|
+
|
|
1484
|
+
/**
|
|
1485
|
+
* The flow or metric it created
|
|
1486
|
+
*/
|
|
1487
|
+
resourceId: string | null;
|
|
1488
|
+
|
|
1489
|
+
source: Item.Source;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
export namespace Item {
|
|
1493
|
+
export interface Source {
|
|
1494
|
+
/**
|
|
1495
|
+
* The exploration call it came from
|
|
1496
|
+
*/
|
|
1497
|
+
callId: string | null;
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
* Where in the call
|
|
1501
|
+
*/
|
|
1502
|
+
offsetMs: number | null;
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* The words in the source that led to it
|
|
1506
|
+
*/
|
|
1507
|
+
quote: string | null;
|
|
1508
|
+
|
|
1509
|
+
type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* The page it came from, for website sources
|
|
1513
|
+
*/
|
|
1514
|
+
url: string | null;
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* Where one part of testing the agent stands
|
|
1520
|
+
*/
|
|
1521
|
+
export interface Layer {
|
|
1522
|
+
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
* COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
|
|
1526
|
+
* could not test it and said why. OPEN: not covered yet; setup does not finish
|
|
1527
|
+
* while a layer is open. NOT_APPLICABLE: nothing to test it from.
|
|
1528
|
+
*/
|
|
1529
|
+
status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
|
|
1530
|
+
|
|
1531
|
+
summary: string;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* The question setup is waiting on, while NEEDS_INPUT
|
|
1536
|
+
*/
|
|
1537
|
+
export interface Question {
|
|
1538
|
+
defaultOption: string;
|
|
1539
|
+
|
|
1540
|
+
options: Array<string>;
|
|
1541
|
+
|
|
1542
|
+
question: string;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
export interface TestDataNeeded {
|
|
1546
|
+
callId: string | null;
|
|
1547
|
+
|
|
1548
|
+
label: string;
|
|
1549
|
+
|
|
1550
|
+
reason: string;
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
export interface AgentSetupCreateParams {
|
|
1556
|
+
/**
|
|
1557
|
+
* The endpoint the run plan calls. Defaults to the agent's newest endpoint.
|
|
1558
|
+
*/
|
|
1559
|
+
agentEndpointId?: string;
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* The capabilities to test. Omit to let Roark work them out from the agent.
|
|
1563
|
+
*/
|
|
1564
|
+
capabilities?: Array<
|
|
1565
|
+
| 'APPOINTMENT_BOOKING'
|
|
1566
|
+
| 'FAQ'
|
|
1567
|
+
| 'IDENTITY_VERIFICATION'
|
|
1568
|
+
| 'ACCOUNT_MANAGEMENT'
|
|
1569
|
+
| 'BILLING_AND_PAYMENTS'
|
|
1570
|
+
| 'ORDER_MANAGEMENT'
|
|
1571
|
+
| 'TROUBLESHOOTING'
|
|
1572
|
+
| 'CALL_ROUTING'
|
|
1573
|
+
| 'LEAD_QUALIFICATION'
|
|
1574
|
+
| 'COLLECTIONS'
|
|
1575
|
+
| 'OUTBOUND_CALLING'
|
|
1576
|
+
>;
|
|
1577
|
+
|
|
1578
|
+
/**
|
|
1579
|
+
* Exploration settings
|
|
1580
|
+
*/
|
|
1581
|
+
explore?: AgentSetupCreateParams.Explore;
|
|
1582
|
+
|
|
1583
|
+
/**
|
|
1584
|
+
* The industry the agent serves.
|
|
1585
|
+
*/
|
|
1586
|
+
industry?:
|
|
1587
|
+
| 'HEALTHCARE'
|
|
1588
|
+
| 'FINANCIAL_SERVICES'
|
|
1589
|
+
| 'INSURANCE'
|
|
1590
|
+
| 'DEBT_COLLECTION'
|
|
1591
|
+
| 'RETAIL'
|
|
1592
|
+
| 'TRAVEL_AND_HOSPITALITY'
|
|
1593
|
+
| 'TELECOMMUNICATIONS'
|
|
1594
|
+
| 'TECHNOLOGY'
|
|
1595
|
+
| 'PUBLIC_SECTOR'
|
|
1596
|
+
| 'UTILITIES'
|
|
1597
|
+
| 'LOGISTICS'
|
|
1598
|
+
| 'AUTOMOTIVE'
|
|
1599
|
+
| 'HOME_SERVICES'
|
|
1600
|
+
| 'RESTAURANTS'
|
|
1601
|
+
| 'EDUCATION'
|
|
1602
|
+
| 'OTHER';
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* What you want tested, in your own words. Each scenario you describe becomes a
|
|
1606
|
+
* flow.
|
|
1607
|
+
*/
|
|
1608
|
+
testingInstructions?: string;
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* A page Roark reads to learn about the business.
|
|
1612
|
+
*/
|
|
1613
|
+
websiteUrl?: string;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
export namespace AgentSetupCreateParams {
|
|
1617
|
+
/**
|
|
1618
|
+
* Exploration settings
|
|
1619
|
+
*/
|
|
1620
|
+
export interface Explore {
|
|
1621
|
+
/**
|
|
1622
|
+
* Whether Roark calls the agent to discover what it does before finishing setup.
|
|
1623
|
+
* Exploration calls are billed.
|
|
1624
|
+
*/
|
|
1625
|
+
enabled?: boolean;
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* The longest a single exploration call may last, in minutes.
|
|
1629
|
+
*/
|
|
1630
|
+
maxConversationMinutes?: number;
|
|
1631
|
+
|
|
1632
|
+
/**
|
|
1633
|
+
* The most exploration calls Roark places.
|
|
1634
|
+
*/
|
|
1635
|
+
maxConversations?: number;
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
export interface AgentSetupAnswerQuestionParams {
|
|
1640
|
+
/**
|
|
1641
|
+
* Path param
|
|
1642
|
+
*/
|
|
1643
|
+
agentId: string;
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* Body param: What you want setup to know
|
|
1647
|
+
*/
|
|
1648
|
+
text: string;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
export interface AgentSetupCancelParams {
|
|
1652
|
+
agentId: string;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
export interface AgentSetupGetByIDParams {
|
|
1656
|
+
agentId: string;
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
export interface AgentSetupSendGuidanceParams {
|
|
1660
|
+
/**
|
|
1661
|
+
* Path param
|
|
1662
|
+
*/
|
|
1663
|
+
agentId: string;
|
|
1664
|
+
|
|
1665
|
+
/**
|
|
1666
|
+
* Body param: What you want setup to know
|
|
1667
|
+
*/
|
|
1668
|
+
text: string;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
export declare namespace AgentSetup {
|
|
1672
|
+
export {
|
|
1673
|
+
type AgentSetupCreateResponse as AgentSetupCreateResponse,
|
|
1674
|
+
type AgentSetupAnswerQuestionResponse as AgentSetupAnswerQuestionResponse,
|
|
1675
|
+
type AgentSetupCancelResponse as AgentSetupCancelResponse,
|
|
1676
|
+
type AgentSetupGetByIDResponse as AgentSetupGetByIDResponse,
|
|
1677
|
+
type AgentSetupGetLatestResponse as AgentSetupGetLatestResponse,
|
|
1678
|
+
type AgentSetupSendGuidanceResponse as AgentSetupSendGuidanceResponse,
|
|
1679
|
+
type AgentSetupCreateParams as AgentSetupCreateParams,
|
|
1680
|
+
type AgentSetupAnswerQuestionParams as AgentSetupAnswerQuestionParams,
|
|
1681
|
+
type AgentSetupCancelParams as AgentSetupCancelParams,
|
|
1682
|
+
type AgentSetupGetByIDParams as AgentSetupGetByIDParams,
|
|
1683
|
+
type AgentSetupSendGuidanceParams as AgentSetupSendGuidanceParams,
|
|
1684
|
+
};
|
|
1685
|
+
}
|