@studyfetch/sdk 1.33.0 → 1.34.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 (154) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +1 -1
  3. package/package.json +4 -5
  4. package/resources/v1/assignment-grader/assignment-grader.d.mts +313 -0
  5. package/resources/v1/assignment-grader/assignment-grader.d.mts.map +1 -0
  6. package/resources/v1/assignment-grader/assignment-grader.d.ts +313 -0
  7. package/resources/v1/assignment-grader/assignment-grader.d.ts.map +1 -0
  8. package/resources/v1/assignment-grader/assignment-grader.js +87 -0
  9. package/resources/v1/assignment-grader/assignment-grader.js.map +1 -0
  10. package/resources/v1/assignment-grader/assignment-grader.mjs +82 -0
  11. package/resources/v1/assignment-grader/assignment-grader.mjs.map +1 -0
  12. package/resources/v1/assignment-grader/index.d.mts +3 -0
  13. package/resources/v1/assignment-grader/index.d.mts.map +1 -0
  14. package/resources/v1/assignment-grader/index.d.ts +3 -0
  15. package/resources/v1/assignment-grader/index.d.ts.map +1 -0
  16. package/resources/v1/assignment-grader/index.js +9 -0
  17. package/resources/v1/assignment-grader/index.js.map +1 -0
  18. package/resources/v1/assignment-grader/index.mjs +4 -0
  19. package/resources/v1/assignment-grader/index.mjs.map +1 -0
  20. package/resources/v1/assignment-grader/rubric-templates.d.mts +238 -0
  21. package/resources/v1/assignment-grader/rubric-templates.d.mts.map +1 -0
  22. package/resources/v1/assignment-grader/rubric-templates.d.ts +238 -0
  23. package/resources/v1/assignment-grader/rubric-templates.d.ts.map +1 -0
  24. package/resources/v1/assignment-grader/rubric-templates.js +68 -0
  25. package/resources/v1/assignment-grader/rubric-templates.js.map +1 -0
  26. package/resources/v1/assignment-grader/rubric-templates.mjs +64 -0
  27. package/resources/v1/assignment-grader/rubric-templates.mjs.map +1 -0
  28. package/resources/v1/assignment-grader.d.mts +1 -152
  29. package/resources/v1/assignment-grader.d.mts.map +1 -1
  30. package/resources/v1/assignment-grader.d.ts +1 -152
  31. package/resources/v1/assignment-grader.d.ts.map +1 -1
  32. package/resources/v1/assignment-grader.js +2 -62
  33. package/resources/v1/assignment-grader.js.map +1 -1
  34. package/resources/v1/assignment-grader.mjs +1 -60
  35. package/resources/v1/assignment-grader.mjs.map +1 -1
  36. package/resources/v1/chat-analytics.d.mts +316 -0
  37. package/resources/v1/chat-analytics.d.mts.map +1 -0
  38. package/resources/v1/chat-analytics.d.ts +316 -0
  39. package/resources/v1/chat-analytics.d.ts.map +1 -0
  40. package/resources/v1/chat-analytics.js +50 -0
  41. package/resources/v1/chat-analytics.js.map +1 -0
  42. package/resources/v1/chat-analytics.mjs +46 -0
  43. package/resources/v1/chat-analytics.mjs.map +1 -0
  44. package/resources/v1/components.d.mts +184 -10
  45. package/resources/v1/components.d.mts.map +1 -1
  46. package/resources/v1/components.d.ts +184 -10
  47. package/resources/v1/components.d.ts.map +1 -1
  48. package/resources/v1/components.js.map +1 -1
  49. package/resources/v1/components.mjs.map +1 -1
  50. package/resources/v1/index.d.mts +6 -4
  51. package/resources/v1/index.d.mts.map +1 -1
  52. package/resources/v1/index.d.ts +6 -4
  53. package/resources/v1/index.d.ts.map +1 -1
  54. package/resources/v1/index.js +13 -9
  55. package/resources/v1/index.js.map +1 -1
  56. package/resources/v1/index.mjs +4 -2
  57. package/resources/v1/index.mjs.map +1 -1
  58. package/resources/v1/materials/index.d.mts +3 -3
  59. package/resources/v1/materials/index.d.mts.map +1 -1
  60. package/resources/v1/materials/index.d.ts +3 -3
  61. package/resources/v1/materials/index.d.ts.map +1 -1
  62. package/resources/v1/materials/index.js.map +1 -1
  63. package/resources/v1/materials/index.mjs.map +1 -1
  64. package/resources/v1/materials/materials.d.mts +548 -92
  65. package/resources/v1/materials/materials.d.mts.map +1 -1
  66. package/resources/v1/materials/materials.d.ts +548 -92
  67. package/resources/v1/materials/materials.d.ts.map +1 -1
  68. package/resources/v1/materials/materials.js +36 -34
  69. package/resources/v1/materials/materials.js.map +1 -1
  70. package/resources/v1/materials/materials.mjs +36 -34
  71. package/resources/v1/materials/materials.mjs.map +1 -1
  72. package/resources/v1/materials/test.d.mts +29 -30
  73. package/resources/v1/materials/test.d.mts.map +1 -1
  74. package/resources/v1/materials/test.d.ts +29 -30
  75. package/resources/v1/materials/test.d.ts.map +1 -1
  76. package/resources/v1/materials/test.js +14 -15
  77. package/resources/v1/materials/test.js.map +1 -1
  78. package/resources/v1/materials/test.mjs +14 -15
  79. package/resources/v1/materials/test.mjs.map +1 -1
  80. package/resources/v1/materials/upload.d.mts +312 -23
  81. package/resources/v1/materials/upload.d.mts.map +1 -1
  82. package/resources/v1/materials/upload.d.ts +312 -23
  83. package/resources/v1/materials/upload.d.ts.map +1 -1
  84. package/resources/v1/materials/upload.js +9 -9
  85. package/resources/v1/materials/upload.js.map +1 -1
  86. package/resources/v1/materials/upload.mjs +9 -9
  87. package/resources/v1/materials/upload.mjs.map +1 -1
  88. package/resources/v1/usage-analyst.d.mts +99 -0
  89. package/resources/v1/usage-analyst.d.mts.map +1 -0
  90. package/resources/v1/usage-analyst.d.ts +99 -0
  91. package/resources/v1/usage-analyst.d.ts.map +1 -0
  92. package/resources/v1/{usage/analyst.js → usage-analyst.js} +9 -9
  93. package/resources/v1/usage-analyst.js.map +1 -0
  94. package/resources/v1/{usage/analyst.mjs → usage-analyst.mjs} +7 -7
  95. package/resources/v1/usage-analyst.mjs.map +1 -0
  96. package/resources/v1/usage.d.mts +109 -1
  97. package/resources/v1/usage.d.mts.map +1 -1
  98. package/resources/v1/usage.d.ts +109 -1
  99. package/resources/v1/usage.d.ts.map +1 -1
  100. package/resources/v1/usage.js +55 -2
  101. package/resources/v1/usage.js.map +1 -1
  102. package/resources/v1/usage.mjs +53 -1
  103. package/resources/v1/usage.mjs.map +1 -1
  104. package/resources/v1/v1.d.mts +18 -10
  105. package/resources/v1/v1.d.mts.map +1 -1
  106. package/resources/v1/v1.d.ts +18 -10
  107. package/resources/v1/v1.d.ts.map +1 -1
  108. package/resources/v1/v1.js +14 -6
  109. package/resources/v1/v1.js.map +1 -1
  110. package/resources/v1/v1.mjs +14 -6
  111. package/resources/v1/v1.mjs.map +1 -1
  112. package/src/resources/v1/assignment-grader/assignment-grader.ts +421 -0
  113. package/src/resources/v1/assignment-grader/index.ts +16 -0
  114. package/src/resources/v1/assignment-grader/rubric-templates.ts +305 -0
  115. package/src/resources/v1/assignment-grader.ts +1 -196
  116. package/src/resources/v1/chat-analytics.ts +413 -0
  117. package/src/resources/v1/components.ts +265 -10
  118. package/src/resources/v1/index.ts +34 -10
  119. package/src/resources/v1/materials/index.ts +23 -14
  120. package/src/resources/v1/materials/materials.ts +824 -216
  121. package/src/resources/v1/materials/test.ts +38 -39
  122. package/src/resources/v1/materials/upload.ts +411 -30
  123. package/src/resources/v1/{usage/analyst.ts → usage-analyst.ts} +24 -23
  124. package/src/resources/v1/usage.ts +179 -1
  125. package/src/resources/v1/v1.ts +84 -28
  126. package/src/version.ts +1 -1
  127. package/version.d.mts +1 -1
  128. package/version.d.ts +1 -1
  129. package/version.js +1 -1
  130. package/version.mjs +1 -1
  131. package/resources/v1/usage/analyst.d.mts +0 -99
  132. package/resources/v1/usage/analyst.d.mts.map +0 -1
  133. package/resources/v1/usage/analyst.d.ts +0 -99
  134. package/resources/v1/usage/analyst.d.ts.map +0 -1
  135. package/resources/v1/usage/analyst.js.map +0 -1
  136. package/resources/v1/usage/analyst.mjs.map +0 -1
  137. package/resources/v1/usage/index.d.mts +0 -3
  138. package/resources/v1/usage/index.d.mts.map +0 -1
  139. package/resources/v1/usage/index.d.ts +0 -3
  140. package/resources/v1/usage/index.d.ts.map +0 -1
  141. package/resources/v1/usage/index.js +0 -9
  142. package/resources/v1/usage/index.js.map +0 -1
  143. package/resources/v1/usage/index.mjs +0 -4
  144. package/resources/v1/usage/index.mjs.map +0 -1
  145. package/resources/v1/usage/usage.d.mts +0 -114
  146. package/resources/v1/usage/usage.d.mts.map +0 -1
  147. package/resources/v1/usage/usage.d.ts +0 -114
  148. package/resources/v1/usage/usage.d.ts.map +0 -1
  149. package/resources/v1/usage/usage.js +0 -67
  150. package/resources/v1/usage/usage.js.map +0 -1
  151. package/resources/v1/usage/usage.mjs +0 -62
  152. package/resources/v1/usage/usage.mjs.map +0 -1
  153. package/src/resources/v1/usage/index.ts +0 -15
  154. package/src/resources/v1/usage/usage.ts +0 -200
