@learnorama/mozaik-sdk 0.18.0-staging.59.1 → 0.19.0-staging.60.1

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 (286) hide show
  1. package/CVS-PLAYBACK.md +5 -0
  2. package/dist/api/account.d.ts +1 -1
  3. package/dist/api/account.js.map +1 -1
  4. package/dist/api/admin-catalogue.d.ts +1 -1
  5. package/dist/api/admin-catalogue.js.map +1 -1
  6. package/dist/api/admin-consumption.d.ts +1 -1
  7. package/dist/api/admin-consumption.js.map +1 -1
  8. package/dist/api/admin-contracts.d.ts +1 -1
  9. package/dist/api/admin-contracts.js.map +1 -1
  10. package/dist/api/admin-customer.d.ts +1 -1
  11. package/dist/api/admin-customer.js.map +1 -1
  12. package/dist/api/admin-desk.d.ts +89 -1
  13. package/dist/api/admin-desk.js +253 -1
  14. package/dist/api/admin-desk.js.map +1 -1
  15. package/dist/api/admin-licenses.d.ts +1 -1
  16. package/dist/api/admin-licenses.js.map +1 -1
  17. package/dist/api/admin-partner-selections.d.ts +1 -1
  18. package/dist/api/admin-partner-selections.js.map +1 -1
  19. package/dist/api/admin-patrons.d.ts +1 -1
  20. package/dist/api/admin-patrons.js.map +1 -1
  21. package/dist/api/admin-reviews.d.ts +1 -1
  22. package/dist/api/admin-reviews.js.map +1 -1
  23. package/dist/api/admin-roles.d.ts +1 -1
  24. package/dist/api/admin-roles.js.map +1 -1
  25. package/dist/api/admin-support.d.ts +1 -1
  26. package/dist/api/admin-support.js.map +1 -1
  27. package/dist/api/admin-tenants.d.ts +1 -1
  28. package/dist/api/admin-tenants.js.map +1 -1
  29. package/dist/api/admin-tutoring.d.ts +1 -1
  30. package/dist/api/admin-tutoring.js.map +1 -1
  31. package/dist/api/admin-vod.d.ts +1 -1
  32. package/dist/api/admin-vod.js.map +1 -1
  33. package/dist/api/auth-device.d.ts +1 -1
  34. package/dist/api/auth-device.js.map +1 -1
  35. package/dist/api/auth.d.ts +1 -1
  36. package/dist/api/auth.js.map +1 -1
  37. package/dist/api/biblio-billing-webhooks.d.ts +1 -1
  38. package/dist/api/biblio-billing-webhooks.js.map +1 -1
  39. package/dist/api/biblio-billing.d.ts +1 -1
  40. package/dist/api/biblio-billing.js.map +1 -1
  41. package/dist/api/biblio-catalogue.d.ts +1 -1
  42. package/dist/api/biblio-catalogue.js.map +1 -1
  43. package/dist/api/biblio-home.d.ts +1 -1
  44. package/dist/api/biblio-home.js.map +1 -1
  45. package/dist/api/biblio-learning-author-profiles.d.ts +1 -1
  46. package/dist/api/biblio-learning-author-profiles.js.map +1 -1
  47. package/dist/api/biblio-learning-authoring.d.ts +1 -1
  48. package/dist/api/biblio-learning-authoring.js.map +1 -1
  49. package/dist/api/biblio-learning-editorial.d.ts +1 -1
  50. package/dist/api/biblio-learning-editorial.js.map +1 -1
  51. package/dist/api/biblio-learning-feedback.d.ts +1 -1
  52. package/dist/api/biblio-learning-feedback.js.map +1 -1
  53. package/dist/api/biblio-learning-finance.d.ts +1 -1
  54. package/dist/api/biblio-learning-finance.js.map +1 -1
  55. package/dist/api/biblio-learning-integrations.d.ts +1 -1
  56. package/dist/api/biblio-learning-integrations.js.map +1 -1
  57. package/dist/api/biblio-learning-membership.d.ts +1 -1
  58. package/dist/api/biblio-learning-membership.js.map +1 -1
  59. package/dist/api/biblio-learning.d.ts +1 -1
  60. package/dist/api/biblio-learning.js.map +1 -1
  61. package/dist/api/biblio-library.d.ts +1 -1
  62. package/dist/api/biblio-library.js.map +1 -1
  63. package/dist/api/biblio-nextory.d.ts +1 -1
  64. package/dist/api/biblio-nextory.js.map +1 -1
  65. package/dist/api/biblio-press.d.ts +1 -1
  66. package/dist/api/biblio-press.js.map +1 -1
  67. package/dist/api/biblio-search.d.ts +1 -1
  68. package/dist/api/biblio-search.js.map +1 -1
  69. package/dist/api/biblio-telemetry.d.ts +1 -1
  70. package/dist/api/biblio-telemetry.js.map +1 -1
  71. package/dist/api/biblio-youscribe.js.map +1 -1
  72. package/dist/api/consumption.d.ts +1 -1
  73. package/dist/api/consumption.js.map +1 -1
  74. package/dist/api/cvs-app.d.ts +1 -1
  75. package/dist/api/cvs-app.js.map +1 -1
  76. package/dist/api/cvs-documents.d.ts +1 -1
  77. package/dist/api/cvs-documents.js.map +1 -1
  78. package/dist/api/cvs-favorites.d.ts +1 -1
  79. package/dist/api/cvs-favorites.js.map +1 -1
  80. package/dist/api/cvs-ils.d.ts +1 -1
  81. package/dist/api/cvs-ils.js.map +1 -1
  82. package/dist/api/cvs-loans.d.ts +1 -1
  83. package/dist/api/cvs-loans.js.map +1 -1
  84. package/dist/api/cvs-payments.d.ts +1 -1
  85. package/dist/api/cvs-payments.js.map +1 -1
  86. package/dist/api/cvs-streaming.d.ts +1 -1
  87. package/dist/api/cvs-streaming.js.map +1 -1
  88. package/dist/api/index.d.ts +2 -2
  89. package/dist/api/index.js +2 -2
  90. package/dist/api/partner-catalogue.d.ts +1 -1
  91. package/dist/api/partner-catalogue.js.map +1 -1
  92. package/dist/api/partner-reader-nextory.d.ts +1 -1
  93. package/dist/api/partner-reader-nextory.js.map +1 -1
  94. package/dist/api/partner-reader-youscribe.d.ts +1 -1
  95. package/dist/api/partner-reader-youscribe.js.map +1 -1
  96. package/dist/api/partner-reading.d.ts +1 -1
  97. package/dist/api/partner-reading.js.map +1 -1
  98. package/dist/api/profiles.d.ts +1 -1
  99. package/dist/api/profiles.js.map +1 -1
  100. package/dist/api/search.d.ts +1 -1
  101. package/dist/api/search.js.map +1 -1
  102. package/dist/api/tutoring-catalogue.d.ts +1 -1
  103. package/dist/api/tutoring-catalogue.js.map +1 -1
  104. package/dist/api/tutoring-chat.d.ts +1 -1
  105. package/dist/api/tutoring-chat.js.map +1 -1
  106. package/dist/api/tutoring-dispatch.d.ts +1 -1
  107. package/dist/api/tutoring-dispatch.js.map +1 -1
  108. package/dist/api/tutoring-practitioner.js.map +1 -1
  109. package/dist/api/tutoring-requests.d.ts +1 -1
  110. package/dist/api/tutoring-requests.js.map +1 -1
  111. package/dist/auth.d.ts +1 -1
  112. package/dist/chunks/client2.d.ts +1 -1
  113. package/dist/chunks/connection.d.ts +1 -1
  114. package/dist/chunks/index.d.ts +1217 -597
  115. package/dist/index.d.ts +3 -3
  116. package/dist/index.js +3 -3
  117. package/dist/index.js.map +1 -1
  118. package/dist/models.d.ts +2 -2
  119. package/dist/models.js +74 -3
  120. package/dist/models.js.map +1 -1
  121. package/dist/react/account.d.ts +1 -1
  122. package/dist/react/account.js +1 -1
  123. package/dist/react/account.js.map +1 -1
  124. package/dist/react/admin-catalogue.d.ts +1 -1
  125. package/dist/react/admin-catalogue.js +1 -1
  126. package/dist/react/admin-catalogue.js.map +1 -1
  127. package/dist/react/admin-consumption.d.ts +1 -1
  128. package/dist/react/admin-consumption.js +1 -1
  129. package/dist/react/admin-consumption.js.map +1 -1
  130. package/dist/react/admin-contracts.d.ts +1 -1
  131. package/dist/react/admin-contracts.js +1 -1
  132. package/dist/react/admin-contracts.js.map +1 -1
  133. package/dist/react/admin-customer.d.ts +1 -1
  134. package/dist/react/admin-customer.js +1 -1
  135. package/dist/react/admin-customer.js.map +1 -1
  136. package/dist/react/admin-desk.d.ts +269 -1
  137. package/dist/react/admin-desk.js +498 -2
  138. package/dist/react/admin-desk.js.map +1 -1
  139. package/dist/react/admin-licenses.d.ts +1 -1
  140. package/dist/react/admin-licenses.js +1 -1
  141. package/dist/react/admin-licenses.js.map +1 -1
  142. package/dist/react/admin-partner-selections.d.ts +1 -1
  143. package/dist/react/admin-partner-selections.js +1 -1
  144. package/dist/react/admin-partner-selections.js.map +1 -1
  145. package/dist/react/admin-patrons.d.ts +1 -1
  146. package/dist/react/admin-patrons.js +1 -1
  147. package/dist/react/admin-patrons.js.map +1 -1
  148. package/dist/react/admin-reviews.d.ts +1 -1
  149. package/dist/react/admin-reviews.js +1 -1
  150. package/dist/react/admin-reviews.js.map +1 -1
  151. package/dist/react/admin-roles.d.ts +1 -1
  152. package/dist/react/admin-roles.js +1 -1
  153. package/dist/react/admin-roles.js.map +1 -1
  154. package/dist/react/admin-support.d.ts +1 -1
  155. package/dist/react/admin-support.js +1 -1
  156. package/dist/react/admin-support.js.map +1 -1
  157. package/dist/react/admin-tenants.d.ts +1 -1
  158. package/dist/react/admin-tenants.js +1 -1
  159. package/dist/react/admin-tenants.js.map +1 -1
  160. package/dist/react/admin-tutoring.d.ts +1 -1
  161. package/dist/react/admin-tutoring.js +1 -1
  162. package/dist/react/admin-tutoring.js.map +1 -1
  163. package/dist/react/admin-vod.d.ts +1 -1
  164. package/dist/react/admin-vod.js +1 -1
  165. package/dist/react/admin-vod.js.map +1 -1
  166. package/dist/react/auth-device.d.ts +1 -1
  167. package/dist/react/auth-device.js +1 -1
  168. package/dist/react/auth-device.js.map +1 -1
  169. package/dist/react/auth.d.ts +1 -1
  170. package/dist/react/auth.js +1 -1
  171. package/dist/react/auth.js.map +1 -1
  172. package/dist/react/biblio-billing-webhooks.d.ts +1 -1
  173. package/dist/react/biblio-billing-webhooks.js +1 -1
  174. package/dist/react/biblio-billing-webhooks.js.map +1 -1
  175. package/dist/react/biblio-billing.d.ts +1 -1
  176. package/dist/react/biblio-billing.js +1 -1
  177. package/dist/react/biblio-billing.js.map +1 -1
  178. package/dist/react/biblio-catalogue.d.ts +1 -1
  179. package/dist/react/biblio-catalogue.js +1 -1
  180. package/dist/react/biblio-catalogue.js.map +1 -1
  181. package/dist/react/biblio-home.d.ts +1 -1
  182. package/dist/react/biblio-home.js +1 -1
  183. package/dist/react/biblio-home.js.map +1 -1
  184. package/dist/react/biblio-learning-author-profiles.d.ts +1 -1
  185. package/dist/react/biblio-learning-author-profiles.js +1 -1
  186. package/dist/react/biblio-learning-author-profiles.js.map +1 -1
  187. package/dist/react/biblio-learning-authoring.d.ts +1 -1
  188. package/dist/react/biblio-learning-authoring.js +1 -1
  189. package/dist/react/biblio-learning-authoring.js.map +1 -1
  190. package/dist/react/biblio-learning-editorial.d.ts +1 -1
  191. package/dist/react/biblio-learning-editorial.js +1 -1
  192. package/dist/react/biblio-learning-editorial.js.map +1 -1
  193. package/dist/react/biblio-learning-feedback.d.ts +1 -1
  194. package/dist/react/biblio-learning-feedback.js +1 -1
  195. package/dist/react/biblio-learning-feedback.js.map +1 -1
  196. package/dist/react/biblio-learning-finance.d.ts +1 -1
  197. package/dist/react/biblio-learning-finance.js +1 -1
  198. package/dist/react/biblio-learning-finance.js.map +1 -1
  199. package/dist/react/biblio-learning-integrations.d.ts +1 -1
  200. package/dist/react/biblio-learning-integrations.js +1 -1
  201. package/dist/react/biblio-learning-integrations.js.map +1 -1
  202. package/dist/react/biblio-learning-membership.d.ts +1 -1
  203. package/dist/react/biblio-learning-membership.js +1 -1
  204. package/dist/react/biblio-learning-membership.js.map +1 -1
  205. package/dist/react/biblio-learning.d.ts +1 -1
  206. package/dist/react/biblio-learning.js +1 -1
  207. package/dist/react/biblio-learning.js.map +1 -1
  208. package/dist/react/biblio-library.d.ts +1 -1
  209. package/dist/react/biblio-library.js +1 -1
  210. package/dist/react/biblio-library.js.map +1 -1
  211. package/dist/react/biblio-nextory.d.ts +1 -1
  212. package/dist/react/biblio-nextory.js +1 -1
  213. package/dist/react/biblio-nextory.js.map +1 -1
  214. package/dist/react/biblio-press.d.ts +1 -1
  215. package/dist/react/biblio-press.js +1 -1
  216. package/dist/react/biblio-press.js.map +1 -1
  217. package/dist/react/biblio-search.d.ts +1 -1
  218. package/dist/react/biblio-search.js +1 -1
  219. package/dist/react/biblio-search.js.map +1 -1
  220. package/dist/react/biblio-telemetry.d.ts +1 -1
  221. package/dist/react/biblio-telemetry.js +1 -1
  222. package/dist/react/biblio-telemetry.js.map +1 -1
  223. package/dist/react/biblio-youscribe.d.ts +1 -1
  224. package/dist/react/biblio-youscribe.js +1 -1
  225. package/dist/react/biblio-youscribe.js.map +1 -1
  226. package/dist/react/chat.d.ts +1 -1
  227. package/dist/react/consumption.d.ts +1 -1
  228. package/dist/react/consumption.js +1 -1
  229. package/dist/react/consumption.js.map +1 -1
  230. package/dist/react/cvs-app.d.ts +1 -1
  231. package/dist/react/cvs-app.js +1 -1
  232. package/dist/react/cvs-app.js.map +1 -1
  233. package/dist/react/cvs-documents.d.ts +1 -1
  234. package/dist/react/cvs-documents.js +1 -1
  235. package/dist/react/cvs-documents.js.map +1 -1
  236. package/dist/react/cvs-favorites.d.ts +1 -1
  237. package/dist/react/cvs-favorites.js +1 -1
  238. package/dist/react/cvs-favorites.js.map +1 -1
  239. package/dist/react/cvs-ils.d.ts +1 -1
  240. package/dist/react/cvs-ils.js +1 -1
  241. package/dist/react/cvs-ils.js.map +1 -1
  242. package/dist/react/cvs-loans.d.ts +1 -1
  243. package/dist/react/cvs-loans.js +1 -1
  244. package/dist/react/cvs-loans.js.map +1 -1
  245. package/dist/react/cvs-payments.d.ts +1 -1
  246. package/dist/react/cvs-payments.js +1 -1
  247. package/dist/react/cvs-payments.js.map +1 -1
  248. package/dist/react/cvs-streaming.d.ts +1 -1
  249. package/dist/react/cvs-streaming.js +1 -1
  250. package/dist/react/cvs-streaming.js.map +1 -1
  251. package/dist/react/index.d.ts +2 -2
  252. package/dist/react/index.js +2 -2
  253. package/dist/react/partner-catalogue.d.ts +1 -1
  254. package/dist/react/partner-catalogue.js +1 -1
  255. package/dist/react/partner-catalogue.js.map +1 -1
  256. package/dist/react/partner-reader-nextory.d.ts +1 -1
  257. package/dist/react/partner-reader-nextory.js +1 -1
  258. package/dist/react/partner-reader-nextory.js.map +1 -1
  259. package/dist/react/partner-reader-youscribe.d.ts +1 -1
  260. package/dist/react/partner-reader-youscribe.js +1 -1
  261. package/dist/react/partner-reader-youscribe.js.map +1 -1
  262. package/dist/react/partner-reading.d.ts +1 -1
  263. package/dist/react/partner-reading.js +1 -1
  264. package/dist/react/partner-reading.js.map +1 -1
  265. package/dist/react/profiles.d.ts +1 -1
  266. package/dist/react/profiles.js +1 -1
  267. package/dist/react/profiles.js.map +1 -1
  268. package/dist/react/search.d.ts +1 -1
  269. package/dist/react/search.js +1 -1
  270. package/dist/react/search.js.map +1 -1
  271. package/dist/react/tutoring-catalogue.d.ts +1 -1
  272. package/dist/react/tutoring-catalogue.js +1 -1
  273. package/dist/react/tutoring-catalogue.js.map +1 -1
  274. package/dist/react/tutoring-chat.d.ts +1 -1
  275. package/dist/react/tutoring-chat.js +1 -1
  276. package/dist/react/tutoring-chat.js.map +1 -1
  277. package/dist/react/tutoring-dispatch.d.ts +1 -1
  278. package/dist/react/tutoring-dispatch.js +1 -1
  279. package/dist/react/tutoring-dispatch.js.map +1 -1
  280. package/dist/react/tutoring-practitioner.d.ts +1 -1
  281. package/dist/react/tutoring-practitioner.js +1 -1
  282. package/dist/react/tutoring-practitioner.js.map +1 -1
  283. package/dist/react/tutoring-requests.d.ts +1 -1
  284. package/dist/react/tutoring-requests.js +1 -1
  285. package/dist/react/tutoring-requests.js.map +1 -1
  286. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-learning-integrations.js","names":[],"sources":["../../src/api/biblio-learning-integrations/biblio-learning-integrations.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.18.0\n */\nimport type {\n CourseRevisionRead,\n LearningContractMemberRead,\n LearningEngagementRead,\n LearningEngagementWrite,\n LearningIntegrationDeliveryRead,\n LearningIntegrationResolutionWrite,\n LearningPartnerFeedWrite,\n LearningSalesforceBindingWrite,\n LearningSsoProofWrite,\n LearningTypeformWebhookBody\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningImportPartnerFeedUrl = (courseId: number,\n provider: 'codes-rousseau' | 'les-bons-profs' | 'loecsen',) => {\n\n\n\n\n return `/learning/author/courses/${courseId}/imports/${provider}`\n}\n\n/**\n * Authors import content for an existing course they may edit. Select provider=codes-rousseau for a 17-column semicolon CSV (default skipRows=1, title required); les-bons-profs for JSON section objects encoded in the content string; or loecsen for a 20-column comma CSV (default skipRows=4), reviewed template, languageName, languageCode and templateAudio mappings. Examples set skipRows=0 because they contain data rows only. assetMap translates source references to already imported assets the caller may use. Import validates the entire definition, creates a draft and does not download media, publish the course or provision a provider account. The response describes the new revision; retrieve its author definition to inspect the generated chapters and lessons.\n * @summary Import a partner feed as a native draft revision\n */\nexport const learningImportPartnerFeed = async (courseId: number,\n provider: 'codes-rousseau' | 'les-bons-profs' | 'loecsen',\n learningPartnerFeedWrite: LearningPartnerFeedWrite, options?: Parameters<typeof request>[1]): Promise<CourseRevisionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<CourseRevisionRead>(getLearningImportPartnerFeedUrl(courseId,provider),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPartnerFeedWrite)\n }\n);}\n\n\nexport const getLearningDispatchEngagementUrl = (deliveryId: number,) => {\n\n\n\n\n return `/learning/integrations/braze/deliveries/${deliveryId}/dispatch`\n}\n\n/**\n * A global integration operator dispatches the existing pending delivery after checking current consent and earlier deliveries for the same profile. Nonpending rows are returned unchanged. The result can be sent, failed, uncertain or cancelled; HTTP 200 alone does not confirm delivery. A timeout or ambiguous provider acknowledgement becomes uncertain and is never blindly retried. Resolve uncertainty using external evidence before redispatching; newer deliveries wait for earlier unresolved rows.\n * @summary Dispatch one pending Braze delivery\n */\nexport const learningDispatchEngagement = async (deliveryId: number, options?: Parameters<typeof request>[1]): Promise<LearningIntegrationDeliveryRead> => {\n\n return request<LearningIntegrationDeliveryRead>(getLearningDispatchEngagementUrl(deliveryId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningResolveEngagementUrl = (deliveryId: number,) => {\n\n\n\n\n return `/learning/integrations/braze/deliveries/${deliveryId}/resolve`\n}\n\n/**\n * A global integration operator records a reviewed provider outcome for a failed, uncertain or stale sending delivery. confirmed_sent marks it sent and clears stored properties; confirmed_not_sent returns it to pending for a later explicit dispatch. A sending claim younger than 120 seconds cannot be resolved. This operation records evidence and never sends to Braze itself.\n * @summary Resolve an uncertain or failed Braze delivery\n */\nexport const learningResolveEngagement = async (deliveryId: number,\n learningIntegrationResolutionWrite: LearningIntegrationResolutionWrite, options?: Parameters<typeof request>[1]): Promise<LearningIntegrationDeliveryRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningIntegrationDeliveryRead>(getLearningResolveEngagementUrl(deliveryId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningIntegrationResolutionWrite)\n }\n);}\n\n\nexport const getLearningBindSalesforceUrl = (tenantId: number,) => {\n\n\n\n\n return `/learning/integrations/salesforce/customers/${tenantId}`\n}\n\n/**\n * A global commercial operator maps one customer tenant to an exact Salesforce Account, community, catalogue and exclusive institution learning agreement. Repeating the same identity can update isActive and clockZone; moving an already bound identity or agreement returns 409. clockZone is the reviewed IANA source timezone used to interpret source access dates. Support impersonation and dependent profiles are refused. Returns 204 with no response body.\n * @summary Bind a reviewed Salesforce customer identity\n */\nexport const learningBindSalesforce = async (tenantId: number,\n learningSalesforceBindingWrite: LearningSalesforceBindingWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningBindSalesforceUrl(tenantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSalesforceBindingWrite)\n }\n);}\n\n\nexport const getLearningEngagementPreferenceUrl = () => {\n\n\n\n\n return `/learning/me/engagement`\n}\n\n/**\n * Return the local engagement consent state without contacting Braze. An absent preference is enabled=false and emailOptIn=null. Null emailOptIn means no explicit email subscription preference was supplied; it is distinct from a confirmed opt-out.\n * @summary Read the current profile's engagement preference\n */\nexport const learningEngagementPreference = async ( options?: Parameters<typeof request>[1]): Promise<LearningEngagementRead> => {\n\n return request<LearningEngagementRead>(getLearningEngagementPreferenceUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningSetEngagementPreferenceUrl = () => {\n\n\n\n\n return `/learning/me/engagement`\n}\n\n/**\n * An independent profile explicitly enables or disables engagement and supplies an optional email opt-in. Enabling queues provider attributes; disabling cancels pending/failed deliveries and queues deletion when previously enabled. Personal email is sent only with emailOptIn=true. The response confirms local consent storage, not provider delivery. Repeating unchanged preferences queues no duplicate update. Support impersonation and dependent profiles are refused.\n * @summary Set engagement consent and email preference\n */\nexport const learningSetEngagementPreference = async (learningEngagementWrite: LearningEngagementWrite, options?: Parameters<typeof request>[1]): Promise<LearningEngagementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningEngagementRead>(getLearningSetEngagementPreferenceUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningEngagementWrite)\n }\n);}\n\n\nexport const getLearningLinkPartnerIdentityUrl = (bindingKey: string,) => {\n\n\n\n\n return `/learning/me/integrations/sso/${bindingKey}/link`\n}\n\n/**\n * An already authenticated independent profile presents a one-use partner proof for a reviewed bindingKey. The configured CAS, Wizbii or Iguana protocol verifies the proof before linking the identity and bounded catalogue membership. Wizbii also requires username. This endpoint returns membership, not an OAuth token or a seamless login redirect. It cannot select another beneficiary, replace a revoked membership, or claim an identity linked to someone else. A stronger login with entitlement-change authority is required; support impersonation is refused. Proof replay is blocked for 24 hours.\n * @summary Link a verified partner identity to the current profile\n */\nexport const learningLinkPartnerIdentity = async (bindingKey: string,\n learningSsoProofWrite: LearningSsoProofWrite, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningContractMemberRead>(getLearningLinkPartnerIdentityUrl(bindingKey),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSsoProofWrite)\n }\n);}\n\n\nexport const getLearningSalesforceWebhookUrl = () => {\n\n\n\n\n return `/learning/webhooks/salesforce`\n}\n\n/**\n * Accept a SOAP XML Account notification batch up to 1 MiB with 1–100 unique notification IDs. OrganizationId and EnterpriseUrl must exactly match the configured source. Salesforce Send Session ID must be enabled: the server verifies that session, then fetches authoritative Account snapshots before updating only reviewed customer bindings. Embedded notification fields do not themselves grant authority. Replay receipts prevent conflicting reuse; unknown bindings or ambiguous source data require review. Successful processing returns the Salesforce text/xml Ack envelope. The synthetic session below is a transport fixture and cannot authenticate against a real source.\n * @summary Receive a verified Salesforce SOAP notification\n */\nexport const learningSalesforceWebhook = async (learningSalesforceWebhookBody: string, options?: Parameters<typeof request>[1]): Promise<string> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<string>(getLearningSalesforceWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'text/xml', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSalesforceWebhookBody)\n }\n);}\n\n\nexport const getLearningTypeformWebhookUrl = () => {\n\n\n\n\n return `/learning/webhooks/typeform`\n}\n\n/**\n * Verify typeform-signature as sha256= followed by base64 HMAC-SHA256 of the exact raw request bytes using the configured shared secret. This callback authenticates the provider signature, not a user bearer token. form_response.hidden.mozaik_token must be the existing opaque 43-character invitation; it binds the profile, course, tenant and progress. The configured form ID and exactly one integer answer for the configured rating field are required; at most 100 answers and 1 MiB of raw body are accepted. Only configured text comment fields are collected. First acceptance consumes the invitation; an identical normalized response token/body retry is idempotent, a changed response conflicts, and an unconsumed expired invitation returns 410. Success returns no body.\n * @summary Accept a signed Typeform course survey\n */\nexport const learningTypeformWebhook = async (learningTypeformWebhookBody: LearningTypeformWebhookBody, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningTypeformWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningTypeformWebhookBody)\n }\n);}\n\n\n"],"mappings":";;;AAsBA,MAAa,mCAAmC,UAC5C,aAA+D;CAKjE,OAAO,4BAA4B,SAAS,WAAW;AACzD;;;;;AAMA,MAAa,4BAA4B,OAAO,UAC5C,UACA,0BAAoD,YAAyE;CAE7H,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GACl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gCAAgC,GACrD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAY,GAAG,WAAW,SAAS,OAAO;EAAE;EACvE,MAAM,KAAK,UAAU,6BAA6B;CACpD,CACF;AAAE;AAGF,MAAa,sCAAsC;CAKjD,OAAO;AACT;;;;;AAMA,MAAa,0BAA0B,OAAO,6BAA0D,YAA2D;CAE/J,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,8BAA8B,GACjD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,2BAA2B;CAClD,CACF;AAAE"}
