@studyfetch/sdk 1.35.0 → 1.37.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 (108) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +6 -6
  3. package/package.json +1 -1
  4. package/resources/v1/assignment-grader/assignment-grader.d.mts +15 -151
  5. package/resources/v1/assignment-grader/assignment-grader.d.mts.map +1 -1
  6. package/resources/v1/assignment-grader/assignment-grader.d.ts +15 -151
  7. package/resources/v1/assignment-grader/assignment-grader.d.ts.map +1 -1
  8. package/resources/v1/assignment-grader/assignment-grader.js +4 -4
  9. package/resources/v1/assignment-grader/assignment-grader.js.map +1 -1
  10. package/resources/v1/assignment-grader/assignment-grader.mjs +4 -4
  11. package/resources/v1/assignment-grader/assignment-grader.mjs.map +1 -1
  12. package/resources/v1/assignment-grader/index.d.mts +2 -2
  13. package/resources/v1/assignment-grader/index.d.mts.map +1 -1
  14. package/resources/v1/assignment-grader/index.d.ts +2 -2
  15. package/resources/v1/assignment-grader/index.d.ts.map +1 -1
  16. package/resources/v1/assignment-grader/rubric-templates.d.mts +16 -136
  17. package/resources/v1/assignment-grader/rubric-templates.d.mts.map +1 -1
  18. package/resources/v1/assignment-grader/rubric-templates.d.ts +16 -136
  19. package/resources/v1/assignment-grader/rubric-templates.d.ts.map +1 -1
  20. package/resources/v1/assignment-grader/rubric-templates.js +3 -3
  21. package/resources/v1/assignment-grader/rubric-templates.js.map +1 -1
  22. package/resources/v1/assignment-grader/rubric-templates.mjs +3 -3
  23. package/resources/v1/assignment-grader/rubric-templates.mjs.map +1 -1
  24. package/resources/v1/chat-analytics.d.mts +11 -106
  25. package/resources/v1/chat-analytics.d.mts.map +1 -1
  26. package/resources/v1/chat-analytics.d.ts +11 -106
  27. package/resources/v1/chat-analytics.d.ts.map +1 -1
  28. package/resources/v1/chat-analytics.js +4 -4
  29. package/resources/v1/chat-analytics.js.map +1 -1
  30. package/resources/v1/chat-analytics.mjs +4 -4
  31. package/resources/v1/chat-analytics.mjs.map +1 -1
  32. package/resources/v1/components.d.mts +20 -154
  33. package/resources/v1/components.d.mts.map +1 -1
  34. package/resources/v1/components.d.ts +20 -154
  35. package/resources/v1/components.d.ts.map +1 -1
  36. package/resources/v1/components.js +14 -8
  37. package/resources/v1/components.js.map +1 -1
  38. package/resources/v1/components.mjs +14 -8
  39. package/resources/v1/components.mjs.map +1 -1
  40. package/resources/v1/folders.d.mts +56 -241
  41. package/resources/v1/folders.d.mts.map +1 -1
  42. package/resources/v1/folders.d.ts +56 -241
  43. package/resources/v1/folders.d.ts.map +1 -1
  44. package/resources/v1/folders.js +2 -2
  45. package/resources/v1/folders.js.map +1 -1
  46. package/resources/v1/folders.mjs +2 -2
  47. package/resources/v1/folders.mjs.map +1 -1
  48. package/resources/v1/index.d.mts +5 -5
  49. package/resources/v1/index.d.mts.map +1 -1
  50. package/resources/v1/index.d.ts +5 -5
  51. package/resources/v1/index.d.ts.map +1 -1
  52. package/resources/v1/index.js.map +1 -1
  53. package/resources/v1/index.mjs.map +1 -1
  54. package/resources/v1/materials/index.d.mts +2 -3
  55. package/resources/v1/materials/index.d.mts.map +1 -1
  56. package/resources/v1/materials/index.d.ts +2 -3
  57. package/resources/v1/materials/index.d.ts.map +1 -1
  58. package/resources/v1/materials/index.js +1 -3
  59. package/resources/v1/materials/index.js.map +1 -1
  60. package/resources/v1/materials/index.mjs +0 -1
  61. package/resources/v1/materials/index.mjs.map +1 -1
  62. package/resources/v1/materials/materials.d.mts +74 -510
  63. package/resources/v1/materials/materials.d.mts.map +1 -1
  64. package/resources/v1/materials/materials.d.ts +74 -510
  65. package/resources/v1/materials/materials.d.ts.map +1 -1
  66. package/resources/v1/materials/materials.js +24 -23
  67. package/resources/v1/materials/materials.js.map +1 -1
  68. package/resources/v1/materials/materials.mjs +24 -23
  69. package/resources/v1/materials/materials.mjs.map +1 -1
  70. package/resources/v1/materials/upload.d.mts +12 -311
  71. package/resources/v1/materials/upload.d.mts.map +1 -1
  72. package/resources/v1/materials/upload.d.ts +12 -311
  73. package/resources/v1/materials/upload.d.ts.map +1 -1
  74. package/resources/v1/materials/upload.js +5 -5
  75. package/resources/v1/materials/upload.js.map +1 -1
  76. package/resources/v1/materials/upload.mjs +5 -5
  77. package/resources/v1/materials/upload.mjs.map +1 -1
  78. package/resources/v1/v1.d.mts +10 -10
  79. package/resources/v1/v1.d.mts.map +1 -1
  80. package/resources/v1/v1.d.ts +10 -10
  81. package/resources/v1/v1.d.ts.map +1 -1
  82. package/resources/v1/v1.js.map +1 -1
  83. package/resources/v1/v1.mjs.map +1 -1
  84. package/src/resources/v1/assignment-grader/assignment-grader.ts +20 -188
  85. package/src/resources/v1/assignment-grader/index.ts +3 -3
  86. package/src/resources/v1/assignment-grader/rubric-templates.ts +17 -165
  87. package/src/resources/v1/chat-analytics.ts +11 -128
  88. package/src/resources/v1/components.ts +20 -223
  89. package/src/resources/v1/folders.ts +71 -288
  90. package/src/resources/v1/index.ts +8 -14
  91. package/src/resources/v1/materials/index.ts +3 -20
  92. package/src/resources/v1/materials/materials.ts +201 -795
  93. package/src/resources/v1/materials/upload.ts +14 -405
  94. package/src/resources/v1/v1.ts +16 -28
  95. package/src/version.ts +1 -1
  96. package/version.d.mts +1 -1
  97. package/version.d.ts +1 -1
  98. package/version.js +1 -1
  99. package/version.mjs +1 -1
  100. package/resources/v1/materials/test.d.mts +0 -136
  101. package/resources/v1/materials/test.d.mts.map +0 -1
  102. package/resources/v1/materials/test.d.ts +0 -136
  103. package/resources/v1/materials/test.d.ts.map +0 -1
  104. package/resources/v1/materials/test.js +0 -56
  105. package/resources/v1/materials/test.js.map +0 -1
  106. package/resources/v1/materials/test.mjs +0 -52
  107. package/resources/v1/materials/test.mjs.map +0 -1
  108. package/src/resources/v1/materials/test.ts +0 -175