@@ -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.ts","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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AO,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"}
@@ -0,0 +1,46 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import { buildHeaders } from "../../internal/headers.mjs";
4
+ import { path } from "../../internal/utils/path.mjs";
5
+ export 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 = {}, options) {
15
+ return this._client.get('/api/v1/chat-analytics/analyze', { query, ...options });
16
+ }
17
+ /**
18
+ * Export chat analytics data as CSV
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const response = await client.v1.chatAnalytics.export();
23
+ * ```
24
+ */
25
+ export(query = {}, options) {
26
+ return this._client.get('/api/v1/chat-analytics/export', {
27
+ query,
28
+ ...options,
29
+ headers: buildHeaders([{ Accept: 'text/csv' }, options?.headers]),
30
+ });
31
+ }
32
+ /**
33
+ * Get chat analytics for a specific component
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const response = await client.v1.chatAnalytics.getComponent(
38
+ * 'componentId',
39
+ * );
40
+ * ```
41
+ */
42
+ getComponent(componentID, query = {}, options) {
43
+ return this._client.get(path `/api/v1/chat-analytics/component/${componentID}`, { query, ...options });
44
+ }
45
+ }
46
+ //# sourceMappingURL=chat-analytics.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-analytics.mjs","sourceRoot":"","sources":["../../src/resources/v1/chat-analytics.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;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,YAAY,CAAC,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,IAAI,CAAA,oCAAoC,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;CACF"}
@@ -14,7 +14,7 @@ export declare class Components extends APIResource {
14
14
  * });
