@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
@@ -1,229 +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 * as SessionsAPI from './sessions';
5
- import { SessionRetrieveParams, Sessions } from './sessions';
6
- import * as TestAPI from './test';
7
- import { Test } from './test';
8
- import { APIPromise } from '../../../core/api-promise';
9
- import { buildHeaders } from '../../../internal/headers';
10
- import { RequestOptions } from '../../../internal/request-options';
11
- import { path } from '../../../internal/utils/path';
12
-
13
- export class Chat extends APIResource {
14
- sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client);
15
- test: TestAPI.Test = new TestAPI.Test(this._client);
16
-
17
- /**
18
- * @example
19
- * ```ts
20
- * await client.v1.chat.getHistory();
21
- * ```
22
- */
23
- getHistory(options?: RequestOptions): APIPromise<void> {
24
- return this._client.post('/api/v1/chat/history', {
25
- ...options,
26
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
27
- });
28
- }
29
-
30
- /**
31
- * @example
32
- * ```ts
33
- * await client.v1.chat.getSession('sessionId', {
34
- * userId: 'userId',
35
- * });
36
- * ```
37
- */
38
- getSession(sessionID: string, query: ChatGetSessionParams, options?: RequestOptions): APIPromise<void> {
39
- return this._client.get(path`/api/v1/chat/session/${sessionID}`, {
40
- query,
41
- ...options,
42
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
43
- });
44
- }
45
-
46
- /**
47
- * @example
48
- * ```ts
49
- * await client.v1.chat.sendFollowups();
50
- * ```
51
- */
52
- sendFollowups(options?: RequestOptions): APIPromise<void> {
53
- return this._client.post('/api/v1/chat/followups', {
54
- ...options,
55
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
56
- });
57
- }
58
-
59
- /**
60
- * @example
61
- * ```ts
62
- * await client.v1.chat.sendMessage({
63
- * componentId: 'componentId',
64
- * message: {},
65
- * 'x-component-id': 'x-component-id',
66
- * });
67
- * ```
68
- */
69
- sendMessage(params: ChatSendMessageParams, options?: RequestOptions): APIPromise<void> {
70
- const { 'x-component-id': xComponentID, ...body } = params;
71
- return this._client.post('/api/v1/chat/message', {
72
- body,
73
- ...options,
74
- headers: buildHeaders([{ Accept: '*/*', 'x-component-id': xComponentID }, options?.headers]),
75
- });
76
- }
77
-
78
- /**
79
- * Stream chat responses
80
- *
81
- * @example
82
- * ```ts
83
- * await client.v1.chat.stream();
84
- * ```
85
- */
86
- stream(params: ChatStreamParams, options?: RequestOptions): APIPromise<void> {
87
- const { 'x-component-id': xComponentID, ...body } = params;
88
- return this._client.post('/api/v1/chat/stream', {
89
- body,
90
- ...options,
91
- headers: buildHeaders([
92
- { Accept: '*/*', ...(xComponentID != null ? { 'x-component-id': xComponentID } : undefined) },
93
- options?.headers,
94
- ]),
95
- });
96
- }
97
- }
98
-
99
- export interface ChatGetSessionParams {
100
- userId: string;
101
- }
102
-
103
- export interface ChatSendMessageParams {
104
- /**
105
- * Body param: Component ID for context
106
- */
107
- componentId: string;
108
-
109
- /**
110
- * Body param: Chat message content
111
- */
112
- message: ChatSendMessageParams.Message;
113
-
114
- /**
115
- * Header param:
116
- */
117
- 'x-component-id': string;
118
-
119
- /**
120
- * Body param: Additional context data
121
- */
122
- context?: unknown;
123
-
124
- /**
125
- * Body param: Group IDs for collaboration
126
- */
127
- groupIds?: Array<string>;
128
-
129
- /**
130
- * Body param: Session ID for conversation continuity
131
- */
132
- sessionId?: string;
133
-
134
- /**
135
- * Body param: User ID for tracking
136
- */
137
- userId?: string;
138
- }
139
-
140
- export namespace ChatSendMessageParams {
141
- /**
142
- * Chat message content
143
- */
144
- export interface Message {
145
- /**
146
- * Images attached to the message
147
- */
148
- images?: Array<Message.Image>;
149
-
150
- /**
151
- * Text content of the message
152
- */
153
- text?: string;
154
- }
155
-
156
- export namespace Message {
157
- export interface Image {
158
- /**
159
- * Base64 encoded image data
160
- */
161
- base64?: string;
162
-
163
- /**
164
- * Caption for the image
165
- */
166
- caption?: string;
167
-
168
- /**
169
- * MIME type of the image
170
- */
171
- mimeType?: string;
172
-
173
- /**
174
- * URL of the image
175
- */
176
- url?: string;
177
- }
178
- }
179
- }
180
-
181
- export interface ChatStreamParams {
182
- /**
183
- * Body param:
184
- */
185
- context?: unknown;
186
-
187
- /**
188
- * Body param:
189
- */
190
- groupId?: string;
191
-
192
- /**
193
- * Body param:
194
- */
195
- messages?: Array<ChatStreamParams.Message>;
196
-
197
- /**
198
- * Body param:
199
- */
200
- userId?: string;
201
-
202
- /**
203
- * Header param: Component ID for context
204
- */
205
- 'x-component-id'?: string;
206
- }
207
-
208
- export namespace ChatStreamParams {
209
- export interface Message {
210
- content?: string;
211
-
212
- role?: 'user' | 'assistant' | 'system';
213
- }
214
- }
215
-
216
- Chat.Sessions = Sessions;
217
- Chat.Test = Test;
218
-
219
- export declare namespace Chat {
220
- export {
221
- type ChatGetSessionParams as ChatGetSessionParams,
222
- type ChatSendMessageParams as ChatSendMessageParams,
223
- type ChatStreamParams as ChatStreamParams,
224
- };
225
-
226
- export { Sessions as Sessions, type SessionRetrieveParams as SessionRetrieveParams };
227
-
228
- export { Test as Test };
229
- }
@@ -1,5 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export { Chat, type ChatGetSessionParams, type ChatSendMessageParams, type ChatStreamParams } from './chat';
4
- export { Sessions, type SessionRetrieveParams } from './sessions';
5
- export { Test } from './test';
@@ -1,46 +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 Sessions extends APIResource {
10
- /**
11
- * @example
12
- * ```ts
13
- * await client.v1.chat.sessions.create();
14
- * ```
15
- */
16
- create(options?: RequestOptions): APIPromise<void> {
17
- return this._client.post('/api/v1/chat/sessions/create', {
18
- ...options,
19
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
20
- });
21
- }
22
-
23
- /**
24
- * @example
25
- * ```ts
26
- * await client.v1.chat.sessions.retrieve('userId', {
27
- * limit: 'limit',
28
- * });
29
- * ```
30
- */
31
- retrieve(userID: string, query: SessionRetrieveParams, options?: RequestOptions): APIPromise<void> {
32
- return this._client.get(path`/api/v1/chat/sessions/${userID}`, {
33
- query,
34
- ...options,
35
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
36
- });
37
- }
38
- }
39
-
40
- export interface SessionRetrieveParams {
41
- limit: string;
42
- }
43
-
44
- export declare namespace Sessions {
45
- export { type SessionRetrieveParams as SessionRetrieveParams };
46
- }
@@ -1,34 +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
-
8
- export class Test extends APIResource {
9
- /**
10
- * @example
11
- * ```ts
12
- * await client.v1.chat.test.citeImage();
13
- * ```
14
- */
15
- citeImage(options?: RequestOptions): APIPromise<void> {
16
- return this._client.post('/api/v1/chat/test/image-citation', {
17
- ...options,
18
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
19
- });
20
- }
21
-
22
- /**
23
- * @example
24
- * ```ts
25
- * await client.v1.chat.test.uploadImage();
26
- * ```
27
- */
28
- uploadImage(options?: RequestOptions): APIPromise<void> {
29
- return this._client.post('/api/v1/chat/test/image', {
30
- ...options,
31
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
32
- });
33
- }
34
- }
@@ -1,3 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export * from './chat/index';
@@ -1,203 +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 Explainers extends APIResource {
10
- /**
11
- * Create explainers component
12
- *
13
- * @example
14
- * ```ts
15
- * await client.v1.explainers.create({
16
- * componentId: 'componentId',
17
- * folderIds: ['string'],
18
- * materialIds: ['string'],
19
- * targetLength: 15,
20
- * title: 'title',
21
- * });
22
- * ```
23
- */
24
- create(body: ExplainerCreateParams, options?: RequestOptions): APIPromise<void> {
25
- return this._client.post('/api/v1/explainers/create', {
26
- body,
27
- ...options,
28
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
29
- });
30
- }
31
-
32
- /**
33
- * Get explainer video by component ID
34
- *
35
- * @example
36
- * ```ts
37
- * await client.v1.explainers.retrieve('componentId');
38
- * ```
39
- */
40
- retrieve(componentID: string, options?: RequestOptions): APIPromise<void> {
41
- return this._client.get(path`/api/v1/explainers/component/${componentID}`, {
42
- ...options,
43
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
44
- });
45
- }
46
-
47
- /**
48
- * Handle explainer video webhook events
49
- *
50
- * @example
51
- * ```ts
52
- * await client.v1.explainers.handleWebhook({
53
- * event: 'video.completed',
54
- * video: { id: 'id' },
55
- * });
56
- * ```
57
- */
58
- handleWebhook(body: ExplainerHandleWebhookParams, options?: RequestOptions): APIPromise<void> {
59
- return this._client.post('/api/v1/explainers/webhook', {
60
- body,
61
- ...options,
62
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
63
- });
64
- }
65
- }
66
-
67
- export interface ExplainerCreateParams {
68
- /**
69
- * Component ID
70
- */
71
- componentId: string;
72
-
73
- /**
74
- * Folder IDs to include
75
- */
76
- folderIds: Array<string>;
77
-
78
- /**
79
- * Material IDs to include
80
- */
81
- materialIds: Array<string>;
82
-
83
- /**
84
- * Target video length in seconds
85
- */
86
- targetLength: number;
87
-
88
- /**
89
- * Title for the explainer video
90
- */
91
- title: string;
92
-
93
- /**
94
- * Enable image search for visuals
95
- */
96
- imageSearch?: boolean;
97
-
98
- /**
99
- * AI model to use
100
- */
101
- model?: string;
102
-
103
- /**
104
- * Video style
105
- */
106
- style?: string;
107
-
108
- /**
109
- * User ID
110
- */
111
- userId?: string;
112
-
113
- /**
114
- * Create vertical video format (9:16)
115
- */
116
- verticalVideo?: boolean;
117
-
118
- /**
119
- * Enable web search for additional content
120
- */
121
- webSearch?: boolean;
122
- }
123
-
124
- export interface ExplainerHandleWebhookParams {
125
- /**
126
- * Webhook event type
127
- */
128
- event: 'video.completed' | 'video.progress' | 'video.failed';
129
-
130
- /**
131
- * Video data
132
- */
133
- video: ExplainerHandleWebhookParams.Video;
134
- }
135
-
136
- export namespace ExplainerHandleWebhookParams {
137
- /**
138
- * Video data
139
- */
140
- export interface Video {
141
- /**
142
- * Video ID
143
- */
144
- id: string;
145
-
146
- /**
147
- * Image sources
148
- */
149
- imageSources?: unknown;
150
-
151
- /**
152
- * Progress percentage
153
- */
154
- progress?: number;
155
-
156
- /**
157
- * Video sections
158
- */
159
- sections?: Array<string>;
160
-
161
- /**
162
- * Stream ID
163
- */
164
- streamId?: string;
165
-
166
- /**
167
- * Stream URL
168
- */
169
- streamUrl?: string;
170
-
171
- /**
172
- * Thumbnail URL
173
- */
174
- thumbnailUrl?: string;
175
-
176
- /**
177
- * Video transcript
178
- */
179
- transcript?: string;
180
-
181
- /**
182
- * Video URL
183
- */
184
- videoUrl?: string;
185
-
186
- /**
187
- * Web search results
188
- */
189
- webSearchResults?: unknown;
190
-
191
- /**
192
- * Web search sources
193
- */
194
- webSearchSources?: unknown;
195
- }
196
- }
197
-
198
- export declare namespace Explainers {
199
- export {
200
- type ExplainerCreateParams as ExplainerCreateParams,
201
- type ExplainerHandleWebhookParams as ExplainerHandleWebhookParams,
202
- };
203
- }