@roarkanalytics/sdk 7.8.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.
- package/CHANGELOG.md +28 -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 +18 -3
- package/client.js.map +1 -1
- package/client.mjs +18 -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 -98
- package/resources/customer.d.mts.map +1 -0
- package/resources/{customer-profile.d.ts → customer.d.ts} +287 -98
- 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 +197 -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 -306
- 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,205 @@
|
|
|
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 Conversation extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Calls and chats in the project as one list, most recent start first. A
|
|
11
|
+
* conversation is listed once it is recorded: a call when it connects, a chat when
|
|
12
|
+
* it ends. Listing calls needs `call:read`, chats `chat:read`, and both kinds
|
|
13
|
+
* both.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const conversations = await client.conversation.list();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
list(
|
|
21
|
+
query: ConversationListParams | null | undefined = {},
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): APIPromise<ConversationListResponse> {
|
|
24
|
+
return this._client.get('/v1/conversation', { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A call or chat by its id, whichever it is. One started through
|
|
29
|
+
* `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
|
|
30
|
+
* created, before it is recorded. For its transcript and metrics, read it as a
|
|
31
|
+
* call or chat, as `modality` says.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.conversation.getByID(
|
|
36
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
getByID(conversationID: string, options?: RequestOptions): APIPromise<ConversationGetByIDResponse> {
|
|
41
|
+
return this._client.get(path`/v1/conversation/${conversationID}`, options);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ConversationListResponse {
|
|
46
|
+
data: Array<ConversationListResponse.Data>;
|
|
47
|
+
|
|
48
|
+
pagination: ConversationListResponse.Pagination;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export namespace ConversationListResponse {
|
|
52
|
+
export interface Data {
|
|
53
|
+
/**
|
|
54
|
+
* The conversation id: its call id or chat id. `modality` says which, and where to
|
|
55
|
+
* read its transcript and metrics (`/v1/call/{callId}` or `/v1/chat/{id}`).
|
|
56
|
+
*/
|
|
57
|
+
id: string;
|
|
58
|
+
|
|
59
|
+
createdAt: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* How long it ran. Null until it ends.
|
|
63
|
+
*/
|
|
64
|
+
durationMs: number | null;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* When it ended (ISO 8601). Null until it ends.
|
|
68
|
+
*/
|
|
69
|
+
endedAt: string | null;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Your own id for it, if one was given.
|
|
73
|
+
*/
|
|
74
|
+
externalId: string | null;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* `voice` or `chat`. A voice conversation is recorded as a call
|
|
78
|
+
* (`/v1/call/{callId}`), a chat as a chat (`/v1/chat/{id}`).
|
|
79
|
+
*/
|
|
80
|
+
modality: 'voice' | 'chat';
|
|
81
|
+
|
|
82
|
+
projectId: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* When it started, or was created while pending (ISO 8601).
|
|
86
|
+
*/
|
|
87
|
+
startedAt: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* `PENDING` until it starts (a call ringing, a chat nobody has joined yet),
|
|
91
|
+
* `IN_PROGRESS`, then `ENDED`.
|
|
92
|
+
*/
|
|
93
|
+
status: 'PENDING' | 'IN_PROGRESS' | 'ENDED';
|
|
94
|
+
|
|
95
|
+
summary: string | null;
|
|
96
|
+
|
|
97
|
+
title: string | null;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface Pagination {
|
|
101
|
+
/**
|
|
102
|
+
* Whether there are more items to fetch
|
|
103
|
+
*/
|
|
104
|
+
hasMore: boolean;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Cursor for the next page of items
|
|
108
|
+
*/
|
|
109
|
+
nextCursor: string | null;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Total number of items
|
|
113
|
+
*/
|
|
114
|
+
total: number;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface ConversationGetByIDResponse {
|
|
119
|
+
data: ConversationGetByIDResponse.Data;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export namespace ConversationGetByIDResponse {
|
|
123
|
+
export interface Data {
|
|
124
|
+
/**
|
|
125
|
+
* The conversation id: its call id or chat id. `modality` says which, and where to
|
|
126
|
+
* read its transcript and metrics (`/v1/call/{callId}` or `/v1/chat/{id}`).
|
|
127
|
+
*/
|
|
128
|
+
id: string;
|
|
129
|
+
|
|
130
|
+
createdAt: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* How long it ran. Null until it ends.
|
|
134
|
+
*/
|
|
135
|
+
durationMs: number | null;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* When it ended (ISO 8601). Null until it ends.
|
|
139
|
+
*/
|
|
140
|
+
endedAt: string | null;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Your own id for it, if one was given.
|
|
144
|
+
*/
|
|
145
|
+
externalId: string | null;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* `voice` or `chat`. A voice conversation is recorded as a call
|
|
149
|
+
* (`/v1/call/{callId}`), a chat as a chat (`/v1/chat/{id}`).
|
|
150
|
+
*/
|
|
151
|
+
modality: 'voice' | 'chat';
|
|
152
|
+
|
|
153
|
+
projectId: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* When it started, or was created while pending (ISO 8601).
|
|
157
|
+
*/
|
|
158
|
+
startedAt: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* `PENDING` until it starts (a call ringing, a chat nobody has joined yet),
|
|
162
|
+
* `IN_PROGRESS`, then `ENDED`.
|
|
163
|
+
*/
|
|
164
|
+
status: 'PENDING' | 'IN_PROGRESS' | 'ENDED';
|
|
165
|
+
|
|
166
|
+
summary: string | null;
|
|
167
|
+
|
|
168
|
+
title: string | null;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface ConversationListParams {
|
|
173
|
+
/**
|
|
174
|
+
* The `nextCursor` of the previous page.
|
|
175
|
+
*/
|
|
176
|
+
after?: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* How many to return (default 20, max 100).
|
|
180
|
+
*/
|
|
181
|
+
limit?: number;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Only `voice`, or only `chat`. Both by default.
|
|
185
|
+
*/
|
|
186
|
+
modality?: 'voice' | 'chat' | 'call';
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Only conversations that started at or after this time.
|
|
190
|
+
*/
|
|
191
|
+
startedFrom?: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Only conversations that started at or before this time.
|
|
195
|
+
*/
|
|
196
|
+
startedTo?: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export declare namespace Conversation {
|
|
200
|
+
export {
|
|
201
|
+
type ConversationListResponse as ConversationListResponse,
|
|
202
|
+
type ConversationGetByIDResponse as ConversationGetByIDResponse,
|
|
203
|
+
type ConversationListParams as ConversationListParams,
|
|
204
|
+
};
|
|
205
|
+
}
|