@studyfetch/sdk 1.26.0 → 1.28.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 (312) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.json +1 -1
  3. package/resources/v1/components.d.mts +40 -0
  4. package/resources/v1/components.d.mts.map +1 -1
  5. package/resources/v1/components.d.ts +40 -0
  6. package/resources/v1/components.d.ts.map +1 -1
  7. package/resources/v1/index.d.mts +1 -8
  8. package/resources/v1/index.d.mts.map +1 -1
  9. package/resources/v1/index.d.ts +1 -8
  10. package/resources/v1/index.d.ts.map +1 -1
  11. package/resources/v1/index.js +9 -23
  12. package/resources/v1/index.js.map +1 -1
  13. package/resources/v1/index.mjs +0 -7
  14. package/resources/v1/index.mjs.map +1 -1
  15. package/resources/v1/materials/index.d.mts +1 -1
  16. package/resources/v1/materials/index.d.mts.map +1 -1
  17. package/resources/v1/materials/index.d.ts +1 -1
  18. package/resources/v1/materials/index.d.ts.map +1 -1
  19. package/resources/v1/materials/index.js.map +1 -1
  20. package/resources/v1/materials/index.mjs.map +1 -1
  21. package/resources/v1/materials/materials.d.mts +110 -1
  22. package/resources/v1/materials/materials.d.mts.map +1 -1
  23. package/resources/v1/materials/materials.d.ts +110 -1
  24. package/resources/v1/materials/materials.d.ts.map +1 -1
  25. package/resources/v1/materials/materials.js +17 -0
  26. package/resources/v1/materials/materials.js.map +1 -1
  27. package/resources/v1/materials/materials.mjs +17 -0
  28. package/resources/v1/materials/materials.mjs.map +1 -1
  29. package/resources/v1/materials/upload.d.mts +12 -0
  30. package/resources/v1/materials/upload.d.mts.map +1 -1
  31. package/resources/v1/materials/upload.d.ts +12 -0
  32. package/resources/v1/materials/upload.d.ts.map +1 -1
  33. package/resources/v1/v1.d.mts +2 -30
  34. package/resources/v1/v1.d.mts.map +1 -1
  35. package/resources/v1/v1.d.ts +2 -30
  36. package/resources/v1/v1.d.ts.map +1 -1
  37. package/resources/v1/v1.js +0 -28
  38. package/resources/v1/v1.js.map +1 -1
  39. package/resources/v1/v1.mjs +0 -28
  40. package/resources/v1/v1.mjs.map +1 -1
  41. package/src/resources/v1/components.ts +49 -0
  42. package/src/resources/v1/index.ts +2 -45
  43. package/src/resources/v1/materials/index.ts +2 -0
  44. package/src/resources/v1/materials/materials.ts +143 -0
  45. package/src/resources/v1/materials/upload.ts +15 -0
  46. package/src/resources/v1/v1.ts +4 -122
  47. package/src/version.ts +1 -1
  48. package/version.d.mts +1 -1
  49. package/version.d.ts +1 -1
  50. package/version.js +1 -1
  51. package/version.mjs +1 -1
  52. package/resources/v1/audio-recaps/audio-recaps.d.mts +0 -44
  53. package/resources/v1/audio-recaps/audio-recaps.d.mts.map +0 -1
  54. package/resources/v1/audio-recaps/audio-recaps.d.ts +0 -44
  55. package/resources/v1/audio-recaps/audio-recaps.d.ts.map +0 -1
  56. package/resources/v1/audio-recaps/audio-recaps.js +0 -63
  57. package/resources/v1/audio-recaps/audio-recaps.js.map +0 -1
  58. package/resources/v1/audio-recaps/audio-recaps.mjs +0 -58
  59. package/resources/v1/audio-recaps/audio-recaps.mjs.map +0 -1
  60. package/resources/v1/audio-recaps/index.d.mts +0 -3
  61. package/resources/v1/audio-recaps/index.d.mts.map +0 -1
  62. package/resources/v1/audio-recaps/index.d.ts +0 -3
  63. package/resources/v1/audio-recaps/index.d.ts.map +0 -1
  64. package/resources/v1/audio-recaps/index.js +0 -9
  65. package/resources/v1/audio-recaps/index.js.map +0 -1
  66. package/resources/v1/audio-recaps/index.mjs +0 -4
  67. package/resources/v1/audio-recaps/index.mjs.map +0 -1
  68. package/resources/v1/audio-recaps/sections.d.mts +0 -35
  69. package/resources/v1/audio-recaps/sections.d.mts.map +0 -1
  70. package/resources/v1/audio-recaps/sections.d.ts +0 -35
  71. package/resources/v1/audio-recaps/sections.d.ts.map +0 -1
  72. package/resources/v1/audio-recaps/sections.js +0 -42
  73. package/resources/v1/audio-recaps/sections.js.map +0 -1
  74. package/resources/v1/audio-recaps/sections.mjs +0 -38
  75. package/resources/v1/audio-recaps/sections.mjs.map +0 -1
  76. package/resources/v1/audio-recaps.d.mts +0 -2
  77. package/resources/v1/audio-recaps.d.mts.map +0 -1
  78. package/resources/v1/audio-recaps.d.ts +0 -2
  79. package/resources/v1/audio-recaps.d.ts.map +0 -1
  80. package/resources/v1/audio-recaps.js +0 -6
  81. package/resources/v1/audio-recaps.js.map +0 -1
  82. package/resources/v1/audio-recaps.mjs +0 -3
  83. package/resources/v1/audio-recaps.mjs.map +0 -1
  84. package/resources/v1/chat/chat.d.mts +0 -217
  85. package/resources/v1/chat/chat.d.mts.map +0 -1
  86. package/resources/v1/chat/chat.d.ts +0 -217
  87. package/resources/v1/chat/chat.d.ts.map +0 -1
  88. package/resources/v1/chat/chat.js +0 -99
  89. package/resources/v1/chat/chat.js.map +0 -1
  90. package/resources/v1/chat/chat.mjs +0 -94
  91. package/resources/v1/chat/chat.mjs.map +0 -1
  92. package/resources/v1/chat/index.d.mts +0 -4
  93. package/resources/v1/chat/index.d.mts.map +0 -1
  94. package/resources/v1/chat/index.d.ts +0 -4
  95. package/resources/v1/chat/index.d.ts.map +0 -1
  96. package/resources/v1/chat/index.js +0 -11
  97. package/resources/v1/chat/index.js.map +0 -1
  98. package/resources/v1/chat/index.mjs +0 -5
  99. package/resources/v1/chat/index.mjs.map +0 -1
  100. package/resources/v1/chat/sessions.d.mts +0 -28
  101. package/resources/v1/chat/sessions.d.mts.map +0 -1
  102. package/resources/v1/chat/sessions.d.ts +0 -28
  103. package/resources/v1/chat/sessions.d.ts.map +0 -1
  104. package/resources/v1/chat/sessions.js +0 -38
  105. package/resources/v1/chat/sessions.js.map +0 -1
  106. package/resources/v1/chat/sessions.mjs +0 -34
  107. package/resources/v1/chat/sessions.mjs.map +0 -1
  108. package/resources/v1/chat/test.d.mts +0 -20
  109. package/resources/v1/chat/test.d.mts.map +0 -1
  110. package/resources/v1/chat/test.d.ts +0 -20
  111. package/resources/v1/chat/test.d.ts.map +0 -1
  112. package/resources/v1/chat/test.js +0 -34
  113. package/resources/v1/chat/test.js.map +0 -1
  114. package/resources/v1/chat/test.mjs +0 -30
  115. package/resources/v1/chat/test.mjs.map +0 -1
  116. package/resources/v1/chat.d.mts +0 -2
  117. package/resources/v1/chat.d.mts.map +0 -1
  118. package/resources/v1/chat.d.ts +0 -2
  119. package/resources/v1/chat.d.ts.map +0 -1
  120. package/resources/v1/chat.js +0 -6
  121. package/resources/v1/chat.js.map +0 -1
  122. package/resources/v1/chat.mjs +0 -3
  123. package/resources/v1/chat.mjs.map +0 -1
  124. package/resources/v1/data-analyst/data-analyst.d.mts +0 -156
  125. package/resources/v1/data-analyst/data-analyst.d.mts.map +0 -1
  126. package/resources/v1/data-analyst/data-analyst.d.ts +0 -156
  127. package/resources/v1/data-analyst/data-analyst.d.ts.map +0 -1
  128. package/resources/v1/data-analyst/data-analyst.js +0 -99
  129. package/resources/v1/data-analyst/data-analyst.js.map +0 -1
  130. package/resources/v1/data-analyst/data-analyst.mjs +0 -94
  131. package/resources/v1/data-analyst/data-analyst.mjs.map +0 -1
  132. package/resources/v1/data-analyst/index.d.mts +0 -4
  133. package/resources/v1/data-analyst/index.d.mts.map +0 -1
  134. package/resources/v1/data-analyst/index.d.ts +0 -4
  135. package/resources/v1/data-analyst/index.d.ts.map +0 -1
  136. package/resources/v1/data-analyst/index.js +0 -11
  137. package/resources/v1/data-analyst/index.js.map +0 -1
  138. package/resources/v1/data-analyst/index.mjs +0 -5
  139. package/resources/v1/data-analyst/index.mjs.map +0 -1
  140. package/resources/v1/data-analyst/sessions.d.mts +0 -28
  141. package/resources/v1/data-analyst/sessions.d.mts.map +0 -1
  142. package/resources/v1/data-analyst/sessions.d.ts +0 -28
  143. package/resources/v1/data-analyst/sessions.d.ts.map +0 -1
  144. package/resources/v1/data-analyst/sessions.js +0 -38
  145. package/resources/v1/data-analyst/sessions.js.map +0 -1
  146. package/resources/v1/data-analyst/sessions.mjs +0 -34
  147. package/resources/v1/data-analyst/sessions.mjs.map +0 -1
  148. package/resources/v1/data-analyst/test.d.mts +0 -20
  149. package/resources/v1/data-analyst/test.d.mts.map +0 -1
  150. package/resources/v1/data-analyst/test.d.ts +0 -20
  151. package/resources/v1/data-analyst/test.d.ts.map +0 -1
  152. package/resources/v1/data-analyst/test.js +0 -34
  153. package/resources/v1/data-analyst/test.js.map +0 -1
  154. package/resources/v1/data-analyst/test.mjs +0 -30
  155. package/resources/v1/data-analyst/test.mjs.map +0 -1
  156. package/resources/v1/data-analyst.d.mts +0 -2
  157. package/resources/v1/data-analyst.d.mts.map +0 -1
  158. package/resources/v1/data-analyst.d.ts +0 -2
  159. package/resources/v1/data-analyst.d.ts.map +0 -1
  160. package/resources/v1/data-analyst.js +0 -6
  161. package/resources/v1/data-analyst.js.map +0 -1
  162. package/resources/v1/data-analyst.mjs +0 -3
  163. package/resources/v1/data-analyst.mjs.map +0 -1
  164. package/resources/v1/explainers.d.mts +0 -152
  165. package/resources/v1/explainers.d.mts.map +0 -1
  166. package/resources/v1/explainers.d.ts +0 -152
  167. package/resources/v1/explainers.d.ts.map +0 -1
  168. package/resources/v1/explainers.js +0 -64
  169. package/resources/v1/explainers.js.map +0 -1
  170. package/resources/v1/explainers.mjs +0 -60
  171. package/resources/v1/explainers.mjs.map +0 -1
  172. package/resources/v1/flashcards.d.mts +0 -256
  173. package/resources/v1/flashcards.d.mts.map +0 -1
  174. package/resources/v1/flashcards.d.ts +0 -256
  175. package/resources/v1/flashcards.d.ts.map +0 -1
  176. package/resources/v1/flashcards.js +0 -112
  177. package/resources/v1/flashcards.js.map +0 -1
  178. package/resources/v1/flashcards.mjs +0 -108
  179. package/resources/v1/flashcards.mjs.map +0 -1
  180. package/resources/v1/scenarios/component.d.mts +0 -84
  181. package/resources/v1/scenarios/component.d.mts.map +0 -1
  182. package/resources/v1/scenarios/component.d.ts +0 -84
  183. package/resources/v1/scenarios/component.d.ts.map +0 -1
  184. package/resources/v1/scenarios/component.js +0 -56
  185. package/resources/v1/scenarios/component.js.map +0 -1
  186. package/resources/v1/scenarios/component.mjs +0 -52
  187. package/resources/v1/scenarios/component.mjs.map +0 -1
  188. package/resources/v1/scenarios/index.d.mts +0 -5
  189. package/resources/v1/scenarios/index.d.mts.map +0 -1
  190. package/resources/v1/scenarios/index.d.ts +0 -5
  191. package/resources/v1/scenarios/index.d.ts.map +0 -1
  192. package/resources/v1/scenarios/index.js +0 -13
  193. package/resources/v1/scenarios/index.js.map +0 -1
  194. package/resources/v1/scenarios/index.mjs +0 -6
  195. package/resources/v1/scenarios/index.mjs.map +0 -1
  196. package/resources/v1/scenarios/scenarios.d.mts +0 -289
  197. package/resources/v1/scenarios/scenarios.d.mts.map +0 -1
  198. package/resources/v1/scenarios/scenarios.d.ts +0 -289
  199. package/resources/v1/scenarios/scenarios.d.ts.map +0 -1
  200. package/resources/v1/scenarios/scenarios.js +0 -131
  201. package/resources/v1/scenarios/scenarios.js.map +0 -1
  202. package/resources/v1/scenarios/scenarios.mjs +0 -126
  203. package/resources/v1/scenarios/scenarios.mjs.map +0 -1
  204. package/resources/v1/scenarios/sessions.d.mts +0 -20
  205. package/resources/v1/scenarios/sessions.d.mts.map +0 -1
  206. package/resources/v1/scenarios/sessions.d.ts +0 -20
  207. package/resources/v1/scenarios/sessions.d.ts.map +0 -1
  208. package/resources/v1/scenarios/sessions.js +0 -35
  209. package/resources/v1/scenarios/sessions.js.map +0 -1
  210. package/resources/v1/scenarios/sessions.mjs +0 -31
  211. package/resources/v1/scenarios/sessions.mjs.map +0 -1
  212. package/resources/v1/scenarios/submissions/index.d.mts +0 -3
  213. package/resources/v1/scenarios/submissions/index.d.mts.map +0 -1
  214. package/resources/v1/scenarios/submissions/index.d.ts +0 -3
  215. package/resources/v1/scenarios/submissions/index.d.ts.map +0 -1
  216. package/resources/v1/scenarios/submissions/index.js +0 -9
  217. package/resources/v1/scenarios/submissions/index.js.map +0 -1
  218. package/resources/v1/scenarios/submissions/index.mjs +0 -4
  219. package/resources/v1/scenarios/submissions/index.mjs.map +0 -1
  220. package/resources/v1/scenarios/submissions/submissions.d.mts +0 -10
  221. package/resources/v1/scenarios/submissions/submissions.d.mts.map +0 -1
  222. package/resources/v1/scenarios/submissions/submissions.d.ts +0 -10
  223. package/resources/v1/scenarios/submissions/submissions.d.ts.map +0 -1
  224. package/resources/v1/scenarios/submissions/submissions.js +0 -17
  225. package/resources/v1/scenarios/submissions/submissions.js.map +0 -1
  226. package/resources/v1/scenarios/submissions/submissions.mjs +0 -12
  227. package/resources/v1/scenarios/submissions/submissions.mjs.map +0 -1
  228. package/resources/v1/scenarios/submissions/user.d.mts +0 -22
  229. package/resources/v1/scenarios/submissions/user.d.mts.map +0 -1
  230. package/resources/v1/scenarios/submissions/user.d.ts +0 -22
  231. package/resources/v1/scenarios/submissions/user.d.ts.map +0 -1
  232. package/resources/v1/scenarios/submissions/user.js +0 -37
  233. package/resources/v1/scenarios/submissions/user.js.map +0 -1
  234. package/resources/v1/scenarios/submissions/user.mjs +0 -33
  235. package/resources/v1/scenarios/submissions/user.mjs.map +0 -1
  236. package/resources/v1/scenarios/submissions.d.mts +0 -2
  237. package/resources/v1/scenarios/submissions.d.mts.map +0 -1
  238. package/resources/v1/scenarios/submissions.d.ts +0 -2
  239. package/resources/v1/scenarios/submissions.d.ts.map +0 -1
  240. package/resources/v1/scenarios/submissions.js +0 -6
  241. package/resources/v1/scenarios/submissions.js.map +0 -1
  242. package/resources/v1/scenarios/submissions.mjs +0 -3
  243. package/resources/v1/scenarios/submissions.mjs.map +0 -1
  244. package/resources/v1/scenarios.d.mts +0 -2
  245. package/resources/v1/scenarios.d.mts.map +0 -1
  246. package/resources/v1/scenarios.d.ts +0 -2
  247. package/resources/v1/scenarios.d.ts.map +0 -1
  248. package/resources/v1/scenarios.js +0 -6
  249. package/resources/v1/scenarios.js.map +0 -1
  250. package/resources/v1/scenarios.mjs +0 -3
  251. package/resources/v1/scenarios.mjs.map +0 -1
  252. package/resources/v1/tests/component.d.mts +0 -13
  253. package/resources/v1/tests/component.d.mts.map +0 -1
  254. package/resources/v1/tests/component.d.ts +0 -13
  255. package/resources/v1/tests/component.d.ts.map +0 -1
  256. package/resources/v1/tests/component.js +0 -23
  257. package/resources/v1/tests/component.js.map +0 -1
  258. package/resources/v1/tests/component.mjs +0 -19
  259. package/resources/v1/tests/component.mjs.map +0 -1
  260. package/resources/v1/tests/index.d.mts +0 -3
  261. package/resources/v1/tests/index.d.mts.map +0 -1
  262. package/resources/v1/tests/index.d.ts +0 -3
  263. package/resources/v1/tests/index.d.ts.map +0 -1
  264. package/resources/v1/tests/index.js +0 -9
  265. package/resources/v1/tests/index.js.map +0 -1
  266. package/resources/v1/tests/index.mjs +0 -4
  267. package/resources/v1/tests/index.mjs.map +0 -1
  268. package/resources/v1/tests/tests.d.mts +0 -112
  269. package/resources/v1/tests/tests.d.mts.map +0 -1
  270. package/resources/v1/tests/tests.d.ts +0 -112
  271. package/resources/v1/tests/tests.d.ts.map +0 -1
  272. package/resources/v1/tests/tests.js +0 -112
  273. package/resources/v1/tests/tests.js.map +0 -1
  274. package/resources/v1/tests/tests.mjs +0 -107
  275. package/resources/v1/tests/tests.mjs.map +0 -1
  276. package/resources/v1/tests.d.mts +0 -2
  277. package/resources/v1/tests.d.mts.map +0 -1
  278. package/resources/v1/tests.d.ts +0 -2
  279. package/resources/v1/tests.d.ts.map +0 -1
  280. package/resources/v1/tests.js +0 -6
  281. package/resources/v1/tests.js.map +0 -1
  282. package/resources/v1/tests.mjs +0 -3
  283. package/resources/v1/tests.mjs.map +0 -1
  284. package/src/resources/v1/audio-recaps/audio-recaps.ts +0 -79
  285. package/src/resources/v1/audio-recaps/index.ts +0 -4
  286. package/src/resources/v1/audio-recaps/sections.ts +0 -53
  287. package/src/resources/v1/audio-recaps.ts +0 -3
  288. package/src/resources/v1/chat/chat.ts +0 -303
  289. package/src/resources/v1/chat/index.ts +0 -11
  290. package/src/resources/v1/chat/sessions.ts +0 -46
  291. package/src/resources/v1/chat/test.ts +0 -34
  292. package/src/resources/v1/chat.ts +0 -3
  293. package/src/resources/v1/data-analyst/data-analyst.ts +0 -233
  294. package/src/resources/v1/data-analyst/index.ts +0 -10
  295. package/src/resources/v1/data-analyst/sessions.ts +0 -46
  296. package/src/resources/v1/data-analyst/test.ts +0 -34
  297. package/src/resources/v1/data-analyst.ts +0 -3
  298. package/src/resources/v1/explainers.ts +0 -203
  299. package/src/resources/v1/flashcards.ts +0 -353
  300. package/src/resources/v1/scenarios/component.ts +0 -118
  301. package/src/resources/v1/scenarios/index.ts +0 -13
  302. package/src/resources/v1/scenarios/scenarios.ts +0 -400
  303. package/src/resources/v1/scenarios/sessions.ts +0 -35
  304. package/src/resources/v1/scenarios/submissions/index.ts +0 -4
  305. package/src/resources/v1/scenarios/submissions/submissions.ts +0 -15
  306. package/src/resources/v1/scenarios/submissions/user.ts +0 -37
  307. package/src/resources/v1/scenarios/submissions.ts +0 -3
  308. package/src/resources/v1/scenarios.ts +0 -3
  309. package/src/resources/v1/tests/component.ts +0 -22
  310. package/src/resources/v1/tests/index.ts +0 -10
  311. package/src/resources/v1/tests/tests.ts +0 -173
  312. package/src/resources/v1/tests.ts +0 -3
