@studyfetch/sdk 1.25.0 → 1.27.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 (305) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +1 -1
  3. package/resources/v1/assignment-grader.d.mts +34 -1
  4. package/resources/v1/assignment-grader.d.mts.map +1 -1
  5. package/resources/v1/assignment-grader.d.ts +34 -1
  6. package/resources/v1/assignment-grader.d.ts.map +1 -1
  7. package/resources/v1/assignment-grader.js +15 -0
  8. package/resources/v1/assignment-grader.js.map +1 -1
  9. package/resources/v1/assignment-grader.mjs +15 -0
  10. package/resources/v1/assignment-grader.mjs.map +1 -1
  11. package/resources/v1/components.d.mts +102 -4
  12. package/resources/v1/components.d.mts.map +1 -1
  13. package/resources/v1/components.d.ts +102 -4
  14. package/resources/v1/components.d.ts.map +1 -1
  15. package/resources/v1/index.d.mts +1 -7
  16. package/resources/v1/index.d.mts.map +1 -1
  17. package/resources/v1/index.d.ts +1 -7
  18. package/resources/v1/index.d.ts.map +1 -1
  19. package/resources/v1/index.js +9 -21
  20. package/resources/v1/index.js.map +1 -1
  21. package/resources/v1/index.mjs +0 -6
  22. package/resources/v1/index.mjs.map +1 -1
  23. package/resources/v1/materials/index.d.mts +2 -2
  24. package/resources/v1/materials/index.d.mts.map +1 -1
  25. package/resources/v1/materials/index.d.ts +2 -2
  26. package/resources/v1/materials/index.d.ts.map +1 -1
  27. package/resources/v1/materials/index.js.map +1 -1
  28. package/resources/v1/materials/index.mjs.map +1 -1
  29. package/resources/v1/materials/materials.d.mts +59 -27
  30. package/resources/v1/materials/materials.d.mts.map +1 -1
  31. package/resources/v1/materials/materials.d.ts +59 -27
  32. package/resources/v1/materials/materials.d.ts.map +1 -1
  33. package/resources/v1/materials/materials.js +17 -0
  34. package/resources/v1/materials/materials.js.map +1 -1
  35. package/resources/v1/materials/materials.mjs +17 -0
  36. package/resources/v1/materials/materials.mjs.map +1 -1
  37. package/resources/v1/materials/upload.d.mts +96 -1
  38. package/resources/v1/materials/upload.d.mts.map +1 -1
  39. package/resources/v1/materials/upload.d.ts +96 -1
  40. package/resources/v1/materials/upload.d.ts.map +1 -1
  41. package/resources/v1/materials/upload.js +32 -0
  42. package/resources/v1/materials/upload.js.map +1 -1
  43. package/resources/v1/materials/upload.mjs +32 -0
  44. package/resources/v1/materials/upload.mjs.map +1 -1
  45. package/resources/v1/usage/analyst.d.mts +51 -6
  46. package/resources/v1/usage/analyst.d.mts.map +1 -1
  47. package/resources/v1/usage/analyst.d.ts +51 -6
  48. package/resources/v1/usage/analyst.d.ts.map +1 -1
  49. package/resources/v1/usage/analyst.js +8 -9
  50. package/resources/v1/usage/analyst.js.map +1 -1
  51. package/resources/v1/usage/analyst.mjs +8 -9
  52. package/resources/v1/usage/analyst.mjs.map +1 -1
  53. package/resources/v1/usage/index.d.mts +1 -1
  54. package/resources/v1/usage/index.d.mts.map +1 -1
  55. package/resources/v1/usage/index.d.ts +1 -1
  56. package/resources/v1/usage/index.d.ts.map +1 -1
  57. package/resources/v1/usage/index.js.map +1 -1
  58. package/resources/v1/usage/index.mjs +1 -1
  59. package/resources/v1/usage/index.mjs.map +1 -1
  60. package/resources/v1/usage/usage.d.mts +2 -2
  61. package/resources/v1/usage/usage.d.mts.map +1 -1
  62. package/resources/v1/usage/usage.d.ts +2 -2
  63. package/resources/v1/usage/usage.d.ts.map +1 -1
  64. package/resources/v1/usage/usage.js.map +1 -1
  65. package/resources/v1/usage/usage.mjs +1 -1
  66. package/resources/v1/usage/usage.mjs.map +1 -1
  67. package/resources/v1/v1.d.mts +13 -26
  68. package/resources/v1/v1.d.mts.map +1 -1
  69. package/resources/v1/v1.d.ts +13 -26
  70. package/resources/v1/v1.d.ts.map +1 -1
  71. package/resources/v1/v1.js +15 -24
  72. package/resources/v1/v1.js.map +1 -1
  73. package/resources/v1/v1.mjs +15 -24
  74. package/resources/v1/v1.mjs.map +1 -1
  75. package/src/resources/v1/assignment-grader.ts +47 -1
  76. package/src/resources/v1/components.ts +125 -0
  77. package/src/resources/v1/index.ts +2 -38
  78. package/src/resources/v1/materials/index.ts +5 -0
  79. package/src/resources/v1/materials/materials.ts +76 -28
  80. package/src/resources/v1/materials/upload.ts +129 -0
  81. package/src/resources/v1/usage/analyst.ts +80 -10
  82. package/src/resources/v1/usage/index.ts +7 -1
  83. package/src/resources/v1/usage/usage.ts +14 -2
  84. package/src/resources/v1/v1.ts +22 -99
  85. package/src/version.ts +1 -1
  86. package/version.d.mts +1 -1
  87. package/version.d.ts +1 -1
  88. package/version.js +1 -1
  89. package/version.mjs +1 -1
  90. package/resources/v1/audio-recaps/audio-recaps.d.mts +0 -44
  91. package/resources/v1/audio-recaps/audio-recaps.d.mts.map +0 -1
  92. package/resources/v1/audio-recaps/audio-recaps.d.ts +0 -44
  93. package/resources/v1/audio-recaps/audio-recaps.d.ts.map +0 -1
  94. package/resources/v1/audio-recaps/audio-recaps.js +0 -63
  95. package/resources/v1/audio-recaps/audio-recaps.js.map +0 -1
  96. package/resources/v1/audio-recaps/audio-recaps.mjs +0 -58
  97. package/resources/v1/audio-recaps/audio-recaps.mjs.map +0 -1
  98. package/resources/v1/audio-recaps/index.d.mts +0 -3
  99. package/resources/v1/audio-recaps/index.d.mts.map +0 -1
  100. package/resources/v1/audio-recaps/index.d.ts +0 -3
  101. package/resources/v1/audio-recaps/index.d.ts.map +0 -1
  102. package/resources/v1/audio-recaps/index.js +0 -9
  103. package/resources/v1/audio-recaps/index.js.map +0 -1
  104. package/resources/v1/audio-recaps/index.mjs +0 -4
  105. package/resources/v1/audio-recaps/index.mjs.map +0 -1
  106. package/resources/v1/audio-recaps/sections.d.mts +0 -35
  107. package/resources/v1/audio-recaps/sections.d.mts.map +0 -1
  108. package/resources/v1/audio-recaps/sections.d.ts +0 -35
  109. package/resources/v1/audio-recaps/sections.d.ts.map +0 -1
  110. package/resources/v1/audio-recaps/sections.js +0 -42
  111. package/resources/v1/audio-recaps/sections.js.map +0 -1
  112. package/resources/v1/audio-recaps/sections.mjs +0 -38
  113. package/resources/v1/audio-recaps/sections.mjs.map +0 -1
  114. package/resources/v1/audio-recaps.d.mts +0 -2
  115. package/resources/v1/audio-recaps.d.mts.map +0 -1
  116. package/resources/v1/audio-recaps.d.ts +0 -2
  117. package/resources/v1/audio-recaps.d.ts.map +0 -1
  118. package/resources/v1/audio-recaps.js +0 -6
  119. package/resources/v1/audio-recaps.js.map +0 -1
  120. package/resources/v1/audio-recaps.mjs +0 -3
  121. package/resources/v1/audio-recaps.mjs.map +0 -1
  122. package/resources/v1/chat/chat.d.mts +0 -156
  123. package/resources/v1/chat/chat.d.mts.map +0 -1
  124. package/resources/v1/chat/chat.d.ts +0 -156
  125. package/resources/v1/chat/chat.d.ts.map +0 -1
  126. package/resources/v1/chat/chat.js +0 -99
  127. package/resources/v1/chat/chat.js.map +0 -1
  128. package/resources/v1/chat/chat.mjs +0 -94
  129. package/resources/v1/chat/chat.mjs.map +0 -1
  130. package/resources/v1/chat/index.d.mts +0 -4
  131. package/resources/v1/chat/index.d.mts.map +0 -1
  132. package/resources/v1/chat/index.d.ts +0 -4
  133. package/resources/v1/chat/index.d.ts.map +0 -1
  134. package/resources/v1/chat/index.js +0 -11
  135. package/resources/v1/chat/index.js.map +0 -1
  136. package/resources/v1/chat/index.mjs +0 -5
  137. package/resources/v1/chat/index.mjs.map +0 -1
  138. package/resources/v1/chat/sessions.d.mts +0 -28
  139. package/resources/v1/chat/sessions.d.mts.map +0 -1
  140. package/resources/v1/chat/sessions.d.ts +0 -28
  141. package/resources/v1/chat/sessions.d.ts.map +0 -1
  142. package/resources/v1/chat/sessions.js +0 -38
  143. package/resources/v1/chat/sessions.js.map +0 -1
  144. package/resources/v1/chat/sessions.mjs +0 -34
  145. package/resources/v1/chat/sessions.mjs.map +0 -1
  146. package/resources/v1/chat/test.d.mts +0 -20
  147. package/resources/v1/chat/test.d.mts.map +0 -1
  148. package/resources/v1/chat/test.d.ts +0 -20
  149. package/resources/v1/chat/test.d.ts.map +0 -1
  150. package/resources/v1/chat/test.js +0 -34
  151. package/resources/v1/chat/test.js.map +0 -1
  152. package/resources/v1/chat/test.mjs +0 -30
  153. package/resources/v1/chat/test.mjs.map +0 -1
  154. package/resources/v1/chat.d.mts +0 -2
  155. package/resources/v1/chat.d.mts.map +0 -1
  156. package/resources/v1/chat.d.ts +0 -2
  157. package/resources/v1/chat.d.ts.map +0 -1
  158. package/resources/v1/chat.js +0 -6
  159. package/resources/v1/chat.js.map +0 -1
  160. package/resources/v1/chat.mjs +0 -3
  161. package/resources/v1/chat.mjs.map +0 -1
  162. package/resources/v1/explainers.d.mts +0 -152
  163. package/resources/v1/explainers.d.mts.map +0 -1
  164. package/resources/v1/explainers.d.ts +0 -152
  165. package/resources/v1/explainers.d.ts.map +0 -1
  166. package/resources/v1/explainers.js +0 -64
  167. package/resources/v1/explainers.js.map +0 -1
  168. package/resources/v1/explainers.mjs +0 -60
  169. package/resources/v1/explainers.mjs.map +0 -1
  170. package/resources/v1/flashcards.d.mts +0 -256
  171. package/resources/v1/flashcards.d.mts.map +0 -1
  172. package/resources/v1/flashcards.d.ts +0 -256
  173. package/resources/v1/flashcards.d.ts.map +0 -1
  174. package/resources/v1/flashcards.js +0 -112
  175. package/resources/v1/flashcards.js.map +0 -1
  176. package/resources/v1/flashcards.mjs +0 -108
  177. package/resources/v1/flashcards.mjs.map +0 -1
  178. package/resources/v1/scenarios/component.d.mts +0 -84
  179. package/resources/v1/scenarios/component.d.mts.map +0 -1
  180. package/resources/v1/scenarios/component.d.ts +0 -84
  181. package/resources/v1/scenarios/component.d.ts.map +0 -1
  182. package/resources/v1/scenarios/component.js +0 -56
  183. package/resources/v1/scenarios/component.js.map +0 -1
  184. package/resources/v1/scenarios/component.mjs +0 -52
  185. package/resources/v1/scenarios/component.mjs.map +0 -1
  186. package/resources/v1/scenarios/index.d.mts +0 -5
  187. package/resources/v1/scenarios/index.d.mts.map +0 -1
  188. package/resources/v1/scenarios/index.d.ts +0 -5
  189. package/resources/v1/scenarios/index.d.ts.map +0 -1
  190. package/resources/v1/scenarios/index.js +0 -13
  191. package/resources/v1/scenarios/index.js.map +0 -1
  192. package/resources/v1/scenarios/index.mjs +0 -6
  193. package/resources/v1/scenarios/index.mjs.map +0 -1
  194. package/resources/v1/scenarios/scenarios.d.mts +0 -289
  195. package/resources/v1/scenarios/scenarios.d.mts.map +0 -1
  196. package/resources/v1/scenarios/scenarios.d.ts +0 -289
  197. package/resources/v1/scenarios/scenarios.d.ts.map +0 -1
  198. package/resources/v1/scenarios/scenarios.js +0 -131
  199. package/resources/v1/scenarios/scenarios.js.map +0 -1
  200. package/resources/v1/scenarios/scenarios.mjs +0 -126
  201. package/resources/v1/scenarios/scenarios.mjs.map +0 -1
  202. package/resources/v1/scenarios/sessions.d.mts +0 -20
  203. package/resources/v1/scenarios/sessions.d.mts.map +0 -1
  204. package/resources/v1/scenarios/sessions.d.ts +0 -20
  205. package/resources/v1/scenarios/sessions.d.ts.map +0 -1
  206. package/resources/v1/scenarios/sessions.js +0 -35
  207. package/resources/v1/scenarios/sessions.js.map +0 -1
  208. package/resources/v1/scenarios/sessions.mjs +0 -31
  209. package/resources/v1/scenarios/sessions.mjs.map +0 -1
  210. package/resources/v1/scenarios/submissions/index.d.mts +0 -3
  211. package/resources/v1/scenarios/submissions/index.d.mts.map +0 -1
  212. package/resources/v1/scenarios/submissions/index.d.ts +0 -3
  213. package/resources/v1/scenarios/submissions/index.d.ts.map +0 -1
  214. package/resources/v1/scenarios/submissions/index.js +0 -9
  215. package/resources/v1/scenarios/submissions/index.js.map +0 -1
  216. package/resources/v1/scenarios/submissions/index.mjs +0 -4
  217. package/resources/v1/scenarios/submissions/index.mjs.map +0 -1
  218. package/resources/v1/scenarios/submissions/submissions.d.mts +0 -10
  219. package/resources/v1/scenarios/submissions/submissions.d.mts.map +0 -1
  220. package/resources/v1/scenarios/submissions/submissions.d.ts +0 -10
  221. package/resources/v1/scenarios/submissions/submissions.d.ts.map +0 -1
  222. package/resources/v1/scenarios/submissions/submissions.js +0 -17
  223. package/resources/v1/scenarios/submissions/submissions.js.map +0 -1
  224. package/resources/v1/scenarios/submissions/submissions.mjs +0 -12
  225. package/resources/v1/scenarios/submissions/submissions.mjs.map +0 -1
  226. package/resources/v1/scenarios/submissions/user.d.mts +0 -22
  227. package/resources/v1/scenarios/submissions/user.d.mts.map +0 -1
  228. package/resources/v1/scenarios/submissions/user.d.ts +0 -22
  229. package/resources/v1/scenarios/submissions/user.d.ts.map +0 -1
  230. package/resources/v1/scenarios/submissions/user.js +0 -37
  231. package/resources/v1/scenarios/submissions/user.js.map +0 -1
  232. package/resources/v1/scenarios/submissions/user.mjs +0 -33
  233. package/resources/v1/scenarios/submissions/user.mjs.map +0 -1
  234. package/resources/v1/scenarios/submissions.d.mts +0 -2
  235. package/resources/v1/scenarios/submissions.d.mts.map +0 -1
  236. package/resources/v1/scenarios/submissions.d.ts +0 -2
  237. package/resources/v1/scenarios/submissions.d.ts.map +0 -1
  238. package/resources/v1/scenarios/submissions.js +0 -6
  239. package/resources/v1/scenarios/submissions.js.map +0 -1
  240. package/resources/v1/scenarios/submissions.mjs +0 -3
  241. package/resources/v1/scenarios/submissions.mjs.map +0 -1
  242. package/resources/v1/scenarios.d.mts +0 -2
  243. package/resources/v1/scenarios.d.mts.map +0 -1
  244. package/resources/v1/scenarios.d.ts +0 -2
  245. package/resources/v1/scenarios.d.ts.map +0 -1
  246. package/resources/v1/scenarios.js +0 -6
  247. package/resources/v1/scenarios.js.map +0 -1
  248. package/resources/v1/scenarios.mjs +0 -3
  249. package/resources/v1/scenarios.mjs.map +0 -1
  250. package/resources/v1/tests/component.d.mts +0 -13
  251. package/resources/v1/tests/component.d.mts.map +0 -1
  252. package/resources/v1/tests/component.d.ts +0 -13
  253. package/resources/v1/tests/component.d.ts.map +0 -1
  254. package/resources/v1/tests/component.js +0 -23
  255. package/resources/v1/tests/component.js.map +0 -1
  256. package/resources/v1/tests/component.mjs +0 -19
  257. package/resources/v1/tests/component.mjs.map +0 -1
  258. package/resources/v1/tests/index.d.mts +0 -3
  259. package/resources/v1/tests/index.d.mts.map +0 -1
  260. package/resources/v1/tests/index.d.ts +0 -3
  261. package/resources/v1/tests/index.d.ts.map +0 -1
  262. package/resources/v1/tests/index.js +0 -9
  263. package/resources/v1/tests/index.js.map +0 -1
  264. package/resources/v1/tests/index.mjs +0 -4
  265. package/resources/v1/tests/index.mjs.map +0 -1
  266. package/resources/v1/tests/tests.d.mts +0 -112
  267. package/resources/v1/tests/tests.d.mts.map +0 -1
  268. package/resources/v1/tests/tests.d.ts +0 -112
  269. package/resources/v1/tests/tests.d.ts.map +0 -1
  270. package/resources/v1/tests/tests.js +0 -112
  271. package/resources/v1/tests/tests.js.map +0 -1
  272. package/resources/v1/tests/tests.mjs +0 -107
  273. package/resources/v1/tests/tests.mjs.map +0 -1
  274. package/resources/v1/tests.d.mts +0 -2
  275. package/resources/v1/tests.d.mts.map +0 -1
  276. package/resources/v1/tests.d.ts +0 -2
  277. package/resources/v1/tests.d.ts.map +0 -1
  278. package/resources/v1/tests.js +0 -6
  279. package/resources/v1/tests.js.map +0 -1
  280. package/resources/v1/tests.mjs +0 -3
  281. package/resources/v1/tests.mjs.map +0 -1
  282. package/src/resources/v1/audio-recaps/audio-recaps.ts +0 -79
  283. package/src/resources/v1/audio-recaps/index.ts +0 -4
  284. package/src/resources/v1/audio-recaps/sections.ts +0 -53
  285. package/src/resources/v1/audio-recaps.ts +0 -3
  286. package/src/resources/v1/chat/chat.ts +0 -229
  287. package/src/resources/v1/chat/index.ts +0 -5
  288. package/src/resources/v1/chat/sessions.ts +0 -46
  289. package/src/resources/v1/chat/test.ts +0 -34
  290. package/src/resources/v1/chat.ts +0 -3
  291. package/src/resources/v1/explainers.ts +0 -203
  292. package/src/resources/v1/flashcards.ts +0 -353
  293. package/src/resources/v1/scenarios/component.ts +0 -118
  294. package/src/resources/v1/scenarios/index.ts +0 -13
  295. package/src/resources/v1/scenarios/scenarios.ts +0 -400
  296. package/src/resources/v1/scenarios/sessions.ts +0 -35
  297. package/src/resources/v1/scenarios/submissions/index.ts +0 -4
  298. package/src/resources/v1/scenarios/submissions/submissions.ts +0 -15
  299. package/src/resources/v1/scenarios/submissions/user.ts +0 -37
  300. package/src/resources/v1/scenarios/submissions.ts +0 -3
  301. package/src/resources/v1/scenarios.ts +0 -3
  302. package/src/resources/v1/tests/component.ts +0 -22
  303. package/src/resources/v1/tests/index.ts +0 -10
  304. package/src/resources/v1/tests/tests.ts +0 -173
  305. package/src/resources/v1/tests.ts +0 -3
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import { APIPromise } from '../../core/api-promise';
5
+ import { buildHeaders } from '../../internal/headers';
5
6
  import { RequestOptions } from '../../internal/request-options';