15
15
  * ```
16
16
  */
17
- create(body: ComponentCreateParams, options?: RequestOptions): APIPromise<Component>;
17
+ create(body: ComponentCreateParams, options?: RequestOptions): APIPromise<ComponentCreateResponse>;
18
18
  /**
19
19
  * Get component by ID
20
20
  *
@@ -23,7 +23,7 @@ export declare class Components extends APIResource {
23
23
  * const component = await client.v1.components.retrieve('id');
24
24
  * ```
25
25
  */
26
- retrieve(id: string, options?: RequestOptions): APIPromise<Component>;
26
+ retrieve(id: string, options?: RequestOptions): APIPromise<ComponentRetrieveResponse>;
27
27
  /**
28
28
  * Update component
29
29
  *
@@ -32,7 +32,7 @@ export declare class Components extends APIResource {
32
32
  * const component = await client.v1.components.update('id');
33
33
  * ```
34
34
  */
35
- update(id: string, body: ComponentUpdateParams, options?: RequestOptions): APIPromise<Component>;
35
+ update(id: string, body: ComponentUpdateParams, options?: RequestOptions): APIPromise<ComponentUpdateResponse>;
36
36
  /**
37
37
  * Get all components
38
38
  *
@@ -84,7 +84,7 @@ export declare class Components extends APIResource {
84
84
  */
