@roarkanalytics/sdk 7.9.0 → 8.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.
Files changed (205) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +20 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +20 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +18 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +18 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-connection.d.mts +1952 -0
  12. package/resources/agent-connection.d.mts.map +1 -0
  13. package/resources/agent-connection.d.ts +1952 -0
  14. package/resources/agent-connection.d.ts.map +1 -0
  15. package/resources/agent-connection.js +173 -0
  16. package/resources/agent-connection.js.map +1 -0
  17. package/resources/agent-connection.mjs +169 -0
  18. package/resources/agent-connection.mjs.map +1 -0
  19. package/resources/agent-conversation.d.mts +110 -0
  20. package/resources/agent-conversation.d.mts.map +1 -0
  21. package/resources/agent-conversation.d.ts +110 -0
  22. package/resources/agent-conversation.d.ts.map +1 -0
  23. package/resources/agent-conversation.js +41 -0
  24. package/resources/agent-conversation.js.map +1 -0
  25. package/resources/agent-conversation.mjs +37 -0
  26. package/resources/agent-conversation.mjs.map +1 -0
  27. package/resources/agent-draft.d.mts +101 -35
  28. package/resources/agent-draft.d.mts.map +1 -1
  29. package/resources/agent-draft.d.ts +101 -35
  30. package/resources/agent-draft.d.ts.map +1 -1
  31. package/resources/agent-endpoint.d.mts +4 -4
  32. package/resources/agent-endpoint.d.mts.map +1 -1
  33. package/resources/agent-endpoint.d.ts +4 -4
  34. package/resources/agent-endpoint.d.ts.map +1 -1
  35. package/resources/agent-setup.d.mts +1057 -0
  36. package/resources/agent-setup.d.mts.map +1 -0
  37. package/resources/agent-setup.d.ts +1057 -0
  38. package/resources/agent-setup.d.ts.map +1 -0
  39. package/resources/agent-setup.js +113 -0
  40. package/resources/agent-setup.js.map +1 -0
  41. package/resources/agent-setup.mjs +109 -0
  42. package/resources/agent-setup.mjs.map +1 -0
  43. package/resources/agent-version.d.mts +57 -18
  44. package/resources/agent-version.d.mts.map +1 -1
  45. package/resources/agent-version.d.ts +57 -18
  46. package/resources/agent-version.d.ts.map +1 -1
  47. package/resources/agent.d.mts +263 -4
  48. package/resources/agent.d.mts.map +1 -1
  49. package/resources/agent.d.ts +263 -4
  50. package/resources/agent.d.ts.map +1 -1
  51. package/resources/calendar-connection.d.mts +834 -56
  52. package/resources/calendar-connection.d.mts.map +1 -1
  53. package/resources/calendar-connection.d.ts +834 -56
  54. package/resources/calendar-connection.d.ts.map +1 -1
  55. package/resources/calendar-connection.js +127 -8
  56. package/resources/calendar-connection.js.map +1 -1
  57. package/resources/calendar-connection.mjs +127 -8
  58. package/resources/calendar-connection.mjs.map +1 -1
  59. package/resources/call.d.mts +2 -2
  60. package/resources/call.d.mts.map +1 -1
  61. package/resources/call.d.ts +2 -2
  62. package/resources/call.d.ts.map +1 -1
  63. package/resources/config.d.mts +78 -36
  64. package/resources/config.d.mts.map +1 -1
  65. package/resources/config.d.ts +78 -36
  66. package/resources/config.d.ts.map +1 -1
  67. package/resources/conversation.d.mts +156 -0
  68. package/resources/conversation.d.mts.map +1 -0
  69. package/resources/conversation.d.ts +156 -0
  70. package/resources/conversation.d.ts.map +1 -0
  71. package/resources/conversation.js +40 -0
  72. package/resources/conversation.js.map +1 -0
  73. package/resources/conversation.mjs +36 -0
  74. package/resources/conversation.mjs.map +1 -0
  75. package/resources/customer-flow-edge-case.d.mts +637 -40
  76. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  77. package/resources/customer-flow-edge-case.d.ts +637 -40
  78. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  79. package/resources/customer-flow.d.mts +2583 -156
  80. package/resources/customer-flow.d.mts.map +1 -1
  81. package/resources/customer-flow.d.ts +2583 -156
  82. package/resources/customer-flow.d.ts.map +1 -1
  83. package/resources/{customer-profile.d.mts → customer.d.mts} +287 -92
  84. package/resources/customer.d.mts.map +1 -0
  85. package/resources/{customer-profile.d.ts → customer.d.ts} +287 -92
  86. package/resources/customer.d.ts.map +1 -0
  87. package/resources/customer.js +180 -0
  88. package/resources/customer.js.map +1 -0
  89. package/resources/customer.mjs +176 -0
  90. package/resources/customer.mjs.map +1 -0
  91. package/resources/index.d.mts +7 -2
  92. package/resources/index.d.mts.map +1 -1
  93. package/resources/index.d.ts +7 -2
  94. package/resources/index.d.ts.map +1 -1
  95. package/resources/index.js +13 -3
  96. package/resources/index.js.map +1 -1
  97. package/resources/index.mjs +6 -1
  98. package/resources/index.mjs.map +1 -1
  99. package/resources/mcp-server.d.mts +588 -0
  100. package/resources/mcp-server.d.mts.map +1 -0
  101. package/resources/mcp-server.d.ts +588 -0
  102. package/resources/mcp-server.d.ts.map +1 -0
  103. package/resources/mcp-server.js +109 -0
  104. package/resources/mcp-server.js.map +1 -0
  105. package/resources/mcp-server.mjs +105 -0
  106. package/resources/mcp-server.mjs.map +1 -0
  107. package/resources/metric-policy.d.mts +5 -4
  108. package/resources/metric-policy.d.mts.map +1 -1
  109. package/resources/metric-policy.d.ts +5 -4
  110. package/resources/metric-policy.d.ts.map +1 -1
  111. package/resources/metric-policy.js +1 -1
  112. package/resources/metric-policy.mjs +1 -1
  113. package/resources/metric-variant.d.mts +4 -1
  114. package/resources/metric-variant.d.mts.map +1 -1
  115. package/resources/metric-variant.d.ts +4 -1
  116. package/resources/metric-variant.d.ts.map +1 -1
  117. package/resources/metric.d.mts +7 -2
  118. package/resources/metric.d.mts.map +1 -1
  119. package/resources/metric.d.ts +7 -2
  120. package/resources/metric.d.ts.map +1 -1
  121. package/resources/simulation-environment.d.mts +366 -0
  122. package/resources/simulation-environment.d.mts.map +1 -1
  123. package/resources/simulation-environment.d.ts +366 -0
  124. package/resources/simulation-environment.d.ts.map +1 -1
  125. package/resources/simulation-job.d.mts +12 -8
  126. package/resources/simulation-job.d.mts.map +1 -1
  127. package/resources/simulation-job.d.ts +12 -8
  128. package/resources/simulation-job.d.ts.map +1 -1
  129. package/resources/simulation-persona.d.mts +25 -15
  130. package/resources/simulation-persona.d.mts.map +1 -1
  131. package/resources/simulation-persona.d.ts +25 -15
  132. package/resources/simulation-persona.d.ts.map +1 -1
  133. package/resources/simulation-run-plan-job.d.mts +32 -6
  134. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  135. package/resources/simulation-run-plan-job.d.ts +32 -6
  136. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  137. package/resources/simulation-run-plan.d.mts +126 -13
  138. package/resources/simulation-run-plan.d.mts.map +1 -1
  139. package/resources/simulation-run-plan.d.ts +126 -13
  140. package/resources/simulation-run-plan.d.ts.map +1 -1
  141. package/resources/simulation-template.d.mts +1 -1
  142. package/resources/simulation-template.d.mts.map +1 -1
  143. package/resources/simulation-template.d.ts +1 -1
  144. package/resources/simulation-template.d.ts.map +1 -1
  145. package/resources/simulation.d.mts +35 -3
  146. package/resources/simulation.d.mts.map +1 -1
  147. package/resources/simulation.d.ts +35 -3
  148. package/resources/simulation.d.ts.map +1 -1
  149. package/resources/tool.d.mts +565 -6
  150. package/resources/tool.d.mts.map +1 -1
  151. package/resources/tool.d.ts +565 -6
  152. package/resources/tool.d.ts.map +1 -1
  153. package/resources/tool.js +9 -6
  154. package/resources/tool.js.map +1 -1
  155. package/resources/tool.mjs +9 -6
  156. package/resources/tool.mjs.map +1 -1
  157. package/resources/usage.d.mts +1 -1
  158. package/resources/usage.d.mts.map +1 -1
  159. package/resources/usage.d.ts +1 -1
  160. package/resources/usage.d.ts.map +1 -1
  161. package/resources/webhook.d.mts +4 -4
  162. package/resources/webhook.d.mts.map +1 -1
  163. package/resources/webhook.d.ts +4 -4
  164. package/resources/webhook.d.ts.map +1 -1
  165. package/src/client.ts +197 -34
  166. package/src/resources/agent-connection.ts +2523 -0
  167. package/src/resources/agent-conversation.ts +139 -0
  168. package/src/resources/agent-draft.ts +239 -35
  169. package/src/resources/agent-endpoint.ts +8 -4
  170. package/src/resources/agent-setup.ts +1685 -0
  171. package/src/resources/agent-version.ts +126 -18
  172. package/src/resources/agent.ts +506 -4
  173. package/src/resources/calendar-connection.ts +1035 -63
  174. package/src/resources/call.ts +12 -2
  175. package/src/resources/config.ts +198 -36
  176. package/src/resources/conversation.ts +205 -0
  177. package/src/resources/customer-flow-edge-case.ts +709 -40
  178. package/src/resources/customer-flow.ts +3141 -156
  179. package/src/resources/{customer-profile.ts → customer.ts} +406 -294
  180. package/src/resources/index.ts +91 -17
  181. package/src/resources/mcp-server.ts +786 -0
  182. package/src/resources/metric-policy.ts +5 -4
  183. package/src/resources/metric-variant.ts +4 -1
  184. package/src/resources/metric.ts +7 -2
  185. package/src/resources/simulation-environment.ts +414 -0
  186. package/src/resources/simulation-job.ts +14 -8
  187. package/src/resources/simulation-persona.ts +25 -15
  188. package/src/resources/simulation-run-plan-job.ts +47 -6
  189. package/src/resources/simulation-run-plan.ts +140 -0
  190. package/src/resources/simulation-template.ts +1 -0
  191. package/src/resources/simulation.ts +39 -0
  192. package/src/resources/tool.ts +697 -6
  193. package/src/resources/usage.ts +6 -1
  194. package/src/resources/webhook.ts +8 -0
  195. package/src/version.ts +1 -1
  196. package/version.d.mts +1 -1
  197. package/version.d.ts +1 -1
  198. package/version.js +1 -1
  199. package/version.mjs +1 -1
  200. package/resources/customer-profile.d.mts.map +0 -1
  201. package/resources/customer-profile.d.ts.map +0 -1
  202. package/resources/customer-profile.js +0 -141
  203. package/resources/customer-profile.js.map +0 -1
  204. package/resources/customer-profile.mjs +0 -137
  205. package/resources/customer-profile.mjs.map +0 -1