6
7
  import { path } from '../../internal/utils/path';
7
8
 
@@ -24,6 +25,21 @@ export class AssignmentGrader extends APIResource {
24
25
  return this._client.post('/api/v1/assignment-grader/create', { body, ...options });
25
26
  }
26
27
 
28
+ /**
29
+ * Delete an assignment grader by ID
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * await client.v1.assignmentGrader.delete('id');
34
+ * ```
35
+ */
36
+ delete(id: string, options?: RequestOptions): APIPromise<void> {
37
+ return this._client.delete(path`/api/v1/assignment-grader/delete/${id}`, {
38
+ ...options,
39
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
40
+ });
41
+ }
42
+
27
43
  /**
28
44
  * Get all assignment graders
29
45
  *
@@ -52,10 +68,15 @@ export class AssignmentGrader extends APIResource {
52
68
  }
53
69
 
54
70
  export interface AssignmentGraderResponse {
71
+ /**
72
+ * Version key
73
+ */
74
+ __v: number;
75
+
55
76
  /**
56
77
  * Assignment grader ID
57
78
  */
58
- id: string;
79
+ _id: string;
59
80
 
60
81
  /**
61
82
  * Creation timestamp
@@ -67,6 +88,11 @@ export interface AssignmentGraderResponse {
67
88
  */