@@ -1,353 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../core/resource';
4
- import { APIPromise } from '../../core/api-promise';
5
- import { buildHeaders } from '../../internal/headers';
6
- import { RequestOptions } from '../../internal/request-options';
7
- import { path } from '../../internal/utils/path';
8
-
9
- export class Flashcards extends APIResource {
10
- /**
11
- * Process multiple flashcard operations
12
- *
13
- * @example
14
- * ```ts
15
- * const response = await client.v1.flashcards.batchProcess(
16
- * 'componentId',
17
- * { operations: [{ action: 'rate', cardId: 'cardId' }] },
18
- * );
19
- * ```
20
- */
21
- batchProcess(
22
- componentID: string,
23
- body: FlashcardBatchProcessParams,
24
- options?: RequestOptions,
25
- ): APIPromise<FlashcardBatchProcessResponse> {
26
- return this._client.post(path`/api/v1/flashcards/${componentID}/batch`, { body, ...options });
27
- }
28
-
29
- /**
30
- * Get spaced repetition algorithm info
31
- *
32
- * @example
33
- * ```ts
34
- * const response = await client.v1.flashcards.getAlgorithm();
35
- * ```
36
- */
37
- getAlgorithm(options?: RequestOptions): APIPromise<FlashcardGetAlgorithmResponse> {
38
- return this._client.get('/api/v1/flashcards/algorithm', options);
39
- }
40
-
41
- /**
42
- * Get all flashcards for component
43
- *
44
- * @example
45
- * ```ts
46
- * await client.v1.flashcards.getAll('componentId');
47
- * ```
48
- */
49
- getAll(
50
- componentID: string,
51
- query: FlashcardGetAllParams | null | undefined = {},
52
- options?: RequestOptions,
53
- ): APIPromise<void> {
54
- return this._client.get(path`/api/v1/flashcards/${componentID}/all`, {
55
- query,
56
- ...options,
57
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
58
- });
59
- }
60
-
61
- /**
62
- * Get due flashcards for review
63
- *
64
- * @example
65
- * ```ts
66
- * await client.v1.flashcards.getDue('componentId', {
67
- * groupIds: 'groupIds',
68
- * });
69
- * ```
70
- */
71
- getDue(componentID: string, query: FlashcardGetDueParams, options?: RequestOptions): APIPromise<void> {
72
- return this._client.get(path`/api/v1/flashcards/${componentID}/due`, {
73
- query,
74
- ...options,
75
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
76
- });
77
- }
78
-
79
- /**
80
- * Get flashcard statistics
81
- *
82
- * @example
83
- * ```ts
84
- * await client.v1.flashcards.getStats('componentId');
85
- * ```
86
- */
87
- getStats(
88
- componentID: string,
89
- query: FlashcardGetStatsParams | null | undefined = {},
90
- options?: RequestOptions,
91
- ): APIPromise<void> {
92
- return this._client.get(path`/api/v1/flashcards/${componentID}/stats`, {
93
- query,
94
- ...options,
95
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
96
- });
97
- }
98
-
99
- /**
100
- * Get available flashcard types
101
- *
102
- * @example
103
- * ```ts
104
- * const response = await client.v1.flashcards.getTypes();
105
- * ```
106
- */
107
- getTypes(options?: RequestOptions): APIPromise<FlashcardGetTypesResponse> {
108
- return this._client.get('/api/v1/flashcards/types', options);
109
- }
110
-
111
- /**
112
- * Rate a flashcard
113
- *
114
- * @example
115
- * ```ts
116
- * await client.v1.flashcards.rate('componentId', {
117
- * cardId: 'cardId',
118
- * rating: 0,
119
- * });
120
- * ```
121
- */
122
- rate(componentID: string, body: FlashcardRateParams, options?: RequestOptions): APIPromise<void> {
123
- return this._client.post(path`/api/v1/flashcards/${componentID}/rate`, {
124
- body,
125
- ...options,
126
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
127
- });
128
- }
129
- }
130
-
131
- export interface FlashcardBatchProcessResponse {
132
- /**
133
- * Failed operations
134
- */
135
- failed?: number;
136
-
137
- /**
138
- * Total operations processed
139
- */
140
- processed?: number;
141
-
142
- results?: Array<FlashcardBatchProcessResponse.Result>;
143
-
144
- /**
145
- * Overall success
146
- */
147
- success?: boolean;
148
-
149
- /**
150
- * Successful operations
151
- */
152
- successful?: number;
153
- }
154
-
155
- export namespace FlashcardBatchProcessResponse {
156
- export interface Result {
157
- /**
158
- * Flashcard ID
159
- */
160
- cardId: string;
161
-
162
- /**
163
- * Operation success
164
- */
165
- success: boolean;
166
-
167
- /**
168
- * Error message if failed
169
- */
170
- error?: string;
171
-
172
- /**
173
- * Operation result
174
- */
175
- result?: unknown;
176
- }
177
- }
178
-
179
- export interface FlashcardGetAlgorithmResponse {
180
- /**
181
- * Algorithm name
182
- */
183
- algorithm?: string;
184
-
185
- intervals?: FlashcardGetAlgorithmResponse.Intervals;
186
-
187
- phases?: { [key: string]: string };
188
-
189
- ratings?: { [key: string]: FlashcardGetAlgorithmResponse.Ratings };
190
- }
191
-
192
- export namespace FlashcardGetAlgorithmResponse {
193
- export interface Intervals {
194
- /**
195
- * Description of graduated intervals
196
- */
197
- graduated?: string;
198
-
199
- /**
200
- * Description of lapse intervals
201
- */
202
- lapse?: string;
203
-
204
- /**
205
- * Learning intervals in minutes
206
- */
207
- learning?: Array<number>;
208
- }
209
-
210
- export interface Ratings {
211
- /**
212
- * Rating description
213
- */
214
- description: string;
215
-
216
- /**
217
- * Rating name
218
- */
219
- name: string;
220
- }
221
- }
222
-
223
- export interface FlashcardGetTypesResponse {
224
- descriptions?: { [key: string]: string };
225
-
226
- /**
227
- * List of flashcard types
228
- */
229
- types?: Array<string>;
230
- }
231
-
232
- export interface FlashcardBatchProcessParams {
233
- operations: Array<FlashcardBatchProcessParams.Operation>;
234
-
235
- /**
236
- * Group ID (optional)
237
- */
238
- groupId?: string;
239
-
240
- /**
241
- * User ID (optional)
242
- */
243
- userId?: string;
244
- }
245
-
246
- export namespace FlashcardBatchProcessParams {
247
- export interface Operation {
248
- action: 'rate' | 'get_due' | 'get_all' | 'get_stats';
249
-
250
- /**
251
- * Flashcard ID
252
- */
253
- cardId: string;
254
-
255
- /**
256
- * Group ID (optional)
257
- */
258
- groupId?: string;
259
-
260
- /**
261
- * Rating for rate action (0-3)
262
- */
263
- rating?: number;
264
-
265
- /**
266
- * User ID (optional)
267
- */
268
- userId?: string;
269
- }
270
- }
271
-
272
- export interface FlashcardGetAllParams {
273
- /**
274
- * Group IDs (comma-separated)
275
- */
276
- groupIds?: string;
277
-
278
- /**
279
- * Max number of cards
280
- */
281
- limit?: number;
282
-
283
- /**
284
- * Offset
285
- */
286
- offset?: number;
287
-
288
- /**
289
- * User ID
290
- */
291
- userId?: string;
292
- }
293
-
294
- export interface FlashcardGetDueParams {
295
- groupIds: string;
296
-
297
- /**
298
- * Max number of cards
299
- */
300
- limit?: number;
301
-
302
- /**
303
- * User ID
304
- */
305
- userId?: string;
306
- }
307
-
308
- export interface FlashcardGetStatsParams {
309
- /**
310
- * Group IDs (comma-separated)
311
- */
312
- groupIds?: string;
313
-
314
- /**
315
- * User ID
316
- */
317
- userId?: string;
318
- }
319
-
320
- export interface FlashcardRateParams {
321
- /**
322
- * Flashcard ID
323
- */
324
- cardId: string;
325
-
326
- /**
327
- * Rating (0-3)
328
- */
329
- rating: number;
330
-
331
- /**
332
- * Group ID (optional)
333
- */
334
- groupId?: string;
335
-
336
- /**
337
- * User ID (optional)
338
- */
339
- userId?: string;
340
- }
341
-
342
- export declare namespace Flashcards {
343
- export {
344
- type FlashcardBatchProcessResponse as FlashcardBatchProcessResponse,
345
- type FlashcardGetAlgorithmResponse as FlashcardGetAlgorithmResponse,
346
- type FlashcardGetTypesResponse as FlashcardGetTypesResponse,
347
- type FlashcardBatchProcessParams as FlashcardBatchProcessParams,
348
- type FlashcardGetAllParams as FlashcardGetAllParams,
349
- type FlashcardGetDueParams as FlashcardGetDueParams,
350
- type FlashcardGetStatsParams as FlashcardGetStatsParams,
351
- type FlashcardRateParams as FlashcardRateParams,
352
- };
353
- }
@@ -1,118 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../core/resource';
4
- import { APIPromise } from '../../../core/api-promise';
5
- import { buildHeaders } from '../../../internal/headers';
6
- import { RequestOptions } from '../../../internal/request-options';
7
- import { path } from '../../../internal/utils/path';
8
-
9
- export class Component extends APIResource {
10
- /**
11
- * Get scenario by component ID
12
- *
13
- * @example
14
- * ```ts
15
- * await client.v1.scenarios.component.retrieve('componentId');
16
- * ```
17
- */
18
- retrieve(componentID: string, options?: RequestOptions): APIPromise<void> {
19
- return this._client.get(path`/api/v1/scenarios/component/${componentID}`, {
20
- ...options,
21
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
22
- });
23
- }
24
-
25
- /**
26
- * Update scenario by component ID
27
- *
28
- * @example
29
- * ```ts
30
- * await client.v1.scenarios.component.update('componentId', {
31
- * name: 'name',
32
- * });
33
- * ```
34
- */
35
- update(componentID: string, body: ComponentUpdateParams, options?: RequestOptions): APIPromise<void> {
36
- return this._client.put(path`/api/v1/scenarios/component/${componentID}`, {
37
- body,
38
- ...options,
39
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
40
- });
41
- }
42
-
43
- /**
44
- * Delete scenario by component ID
45
- *
46
- * @example
47
- * ```ts
48
- * await client.v1.scenarios.component.delete('componentId');
49
- * ```
50
- */
51
- delete(componentID: string, options?: RequestOptions): APIPromise<void> {
52
- return this._client.delete(path`/api/v1/scenarios/component/${componentID}`, {
53
- ...options,
54
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
55
- });
56
- }
57
- }
58
-
59
- export interface ComponentUpdateParams {
60
- /**
61
- * Scenario name
62
- */
63
- name: string;
64
-
65
- /**
66
- * Scenario characters
67
- */
68
- characters?: Array<unknown>;
69
-
70
- /**
71
- * Scenario context
72
- */
73
- context?: string;
74
-
75
- /**
76
- * Scenario description
77
- */
78
- description?: string;
79
-
80
- /**
81
- * Prompt for final answer
82
- */
83
- finalAnswerPrompt?: string;
84
-
85
- /**
86
- * Interaction format
87
- */
88
- format?: string;
89
-
90
- /**
91
- * Scenario goal
92
- */
93
- goal?: string;
94
-
95
- /**
96
- * Character ID for greeting
97
- */
98
- greetingCharacterId?: string;
99
-
100
- /**
101
- * Greeting message
102
- */
103
- greetingMessage?: string;
104
-
105
- /**
106
- * Whether scenario requires a final answer
107
- */
108
- requiresFinalAnswer?: boolean;
109
-
110
- /**
111
- * Available tools
112
- */
113
- tools?: Array<unknown>;
114
- }
115
-
116
- export declare namespace Component {
117
- export { type ComponentUpdateParams as ComponentUpdateParams };
118
- }
@@ -1,13 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export { Component, type ComponentUpdateParams } from './component';
4
- export {
5
- Scenarios,
6
- type Scenario,
7
- type UpdateScenario,
8
- type ScenarioCreateParams,
9
- type ScenarioUpdateParams,
10
- type ScenarioSubmitAnswerParams,
11
- } from './scenarios';
12
- export { Sessions } from './sessions';
13
- export { Submissions } from './submissions/index';