@roarkanalytics/sdk 8.0.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/client.d.mts +7 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -7
- package/client.d.ts.map +1 -1
- package/client.js +6 -3
- package/client.js.map +1 -1
- package/client.mjs +7 -4
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-connection.d.mts +0 -88
- package/resources/agent-connection.d.mts.map +1 -1
- package/resources/agent-connection.d.ts +0 -88
- package/resources/agent-connection.d.ts.map +1 -1
- package/resources/agent.d.mts +2 -200
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +2 -200
- package/resources/agent.d.ts.map +1 -1
- package/resources/conversation.d.mts +6 -95
- package/resources/conversation.d.mts.map +1 -1
- package/resources/conversation.d.ts +6 -95
- package/resources/conversation.d.ts.map +1 -1
- package/resources/conversation.js +5 -17
- package/resources/conversation.js.map +1 -1
- package/resources/conversation.mjs +5 -17
- package/resources/conversation.mjs.map +1 -1
- package/resources/customer-flow-folder.d.mts +157 -0
- package/resources/customer-flow-folder.d.mts.map +1 -0
- package/resources/customer-flow-folder.d.ts +157 -0
- package/resources/customer-flow-folder.d.ts.map +1 -0
- package/resources/customer-flow-folder.js +54 -0
- package/resources/customer-flow-folder.js.map +1 -0
- package/resources/customer-flow-folder.mjs +50 -0
- package/resources/customer-flow-folder.mjs.map +1 -0
- package/resources/customer-flow.d.mts +558 -2
- package/resources/customer-flow.d.mts.map +1 -1
- package/resources/customer-flow.d.ts +558 -2
- package/resources/customer-flow.d.ts.map +1 -1
- package/resources/customer-flow.js +2 -2
- package/resources/customer-flow.mjs +2 -2
- package/resources/dashboard.d.mts +3 -3
- package/resources/dashboard.d.ts +3 -3
- package/resources/dashboard.js +3 -3
- package/resources/dashboard.mjs +3 -3
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/live-report.d.mts +10 -10
- package/resources/live-report.d.ts +10 -10
- package/resources/me.d.mts +20 -19
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +20 -19
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +14 -13
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +14 -13
- package/resources/me.mjs.map +1 -1
- package/resources/metric.d.mts +60 -60
- package/resources/metric.d.ts +60 -60
- package/resources/simulation-group.d.mts +13 -13
- package/resources/simulation-group.d.ts +13 -13
- package/resources/simulation-group.js +5 -5
- package/resources/simulation-group.mjs +5 -5
- package/resources/simulation-run-group.d.mts +2 -2
- package/resources/simulation-run-group.d.ts +2 -2
- package/resources/simulation-run-group.js +2 -2
- package/resources/simulation-run-group.mjs +2 -2
- package/resources/simulation.d.mts +1086 -4
- package/resources/simulation.d.mts.map +1 -1
- package/resources/simulation.d.ts +1086 -4
- package/resources/simulation.d.ts.map +1 -1
- package/resources/simulation.js +106 -0
- package/resources/simulation.js.map +1 -1
- package/resources/simulation.mjs +106 -0
- package/resources/simulation.mjs.map +1 -1
- package/src/client.ts +42 -43
- package/src/resources/agent-connection.ts +0 -103
- package/src/resources/agent.ts +2 -317
- package/src/resources/conversation.ts +6 -126
- package/src/resources/customer-flow-folder.ts +235 -0
- package/src/resources/customer-flow.ts +862 -2
- package/src/resources/dashboard.ts +3 -3
- package/src/resources/index.ts +18 -20
- package/src/resources/live-report.ts +10 -10
- package/src/resources/me.ts +20 -19
- package/src/resources/metric.ts +60 -60
- package/src/resources/simulation-group.ts +13 -13
- package/src/resources/simulation-run-group.ts +2 -2
- package/src/resources/simulation.ts +1759 -52
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/agent-setup.d.mts +0 -1057
- package/resources/agent-setup.d.mts.map +0 -1
- package/resources/agent-setup.d.ts +0 -1057
- package/resources/agent-setup.d.ts.map +0 -1
- package/resources/agent-setup.js +0 -113
- package/resources/agent-setup.js.map +0 -1
- package/resources/agent-setup.mjs +0 -109
- package/resources/agent-setup.mjs.map +0 -1
- package/src/resources/agent-setup.ts +0 -1685
package/resources/agent.d.ts
CHANGED
|
@@ -82,157 +82,11 @@ export declare namespace AgentCreateResponse {
|
|
|
82
82
|
* Name of the agent
|
|
83
83
|
*/
|
|
84
84
|
name: string;
|
|
85
|
-
/**
|
|
86
|
-
* The tests Roark generated for an agent, and why
|
|
87
|
-
*/
|
|
88
|
-
setup: Data.Setup | null;
|
|
89
85
|
/**
|
|
90
86
|
* Last update timestamp in ISO 8601 format
|
|
91
87
|
*/
|
|
92
88
|
updatedAt: string;
|
|
93
89
|
}
|
|
94
|
-
namespace Data {
|
|
95
|
-
/**
|
|
96
|
-
* The tests Roark generated for an agent, and why
|
|
97
|
-
*/
|
|
98
|
-
interface Setup {
|
|
99
|
-
/**
|
|
100
|
-
* Setup ID
|
|
101
|
-
*/
|
|
102
|
-
id: string;
|
|
103
|
-
/**
|
|
104
|
-
* What setup did and said, in order
|
|
105
|
-
*/
|
|
106
|
-
activity: Array<Setup.Activity>;
|
|
107
|
-
agentId: string;
|
|
108
|
-
capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
|
|
109
|
-
completedAt: string | null;
|
|
110
|
-
createdAt: string;
|
|
111
|
-
errorMessage: string | null;
|
|
112
|
-
explore: Setup.Explore;
|
|
113
|
-
industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
|
|
114
|
-
items: Array<Setup.Item>;
|
|
115
|
-
/**
|
|
116
|
-
* The checklist setup works through
|
|
117
|
-
*/
|
|
118
|
-
layers: Array<Setup.Layer>;
|
|
119
|
-
/**
|
|
120
|
-
* The question setup is waiting on, while NEEDS_INPUT
|
|
121
|
-
*/
|
|
122
|
-
question: Setup.Question | null;
|
|
123
|
-
/**
|
|
124
|
-
* The run plan to start once setup completes
|
|
125
|
-
*/
|
|
126
|
-
runPlanId: string | null;
|
|
127
|
-
/**
|
|
128
|
-
* PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
|
|
129
|
-
* default if nobody answers), COMPLETED, FAILED or CANCELLED
|
|
130
|
-
*/
|
|
131
|
-
status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
132
|
-
/**
|
|
133
|
-
* Test data the agent asked for that Roark did not have
|
|
134
|
-
*/
|
|
135
|
-
testDataNeeded: Array<Setup.TestDataNeeded>;
|
|
136
|
-
}
|
|
137
|
-
namespace Setup {
|
|
138
|
-
/**
|
|
139
|
-
* One thing setup did or said, in order
|
|
140
|
-
*/
|
|
141
|
-
interface Activity {
|
|
142
|
-
createdAt: string;
|
|
143
|
-
/**
|
|
144
|
-
* STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
|
|
145
|
-
*/
|
|
146
|
-
kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
|
|
147
|
-
text: string;
|
|
148
|
-
}
|
|
149
|
-
interface Explore {
|
|
150
|
-
conversationsUsed: number;
|
|
151
|
-
enabled: boolean;
|
|
152
|
-
maxConversationMinutes: number;
|
|
153
|
-
maxConversations: number;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Something setup created or chose to leave out, and why
|
|
157
|
-
*/
|
|
158
|
-
interface Item {
|
|
159
|
-
id: string;
|
|
160
|
-
/**
|
|
161
|
-
* CREATED, or SKIPPED with the reason
|
|
162
|
-
*/
|
|
163
|
-
action: 'CREATED' | 'SKIPPED';
|
|
164
|
-
capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
|
|
165
|
-
/**
|
|
166
|
-
* A flow, a metric, or a pass or fail check
|
|
167
|
-
*/
|
|
168
|
-
kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
|
|
169
|
-
label: string;
|
|
170
|
-
/**
|
|
171
|
-
* Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
|
|
172
|
-
* prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
|
|
173
|
-
*/
|
|
174
|
-
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
175
|
-
/**
|
|
176
|
-
* Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
|
|
177
|
-
* offered
|
|
178
|
-
*/
|
|
179
|
-
origin: 'DISCOVERED' | 'INFERRED' | null;
|
|
180
|
-
reason: string;
|
|
181
|
-
/**
|
|
182
|
-
* The flow or metric it created
|
|
183
|
-
*/
|
|
184
|
-
resourceId: string | null;
|
|
185
|
-
source: Item.Source;
|
|
186
|
-
}
|
|
187
|
-
namespace Item {
|
|
188
|
-
interface Source {
|
|
189
|
-
/**
|
|
190
|
-
* The exploration call it came from
|
|
191
|
-
*/
|
|
192
|
-
callId: string | null;
|
|
193
|
-
/**
|
|
194
|
-
* Where in the call
|
|
195
|
-
*/
|
|
196
|
-
offsetMs: number | null;
|
|
197
|
-
/**
|
|
198
|
-
* The words in the source that led to it
|
|
199
|
-
*/
|
|
200
|
-
quote: string | null;
|
|
201
|
-
type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
|
|
202
|
-
/**
|
|
203
|
-
* The page it came from, for website sources
|
|
204
|
-
*/
|
|
205
|
-
url: string | null;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Where one part of testing the agent stands
|
|
210
|
-
*/
|
|
211
|
-
interface Layer {
|
|
212
|
-
layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
|
|
213
|
-
/**
|
|
214
|
-
* COVERED: tests exist for it, or are added when setup finishes. SKIPPED: setup
|
|
215
|
-
* could not test it and said why. OPEN: not covered yet; setup does not finish
|
|
216
|
-
* while a layer is open. NOT_APPLICABLE: nothing to test it from.
|
|
217
|
-
*/
|
|
218
|
-
status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
|
|
219
|
-
summary: string;
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* The question setup is waiting on, while NEEDS_INPUT
|
|
223
|
-
*/
|
|
224
|
-
interface Question {
|
|
225
|
-
defaultOption: string;
|
|
226
|
-
options: Array<string>;
|
|
227
|
-
question: string;
|
|
228
|
-
}
|
|
229
|
-
interface TestDataNeeded {
|
|
230
|
-
callId: string | null;
|
|
231
|
-
label: string;
|
|
232
|
-
reason: string;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
90
|
}
|
|
237
91
|
export interface AgentUpdateResponse {
|
|
238
92
|
data: AgentUpdateResponse.Data;
|
|
@@ -394,10 +248,6 @@ export interface AgentCreateParams {
|
|
|
394
248
|
* Name of the agent
|
|
395
249
|
*/
|
|
396
250
|
name: string;
|
|
397
|
-
/**
|
|
398
|
-
* Controls the flows, metrics and run plan Roark generates for the agent
|
|
399
|
-
*/
|
|
400
|
-
autoSetup?: AgentCreateParams.AutoSetup | null;
|
|
401
251
|
/**
|
|
402
252
|
* Custom identifier for the agent. Must be unique in the project.
|
|
403
253
|
*/
|
|
@@ -411,63 +261,15 @@ export interface AgentCreateParams {
|
|
|
411
261
|
*/
|
|
412
262
|
endpoint?: AgentCreateParams.Endpoint | null;
|
|
413
263
|
/**
|
|
414
|
-
* The industry the agent serves.
|
|
415
|
-
* checks setup adds.
|
|
264
|
+
* The industry the agent serves.
|
|
416
265
|
*/
|
|
417
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;
|
|
418
267
|
/**
|
|
419
|
-
* The agent's system prompt.
|
|
268
|
+
* The agent's system prompt.
|
|
420
269
|
*/
|
|
421
270
|
prompt?: string | null;
|
|
422
|
-
/**
|
|
423
|
-
* What you want tested, in your own words. Each scenario you describe becomes a
|
|
424
|
-
* flow.
|
|
425
|
-
*/
|
|
426
|
-
testingInstructions?: string | null;
|
|
427
|
-
/**
|
|
428
|
-
* A page Roark reads to learn about the business.
|
|
429
|
-
*/
|
|
430
|
-
websiteUrl?: string | null;
|
|
431
271
|
}
|
|
432
272
|
export declare namespace AgentCreateParams {
|
|
433
|
-
/**
|
|
434
|
-
* Controls the flows, metrics and run plan Roark generates for the agent
|
|
435
|
-
*/
|
|
436
|
-
interface AutoSetup {
|
|
437
|
-
/**
|
|
438
|
-
* The capabilities to test. Omit to let Roark work them out from the agent.
|
|
439
|
-
*/
|
|
440
|
-
capabilities?: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
|
|
441
|
-
/**
|
|
442
|
-
* Set to false to skip setup. When omitted, setup runs if you pass a prompt,
|
|
443
|
-
* endpoint, website or testing instructions.
|
|
444
|
-
*/
|
|
445
|
-
enabled?: boolean;
|
|
446
|
-
/**
|
|
447
|
-
* Exploration settings
|
|
448
|
-
*/
|
|
449
|
-
explore?: AutoSetup.Explore;
|
|
450
|
-
}
|
|
451
|
-
namespace AutoSetup {
|
|
452
|
-
/**
|
|
453
|
-
* Exploration settings
|
|
454
|
-
*/
|
|
455
|
-
interface Explore {
|
|
456
|
-
/**
|
|
457
|
-
* Whether Roark calls the agent to discover what it does before finishing setup.
|
|
458
|
-
* Exploration calls are billed.
|
|
459
|
-
*/
|
|
460
|
-
enabled?: boolean;
|
|
461
|
-
/**
|
|
462
|
-
* The longest a single exploration call may last, in minutes.
|
|
463
|
-
*/
|
|
464
|
-
maxConversationMinutes?: number;
|
|
465
|
-
/**
|
|
466
|
-
* The most exploration calls Roark places.
|
|
467
|
-
*/
|
|
468
|
-
maxConversations?: number;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
273
|
/**
|
|
472
274
|
* The phone number or connection Roark calls to test the agent
|
|
473
275
|
*/
|
package/resources/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/resources/agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,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request-options.mjs";
|
|
4
4
|
export declare class Conversation extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* both.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const conversations = await client.conversation.list();
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
list(query?: ConversationListParams | null | undefined, options?: RequestOptions): APIPromise<ConversationListResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* A call or chat by its id, whichever it is. One started through
|
|
6
|
+
* Fetches one conversation by its id, whether it is a call or a chat. The same
|
|
7
|
+
* endpoint reads both modalities, and `modality` in the response says which one it
|
|
8
|
+
* is, so you do not need to know it up front. A conversation started with
|
|
19
9
|
* `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
|
|
20
|
-
* created, before it is recorded. For its transcript and
|
|
21
|
-
* call or chat
|
|
10
|
+
* created, before it is recorded as a call or chat. For its transcript and
|
|
11
|
+
* metrics, use the call or chat endpoints that match its `modality`.
|
|
22
12
|
*
|
|
23
13
|
* @example
|
|
24
14
|
* ```ts
|
|
@@ -29,63 +19,6 @@ export declare class Conversation extends APIResource {
|
|
|
29
19
|
*/
|
|
30
20
|
getByID(conversationID: string, options?: RequestOptions): APIPromise<ConversationGetByIDResponse>;
|
|
31
21
|
}
|
|
32
|
-
export interface ConversationListResponse {
|
|
33
|
-
data: Array<ConversationListResponse.Data>;
|
|
34
|
-
pagination: ConversationListResponse.Pagination;
|
|
35
|
-
}
|
|
36
|
-
export declare namespace ConversationListResponse {
|
|
37
|
-
interface Data {
|
|
38
|
-
/**
|
|
39
|
-
* The conversation id: its call id or chat id. `modality` says which, and where to
|
|
40
|
-
* read its transcript and metrics (`/v1/call/{callId}` or `/v1/chat/{id}`).
|
|
41
|
-
*/
|
|
42
|
-
id: string;
|
|
43
|
-
createdAt: string;
|
|
44
|
-
/**
|
|
45
|
-
* How long it ran. Null until it ends.
|
|
46
|
-
*/
|
|
47
|
-
durationMs: number | null;
|
|
48
|
-
/**
|
|
49
|
-
* When it ended (ISO 8601). Null until it ends.
|
|
50
|
-
*/
|
|
51
|
-
endedAt: string | null;
|
|
52
|
-
/**
|
|
53
|
-
* Your own id for it, if one was given.
|
|
54
|
-
*/
|
|
55
|
-
externalId: string | null;
|
|
56
|
-
/**
|
|
57
|
-
* `voice` or `chat`. A voice conversation is recorded as a call
|
|
58
|
-
* (`/v1/call/{callId}`), a chat as a chat (`/v1/chat/{id}`).
|
|
59
|
-
*/
|
|
60
|
-
modality: 'voice' | 'chat';
|
|
61
|
-
projectId: string;
|
|
62
|
-
/**
|
|
63
|
-
* When it started, or was created while pending (ISO 8601).
|
|
64
|
-
*/
|
|
65
|
-
startedAt: string;
|
|
66
|
-
/**
|
|
67
|
-
* `PENDING` until it starts (a call ringing, a chat nobody has joined yet),
|
|
68
|
-
* `IN_PROGRESS`, then `ENDED`.
|
|
69
|
-
*/
|
|
70
|
-
status: 'PENDING' | 'IN_PROGRESS' | 'ENDED';
|
|
71
|
-
summary: string | null;
|
|
72
|
-
title: string | null;
|
|
73
|
-
}
|
|
74
|
-
interface Pagination {
|
|
75
|
-
/**
|
|
76
|
-
* Whether there are more items to fetch
|
|
77
|
-
*/
|
|
78
|
-
hasMore: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Cursor for the next page of items
|
|
81
|
-
*/
|
|
82
|
-
nextCursor: string | null;
|
|
83
|
-
/**
|
|
84
|
-
* Total number of items
|
|
85
|
-
*/
|
|
86
|
-
total: number;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
22
|
export interface ConversationGetByIDResponse {
|
|
90
23
|
data: ConversationGetByIDResponse.Data;
|
|
91
24
|
}
|
|
@@ -128,29 +61,7 @@ export declare namespace ConversationGetByIDResponse {
|
|
|
128
61
|
title: string | null;
|
|
129
62
|
}
|
|
130
63
|
}
|
|
131
|
-
export interface ConversationListParams {
|
|
132
|
-
/**
|
|
133
|
-
* The `nextCursor` of the previous page.
|
|
134
|
-
*/
|
|
135
|
-
after?: string;
|
|
136
|
-
/**
|
|
137
|
-
* How many to return (default 20, max 100).
|
|
138
|
-
*/
|
|
139
|
-
limit?: number;
|
|
140
|
-
/**
|
|
141
|
-
* Only `voice`, or only `chat`. Both by default.
|
|
142
|
-
*/
|
|
143
|
-
modality?: 'voice' | 'chat' | 'call';
|
|
144
|
-
/**
|
|
145
|
-
* Only conversations that started at or after this time.
|
|
146
|
-
*/
|
|
147
|
-
startedFrom?: string;
|
|
148
|
-
/**
|
|
149
|
-
* Only conversations that started at or before this time.
|
|
150
|
-
*/
|
|
151
|
-
startedTo?: string;
|
|
152
|
-
}
|
|
153
64
|
export declare namespace Conversation {
|
|
154
|
-
export { type
|
|
65
|
+
export { type ConversationGetByIDResponse as ConversationGetByIDResponse };
|
|
155
66
|
}
|
|
156
67
|
//# sourceMappingURL=conversation.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.mts","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"conversation.d.mts","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;CAGnG;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,2BAA2B,CAAC,IAAI,CAAC;CACxC;AAED,yBAAiB,2BAA2B,CAAC;IAC3C,UAAiB,IAAI;QACnB;;;WAGG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;WAEG;QACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;;WAGG;QACH,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;QAE3B,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,OAAO,CAAC;QAE5C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAC5E"}
|
|
@@ -3,22 +3,12 @@ import { APIPromise } from "../core/api-promise.js";
|
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
4
|
export declare class Conversation extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* both.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const conversations = await client.conversation.list();
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
list(query?: ConversationListParams | null | undefined, options?: RequestOptions): APIPromise<ConversationListResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* A call or chat by its id, whichever it is. One started through
|
|
6
|
+
* Fetches one conversation by its id, whether it is a call or a chat. The same
|
|
7
|
+
* endpoint reads both modalities, and `modality` in the response says which one it
|
|
8
|
+
* is, so you do not need to know it up front. A conversation started with
|
|
19
9
|
* `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
|
|
20
|
-
* created, before it is recorded. For its transcript and
|
|
21
|
-
* call or chat
|
|
10
|
+
* created, before it is recorded as a call or chat. For its transcript and
|
|
11
|
+
* metrics, use the call or chat endpoints that match its `modality`.
|
|
22
12
|
*
|
|
23
13
|
* @example
|
|
24
14
|
* ```ts
|
|
@@ -29,63 +19,6 @@ export declare class Conversation extends APIResource {
|
|
|
29
19
|
*/
|
|
30
20
|
getByID(conversationID: string, options?: RequestOptions): APIPromise<ConversationGetByIDResponse>;
|
|
31
21
|
}
|
|
32
|
-
export interface ConversationListResponse {
|
|
33
|
-
data: Array<ConversationListResponse.Data>;
|
|
34
|
-
pagination: ConversationListResponse.Pagination;
|
|
35
|
-
}
|
|
36
|
-
export declare namespace ConversationListResponse {
|
|
37
|
-
interface Data {
|
|
38
|
-
/**
|
|
39
|
-
* The conversation id: its call id or chat id. `modality` says which, and where to
|
|
40
|
-
* read its transcript and metrics (`/v1/call/{callId}` or `/v1/chat/{id}`).
|
|
41
|
-
*/
|
|
42
|
-
id: string;
|
|
43
|
-
createdAt: string;
|
|
44
|
-
/**
|
|
45
|
-
* How long it ran. Null until it ends.
|
|
46
|
-
*/
|
|
47
|
-
durationMs: number | null;
|
|
48
|
-
/**
|
|
49
|
-
* When it ended (ISO 8601). Null until it ends.
|
|
50
|
-
*/
|
|
51
|
-
endedAt: string | null;
|
|
52
|
-
/**
|
|
53
|
-
* Your own id for it, if one was given.
|
|
54
|
-
*/
|
|
55
|
-
externalId: string | null;
|
|
56
|
-
/**
|
|
57
|
-
* `voice` or `chat`. A voice conversation is recorded as a call
|
|
58
|
-
* (`/v1/call/{callId}`), a chat as a chat (`/v1/chat/{id}`).
|
|
59
|
-
*/
|
|
60
|
-
modality: 'voice' | 'chat';
|
|
61
|
-
projectId: string;
|
|
62
|
-
/**
|
|
63
|
-
* When it started, or was created while pending (ISO 8601).
|
|
64
|
-
*/
|
|
65
|
-
startedAt: string;
|
|
66
|
-
/**
|
|
67
|
-
* `PENDING` until it starts (a call ringing, a chat nobody has joined yet),
|
|
68
|
-
* `IN_PROGRESS`, then `ENDED`.
|
|
69
|
-
*/
|
|
70
|
-
status: 'PENDING' | 'IN_PROGRESS' | 'ENDED';
|
|
71
|
-
summary: string | null;
|
|
72
|
-
title: string | null;
|
|
73
|
-
}
|
|
74
|
-
interface Pagination {
|
|
75
|
-
/**
|
|
76
|
-
* Whether there are more items to fetch
|
|
77
|
-
*/
|
|
78
|
-
hasMore: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Cursor for the next page of items
|
|
81
|
-
*/
|
|
82
|
-
nextCursor: string | null;
|
|
83
|
-
/**
|
|
84
|
-
* Total number of items
|
|
85
|
-
*/
|
|
86
|
-
total: number;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
22
|
export interface ConversationGetByIDResponse {
|
|
90
23
|
data: ConversationGetByIDResponse.Data;
|
|
91
24
|
}
|
|
@@ -128,29 +61,7 @@ export declare namespace ConversationGetByIDResponse {
|
|
|
128
61
|
title: string | null;
|
|
129
62
|
}
|
|
130
63
|
}
|
|
131
|
-
export interface ConversationListParams {
|
|
132
|
-
/**
|
|
133
|
-
* The `nextCursor` of the previous page.
|
|
134
|
-
*/
|
|
135
|
-
after?: string;
|
|
136
|
-
/**
|
|
137
|
-
* How many to return (default 20, max 100).
|
|
138
|
-
*/
|
|
139
|
-
limit?: number;
|
|
140
|
-
/**
|
|
141
|
-
* Only `voice`, or only `chat`. Both by default.
|
|
142
|
-
*/
|
|
143
|
-
modality?: 'voice' | 'chat' | 'call';
|
|
144
|
-
/**
|
|
145
|
-
* Only conversations that started at or after this time.
|
|
146
|
-
*/
|
|
147
|
-
startedFrom?: string;
|
|
148
|
-
/**
|
|
149
|
-
* Only conversations that started at or before this time.
|
|
150
|
-
*/
|
|
151
|
-
startedTo?: string;
|
|
152
|
-
}
|
|
153
64
|
export declare namespace Conversation {
|
|
154
|
-
export { type
|
|
65
|
+
export { type ConversationGetByIDResponse as ConversationGetByIDResponse };
|
|
155
66
|
}
|
|
156
67
|
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;CAGnG;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,2BAA2B,CAAC,IAAI,CAAC;CACxC;AAED,yBAAiB,2BAA2B,CAAC;IAC3C,UAAiB,IAAI;QACnB;;;WAGG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;WAEG;QACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;;WAGG;QACH,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;QAE3B,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,OAAO,CAAC;QAE5C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAC5E"}
|
|
@@ -6,24 +6,12 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
const path_1 = require("../internal/utils/path.js");
|
|
7
7
|
class Conversation extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* both.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const conversations = await client.conversation.list();
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
list(query = {}, options) {
|
|
20
|
-
return this._client.get('/v1/conversation', { query, ...options });
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* A call or chat by its id, whichever it is. One started through
|
|
9
|
+
* Fetches one conversation by its id, whether it is a call or a chat. The same
|
|
10
|
+
* endpoint reads both modalities, and `modality` in the response says which one it
|
|
11
|
+
* is, so you do not need to know it up front. A conversation started with
|
|
24
12
|
* `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
|
|
25
|
-
* created, before it is recorded. For its transcript and
|
|
26
|
-
* call or chat
|
|
13
|
+
* created, before it is recorded as a call or chat. For its transcript and
|
|
14
|
+
* metrics, use the call or chat endpoints that match its `modality`.
|
|
27
15
|
*
|
|
28
16
|
* @example
|
|
29
17
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,YAAa,SAAQ,sBAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,cAAsB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF;AAnBD,oCAmBC"}
|
|
@@ -3,24 +3,12 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
import { path } from "../internal/utils/path.mjs";
|
|
4
4
|
export class Conversation extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* both.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const conversations = await client.conversation.list();
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
list(query = {}, options) {
|
|
17
|
-
return this._client.get('/v1/conversation', { query, ...options });
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* A call or chat by its id, whichever it is. One started through
|
|
6
|
+
* Fetches one conversation by its id, whether it is a call or a chat. The same
|
|
7
|
+
* endpoint reads both modalities, and `modality` in the response says which one it
|
|
8
|
+
* is, so you do not need to know it up front. A conversation started with
|
|
21
9
|
* `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
|
|
22
|
-
* created, before it is recorded. For its transcript and
|
|
23
|
-
* call or chat
|
|
10
|
+
* created, before it is recorded as a call or chat. For its transcript and
|
|
11
|
+
* metrics, use the call or chat endpoints that match its `modality`.
|
|
24
12
|
*
|
|
25
13
|
* @example
|
|
26
14
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.mjs","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"conversation.mjs","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,cAAsB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF"}
|