68
89
  grade: number;
69
90
 
91
+ /**
92
+ * Organization ID
93
+ */
94
+ organizationId: string;
95
+
70
96
  /**
71
97
  * Grading results
72
98
  */
@@ -76,6 +102,26 @@ export interface AssignmentGraderResponse {
76
102
  * Assignment title
77
103
  */
78
104
  title: string;
105
+
106
+ /**
107
+ * Update timestamp
108
+ */
109
+ updatedAt: string;
110
+
111
+ /**
112
+ * Material ID
113
+ */
114
+ materialId?: string;
115
+
116
+ /**
117
+ * Text that was graded
118
+ */
119
+ textToGrade?: string;
120
+
121
+ /**
122
+ * User ID
123
+ */
124
+ userId?: string;
79
125
  }
80
126
 
81
127
  export type AssignmentGraderGetAllResponse = Array<AssignmentGraderResponse>;
@@ -176,6 +176,7 @@ export interface Component {
176
176
  */
177
177
  type:
178
178
  | 'chat'
179
+ | 'data_analyst'
179
180
  | 'flashcards'
180
181
  | 'scenarios'
181
182
  | 'practice_test'
@@ -257,6 +258,7 @@ export interface ComponentCreateParams {
257
258
  */
258
259
  config:
259
260
  | ComponentCreateParams.ChatConfigDto
261
+ | ComponentCreateParams.DataAnalystConfigDto
260
262
  | ComponentCreateParams.FlashcardsConfigDto
261
263
  | ComponentCreateParams.ScenariosConfigDto
262
264
  | ComponentCreateParams.PracticeTestConfigDto
@@ -275,6 +277,7 @@ export interface ComponentCreateParams {
275
277
  */
276
278
  type:
277
279
  | 'chat'
280
+ | 'data_analyst'
278
281
  | 'flashcards'
279
282
  | 'scenarios'
280
283
  | 'practice_test'
@@ -311,6 +314,11 @@ export namespace ComponentCreateParams {
311
314
  */
312
315
  enableFollowUps?: boolean;
313
316
 
317
+ /**
318
+ * Enable guardrails for content moderation
319
+ */
320
+ enableGuardrails?: boolean;
321
+
314
322
  /**
315
323
  * Enable conversation history
316
324
  */
@@ -336,6 +344,11 @@ export namespace ComponentCreateParams {
336
344
  */
337
345
  folders?: Array<string>;
338
346
 
347
+ /**
348
+ * Guardrail rules for content moderation
349
+ */
350
+ guardrailRules?: Array<ChatConfigDto.GuardrailRule>;
351
+
339
352
  /**
340
353
  * Material IDs
341
354
  */
@@ -362,6 +375,107 @@ export namespace ComponentCreateParams {
362
375
  temperature?: number;
363
376
  }
364
377
 
378
+ export namespace ChatConfigDto {
379
+ export interface GuardrailRule {
380
+ /**
381
+ * Unique identifier for the rule
382
+ */
383
+ id: string;
384
+
385
+ /**
386
+ * Action to take when rule is triggered
387
+ */
388
+ action: 'block' | 'warn' | 'modify';
389
+
390
+ /**
391
+ * Condition to check
392
+ */
393
+ condition: string;
394
+
395
+ /**
396
+ * Description of the rule
397
+ */
398
+ description: string;
399
+
400
+ /**
401
+ * Message to show when rule is triggered
402
+ */
403
+ message?: string;
404
+ }
405
+ }
406
+
407
+ export interface DataAnalystConfigDto {
408
+ /**
409
+ * AI model to use
410
+ */
411
+ model: string;
412
+
413
+ /**
414
+ * Enable component creation
415
+ */
416
+ enableComponentCreation?: boolean;
417
+
418
+ /**
419
+ * Enable follow-up questions
420
+ */
421
+ enableFollowUps?: boolean;
422
+
423
+ /**
424
+ * Enable conversation history
425
+ */
426
+ enableHistory?: boolean;
427
+
428
+ /**
429
+ * Enable RAG search
430
+ */
431
+ enableRAGSearch?: boolean;
432
+
433
+ /**
434
+ * Enable voice interactions
435
+ */
436
+ enableVoice?: boolean;
437
+
438
+ /**
439
+ * Enable web search
440
+ */
441
+ enableWebSearch?: boolean;
442
+
443
+ /**
444
+ * Folder IDs
445
+ */
446
+ folders?: Array<string>;
447
+
448
+ /**
449
+ * Group IDs to filter data
450
+ */
451
+ groupIds?: Array<string>;
452
+
453
+ /**
454
+ * Material IDs
455
+ */
456
+ materials?: Array<string>;
457
+
458
+ /**
459
+ * Maximum steps for multi-step tool calls
460
+ */
461
+ maxSteps?: number;
462
+
463
+ /**
464
+ * Maximum tokens for response
465
+ */
466
+ maxTokens?: number;
467
+
468
+ /**
469
+ * System prompt for the data analyst
470
+ */
471
+ systemPrompt?: string;
472
+
473
+ /**
474
+ * Temperature for response generation
475
+ */
476
+ temperature?: number;
477
+ }
478
+
365
479
  export interface FlashcardsConfigDto {
366
480
  /**
367
481
  * Types of flashcards
@@ -818,6 +932,7 @@ export interface ComponentListParams {
818
932
  */
819
933
  type?:
820
934
  | 'chat'
935
+ | 'data_analyst'
821
936
  | 'flashcards'
822
937
  | 'scenarios'
823
938
  | 'practice_test'
@@ -874,6 +989,11 @@ export namespace ComponentGenerateEmbedParams {
874
989
  * Feature toggles
875
990
  */
876
991
  export interface Features {
992
+ /**
993
+ * Enable bad words filter
994
+ */
995
+ enableBadWordsFilter: boolean;
996
+
877
997
  /**
878
998
  * Enable component creation
879
999
  */
@@ -884,6 +1004,11 @@ export namespace ComponentGenerateEmbedParams {
884
1004
  */
885
1005
  enableFollowUps?: boolean;
886
1006
 
1007
+ /**
1008
+ * Enable guardrails
1009
+ */
1010
+ enableGuardrails?: boolean;
1011
+
887
1012
  /**
888
1013
  * Enable history
889
1014
  */
@@ -6,17 +6,6 @@ export {
6
6
  type AssignmentGraderGetAllResponse,
7
7
  type AssignmentGraderCreateParams,
8
8
  } from './assignment-grader';
9
- export {
10
- AudioRecaps,
11
- type AudioRecapCreateParams,
12
- type AudioRecapAskQuestionParams,
13
- } from './audio-recaps/index';
14
- export {
15
- Chat,
16
- type ChatGetSessionParams,
17
- type ChatSendMessageParams,
18
- type ChatStreamParams,
19
- } from './chat/index';
20
9
  export {
21
10
  Components,
22
11
  type Component,
@@ -28,21 +17,10 @@ export {
28
17
  type ComponentGenerateEmbedParams,
29
18
  } from './components';
30
19
  export { Embed, type EmbedGetThemeParams, type EmbedVerifyParams } from './embed/index';
31
- export { Explainers, type ExplainerCreateParams, type ExplainerHandleWebhookParams } from './explainers';
32
- export {
33
- Flashcards,
34
- type FlashcardBatchProcessResponse,
35
- type FlashcardGetAlgorithmResponse,
36
- type FlashcardGetTypesResponse,
37
- type FlashcardBatchProcessParams,
38
- type FlashcardGetAllParams,
39
- type FlashcardGetDueParams,
40
- type FlashcardGetStatsParams,
41
- type FlashcardRateParams,
42
- } from './flashcards';
43
20
  export { Folders, type FolderCreateParams, type FolderUpdateParams, type FolderListParams } from './folders';
44
21
  export {
45
22
  Materials,
23
+ type Content,
46
24
  type Material,
47
25
  type MaterialListResponse,
48
26
  type MaterialBatchCreateResponse,
@@ -52,26 +30,12 @@ export {
52
30
  type MaterialCreateParams,
53
31
  type MaterialListParams,
54
32
  type MaterialBatchCreateParams,
33
+ type MaterialCreateAndProcessParams,
55
34
  type MaterialGetDownloadURLParams,
56
35
  type MaterialMoveParams,
57
36
  type MaterialRenameParams,
58
37
  type MaterialSearchParams,
59
38
  } from './materials/index';
60
- export {
61
- Scenarios,
62
- type Scenario,
63
- type UpdateScenario,
64
- type ScenarioCreateParams,
65
- type ScenarioUpdateParams,
66
- type ScenarioSubmitAnswerParams,
67
- } from './scenarios/index';
68
- export {
69
- Tests,
70
- type TestCreateParams,
71
- type TestRetakeParams,
72
- type TestSubmitParams,
73
- type TestSubmitAnswerParams,
74
- } from './tests/index';
75
39
  export { Upload } from './upload/index';
76
40
  export {
77
41
  Usage,
@@ -3,6 +3,7 @@
3
3
  export { Bulk, type BulkMoveResponse, type BulkMoveParams } from './bulk';
4
4
  export {
5
5
  Materials,
6
+ type Content,
6
7
  type Material,
7
8
  type MaterialListResponse,
8
9
  type MaterialBatchCreateResponse,
@@ -12,6 +13,7 @@ export {
12
13
  type MaterialCreateParams,
13
14
  type MaterialListParams,
14
15
  type MaterialBatchCreateParams,
16
+ type MaterialCreateAndProcessParams,
15
17
  type MaterialGetDownloadURLParams,
16
18
  type MaterialMoveParams,
17
19
  type MaterialRenameParams,
@@ -26,9 +28,12 @@ export {
26
28
  } from './test';
27
29
  export {
28
30
  Upload,
31
+ type Complete,
29
32
  type UploadCreatePresignedURLResponse,
30
33
  type UploadCompleteUploadParams,
31
34
  type UploadCreatePresignedURLParams,
32
35
  type UploadUploadFileParams,
36
+ type UploadUploadFileAndProcessParams,
33
37
  type UploadUploadFromURLParams,
38
+ type UploadUploadURLAndProcessParams,
34
39
  } from './upload';
@@ -13,12 +13,15 @@ import {
13
13
  } from './test';
14
14
  import * as UploadAPI from './upload';
15
15
  import {
16
+ Complete,
16
17
  Upload,
17
18
  UploadCompleteUploadParams,
18
19
  UploadCreatePresignedURLParams,
19
20
  UploadCreatePresignedURLResponse,
21
+ UploadUploadFileAndProcessParams,
20
22
  UploadUploadFileParams,
21
23
  UploadUploadFromURLParams,
24
+ UploadUploadURLAndProcessParams,
22
25
  } from './upload';
23
26
  import { APIPromise } from '../../../core/api-promise';
24
27
  import { buildHeaders } from '../../../internal/headers';
@@ -110,6 +113,24 @@ export class Materials extends APIResource {
110
113
  return this._client.post('/api/v1/materials/batch', { body, ...options });
111
114
  }
112
115
 
116
+ /**
117
+ * Creates a material and waits for processing to finish before returning. Useful
118
+ * for synchronous API usage.
119
+ *
120
+ * @example
121
+ * ```ts
122
+ * const material = await client.v1.materials.createAndProcess(
123
+ * {
124
+ * content: { type: 'text' },
125
+ * name: 'Chapter 1 - Introduction',
126
+ * },
127
+ * );
128
+ * ```
129
+ */
130
+ createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<Material> {
131
+ return this._client.post('/api/v1/materials/upload-and-process', { body, ...options });
132
+ }
133
+
113
134
  /**
114
135
  * Get debug information for a material including extracted content
115
136
  *
@@ -195,6 +216,28 @@ export class Materials extends APIResource {
195
216
  }
196
217
  }
197
218
 
219
+ export interface Content {
220
+ /**
221
+ * Type of content
222
+ */
223
+ type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
224
+
225
+ /**
226
+ * URL to fetch content from
227
+ */
228
+ sourceUrl?: string;
229
+
230
+ /**
231
+ * Text content (for text type)
232
+ */
233
+ text?: string;
234
+
235
+ /**
236
+ * URL to the content (for url type)
237
+ */
238
+ url?: string;
239
+ }
240
+
198
241
  export interface Material {
199
242
  /**
200
243
  * Material ID
@@ -441,7 +484,7 @@ export interface MaterialCreateParams {
441
484
  /**
442
485
  * Content details
443
486
  */
444
- content: MaterialCreateParams.Content;
487
+ content: Content;
445
488
 
446
489
  /**
447
490
  * Name of the material
@@ -454,33 +497,6 @@ export interface MaterialCreateParams {
454
497
  folderId?: string;
455
498
  }
456
499
 
457
- export namespace MaterialCreateParams {
458
- /**
459
- * Content details
460
- */
461
- export interface Content {
462
- /**
463
- * Type of content
464
- */
465
- type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
466
-
467
- /**
468
- * URL to fetch content from
469
- */
470
- sourceUrl?: string;
471
-
472
- /**
473
- * Text content (for text type)
474
- */
475
- text?: string;
476
-
477
- /**
478
- * URL to the content (for url type)
479
- */
480
- url?: string;
481
- }
482
- }
483
-
484
500
  export interface MaterialListParams {
485
501
  /**
486
502
  * Filter by folder ID
@@ -519,6 +535,33 @@ export namespace MaterialBatchCreateParams {
519
535
  }
520
536
  }
521
537
 
538
+ export interface MaterialCreateAndProcessParams {
539
+ /**
540
+ * Content details
541
+ */
542
+ content: Content;
543
+
544
+ /**
545
+ * Name of the material
546
+ */
547
+ name: string;
548
+
549
+ /**
550
+ * Folder ID to place the material in
551
+ */
552
+ folderId?: string;
553
+
554
+ /**
555
+ * Polling interval in milliseconds (default: 2 seconds)
556
+ */
557
+ pollIntervalMs?: number;
558
+
559
+ /**
560
+ * Maximum time to wait for processing in milliseconds (default: 5 minutes)
561
+ */
562
+ timeoutMs?: number;
563
+ }
564
+
522
565
  export interface MaterialGetDownloadURLParams {
523
566
  /**
524
567
  * URL expiration time in seconds (default: 3600)
@@ -568,6 +611,7 @@ Materials.Test = Test;
568
611
 
569
612
  export declare namespace Materials {
570
613
  export {
614
+ type Content as Content,
571
615
  type Material as Material,
572
616
  type MaterialListResponse as MaterialListResponse,
573
617
  type MaterialBatchCreateResponse as MaterialBatchCreateResponse,
@@ -577,6 +621,7 @@ export declare namespace Materials {
577
621
  type MaterialCreateParams as MaterialCreateParams,
578
622
  type MaterialListParams as MaterialListParams,
579
623
  type MaterialBatchCreateParams as MaterialBatchCreateParams,
624
+ type MaterialCreateAndProcessParams as MaterialCreateAndProcessParams,
580
625
  type MaterialGetDownloadURLParams as MaterialGetDownloadURLParams,
581
626
  type MaterialMoveParams as MaterialMoveParams,
582
627
  type MaterialRenameParams as MaterialRenameParams,
@@ -585,11 +630,14 @@ export declare namespace Materials {
585
630
 
586
631
  export {
587
632
  Upload as Upload,
633
+ type Complete as Complete,
588
634
  type UploadCreatePresignedURLResponse as UploadCreatePresignedURLResponse,
589
635
  type UploadCompleteUploadParams as UploadCompleteUploadParams,
590
636
  type UploadCreatePresignedURLParams as UploadCreatePresignedURLParams,
591
637
  type UploadUploadFileParams as UploadUploadFileParams,
638
+ type UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams,
592
639
  type UploadUploadFromURLParams as UploadUploadFromURLParams,
640
+ type UploadUploadURLAndProcessParams as UploadUploadURLAndProcessParams,
593
641
  };
594
642
 
595
643
  export { Bulk as Bulk, type BulkMoveResponse as BulkMoveResponse, type BulkMoveParams as BulkMoveParams };
@@ -68,6 +68,29 @@ export class Upload extends APIResource {
68
68
  );
69
69
  }
70
70
 
71
+ /**
72
+ * Uploads a file and waits for processing to finish before returning. Useful for
73
+ * synchronous API usage.
74
+ *
75
+ * @example
76
+ * ```ts
77
+ * const material =
78
+ * await client.v1.materials.upload.uploadFileAndProcess({
79
+ * file: fs.createReadStream('path/to/file'),
80
+ * name: 'name',
81
+ * });
82
+ * ```
83
+ */
84
+ uploadFileAndProcess(
85
+ body: UploadUploadFileAndProcessParams,
86
+ options?: RequestOptions,
87
+ ): APIPromise<MaterialsAPI.Material> {
88
+ return this._client.post(
89
+ '/api/v1/materials/upload/file-and-process',
90
+ multipartFormRequestOptions({ body, ...options }, this._client),
91
+ );
92
+ }
93
+
71
94
  /**
72
95
  * Upload material from URL
73
96
  *
@@ -86,6 +109,43 @@ export class Upload extends APIResource {
86
109
  ): APIPromise<MaterialsAPI.Material> {
87
110
  return this._client.post('/api/v1/materials/upload/url', { body, ...options });
88
111
  }
112
+
113
+ /**
114
+ * Fetches content from URL and waits for processing to finish before returning.
115
+ * Useful for synchronous API usage.
116
+ *
117
+ * @example
118
+ * ```ts
119
+ * const material =
120
+ * await client.v1.materials.upload.uploadURLAndProcess({
121
+ * name: 'My Document',
122
+ * url: 'https://example.com/document.pdf',
123
+ * });
124
+ * ```
125
+ */
126
+ uploadURLAndProcess(
127
+ body: UploadUploadURLAndProcessParams,
128
+ options?: RequestOptions,
129
+ ): APIPromise<MaterialsAPI.Material> {
130
+ return this._client.post('/api/v1/materials/upload/url-and-process', { body, ...options });
131
+ }
132
+ }
133
+
134
+ export interface Complete {
135
+ /**
136
+ * The ID of the material that was uploaded
137
+ */
138
+ materialId: string;
139
+
140
+ /**
141
+ * The ID of the organization
142
+ */
143
+ organizationId: string;
144
+
145
+ /**
146
+ * The S3 key of the uploaded file
147
+ */
148
+ s3Key: string;
89
149
  }
90
150
 
91
151
  export interface UploadCreatePresignedURLResponse {
@@ -138,6 +198,11 @@ export interface UploadCreatePresignedURLParams {
138
198
  */
139
199
  name: string;
140
200
 
201
+ /**
202
+ * Whether to extract images from files
203
+ */
204
+ extractImages?: boolean;
205
+
141
206
  /**
142
207
  * Folder ID to place the material in
143
208
  */
@@ -152,12 +217,46 @@ export interface UploadUploadFileParams {
152
217
  */
153
218
  name: string;
154
219
 
220
+ /**
221
+ * Whether to extract images from files (true/false, default: true)
222
+ */
223
+ extractImages?: string;
224
+
155
225
  /**
156
226
  * Folder ID (optional)
157
227
  */
158
228
  folderId?: string;
159
229
  }
160
230
 
231
+ export interface UploadUploadFileAndProcessParams {
232
+ file: Uploadable;
233
+
234
+ /**
235
+ * Material name
236
+ */
237
+ name: string;
238
+
239
+ /**
240
+ * Whether to extract images from files (true/false, default: true)
241
+ */
242
+ extractImages?: string;
243
+
244
+ /**
245
+ * Folder ID (optional)
246
+ */
247
+ folderId?: string;
248
+
249
+ /**
250
+ * Polling interval in milliseconds (default: 2000)
251
+ */
252
+ pollIntervalMs?: number;
253
+
254
+ /**
255
+ * Processing timeout in milliseconds (default: 300000)
256
+ */
257
+ timeoutMs?: number;
258
+ }
259
+
161
260
  export interface UploadUploadFromURLParams {
162
261
  /**
163
262
  * Material name
@@ -175,12 +274,42 @@ export interface UploadUploadFromURLParams {
175
274
  folderId?: string;
176
275
  }
177
276
 
277
+ export interface UploadUploadURLAndProcessParams {
278
+ /**
279
+ * Material name
280
+ */
281
+ name: string;
282
+
283
+ /**
284
+ * URL to fetch content from
285
+ */
286
+ url: string;
287
+
288
+ /**
289
+ * Folder ID (optional)
290
+ */
291
+ folderId?: string;
292
+
293
+ /**
294
+ * Polling interval in milliseconds (default: 2 seconds)
295
+ */
296
+ pollIntervalMs?: number;
297
+
298
+ /**
299
+ * Maximum time to wait for processing in milliseconds (default: 5 minutes)
300
+ */
301
+ timeoutMs?: number;
302
+ }
303
+
178
304
  export declare namespace Upload {
179
305
  export {
306
+ type Complete as Complete,
180
307
  type UploadCreatePresignedURLResponse as UploadCreatePresignedURLResponse,
181
308
  type UploadCompleteUploadParams as UploadCompleteUploadParams,
182
309
  type UploadCreatePresignedURLParams as UploadCreatePresignedURLParams,
183
310
  type UploadUploadFileParams as UploadUploadFileParams,
311
+ type UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams,
184
312
  type UploadUploadFromURLParams as UploadUploadFromURLParams,
313
+ type UploadUploadURLAndProcessParams as UploadUploadURLAndProcessParams,
185
314
  };
186
315
  }