@studyfetch/sdk 1.33.0 → 1.35.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 +35 -0
- package/README.md +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +4 -5
- package/resources/v1/assignment-grader/assignment-grader.d.mts +313 -0
- package/resources/v1/assignment-grader/assignment-grader.d.mts.map +1 -0
- package/resources/v1/assignment-grader/assignment-grader.d.ts +313 -0
- package/resources/v1/assignment-grader/assignment-grader.d.ts.map +1 -0
- package/resources/v1/assignment-grader/assignment-grader.js +87 -0
- package/resources/v1/assignment-grader/assignment-grader.js.map +1 -0
- package/resources/v1/assignment-grader/assignment-grader.mjs +82 -0
- package/resources/v1/assignment-grader/assignment-grader.mjs.map +1 -0
- package/resources/v1/assignment-grader/index.d.mts +3 -0
- package/resources/v1/assignment-grader/index.d.mts.map +1 -0
- package/resources/v1/assignment-grader/index.d.ts +3 -0
- package/resources/v1/assignment-grader/index.d.ts.map +1 -0
- package/resources/v1/assignment-grader/index.js +9 -0
- package/resources/v1/assignment-grader/index.js.map +1 -0
- package/resources/v1/assignment-grader/index.mjs +4 -0
- package/resources/v1/assignment-grader/index.mjs.map +1 -0
- package/resources/v1/assignment-grader/rubric-templates.d.mts +238 -0
- package/resources/v1/assignment-grader/rubric-templates.d.mts.map +1 -0
- package/resources/v1/assignment-grader/rubric-templates.d.ts +238 -0
- package/resources/v1/assignment-grader/rubric-templates.d.ts.map +1 -0
- package/resources/v1/assignment-grader/rubric-templates.js +68 -0
- package/resources/v1/assignment-grader/rubric-templates.js.map +1 -0
- package/resources/v1/assignment-grader/rubric-templates.mjs +64 -0
- package/resources/v1/assignment-grader/rubric-templates.mjs.map +1 -0
- package/resources/v1/assignment-grader.d.mts +1 -152
- package/resources/v1/assignment-grader.d.mts.map +1 -1
- package/resources/v1/assignment-grader.d.ts +1 -152
- package/resources/v1/assignment-grader.d.ts.map +1 -1
- package/resources/v1/assignment-grader.js +2 -62
- package/resources/v1/assignment-grader.js.map +1 -1
- package/resources/v1/assignment-grader.mjs +1 -60
- package/resources/v1/assignment-grader.mjs.map +1 -1
- package/resources/v1/chat-analytics.d.mts +316 -0
- package/resources/v1/chat-analytics.d.mts.map +1 -0
- package/resources/v1/chat-analytics.d.ts +316 -0
- package/resources/v1/chat-analytics.d.ts.map +1 -0
- package/resources/v1/chat-analytics.js +50 -0
- package/resources/v1/chat-analytics.js.map +1 -0
- package/resources/v1/chat-analytics.mjs +46 -0
- package/resources/v1/chat-analytics.mjs.map +1 -0
- package/resources/v1/components.d.mts +184 -10
- package/resources/v1/components.d.mts.map +1 -1
- package/resources/v1/components.d.ts +184 -10
- package/resources/v1/components.d.ts.map +1 -1
- package/resources/v1/components.js.map +1 -1
- package/resources/v1/components.mjs.map +1 -1
- package/resources/v1/folders.d.mts +528 -21
- package/resources/v1/folders.d.mts.map +1 -1
- package/resources/v1/folders.d.ts +528 -21
- package/resources/v1/folders.d.ts.map +1 -1
- package/resources/v1/folders.js +25 -39
- package/resources/v1/folders.js.map +1 -1
- package/resources/v1/folders.mjs +25 -39
- package/resources/v1/folders.mjs.map +1 -1
- package/resources/v1/index.d.mts +7 -5
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +7 -5
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +13 -9
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +5 -3
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/materials/index.d.mts +3 -3
- package/resources/v1/materials/index.d.mts.map +1 -1
- package/resources/v1/materials/index.d.ts +3 -3
- package/resources/v1/materials/index.d.ts.map +1 -1
- package/resources/v1/materials/index.js.map +1 -1
- package/resources/v1/materials/index.mjs.map +1 -1
- package/resources/v1/materials/materials.d.mts +548 -92
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +548 -92
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +36 -34
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +36 -34
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/test.d.mts +29 -30
- package/resources/v1/materials/test.d.mts.map +1 -1
- package/resources/v1/materials/test.d.ts +29 -30
- package/resources/v1/materials/test.d.ts.map +1 -1
- package/resources/v1/materials/test.js +14 -15
- package/resources/v1/materials/test.js.map +1 -1
- package/resources/v1/materials/test.mjs +14 -15
- package/resources/v1/materials/test.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +312 -23
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +312 -23
- package/resources/v1/materials/upload.d.ts.map +1 -1
- package/resources/v1/materials/upload.js +9 -9
- package/resources/v1/materials/upload.js.map +1 -1
- package/resources/v1/materials/upload.mjs +9 -9
- package/resources/v1/materials/upload.mjs.map +1 -1
- package/resources/v1/usage-analyst.d.mts +99 -0
- package/resources/v1/usage-analyst.d.mts.map +1 -0
- package/resources/v1/usage-analyst.d.ts +99 -0
- package/resources/v1/usage-analyst.d.ts.map +1 -0
- package/resources/v1/{usage/analyst.js → usage-analyst.js} +9 -9
- package/resources/v1/usage-analyst.js.map +1 -0
- package/resources/v1/{usage/analyst.mjs → usage-analyst.mjs} +7 -7
- package/resources/v1/usage-analyst.mjs.map +1 -0
- package/resources/v1/usage.d.mts +109 -1
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +109 -1
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +55 -2
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +53 -1
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +20 -12
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +20 -12
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +14 -6
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +15 -7
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/v1/assignment-grader/assignment-grader.ts +421 -0
- package/src/resources/v1/assignment-grader/index.ts +16 -0
- package/src/resources/v1/assignment-grader/rubric-templates.ts +305 -0
- package/src/resources/v1/assignment-grader.ts +1 -196
- package/src/resources/v1/chat-analytics.ts +413 -0
- package/src/resources/v1/components.ts +265 -10
- package/src/resources/v1/folders.ts +659 -51
- package/src/resources/v1/index.ts +48 -11
- package/src/resources/v1/materials/index.ts +23 -14
- package/src/resources/v1/materials/materials.ts +824 -216
- package/src/resources/v1/materials/test.ts +38 -39
- package/src/resources/v1/materials/upload.ts +411 -30
- package/src/resources/v1/{usage/analyst.ts → usage-analyst.ts} +24 -23
- package/src/resources/v1/usage.ts +179 -1
- package/src/resources/v1/v1.ts +106 -29
- 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/v1/usage/analyst.d.mts +0 -99
- package/resources/v1/usage/analyst.d.mts.map +0 -1
- package/resources/v1/usage/analyst.d.ts +0 -99
- package/resources/v1/usage/analyst.d.ts.map +0 -1
- package/resources/v1/usage/analyst.js.map +0 -1
- package/resources/v1/usage/analyst.mjs.map +0 -1
- package/resources/v1/usage/index.d.mts +0 -3
- package/resources/v1/usage/index.d.mts.map +0 -1
- package/resources/v1/usage/index.d.ts +0 -3
- package/resources/v1/usage/index.d.ts.map +0 -1
- package/resources/v1/usage/index.js +0 -9
- package/resources/v1/usage/index.js.map +0 -1
- package/resources/v1/usage/index.mjs +0 -4
- package/resources/v1/usage/index.mjs.map +0 -1
- package/resources/v1/usage/usage.d.mts +0 -114
- package/resources/v1/usage/usage.d.mts.map +0 -1
- package/resources/v1/usage/usage.d.ts +0 -114
- package/resources/v1/usage/usage.d.ts.map +0 -1
- package/resources/v1/usage/usage.js +0 -67
- package/resources/v1/usage/usage.js.map +0 -1
- package/resources/v1/usage/usage.mjs +0 -62
- package/resources/v1/usage/usage.mjs.map +0 -1
- package/src/resources/v1/usage/index.ts +0 -15
- package/src/resources/v1/usage/usage.ts +0 -200
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { type Uploadable } from "../../core/uploads.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
export declare class ChatAnalytics extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get chat analytics and user statistics
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const response = await client.v1.chatAnalytics.analyze();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
analyze(query?: ChatAnalyticAnalyzeParams | null | undefined, options?: RequestOptions): APIPromise<ChatAnalyticAnalyzeResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Export chat analytics data as CSV
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const response = await client.v1.chatAnalytics.export();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export(query?: ChatAnalyticExportParams | null | undefined, options?: RequestOptions): APIPromise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Get chat analytics for a specific component
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.v1.chatAnalytics.getComponent(
|
|
30
|
+
* 'componentId',
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
getComponent(componentID: string, query?: ChatAnalyticGetComponentParams | null | undefined, options?: RequestOptions): APIPromise<ChatAnalyticGetComponentResponse>;
|
|
35
|
+
}
|
|
36
|
+
export interface ChatAnalyticAnalyzeResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Date when analytics were generated
|
|
39
|
+
*/
|
|
40
|
+
generatedAt: string;
|
|
41
|
+
/**
|
|
42
|
+
* Analytics summary
|
|
43
|
+
*/
|
|
44
|
+
summary: ChatAnalyticAnalyzeResponse.Summary;
|
|
45
|
+
/**
|
|
46
|
+
* User statistics
|
|
47
|
+
*/
|
|
48
|
+
userStats: Array<ChatAnalyticAnalyzeResponse.UserStat>;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace ChatAnalyticAnalyzeResponse {
|
|
51
|
+
/**
|
|
52
|
+
* Analytics summary
|
|
53
|
+
*/
|
|
54
|
+
interface Summary {
|
|
55
|
+
/**
|
|
56
|
+
* Average messages per user
|
|
57
|
+
*/
|
|
58
|
+
averageMessagesPerUser: number;
|
|
59
|
+
/**
|
|
60
|
+
* Engagement metrics
|
|
61
|
+
*/
|
|
62
|
+
engagement: unknown;
|
|
63
|
+
/**
|
|
64
|
+
* Natural language summary of chat usage
|
|
65
|
+
*/
|
|
66
|
+
summary: string;
|
|
67
|
+
/**
|
|
68
|
+
* Top topics discussed
|
|
69
|
+
*/
|
|
70
|
+
topTopics: Array<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Total messages
|
|
73
|
+
*/
|
|
74
|
+
totalMessages: number;
|
|
75
|
+
/**
|
|
76
|
+
* Total chat sessions
|
|
77
|
+
*/
|
|
78
|
+
totalSessions: number;
|
|
79
|
+
/**
|
|
80
|
+
* Total unique users
|
|
81
|
+
*/
|
|
82
|
+
totalUsers: number;
|
|
83
|
+
}
|
|
84
|
+
interface UserStat {
|
|
85
|
+
/**
|
|
86
|
+
* Average messages per session
|
|
87
|
+
*/
|
|
88
|
+
averageMessagesPerSession: number;
|
|
89
|
+
/**
|
|
90
|
+
* Average session duration in minutes
|
|
91
|
+
*/
|
|
92
|
+
averageSessionDuration: number;
|
|
93
|
+
/**
|
|
94
|
+
* First active date
|
|
95
|
+
*/
|
|
96
|
+
firstActive: string;
|
|
97
|
+
/**
|
|
98
|
+
* Last active date
|
|
99
|
+
*/
|
|
100
|
+
lastActive: string;
|
|
101
|
+
/**
|
|
102
|
+
* Top topics discussed
|
|
103
|
+
*/
|
|
104
|
+
topTopics: Array<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Total messages sent by user
|
|
107
|
+
*/
|
|
108
|
+
totalMessages: number;
|
|
109
|
+
/**
|
|
110
|
+
* Total chat sessions
|
|
111
|
+
*/
|
|
112
|
+
totalSessions: number;
|
|
113
|
+
/**
|
|
114
|
+
* User ID
|
|
115
|
+
*/
|
|
116
|
+
userId: string;
|
|
117
|
+
/**
|
|
118
|
+
* User email
|
|
119
|
+
*/
|
|
120
|
+
email?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Group IDs associated with the user
|
|
123
|
+
*/
|
|
124
|
+
groupIds?: Array<string>;
|
|
125
|
+
/**
|
|
126
|
+
* User name
|
|
127
|
+
*/
|
|
128
|
+
name?: string;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
export type ChatAnalyticExportResponse = Uploadable;
|
|
132
|
+
export interface ChatAnalyticGetComponentResponse {
|
|
133
|
+
/**
|
|
134
|
+
* Date when analytics were generated
|
|
135
|
+
*/
|
|
136
|
+
generatedAt: string;
|
|
137
|
+
/**
|
|
138
|
+
* Analytics summary
|
|
139
|
+
*/
|
|
140
|
+
summary: ChatAnalyticGetComponentResponse.Summary;
|
|
141
|
+
/**
|
|
142
|
+
* User statistics
|
|
143
|
+
*/
|
|
144
|
+
userStats: Array<ChatAnalyticGetComponentResponse.UserStat>;
|
|
145
|
+
}
|
|
146
|
+
export declare namespace ChatAnalyticGetComponentResponse {
|
|
147
|
+
/**
|
|
148
|
+
* Analytics summary
|
|
149
|
+
*/
|
|
150
|
+
interface Summary {
|
|
151
|
+
/**
|
|
152
|
+
* Average messages per user
|
|
153
|
+
*/
|
|
154
|
+
averageMessagesPerUser: number;
|
|
155
|
+
/**
|
|
156
|
+
* Engagement metrics
|
|
157
|
+
*/
|
|
158
|
+
engagement: unknown;
|
|
159
|
+
/**
|
|
160
|
+
* Natural language summary of chat usage
|
|
161
|
+
*/
|
|
162
|
+
summary: string;
|
|
163
|
+
/**
|
|
164
|
+
* Top topics discussed
|
|
165
|
+
*/
|
|
166
|
+
topTopics: Array<string>;
|
|
167
|
+
/**
|
|
168
|
+
* Total messages
|
|
169
|
+
*/
|
|
170
|
+
totalMessages: number;
|
|
171
|
+
/**
|
|
172
|
+
* Total chat sessions
|
|
173
|
+
*/
|
|
174
|
+
totalSessions: number;
|
|
175
|
+
/**
|
|
176
|
+
* Total unique users
|
|
177
|
+
*/
|
|
178
|
+
totalUsers: number;
|
|
179
|
+
}
|
|
180
|
+
interface UserStat {
|
|
181
|
+
/**
|
|
182
|
+
* Average messages per session
|
|
183
|
+
*/
|
|
184
|
+
averageMessagesPerSession: number;
|
|
185
|
+
/**
|
|
186
|
+
* Average session duration in minutes
|
|
187
|
+
*/
|
|
188
|
+
averageSessionDuration: number;
|
|
189
|
+
/**
|
|
190
|
+
* First active date
|
|
191
|
+
*/
|
|
192
|
+
firstActive: string;
|
|
193
|
+
/**
|
|
194
|
+
* Last active date
|
|
195
|
+
*/
|
|
196
|
+
lastActive: string;
|
|
197
|
+
/**
|
|
198
|
+
* Top topics discussed
|
|
199
|
+
*/
|
|
200
|
+
topTopics: Array<string>;
|
|
201
|
+
/**
|
|
202
|
+
* Total messages sent by user
|
|
203
|
+
*/
|
|
204
|
+
totalMessages: number;
|
|
205
|
+
/**
|
|
206
|
+
* Total chat sessions
|
|
207
|
+
*/
|
|
208
|
+
totalSessions: number;
|
|
209
|
+
/**
|
|
210
|
+
* User ID
|
|
211
|
+
*/
|
|
212
|
+
userId: string;
|
|
213
|
+
/**
|
|
214
|
+
* User email
|
|
215
|
+
*/
|
|
216
|
+
email?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Group IDs associated with the user
|
|
219
|
+
*/
|
|
220
|
+
groupIds?: Array<string>;
|
|
221
|
+
/**
|
|
222
|
+
* User name
|
|
223
|
+
*/
|
|
224
|
+
name?: string;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
export interface ChatAnalyticAnalyzeParams {
|
|
228
|
+
/**
|
|
229
|
+
* Component ID to analyze
|
|
230
|
+
*/
|
|
231
|
+
componentId?: string;
|
|
232
|
+
/**
|
|
233
|
+
* End date for analysis
|
|
234
|
+
*/
|
|
235
|
+
endDate?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Group IDs to filter by
|
|
238
|
+
*/
|
|
239
|
+
groupIds?: Array<string>;
|
|
240
|
+
/**
|
|
241
|
+
* AI model to use for analysis
|
|
242
|
+
*/
|
|
243
|
+
modelKey?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Organization ID to filter by
|
|
246
|
+
*/
|
|
247
|
+
organizationId?: string;
|
|
248
|
+
/**
|
|
249
|
+
* Start date for analysis
|
|
250
|
+
*/
|
|
251
|
+
startDate?: string;
|
|
252
|
+
/**
|
|
253
|
+
* User ID to filter by
|
|
254
|
+
*/
|
|
255
|
+
userId?: string;
|
|
256
|
+
}
|
|
257
|
+
export interface ChatAnalyticExportParams {
|
|
258
|
+
/**
|
|
259
|
+
* Component ID to analyze
|
|
260
|
+
*/
|
|
261
|
+
componentId?: string;
|
|
262
|
+
/**
|
|
263
|
+
* End date for analysis
|
|
264
|
+
*/
|
|
265
|
+
endDate?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Group IDs to filter by
|
|
268
|
+
*/
|
|
269
|
+
groupIds?: Array<string>;
|
|
270
|
+
/**
|
|
271
|
+
* AI model to use for analysis
|
|
272
|
+
*/
|
|
273
|
+
modelKey?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Organization ID to filter by
|
|
276
|
+
*/
|
|
277
|
+
organizationId?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Start date for analysis
|
|
280
|
+
*/
|
|
281
|
+
startDate?: string;
|
|
282
|
+
/**
|
|
283
|
+
* User ID to filter by
|
|
284
|
+
*/
|
|
285
|
+
userId?: string;
|
|
286
|
+
}
|
|
287
|
+
export interface ChatAnalyticGetComponentParams {
|
|
288
|
+
/**
|
|
289
|
+
* End date for analysis
|
|
290
|
+
*/
|
|
291
|
+
endDate?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Group IDs to filter by
|
|
294
|
+
*/
|
|
295
|
+
groupIds?: Array<string>;
|
|
296
|
+
/**
|
|
297
|
+
* AI model to use for analysis
|
|
298
|
+
*/
|
|
299
|
+
modelKey?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Organization ID to filter by
|
|
302
|
+
*/
|
|
303
|
+
organizationId?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Start date for analysis
|
|
306
|
+
*/
|
|
307
|
+
startDate?: string;
|
|
308
|
+
/**
|
|
309
|
+
* User ID to filter by
|
|
310
|
+
*/
|
|
311
|
+
userId?: string;
|
|
312
|
+
}
|
|
313
|
+
export declare namespace ChatAnalytics {
|
|
314
|
+
export { type ChatAnalyticAnalyzeResponse as ChatAnalyticAnalyzeResponse, type ChatAnalyticExportResponse as ChatAnalyticExportResponse, type ChatAnalyticGetComponentResponse as ChatAnalyticGetComponentResponse, type ChatAnalyticAnalyzeParams as ChatAnalyticAnalyzeParams, type ChatAnalyticExportParams as ChatAnalyticExportParams, type ChatAnalyticGetComponentParams as ChatAnalyticGetComponentParams, };
|
|
315
|
+
}
|
|
316
|
+
//# sourceMappingURL=chat-analytics.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-analytics.d.mts","sourceRoot":"","sources":["../../src/resources/v1/chat-analytics.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;OAOG;IACH,OAAO,CACL,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EAC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AAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { type Uploadable } from "../../core/uploads.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
+
export declare class ChatAnalytics extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get chat analytics and user statistics
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const response = await client.v1.chatAnalytics.analyze();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
analyze(query?: ChatAnalyticAnalyzeParams | null | undefined, options?: RequestOptions): APIPromise<ChatAnalyticAnalyzeResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Export chat analytics data as CSV
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const response = await client.v1.chatAnalytics.export();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export(query?: ChatAnalyticExportParams | null | undefined, options?: RequestOptions): APIPromise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Get chat analytics for a specific component
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.v1.chatAnalytics.getComponent(
|
|
30
|
+
* 'componentId',
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
getComponent(componentID: string, query?: ChatAnalyticGetComponentParams | null | undefined, options?: RequestOptions): APIPromise<ChatAnalyticGetComponentResponse>;
|
|
35
|
+
}
|
|
36
|
+
export interface ChatAnalyticAnalyzeResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Date when analytics were generated
|
|
39
|
+
*/
|
|
40
|
+
generatedAt: string;
|
|
41
|
+
/**
|
|
42
|
+
* Analytics summary
|
|
43
|
+
*/
|
|
44
|
+
summary: ChatAnalyticAnalyzeResponse.Summary;
|
|
45
|
+
/**
|
|
46
|
+
* User statistics
|
|
47
|
+
*/
|
|
48
|
+
userStats: Array<ChatAnalyticAnalyzeResponse.UserStat>;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace ChatAnalyticAnalyzeResponse {
|
|
51
|
+
/**
|
|
52
|
+
* Analytics summary
|
|
53
|
+
*/
|
|
54
|
+
interface Summary {
|
|
55
|
+
/**
|
|
56
|
+
* Average messages per user
|
|
57
|
+
*/
|
|
58
|
+
averageMessagesPerUser: number;
|
|
59
|
+
/**
|
|
60
|
+
* Engagement metrics
|
|
61
|
+
*/
|
|
62
|
+
engagement: unknown;
|
|
63
|
+
/**
|
|
64
|
+
* Natural language summary of chat usage
|
|
65
|
+
*/
|
|
66
|
+
summary: string;
|
|
67
|
+
/**
|
|
68
|
+
* Top topics discussed
|
|
69
|
+
*/
|
|
70
|
+
topTopics: Array<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Total messages
|
|
73
|
+
*/
|
|
74
|
+
totalMessages: number;
|
|
75
|
+
/**
|
|
76
|
+
* Total chat sessions
|
|
77
|
+
*/
|
|
78
|
+
totalSessions: number;
|
|
79
|
+
/**
|
|
80
|
+
* Total unique users
|
|
81
|
+
*/
|
|
82
|
+
totalUsers: number;
|
|
83
|
+
}
|
|
84
|
+
interface UserStat {
|
|
85
|
+
/**
|
|
86
|
+
* Average messages per session
|
|
87
|
+
*/
|
|
88
|
+
averageMessagesPerSession: number;
|
|
89
|
+
/**
|
|
90
|
+
* Average session duration in minutes
|
|
91
|
+
*/
|
|
92
|
+
averageSessionDuration: number;
|
|
93
|
+
/**
|
|
94
|
+
* First active date
|
|
95
|
+
*/
|
|
96
|
+
firstActive: string;
|
|
97
|
+
/**
|
|
98
|
+
* Last active date
|
|
99
|
+
*/
|
|
100
|
+
lastActive: string;
|
|
101
|
+
/**
|
|
102
|
+
* Top topics discussed
|
|
103
|
+
*/
|
|
104
|
+
topTopics: Array<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Total messages sent by user
|
|
107
|
+
*/
|
|
108
|
+
totalMessages: number;
|
|
109
|
+
/**
|
|
110
|
+
* Total chat sessions
|
|
111
|
+
*/
|
|
112
|
+
totalSessions: number;
|
|
113
|
+
/**
|
|
114
|
+
* User ID
|
|
115
|
+
*/
|
|
116
|
+
userId: string;
|
|
117
|
+
/**
|
|
118
|
+
* User email
|
|
119
|
+
*/
|
|
120
|
+
email?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Group IDs associated with the user
|
|
123
|
+
*/
|
|
124
|
+
groupIds?: Array<string>;
|
|
125
|
+
/**
|
|
126
|
+
* User name
|
|
127
|
+
*/
|
|
128
|
+
name?: string;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
export type ChatAnalyticExportResponse = Uploadable;
|
|
132
|
+
export interface ChatAnalyticGetComponentResponse {
|
|
133
|
+
/**
|
|
134
|
+
* Date when analytics were generated
|
|
135
|
+
*/
|
|
136
|
+
generatedAt: string;
|
|
137
|
+
/**
|
|
138
|
+
* Analytics summary
|
|
139
|
+
*/
|
|
140
|
+
summary: ChatAnalyticGetComponentResponse.Summary;
|
|
141
|
+
/**
|
|
142
|
+
* User statistics
|
|
143
|
+
*/
|
|
144
|
+
userStats: Array<ChatAnalyticGetComponentResponse.UserStat>;
|
|
145
|
+
}
|
|
146
|
+
export declare namespace ChatAnalyticGetComponentResponse {
|
|
147
|
+
/**
|
|
148
|
+
* Analytics summary
|
|
149
|
+
*/
|
|
150
|
+
interface Summary {
|
|
151
|
+
/**
|
|
152
|
+
* Average messages per user
|
|
153
|
+
*/
|
|
154
|
+
averageMessagesPerUser: number;
|
|
155
|
+
/**
|
|
156
|
+
* Engagement metrics
|
|
157
|
+
*/
|
|
158
|
+
engagement: unknown;
|
|
159
|
+
/**
|
|
160
|
+
* Natural language summary of chat usage
|
|
161
|
+
*/
|
|
162
|
+
summary: string;
|
|
163
|
+
/**
|
|
164
|
+
* Top topics discussed
|
|
165
|
+
*/
|
|
166
|
+
topTopics: Array<string>;
|
|
167
|
+
/**
|
|
168
|
+
* Total messages
|
|
169
|
+
*/
|
|
170
|
+
totalMessages: number;
|
|
171
|
+
/**
|
|
172
|
+
* Total chat sessions
|
|
173
|
+
*/
|
|
174
|
+
totalSessions: number;
|
|
175
|
+
/**
|
|
176
|
+
* Total unique users
|
|
177
|
+
*/
|
|
178
|
+
totalUsers: number;
|
|
179
|
+
}
|
|
180
|
+
interface UserStat {
|
|
181
|
+
/**
|
|
182
|
+
* Average messages per session
|
|
183
|
+
*/
|
|
184
|
+
averageMessagesPerSession: number;
|
|
185
|
+
/**
|
|
186
|
+
* Average session duration in minutes
|
|
187
|
+
*/
|
|
188
|
+
averageSessionDuration: number;
|
|
189
|
+
/**
|
|
190
|
+
* First active date
|
|
191
|
+
*/
|
|
192
|
+
firstActive: string;
|
|
193
|
+
/**
|
|
194
|
+
* Last active date
|
|
195
|
+
*/
|
|
196
|
+
lastActive: string;
|
|
197
|
+
/**
|
|
198
|
+
* Top topics discussed
|
|
199
|
+
*/
|
|
200
|
+
topTopics: Array<string>;
|
|
201
|
+
/**
|
|
202
|
+
* Total messages sent by user
|
|
203
|
+
*/
|
|
204
|
+
totalMessages: number;
|
|
205
|
+
/**
|
|
206
|
+
* Total chat sessions
|
|
207
|
+
*/
|
|
208
|
+
totalSessions: number;
|
|
209
|
+
/**
|
|
210
|
+
* User ID
|
|
211
|
+
*/
|
|
212
|
+
userId: string;
|
|
213
|
+
/**
|
|
214
|
+
* User email
|
|
215
|
+
*/
|
|
216
|
+
email?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Group IDs associated with the user
|
|
219
|
+
*/
|
|
220
|
+
groupIds?: Array<string>;
|
|
221
|
+
/**
|
|
222
|
+
* User name
|
|
223
|
+
*/
|
|
224
|
+
name?: string;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
export interface ChatAnalyticAnalyzeParams {
|
|
228
|
+
/**
|
|
229
|
+
* Component ID to analyze
|
|
230
|
+
*/
|
|
231
|
+
componentId?: string;
|
|
232
|
+
/**
|
|
233
|
+
* End date for analysis
|
|
234
|
+
*/
|
|
235
|
+
endDate?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Group IDs to filter by
|
|
238
|
+
*/
|
|
239
|
+
groupIds?: Array<string>;
|
|
240
|
+
/**
|
|
241
|
+
* AI model to use for analysis
|
|
242
|
+
*/
|
|
243
|
+
modelKey?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Organization ID to filter by
|
|
246
|
+
*/
|
|
247
|
+
organizationId?: string;
|
|
248
|
+
/**
|
|
249
|
+
* Start date for analysis
|
|
250
|
+
*/
|
|
251
|
+
startDate?: string;
|
|
252
|
+
/**
|
|
253
|
+
* User ID to filter by
|
|
254
|
+
*/
|
|
255
|
+
userId?: string;
|
|
256
|
+
}
|
|
257
|
+
export interface ChatAnalyticExportParams {
|
|
258
|
+
/**
|
|
259
|
+
* Component ID to analyze
|
|
260
|
+
*/
|
|
261
|
+
componentId?: string;
|
|
262
|
+
/**
|
|
263
|
+
* End date for analysis
|
|
264
|
+
*/
|
|
265
|
+
endDate?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Group IDs to filter by
|
|
268
|
+
*/
|
|
269
|
+
groupIds?: Array<string>;
|
|
270
|
+
/**
|
|
271
|
+
* AI model to use for analysis
|
|
272
|
+
*/
|
|
273
|
+
modelKey?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Organization ID to filter by
|
|
276
|
+
*/
|
|
277
|
+
organizationId?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Start date for analysis
|
|
280
|
+
*/
|
|
281
|
+
startDate?: string;
|
|
282
|
+
/**
|
|
283
|
+
* User ID to filter by
|
|
284
|
+
*/
|
|
285
|
+
userId?: string;
|
|
286
|
+
}
|
|
287
|
+
export interface ChatAnalyticGetComponentParams {
|
|
288
|
+
/**
|
|
289
|
+
* End date for analysis
|
|
290
|
+
*/
|
|
291
|
+
endDate?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Group IDs to filter by
|
|
294
|
+
*/
|
|
295
|
+
groupIds?: Array<string>;
|
|
296
|
+
/**
|
|
297
|
+
* AI model to use for analysis
|
|
298
|
+
*/
|
|
299
|
+
modelKey?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Organization ID to filter by
|
|
302
|
+
*/
|
|
303
|
+
organizationId?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Start date for analysis
|
|
306
|
+
*/
|
|
307
|
+
startDate?: string;
|
|
308
|
+
/**
|
|
309
|
+
* User ID to filter by
|
|
310
|
+
*/
|
|
311
|
+
userId?: string;
|
|
312
|
+
}
|
|
313
|
+
export declare namespace ChatAnalytics {
|
|
314
|
+
export { type ChatAnalyticAnalyzeResponse as ChatAnalyticAnalyzeResponse, type ChatAnalyticExportResponse as ChatAnalyticExportResponse, type ChatAnalyticGetComponentResponse as ChatAnalyticGetComponentResponse, type ChatAnalyticAnalyzeParams as ChatAnalyticAnalyzeParams, type ChatAnalyticExportParams as ChatAnalyticExportParams, type ChatAnalyticGetComponentParams as ChatAnalyticGetComponentParams, };
|
|
315
|
+
}
|
|
316
|
+
//# sourceMappingURL=chat-analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-analytics.d.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IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ChatAnalytics = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class ChatAnalytics extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get chat analytics and user statistics
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response = await client.v1.chatAnalytics.analyze();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
analyze(query = {}, options) {
|
|
18
|
+
return this._client.get('/api/v1/chat-analytics/analyze', { query, ...options });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Export chat analytics data as CSV
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response = await client.v1.chatAnalytics.export();
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export(query = {}, options) {
|
|
29
|
+
return this._client.get('/api/v1/chat-analytics/export', {
|
|
30
|
+
query,
|
|
31
|
+
...options,
|
|
32
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: 'text/csv' }, options?.headers]),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get chat analytics for a specific component
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const response = await client.v1.chatAnalytics.getComponent(
|
|
41
|
+
* 'componentId',
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
getComponent(componentID, query = {}, options) {
|
|
46
|
+
return this._client.get((0, path_1.path) `/api/v1/chat-analytics/component/${componentID}`, { query, ...options });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.ChatAnalytics = ChatAnalytics;
|
|
50
|
+
//# sourceMappingURL=chat-analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-analytics.js","sourceRoot":"","sources":["../../src/resources/v1/chat-analytics.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;OAOG;IACH,OAAO,CACL,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CACJ,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE;YACvD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAClE,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,CACV,WAAmB,EACnB,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oCAAoC,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;CACF;AApDD,sCAoDC"}
|