1
+ {"version":3,"file":"biblio-learning-integrations.js","names":[],"sources":["../../src/api/biblio-learning-integrations/biblio-learning-integrations.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.19.0\n */\nimport type {\n CourseRevisionRead,\n LearningContractMemberRead,\n LearningEngagementRead,\n LearningEngagementWrite,\n LearningIntegrationDeliveryRead,\n LearningIntegrationResolutionWrite,\n LearningPartnerFeedWrite,\n LearningSalesforceBindingWrite,\n LearningSsoProofWrite,\n LearningTypeformWebhookBody\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningImportPartnerFeedUrl = (courseId: number,\n provider: 'codes-rousseau' | 'les-bons-profs' | 'loecsen',) => {\n\n\n\n\n return `/learning/author/courses/${courseId}/imports/${provider}`\n}\n\n/**\n * Authors import content for an existing course they may edit. Select provider=codes-rousseau for a 17-column semicolon CSV (default skipRows=1, title required); les-bons-profs for JSON section objects encoded in the content string; or loecsen for a 20-column comma CSV (default skipRows=4), reviewed template, languageName, languageCode and templateAudio mappings. Examples set skipRows=0 because they contain data rows only. assetMap translates source references to already imported assets the caller may use. Import validates the entire definition, creates a draft and does not download media, publish the course or provision a provider account. The response describes the new revision; retrieve its author definition to inspect the generated chapters and lessons.\n * @summary Import a partner feed as a native draft revision\n */\nexport const learningImportPartnerFeed = async (courseId: number,\n provider: 'codes-rousseau' | 'les-bons-profs' | 'loecsen',\n learningPartnerFeedWrite: LearningPartnerFeedWrite, options?: Parameters<typeof request>[1]): Promise<CourseRevisionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<CourseRevisionRead>(getLearningImportPartnerFeedUrl(courseId,provider),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPartnerFeedWrite)\n }\n);}\n\n\nexport const getLearningDispatchEngagementUrl = (deliveryId: number,) => {\n\n\n\n\n return `/learning/integrations/braze/deliveries/${deliveryId}/dispatch`\n}\n\n/**\n * A global integration operator dispatches the existing pending delivery after checking current consent and earlier deliveries for the same profile. Nonpending rows are returned unchanged. The result can be sent, failed, uncertain or cancelled; HTTP 200 alone does not confirm delivery. A timeout or ambiguous provider acknowledgement becomes uncertain and is never blindly retried. Resolve uncertainty using external evidence before redispatching; newer deliveries wait for earlier unresolved rows.\n * @summary Dispatch one pending Braze delivery\n */\nexport const learningDispatchEngagement = async (deliveryId: number, options?: Parameters<typeof request>[1]): Promise<LearningIntegrationDeliveryRead> => {\n\n return request<LearningIntegrationDeliveryRead>(getLearningDispatchEngagementUrl(deliveryId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningResolveEngagementUrl = (deliveryId: number,) => {\n\n\n\n\n return `/learning/integrations/braze/deliveries/${deliveryId}/resolve`\n}\n\n/**\n * A global integration operator records a reviewed provider outcome for a failed, uncertain or stale sending delivery. confirmed_sent marks it sent and clears stored properties; confirmed_not_sent returns it to pending for a later explicit dispatch. A sending claim younger than 120 seconds cannot be resolved. This operation records evidence and never sends to Braze itself.\n * @summary Resolve an uncertain or failed Braze delivery\n */\nexport const learningResolveEngagement = async (deliveryId: number,\n learningIntegrationResolutionWrite: LearningIntegrationResolutionWrite, options?: Parameters<typeof request>[1]): Promise<LearningIntegrationDeliveryRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningIntegrationDeliveryRead>(getLearningResolveEngagementUrl(deliveryId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningIntegrationResolutionWrite)\n }\n);}\n\n\nexport const getLearningBindSalesforceUrl = (tenantId: number,) => {\n\n\n\n\n return `/learning/integrations/salesforce/customers/${tenantId}`\n}\n\n/**\n * A global commercial operator maps one customer tenant to an exact Salesforce Account, community, catalogue and exclusive institution learning agreement. Repeating the same identity can update isActive and clockZone; moving an already bound identity or agreement returns 409. clockZone is the reviewed IANA source timezone used to interpret source access dates. Support impersonation and dependent profiles are refused. Returns 204 with no response body.\n * @summary Bind a reviewed Salesforce customer identity\n */\nexport const learningBindSalesforce = async (tenantId: number,\n learningSalesforceBindingWrite: LearningSalesforceBindingWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningBindSalesforceUrl(tenantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSalesforceBindingWrite)\n }\n);}\n\n\nexport const getLearningEngagementPreferenceUrl = () => {\n\n\n\n\n return `/learning/me/engagement`\n}\n\n/**\n * Return the local engagement consent state without contacting Braze. An absent preference is enabled=false and emailOptIn=null. Null emailOptIn means no explicit email subscription preference was supplied; it is distinct from a confirmed opt-out.\n * @summary Read the current profile's engagement preference\n */\nexport const learningEngagementPreference = async ( options?: Parameters<typeof request>[1]): Promise<LearningEngagementRead> => {\n\n return request<LearningEngagementRead>(getLearningEngagementPreferenceUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningSetEngagementPreferenceUrl = () => {\n\n\n\n\n return `/learning/me/engagement`\n}\n\n/**\n * An independent profile explicitly enables or disables engagement and supplies an optional email opt-in. Enabling queues provider attributes; disabling cancels pending/failed deliveries and queues deletion when previously enabled. Personal email is sent only with emailOptIn=true. The response confirms local consent storage, not provider delivery. Repeating unchanged preferences queues no duplicate update. Support impersonation and dependent profiles are refused.\n * @summary Set engagement consent and email preference\n */\nexport const learningSetEngagementPreference = async (learningEngagementWrite: LearningEngagementWrite, options?: Parameters<typeof request>[1]): Promise<LearningEngagementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningEngagementRead>(getLearningSetEngagementPreferenceUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningEngagementWrite)\n }\n);}\n\n\nexport const getLearningLinkPartnerIdentityUrl = (bindingKey: string,) => {\n\n\n\n\n return `/learning/me/integrations/sso/${bindingKey}/link`\n}\n\n/**\n * An already authenticated independent profile presents a one-use partner proof for a reviewed bindingKey. The configured CAS, Wizbii or Iguana protocol verifies the proof before linking the identity and bounded catalogue membership. Wizbii also requires username. This endpoint returns membership, not an OAuth token or a seamless login redirect. It cannot select another beneficiary, replace a revoked membership, or claim an identity linked to someone else. A stronger login with entitlement-change authority is required; support impersonation is refused. Proof replay is blocked for 24 hours.\n * @summary Link a verified partner identity to the current profile\n */\nexport const learningLinkPartnerIdentity = async (bindingKey: string,\n learningSsoProofWrite: LearningSsoProofWrite, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningContractMemberRead>(getLearningLinkPartnerIdentityUrl(bindingKey),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSsoProofWrite)\n }\n);}\n\n\nexport const getLearningSalesforceWebhookUrl = () => {\n\n\n\n\n return `/learning/webhooks/salesforce`\n}\n\n/**\n * Accept a SOAP XML Account notification batch up to 1 MiB with 1–100 unique notification IDs. OrganizationId and EnterpriseUrl must exactly match the configured source. Salesforce Send Session ID must be enabled: the server verifies that session, then fetches authoritative Account snapshots before updating only reviewed customer bindings. Embedded notification fields do not themselves grant authority. Replay receipts prevent conflicting reuse; unknown bindings or ambiguous source data require review. Successful processing returns the Salesforce text/xml Ack envelope. The synthetic session below is a transport fixture and cannot authenticate against a real source.\n * @summary Receive a verified Salesforce SOAP notification\n */\nexport const learningSalesforceWebhook = async (learningSalesforceWebhookBody: string, options?: Parameters<typeof request>[1]): Promise<string> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<string>(getLearningSalesforceWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'text/xml', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSalesforceWebhookBody)\n }\n);}\n\n\nexport const getLearningTypeformWebhookUrl = () => {\n\n\n\n\n return `/learning/webhooks/typeform`\n}\n\n/**\n * Verify typeform-signature as sha256= followed by base64 HMAC-SHA256 of the exact raw request bytes using the configured shared secret. This callback authenticates the provider signature, not a user bearer token. form_response.hidden.mozaik_token must be the existing opaque 43-character invitation; it binds the profile, course, tenant and progress. The configured form ID and exactly one integer answer for the configured rating field are required; at most 100 answers and 1 MiB of raw body are accepted. Only configured text comment fields are collected. First acceptance consumes the invitation; an identical normalized response token/body retry is idempotent, a changed response conflicts, and an unconsumed expired invitation returns 410. Success returns no body.\n * @summary Accept a signed Typeform course survey\n */\nexport const learningTypeformWebhook = async (learningTypeformWebhookBody: LearningTypeformWebhookBody, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningTypeformWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningTypeformWebhookBody)\n }\n);}\n\n\n"],"mappings":";;;AAsBA,MAAa,mCAAmC,UAC5C,aAA+D;CAKjE,OAAO,4BAA4B,SAAS,WAAW;AACzD;;;;;AAMA,MAAa,4BAA4B,OAAO,UAC5C,UACA,0BAAoD,YAAyE;CAE7H,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS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AAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAgB,gCAAgC,GACrD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAY,GAAG,WAAW,SAAS,OAAO;EAAE;EACvE,MAAM,KAAK,UAAU,6BAA6B;CACpD,CACF;AAAE;AAGF,MAAa,sCAAsC;CAKjD,OAAO;AACT;;;;;AAMA,MAAa,0BAA0B,OAAO,6BAA0D,YAA2D;CAE/J,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,8BAA8B,GACjD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,2BAA2B;CAClD,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { $c as LearningContractMemberWrite, Js as LearningOwnMembershipsParams, Qs as LearningMembershipHistoryPage, Ys as LearningOwnMembershipHistoryParams, el as LearningContractMemberPage, tl as LearningContractMemberRead } from "../chunks/index.js";
2
+ import { Xs as LearningOwnMembershipsParams, Zs as LearningOwnMembershipHistoryParams, ec as LearningMembershipHistoryPage, nl as LearningContractMemberPage, rl as LearningContractMemberRead, tl as LearningContractMemberWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-learning-membership/biblio-learning-membership.d.ts
5
5
  export declare const getLearningAssignContractMemberUrl: (contractId: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-learning-membership.js","names":[],"sources":["../../src/api/biblio-learning-membership/biblio-learning-membership.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.18.0\n */\nimport type {\n LearningContractMemberPage,\n LearningContractMemberRead,\n LearningContractMemberWrite,\n LearningMembershipHistoryPage,\n LearningOwnMembershipHistoryParams,\n LearningOwnMembershipsParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningAssignContractMemberUrl = (contractId: number,) => {\n\n\n\n\n return `/learning/administration/contracts/${contractId}/members`\n}\n\n/**\n * Upsert the (contract, catalogue, user) assignment. Requires an independent global commercial operator with high authentication assurance and refuses support impersonation. The contract must be a customer agreement, not a personally owned subscription, and must already contain an entitlement allocation qualified by this exact learning catalogue. An active assignment permits only grants under that same contract/catalogue; it does not expose unqualified allocations or other catalogues. All existing contract/grant windows, resource qualifiers, exclusions and profile gates still apply. Household inheritance is explicit and optional.\n * @summary Assign or revoke a customer agreement beneficiary\n */\nexport const learningAssignContractMember = async (contractId: number,\n learningContractMemberWrite: LearningContractMemberWrite, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningContractMemberRead>(getLearningAssignContractMemberUrl(contractId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningContractMemberWrite)\n }\n);}\n\n\nexport const getLearningOwnMembershipsUrl = (params?: LearningOwnMembershipsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/memberships?${stringifiedParams}` : `/learning/memberships`\n}\n\n/**\n * Page explicit assignments for the effective profile plus assignments belonging to its parent beneficiary when inheritHousehold is true. Includes inactive, future and expired assignments, ordered by membership ID; presence is not proof of current entitlement. Catalogue qualification applies to the same grant/contract and never opens unqualified allocations. Profile, contract, grant, exclusion and date checks determine actual reading rights.\n * @summary List the profile’s agreement assignments\n */\nexport const learningOwnMemberships = async (params?: LearningOwnMembershipsParams, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberPage> => {\n\n return request<LearningContractMemberPage>(getLearningOwnMembershipsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningOwnMembershipHistoryUrl = (params?: LearningOwnMembershipHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/memberships/history?${stringifiedParams}` : `/learning/memberships/history`\n}\n\n/**\n * Page only this effective profile’s passive organisation history, newest known joinedAt first, null joinedAt last, then ID descending. Household inheritance does not expose another person’s history. Source local clock strings are evidence, not timezone-aware instants; unresolved dates and contract links remain null. History never creates or revives membership or reading authority.\n * @summary List the profile’s historical organisation evidence\n */\nexport const learningOwnMembershipHistory = async (params?: LearningOwnMembershipHistoryParams, options?: Parameters<typeof request>[1]): Promise<LearningMembershipHistoryPage> => {\n\n return request<LearningMembershipHistoryPage>(getLearningOwnMembershipHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAkBA,MAAa,sCAAsC,eAAwB;CAKzE,OAAO,sCAAsC,WAAW;AAC1D;;;;;AAMA,MAAa,+BAA+B,OAAO,YAC/C,6BAA0D,YAAiF;CAE3I,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAoC,mCAAmC,UAAU,GACtF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,2BAA2B;CAClD,CACF;AAAE;AAGF,MAAa,gCAAgC,WAA2C;CACtF,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,yBAAyB,sBAAsB;AACvF;;;;;AAMA,MAAa,yBAAyB,OAAO,QAAuC,YAAiF;CAEnK,OAAO,QAAoC,6BAA6B,MAAM,GAC9E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,sCAAsC,WAAiD;CAClG,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,iCAAiC,sBAAsB;AAC/F;;;;;AAMA,MAAa,+BAA+B,OAAO,QAA6C,YAAoF;CAElL,OAAO,QAAuC,mCAAmC,MAAM,GACvF;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"biblio-learning-membership.js","names":[],"sources":["../../src/api/biblio-learning-membership/biblio-learning-membership.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.19.0\n */\nimport type {\n LearningContractMemberPage,\n LearningContractMemberRead,\n LearningContractMemberWrite,\n LearningMembershipHistoryPage,\n LearningOwnMembershipHistoryParams,\n LearningOwnMembershipsParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningAssignContractMemberUrl = (contractId: number,) => {\n\n\n\n\n return `/learning/administration/contracts/${contractId}/members`\n}\n\n/**\n * Upsert the (contract, catalogue, user) assignment. Requires an independent global commercial operator with high authentication assurance and refuses support impersonation. The contract must be a customer agreement, not a personally owned subscription, and must already contain an entitlement allocation qualified by this exact learning catalogue. An active assignment permits only grants under that same contract/catalogue; it does not expose unqualified allocations or other catalogues. All existing contract/grant windows, resource qualifiers, exclusions and profile gates still apply. Household inheritance is explicit and optional.\n * @summary Assign or revoke a customer agreement beneficiary\n */\nexport const learningAssignContractMember = async (contractId: number,\n learningContractMemberWrite: LearningContractMemberWrite, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningContractMemberRead>(getLearningAssignContractMemberUrl(contractId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningContractMemberWrite)\n }\n);}\n\n\nexport const getLearningOwnMembershipsUrl = (params?: LearningOwnMembershipsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/memberships?${stringifiedParams}` : `/learning/memberships`\n}\n\n/**\n * Page explicit assignments for the effective profile plus assignments belonging to its parent beneficiary when inheritHousehold is true. Includes inactive, future and expired assignments, ordered by membership ID; presence is not proof of current entitlement. Catalogue qualification applies to the same grant/contract and never opens unqualified allocations. Profile, contract, grant, exclusion and date checks determine actual reading rights.\n * @summary List the profile’s agreement assignments\n */\nexport const learningOwnMemberships = async (params?: LearningOwnMembershipsParams, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberPage> => {\n\n return request<LearningContractMemberPage>(getLearningOwnMembershipsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningOwnMembershipHistoryUrl = (params?: LearningOwnMembershipHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/memberships/history?${stringifiedParams}` : `/learning/memberships/history`\n}\n\n/**\n * Page only this effective profile’s passive organisation history, newest known joinedAt first, null joinedAt last, then ID descending. Household inheritance does not expose another person’s history. Source local clock strings are evidence, not timezone-aware instants; unresolved dates and contract links remain null. History never creates or revives membership or reading authority.\n * @summary List the profile’s historical organisation evidence\n */\nexport const learningOwnMembershipHistory = async (params?: LearningOwnMembershipHistoryParams, options?: Parameters<typeof request>[1]): Promise<LearningMembershipHistoryPage> => {\n\n return request<LearningMembershipHistoryPage>(getLearningOwnMembershipHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAkBA,MAAa,sCAAsC,eAAwB;CAKzE,OAAO,sCAAsC,WAAW;AAC1D;;;;;AAMA,MAAa,+BAA+B,OAAO,YAC/C,6BAA0D,YAAiF;CAE3I,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,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ead, Fo as LearningSessionStartWrite, Gs as LearningPageEvidenceDetailRead, Io as LearningSessionRead, Jc as LearningCourseRead, Jl as LearningAnswerWrite, Kl as LearningAssetRead, Lg as LessonProgressRead, Lo as LearningSelfRatingWrite, Ml as LearningAttemptRead, Oc as LearningHistoricalSelectedPagesParams, Ro as LearningSelfRatingRead, Sc as LearningVocabularyRead, Sg as CourseEnrollmentWrite, Tg as CourseEditionUpgradeWrite, Uo as LearningScoreSummaryPage, Vl as LearningAttemptEvidenceRead, Vo as LearningSelectedPagePage, Vs as LearningPageEvidencePage, Xl as LearningAnswerSelectionEvidenceParams, _o as LessonProgressWrite, _s as LearningReadEnrollmentHistoryParams, b as VocabularyProgressWrite, bc as LearningLessonOpenWrite, bo as LearningVocabularyResourceParams, ec as LearningListScoreHistoryParams, eu as LearningActivityWrite, gs as LearningReadVocabularyParams, jl as LearningAttemptStartWrite, kl as LearningAttemptSummaryPage, ks as LearningPathProgressRead, ol as LearningCertificateRead, uc as LearningListAttemptHistoryParams, x as VocabularyProgressRead, xc as LearningLessonOpenRead, xo as LearningUploadWrite, zo as LearningSelectionEvidencePage } from "../chunks/index.js";
2
+ import { $g as CourseEnrollmentPage, Ac as LearningHistoricalSelectedPagesParams, Bo as LearningSelfRatingRead, Cc as LearningLessonOpenRead, Co as LearningUploadWrite, Go as LearningScoreSummaryPage, Ho as LearningSelectionEvidenceRead, Hs as LearningPageEvidenceParams, Jl as LearningAssetRead, Lo as LearningSessionStartWrite, Ms as LearningPathOpenWrite, Nl as LearningAttemptStartWrite, Pl as LearningAttemptRead, Qg as CourseEnrollmentWrite, Ql as LearningAnswerSelectionEvidenceParams, Ro as LearningSessionRead, Sc as LearningLessonOpenWrite, So as LearningVocabularyResourceParams, To as LearningUploadRead, Ul as LearningAttemptEvidenceRead, Uo as LearningSelectedPagePage, Us as LearningPageEvidencePage, Vo as LearningSelectionEvidencePage, Xc as LearningCourseRead, Xl as LearningAnswerWrite, b as VocabularyProgressWrite, cl as LearningCertificateRead, fc as LearningListAttemptHistoryParams, jl as LearningAttemptSummaryPage, js as LearningPathProgressRead, nc as LearningListScoreHistoryParams, nu as LearningActivityWrite, p_ as LessonProgressRead, qs as LearningPageEvidenceDetailRead, t_ as CourseEditionUpgradeWrite, vs as LearningReadVocabularyParams, wc as LearningVocabularyRead, x as VocabularyProgressRead, yo as LessonProgressWrite, ys as LearningReadEnrollmentHistoryParams, zo as LearningSelfRatingWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-learning/biblio-learning.d.ts
5
5
  export declare const getLearningStartAttemptUrl: (assessmentId: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-learning.js","names":[],"sources":["../../src/api/biblio-learning/biblio-learning.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.18.0\n */\nimport type {\n CourseEditionUpgradeWrite,\n CourseEnrollmentPage,\n CourseEnrollmentWrite,\n LearningActivityWrite,\n LearningAnswerSelectionEvidenceParams,\n LearningAnswerWrite,\n LearningAssetRead,\n LearningAttemptEvidenceRead,\n LearningAttemptRead,\n LearningAttemptStartWrite,\n LearningAttemptSummaryPage,\n LearningCertificateRead,\n LearningCourseRead,\n LearningHistoricalSelectedPagesParams,\n LearningLessonOpenRead,\n LearningLessonOpenWrite,\n LearningListAttemptHistoryParams,\n LearningListScoreHistoryParams,\n LearningPageEvidenceDetailRead,\n LearningPageEvidencePage,\n LearningPageEvidenceParams,\n LearningPathOpenWrite,\n LearningPathProgressRead,\n LearningReadEnrollmentHistoryParams,\n LearningReadVocabularyParams,\n LearningScoreSummaryPage,\n LearningSelectedPagePage,\n LearningSelectionEvidencePage,\n LearningSelectionEvidenceRead,\n LearningSelfRatingRead,\n LearningSelfRatingWrite,\n LearningSessionRead,\n LearningSessionStartWrite,\n LearningUploadRead,\n LearningUploadWrite,\n LearningVocabularyRead,\n LearningVocabularyResourceParams,\n LessonProgressRead,\n LessonProgressWrite,\n VocabularyProgressRead,\n VocabularyProgressWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningStartAttemptUrl = (assessmentId: number,) => {\n\n\n\n\n return `/learning/assessments/${assessmentId}/attempts`\n}\n\n/**\n * Creates an immutable snapshot of the selected questions, ordering and pages. Course attempts need the profile's open reading session; provide lessonId when the assessment appears in multiple lessons. A lessonId without sessionId requests an allowed free preview. Path assessments use neither course session nor lesson. requestKey is scoped to profile and assessment: identical context replays the existing attempt; changed lesson/session context returns 409. Deadlines and attempt limits are enforced by the server. Preview results do not update course progress or score summaries.\n * @summary Start or replay a scoped assessment attempt\n */\nexport const learningStartAttempt = async (assessmentId: number,\n learningAttemptStartWrite: LearningAttemptStartWrite, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningAttemptRead>(getLearningStartAttemptUrl(assessmentId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningAttemptStartWrite)\n }\n);}\n\n\nexport const getLearningReadAttemptUrl = (attemptId: number,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}`\n}\n\n/**\n * Returns only an attempt owned by the effective profile. In-progress native attempts recheck their learning context; completed and historical evidence remains readable by its owner. Public questions never include answer keys. Corrections and answer grades appear after completion/expiry, or for answered questions when immediate feedback is configured. Historical attempts return retained answers and scores without inventing a replayable question definition. This read does not itself finalize an elapsed deadline.\n * @summary Read the profile's attempt and available feedback\n */\nexport const learningReadAttempt = async (attemptId: number, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n return request<LearningAttemptRead>(getLearningReadAttemptUrl(attemptId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningAbandonAttemptUrl = (attemptId: number,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/abandon`\n}\n\n/**\n * Changes the effective profile's in-progress native attempt to abandoned and records finishedAt. Saved responses remain in history; abandoning does not calculate a score or grant completion. Repeating an abandoned or other terminal native attempt returns its existing state. Imported attempts are historical evidence and cannot be abandoned.\n * @summary Abandon an unfinished native attempt\n */\nexport const learningAbandonAttempt = async (attemptId: number, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n return request<LearningAttemptRead>(getLearningAbandonAttemptUrl(attemptId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningAnswerQuestionUrl = (attemptId: number,\n questionKey: string,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/answers/${questionKey}`\n}\n\n/**\n * Use the selected question's key and kind-specific response object. Before finalization answers can be replaced unless immediate feedback has made the first response final. An identical saved response can be replayed after finalization; a different final answer returns 409. An elapsed deadline finalizes the attempt as expired and rejects the late answer. Uploaded reflection answers must reference this profile's completed upload reserved for this exact attempt and question. The response returns the entire attempt with only currently authorized feedback.\n * @summary Save a question response in the owned attempt\n */\nexport const learningAnswerQuestion = async (attemptId: number,\n questionKey: string,\n learningAnswerWrite: LearningAnswerWrite, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningAttemptRead>(getLearningAnswerQuestionUrl(attemptId,questionKey),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningAnswerWrite)\n }\n);}\n\n\nexport const getLearningFinishAttemptUrl = (attemptId: number,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/finish`\n}\n\n/**\n * Requires the owned attempt's learning context. Before its deadline every selected question must have a response, including reflection and information acknowledgements. After the deadline the attempt is finalized as expired, with unanswered scored questions counted as zero. Returns corrections and a percentage score, or null for an unscored assessment. Eligible native results update score summaries and completion evidence; preview results do not. Repeating a terminal attempt returns its existing state.\n * @summary Finalize answers and compute assessment results\n */\nexport const learningFinishAttempt = async (attemptId: number, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n return request<LearningAttemptRead>(getLearningFinishAttemptUrl(attemptId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningRateExercisePageUrl = (attemptId: number,\n pageKey: string,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/pages/${pageKey}/self-rating`\n}\n\n/**\n * Requires an owned native exercise attempt containing pageKey and full learning access. Saves a rating from 1 to 5 for this profile and exercise page; later submissions replace the rating and mark the page's self-reflection complete. Preview attempts cannot save ratings. This does not submit answers, award points or substitute for assessment completion.\n * @summary Save a private exercise-page self-rating\n */\nexport const learningRateExercisePage = async (attemptId: number,\n pageKey: string,\n learningSelfRatingWrite: LearningSelfRatingWrite, options?: Parameters<typeof request>[1]): Promise<LearningSelfRatingRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningSelfRatingRead>(getLearningRateExercisePageUrl(attemptId,pageKey),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSelfRatingWrite)\n }\n);}\n\n\nexport const getLearningReserveExerciseUploadUrl = (attemptId: number,\n questionKey: string,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/questions/${questionKey}/uploads`\n}\n\n/**\n * Requires the effective profile's in-progress, unexpired native attempt and a reflection question configured for upload or text_or_upload. The MIME type must map to one of that question's allowedUploadKinds; exercise files are limited to 50 MiB (WebVTT remains limited to 2 MiB). Reserve, PUT the exact bytes to uploadUrl, then submit response.assetId using the answer operation. The uploaded asset remains scoped to this profile, attempt and question; reservation alone does not answer it.\n * @summary Reserve a private uploaded reflection answer\n */\nexport const learningReserveExerciseUpload = async (attemptId: number,\n questionKey: string,\n learningUploadWrite: LearningUploadWrite, options?: Parameters<typeof request>[1]): Promise<LearningUploadRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningUploadRead>(getLearningReserveExerciseUploadUrl(attemptId,questionKey),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningUploadWrite)\n }\n);}\n\n\nexport const getLearningReadAttemptResourceUrl = (attemptId: number,\n assetId: number,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/resources/${assetId}`\n}\n\n/**\n * Checks the profile's ownership and retained assessment context. Permits selected question/page media, allowed choice media and public hints. Correction resources become available after completion/expiry or after the corresponding answer when immediate feedback is configured. A submitted reflection upload is accessible only through its owning attempt and question. Resource IDs outside this authorized set return 404; returned delivery URLs may expire.\n * @summary Resolve a resource authorized by the owned attempt\n */\nexport const learningReadAttemptResource = async (attemptId: number,\n assetId: number, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningReadAttemptResourceUrl(attemptId,assetId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningReserveCourseUploadUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/author/courses/${courseId}/uploads`\n}\n\n/**\n * Requires edit authority on courseId. Reserves one immutable file with an exact byte count and declared MIME type for 15 minutes. Course files are limited to 200 MiB; WebVTT captions to 2 MiB. At most ten unexpired pending uploads may exist per profile. Send the raw bytes with authenticated PUT to uploadUrl, then use its returned assetId in the course definition. Each reservation request creates a new reservation.\n * @summary Reserve a file upload for course authoring\n */\nexport const learningReserveCourseUpload = async (courseId: number,\n learningUploadWrite: LearningUploadWrite, options?: Parameters<typeof request>[1]): Promise<LearningUploadRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningUploadRead>(getLearningReserveCourseUploadUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningUploadWrite)\n }\n);}\n\n\nexport const getLearningReadCertificateUrl = (certificateId: number,) => {\n\n\n\n\n return `/learning/certificates/${certificateId}`\n}\n\n/**\n * Returns the immutable recipient, course title, edition and issuance date recorded for this profile's certificate. Another profile's certificate is not visible. This read does not require opening a new course session; documentUrl identifies the separately authenticated PDF download.\n * @summary Read an issued certificate owned by the profile\n */\nexport const learningReadCertificate = async (certificateId: number, options?: Parameters<typeof request>[1]): Promise<LearningCertificateRead> => {\n\n return request<LearningCertificateRead>(getLearningReadCertificateUrl(certificateId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningDownloadCertificateUrl = (certificateId: number,) => {\n\n\n\n\n return `/learning/certificates/${certificateId}/document`\n}\n\n/**\n * Renders the certificate's retained recipient name, course title and issuance evidence as a PDF attachment. Only the effective profile that owns the certificate can download it. The successful response is application/pdf bytes with Content-Disposition attachment and private, no-store caching; it has no JSON body.\n * @summary Download an owned completion certificate as PDF\n */\nexport const learningDownloadCertificate = async (certificateId: number, options?: Parameters<typeof request>[1]): Promise<Blob> => {\n\n return request<Blob>(getLearningDownloadCertificateUrl(certificateId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningReadCourseUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}`\n}\n\n/**\n * Returns the effective profile's enrolled edition, or the latest published edition before enrollment. Eligibility uses the shared profile, age, category and entitlement rules; an allowed preview may expose the outline with hasFullAccess=false. This GET creates no enrollment or reading session. Check upgradeAvailable and latestRevisionId before offering an explicit edition upgrade. Lesson progress and final assessment IDs are included only with full access.\n * @summary Read the selected course edition and progress\n */\nexport const learningReadCourse = async (courseId: number, options?: Parameters<typeof request>[1]): Promise<LearningCourseRead> => {\n\n return request<LearningCourseRead>(getLearningReadCourseUrl(courseId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningIssueCertificateUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}/certificate`\n}\n\n/**\n * Requires an existing current enrollment in a course with certification enabled. Recomputes evidence: every required lesson must be complete and every required assessment passed. Creates one certificate per profile and edition, retaining recipient name and course title as issued; repeating issuance returns the existing certificate. Evidence can support issuance without a new reading session. Use documentUrl to download the PDF.\n * @summary Issue the profile's course completion certificate\n */\nexport const learningIssueCertificate = async (courseId: number, options?: Parameters<typeof request>[1]): Promise<LearningCertificateRead> => {\n\n return request<LearningCertificateRead>(getLearningIssueCertificateUrl(courseId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningEnrollUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}/enrollment`\n}\n\n/**\n * Requires full access for the effective profile. Creates a current enrollment pinned to the published edition if none exists; otherwise retains the selected edition and progress. archived controls the reader's personal archive preference. Repeating the same preference does not duplicate enrollment. Opening a reading session is a separate explicit step.\n * @summary Enroll in the course or set its archive preference\n */\nexport const learningEnroll = async (courseId: number,\n courseEnrollmentWrite: CourseEnrollmentWrite, options?: Parameters<typeof request>[1]): Promise<LearningCourseRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningCourseRead>(getLearningEnrollUrl(courseId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(courseEnrollmentWrite)\n }\n);}\n\n\nexport const getLearningReadEnrollmentHistoryUrl = (courseId: number,\n params?: LearningReadEnrollmentHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/courses/${courseId}/enrollments?${stringifiedParams}` : `/learning/courses/${courseId}/enrollments`\n}\n\n/**\n * Requires current full course access and returns this profile's enrollments only, newest enrollment ID first. isCurrent identifies the selected edition; archived is a personal list preference independent of edition selection. Earlier progress and completedAt are preserved after an upgrade.\n * @summary List the profile's course enrollments by edition\n */\nexport const learningReadEnrollmentHistory = async (courseId: number,\n params?: LearningReadEnrollmentHistoryParams, options?: Parameters<typeof request>[1]): Promise<CourseEnrollmentPage> => {\n\n return request<CourseEnrollmentPage>(getLearningReadEnrollmentHistoryUrl(courseId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningStartSessionUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}/sessions`\n}\n\n/**\n * Requires full course access, creates enrollment if needed and opens a shared consumption lease pinned to the selected edition. Generate requestKey once for the opening action and reuse it after uncertain network outcomes. The key is scoped to the effective profile: the same course returns its existing session, including a closed one; reuse for another course returns 409. Use a new key for a new reading session, then open a lesson with the returned sessionId.\n * @summary Open an entitled course reading session\n */\nexport const learningStartSession = async (courseId: number,\n learningSessionStartWrite: LearningSessionStartWrite, options?: Parameters<typeof request>[1]): Promise<LearningSessionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningSessionRead>(getLearningStartSessionUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSessionStartWrite)\n }\n);}\n\n\nexport const getLearningUpgradeCourseEditionUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}/upgrade-edition`\n}\n\n/**\n * Requires full course access and an existing current enrollment. Send its revisionId as expectedRevisionId and latestRevisionId as targetRevisionId. Closes open course reading sessions, retains earlier enrollment and completion evidence, and selects the target edition without copying old lesson progress. Repeating the same target succeeds; stale expectations or a target other than the latest publication return 409.\n * @summary Move enrollment to the latest published edition\n */\nexport const learningUpgradeCourseEdition = async (courseId: number,\n courseEditionUpgradeWrite: CourseEditionUpgradeWrite, options?: Parameters<typeof request>[1]): Promise<LearningCourseRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningCourseRead>(getLearningUpgradeCourseEditionUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(courseEditionUpgradeWrite)\n }\n);}\n\n\nexport const getLearningAnswerSelectionEvidenceUrl = (params?: LearningAnswerSelectionEvidenceParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/answer-selections?${stringifiedParams}` : `/learning/history/answer-selections`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. attemptId selects an owned historical attempt; unlinkedOnly=true selects rows with no stored attempt link and cannot be combined with attemptId. Optional object filters apply within that same ownership scope. Results are ordered by history ID descending and paginated after filtering. questionId optionally filters by a local question mapping. choiceId, questionId, componentKey and attemptId may be incomplete. A null attemptId in the response does not create a synthetic attempt. Selection records reveal what was retained, without reconstructing correctness or scores.\n * @summary List my historical answer selections\n */\nexport const learningAnswerSelectionEvidence = async (params?: LearningAnswerSelectionEvidenceParams, options?: Parameters<typeof request>[1]): Promise<LearningSelectionEvidencePage> => {\n\n return request<LearningSelectionEvidencePage>(getLearningAnswerSelectionEvidenceUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningAnswerSelectionDetailUrl = (historyId: number,) => {\n\n\n\n\n return `/learning/history/answer-selections/${historyId}`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. historyId identifies a retained selection record rather than a current answer or question. Optional local mappings remain null when unavailable; no grade or completion date is inferred. The source selection's recorded creation timestamp is returned as stored.\n * @summary Read my historical answer selection\n */\nexport const learningAnswerSelectionDetail = async (historyId: number, options?: Parameters<typeof request>[1]): Promise<LearningSelectionEvidenceRead> => {\n\n return request<LearningSelectionEvidenceRead>(getLearningAnswerSelectionDetailUrl(historyId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningListAttemptHistoryUrl = (params?: LearningListAttemptHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/attempts?${stringifiedParams}` : `/learning/history/attempts`\n}\n\n/**\n * Returns only the effective profile's attempts, ordered by startedAt descending then attemptId descending. assessment_id optionally filters this history; it never changes ownership. Historical records are retained evidence and cannot be resumed. Scores are percentages serialized as decimal strings; null means no score is available.\n * @summary List the profile's native and historical attempts\n */\nexport const learningListAttemptHistory = async (params?: LearningListAttemptHistoryParams, options?: Parameters<typeof request>[1]): Promise<LearningAttemptSummaryPage> => {\n\n return request<LearningAttemptSummaryPage>(getLearningListAttemptHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningAttemptEvidenceUrl = (attemptId: number,) => {\n\n\n\n\n return `/learning/history/attempts/${attemptId}/evidence`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. attemptId must identify an historical attempt. evidenceBasis distinguishes source_master_session counters from a source_session success flag. Counts describe linked recorded rows, not a reconstructed test definition. startedAt is the recorded attempt timestamp; unavailable completion or expiry dates remain null.\n * @summary Read my historical assessment attempt evidence\n */\nexport const learningAttemptEvidence = async (attemptId: number, options?: Parameters<typeof request>[1]): Promise<LearningAttemptEvidenceRead> => {\n\n return request<LearningAttemptEvidenceRead>(getLearningAttemptEvidenceUrl(attemptId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningHistoricalSelectedPagesUrl = (attemptId: number,\n params?: LearningHistoricalSelectedPagesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/attempts/${attemptId}/selected-pages?${stringifiedParams}` : `/learning/history/attempts/${attemptId}/selected-pages`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Lists the retained selected-page set, ordered by page ID and paginated with one-based page/limit. A selected page is evidence of inclusion, not proof it was viewed, answered or passed. Detailed page history is available separately. No questions or correct answers are reconstructed from this set.\n * @summary List pages selected for my historical attempt\n */\nexport const learningHistoricalSelectedPages = async (attemptId: number,\n params?: LearningHistoricalSelectedPagesParams, options?: Parameters<typeof request>[1]): Promise<LearningSelectedPagePage> => {\n\n return request<LearningSelectedPagePage>(getLearningHistoricalSelectedPagesUrl(attemptId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningPageEvidenceUrl = (params?: LearningPageEvidenceParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/pages?${stringifiedParams}` : `/learning/history/pages`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. attemptId selects an owned historical attempt; unlinkedOnly=true selects rows with no stored attempt link and cannot be combined with attemptId. Optional object filters apply within that same ownership scope. Results are ordered by history ID descending and paginated after filtering. pageId optionally narrows to one local page identity. A returned attemptId is exposed only when it links to an owned historical attempt. responseAvailable indicates retained response evidence, not whether the bounded detail endpoint will return its serialized bytes.\n * @summary List my recorded page evidence\n */\nexport const learningPageEvidence = async (params?: LearningPageEvidenceParams, options?: Parameters<typeof request>[1]): Promise<LearningPageEvidencePage> => {\n\n return request<LearningPageEvidencePage>(getLearningPageEvidenceUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningPageEvidenceDetailUrl = (historyId: number,) => {\n\n\n\n\n return `/learning/history/pages/${historyId}`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. Returns opaque PHP-serialized answer text only when retained as source master-selection evidence and at most 65,536 UTF-8 bytes. Larger responses retain encoding and byte count but set responseOmitted=true and serializedAnswers=null. A missing response instead has null encoding/count and responseOmitted=false. Source text is evidence, never a native answer request or trusted executable serialization.\n * @summary Read my historical page response evidence\n */\nexport const learningPageEvidenceDetail = async (historyId: number, options?: Parameters<typeof request>[1]): Promise<LearningPageEvidenceDetailRead> => {\n\n return request<LearningPageEvidenceDetailRead>(getLearningPageEvidenceDetailUrl(historyId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningListScoreHistoryUrl = (params?: LearningListScoreHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/scores?${stringifiedParams}` : `/learning/history/scores`\n}\n\n/**\n * Returns one stored summary per assessment in the effective profile's history, newest creation time first with assessmentId as tie-breaker. A native completion replaces its assessment's summary; this is not a best-score leaderboard. An imported aggregate may have historical=true and attemptId=null because no attempt evidence exists. assessment_id restricts the list to that assessment.\n * @summary List the profile's assessment score summaries\n */\nexport const learningListScoreHistory = async (params?: LearningListScoreHistoryParams, options?: Parameters<typeof request>[1]): Promise<LearningScoreSummaryPage> => {\n\n return request<LearningScoreSummaryPage>(getLearningListScoreHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningOpenLessonUrl = (lessonId: number,) => {\n\n\n\n\n return `/learning/lessons/${lessonId}/open`\n}\n\n/**\n * With sessionId, checks this profile's open course session and edition, renews its lease and selects the lesson for subsequent activity ticks. Without sessionId, both course previews and this lesson's freePreview must be enabled. Returns authorized media delivery URLs or HTML, public attachments and any vocabulary; corrections remain attempt-scoped. Delivery URLs may expire, so request fresh resources when reopening. A preview does not enroll the profile or record full-course consumption.\n * @summary Open lesson resources in a session or free preview\n */\nexport const learningOpenLesson = async (lessonId: number,\n learningLessonOpenWrite: LearningLessonOpenWrite, options?: Parameters<typeof request>[1]): Promise<LearningLessonOpenRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningLessonOpenRead>(getLearningOpenLessonUrl(lessonId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningLessonOpenWrite)\n }\n);}\n\n\nexport const getLearningUpdateProgressUrl = (lessonId: number,) => {\n\n\n\n\n return `/learning/lessons/${lessonId}/progress`\n}\n\n/**\n * Requires full access to the profile's selected course edition and creates enrollment if needed. Omit note to retain it; send null to clear it. positionSeconds is allowed only for resource lessons and cannot exceed a known duration. completed=true marks only a resource lesson complete; assessment and vocabulary lessons require their own completion workflow. Completion is retained on later completed=false writes. Updates the resume lesson and recomputes course progress from required lessons.\n * @summary Save lesson notes, playback position or resource completion\n */\nexport const learningUpdateProgress = async (lessonId: number,\n lessonProgressWrite: LessonProgressWrite, options?: Parameters<typeof request>[1]): Promise<LessonProgressRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LessonProgressRead>(getLearningUpdateProgressUrl(lessonId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(lessonProgressWrite)\n }\n);}\n\n\nexport const getLearningPathIntroductionUrl = (pathId: number,) => {\n\n\n\n\n return `/learning/paths/${pathId}/introduction`\n}\n\n/**\n * Returns a delivery descriptor, not the media bytes. The path must be active and at least one of its steps visible through the effective profile's catalogue access. Follow the returned URL promptly; delivery URLs may be temporary.\n * @summary Get a visible path's introduction resource\n */\nexport const learningPathIntroduction = async (pathId: number, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningPathIntroductionUrl(pathId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningOpenPathStepUrl = (pathId: number,) => {\n\n\n\n\n return `/learning/paths/${pathId}/open`\n}\n\n/**\n * Sets the effective profile's current position to an active path's visible step, creating progress on first use. contentId must be a member of the path and pass existing catalogue visibility checks. This records navigation; the response is not a course reader payload. Support impersonation is rejected.\n * @summary Record my selected path step\n */\nexport const learningOpenPathStep = async (pathId: number,\n learningPathOpenWrite: LearningPathOpenWrite, options?: Parameters<typeof request>[1]): Promise<LearningPathProgressRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningPathProgressRead>(getLearningOpenPathStepUrl(pathId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPathOpenWrite)\n }\n);}\n\n\nexport const getLearningReadPathProgressUrl = (pathId: number,) => {\n\n\n\n\n return `/learning/paths/${pathId}/progress`\n}\n\n/**\n * Returns only the effective profile's recorded position and does not start the path. started=false means no progress row exists, including for an unknown path ID. position is zero-based. currentContentId is null when no recorded step is currently visible; a stored position may survive later curation changes.\n * @summary Read my current position in a path\n */\nexport const learningReadPathProgress = async (pathId: number, options?: Parameters<typeof request>[1]): Promise<LearningPathProgressRead> => {\n\n return request<LearningPathProgressRead>(getLearningReadPathProgressUrl(pathId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningCloseSessionUrl = (sessionId: number,) => {\n\n\n\n\n return `/learning/sessions/${sessionId}`\n}\n\n/**\n * Closes only a session owned by the effective profile and records closedAt. Repeating the close returns the same closed session. Enrollment, answers and lesson progress are retained; this operation does not mark a lesson complete.\n * @summary Close a course session and its consumption lease\n */\nexport const learningCloseSession = async (sessionId: number, options?: Parameters<typeof request>[1]): Promise<LearningSessionRead> => {\n\n return request<LearningSessionRead>(getLearningCloseSessionUrl(sessionId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getLearningRecordActivityUrl = (sessionId: number,) => {\n\n\n\n\n return `/learning/sessions/${sessionId}/activity`\n}\n\n/**\n * Requires this profile's open session and the lesson most recently selected with the lesson-open operation. Renews the consumption lease. active=true records server-observed elapsed time since the previous heartbeat, capped at 60 seconds per tick; active=false moves the clock forward without adding time. activeSeconds is cumulative seconds, separate from lesson completion and playback position. Heartbeats have no request key; send them only for current activity.\n * @summary Record an activity heartbeat for the selected lesson\n */\nexport const learningRecordActivity = async (sessionId: number,\n learningActivityWrite: LearningActivityWrite, options?: Parameters<typeof request>[1]): Promise<LearningSessionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningSessionRead>(getLearningRecordActivityUrl(sessionId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningActivityWrite)\n }\n);}\n\n\nexport const getLearningUploadBytesUrl = (uploadId: number,) => {\n\n\n\n\n return `/learning/uploads/${uploadId}/body`\n}\n\n/**\n * Send an authenticated raw binary PUT, not multipart or JSON, to the reservation's uploadUrl before expiresAt. The byte count must exactly match sizeBytes; file signatures are checked against the reserved MIME type and captions must be valid UTF-8 WebVTT. Ownership and upload purpose are rechecked. A same-byte replay before expiry returns the existing immutable asset; different bytes cannot overwrite it. The JSON response contains the asset ID for a course definition or reflection answer, without issuing a delivery URL.\n * @summary Upload the exact bytes of a reserved file\n */\nexport const learningUploadBytes = async (uploadId: number,\n learningUploadBytesBody: Blob, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningAssetRead>(getLearningUploadBytesUrl(uploadId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/octet-stream', ...getHeaders(options?.headers) },\n body: learningUploadBytesBody\n }\n);}\n\n\nexport const getLearningReadVocabularyUrl = (vocabularyId: number,\n params: LearningReadVocabularyParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/vocabularies/${vocabularyId}?${stringifiedParams}` : `/learning/vocabularies/${vocabularyId}`\n}\n\n/**\n * lesson_id must identify a lesson using this vocabulary directly or as an attachment. Full reads return the profile's position and completion evidence. preview=true additionally requires that lesson's free-preview permission and omits saved personal progress. Entries are ordered by position then entry ID; term media IDs must be resolved through the vocabulary resource operation.\n * @summary Read vocabulary through an authorized lesson\n */\nexport const learningReadVocabulary = async (vocabularyId: number,\n params: LearningReadVocabularyParams, options?: Parameters<typeof request>[1]): Promise<LearningVocabularyRead> => {\n\n return request<LearningVocabularyRead>(getLearningReadVocabularyUrl(vocabularyId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningVocabularyResourceUrl = (vocabularyId: number,\n assetId: number,\n params: LearningVocabularyResourceParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/vocabularies/${vocabularyId}/assets/${assetId}?${stringifiedParams}` : `/learning/vocabularies/${vocabularyId}/assets/${assetId}`\n}\n\n/**\n * Checks vocabulary and lesson context exactly as the vocabulary read operation, including preview permission when preview=true. assetId must be audio or image referenced by a term or translation in this vocabulary; knowing a media ID alone grants no access. Returns delivery metadata with a potentially expiring URL.\n * @summary Resolve a vocabulary term's audio or image\n */\nexport const learningVocabularyResource = async (vocabularyId: number,\n assetId: number,\n params: LearningVocabularyResourceParams, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningVocabularyResourceUrl(vocabularyId,assetId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningUpdateVocabularyUrl = (vocabularyId: number,) => {\n\n\n\n\n return `/learning/vocabularies/${vocabularyId}/progress`\n}\n\n/**\n * Requires full access through lessonId and creates course enrollment if needed. position is a cursor from 0 through the entry count; completed=true requires a nonempty vocabulary and position exactly equal to its entry count. Completion is retained on subsequent writes. Completing the lesson's primary vocabulary also completes that lesson; completing an attached vocabulary does not. Updates the resume lesson and recomputes required-lesson progress.\n * @summary Save vocabulary position or completion\n */\nexport const learningUpdateVocabulary = async (vocabularyId: number,\n vocabularyProgressWrite: VocabularyProgressWrite, options?: Parameters<typeof request>[1]): Promise<VocabularyProgressRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<VocabularyProgressRead>(getLearningUpdateVocabularyUrl(vocabularyId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vocabularyProgressWrite)\n }\n);}\n\n\n"],"mappings":";;;AAqDA,MAAa,8BAA8B,iBAA0B;CAKnE,OAAO,yBAAyB,aAAa;AAC/C;;;;;AAMA,MAAa,uBAAuB,OAAO,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U,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,0BAA0B,aAAa,UAAU,QAAQ,GAAG,sBAAsB,0BAA0B,aAAa,UAAU;AAC3K;;;;;AAMA,MAAa,6BAA6B,OAAO,cAC7C,SACA,QAA0C,YAAwE;CAEpH,OAAO,QAA2B,iCAAiC,cAAa,SAAQ,MAAM,GAC9F;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,kCAAkC,iBAA0B;CAKvE,OAAO,0BAA0B,aAAa;AAChD;;;;;AAMA,MAAa,2BAA2B,OAAO,cAC3C,yBAAkD,YAA6E;CAE/H,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAgC,+BAA+B,YAAY,GAChF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,uBAAuB;CAC9C,CACF;AAAE"}
1
+ {"version":3,"file":"biblio-learning.js","names":[],"sources":["../../src/api/biblio-learning/biblio-learning.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.19.0\n */\nimport type {\n CourseEditionUpgradeWrite,\n CourseEnrollmentPage,\n CourseEnrollmentWrite,\n LearningActivityWrite,\n LearningAnswerSelectionEvidenceParams,\n LearningAnswerWrite,\n LearningAssetRead,\n LearningAttemptEvidenceRead,\n LearningAttemptRead,\n LearningAttemptStartWrite,\n LearningAttemptSummaryPage,\n LearningCertificateRead,\n LearningCourseRead,\n LearningHistoricalSelectedPagesParams,\n LearningLessonOpenRead,\n LearningLessonOpenWrite,\n LearningListAttemptHistoryParams,\n LearningListScoreHistoryParams,\n LearningPageEvidenceDetailRead,\n LearningPageEvidencePage,\n LearningPageEvidenceParams,\n LearningPathOpenWrite,\n LearningPathProgressRead,\n LearningReadEnrollmentHistoryParams,\n LearningReadVocabularyParams,\n LearningScoreSummaryPage,\n LearningSelectedPagePage,\n LearningSelectionEvidencePage,\n LearningSelectionEvidenceRead,\n LearningSelfRatingRead,\n LearningSelfRatingWrite,\n LearningSessionRead,\n LearningSessionStartWrite,\n LearningUploadRead,\n LearningUploadWrite,\n LearningVocabularyRead,\n LearningVocabularyResourceParams,\n LessonProgressRead,\n LessonProgressWrite,\n VocabularyProgressRead,\n VocabularyProgressWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningStartAttemptUrl = (assessmentId: number,) => {\n\n\n\n\n return `/learning/assessments/${assessmentId}/attempts`\n}\n\n/**\n * Creates an immutable snapshot of the selected questions, ordering and pages. Course attempts need the profile's open reading session; provide lessonId when the assessment appears in multiple lessons. A lessonId without sessionId requests an allowed free preview. Path assessments use neither course session nor lesson. requestKey is scoped to profile and assessment: identical context replays the existing attempt; changed lesson/session context returns 409. Deadlines and attempt limits are enforced by the server. Preview results do not update course progress or score summaries.\n * @summary Start or replay a scoped assessment attempt\n */\nexport const learningStartAttempt = async (assessmentId: number,\n learningAttemptStartWrite: LearningAttemptStartWrite, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningAttemptRead>(getLearningStartAttemptUrl(assessmentId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningAttemptStartWrite)\n }\n);}\n\n\nexport const getLearningReadAttemptUrl = (attemptId: number,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}`\n}\n\n/**\n * Returns only an attempt owned by the effective profile. In-progress native attempts recheck their learning context; completed and historical evidence remains readable by its owner. Public questions never include answer keys. Corrections and answer grades appear after completion/expiry, or for answered questions when immediate feedback is configured. Historical attempts return retained answers and scores without inventing a replayable question definition. This read does not itself finalize an elapsed deadline.\n * @summary Read the profile's attempt and available feedback\n */\nexport const learningReadAttempt = async (attemptId: number, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n return request<LearningAttemptRead>(getLearningReadAttemptUrl(attemptId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningAbandonAttemptUrl = (attemptId: number,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/abandon`\n}\n\n/**\n * Changes the effective profile's in-progress native attempt to abandoned and records finishedAt. Saved responses remain in history; abandoning does not calculate a score or grant completion. Repeating an abandoned or other terminal native attempt returns its existing state. Imported attempts are historical evidence and cannot be abandoned.\n * @summary Abandon an unfinished native attempt\n */\nexport const learningAbandonAttempt = async (attemptId: number, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n return request<LearningAttemptRead>(getLearningAbandonAttemptUrl(attemptId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningAnswerQuestionUrl = (attemptId: number,\n questionKey: string,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/answers/${questionKey}`\n}\n\n/**\n * Use the selected question's key and kind-specific response object. Before finalization answers can be replaced unless immediate feedback has made the first response final. An identical saved response can be replayed after finalization; a different final answer returns 409. An elapsed deadline finalizes the attempt as expired and rejects the late answer. Uploaded reflection answers must reference this profile's completed upload reserved for this exact attempt and question. The response returns the entire attempt with only currently authorized feedback.\n * @summary Save a question response in the owned attempt\n */\nexport const learningAnswerQuestion = async (attemptId: number,\n questionKey: string,\n learningAnswerWrite: LearningAnswerWrite, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningAttemptRead>(getLearningAnswerQuestionUrl(attemptId,questionKey),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningAnswerWrite)\n }\n);}\n\n\nexport const getLearningFinishAttemptUrl = (attemptId: number,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/finish`\n}\n\n/**\n * Requires the owned attempt's learning context. Before its deadline every selected question must have a response, including reflection and information acknowledgements. After the deadline the attempt is finalized as expired, with unanswered scored questions counted as zero. Returns corrections and a percentage score, or null for an unscored assessment. Eligible native results update score summaries and completion evidence; preview results do not. Repeating a terminal attempt returns its existing state.\n * @summary Finalize answers and compute assessment results\n */\nexport const learningFinishAttempt = async (attemptId: number, options?: Parameters<typeof request>[1]): Promise<LearningAttemptRead> => {\n\n return request<LearningAttemptRead>(getLearningFinishAttemptUrl(attemptId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningRateExercisePageUrl = (attemptId: number,\n pageKey: string,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/pages/${pageKey}/self-rating`\n}\n\n/**\n * Requires an owned native exercise attempt containing pageKey and full learning access. Saves a rating from 1 to 5 for this profile and exercise page; later submissions replace the rating and mark the page's self-reflection complete. Preview attempts cannot save ratings. This does not submit answers, award points or substitute for assessment completion.\n * @summary Save a private exercise-page self-rating\n */\nexport const learningRateExercisePage = async (attemptId: number,\n pageKey: string,\n learningSelfRatingWrite: LearningSelfRatingWrite, options?: Parameters<typeof request>[1]): Promise<LearningSelfRatingRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningSelfRatingRead>(getLearningRateExercisePageUrl(attemptId,pageKey),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSelfRatingWrite)\n }\n);}\n\n\nexport const getLearningReserveExerciseUploadUrl = (attemptId: number,\n questionKey: string,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/questions/${questionKey}/uploads`\n}\n\n/**\n * Requires the effective profile's in-progress, unexpired native attempt and a reflection question configured for upload or text_or_upload. The MIME type must map to one of that question's allowedUploadKinds; exercise files are limited to 50 MiB (WebVTT remains limited to 2 MiB). Reserve, PUT the exact bytes to uploadUrl, then submit response.assetId using the answer operation. The uploaded asset remains scoped to this profile, attempt and question; reservation alone does not answer it.\n * @summary Reserve a private uploaded reflection answer\n */\nexport const learningReserveExerciseUpload = async (attemptId: number,\n questionKey: string,\n learningUploadWrite: LearningUploadWrite, options?: Parameters<typeof request>[1]): Promise<LearningUploadRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningUploadRead>(getLearningReserveExerciseUploadUrl(attemptId,questionKey),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningUploadWrite)\n }\n);}\n\n\nexport const getLearningReadAttemptResourceUrl = (attemptId: number,\n assetId: number,) => {\n\n\n\n\n return `/learning/attempts/${attemptId}/resources/${assetId}`\n}\n\n/**\n * Checks the profile's ownership and retained assessment context. Permits selected question/page media, allowed choice media and public hints. Correction resources become available after completion/expiry or after the corresponding answer when immediate feedback is configured. A submitted reflection upload is accessible only through its owning attempt and question. Resource IDs outside this authorized set return 404; returned delivery URLs may expire.\n * @summary Resolve a resource authorized by the owned attempt\n */\nexport const learningReadAttemptResource = async (attemptId: number,\n assetId: number, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningReadAttemptResourceUrl(attemptId,assetId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningReserveCourseUploadUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/author/courses/${courseId}/uploads`\n}\n\n/**\n * Requires edit authority on courseId. Reserves one immutable file with an exact byte count and declared MIME type for 15 minutes. Course files are limited to 200 MiB; WebVTT captions to 2 MiB. At most ten unexpired pending uploads may exist per profile. Send the raw bytes with authenticated PUT to uploadUrl, then use its returned assetId in the course definition. Each reservation request creates a new reservation.\n * @summary Reserve a file upload for course authoring\n */\nexport const learningReserveCourseUpload = async (courseId: number,\n learningUploadWrite: LearningUploadWrite, options?: Parameters<typeof request>[1]): Promise<LearningUploadRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningUploadRead>(getLearningReserveCourseUploadUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningUploadWrite)\n }\n);}\n\n\nexport const getLearningReadCertificateUrl = (certificateId: number,) => {\n\n\n\n\n return `/learning/certificates/${certificateId}`\n}\n\n/**\n * Returns the immutable recipient, course title, edition and issuance date recorded for this profile's certificate. Another profile's certificate is not visible. This read does not require opening a new course session; documentUrl identifies the separately authenticated PDF download.\n * @summary Read an issued certificate owned by the profile\n */\nexport const learningReadCertificate = async (certificateId: number, options?: Parameters<typeof request>[1]): Promise<LearningCertificateRead> => {\n\n return request<LearningCertificateRead>(getLearningReadCertificateUrl(certificateId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningDownloadCertificateUrl = (certificateId: number,) => {\n\n\n\n\n return `/learning/certificates/${certificateId}/document`\n}\n\n/**\n * Renders the certificate's retained recipient name, course title and issuance evidence as a PDF attachment. Only the effective profile that owns the certificate can download it. The successful response is application/pdf bytes with Content-Disposition attachment and private, no-store caching; it has no JSON body.\n * @summary Download an owned completion certificate as PDF\n */\nexport const learningDownloadCertificate = async (certificateId: number, options?: Parameters<typeof request>[1]): Promise<Blob> => {\n\n return request<Blob>(getLearningDownloadCertificateUrl(certificateId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningReadCourseUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}`\n}\n\n/**\n * Returns the effective profile's enrolled edition, or the latest published edition before enrollment. Eligibility uses the shared profile, age, category and entitlement rules; an allowed preview may expose the outline with hasFullAccess=false. This GET creates no enrollment or reading session. Check upgradeAvailable and latestRevisionId before offering an explicit edition upgrade. Lesson progress and final assessment IDs are included only with full access.\n * @summary Read the selected course edition and progress\n */\nexport const learningReadCourse = async (courseId: number, options?: Parameters<typeof request>[1]): Promise<LearningCourseRead> => {\n\n return request<LearningCourseRead>(getLearningReadCourseUrl(courseId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningIssueCertificateUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}/certificate`\n}\n\n/**\n * Requires an existing current enrollment in a course with certification enabled. Recomputes evidence: every required lesson must be complete and every required assessment passed. Creates one certificate per profile and edition, retaining recipient name and course title as issued; repeating issuance returns the existing certificate. Evidence can support issuance without a new reading session. Use documentUrl to download the PDF.\n * @summary Issue the profile's course completion certificate\n */\nexport const learningIssueCertificate = async (courseId: number, options?: Parameters<typeof request>[1]): Promise<LearningCertificateRead> => {\n\n return request<LearningCertificateRead>(getLearningIssueCertificateUrl(courseId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningEnrollUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}/enrollment`\n}\n\n/**\n * Requires full access for the effective profile. Creates a current enrollment pinned to the published edition if none exists; otherwise retains the selected edition and progress. archived controls the reader's personal archive preference. Repeating the same preference does not duplicate enrollment. Opening a reading session is a separate explicit step.\n * @summary Enroll in the course or set its archive preference\n */\nexport const learningEnroll = async (courseId: number,\n courseEnrollmentWrite: CourseEnrollmentWrite, options?: Parameters<typeof request>[1]): Promise<LearningCourseRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningCourseRead>(getLearningEnrollUrl(courseId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(courseEnrollmentWrite)\n }\n);}\n\n\nexport const getLearningReadEnrollmentHistoryUrl = (courseId: number,\n params?: LearningReadEnrollmentHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/courses/${courseId}/enrollments?${stringifiedParams}` : `/learning/courses/${courseId}/enrollments`\n}\n\n/**\n * Requires current full course access and returns this profile's enrollments only, newest enrollment ID first. isCurrent identifies the selected edition; archived is a personal list preference independent of edition selection. Earlier progress and completedAt are preserved after an upgrade.\n * @summary List the profile's course enrollments by edition\n */\nexport const learningReadEnrollmentHistory = async (courseId: number,\n params?: LearningReadEnrollmentHistoryParams, options?: Parameters<typeof request>[1]): Promise<CourseEnrollmentPage> => {\n\n return request<CourseEnrollmentPage>(getLearningReadEnrollmentHistoryUrl(courseId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningStartSessionUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}/sessions`\n}\n\n/**\n * Requires full course access, creates enrollment if needed and opens a shared consumption lease pinned to the selected edition. Generate requestKey once for the opening action and reuse it after uncertain network outcomes. The key is scoped to the effective profile: the same course returns its existing session, including a closed one; reuse for another course returns 409. Use a new key for a new reading session, then open a lesson with the returned sessionId.\n * @summary Open an entitled course reading session\n */\nexport const learningStartSession = async (courseId: number,\n learningSessionStartWrite: LearningSessionStartWrite, options?: Parameters<typeof request>[1]): Promise<LearningSessionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningSessionRead>(getLearningStartSessionUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSessionStartWrite)\n }\n);}\n\n\nexport const getLearningUpgradeCourseEditionUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/courses/${courseId}/upgrade-edition`\n}\n\n/**\n * Requires full course access and an existing current enrollment. Send its revisionId as expectedRevisionId and latestRevisionId as targetRevisionId. Closes open course reading sessions, retains earlier enrollment and completion evidence, and selects the target edition without copying old lesson progress. Repeating the same target succeeds; stale expectations or a target other than the latest publication return 409.\n * @summary Move enrollment to the latest published edition\n */\nexport const learningUpgradeCourseEdition = async (courseId: number,\n courseEditionUpgradeWrite: CourseEditionUpgradeWrite, options?: Parameters<typeof request>[1]): Promise<LearningCourseRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningCourseRead>(getLearningUpgradeCourseEditionUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(courseEditionUpgradeWrite)\n }\n);}\n\n\nexport const getLearningAnswerSelectionEvidenceUrl = (params?: LearningAnswerSelectionEvidenceParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/answer-selections?${stringifiedParams}` : `/learning/history/answer-selections`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. attemptId selects an owned historical attempt; unlinkedOnly=true selects rows with no stored attempt link and cannot be combined with attemptId. Optional object filters apply within that same ownership scope. Results are ordered by history ID descending and paginated after filtering. questionId optionally filters by a local question mapping. choiceId, questionId, componentKey and attemptId may be incomplete. A null attemptId in the response does not create a synthetic attempt. Selection records reveal what was retained, without reconstructing correctness or scores.\n * @summary List my historical answer selections\n */\nexport const learningAnswerSelectionEvidence = async (params?: LearningAnswerSelectionEvidenceParams, options?: Parameters<typeof request>[1]): Promise<LearningSelectionEvidencePage> => {\n\n return request<LearningSelectionEvidencePage>(getLearningAnswerSelectionEvidenceUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningAnswerSelectionDetailUrl = (historyId: number,) => {\n\n\n\n\n return `/learning/history/answer-selections/${historyId}`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. historyId identifies a retained selection record rather than a current answer or question. Optional local mappings remain null when unavailable; no grade or completion date is inferred. The source selection's recorded creation timestamp is returned as stored.\n * @summary Read my historical answer selection\n */\nexport const learningAnswerSelectionDetail = async (historyId: number, options?: Parameters<typeof request>[1]): Promise<LearningSelectionEvidenceRead> => {\n\n return request<LearningSelectionEvidenceRead>(getLearningAnswerSelectionDetailUrl(historyId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningListAttemptHistoryUrl = (params?: LearningListAttemptHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/attempts?${stringifiedParams}` : `/learning/history/attempts`\n}\n\n/**\n * Returns only the effective profile's attempts, ordered by startedAt descending then attemptId descending. assessment_id optionally filters this history; it never changes ownership. Historical records are retained evidence and cannot be resumed. Scores are percentages serialized as decimal strings; null means no score is available.\n * @summary List the profile's native and historical attempts\n */\nexport const learningListAttemptHistory = async (params?: LearningListAttemptHistoryParams, options?: Parameters<typeof request>[1]): Promise<LearningAttemptSummaryPage> => {\n\n return request<LearningAttemptSummaryPage>(getLearningListAttemptHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningAttemptEvidenceUrl = (attemptId: number,) => {\n\n\n\n\n return `/learning/history/attempts/${attemptId}/evidence`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. attemptId must identify an historical attempt. evidenceBasis distinguishes source_master_session counters from a source_session success flag. Counts describe linked recorded rows, not a reconstructed test definition. startedAt is the recorded attempt timestamp; unavailable completion or expiry dates remain null.\n * @summary Read my historical assessment attempt evidence\n */\nexport const learningAttemptEvidence = async (attemptId: number, options?: Parameters<typeof request>[1]): Promise<LearningAttemptEvidenceRead> => {\n\n return request<LearningAttemptEvidenceRead>(getLearningAttemptEvidenceUrl(attemptId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningHistoricalSelectedPagesUrl = (attemptId: number,\n params?: LearningHistoricalSelectedPagesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/attempts/${attemptId}/selected-pages?${stringifiedParams}` : `/learning/history/attempts/${attemptId}/selected-pages`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Lists the retained selected-page set, ordered by page ID and paginated with one-based page/limit. A selected page is evidence of inclusion, not proof it was viewed, answered or passed. Detailed page history is available separately. No questions or correct answers are reconstructed from this set.\n * @summary List pages selected for my historical attempt\n */\nexport const learningHistoricalSelectedPages = async (attemptId: number,\n params?: LearningHistoricalSelectedPagesParams, options?: Parameters<typeof request>[1]): Promise<LearningSelectedPagePage> => {\n\n return request<LearningSelectedPagePage>(getLearningHistoricalSelectedPagesUrl(attemptId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningPageEvidenceUrl = (params?: LearningPageEvidenceParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/pages?${stringifiedParams}` : `/learning/history/pages`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. attemptId selects an owned historical attempt; unlinkedOnly=true selects rows with no stored attempt link and cannot be combined with attemptId. Optional object filters apply within that same ownership scope. Results are ordered by history ID descending and paginated after filtering. pageId optionally narrows to one local page identity. A returned attemptId is exposed only when it links to an owned historical attempt. responseAvailable indicates retained response evidence, not whether the bounded detail endpoint will return its serialized bytes.\n * @summary List my recorded page evidence\n */\nexport const learningPageEvidence = async (params?: LearningPageEvidenceParams, options?: Parameters<typeof request>[1]): Promise<LearningPageEvidencePage> => {\n\n return request<LearningPageEvidencePage>(getLearningPageEvidenceUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningPageEvidenceDetailUrl = (historyId: number,) => {\n\n\n\n\n return `/learning/history/pages/${historyId}`\n}\n\n/**\n * Returns evidence owned by the effective profile and rejects support impersonation. Resource identifiers do not authorize access to another learner. Source flags and counters are reported evidence, not newly computed grades. Missing dates, links and scoring remain null; a recorded completion flag does not establish a native pass result. Returns opaque PHP-serialized answer text only when retained as source master-selection evidence and at most 65,536 UTF-8 bytes. Larger responses retain encoding and byte count but set responseOmitted=true and serializedAnswers=null. A missing response instead has null encoding/count and responseOmitted=false. Source text is evidence, never a native answer request or trusted executable serialization.\n * @summary Read my historical page response evidence\n */\nexport const learningPageEvidenceDetail = async (historyId: number, options?: Parameters<typeof request>[1]): Promise<LearningPageEvidenceDetailRead> => {\n\n return request<LearningPageEvidenceDetailRead>(getLearningPageEvidenceDetailUrl(historyId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningListScoreHistoryUrl = (params?: LearningListScoreHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/history/scores?${stringifiedParams}` : `/learning/history/scores`\n}\n\n/**\n * Returns one stored summary per assessment in the effective profile's history, newest creation time first with assessmentId as tie-breaker. A native completion replaces its assessment's summary; this is not a best-score leaderboard. An imported aggregate may have historical=true and attemptId=null because no attempt evidence exists. assessment_id restricts the list to that assessment.\n * @summary List the profile's assessment score summaries\n */\nexport const learningListScoreHistory = async (params?: LearningListScoreHistoryParams, options?: Parameters<typeof request>[1]): Promise<LearningScoreSummaryPage> => {\n\n return request<LearningScoreSummaryPage>(getLearningListScoreHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningOpenLessonUrl = (lessonId: number,) => {\n\n\n\n\n return `/learning/lessons/${lessonId}/open`\n}\n\n/**\n * With sessionId, checks this profile's open course session and edition, renews its lease and selects the lesson for subsequent activity ticks. Without sessionId, both course previews and this lesson's freePreview must be enabled. Returns authorized media delivery URLs or HTML, public attachments and any vocabulary; corrections remain attempt-scoped. Delivery URLs may expire, so request fresh resources when reopening. A preview does not enroll the profile or record full-course consumption.\n * @summary Open lesson resources in a session or free preview\n */\nexport const learningOpenLesson = async (lessonId: number,\n learningLessonOpenWrite: LearningLessonOpenWrite, options?: Parameters<typeof request>[1]): Promise<LearningLessonOpenRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningLessonOpenRead>(getLearningOpenLessonUrl(lessonId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningLessonOpenWrite)\n }\n);}\n\n\nexport const getLearningUpdateProgressUrl = (lessonId: number,) => {\n\n\n\n\n return `/learning/lessons/${lessonId}/progress`\n}\n\n/**\n * Requires full access to the profile's selected course edition and creates enrollment if needed. Omit note to retain it; send null to clear it. positionSeconds is allowed only for resource lessons and cannot exceed a known duration. completed=true marks only a resource lesson complete; assessment and vocabulary lessons require their own completion workflow. Completion is retained on later completed=false writes. Updates the resume lesson and recomputes course progress from required lessons.\n * @summary Save lesson notes, playback position or resource completion\n */\nexport const learningUpdateProgress = async (lessonId: number,\n lessonProgressWrite: LessonProgressWrite, options?: Parameters<typeof request>[1]): Promise<LessonProgressRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LessonProgressRead>(getLearningUpdateProgressUrl(lessonId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(lessonProgressWrite)\n }\n);}\n\n\nexport const getLearningPathIntroductionUrl = (pathId: number,) => {\n\n\n\n\n return `/learning/paths/${pathId}/introduction`\n}\n\n/**\n * Returns a delivery descriptor, not the media bytes. The path must be active and at least one of its steps visible through the effective profile's catalogue access. Follow the returned URL promptly; delivery URLs may be temporary.\n * @summary Get a visible path's introduction resource\n */\nexport const learningPathIntroduction = async (pathId: number, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningPathIntroductionUrl(pathId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningOpenPathStepUrl = (pathId: number,) => {\n\n\n\n\n return `/learning/paths/${pathId}/open`\n}\n\n/**\n * Sets the effective profile's current position to an active path's visible step, creating progress on first use. contentId must be a member of the path and pass existing catalogue visibility checks. This records navigation; the response is not a course reader payload. Support impersonation is rejected.\n * @summary Record my selected path step\n */\nexport const learningOpenPathStep = async (pathId: number,\n learningPathOpenWrite: LearningPathOpenWrite, options?: Parameters<typeof request>[1]): Promise<LearningPathProgressRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningPathProgressRead>(getLearningOpenPathStepUrl(pathId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPathOpenWrite)\n }\n);}\n\n\nexport const getLearningReadPathProgressUrl = (pathId: number,) => {\n\n\n\n\n return `/learning/paths/${pathId}/progress`\n}\n\n/**\n * Returns only the effective profile's recorded position and does not start the path. started=false means no progress row exists, including for an unknown path ID. position is zero-based. currentContentId is null when no recorded step is currently visible; a stored position may survive later curation changes.\n * @summary Read my current position in a path\n */\nexport const learningReadPathProgress = async (pathId: number, options?: Parameters<typeof request>[1]): Promise<LearningPathProgressRead> => {\n\n return request<LearningPathProgressRead>(getLearningReadPathProgressUrl(pathId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningCloseSessionUrl = (sessionId: number,) => {\n\n\n\n\n return `/learning/sessions/${sessionId}`\n}\n\n/**\n * Closes only a session owned by the effective profile and records closedAt. Repeating the close returns the same closed session. Enrollment, answers and lesson progress are retained; this operation does not mark a lesson complete.\n * @summary Close a course session and its consumption lease\n */\nexport const learningCloseSession = async (sessionId: number, options?: Parameters<typeof request>[1]): Promise<LearningSessionRead> => {\n\n return request<LearningSessionRead>(getLearningCloseSessionUrl(sessionId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getLearningRecordActivityUrl = (sessionId: number,) => {\n\n\n\n\n return `/learning/sessions/${sessionId}/activity`\n}\n\n/**\n * Requires this profile's open session and the lesson most recently selected with the lesson-open operation. Renews the consumption lease. active=true records server-observed elapsed time since the previous heartbeat, capped at 60 seconds per tick; active=false moves the clock forward without adding time. activeSeconds is cumulative seconds, separate from lesson completion and playback position. Heartbeats have no request key; send them only for current activity.\n * @summary Record an activity heartbeat for the selected lesson\n */\nexport const learningRecordActivity = async (sessionId: number,\n learningActivityWrite: LearningActivityWrite, options?: Parameters<typeof request>[1]): Promise<LearningSessionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningSessionRead>(getLearningRecordActivityUrl(sessionId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningActivityWrite)\n }\n);}\n\n\nexport const getLearningUploadBytesUrl = (uploadId: number,) => {\n\n\n\n\n return `/learning/uploads/${uploadId}/body`\n}\n\n/**\n * Send an authenticated raw binary PUT, not multipart or JSON, to the reservation's uploadUrl before expiresAt. The byte count must exactly match sizeBytes; file signatures are checked against the reserved MIME type and captions must be valid UTF-8 WebVTT. Ownership and upload purpose are rechecked. A same-byte replay before expiry returns the existing immutable asset; different bytes cannot overwrite it. The JSON response contains the asset ID for a course definition or reflection answer, without issuing a delivery URL.\n * @summary Upload the exact bytes of a reserved file\n */\nexport const learningUploadBytes = async (uploadId: number,\n learningUploadBytesBody: Blob, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningAssetRead>(getLearningUploadBytesUrl(uploadId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/octet-stream', ...getHeaders(options?.headers) },\n body: learningUploadBytesBody\n }\n);}\n\n\nexport const getLearningReadVocabularyUrl = (vocabularyId: number,\n params: LearningReadVocabularyParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/vocabularies/${vocabularyId}?${stringifiedParams}` : `/learning/vocabularies/${vocabularyId}`\n}\n\n/**\n * lesson_id must identify a lesson using this vocabulary directly or as an attachment. Full reads return the profile's position and completion evidence. preview=true additionally requires that lesson's free-preview permission and omits saved personal progress. Entries are ordered by position then entry ID; term media IDs must be resolved through the vocabulary resource operation.\n * @summary Read vocabulary through an authorized lesson\n */\nexport const learningReadVocabulary = async (vocabularyId: number,\n params: LearningReadVocabularyParams, options?: Parameters<typeof request>[1]): Promise<LearningVocabularyRead> => {\n\n return request<LearningVocabularyRead>(getLearningReadVocabularyUrl(vocabularyId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningVocabularyResourceUrl = (vocabularyId: number,\n assetId: number,\n params: LearningVocabularyResourceParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/vocabularies/${vocabularyId}/assets/${assetId}?${stringifiedParams}` : `/learning/vocabularies/${vocabularyId}/assets/${assetId}`\n}\n\n/**\n * Checks vocabulary and lesson context exactly as the vocabulary read operation, including preview permission when preview=true. assetId must be audio or image referenced by a term or translation in this vocabulary; knowing a media ID alone grants no access. Returns delivery metadata with a potentially expiring URL.\n * @summary Resolve a vocabulary term's audio or image\n */\nexport const learningVocabularyResource = async (vocabularyId: number,\n assetId: number,\n params: LearningVocabularyResourceParams, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningVocabularyResourceUrl(vocabularyId,assetId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningUpdateVocabularyUrl = (vocabularyId: number,) => {\n\n\n\n\n return `/learning/vocabularies/${vocabularyId}/progress`\n}\n\n/**\n * Requires full access through lessonId and creates course enrollment if needed. position is a cursor from 0 through the entry count; completed=true requires a nonempty vocabulary and position exactly equal to its entry count. Completion is retained on subsequent writes. Completing the lesson's primary vocabulary also completes that lesson; completing an attached vocabulary does not. Updates the resume lesson and recomputes required-lesson progress.\n * @summary Save vocabulary position or completion\n */\nexport const learningUpdateVocabulary = async (vocabularyId: number,\n vocabularyProgressWrite: VocabularyProgressWrite, options?: Parameters<typeof request>[1]): Promise<VocabularyProgressRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<VocabularyProgressRead>(getLearningUpdateVocabularyUrl(vocabularyId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vocabularyProgressWrite)\n }\n);}\n\n\n"],"mappings":";;;AAqDA,MAAa,8BAA8B,iBAA0B;CAKnE,OAAO,yBAAyB,aAAa;AAC/C;;;;;AAMA,MAAa,uBAAuB,OAAO,cACvC,2BAAsD,YAA0E;CAEhI,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAA6B,2BAA2B,YAAY,GACzE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,yBAAyB;CAChD,CACF;AAAE;AAGF,MAAa,6BAA6B,cAAuB;CAK/D,OAAO,sBAAsB;AAC/B;;;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KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAgC,+BAA+B,YAAY,GAChF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,uBAAuB;CAC9C,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Bu as HistoryPage, Ga as ListHistoryParams, It as RemoveBiblioFavoriteParams, Qt as ReadingProgressWrite, Ri as PackListRead, X_ as CategoryPreferencesWrite, Z_ as CategoryListRead, Zr as PreferencesRead, ed as FavoritePage, en as ReadingProgressRead, k_ as ClearReadingHistoryParams, od as FavoriteAddWrite, oo as ListBiblioFavoritesParams, so as ListBiblioCategoriesParams } from "../chunks/index.js";
2
+ import { $t as ReadingProgressWrite, Bi as PackListRead, Dv as CategoryListRead, Ev as CategoryPreferencesWrite, Hu as HistoryPage, Lt as RemoveBiblioFavoriteParams, Qr as PreferencesRead, av as ClearReadingHistoryParams, cd as FavoriteAddWrite, co as ListBiblioFavoritesParams, lo as ListBiblioCategoriesParams, nd as FavoritePage, qa as ListHistoryParams, tn as ReadingProgressRead } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-library/biblio-library.d.ts
5
5
  export declare const getListBiblioCategoriesUrl: (params?: ListBiblioCategoriesParams) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-library.js","names":[],"sources":["../../src/api/biblio-library/biblio-library.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.18.0\n */\nimport type {\n CategoryListRead,\n CategoryPreferencesWrite,\n ClearReadingHistoryParams,\n FavoriteAddWrite,\n FavoritePage,\n HistoryPage,\n ListBiblioCategoriesParams,\n ListBiblioFavoritesParams,\n ListHistoryParams,\n PackListRead,\n PreferencesRead,\n ReadingProgressRead,\n ReadingProgressWrite,\n RemoveBiblioFavoriteParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListBiblioCategoriesUrl = (params?: ListBiblioCategoriesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/categories?${stringifiedParams}` : `/biblio/me/categories`\n}\n\n/**\n * The categories this account can reach (E26).\n *\n * Two independent gates, and both have to pass. Entitlement answers \"did the\n * company buy this\"; ``access_level`` answers \"is this person allowed it\" — an\n * ordinal on the account compared against one on the category, which is how a\n * child profile is kept out of the adult catalogue. Neither substitutes for the\n * other.\n * @summary List Biblio Categories\n */\nexport const listBiblioCategories = async (params?: ListBiblioCategoriesParams, options?: Parameters<typeof request>[1]): Promise<CategoryListRead> => {\n\n return request<CategoryListRead>(getListBiblioCategoriesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListBiblioFavoritesUrl = (params?: ListBiblioFavoritesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/favorites?${stringifiedParams}` : `/biblio/me/favorites`\n}\n\n/**\n * The caller's favourites (E30), newest first.\n * @summary List Biblio Favorites\n */\nexport const listBiblioFavorites = async (params?: ListBiblioFavoritesParams, options?: Parameters<typeof request>[1]): Promise<FavoritePage> => {\n\n return request<FavoritePage>(getListBiblioFavoritesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getRemoveBiblioFavoriteUrl = (contentId: number,\n params?: RemoveBiblioFavoriteParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/favorites/${contentId}?${stringifiedParams}` : `/biblio/me/favorites/${contentId}`\n}\n\n/**\n * Remove one mode only; a press selection includes its publication variants.\n *\n * Omitted mode means content. Use ?mode=press_title to unselect a publication.\n * No longer removes both modes sharing an ID. Absent is already the desired state.\n * @summary Remove Biblio Favorite\n */\nexport const removeBiblioFavorite = async (contentId: number,\n params?: RemoveBiblioFavoriteParams, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveBiblioFavoriteUrl(contentId,params),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getAddBiblioFavoriteUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/me/favorites/${contentId}`\n}\n\n/**\n * Mark content as a favourite (E31). Idempotent.\n *\n * ``PUT`` and :func:`remove_favorite`'s ``DELETE`` replace one\n * ``POST /favorites`` carrying an ``enabled`` boolean — the verb encoded as\n * data. A retry after a timeout reversed the user's intent; a repeated ``PUT``\n * cannot (§4, consequence 3).\n *\n * Favouriting is not consumption, so it is not entitlement-gated: a member may\n * bookmark something their library has not licensed *yet*. Reaching the content\n * is gated, at the point of reaching it.\n * @summary Add Biblio Favorite\n */\nexport const addBiblioFavorite = async (contentId: number,\n favoriteAddWrite: FavoriteAddWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getAddBiblioFavoriteUrl(contentId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(favoriteAddWrite)\n }\n);}\n\n\nexport const getClearReadingHistoryUrl = (params?: ClearReadingHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/history?${stringifiedParams}` : `/biblio/me/history`\n}\n\n/**\n * Clear this profile's Biblio history collection; later openings reappear.\n *\n * Finished means progress >=100; omitted state clears both collections.\n * Progress, favourites, downloads, active loans and credit accounting remain\n * unchanged. This removes profile-facing history, not records retained for\n * accounting; it is not a substitute for a complete personal-data erasure.\n * Support impersonation cannot perform this personal action.\n * @summary Clear Reading History\n */\nexport const clearReadingHistory = async (params?: ClearReadingHistoryParams, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getClearReadingHistoryUrl(params),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getListHistoryUrl = (params?: ListHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/history?${stringifiedParams}` : `/biblio/me/history`\n}\n\n/**\n * What this account has consumed, most recent first (E33).\n *\n * One row per content item, not one per view: the caller wants \"what have I\n * been reading\", and ``consumption_event`` is append-only with a row per act.\n * The last access is therefore a MAX, and progress comes from\n * ``content_progress``, which is LEFT JOINed because an absent row means \"not\n * started\" rather than zero.\n * @summary List History\n */\nexport const listHistory = async (params?: ListHistoryParams, options?: Parameters<typeof request>[1]): Promise<HistoryPage> => {\n\n return request<HistoryPage>(getListHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListPacksUrl = () => {\n\n\n\n\n return `/biblio/me/packs`\n}\n\n/**\n * The content packs this account can navigate (E25).\n *\n * A pack is a :class:`~app.models.biblio.catalogue.CatalogSection`, and one is\n * reachable when the contract reaches at least one category inside it. Deriving\n * it that way rather than granting packs directly means a pack cannot advertise\n * itself while every category under it is out of contract.\n *\n * Empty is a correct answer, not a broken one: an account whose contract has\n * lapsed reaches nothing.\n * @summary List Packs\n */\nexport const listPacks = async ( options?: Parameters<typeof request>[1]): Promise<PackListRead> => {\n\n return request<PackListRead>(getListPacksUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReadPreferencesUrl = () => {\n\n\n\n\n return `/biblio/me/preferences`\n}\n\n/**\n * The caller's own preferences (E28).\n *\n * An object with one key rather than a bare array, so a second preference can\n * be added later without breaking every client.\n * @summary Read Preferences\n */\nexport const readPreferences = async ( options?: Parameters<typeof request>[1]): Promise<PreferencesRead> => {\n\n return request<PreferencesRead>(getReadPreferencesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReplaceCategoryPreferencesUrl = () => {\n\n\n\n\n return `/biblio/me/preferences/categories`\n}\n\n/**\n * Replace the favourite-category set wholesale (E29).\n *\n * ``PUT`` because the legacy handler already replaced the whole set; the verb\n * now says so. An empty array clears the set and is valid input — the legacy\n * left that path uncaught and returned ``500``.\n *\n * A category the account cannot reach is ``422``, listing the offending ids.\n * Silently dropping them would leave the client believing it had saved\n * something it had not.\n * @summary Replace Category Preferences\n */\nexport const replaceCategoryPreferences = async (categoryPreferencesWrite: CategoryPreferencesWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getReplaceCategoryPreferencesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryPreferencesWrite)\n }\n);}\n\n\nexport const getUpdateReadingProgressUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/me/progress/${contentId}`\n}\n\n/**\n * Update an already-opened item. Native courses use lesson progress; this endpoint cannot bypass their assessment/completion rules.\n * @summary Update Reading Progress\n */\nexport const updateReadingProgress = async (contentId: number,\n readingProgressWrite: ReadingProgressWrite, options?: Parameters<typeof request>[1]): Promise<ReadingProgressRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ReadingProgressRead>(getUpdateReadingProgressUrl(contentId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JS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sD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,iCAAiC,GACpD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,wBAAwB;CAC/C,CACF;AAAE;AAGF,MAAa,+BAA+B,cAAuB;CAKjE,OAAO,uBAAuB;AAChC;;;;;AAMA,MAAa,wBAAwB,OAAO,WACxC,sBAA4C,YAA0E;CAEtH,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAA6B,4BAA4B,SAAS,GACvE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,oBAAoB;CAC3C,CACF;AAAE"}
1
+ {"version":3,"file":"biblio-library.js","names":[],"sources":["../../src/api/biblio-library/biblio-library.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.19.0\n */\nimport type {\n CategoryListRead,\n CategoryPreferencesWrite,\n ClearReadingHistoryParams,\n FavoriteAddWrite,\n FavoritePage,\n HistoryPage,\n ListBiblioCategoriesParams,\n ListBiblioFavoritesParams,\n ListHistoryParams,\n PackListRead,\n PreferencesRead,\n ReadingProgressRead,\n ReadingProgressWrite,\n RemoveBiblioFavoriteParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListBiblioCategoriesUrl = (params?: ListBiblioCategoriesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/categories?${stringifiedParams}` : `/biblio/me/categories`\n}\n\n/**\n * The categories this account can reach (E26).\n *\n * Two independent gates, and both have to pass. Entitlement answers \"did the\n * company buy this\"; ``access_level`` answers \"is this person allowed it\" — an\n * ordinal on the account compared against one on the category, which is how a\n * child profile is kept out of the adult catalogue. Neither substitutes for the\n * other.\n * @summary List Biblio Categories\n */\nexport const listBiblioCategories = async (params?: ListBiblioCategoriesParams, options?: Parameters<typeof request>[1]): Promise<CategoryListRead> => {\n\n return request<CategoryListRead>(getListBiblioCategoriesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListBiblioFavoritesUrl = (params?: ListBiblioFavoritesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/favorites?${stringifiedParams}` : `/biblio/me/favorites`\n}\n\n/**\n * The caller's favourites (E30), newest first.\n * @summary List Biblio Favorites\n */\nexport const listBiblioFavorites = async (params?: ListBiblioFavoritesParams, options?: Parameters<typeof request>[1]): Promise<FavoritePage> => {\n\n return request<FavoritePage>(getListBiblioFavoritesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getRemoveBiblioFavoriteUrl = (contentId: number,\n params?: RemoveBiblioFavoriteParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/favorites/${contentId}?${stringifiedParams}` : `/biblio/me/favorites/${contentId}`\n}\n\n/**\n * Remove one mode only; a press selection includes its publication variants.\n *\n * Omitted mode means content. Use ?mode=press_title to unselect a publication.\n * No longer removes both modes sharing an ID. Absent is already the desired state.\n * @summary Remove Biblio Favorite\n */\nexport const removeBiblioFavorite = async (contentId: number,\n params?: RemoveBiblioFavoriteParams, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveBiblioFavoriteUrl(contentId,params),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getAddBiblioFavoriteUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/me/favorites/${contentId}`\n}\n\n/**\n * Mark content as a favourite (E31). Idempotent.\n *\n * ``PUT`` and :func:`remove_favorite`'s ``DELETE`` replace one\n * ``POST /favorites`` carrying an ``enabled`` boolean — the verb encoded as\n * data. A retry after a timeout reversed the user's intent; a repeated ``PUT``\n * cannot (§4, consequence 3).\n *\n * Favouriting is not consumption, so it is not entitlement-gated: a member may\n * bookmark something their library has not licensed *yet*. Reaching the content\n * is gated, at the point of reaching it.\n * @summary Add Biblio Favorite\n */\nexport const addBiblioFavorite = async (contentId: number,\n favoriteAddWrite: FavoriteAddWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getAddBiblioFavoriteUrl(contentId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(favoriteAddWrite)\n }\n);}\n\n\nexport const getClearReadingHistoryUrl = (params?: ClearReadingHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/history?${stringifiedParams}` : `/biblio/me/history`\n}\n\n/**\n * Clear this profile's Biblio history collection; later openings reappear.\n *\n * Finished means progress >=100; omitted state clears both collections.\n * Progress, favourites, downloads, active loans and credit accounting remain\n * unchanged. This removes profile-facing history, not records retained for\n * accounting; it is not a substitute for a complete personal-data erasure.\n * Support impersonation cannot perform this personal action.\n * @summary Clear Reading History\n */\nexport const clearReadingHistory = async (params?: ClearReadingHistoryParams, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getClearReadingHistoryUrl(params),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getListHistoryUrl = (params?: ListHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/me/history?${stringifiedParams}` : `/biblio/me/history`\n}\n\n/**\n * What this account has consumed, most recent first (E33).\n *\n * One row per content item, not one per view: the caller wants \"what have I\n * been reading\", and ``consumption_event`` is append-only with a row per act.\n * The last access is therefore a MAX, and progress comes from\n * ``content_progress``, which is LEFT JOINed because an absent row means \"not\n * started\" rather than zero.\n * @summary List History\n */\nexport const listHistory = async (params?: ListHistoryParams, options?: Parameters<typeof request>[1]): Promise<HistoryPage> => {\n\n return request<HistoryPage>(getListHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListPacksUrl = () => {\n\n\n\n\n return `/biblio/me/packs`\n}\n\n/**\n * The content packs this account can navigate (E25).\n *\n * A pack is a :class:`~app.models.biblio.catalogue.CatalogSection`, and one is\n * reachable when the contract reaches at least one category inside it. Deriving\n * it that way rather than granting packs directly means a pack cannot advertise\n * itself while every category under it is out of contract.\n *\n * Empty is a correct answer, not a broken one: an account whose contract has\n * lapsed reaches nothing.\n * @summary List Packs\n */\nexport const listPacks = async ( options?: Parameters<typeof request>[1]): Promise<PackListRead> => {\n\n return request<PackListRead>(getListPacksUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReadPreferencesUrl = () => {\n\n\n\n\n return `/biblio/me/preferences`\n}\n\n/**\n * The caller's own preferences (E28).\n *\n * An object with one key rather than a bare array, so a second preference can\n * be added later without breaking every client.\n * @summary Read Preferences\n */\nexport const readPreferences = async ( options?: Parameters<typeof request>[1]): Promise<PreferencesRead> => {\n\n return request<PreferencesRead>(getReadPreferencesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReplaceCategoryPreferencesUrl = () => {\n\n\n\n\n return `/biblio/me/preferences/categories`\n}\n\n/**\n * Replace the favourite-category set wholesale (E29).\n *\n * ``PUT`` because the legacy handler already replaced the whole set; the verb\n * now says so. An empty array clears the set and is valid input — the legacy\n * left that path uncaught and returned ``500``.\n *\n * A category the account cannot reach is ``422``, listing the offending ids.\n * Silently dropping them would leave the client believing it had saved\n * something it had not.\n * @summary Replace Category Preferences\n */\nexport const replaceCategoryPreferences = async (categoryPreferencesWrite: CategoryPreferencesWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getReplaceCategoryPreferencesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryPreferencesWrite)\n }\n);}\n\n\nexport const getUpdateReadingProgressUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/me/progress/${contentId}`\n}\n\n/**\n * Update an already-opened item. Native courses use lesson progress; this endpoint cannot bypass their assessment/completion rules.\n * @summary Update Reading Progress\n */\nexport const updateReadingProgress = async (contentId: number,\n readingProgressWrite: ReadingProgressWrite, options?: Parameters<typeof request>[1]): Promise<ReadingProgressRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ReadingProgressRead>(getUpdateReadingProgressUrl(contentId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(readingProgressWrite)\n }\n);}\n\n\n"],"mappings":";;;AA0BA,MAAa,8BAA8B,WAAyC;CAClF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AAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,iCAAiC,GACpD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,wBAAwB;CAC/C,CACF;AAAE;AAGF,MAAa,+BAA+B,cAAuB;CAKjE,OAAO,uBAAuB;AAChC;;;;;AAMA,MAAa,wBAAwB,OAAO,WACxC,sBAA4C,YAA0E;CAEtH,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAA6B,4BAA4B,SAAS,GACvE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,oBAAoB;CAC3C,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { fo as LicenseRead } from "../chunks/index.js";
2
+ import { mo as LicenseRead } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-nextory/biblio-nextory.d.ts
5
5
  export declare const getDeleteLicenseUrl: () => string;