@studyfetch/sdk 1.1.1 → 1.3.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 (552) hide show
  1. package/CHANGELOG.md +36 -15
  2. package/README.md +62 -17
  3. package/client.d.mts +1 -4
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +1 -4
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -16
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -16
  10. package/client.mjs.map +1 -1
  11. package/internal/qs/formats.d.mts +7 -0
  12. package/internal/qs/formats.d.mts.map +1 -0
  13. package/internal/qs/formats.d.ts +7 -0
  14. package/internal/qs/formats.d.ts.map +1 -0
  15. package/internal/qs/formats.js +13 -0
  16. package/internal/qs/formats.js.map +1 -0
  17. package/internal/qs/formats.mjs +9 -0
  18. package/internal/qs/formats.mjs.map +1 -0
  19. package/internal/qs/index.d.mts +10 -0
  20. package/internal/qs/index.d.mts.map +1 -0
  21. package/internal/qs/index.d.ts +10 -0
  22. package/internal/qs/index.d.ts.map +1 -0
  23. package/internal/qs/index.js +14 -0
  24. package/internal/qs/index.js.map +1 -0
  25. package/internal/qs/index.mjs +10 -0
  26. package/internal/qs/index.mjs.map +1 -0
  27. package/internal/qs/stringify.d.mts +3 -0
  28. package/internal/qs/stringify.d.mts.map +1 -0
  29. package/internal/qs/stringify.d.ts +3 -0
  30. package/internal/qs/stringify.d.ts.map +1 -0
  31. package/internal/qs/stringify.js +277 -0
  32. package/internal/qs/stringify.js.map +1 -0
  33. package/internal/qs/stringify.mjs +274 -0
  34. package/internal/qs/stringify.mjs.map +1 -0
  35. package/internal/qs/types.d.mts +57 -0
  36. package/internal/qs/types.d.mts.map +1 -0
  37. package/internal/qs/types.d.ts +57 -0
  38. package/internal/qs/types.d.ts.map +1 -0
  39. package/internal/qs/types.js +3 -0
  40. package/internal/qs/types.js.map +1 -0
  41. package/internal/qs/types.mjs +2 -0
  42. package/internal/qs/types.mjs.map +1 -0
  43. package/internal/qs/utils.d.mts +15 -0
  44. package/internal/qs/utils.d.mts.map +1 -0
  45. package/internal/qs/utils.d.ts +15 -0
  46. package/internal/qs/utils.d.ts.map +1 -0
  47. package/internal/qs/utils.js +230 -0
  48. package/internal/qs/utils.js.map +1 -0
  49. package/internal/qs/utils.mjs +217 -0
  50. package/internal/qs/utils.mjs.map +1 -0
  51. package/internal/utils/log.d.mts.map +1 -1
  52. package/internal/utils/log.d.ts.map +1 -1
  53. package/internal/utils/log.js +2 -1
  54. package/internal/utils/log.js.map +1 -1
  55. package/internal/utils/log.mjs +2 -1
  56. package/internal/utils/log.mjs.map +1 -1
  57. package/package.json +1 -1
  58. package/resources/v1/admin/admin.d.mts +6 -0
  59. package/resources/v1/admin/admin.d.mts.map +1 -1
  60. package/resources/v1/admin/admin.d.ts +6 -0
  61. package/resources/v1/admin/admin.d.ts.map +1 -1
  62. package/resources/v1/admin/admin.js +6 -0
  63. package/resources/v1/admin/admin.js.map +1 -1
  64. package/resources/v1/admin/admin.mjs +6 -0
  65. package/resources/v1/admin/admin.mjs.map +1 -1
  66. package/resources/v1/admin/models.d.mts +6 -0
  67. package/resources/v1/admin/models.d.mts.map +1 -1
  68. package/resources/v1/admin/models.d.ts +6 -0
  69. package/resources/v1/admin/models.d.ts.map +1 -1
  70. package/resources/v1/admin/models.js +6 -0
  71. package/resources/v1/admin/models.js.map +1 -1
  72. package/resources/v1/admin/models.mjs +6 -0
  73. package/resources/v1/admin/models.mjs.map +1 -1
  74. package/resources/v1/admin/organization-invites.d.mts +26 -0
  75. package/resources/v1/admin/organization-invites.d.mts.map +1 -1
  76. package/resources/v1/admin/organization-invites.d.ts +26 -0
  77. package/resources/v1/admin/organization-invites.d.ts.map +1 -1
  78. package/resources/v1/admin/organization-invites.js +26 -0
  79. package/resources/v1/admin/organization-invites.js.map +1 -1
  80. package/resources/v1/admin/organization-invites.mjs +26 -0
  81. package/resources/v1/admin/organization-invites.mjs.map +1 -1
  82. package/resources/v1/admin/organizations/models/excluded.d.mts +16 -0
  83. package/resources/v1/admin/organizations/models/excluded.d.mts.map +1 -1
  84. package/resources/v1/admin/organizations/models/excluded.d.ts +16 -0
  85. package/resources/v1/admin/organizations/models/excluded.d.ts.map +1 -1
  86. package/resources/v1/admin/organizations/models/excluded.js +16 -0
  87. package/resources/v1/admin/organizations/models/excluded.js.map +1 -1
  88. package/resources/v1/admin/organizations/models/excluded.mjs +16 -0
  89. package/resources/v1/admin/organizations/models/excluded.mjs.map +1 -1
  90. package/resources/v1/admin/organizations/organizations.d.mts +6 -0
  91. package/resources/v1/admin/organizations/organizations.d.mts.map +1 -1
  92. package/resources/v1/admin/organizations/organizations.d.ts +6 -0
  93. package/resources/v1/admin/organizations/organizations.d.ts.map +1 -1
  94. package/resources/v1/admin/organizations/organizations.js +6 -0
  95. package/resources/v1/admin/organizations/organizations.js.map +1 -1
  96. package/resources/v1/admin/organizations/organizations.mjs +6 -0
  97. package/resources/v1/admin/organizations/organizations.mjs.map +1 -1
  98. package/resources/v1/audio-recaps/audio-recaps.d.mts +24 -0
  99. package/resources/v1/audio-recaps/audio-recaps.d.mts.map +1 -1
  100. package/resources/v1/audio-recaps/audio-recaps.d.ts +24 -0
  101. package/resources/v1/audio-recaps/audio-recaps.d.ts.map +1 -1
  102. package/resources/v1/audio-recaps/audio-recaps.js +24 -0
  103. package/resources/v1/audio-recaps/audio-recaps.js.map +1 -1
  104. package/resources/v1/audio-recaps/audio-recaps.mjs +24 -0
  105. package/resources/v1/audio-recaps/audio-recaps.mjs.map +1 -1
  106. package/resources/v1/audio-recaps/sections.d.mts +21 -0
  107. package/resources/v1/audio-recaps/sections.d.mts.map +1 -1
  108. package/resources/v1/audio-recaps/sections.d.ts +21 -0
  109. package/resources/v1/audio-recaps/sections.d.ts.map +1 -1
  110. package/resources/v1/audio-recaps/sections.js +18 -0
  111. package/resources/v1/audio-recaps/sections.js.map +1 -1
  112. package/resources/v1/audio-recaps/sections.mjs +18 -0
  113. package/resources/v1/audio-recaps/sections.mjs.map +1 -1
  114. package/resources/v1/auth/auth.d.mts +108 -7
  115. package/resources/v1/auth/auth.d.mts.map +1 -1
  116. package/resources/v1/auth/auth.d.ts +108 -7
  117. package/resources/v1/auth/auth.d.ts.map +1 -1
  118. package/resources/v1/auth/auth.js +80 -8
  119. package/resources/v1/auth/auth.js.map +1 -1
  120. package/resources/v1/auth/auth.mjs +80 -8
  121. package/resources/v1/auth/auth.mjs.map +1 -1
  122. package/resources/v1/auth/index.d.mts +2 -2
  123. package/resources/v1/auth/index.d.mts.map +1 -1
  124. package/resources/v1/auth/index.d.ts +2 -2
  125. package/resources/v1/auth/index.d.ts.map +1 -1
  126. package/resources/v1/auth/index.js.map +1 -1
  127. package/resources/v1/auth/index.mjs.map +1 -1
  128. package/resources/v1/auth/login.d.mts +60 -3
  129. package/resources/v1/auth/login.d.mts.map +1 -1
  130. package/resources/v1/auth/login.d.ts +60 -3
  131. package/resources/v1/auth/login.d.ts.map +1 -1
  132. package/resources/v1/auth/login.js +34 -1
  133. package/resources/v1/auth/login.js.map +1 -1
  134. package/resources/v1/auth/login.mjs +34 -1
  135. package/resources/v1/auth/login.mjs.map +1 -1
  136. package/resources/v1/auth/number-2fa.d.mts +63 -1
  137. package/resources/v1/auth/number-2fa.d.mts.map +1 -1
  138. package/resources/v1/auth/number-2fa.d.ts +63 -1
  139. package/resources/v1/auth/number-2fa.d.ts.map +1 -1
  140. package/resources/v1/auth/number-2fa.js +52 -6
  141. package/resources/v1/auth/number-2fa.js.map +1 -1
  142. package/resources/v1/auth/number-2fa.mjs +52 -6
  143. package/resources/v1/auth/number-2fa.mjs.map +1 -1
  144. package/resources/v1/auth/organization-invites.d.mts +6 -0
  145. package/resources/v1/auth/organization-invites.d.mts.map +1 -1
  146. package/resources/v1/auth/organization-invites.d.ts +6 -0
  147. package/resources/v1/auth/organization-invites.d.ts.map +1 -1
  148. package/resources/v1/auth/organization-invites.js +6 -0
  149. package/resources/v1/auth/organization-invites.js.map +1 -1
  150. package/resources/v1/auth/organization-invites.mjs +6 -0
  151. package/resources/v1/auth/organization-invites.mjs.map +1 -1
  152. package/resources/v1/chat/chat.d.mts +131 -6
  153. package/resources/v1/chat/chat.d.mts.map +1 -1
  154. package/resources/v1/chat/chat.d.ts +131 -6
  155. package/resources/v1/chat/chat.d.ts.map +1 -1
  156. package/resources/v1/chat/chat.js +55 -13
  157. package/resources/v1/chat/chat.js.map +1 -1
  158. package/resources/v1/chat/chat.mjs +55 -13
  159. package/resources/v1/chat/chat.mjs.map +1 -1
  160. package/resources/v1/chat/index.d.mts +1 -1
  161. package/resources/v1/chat/index.d.mts.map +1 -1
  162. package/resources/v1/chat/index.d.ts +1 -1
  163. package/resources/v1/chat/index.d.ts.map +1 -1
  164. package/resources/v1/chat/sessions.d.mts +14 -0
  165. package/resources/v1/chat/sessions.d.mts.map +1 -1
  166. package/resources/v1/chat/sessions.d.ts +14 -0
  167. package/resources/v1/chat/sessions.d.ts.map +1 -1
  168. package/resources/v1/chat/sessions.js +14 -0
  169. package/resources/v1/chat/sessions.js.map +1 -1
  170. package/resources/v1/chat/sessions.mjs +14 -0
  171. package/resources/v1/chat/sessions.mjs.map +1 -1
  172. package/resources/v1/chat/test.d.mts +12 -0
  173. package/resources/v1/chat/test.d.mts.map +1 -1
  174. package/resources/v1/chat/test.d.ts +12 -0
  175. package/resources/v1/chat/test.d.ts.map +1 -1
  176. package/resources/v1/chat/test.js +12 -0
  177. package/resources/v1/chat/test.js.map +1 -1
  178. package/resources/v1/chat/test.mjs +12 -0
  179. package/resources/v1/chat/test.mjs.map +1 -1
  180. package/resources/v1/components.d.mts +461 -7
  181. package/resources/v1/components.d.mts.map +1 -1
  182. package/resources/v1/components.d.ts +461 -7
  183. package/resources/v1/components.d.ts.map +1 -1
  184. package/resources/v1/components.js +77 -25
  185. package/resources/v1/components.js.map +1 -1
  186. package/resources/v1/components.mjs +77 -25
  187. package/resources/v1/components.mjs.map +1 -1
  188. package/resources/v1/embed/component.d.mts +31 -0
  189. package/resources/v1/embed/component.d.mts.map +1 -1
  190. package/resources/v1/embed/component.d.ts +31 -0
  191. package/resources/v1/embed/component.d.ts.map +1 -1
  192. package/resources/v1/embed/component.js +23 -1
  193. package/resources/v1/embed/component.js.map +1 -1
  194. package/resources/v1/embed/component.mjs +23 -1
  195. package/resources/v1/embed/component.mjs.map +1 -1
  196. package/resources/v1/embed/embed.d.mts +32 -6
  197. package/resources/v1/embed/embed.d.mts.map +1 -1
  198. package/resources/v1/embed/embed.d.ts +32 -6
  199. package/resources/v1/embed/embed.d.ts.map +1 -1
  200. package/resources/v1/embed/embed.js +27 -11
  201. package/resources/v1/embed/embed.js.map +1 -1
  202. package/resources/v1/embed/embed.mjs +27 -11
  203. package/resources/v1/embed/embed.mjs.map +1 -1
  204. package/resources/v1/embed/index.d.mts +1 -1
  205. package/resources/v1/embed/index.d.mts.map +1 -1
  206. package/resources/v1/embed/index.d.ts +1 -1
  207. package/resources/v1/embed/index.d.ts.map +1 -1
  208. package/resources/v1/embed/index.js.map +1 -1
  209. package/resources/v1/embed/index.mjs.map +1 -1
  210. package/resources/v1/explainers.d.mts +21 -2
  211. package/resources/v1/explainers.d.mts.map +1 -1
  212. package/resources/v1/explainers.d.ts +21 -2
  213. package/resources/v1/explainers.d.ts.map +1 -1
  214. package/resources/v1/explainers.js +19 -1
  215. package/resources/v1/explainers.js.map +1 -1
  216. package/resources/v1/explainers.mjs +19 -1
  217. package/resources/v1/explainers.mjs.map +1 -1
  218. package/resources/v1/flashcards.d.mts +242 -16
  219. package/resources/v1/flashcards.d.mts.map +1 -1
  220. package/resources/v1/flashcards.d.ts +242 -16
  221. package/resources/v1/flashcards.d.ts.map +1 -1
  222. package/resources/v1/flashcards.js +78 -21
  223. package/resources/v1/flashcards.js.map +1 -1
  224. package/resources/v1/flashcards.mjs +78 -21
  225. package/resources/v1/flashcards.mjs.map +1 -1
  226. package/resources/v1/folders.d.mts +93 -4
  227. package/resources/v1/folders.d.mts.map +1 -1
  228. package/resources/v1/folders.d.ts +93 -4
  229. package/resources/v1/folders.d.ts.map +1 -1
  230. package/resources/v1/folders.js +72 -9
  231. package/resources/v1/folders.js.map +1 -1
  232. package/resources/v1/folders.mjs +72 -9
  233. package/resources/v1/folders.mjs.map +1 -1
  234. package/resources/v1/index.d.mts +12 -11
  235. package/resources/v1/index.d.mts.map +1 -1
  236. package/resources/v1/index.d.ts +12 -11
  237. package/resources/v1/index.d.ts.map +1 -1
  238. package/resources/v1/index.js +3 -1
  239. package/resources/v1/index.js.map +1 -1
  240. package/resources/v1/index.mjs +5 -4
  241. package/resources/v1/index.mjs.map +1 -1
  242. package/resources/v1/materials/bulk.d.mts +6 -0
  243. package/resources/v1/materials/bulk.d.mts.map +1 -1
  244. package/resources/v1/materials/bulk.d.ts +6 -0
  245. package/resources/v1/materials/bulk.d.ts.map +1 -1
  246. package/resources/v1/materials/bulk.js +6 -0
  247. package/resources/v1/materials/bulk.js.map +1 -1
  248. package/resources/v1/materials/bulk.mjs +6 -0
  249. package/resources/v1/materials/bulk.mjs.map +1 -1
  250. package/resources/v1/materials/index.d.mts +2 -2
  251. package/resources/v1/materials/index.d.mts.map +1 -1
  252. package/resources/v1/materials/index.d.ts +2 -2
  253. package/resources/v1/materials/index.d.ts.map +1 -1
  254. package/resources/v1/materials/index.js.map +1 -1
  255. package/resources/v1/materials/index.mjs +2 -2
  256. package/resources/v1/materials/index.mjs.map +1 -1
  257. package/resources/v1/materials/materials.d.mts +310 -7
  258. package/resources/v1/materials/materials.d.mts.map +1 -1
  259. package/resources/v1/materials/materials.d.ts +310 -7
  260. package/resources/v1/materials/materials.d.ts.map +1 -1
  261. package/resources/v1/materials/materials.js +84 -15
  262. package/resources/v1/materials/materials.js.map +1 -1
  263. package/resources/v1/materials/materials.mjs +85 -16
  264. package/resources/v1/materials/materials.mjs.map +1 -1
  265. package/resources/v1/materials/test.d.mts +28 -4
  266. package/resources/v1/materials/test.d.mts.map +1 -1
  267. package/resources/v1/materials/test.d.ts +28 -4
  268. package/resources/v1/materials/test.d.ts.map +1 -1
  269. package/resources/v1/materials/test.js +31 -7
  270. package/resources/v1/materials/test.js.map +1 -1
  271. package/resources/v1/materials/test.mjs +31 -7
  272. package/resources/v1/materials/test.mjs.map +1 -1
  273. package/resources/v1/materials/upload.d.mts +188 -3
  274. package/resources/v1/materials/upload.d.mts.map +1 -1
  275. package/resources/v1/materials/upload.d.ts +188 -3
  276. package/resources/v1/materials/upload.d.ts.map +1 -1
  277. package/resources/v1/materials/upload.js +42 -11
  278. package/resources/v1/materials/upload.js.map +1 -1
  279. package/resources/v1/materials/upload.mjs +42 -11
  280. package/resources/v1/materials/upload.mjs.map +1 -1
  281. package/resources/v1/organizations/api-keys.d.mts +32 -1
  282. package/resources/v1/organizations/api-keys.d.mts.map +1 -1
  283. package/resources/v1/organizations/api-keys.d.ts +32 -1
  284. package/resources/v1/organizations/api-keys.d.ts.map +1 -1
  285. package/resources/v1/organizations/api-keys.js +24 -1
  286. package/resources/v1/organizations/api-keys.js.map +1 -1
  287. package/resources/v1/organizations/api-keys.mjs +24 -1
  288. package/resources/v1/organizations/api-keys.mjs.map +1 -1
  289. package/resources/v1/organizations/index.d.mts +1 -1
  290. package/resources/v1/organizations/index.d.mts.map +1 -1
  291. package/resources/v1/organizations/index.d.ts +1 -1
  292. package/resources/v1/organizations/index.d.ts.map +1 -1
  293. package/resources/v1/organizations/index.js.map +1 -1
  294. package/resources/v1/organizations/index.mjs.map +1 -1
  295. package/resources/v1/organizations/logo/logo.d.mts +6 -0
  296. package/resources/v1/organizations/logo/logo.d.mts.map +1 -1
  297. package/resources/v1/organizations/logo/logo.d.ts +6 -0
  298. package/resources/v1/organizations/logo/logo.d.ts.map +1 -1
  299. package/resources/v1/organizations/logo/logo.js +6 -0
  300. package/resources/v1/organizations/logo/logo.js.map +1 -1
  301. package/resources/v1/organizations/logo/logo.mjs +6 -0
  302. package/resources/v1/organizations/logo/logo.mjs.map +1 -1
  303. package/resources/v1/organizations/logo/upload.d.mts +12 -0
  304. package/resources/v1/organizations/logo/upload.d.mts.map +1 -1
  305. package/resources/v1/organizations/logo/upload.d.ts +12 -0
  306. package/resources/v1/organizations/logo/upload.d.ts.map +1 -1
  307. package/resources/v1/organizations/logo/upload.js +12 -0
  308. package/resources/v1/organizations/logo/upload.js.map +1 -1
  309. package/resources/v1/organizations/logo/upload.mjs +12 -0
  310. package/resources/v1/organizations/logo/upload.mjs.map +1 -1
  311. package/resources/v1/organizations/organizations.d.mts +14 -2
  312. package/resources/v1/organizations/organizations.d.mts.map +1 -1
  313. package/resources/v1/organizations/organizations.d.ts +14 -2
  314. package/resources/v1/organizations/organizations.d.ts.map +1 -1
  315. package/resources/v1/organizations/organizations.js +12 -0
  316. package/resources/v1/organizations/organizations.js.map +1 -1
  317. package/resources/v1/organizations/organizations.mjs +12 -0
  318. package/resources/v1/organizations/organizations.mjs.map +1 -1
  319. package/resources/v1/organizations/profile/models.d.mts +6 -0
  320. package/resources/v1/organizations/profile/models.d.mts.map +1 -1
  321. package/resources/v1/organizations/profile/models.d.ts +6 -0
  322. package/resources/v1/organizations/profile/models.d.ts.map +1 -1
  323. package/resources/v1/organizations/profile/models.js +6 -0
  324. package/resources/v1/organizations/profile/models.js.map +1 -1
  325. package/resources/v1/organizations/profile/models.mjs +6 -0
  326. package/resources/v1/organizations/profile/models.mjs.map +1 -1
  327. package/resources/v1/organizations/profile/profile.d.mts +14 -0
  328. package/resources/v1/organizations/profile/profile.d.mts.map +1 -1
  329. package/resources/v1/organizations/profile/profile.d.ts +14 -0
  330. package/resources/v1/organizations/profile/profile.d.ts.map +1 -1
  331. package/resources/v1/organizations/profile/profile.js +14 -0
  332. package/resources/v1/organizations/profile/profile.js.map +1 -1
  333. package/resources/v1/organizations/profile/profile.mjs +14 -0
  334. package/resources/v1/organizations/profile/profile.mjs.map +1 -1
  335. package/resources/v1/organizations/profile/team.d.mts +40 -0
  336. package/resources/v1/organizations/profile/team.d.mts.map +1 -1
  337. package/resources/v1/organizations/profile/team.d.ts +40 -0
  338. package/resources/v1/organizations/profile/team.d.ts.map +1 -1
  339. package/resources/v1/organizations/profile/team.js +40 -0
  340. package/resources/v1/organizations/profile/team.js.map +1 -1
  341. package/resources/v1/organizations/profile/team.mjs +40 -0
  342. package/resources/v1/organizations/profile/team.mjs.map +1 -1
  343. package/resources/v1/organizations/team/invite.d.mts +14 -0
  344. package/resources/v1/organizations/team/invite.d.mts.map +1 -1
  345. package/resources/v1/organizations/team/invite.d.ts +14 -0
  346. package/resources/v1/organizations/team/invite.d.ts.map +1 -1
  347. package/resources/v1/organizations/team/invite.js +14 -0
  348. package/resources/v1/organizations/team/invite.js.map +1 -1
  349. package/resources/v1/organizations/team/invite.mjs +14 -0
  350. package/resources/v1/organizations/team/invite.mjs.map +1 -1
  351. package/resources/v1/organizations/team/team.d.mts +42 -0
  352. package/resources/v1/organizations/team/team.d.mts.map +1 -1
  353. package/resources/v1/organizations/team/team.d.ts +42 -0
  354. package/resources/v1/organizations/team/team.d.ts.map +1 -1
  355. package/resources/v1/organizations/team/team.js +42 -0
  356. package/resources/v1/organizations/team/team.js.map +1 -1
  357. package/resources/v1/organizations/team/team.mjs +42 -0
  358. package/resources/v1/organizations/team/team.mjs.map +1 -1
  359. package/resources/v1/organizations/theme.d.mts +12 -0
  360. package/resources/v1/organizations/theme.d.mts.map +1 -1
  361. package/resources/v1/organizations/theme.d.ts +12 -0
  362. package/resources/v1/organizations/theme.d.ts.map +1 -1
  363. package/resources/v1/organizations/theme.js +12 -0
  364. package/resources/v1/organizations/theme.js.map +1 -1
  365. package/resources/v1/organizations/theme.mjs +12 -0
  366. package/resources/v1/organizations/theme.mjs.map +1 -1
  367. package/resources/v1/organizations/usage.d.mts +8 -0
  368. package/resources/v1/organizations/usage.d.mts.map +1 -1
  369. package/resources/v1/organizations/usage.d.ts +8 -0
  370. package/resources/v1/organizations/usage.d.ts.map +1 -1
  371. package/resources/v1/organizations/usage.js +8 -0
  372. package/resources/v1/organizations/usage.js.map +1 -1
  373. package/resources/v1/organizations/usage.mjs +8 -0
  374. package/resources/v1/organizations/usage.mjs.map +1 -1
  375. package/resources/v1/scenarios/component.d.mts +33 -1
  376. package/resources/v1/scenarios/component.d.mts.map +1 -1
  377. package/resources/v1/scenarios/component.d.ts +33 -1
  378. package/resources/v1/scenarios/component.d.ts.map +1 -1
  379. package/resources/v1/scenarios/component.js +29 -1
  380. package/resources/v1/scenarios/component.js.map +1 -1
  381. package/resources/v1/scenarios/component.mjs +29 -1
  382. package/resources/v1/scenarios/component.mjs.map +1 -1
  383. package/resources/v1/scenarios/index.d.mts +2 -2
  384. package/resources/v1/scenarios/index.d.mts.map +1 -1
  385. package/resources/v1/scenarios/index.d.ts +2 -2
  386. package/resources/v1/scenarios/index.d.ts.map +1 -1
  387. package/resources/v1/scenarios/index.js.map +1 -1
  388. package/resources/v1/scenarios/index.mjs.map +1 -1
  389. package/resources/v1/scenarios/scenarios.d.mts +63 -4
  390. package/resources/v1/scenarios/scenarios.d.mts.map +1 -1
  391. package/resources/v1/scenarios/scenarios.d.ts +63 -4
  392. package/resources/v1/scenarios/scenarios.d.ts.map +1 -1
  393. package/resources/v1/scenarios/scenarios.js +58 -2
  394. package/resources/v1/scenarios/scenarios.js.map +1 -1
  395. package/resources/v1/scenarios/scenarios.mjs +58 -2
  396. package/resources/v1/scenarios/scenarios.mjs.map +1 -1
  397. package/resources/v1/scenarios/sessions.d.mts +12 -0
  398. package/resources/v1/scenarios/sessions.d.mts.map +1 -1
  399. package/resources/v1/scenarios/sessions.d.ts +12 -0
  400. package/resources/v1/scenarios/sessions.d.ts.map +1 -1
  401. package/resources/v1/scenarios/sessions.js +12 -0
  402. package/resources/v1/scenarios/sessions.js.map +1 -1
  403. package/resources/v1/scenarios/sessions.mjs +12 -0
  404. package/resources/v1/scenarios/sessions.mjs.map +1 -1
  405. package/resources/v1/scenarios/submissions/user.d.mts +12 -0
  406. package/resources/v1/scenarios/submissions/user.d.mts.map +1 -1
  407. package/resources/v1/scenarios/submissions/user.d.ts +12 -0
  408. package/resources/v1/scenarios/submissions/user.d.ts.map +1 -1
  409. package/resources/v1/scenarios/submissions/user.js +12 -0
  410. package/resources/v1/scenarios/submissions/user.js.map +1 -1
  411. package/resources/v1/scenarios/submissions/user.mjs +12 -0
  412. package/resources/v1/scenarios/submissions/user.mjs.map +1 -1
  413. package/resources/v1/tests/component.d.mts +6 -0
  414. package/resources/v1/tests/component.d.mts.map +1 -1
  415. package/resources/v1/tests/component.d.ts +6 -0
  416. package/resources/v1/tests/component.d.ts.map +1 -1
  417. package/resources/v1/tests/component.js +6 -0
  418. package/resources/v1/tests/component.js.map +1 -1
  419. package/resources/v1/tests/component.mjs +6 -0
  420. package/resources/v1/tests/component.mjs.map +1 -1
  421. package/resources/v1/tests/index.d.mts +1 -1
  422. package/resources/v1/tests/index.d.mts.map +1 -1
  423. package/resources/v1/tests/index.d.ts +1 -1
  424. package/resources/v1/tests/index.d.ts.map +1 -1
  425. package/resources/v1/tests/index.js.map +1 -1
  426. package/resources/v1/tests/index.mjs +1 -1
  427. package/resources/v1/tests/index.mjs.map +1 -1
  428. package/resources/v1/tests/tests.d.mts +98 -4
  429. package/resources/v1/tests/tests.d.mts.map +1 -1
  430. package/resources/v1/tests/tests.d.ts +98 -4
  431. package/resources/v1/tests/tests.d.ts.map +1 -1
  432. package/resources/v1/tests/tests.js +61 -4
  433. package/resources/v1/tests/tests.js.map +1 -1
  434. package/resources/v1/tests/tests.mjs +61 -4
  435. package/resources/v1/tests/tests.mjs.map +1 -1
  436. package/resources/v1/upload/component.d.mts +38 -0
  437. package/resources/v1/upload/component.d.mts.map +1 -0
  438. package/resources/v1/upload/component.d.ts +38 -0
  439. package/resources/v1/upload/component.d.ts.map +1 -0
  440. package/resources/v1/upload/component.js +63 -0
  441. package/resources/v1/upload/component.js.map +1 -0
  442. package/resources/v1/upload/component.mjs +59 -0
  443. package/resources/v1/upload/component.mjs.map +1 -0
  444. package/resources/v1/upload/index.d.mts +3 -0
  445. package/resources/v1/upload/index.d.mts.map +1 -0
  446. package/resources/v1/upload/index.d.ts +3 -0
  447. package/resources/v1/upload/index.d.ts.map +1 -0
  448. package/resources/v1/upload/index.js +9 -0
  449. package/resources/v1/upload/index.js.map +1 -0
  450. package/resources/v1/upload/index.mjs +4 -0
  451. package/resources/v1/upload/index.mjs.map +1 -0
  452. package/resources/v1/upload/upload.d.mts +10 -0
  453. package/resources/v1/upload/upload.d.mts.map +1 -0
  454. package/resources/v1/upload/upload.d.ts +10 -0
  455. package/resources/v1/upload/upload.d.ts.map +1 -0
  456. package/resources/v1/upload/upload.js +17 -0
  457. package/resources/v1/upload/upload.js.map +1 -0
  458. package/resources/v1/upload/upload.mjs +12 -0
  459. package/resources/v1/upload/upload.mjs.map +1 -0
  460. package/resources/v1/upload.d.mts +2 -0
  461. package/resources/v1/upload.d.mts.map +1 -0
  462. package/resources/v1/upload.d.ts +2 -0
  463. package/resources/v1/upload.d.ts.map +1 -0
  464. package/resources/v1/upload.js +6 -0
  465. package/resources/v1/upload.js.map +1 -0
  466. package/resources/v1/upload.mjs +3 -0
  467. package/resources/v1/upload.mjs.map +1 -0
  468. package/resources/v1/usage.d.mts +285 -9
  469. package/resources/v1/usage.d.mts.map +1 -1
  470. package/resources/v1/usage.d.ts +285 -9
  471. package/resources/v1/usage.d.ts.map +1 -1
  472. package/resources/v1/usage.js +76 -13
  473. package/resources/v1/usage.js.map +1 -1
  474. package/resources/v1/usage.mjs +76 -13
  475. package/resources/v1/usage.mjs.map +1 -1
  476. package/resources/v1/v1.d.mts +26 -22
  477. package/resources/v1/v1.d.mts.map +1 -1
  478. package/resources/v1/v1.d.ts +26 -22
  479. package/resources/v1/v1.d.ts.map +1 -1
  480. package/resources/v1/v1.js +4 -0
  481. package/resources/v1/v1.js.map +1 -1
  482. package/resources/v1/v1.mjs +7 -3
  483. package/resources/v1/v1.mjs.map +1 -1
  484. package/src/client.ts +4 -19
  485. package/src/internal/qs/LICENSE.md +13 -0
  486. package/src/internal/qs/README.md +3 -0
  487. package/src/internal/qs/formats.ts +10 -0
  488. package/src/internal/qs/index.ts +13 -0
  489. package/src/internal/qs/stringify.ts +385 -0
  490. package/src/internal/qs/types.ts +71 -0
  491. package/src/internal/qs/utils.ts +265 -0
  492. package/src/internal/utils/log.ts +1 -0
  493. package/src/resources/v1/admin/admin.ts +6 -0
  494. package/src/resources/v1/admin/models.ts +6 -0
  495. package/src/resources/v1/admin/organization-invites.ts +26 -0
  496. package/src/resources/v1/admin/organizations/models/excluded.ts +16 -0
  497. package/src/resources/v1/admin/organizations/organizations.ts +6 -0
  498. package/src/resources/v1/audio-recaps/audio-recaps.ts +24 -0
  499. package/src/resources/v1/audio-recaps/sections.ts +21 -0
  500. package/src/resources/v1/auth/auth.ts +132 -13
  501. package/src/resources/v1/auth/index.ts +4 -2
  502. package/src/resources/v1/auth/login.ts +68 -5
  503. package/src/resources/v1/auth/number-2fa.ts +77 -11
  504. package/src/resources/v1/auth/organization-invites.ts +6 -0
  505. package/src/resources/v1/chat/chat.ts +166 -19
  506. package/src/resources/v1/chat/index.ts +1 -1
  507. package/src/resources/v1/chat/sessions.ts +14 -0
  508. package/src/resources/v1/chat/test.ts +12 -0
  509. package/src/resources/v1/components.ts +588 -33
  510. package/src/resources/v1/embed/component.ts +34 -1
  511. package/src/resources/v1/embed/embed.ts +34 -21
  512. package/src/resources/v1/embed/index.ts +1 -1
  513. package/src/resources/v1/explainers.ts +27 -2
  514. package/src/resources/v1/flashcards.ts +292 -31
  515. package/src/resources/v1/folders.ts +111 -9
  516. package/src/resources/v1/index.ts +45 -15
  517. package/src/resources/v1/materials/bulk.ts +6 -0
  518. package/src/resources/v1/materials/index.ts +16 -2
  519. package/src/resources/v1/materials/materials.ts +395 -20
  520. package/src/resources/v1/materials/test.ts +31 -7
  521. package/src/resources/v1/materials/upload.ts +245 -11
  522. package/src/resources/v1/organizations/api-keys.ts +35 -1
  523. package/src/resources/v1/organizations/index.ts +1 -1
  524. package/src/resources/v1/organizations/logo/logo.ts +6 -0
  525. package/src/resources/v1/organizations/logo/upload.ts +12 -0
  526. package/src/resources/v1/organizations/organizations.ts +14 -2
  527. package/src/resources/v1/organizations/profile/models.ts +6 -0
  528. package/src/resources/v1/organizations/profile/profile.ts +14 -0
  529. package/src/resources/v1/organizations/profile/team.ts +40 -0
  530. package/src/resources/v1/organizations/team/invite.ts +14 -0
  531. package/src/resources/v1/organizations/team/team.ts +42 -0
  532. package/src/resources/v1/organizations/theme.ts +12 -0
  533. package/src/resources/v1/organizations/usage.ts +8 -0
  534. package/src/resources/v1/scenarios/component.ts +37 -1
  535. package/src/resources/v1/scenarios/index.ts +2 -2
  536. package/src/resources/v1/scenarios/scenarios.ts +73 -4
  537. package/src/resources/v1/scenarios/sessions.ts +12 -0
  538. package/src/resources/v1/scenarios/submissions/user.ts +12 -0
  539. package/src/resources/v1/tests/component.ts +6 -0
  540. package/src/resources/v1/tests/index.ts +7 -1
  541. package/src/resources/v1/tests/tests.ts +116 -4
  542. package/src/resources/v1/upload/component.ts +65 -0
  543. package/src/resources/v1/upload/index.ts +4 -0
  544. package/src/resources/v1/upload/upload.ts +15 -0
  545. package/src/resources/v1/upload.ts +3 -0
  546. package/src/resources/v1/usage.ts +431 -16
  547. package/src/resources/v1/v1.ts +98 -20
  548. package/src/version.ts +1 -1
  549. package/version.d.mts +1 -1
  550. package/version.d.ts +1 -1
  551. package/version.js +1 -1
  552. package/version.mjs +1 -1