@@ -13,13 +13,14 @@ export class ChatAnalytics extends APIResource {
13
13
  *
14
14
  * @example
15
15
  * ```ts
16
- * const response = await client.v1.chatAnalytics.analyze();
16
+ * const chatAnalyticsResponse =
17
+ * await client.v1.chatAnalytics.analyze();
17
18
  * ```
18
19
  */
19
20
  analyze(
20
21
  query: ChatAnalyticAnalyzeParams | null | undefined = {},
21
22
  options?: RequestOptions,
22
- ): APIPromise<ChatAnalyticAnalyzeResponse> {
23
+ ): APIPromise<ChatAnalyticsResponse> {
23
24
  return this._client.get('/api/v1/chat-analytics/analyze', { query, ...options });
24
25
  }
25
26
 
@@ -47,21 +48,20 @@ export class ChatAnalytics extends APIResource {
47
48
  *
48
49
  * @example
49
50
  * ```ts
50
- * const response = await client.v1.chatAnalytics.getComponent(
51
- * 'componentId',
52
- * );
51
+ * const chatAnalyticsResponse =
52
+ * await client.v1.chatAnalytics.getComponent('componentId');
53
53
  * ```
54
54
  */
55
55
  getComponent(
56
56
  componentID: string,
57
57
  query: ChatAnalyticGetComponentParams | null | undefined = {},
58
58
  options?: RequestOptions,
59
- ): APIPromise<ChatAnalyticGetComponentResponse> {
59
+ ): APIPromise<ChatAnalyticsResponse> {
60
60
  return this._client.get(path`/api/v1/chat-analytics/component/${componentID}`, { query, ...options });
61
61
  }
62
62
  }
63
63
 
64
- export interface ChatAnalyticAnalyzeResponse {
64
+ export interface ChatAnalyticsResponse {
65
65
  /**
66
66
  * Date when analytics were generated
67
67
  */
@@ -70,15 +70,15 @@ export interface ChatAnalyticAnalyzeResponse {
70
70
  /**
71
71
  * Analytics summary
72
72
  */
73
- summary: ChatAnalyticAnalyzeResponse.Summary;
73
+ summary: ChatAnalyticsResponse.Summary;
74
74
 
75
75
  /**
76
76
  * User statistics
77
77
  */
78
- userStats: Array<ChatAnalyticAnalyzeResponse.UserStat>;
78
+ userStats: Array<ChatAnalyticsResponse.UserStat>;
79
79
  }
80
80
 
81
- export namespace ChatAnalyticAnalyzeResponse {
81
+ export namespace ChatAnalyticsResponse {
82
82
  /**
83
83
  * Analytics summary
84
84
  */
@@ -179,122 +179,6 @@ export namespace ChatAnalyticAnalyzeResponse {
179
179
 
180
180
  export type ChatAnalyticExportResponse = Uploadable;
181
181
 
182
- export interface ChatAnalyticGetComponentResponse {
183
- /**
184
- * Date when analytics were generated
185
- */
186
- generatedAt: string;
187
-
188
- /**
189
- * Analytics summary
190
- */
191
- summary: ChatAnalyticGetComponentResponse.Summary;
192
-
193
- /**
194
- * User statistics
195
- */
196
- userStats: Array<ChatAnalyticGetComponentResponse.UserStat>;
197
- }
198
-
199
- export namespace ChatAnalyticGetComponentResponse {
200
- /**
201
- * Analytics summary
202
- */
203
- export interface Summary {
204
- /**
205
- * Average messages per user
206
- */
207
- averageMessagesPerUser: number;
208
-
209
- /**
210
- * Engagement metrics
211
- */
212
- engagement: unknown;
213
-
214
- /**
215
- * Natural language summary of chat usage
216
- */
217
- summary: string;
218
-
219
- /**
220
- * Top topics discussed
221
- */
222
- topTopics: Array<string>;
223
-
224
- /**
225
- * Total messages
226
- */
227
- totalMessages: number;
228
-
229
- /**
230
- * Total chat sessions
231
- */
232
- totalSessions: number;
233
-
234
- /**
235
- * Total unique users
236
- */
237
- totalUsers: number;
238
- }
239
-
240
- export interface UserStat {
241
- /**
242
- * Average messages per session
243
- */
244
- averageMessagesPerSession: number;
245
-
246
- /**
247
- * Average session duration in minutes
248
- */
249
- averageSessionDuration: number;
250
-
251
- /**
252
- * First active date
253
- */
254
- firstActive: string;
255
-
256
- /**
257
- * Last active date
258
- */
259
- lastActive: string;
260
-
261
- /**
262
- * Top topics discussed
263
- */
264
- topTopics: Array<string>;
265
-
266
- /**
267
- * Total messages sent by user
268
- */
269
- totalMessages: number;
270
-
271
- /**
272
- * Total chat sessions
273
- */
274
- totalSessions: number;
275
-
276
- /**
277
- * User ID
278
- */
279
- userId: string;
280
-
281
- /**
282
- * User email
283
- */
284
- email?: string;
285
-
286
- /**
287
- * Group IDs associated with the user
288
- */
289
- groupIds?: Array<string>;
290
-
291
- /**
292
- * User name
293
- */
294
- name?: string;
295
- }
296
- }
297
-
298
182
  export interface ChatAnalyticAnalyzeParams {
299
183
  /**
300
184
  * Component ID to analyze
@@ -403,9 +287,8 @@ export interface ChatAnalyticGetComponentParams {
403
287
 
404
288
  export declare namespace ChatAnalytics {
405
289
  export {
406
- type ChatAnalyticAnalyzeResponse as ChatAnalyticAnalyzeResponse,
290
+ type ChatAnalyticsResponse as ChatAnalyticsResponse,
407
291
  type ChatAnalyticExportResponse as ChatAnalyticExportResponse,
408
- type ChatAnalyticGetComponentResponse as ChatAnalyticGetComponentResponse,
409
292
  type ChatAnalyticAnalyzeParams as ChatAnalyticAnalyzeParams,
410
293
  type ChatAnalyticExportParams as ChatAnalyticExportParams,
411
294
  type ChatAnalyticGetComponentParams as ChatAnalyticGetComponentParams,
@@ -12,14 +12,16 @@ export class Components extends APIResource {
12
12
  *
13
13
  * @example
14
14
  * ```ts
15
- * const component = await client.v1.components.create({
16
- * config: { model: 'gpt-4o-mini-2024-07-18' },
17
- * name: 'My Study Component',
18
- * type: 'chat',
19
- * });
15
+ * const componentResponse = await client.v1.components.create(
16
+ * {
17
+ * config: { model: 'gpt-4o-mini-2024-07-18' },
18
+ * name: 'My Study Component',
19
+ * type: 'chat',
20
+ * },
21
+ * );
20
22
  * ```
21
23
  */
22
- create(body: ComponentCreateParams, options?: RequestOptions): APIPromise<ComponentCreateResponse> {
24
+ create(body: ComponentCreateParams, options?: RequestOptions): APIPromise<ComponentResponse> {
23
25
  return this._client.post('/api/v1/components', { body, ...options });
24
26
  }
25
27
 
@@ -28,10 +30,11 @@ export class Components extends APIResource {
28
30
  *
29
31
  * @example
30
32
  * ```ts
31
- * const component = await client.v1.components.retrieve('id');
33
+ * const componentResponse =
34
+ * await client.v1.components.retrieve('id');
32
35
  * ```
33
36
  */
34
- retrieve(id: string, options?: RequestOptions): APIPromise<ComponentRetrieveResponse> {
37
+ retrieve(id: string, options?: RequestOptions): APIPromise<ComponentResponse> {
35
38
  return this._client.get(path`/api/v1/components/${id}`, options);
36
39
  }
37
40
 
@@ -40,14 +43,12 @@ export class Components extends APIResource {
40
43
  *
41
44
  * @example
42
45
  * ```ts
43
- * const component = await client.v1.components.update('id');
46
+ * const componentResponse = await client.v1.components.update(
47
+ * 'id',
48
+ * );
44
49
  * ```
45
50
  */
46
- update(
47
- id: string,
48
- body: ComponentUpdateParams,
49
- options?: RequestOptions,
50
- ): APIPromise<ComponentUpdateResponse> {
51
+ update(id: string, body: ComponentUpdateParams, options?: RequestOptions): APIPromise<ComponentResponse> {
51
52
  return this._client.patch(path`/api/v1/components/${id}`, { body, ...options });
52
53
  }
53
54
 
@@ -56,7 +57,8 @@ export class Components extends APIResource {
56
57
  *
57
58
  * @example
58
59
  * ```ts
59
- * const components = await client.v1.components.list();
60
+ * const componentResponses =
61
+ * await client.v1.components.list();
60
62
  * ```
61
63
  */
62
64
  list(
@@ -139,141 +141,7 @@ export class Components extends APIResource {
139
141
  }
140
142
  }
141
143
 
142
- export interface ComponentCreateResponse {
143
- /**
144
- * Component ID (MongoDB ObjectId)
145
- */
146
- _id: string;
147
-
148
- /**
149
- * Unique component identifier
150
- */
151
- componentId: string;
152
-
153
- /**
154
- * Component configuration
155
- */
156
- config: unknown;
157
-
158
- /**
159
- * Creation timestamp
160
- */
161
- createdAt: string;
162
-
163
- /**
164
- * Component name
165
- */
166
- name: string;
167
-
168
- /**
169
- * Organization ID
170
- */
171
- organization: string;
172
-
173
- /**
174
- * Component status
175
- */
176
- status: 'active' | 'inactive' | 'draft';
177
-
178
- /**
179
- * Component type
180
- */
181
- type:
182
- | 'chat'
183
- | 'data_analyst'
184
- | 'flashcards'
185
- | 'scenarios'
186
- | 'practice_test'
187
- | 'audio_recap'
188
- | 'tutor_me'
189
- | 'explainers'
190
- | 'uploads'
191
- | 'chat_analytics';
192
-
193
- /**
194
- * Last update timestamp
195
- */
196
- updatedAt: string;
197
-
198
- /**
199
- * Usage statistics
200
- */
201
- usage: unknown;
202
-
203
- /**
204
- * Component description
205
- */
206
- description?: string;
207
- }
208
-
209
- export interface ComponentRetrieveResponse {
210
- /**
211
- * Component ID (MongoDB ObjectId)
212
- */
213
- _id: string;
214
-
215
- /**
216
- * Unique component identifier
217
- */
218
- componentId: string;
219
-
220
- /**
221
- * Component configuration
222
- */
223
- config: unknown;
224
-
225
- /**
226
- * Creation timestamp
227
- */
228
- createdAt: string;
229
-
230
- /**
231
- * Component name
232
- */
233
- name: string;
234
-
235
- /**
236
- * Organization ID
237
- */
238
- organization: string;
239
-
240
- /**
241
- * Component status
242
- */
243
- status: 'active' | 'inactive' | 'draft';
244
-
245
- /**
246
- * Component type
247
- */
248
- type:
249
- | 'chat'
250
- | 'data_analyst'
251
- | 'flashcards'
252
- | 'scenarios'
253
- | 'practice_test'
254
- | 'audio_recap'
255
- | 'tutor_me'
256
- | 'explainers'
257
- | 'uploads'
258
- | 'chat_analytics';
259
-
260
- /**
261
- * Last update timestamp
262
- */
263
- updatedAt: string;
264
-
265
- /**
266
- * Usage statistics
267
- */
268
- usage: unknown;
269
-
270
- /**
271
- * Component description
272
- */
273
- description?: string;
274
- }
275
-
276
- export interface ComponentUpdateResponse {
144
+ export interface ComponentResponse {
277
145
  /**
278
146
  * Component ID (MongoDB ObjectId)
279
147
  */
@@ -340,76 +208,7 @@ export interface ComponentUpdateResponse {
340
208
  description?: string;
341
209
  }
342
210
 
343
- export type ComponentListResponse = Array<ComponentListResponse.ComponentListResponseItem>;
344
-
345
- export namespace ComponentListResponse {
346
- export interface ComponentListResponseItem {
347
- /**
348
- * Component ID (MongoDB ObjectId)
349
- */
350
- _id: string;
351
-
352
- /**
353
- * Unique component identifier
354
- */
355
- componentId: string;
356
-
357
- /**
358
- * Component configuration
359
- */
360
- config: unknown;
361
-
362
- /**
363
- * Creation timestamp
364
- */
365
- createdAt: string;
366
-
367
- /**
368
- * Component name
369
- */
370
- name: string;
371
-
372
- /**
373
- * Organization ID
374
- */
375
- organization: string;
376
-
377
- /**
378
- * Component status
379
- */
380
- status: 'active' | 'inactive' | 'draft';
381
-
382
- /**
383
- * Component type
384
- */
385
- type:
386
- | 'chat'
387
- | 'data_analyst'
388
- | 'flashcards'
389
- | 'scenarios'
390
- | 'practice_test'
391
- | 'audio_recap'
392
- | 'tutor_me'
393
- | 'explainers'
394
- | 'uploads'
395
- | 'chat_analytics';
396
-
397
- /**
398
- * Last update timestamp
399
- */
400
- updatedAt: string;
401
-
402
- /**
403
- * Usage statistics
404
- */
405
- usage: unknown;
406
-
407
- /**
408
- * Component description
409
- */
410
- description?: string;
411
- }
412
- }
211
+ export type ComponentListResponse = Array<ComponentResponse>;
413
212
 
414
213
  export interface ComponentGenerateEmbedResponse {
415
214
  /**
@@ -1361,9 +1160,7 @@ export namespace ComponentGenerateEmbedParams {
1361
1160
 
1362
1161
  export declare namespace Components {
1363
1162
  export {
1364
- type ComponentCreateResponse as ComponentCreateResponse,
1365
- type ComponentRetrieveResponse as ComponentRetrieveResponse,
1366
- type ComponentUpdateResponse as ComponentUpdateResponse,
1163
+ type ComponentResponse as ComponentResponse,
1367
1164
  type ComponentListResponse as ComponentListResponse,
1368
1165
  type ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse,
1369
1166
  type ComponentCreateParams as ComponentCreateParams,