@@ -0,0 +1,1057 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class AgentSetup extends APIResource {
5
+ /**
6
+ * Generates flows, metrics and a run plan for the agent. Runs in the background:
7
+ * watch the agent.setup.completed webhook, or poll GET /v1/agent/{agentId}/setup.
8
+ * Refuses while another setup for the agent is running. Needs the
9
+ * 'simulation:create' and 'metric:create' permissions. Exploration also needs
10
+ * 'simulation:run', and is turned off for keys without it unless explore.enabled
11
+ * is set.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const agentSetup = await client.agentSetup.create(
16
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
17
+ * );
18
+ * ```
19
+ */
20
+ create(agentID: string, body?: AgentSetupCreateParams | null | undefined, options?: RequestOptions): APIPromise<AgentSetupCreateResponse>;
21
+ /**
22
+ * Answers the question a setup is waiting on (status NEEDS_INPUT). If nobody
23
+ * answers within 15 minutes, setup goes ahead with its default.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const response = await client.agentSetup.answerQuestion(
28
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
29
+ * {
30
+ * agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
31
+ * text: 'x',
32
+ * },
33
+ * );
34
+ * ```
35
+ */
36
+ answerQuestion(setupID: string, params: AgentSetupAnswerQuestionParams, options?: RequestOptions): APIPromise<AgentSetupAnswerQuestionResponse>;
37
+ /**
38
+ * Stops a running setup. Flows and metrics it already created are kept; no run
39
+ * plan is made. Refused once setup has finished.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const response = await client.agentSetup.cancel(
44
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
45
+ * { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
46
+ * );
47
+ * ```
48
+ */
49
+ cancel(setupID: string, params: AgentSetupCancelParams, options?: RequestOptions): APIPromise<AgentSetupCancelResponse>;
50
+ /**
51
+ * Returns one setup, for example the one a webhook named.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const response = await client.agentSetup.getByID(
56
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
57
+ * { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
58
+ * );
59
+ * ```
60
+ */
61
+ getByID(setupID: string, params: AgentSetupGetByIDParams, options?: RequestOptions): APIPromise<AgentSetupGetByIDResponse>;
62
+ /**
63
+ * Returns the agent's most recent setup: its progress, the run plan it created,
64
+ * and every flow, metric and check it added or left out, with the reason and the
65
+ * source it came from.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const response = await client.agentSetup.getLatest(
70
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
71
+ * );
72
+ * ```
73
+ */
74
+ getLatest(agentID: string, options?: RequestOptions): APIPromise<AgentSetupGetLatestResponse>;
75
+ /**
76
+ * Tells a running setup what to focus on or avoid, in your own words. It reads it
77
+ * on its next turn and it outranks setup's own plan. Refused once setup has
78
+ * finished.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const response = await client.agentSetup.sendGuidance(
83
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
84
+ * {
85
+ * agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
86
+ * text: 'x',
87
+ * },
88
+ * );
89
+ * ```
90
+ */
91
+ sendGuidance(setupID: string, params: AgentSetupSendGuidanceParams, options?: RequestOptions): APIPromise<AgentSetupSendGuidanceResponse>;
92
+ }
93
+ export interface AgentSetupCreateResponse {
94
+ /**
95
+ * The tests Roark generated for an agent, and why
96
+ */
97
+ data: AgentSetupCreateResponse.Data;
98
+ }
99
+ export declare namespace AgentSetupCreateResponse {
100
+ /**
101
+ * The tests Roark generated for an agent, and why
102
+ */
103
+ interface Data {
104
+ /**
105
+ * Setup ID
106
+ */
107
+ id: string;
108
+ /**
109
+ * What setup did and said, in order
110
+ */
111
+ activity: Array<Data.Activity>;
112
+ agentId: string;
113
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
114
+ completedAt: string | null;
115
+ createdAt: string;
116
+ errorMessage: string | null;
117
+ explore: Data.Explore;
118
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
119
+ items: Array<Data.Item>;
120
+ /**
121
+ * The checklist setup works through
122
+ */
123
+ layers: Array<Data.Layer>;
124
+ /**
125
+ * The question setup is waiting on, while NEEDS_INPUT
126
+ */
127
+ question: Data.Question | null;
128
+ /**
129
+ * The run plan to start once setup completes
130
+ */
131
+ runPlanId: string | null;
132
+ /**
133
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
134
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
135
+ */
136
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
137
+ /**
138
+ * Test data the agent asked for that Roark did not have
139
+ */
140
+ testDataNeeded: Array<Data.TestDataNeeded>;
141
+ }
142
+ namespace Data {
143
+ /**
144
+ * One thing setup did or said, in order
145
+ */
146
+ interface Activity {
147
+ createdAt: string;
148
+ /**
149
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
150
+ */
151
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
152
+ text: string;
153
+ }
154
+ interface Explore {
155
+ conversationsUsed: number;
156
+ enabled: boolean;
157
+ maxConversationMinutes: number;
158
+ maxConversations: number;
159
+ }
160
+ /**
161
+ * Something setup created or chose to leave out, and why
162
+ */
163
+ interface Item {
164
+ id: string;
165
+ /**
166
+ * CREATED, or SKIPPED with the reason
167
+ */
168
+ action: 'CREATED' | 'SKIPPED';
169
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
170
+ /**
171
+ * A flow, a metric, or a pass or fail check
172
+ */
173
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
174
+ label: string;
175
+ /**
176
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
177
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
178
+ */
179
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
180
+ /**
181
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
182
+ * offered
183
+ */
184
+ origin: 'DISCOVERED' | 'INFERRED' | null;
185
+ reason: string;
186
+ /**
187
+ * The flow or metric it created
188
+ */
189
+ resourceId: string | null;
190
+ source: Item.Source;
191
+ }
192
+ namespace Item {
193
+ interface Source {
194
+ /**
195
+ * The exploration call it came from
196
+ */
197
+ callId: string | null;
198
+ /**
199
+ * Where in the call
200
+ */
201
+ offsetMs: number | null;
202
+ /**
203
+ * The words in the source that led to it
204
+ */
205
+ quote: string | null;
206
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
207
+ /**
208
+ * The page it came from, for website sources
209
+ */
210
+ url: string | null;
211
+ }
212
+ }
213
+ /**
214
+ * Where one part of testing the agent stands
215
+ */
216
+ interface Layer {
217
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
218
+ /**
219
+ * COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
220
+ * could not test it and said why. OPEN: not covered yet; setup does not finish
221
+ * while a layer is open. NOT_APPLICABLE: nothing to test it from.
222
+ */
223
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
224
+ summary: string;
225
+ }
226
+ /**
227
+ * The question setup is waiting on, while NEEDS_INPUT
228
+ */
229
+ interface Question {
230
+ defaultOption: string;
231
+ options: Array<string>;
232
+ question: string;
233
+ }
234
+ interface TestDataNeeded {
235
+ callId: string | null;
236
+ label: string;
237
+ reason: string;
238
+ }
239
+ }
240
+ }
241
+ export interface AgentSetupAnswerQuestionResponse {
242
+ /**
243
+ * The tests Roark generated for an agent, and why
244
+ */
245
+ data: AgentSetupAnswerQuestionResponse.Data;
246
+ }
247
+ export declare namespace AgentSetupAnswerQuestionResponse {
248
+ /**
249
+ * The tests Roark generated for an agent, and why
250
+ */
251
+ interface Data {
252
+ /**
253
+ * Setup ID
254
+ */
255
+ id: string;
256
+ /**
257
+ * What setup did and said, in order
258
+ */
259
+ activity: Array<Data.Activity>;
260
+ agentId: string;
261
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
262
+ completedAt: string | null;
263
+ createdAt: string;
264
+ errorMessage: string | null;
265
+ explore: Data.Explore;
266
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
267
+ items: Array<Data.Item>;
268
+ /**
269
+ * The checklist setup works through
270
+ */
271
+ layers: Array<Data.Layer>;
272
+ /**
273
+ * The question setup is waiting on, while NEEDS_INPUT
274
+ */
275
+ question: Data.Question | null;
276
+ /**
277
+ * The run plan to start once setup completes
278
+ */
279
+ runPlanId: string | null;
280
+ /**
281
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
282
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
283
+ */
284
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
285
+ /**
286
+ * Test data the agent asked for that Roark did not have
287
+ */
288
+ testDataNeeded: Array<Data.TestDataNeeded>;
289
+ }
290
+ namespace Data {
291
+ /**
292
+ * One thing setup did or said, in order
293
+ */
294
+ interface Activity {
295
+ createdAt: string;
296
+ /**
297
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
298
+ */
299
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
300
+ text: string;
301
+ }
302
+ interface Explore {
303
+ conversationsUsed: number;
304
+ enabled: boolean;
305
+ maxConversationMinutes: number;
306
+ maxConversations: number;
307
+ }
308
+ /**
309
+ * Something setup created or chose to leave out, and why
310
+ */
311
+ interface Item {
312
+ id: string;
313
+ /**
314
+ * CREATED, or SKIPPED with the reason
315
+ */
316
+ action: 'CREATED' | 'SKIPPED';
317
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
318
+ /**
319
+ * A flow, a metric, or a pass or fail check
320
+ */
321
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
322
+ label: string;
323
+ /**
324
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
325
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
326
+ */
327
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
328
+ /**
329
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
330
+ * offered
331
+ */
332
+ origin: 'DISCOVERED' | 'INFERRED' | null;
333
+ reason: string;
334
+ /**
335
+ * The flow or metric it created
336
+ */
337
+ resourceId: string | null;
338
+ source: Item.Source;
339
+ }
340
+ namespace Item {
341
+ interface Source {
342
+ /**
343
+ * The exploration call it came from
344
+ */
345
+ callId: string | null;
346
+ /**
347
+ * Where in the call
348
+ */
349
+ offsetMs: number | null;
350
+ /**
351
+ * The words in the source that led to it
352
+ */
353
+ quote: string | null;
354
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
355
+ /**
356
+ * The page it came from, for website sources
357
+ */
358
+ url: string | null;
359
+ }
360
+ }
361
+ /**
362
+ * Where one part of testing the agent stands
363
+ */
364
+ interface Layer {
365
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
366
+ /**
367
+ * COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
368
+ * could not test it and said why. OPEN: not covered yet; setup does not finish
369
+ * while a layer is open. NOT_APPLICABLE: nothing to test it from.
370
+ */
371
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
372
+ summary: string;
373
+ }
374
+ /**
375
+ * The question setup is waiting on, while NEEDS_INPUT
376
+ */
377
+ interface Question {
378
+ defaultOption: string;
379
+ options: Array<string>;
380
+ question: string;
381
+ }
382
+ interface TestDataNeeded {
383
+ callId: string | null;
384
+ label: string;
385
+ reason: string;
386
+ }
387
+ }
388
+ }
389
+ export interface AgentSetupCancelResponse {
390
+ /**
391
+ * The tests Roark generated for an agent, and why
392
+ */
393
+ data: AgentSetupCancelResponse.Data;
394
+ }
395
+ export declare namespace AgentSetupCancelResponse {
396
+ /**
397
+ * The tests Roark generated for an agent, and why
398
+ */
399
+ interface Data {
400
+ /**
401
+ * Setup ID
402
+ */
403
+ id: string;
404
+ /**
405
+ * What setup did and said, in order
406
+ */
407
+ activity: Array<Data.Activity>;
408
+ agentId: string;
409
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
410
+ completedAt: string | null;
411
+ createdAt: string;
412
+ errorMessage: string | null;
413
+ explore: Data.Explore;
414
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
415
+ items: Array<Data.Item>;
416
+ /**
417
+ * The checklist setup works through
418
+ */
419
+ layers: Array<Data.Layer>;
420
+ /**
421
+ * The question setup is waiting on, while NEEDS_INPUT
422
+ */
423
+ question: Data.Question | null;
424
+ /**
425
+ * The run plan to start once setup completes
426
+ */
427
+ runPlanId: string | null;
428
+ /**
429
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
430
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
431
+ */
432
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
433
+ /**
434
+ * Test data the agent asked for that Roark did not have
435
+ */
436
+ testDataNeeded: Array<Data.TestDataNeeded>;
437
+ }
438
+ namespace Data {
439
+ /**
440
+ * One thing setup did or said, in order
441
+ */
442
+ interface Activity {
443
+ createdAt: string;
444
+ /**
445
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
446
+ */
447
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
448
+ text: string;
449
+ }
450
+ interface Explore {
451
+ conversationsUsed: number;
452
+ enabled: boolean;
453
+ maxConversationMinutes: number;
454
+ maxConversations: number;
455
+ }
456
+ /**
457
+ * Something setup created or chose to leave out, and why
458
+ */
459
+ interface Item {
460
+ id: string;
461
+ /**
462
+ * CREATED, or SKIPPED with the reason
463
+ */
464
+ action: 'CREATED' | 'SKIPPED';
465
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
466
+ /**
467
+ * A flow, a metric, or a pass or fail check
468
+ */
469
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
470
+ label: string;
471
+ /**
472
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
473
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
474
+ */
475
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
476
+ /**
477
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
478
+ * offered
479
+ */
480
+ origin: 'DISCOVERED' | 'INFERRED' | null;
481
+ reason: string;
482
+ /**
483
+ * The flow or metric it created
484
+ */
485
+ resourceId: string | null;
486
+ source: Item.Source;
487
+ }
488
+ namespace Item {
489
+ interface Source {
490
+ /**
491
+ * The exploration call it came from
492
+ */
493
+ callId: string | null;
494
+ /**
495
+ * Where in the call
496
+ */
497
+ offsetMs: number | null;
498
+ /**
499
+ * The words in the source that led to it
500
+ */
501
+ quote: string | null;
502
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
503
+ /**
504
+ * The page it came from, for website sources
505
+ */
506
+ url: string | null;
507
+ }
508
+ }
509
+ /**
510
+ * Where one part of testing the agent stands
511
+ */
512
+ interface Layer {
513
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
514
+ /**
515
+ * COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
516
+ * could not test it and said why. OPEN: not covered yet; setup does not finish
517
+ * while a layer is open. NOT_APPLICABLE: nothing to test it from.
518
+ */
519
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
520
+ summary: string;
521
+ }
522
+ /**
523
+ * The question setup is waiting on, while NEEDS_INPUT
524
+ */
525
+ interface Question {
526
+ defaultOption: string;
527
+ options: Array<string>;
528
+ question: string;
529
+ }
530
+ interface TestDataNeeded {
531
+ callId: string | null;
532
+ label: string;
533
+ reason: string;
534
+ }
535
+ }
536
+ }
537
+ export interface AgentSetupGetByIDResponse {
538
+ /**
539
+ * The tests Roark generated for an agent, and why
540
+ */
541
+ data: AgentSetupGetByIDResponse.Data;
542
+ }
543
+ export declare namespace AgentSetupGetByIDResponse {
544
+ /**
545
+ * The tests Roark generated for an agent, and why
546
+ */
547
+ interface Data {
548
+ /**
549
+ * Setup ID
550
+ */
551
+ id: string;
552
+ /**
553
+ * What setup did and said, in order
554
+ */
555
+ activity: Array<Data.Activity>;
556
+ agentId: string;
557
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
558
+ completedAt: string | null;
559
+ createdAt: string;
560
+ errorMessage: string | null;
561
+ explore: Data.Explore;
562
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
563
+ items: Array<Data.Item>;
564
+ /**
565
+ * The checklist setup works through
566
+ */
567
+ layers: Array<Data.Layer>;
568
+ /**
569
+ * The question setup is waiting on, while NEEDS_INPUT
570
+ */
571
+ question: Data.Question | null;
572
+ /**
573
+ * The run plan to start once setup completes
574
+ */
575
+ runPlanId: string | null;
576
+ /**
577
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
578
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
579
+ */
580
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
581
+ /**
582
+ * Test data the agent asked for that Roark did not have
583
+ */
584
+ testDataNeeded: Array<Data.TestDataNeeded>;
585
+ }
586
+ namespace Data {
587
+ /**
588
+ * One thing setup did or said, in order
589
+ */
590
+ interface Activity {
591
+ createdAt: string;
592
+ /**
593
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
594
+ */
595
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
596
+ text: string;
597
+ }
598
+ interface Explore {
599
+ conversationsUsed: number;
600
+ enabled: boolean;
601
+ maxConversationMinutes: number;
602
+ maxConversations: number;
603
+ }
604
+ /**
605
+ * Something setup created or chose to leave out, and why
606
+ */
607
+ interface Item {
608
+ id: string;
609
+ /**
610
+ * CREATED, or SKIPPED with the reason
611
+ */
612
+ action: 'CREATED' | 'SKIPPED';
613
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
614
+ /**
615
+ * A flow, a metric, or a pass or fail check
616
+ */
617
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
618
+ label: string;
619
+ /**
620
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
621
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
622
+ */
623
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
624
+ /**
625
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
626
+ * offered
627
+ */
628
+ origin: 'DISCOVERED' | 'INFERRED' | null;
629
+ reason: string;
630
+ /**
631
+ * The flow or metric it created
632
+ */
633
+ resourceId: string | null;
634
+ source: Item.Source;
635
+ }
636
+ namespace Item {
637
+ interface Source {
638
+ /**
639
+ * The exploration call it came from
640
+ */
641
+ callId: string | null;
642
+ /**
643
+ * Where in the call
644
+ */
645
+ offsetMs: number | null;
646
+ /**
647
+ * The words in the source that led to it
648
+ */
649
+ quote: string | null;
650
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
651
+ /**
652
+ * The page it came from, for website sources
653
+ */
654
+ url: string | null;
655
+ }
656
+ }
657
+ /**
658
+ * Where one part of testing the agent stands
659
+ */
660
+ interface Layer {
661
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
662
+ /**
663
+ * COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
664
+ * could not test it and said why. OPEN: not covered yet; setup does not finish
665
+ * while a layer is open. NOT_APPLICABLE: nothing to test it from.
666
+ */
667
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
668
+ summary: string;
669
+ }
670
+ /**
671
+ * The question setup is waiting on, while NEEDS_INPUT
672
+ */
673
+ interface Question {
674
+ defaultOption: string;
675
+ options: Array<string>;
676
+ question: string;
677
+ }
678
+ interface TestDataNeeded {
679
+ callId: string | null;
680
+ label: string;
681
+ reason: string;
682
+ }
683
+ }
684
+ }
685
+ export interface AgentSetupGetLatestResponse {
686
+ /**
687
+ * The tests Roark generated for an agent, and why
688
+ */
689
+ data: AgentSetupGetLatestResponse.Data;
690
+ }
691
+ export declare namespace AgentSetupGetLatestResponse {
692
+ /**
693
+ * The tests Roark generated for an agent, and why
694
+ */
695
+ interface Data {
696
+ /**
697
+ * Setup ID
698
+ */
699
+ id: string;
700
+ /**
701
+ * What setup did and said, in order
702
+ */
703
+ activity: Array<Data.Activity>;
704
+ agentId: string;
705
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
706
+ completedAt: string | null;
707
+ createdAt: string;
708
+ errorMessage: string | null;
709
+ explore: Data.Explore;
710
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
711
+ items: Array<Data.Item>;
712
+ /**
713
+ * The checklist setup works through
714
+ */
715
+ layers: Array<Data.Layer>;
716
+ /**
717
+ * The question setup is waiting on, while NEEDS_INPUT
718
+ */
719
+ question: Data.Question | null;
720
+ /**
721
+ * The run plan to start once setup completes
722
+ */
723
+ runPlanId: string | null;
724
+ /**
725
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
726
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
727
+ */
728
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
729
+ /**
730
+ * Test data the agent asked for that Roark did not have
731
+ */
732
+ testDataNeeded: Array<Data.TestDataNeeded>;
733
+ }
734
+ namespace Data {
735
+ /**
736
+ * One thing setup did or said, in order
737
+ */
738
+ interface Activity {
739
+ createdAt: string;
740
+ /**
741
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
742
+ */
743
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
744
+ text: string;
745
+ }
746
+ interface Explore {
747
+ conversationsUsed: number;
748
+ enabled: boolean;
749
+ maxConversationMinutes: number;
750
+ maxConversations: number;
751
+ }
752
+ /**
753
+ * Something setup created or chose to leave out, and why
754
+ */
755
+ interface Item {
756
+ id: string;
757
+ /**
758
+ * CREATED, or SKIPPED with the reason
759
+ */
760
+ action: 'CREATED' | 'SKIPPED';
761
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
762
+ /**
763
+ * A flow, a metric, or a pass or fail check
764
+ */
765
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
766
+ label: string;
767
+ /**
768
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
769
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
770
+ */
771
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
772
+ /**
773
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
774
+ * offered
775
+ */
776
+ origin: 'DISCOVERED' | 'INFERRED' | null;
777
+ reason: string;
778
+ /**
779
+ * The flow or metric it created
780
+ */
781
+ resourceId: string | null;
782
+ source: Item.Source;
783
+ }
784
+ namespace Item {
785
+ interface Source {
786
+ /**
787
+ * The exploration call it came from
788
+ */
789
+ callId: string | null;
790
+ /**
791
+ * Where in the call
792
+ */
793
+ offsetMs: number | null;
794
+ /**
795
+ * The words in the source that led to it
796
+ */
797
+ quote: string | null;
798
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
799
+ /**
800
+ * The page it came from, for website sources
801
+ */
802
+ url: string | null;
803
+ }
804
+ }
805
+ /**
806
+ * Where one part of testing the agent stands
807
+ */
808
+ interface Layer {
809
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
810
+ /**
811
+ * COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
812
+ * could not test it and said why. OPEN: not covered yet; setup does not finish
813
+ * while a layer is open. NOT_APPLICABLE: nothing to test it from.
814
+ */
815
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
816
+ summary: string;
817
+ }
818
+ /**
819
+ * The question setup is waiting on, while NEEDS_INPUT
820
+ */
821
+ interface Question {
822
+ defaultOption: string;
823
+ options: Array<string>;
824
+ question: string;
825
+ }
826
+ interface TestDataNeeded {
827
+ callId: string | null;
828
+ label: string;
829
+ reason: string;
830
+ }
831
+ }
832
+ }
833
+ export interface AgentSetupSendGuidanceResponse {
834
+ /**
835
+ * The tests Roark generated for an agent, and why
836
+ */
837
+ data: AgentSetupSendGuidanceResponse.Data;
838
+ }
839
+ export declare namespace AgentSetupSendGuidanceResponse {
840
+ /**
841
+ * The tests Roark generated for an agent, and why
842
+ */
843
+ interface Data {
844
+ /**
845
+ * Setup ID
846
+ */
847
+ id: string;
848
+ /**
849
+ * What setup did and said, in order
850
+ */
851
+ activity: Array<Data.Activity>;
852
+ agentId: string;
853
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
854
+ completedAt: string | null;
855
+ createdAt: string;
856
+ errorMessage: string | null;
857
+ explore: Data.Explore;
858
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
859
+ items: Array<Data.Item>;
860
+ /**
861
+ * The checklist setup works through
862
+ */
863
+ layers: Array<Data.Layer>;
864
+ /**
865
+ * The question setup is waiting on, while NEEDS_INPUT
866
+ */
867
+ question: Data.Question | null;
868
+ /**
869
+ * The run plan to start once setup completes
870
+ */
871
+ runPlanId: string | null;
872
+ /**
873
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
874
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
875
+ */
876
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
877
+ /**
878
+ * Test data the agent asked for that Roark did not have
879
+ */
880
+ testDataNeeded: Array<Data.TestDataNeeded>;
881
+ }
882
+ namespace Data {
883
+ /**
884
+ * One thing setup did or said, in order
885
+ */
886
+ interface Activity {
887
+ createdAt: string;
888
+ /**
889
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
890
+ */
891
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
892
+ text: string;
893
+ }
894
+ interface Explore {
895
+ conversationsUsed: number;
896
+ enabled: boolean;
897
+ maxConversationMinutes: number;
898
+ maxConversations: number;
899
+ }
900
+ /**
901
+ * Something setup created or chose to leave out, and why
902
+ */
903
+ interface Item {
904
+ id: string;
905
+ /**
906
+ * CREATED, or SKIPPED with the reason
907
+ */
908
+ action: 'CREATED' | 'SKIPPED';
909
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
910
+ /**
911
+ * A flow, a metric, or a pass or fail check
912
+ */
913
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
914
+ label: string;
915
+ /**
916
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
917
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
918
+ */
919
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
920
+ /**
921
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
922
+ * offered
923
+ */
924
+ origin: 'DISCOVERED' | 'INFERRED' | null;
925
+ reason: string;
926
+ /**
927
+ * The flow or metric it created
928
+ */
929
+ resourceId: string | null;
930
+ source: Item.Source;
931
+ }
932
+ namespace Item {
933
+ interface Source {
934
+ /**
935
+ * The exploration call it came from
936
+ */
937
+ callId: string | null;
938
+ /**
939
+ * Where in the call
940
+ */
941
+ offsetMs: number | null;
942
+ /**
943
+ * The words in the source that led to it
944
+ */
945
+ quote: string | null;
946
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
947
+ /**
948
+ * The page it came from, for website sources
949
+ */
950
+ url: string | null;
951
+ }
952
+ }
953
+ /**
954
+ * Where one part of testing the agent stands
955
+ */
956
+ interface Layer {
957
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
958
+ /**
959
+ * COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
960
+ * could not test it and said why. OPEN: not covered yet; setup does not finish
961
+ * while a layer is open. NOT_APPLICABLE: nothing to test it from.
962
+ */
963
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
964
+ summary: string;
965
+ }
966
+ /**
967
+ * The question setup is waiting on, while NEEDS_INPUT
968
+ */
969
+ interface Question {
970
+ defaultOption: string;
971
+ options: Array<string>;
972
+ question: string;
973
+ }
974
+ interface TestDataNeeded {
975
+ callId: string | null;
976
+ label: string;
977
+ reason: string;
978
+ }
979
+ }
980
+ }
981
+ export interface AgentSetupCreateParams {
982
+ /**
983
+ * The endpoint the run plan calls. Defaults to the agent's newest endpoint.
984
+ */
985
+ agentEndpointId?: string;
986
+ /**
987
+ * The capabilities to test. Omit to let Roark work them out from the agent.
988
+ */
989
+ capabilities?: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
990
+ /**
991
+ * Exploration settings
992
+ */
993
+ explore?: AgentSetupCreateParams.Explore;
994
+ /**
995
+ * The industry the agent serves.
996
+ */
997
+ industry?: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER';
998
+ /**
999
+ * What you want tested, in your own words. Each scenario you describe becomes a
1000
+ * flow.
1001
+ */
1002
+ testingInstructions?: string;
1003
+ /**
1004
+ * A page Roark reads to learn about the business.
1005
+ */
1006
+ websiteUrl?: string;
1007
+ }
1008
+ export declare namespace AgentSetupCreateParams {
1009
+ /**
1010
+ * Exploration settings
1011
+ */
1012
+ interface Explore {
1013
+ /**
1014
+ * Whether Roark calls the agent to discover what it does before finishing setup.
1015
+ * Exploration calls are billed.
1016
+ */
1017
+ enabled?: boolean;
1018
+ /**
1019
+ * The longest a single exploration call may last, in minutes.
1020
+ */
1021
+ maxConversationMinutes?: number;
1022
+ /**
1023
+ * The most exploration calls Roark places.
1024
+ */
1025
+ maxConversations?: number;
1026
+ }
1027
+ }
1028
+ export interface AgentSetupAnswerQuestionParams {
1029
+ /**
1030
+ * Path param
1031
+ */
1032
+ agentId: string;
1033
+ /**
1034
+ * Body param: What you want setup to know
1035
+ */
1036
+ text: string;
1037
+ }
1038
+ export interface AgentSetupCancelParams {
1039
+ agentId: string;
1040
+ }
1041
+ export interface AgentSetupGetByIDParams {
1042
+ agentId: string;
1043
+ }
1044
+ export interface AgentSetupSendGuidanceParams {
1045
+ /**
1046
+ * Path param
1047
+ */
1048
+ agentId: string;
1049
+ /**
1050
+ * Body param: What you want setup to know
1051
+ */
1052
+ text: string;
1053
+ }
1054
+ export declare namespace AgentSetup {
1055
+ export { type AgentSetupCreateResponse as AgentSetupCreateResponse, type AgentSetupAnswerQuestionResponse as AgentSetupAnswerQuestionResponse, type AgentSetupCancelResponse as AgentSetupCancelResponse, type AgentSetupGetByIDResponse as AgentSetupGetByIDResponse, type AgentSetupGetLatestResponse as AgentSetupGetLatestResponse, type AgentSetupSendGuidanceResponse as AgentSetupSendGuidanceResponse, type AgentSetupCreateParams as AgentSetupCreateParams, type AgentSetupAnswerQuestionParams as AgentSetupAnswerQuestionParams, type AgentSetupCancelParams as AgentSetupCancelParams, type AgentSetupGetByIDParams as AgentSetupGetByIDParams, type AgentSetupSendGuidanceParams as AgentSetupSendGuidanceParams, };
1056
+ }
1057
+ //# sourceMappingURL=agent-setup.d.mts.map