85
85
  interact(id: string, options?: RequestOptions): APIPromise<void>;
86
86
  }
87
- export interface Component {
87
+ export interface ComponentCreateResponse {
88
88
  /**
89
89
  * Component ID (MongoDB ObjectId)
90
90
  */
@@ -116,7 +116,7 @@ export interface Component {
116
116
  /**
117
117
  * Component type
118
118
  */
119
- type: 'chat' | 'data_analyst' | 'flashcards' | 'scenarios' | 'practice_test' | 'audio_recap' | 'tutor_me' | 'explainers' | 'uploads';
119
+ type: 'chat' | 'data_analyst' | 'flashcards' | 'scenarios' | 'practice_test' | 'audio_recap' | 'tutor_me' | 'explainers' | 'uploads' | 'chat_analytics';
120
120
  /**
121
121
  * Last update timestamp
122
122
  */
@@ -130,7 +130,147 @@ export interface Component {
130
130
  */
131
131
  description?: string;
132
132
  }
133
- export type ComponentListResponse = Array<Component>;
133
+ export interface ComponentRetrieveResponse {
134
+ /**
135
+ * Component ID (MongoDB ObjectId)
136
+ */
137
+ _id: string;
138
+ /**
139
+ * Unique component identifier
140
+ */
141
+ componentId: string;
142
+ /**
143
+ * Component configuration
144
+ */
145
+ config: unknown;
146
+ /**
147
+ * Creation timestamp
148
+ */
149
+ createdAt: string;
150
+ /**
151
+ * Component name
152
+ */
153
+ name: string;
154
+ /**
155
+ * Organization ID
156
+ */
157
+ organization: string;
158
+ /**
159
+ * Component status
160
+ */
161
+ status: 'active' | 'inactive' | 'draft';
162
+ /**
163
+ * Component type
164
+ */
165
+ type: 'chat' | 'data_analyst' | 'flashcards' | 'scenarios' | 'practice_test' | 'audio_recap' | 'tutor_me' | 'explainers' | 'uploads' | 'chat_analytics';
166
+ /**
167
+ * Last update timestamp
168
+ */
169
+ updatedAt: string;
170
+ /**
171
+ * Usage statistics
172
+ */
173
+ usage: unknown;
174
+ /**
175
+ * Component description
176
+ */
177
+ description?: string;
178
+ }
179
+ export interface ComponentUpdateResponse {
180
+ /**
181
+ * Component ID (MongoDB ObjectId)
182
+ */
183
+ _id: string;
184
+ /**
185
+ * Unique component identifier
186
+ */
187
+ componentId: string;
188
+ /**
189
+ * Component configuration
190
+ */
191
+ config: unknown;
192
+ /**
193
+ * Creation timestamp
194
+ */
195
+ createdAt: string;
196
+ /**
197
+ * Component name
198
+ */
199
+ name: string;
200
+ /**
201
+ * Organization ID
202
+ */
203
+ organization: string;
204
+ /**
205
+ * Component status
206
+ */
207
+ status: 'active' | 'inactive' | 'draft';
208
+ /**
209
+ * Component type
210
+ */
211
+ type: 'chat' | 'data_analyst' | 'flashcards' | 'scenarios' | 'practice_test' | 'audio_recap' | 'tutor_me' | 'explainers' | 'uploads' | 'chat_analytics';
212
+ /**
213
+ * Last update timestamp
214
+ */
215
+ updatedAt: string;
216
+ /**
217
+ * Usage statistics
218
+ */
219
+ usage: unknown;
220
+ /**
221
+ * Component description
222
+ */
223
+ description?: string;
224
+ }
225
+ export type ComponentListResponse = Array<ComponentListResponse.ComponentListResponseItem>;
226
+ export declare namespace ComponentListResponse {
227
+ interface ComponentListResponseItem {
228
+ /**
229
+ * Component ID (MongoDB ObjectId)
230
+ */
231
+ _id: string;
232
+ /**
233
+ * Unique component identifier
234
+ */
235
+ componentId: string;
236
+ /**
237
+ * Component configuration
238
+ */
239
+ config: unknown;
240
+ /**
241
+ * Creation timestamp
242
+ */
243
+ createdAt: string;
244
+ /**
245
+ * Component name
246
+ */
247
+ name: string;
248
+ /**
249
+ * Organization ID
250
+ */
251
+ organization: string;
252
+ /**
253
+ * Component status
254
+ */
255
+ status: 'active' | 'inactive' | 'draft';
256
+ /**
257
+ * Component type
258
+ */
259
+ type: 'chat' | 'data_analyst' | 'flashcards' | 'scenarios' | 'practice_test' | 'audio_recap' | 'tutor_me' | 'explainers' | 'uploads' | 'chat_analytics';
260
+ /**
261
+ * Last update timestamp
262
+ */
263
+ updatedAt: string;
264
+ /**
265
+ * Usage statistics
266
+ */
267
+ usage: unknown;
268
+ /**
269
+ * Component description
270
+ */
271
+ description?: string;
272
+ }
273
+ }
134
274
  export interface ComponentGenerateEmbedResponse {
135
275
  /**
136
276
  * JWT token for authentication
@@ -176,7 +316,7 @@ export interface ComponentCreateParams {
176
316
  /**
177
317
  * Component-specific configuration
178
318
  */
179
- config: ComponentCreateParams.ChatConfigDto | ComponentCreateParams.DataAnalystConfigDto | ComponentCreateParams.FlashcardsConfigDto | ComponentCreateParams.ScenariosConfigDto | ComponentCreateParams.PracticeTestConfigDto | ComponentCreateParams.AudioRecapConfigDto | ComponentCreateParams.ExplainersConfigDto | ComponentCreateParams.UploadsConfigDto | ComponentCreateParams.TutorMeConfigDto;
319
+ config: ComponentCreateParams.ChatConfigDto | ComponentCreateParams.DataAnalystConfigDto | ComponentCreateParams.FlashcardsConfigDto | ComponentCreateParams.ScenariosConfigDto | ComponentCreateParams.PracticeTestConfigDto | ComponentCreateParams.AudioRecapConfigDto | ComponentCreateParams.ExplainersConfigDto | ComponentCreateParams.UploadsConfigDto | ComponentCreateParams.TutorMeConfigDto | ComponentCreateParams.ChatAnalyticsConfigDto;
180
320
  /**
181
321
  * Name of the component
182
322
  */
@@ -184,7 +324,7 @@ export interface ComponentCreateParams {
184
324
  /**
185
325
  * Type of component to create
186
326
  */
187
- type: 'chat' | 'data_analyst' | 'flashcards' | 'scenarios' | 'practice_test' | 'audio_recap' | 'tutor_me' | 'explainers' | 'uploads';
327
+ type: 'chat' | 'data_analyst' | 'flashcards' | 'scenarios' | 'practice_test' | 'audio_recap' | 'tutor_me' | 'explainers' | 'uploads' | 'chat_analytics';
188
328
  /**
189
329
  * Component description
190
330
  */
@@ -698,6 +838,40 @@ export declare namespace ComponentCreateParams {
698
838
  */
699
839
  tutorPersonality?: string;
700
840
  }
841
+ interface ChatAnalyticsConfigDto {
842
+ /**
843
+ * ID of the chat component to analyze
844
+ */
845
+ chatComponentId: string;
846
+ /**
847
+ * Enable auto-refresh
848
+ */
849
+ autoRefresh?: boolean;
850
+ /**
851
+ * Default date range in days
852
+ */
853
+ dateRange?: number;
854
+ /**
855
+ * Enable CSV export functionality
856
+ */
857
+ enableExport?: boolean;
858
+ /**
859
+ * Refresh interval in minutes
860
+ */
861
+ refreshInterval?: number;
862
+ /**
863
+ * Show summary section
864
+ */
865
+ showSummary?: boolean;
866
+ /**
867
+ * Show top topics
868
+ */
869
+ showTopics?: boolean;
870
+ /**
871
+ * Show user statistics section
872
+ */
873
+ showUserStats?: boolean;
874
+ }
701
875
  }
702
876
  export interface ComponentUpdateParams {
703
877
  /**
@@ -709,7 +883,7 @@ export interface ComponentListParams {
709
883
  /**
710
884
  * Filter by component type
711
885
  */
712
- type?: 'chat' | 'data_analyst' | 'flashcards' | 'scenarios' | 'practice_test' | 'audio_recap' | 'tutor_me' | 'explainers' | 'uploads';
886
+ type?: 'chat' | 'data_analyst' | 'flashcards' | 'scenarios' | 'practice_test' | 'audio_recap' | 'tutor_me' | 'explainers' | 'uploads' | 'chat_analytics';
713
887
  }
714
888
  export interface ComponentGenerateEmbedParams {
715
889
  /**
@@ -846,6 +1020,6 @@ export declare namespace ComponentGenerateEmbedParams {
846
1020
  }
847
1021
  }
848
1022
  export declare namespace Components {
849
- export { type Component as Component, type ComponentListResponse as ComponentListResponse, type ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse, type ComponentCreateParams as ComponentCreateParams, type ComponentUpdateParams as ComponentUpdateParams, type ComponentListParams as ComponentListParams, type ComponentGenerateEmbedParams as ComponentGenerateEmbedParams, };
1023
+ export { type ComponentCreateResponse as ComponentCreateResponse, type ComponentRetrieveResponse as ComponentRetrieveResponse, type ComponentUpdateResponse as ComponentUpdateResponse, type ComponentListResponse as ComponentListResponse, type ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse, type ComponentCreateParams as ComponentCreateParams, type ComponentUpdateParams as ComponentUpdateParams, type ComponentListParams as ComponentListParams, type ComponentGenerateEmbedParams as ComponentGenerateEmbedParams, };
850
1024
  }
851
1025
  //# sourceMappingURL=components.d.mts.map