@@ -0,0 +1,265 @@
1
+ import { RFC1738 } from './formats';
2
+ import type { DefaultEncoder, Format } from './types';
3
+ import { isArray } from '../utils/values';
4
+
5
+ export let has = (obj: object, key: PropertyKey): boolean => (
6
+ (has = (Object as any).hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty)),
7
+ has(obj, key)
8
+ );
9
+
10
+ const hex_table = /* @__PURE__ */ (() => {
11
+ const array = [];
12
+ for (let i = 0; i < 256; ++i) {
13
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
14
+ }
15
+
16
+ return array;
17
+ })();
18
+
19
+ function compact_queue<T extends Record<string, any>>(queue: Array<{ obj: T; prop: string }>) {
20
+ while (queue.length > 1) {
21
+ const item = queue.pop();
22
+ if (!item) continue;
23
+
24
+ const obj = item.obj[item.prop];
25
+
26
+ if (isArray(obj)) {
27
+ const compacted: unknown[] = [];
28
+
29
+ for (let j = 0; j < obj.length; ++j) {
30
+ if (typeof obj[j] !== 'undefined') {
31
+ compacted.push(obj[j]);
32
+ }
33
+ }
34
+
35
+ // @ts-ignore
36
+ item.obj[item.prop] = compacted;
37
+ }
38
+ }
39
+ }
40
+
41
+ function array_to_object(source: any[], options: { plainObjects: boolean }) {
42
+ const obj = options && options.plainObjects ? Object.create(null) : {};
43
+ for (let i = 0; i < source.length; ++i) {
44
+ if (typeof source[i] !== 'undefined') {
45
+ obj[i] = source[i];
46
+ }
47
+ }
48
+
49
+ return obj;
50
+ }
51
+
52
+ export function merge(
53
+ target: any,
54
+ source: any,
55
+ options: { plainObjects?: boolean; allowPrototypes?: boolean } = {},
56
+ ) {
57
+ if (!source) {
58
+ return target;
59
+ }
60
+
61
+ if (typeof source !== 'object') {
62
+ if (isArray(target)) {
63
+ target.push(source);
64
+ } else if (target && typeof target === 'object') {
65
+ if ((options && (options.plainObjects || options.allowPrototypes)) || !has(Object.prototype, source)) {
66
+ target[source] = true;
67
+ }
68
+ } else {
69
+ return [target, source];
70
+ }
71
+
72
+ return target;
73
+ }
74
+
75
+ if (!target || typeof target !== 'object') {
76
+ return [target].concat(source);
77
+ }
78
+
79
+ let mergeTarget = target;
80
+ if (isArray(target) && !isArray(source)) {
81
+ // @ts-ignore
82
+ mergeTarget = array_to_object(target, options);
83
+ }
84
+
85
+ if (isArray(target) && isArray(source)) {
86
+ source.forEach(function (item, i) {
87
+ if (has(target, i)) {
88
+ const targetItem = target[i];
89
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
90
+ target[i] = merge(targetItem, item, options);
91
+ } else {
92
+ target.push(item);
93
+ }
94
+ } else {
95
+ target[i] = item;
96
+ }
97
+ });
98
+ return target;
99
+ }
100
+
101
+ return Object.keys(source).reduce(function (acc, key) {
102
+ const value = source[key];
103
+
104
+ if (has(acc, key)) {
105
+ acc[key] = merge(acc[key], value, options);
106
+ } else {
107
+ acc[key] = value;
108
+ }
109
+ return acc;
110
+ }, mergeTarget);
111
+ }
112
+
113
+ export function assign_single_source(target: any, source: any) {
114
+ return Object.keys(source).reduce(function (acc, key) {
115
+ acc[key] = source[key];
116
+ return acc;
117
+ }, target);
118
+ }
119
+
120
+ export function decode(str: string, _: any, charset: string) {
121
+ const strWithoutPlus = str.replace(/\+/g, ' ');
122
+ if (charset === 'iso-8859-1') {
123
+ // unescape never throws, no try...catch needed:
124
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
125
+ }
126
+ // utf-8
127
+ try {
128
+ return decodeURIComponent(strWithoutPlus);
129
+ } catch (e) {
130
+ return strWithoutPlus;
131
+ }
132
+ }
133
+
134
+ const limit = 1024;
135
+
136
+ export const encode: (
137
+ str: any,
138
+ defaultEncoder: DefaultEncoder,
139
+ charset: string,
140
+ type: 'key' | 'value',
141
+ format: Format,
142
+ ) => string = (str, _defaultEncoder, charset, _kind, format: Format) => {
143
+ // This code was originally written by Brian White for the io.js core querystring library.
144
+ // It has been adapted here for stricter adherence to RFC 3986
145
+ if (str.length === 0) {
146
+ return str;
147
+ }
148
+
149
+ let string = str;
150
+ if (typeof str === 'symbol') {
151
+ string = Symbol.prototype.toString.call(str);
152
+ } else if (typeof str !== 'string') {
153
+ string = String(str);
154
+ }
155
+
156
+ if (charset === 'iso-8859-1') {
157
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
158
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
159
+ });
160
+ }
161
+
162
+ let out = '';
163
+ for (let j = 0; j < string.length; j += limit) {
164
+ const segment = string.length >= limit ? string.slice(j, j + limit) : string;
165
+ const arr = [];
166
+
167
+ for (let i = 0; i < segment.length; ++i) {
168
+ let c = segment.charCodeAt(i);
169
+ if (
170
+ c === 0x2d || // -
171
+ c === 0x2e || // .
172
+ c === 0x5f || // _
173
+ c === 0x7e || // ~
174
+ (c >= 0x30 && c <= 0x39) || // 0-9
175
+ (c >= 0x41 && c <= 0x5a) || // a-z
176
+ (c >= 0x61 && c <= 0x7a) || // A-Z
177
+ (format === RFC1738 && (c === 0x28 || c === 0x29)) // ( )
178
+ ) {
179
+ arr[arr.length] = segment.charAt(i);
180
+ continue;
181
+ }
182
+
183
+ if (c < 0x80) {
184
+ arr[arr.length] = hex_table[c];
185
+ continue;
186
+ }
187
+
188
+ if (c < 0x800) {
189
+ arr[arr.length] = hex_table[0xc0 | (c >> 6)]! + hex_table[0x80 | (c & 0x3f)];
190
+ continue;
191
+ }
192
+
193
+ if (c < 0xd800 || c >= 0xe000) {
194
+ arr[arr.length] =
195
+ hex_table[0xe0 | (c >> 12)]! + hex_table[0x80 | ((c >> 6) & 0x3f)] + hex_table[0x80 | (c & 0x3f)];
196
+ continue;
197
+ }
198
+
199
+ i += 1;
200
+ c = 0x10000 + (((c & 0x3ff) << 10) | (segment.charCodeAt(i) & 0x3ff));
201
+
202
+ arr[arr.length] =
203
+ hex_table[0xf0 | (c >> 18)]! +
204
+ hex_table[0x80 | ((c >> 12) & 0x3f)] +
205
+ hex_table[0x80 | ((c >> 6) & 0x3f)] +
206
+ hex_table[0x80 | (c & 0x3f)];
207
+ }
208
+
209
+ out += arr.join('');
210
+ }
211
+
212
+ return out;
213
+ };
214
+
215
+ export function compact(value: any) {
216
+ const queue = [{ obj: { o: value }, prop: 'o' }];
217
+ const refs = [];
218
+
219
+ for (let i = 0; i < queue.length; ++i) {
220
+ const item = queue[i];
221
+ // @ts-ignore
222
+ const obj = item.obj[item.prop];
223
+
224
+ const keys = Object.keys(obj);
225
+ for (let j = 0; j < keys.length; ++j) {
226
+ const key = keys[j]!;
227
+ const val = obj[key];
228
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
229
+ queue.push({ obj: obj, prop: key });
230
+ refs.push(val);
231
+ }
232
+ }
233
+ }
234
+
235
+ compact_queue(queue);
236
+
237
+ return value;
238
+ }
239
+
240
+ export function is_regexp(obj: any) {
241
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
242
+ }
243
+
244
+ export function is_buffer(obj: any) {
245
+ if (!obj || typeof obj !== 'object') {
246
+ return false;
247
+ }
248
+
249
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
250
+ }
251
+
252
+ export function combine(a: any, b: any) {
253
+ return [].concat(a, b);
254
+ }
255
+
256
+ export function maybe_map<T>(val: T[], fn: (v: T) => T) {
257
+ if (isArray(val)) {
258
+ const mapped = [];
259
+ for (let i = 0; i < val.length; i += 1) {
260
+ mapped.push(fn(val[i]!));
261
+ }
262
+ return mapped;
263
+ }
264
+ return fn(val);
265
+ }
@@ -106,6 +106,7 @@ export const formatRequestDetails = (details: {
106
106
  ([name, value]) => [
107
107
  name,
108
108
  (
109
+ name.toLowerCase() === 'x-api-key' ||
109
110
  name.toLowerCase() === 'authorization' ||
110
111
  name.toLowerCase() === 'cookie' ||
111
112
  name.toLowerCase() === 'set-cookie'
@@ -17,6 +17,12 @@ export class Admin extends APIResource {
17
17
  organizations: OrganizationsAPI.Organizations = new OrganizationsAPI.Organizations(this._client);
18
18
  models: ModelsAPI.Models = new ModelsAPI.Models(this._client);
19
19
 
20
+ /**
21
+ * @example
22
+ * ```ts
23
+ * await client.v1.admin.getUsers();
24
+ * ```
25
+ */
20
26
  getUsers(options?: RequestOptions): APIPromise<void> {
21
27
  return this._client.get('/api/v1/admin/users', {
22
28
  ...options,
@@ -6,6 +6,12 @@ import { buildHeaders } from '../../../internal/headers';
6
6
  import { RequestOptions } from '../../../internal/request-options';
7
7
 
8
8
  export class Models extends APIResource {
9
+ /**
10
+ * @example
11
+ * ```ts
12
+ * await client.v1.admin.models.listAll();
13
+ * ```
14
+ */
9
15
  listAll(options?: RequestOptions): APIPromise<void> {
10
16
  return this._client.get('/api/v1/admin/models/all', {
11
17
  ...options,
@@ -7,6 +7,14 @@ import { RequestOptions } from '../../../internal/request-options';
7
7
  import { path } from '../../../internal/utils/path';
8
8
 
9
9
  export class OrganizationInvites extends APIResource {
10
+ /**
11
+ * Create organization invite
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * await client.v1.admin.organizationInvites.create();
16
+ * ```
17
+ */
10
18
  create(body: OrganizationInviteCreateParams, options?: RequestOptions): APIPromise<void> {
11
19
  return this._client.post('/api/v1/admin/organization-invites', {
12
20
  body,
@@ -15,6 +23,12 @@ export class OrganizationInvites extends APIResource {
15
23
  });
16
24
  }
17
25
 
26
+ /**
27
+ * @example
28
+ * ```ts
29
+ * await client.v1.admin.organizationInvites.list();
30
+ * ```
31
+ */
18
32
  list(options?: RequestOptions): APIPromise<void> {
19
33
  return this._client.get('/api/v1/admin/organization-invites', {
20
34
  ...options,
@@ -22,6 +36,12 @@ export class OrganizationInvites extends APIResource {
22
36
  });
23
37
  }
24
38
 
39
+ /**
40
+ * @example
41
+ * ```ts
42
+ * await client.v1.admin.organizationInvites.delete('id');
43
+ * ```
44
+ */
25
45
  delete(id: string, options?: RequestOptions): APIPromise<void> {
26
46
  return this._client.delete(path`/api/v1/admin/organization-invites/${id}`, {
27
47
  ...options,
@@ -29,6 +49,12 @@ export class OrganizationInvites extends APIResource {
29
49
  });
30
50
  }
31
51
 
52
+ /**
53
+ * @example
54
+ * ```ts
55
+ * await client.v1.admin.organizationInvites.resend('id');
56
+ * ```
57
+ */
32
58
  resend(id: string, options?: RequestOptions): APIPromise<void> {
33
59
  return this._client.post(path`/api/v1/admin/organization-invites/${id}/resend`, {
34
60
  ...options,
@@ -7,6 +7,14 @@ import { RequestOptions } from '../../../../../internal/request-options';
7
7
  import { path } from '../../../../../internal/utils/path';
8
8
 
9
9
  export class Excluded extends APIResource {
10
+ /**
11
+ * @example
12
+ * ```ts
13
+ * await client.v1.admin.organizations.models.excluded.create(
14
+ * 'organizationId',
15
+ * );
16
+ * ```
17
+ */
10
18
  create(organizationID: string, options?: RequestOptions): APIPromise<void> {
11
19
  return this._client.post(path`/api/v1/admin/organizations/${organizationID}/models/excluded`, {
12
20
  ...options,
@@ -14,6 +22,14 @@ export class Excluded extends APIResource {
14
22
  });
15
23
  }
16
24
 
25
+ /**
26
+ * @example
27
+ * ```ts
28
+ * await client.v1.admin.organizations.models.excluded.list(
29
+ * 'organizationId',
30
+ * );
31
+ * ```
32
+ */
17
33
  list(organizationID: string, options?: RequestOptions): APIPromise<void> {
18
34
  return this._client.get(path`/api/v1/admin/organizations/${organizationID}/models/excluded`, {
19
35
  ...options,
@@ -10,6 +10,12 @@ import { RequestOptions } from '../../../../internal/request-options';
10
10
  export class Organizations extends APIResource {
11
11
  models: ModelsAPI.Models = new ModelsAPI.Models(this._client);
12
12
 
13
+ /**
14
+ * @example
15
+ * ```ts
16
+ * await client.v1.admin.organizations.list();
17
+ * ```
18
+ */
13
19
  list(options?: RequestOptions): APIPromise<void> {
14
20
  return this._client.get('/api/v1/admin/organizations', {
15
21
  ...options,
@@ -11,6 +11,14 @@ import { path } from '../../../internal/utils/path';
11
11
  export class AudioRecaps extends APIResource {
12
12
  sections: SectionsAPI.Sections = new SectionsAPI.Sections(this._client);
13
13
 
14
+ /**
15
+ * Create a new audio recap
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * await client.v1.audioRecaps.create();
20
+ * ```
21
+ */
14
22
  create(body: AudioRecapCreateParams, options?: RequestOptions): APIPromise<void> {
15
23
  return this._client.post('/api/v1/audio-recaps/create', {
16
24
  body,
@@ -19,6 +27,14 @@ export class AudioRecaps extends APIResource {
19
27
  });
20
28
  }
21
29
 
30
+ /**
31
+ * Get audio recap by ID
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * await client.v1.audioRecaps.retrieve('recapId');
36
+ * ```
37
+ */
22
38
  retrieve(recapID: string, options?: RequestOptions): APIPromise<void> {
23
39
  return this._client.get(path`/api/v1/audio-recaps/${recapID}/get`, {
24
40
  ...options,
@@ -26,6 +42,14 @@ export class AudioRecaps extends APIResource {
26
42
  });
27
43
  }
28
44
 
45
+ /**
46
+ * Ask a question about the audio recap
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * await client.v1.audioRecaps.askQuestion('recapId');
51
+ * ```
52
+ */
29
53
  askQuestion(
30
54
  recapID: string,
31
55
  body: AudioRecapAskQuestionParams,
@@ -7,6 +7,16 @@ import { RequestOptions } from '../../../internal/request-options';
7
7
  import { path } from '../../../internal/utils/path';
8
8
 
9
9
  export class Sections extends APIResource {
10
+ /**
11
+ * Get specific audio recap section
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * await client.v1.audioRecaps.sections.retrieve('sectionId', {
16
+ * recapId: 'recapId',
17
+ * });
18
+ * ```
19
+ */
10
20
  retrieve(sectionID: string, params: SectionRetrieveParams, options?: RequestOptions): APIPromise<void> {
11
21
  const { recapId } = params;
12
22
  return this._client.get(path`/api/v1/audio-recaps/${recapId}/sections/${sectionID}`, {
@@ -15,6 +25,14 @@ export class Sections extends APIResource {
15
25
  });
16
26
  }
17
27
 
28
+ /**
29
+ * Get audio recap sections
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * await client.v1.audioRecaps.sections.list('recapId');
34
+ * ```
35
+ */
18
36
  list(recapID: string, options?: RequestOptions): APIPromise<void> {
19
37
  return this._client.get(path`/api/v1/audio-recaps/${recapID}/sections`, {
20
38
  ...options,
@@ -24,6 +42,9 @@ export class Sections extends APIResource {
24
42
  }
25
43
 
26
44
  export interface SectionRetrieveParams {
45
+ /**
46
+ * Audio recap ID
47
+ */
27
48
  recapId: string;
28
49
  }
29
50
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as LoginAPI from './login';
5
- import { Login, LoginCreateParams, LoginVerify2faParams, LoginVerifyBackupCodeParams } from './login';
5
+ import { Login, LoginAuthenticateParams, LoginVerify2faParams, LoginVerifyBackupCodeParams } from './login';
6
6
  import * as Number2faAPI from './number-2fa';
7
7
  import {
8
8
  Number2fa,
@@ -23,14 +23,48 @@ export class Auth extends APIResource {
23
23
  organizationInvites: OrganizationInvitesAPI.OrganizationInvites =
24
24
  new OrganizationInvitesAPI.OrganizationInvites(this._client);
25
25
 
26
- forgotPassword(body: AuthForgotPasswordParams, options?: RequestOptions): APIPromise<void> {
27
- return this._client.post('/api/v1/auth/forgot-password', {
26
+ /**
27
+ * Get current user profile
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * await client.v1.auth.getProfile();
32
+ * ```
33
+ */
34
+ getProfile(options?: RequestOptions): APIPromise<void> {
35
+ return this._client.get('/api/v1/auth/profile', {
36
+ ...options,
37
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
38
+ });
39
+ }
40
+
41
+ /**
42
+ * Register new user
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * await client.v1.auth.registerNewUser({
47
+ * email: 'user@example.com',
48
+ * name: 'John Doe',
49
+ * organizationName: 'Acme Corp',
50
+ * password: 'password123',
51
+ * });
52
+ * ```
53
+ */
54
+ registerNewUser(body: AuthRegisterNewUserParams, options?: RequestOptions): APIPromise<void> {
55
+ return this._client.post('/api/v1/auth/register', {
28
56
  body,
29
57
  ...options,
30
58
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
31
59
  });
32
60
  }
33
61
 
62
+ /**
63
+ * @example
64
+ * ```ts
65
+ * await client.v1.auth.registerOrganization();
66
+ * ```
67
+ */
34
68
  registerOrganization(options?: RequestOptions): APIPromise<void> {
35
69
  return this._client.post('/api/v1/auth/register-organization', {
36
70
  ...options,
@@ -38,6 +72,14 @@ export class Auth extends APIResource {
38
72
  });
39
73
  }
40
74
 
75
+ /**
76
+ * Register new user with organization invite
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * await client.v1.auth.registerWithInvite();
81
+ * ```
82
+ */
41
83
  registerWithInvite(body: AuthRegisterWithInviteParams, options?: RequestOptions): APIPromise<void> {
42
84
  return this._client.post('/api/v1/auth/register-with-invite', {
43
85
  body,
@@ -46,34 +88,109 @@ export class Auth extends APIResource {
46
88
  });
47
89
  }
48
90
 
49
- resetPassword(body: AuthResetPasswordParams, options?: RequestOptions): APIPromise<void> {
50
- return this._client.post('/api/v1/auth/reset-password', {
91
+ /**
92
+ * Request password reset
93
+ *
94
+ * @example
95
+ * ```ts
96
+ * await client.v1.auth.requestPasswordReset({
97
+ * email: 'user@example.com',
98
+ * });
99
+ * ```
100
+ */
101
+ requestPasswordReset(body: AuthRequestPasswordResetParams, options?: RequestOptions): APIPromise<void> {
102
+ return this._client.post('/api/v1/auth/forgot-password', {
51
103
  body,
52
104
  ...options,
53
105
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
54
106
  });
55
107
  }
56
108
 
57
- retrieveProfile(options?: RequestOptions): APIPromise<void> {
58
- return this._client.get('/api/v1/auth/profile', {
109
+ /**
110
+ * Reset password with token
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * await client.v1.auth.resetPassword({
115
+ * token: 'reset-token-uuid',
116
+ * newPassword: 'newPassword123',
117
+ * });
118
+ * ```
119
+ */
120
+ resetPassword(body: AuthResetPasswordParams, options?: RequestOptions): APIPromise<void> {
121
+ return this._client.post('/api/v1/auth/reset-password', {
122
+ body,
59
123
  ...options,
60
124
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
61
125
  });
62
126
  }
63
127
 
64
- verifyResetToken(options?: RequestOptions): APIPromise<void> {
65
- return this._client.post('/api/v1/auth/verify-reset-token', {
128
+ /**
129
+ * Verify password reset token
130
+ *
131
+ * @example
132
+ * ```ts
133
+ * await client.v1.auth.verifyResetToken({ token: 'token' });
134
+ * ```
135
+ */
136
+ verifyResetToken(query: AuthVerifyResetTokenParams, options?: RequestOptions): APIPromise<void> {
137
+ return this._client.get('/api/v1/auth/verify-reset-token', {
138
+ query,
66
139
  ...options,
67
140
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
68
141
  });
69
142
  }
70
143
  }
71
144
 
72
- export interface AuthForgotPasswordParams {}
145
+ export interface AuthRegisterNewUserParams {
146
+ /**
147
+ * User email address
148
+ */
149
+ email: string;
150
+
151
+ /**
152
+ * User full name
153
+ */
154
+ name: string;
155
+
156
+ /**
157
+ * Organization name
158
+ */
159
+ organizationName: string;
160
+
161
+ /**
162
+ * User password
163
+ */
164
+ password: string;
165
+ }
73
166
 
74
167
  export interface AuthRegisterWithInviteParams {}
75
168
 
76
- export interface AuthResetPasswordParams {}
169
+ export interface AuthRequestPasswordResetParams {
170
+ /**
171
+ * Email address to send reset link
172
+ */
173
+ email: string;
174
+ }
175
+
176
+ export interface AuthResetPasswordParams {
177
+ /**
178
+ * Password reset token from email
179
+ */
180
+ token: string;
181
+
182
+ /**
183
+ * New password
184
+ */
185
+ newPassword: string;
186
+ }
187
+
188
+ export interface AuthVerifyResetTokenParams {
189
+ /**
190
+ * Password reset token
191
+ */
192
+ token: string;
193
+ }
77
194
 
78
195
  Auth.Login = Login;
79
196
  Auth.Number2fa = Number2fa;
@@ -81,14 +198,16 @@ Auth.OrganizationInvites = OrganizationInvites;
81
198
 
82
199
  export declare namespace Auth {
83
200
  export {
84
- type AuthForgotPasswordParams as AuthForgotPasswordParams,
201
+ type AuthRegisterNewUserParams as AuthRegisterNewUserParams,
85
202
  type AuthRegisterWithInviteParams as AuthRegisterWithInviteParams,
203
+ type AuthRequestPasswordResetParams as AuthRequestPasswordResetParams,
86
204
  type AuthResetPasswordParams as AuthResetPasswordParams,
205
+ type AuthVerifyResetTokenParams as AuthVerifyResetTokenParams,
87
206
  };
88
207
 
89
208
  export {
90
209
  Login as Login,
91
- type LoginCreateParams as LoginCreateParams,
210
+ type LoginAuthenticateParams as LoginAuthenticateParams,
92
211
  type LoginVerify2faParams as LoginVerify2faParams,
93
212
  type LoginVerifyBackupCodeParams as LoginVerifyBackupCodeParams,
94
213
  };