@learnorama/mozaik-sdk 0.15.0-staging.53.1 → 0.17.0-staging.56.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 (299) hide show
  1. package/COURSES.md +66 -0
  2. package/FRONTEND-REQUESTS.md +131 -0
  3. package/README.md +26 -23
  4. package/dist/api/account.d.ts +31 -1
  5. package/dist/api/account.js +84 -1
  6. package/dist/api/account.js.map +1 -1
  7. package/dist/api/admin-catalogue.d.ts +1 -1
  8. package/dist/api/admin-catalogue.js.map +1 -1
  9. package/dist/api/admin-consumption.d.ts +1 -1
  10. package/dist/api/admin-consumption.js.map +1 -1
  11. package/dist/api/admin-contracts.d.ts +1 -1
  12. package/dist/api/admin-contracts.js.map +1 -1
  13. package/dist/api/admin-customer.d.ts +168 -5
  14. package/dist/api/admin-customer.js +551 -9
  15. package/dist/api/admin-customer.js.map +1 -1
  16. package/dist/api/admin-desk.d.ts +1 -1
  17. package/dist/api/admin-desk.js.map +1 -1
  18. package/dist/api/admin-licenses.d.ts +12 -9
  19. package/dist/api/admin-licenses.js +24 -9
  20. package/dist/api/admin-licenses.js.map +1 -1
  21. package/dist/api/admin-partner-selections.d.ts +1 -1
  22. package/dist/api/admin-partner-selections.js.map +1 -1
  23. package/dist/api/admin-patrons.d.ts +1 -1
  24. package/dist/api/admin-patrons.js.map +1 -1
  25. package/dist/api/admin-reviews.d.ts +1 -1
  26. package/dist/api/admin-reviews.js.map +1 -1
  27. package/dist/api/admin-roles.d.ts +1 -1
  28. package/dist/api/admin-roles.js.map +1 -1
  29. package/dist/api/admin-support.d.ts +1 -1
  30. package/dist/api/admin-support.js.map +1 -1
  31. package/dist/api/admin-tenants.d.ts +49 -1
  32. package/dist/api/admin-tenants.js +221 -1
  33. package/dist/api/admin-tenants.js.map +1 -1
  34. package/dist/api/admin-tutoring.d.ts +1 -1
  35. package/dist/api/admin-tutoring.js.map +1 -1
  36. package/dist/api/auth-device.d.ts +1 -1
  37. package/dist/api/auth-device.js.map +1 -1
  38. package/dist/api/auth.d.ts +1 -1
  39. package/dist/api/auth.js.map +1 -1
  40. package/dist/api/biblio-billing-webhooks.d.ts +1 -1
  41. package/dist/api/biblio-billing-webhooks.js.map +1 -1
  42. package/dist/api/biblio-billing.d.ts +1 -1
  43. package/dist/api/biblio-billing.js.map +1 -1
  44. package/dist/api/biblio-catalogue.d.ts +1 -1
  45. package/dist/api/biblio-catalogue.js.map +1 -1
  46. package/dist/api/biblio-home.d.ts +1 -1
  47. package/dist/api/biblio-home.js.map +1 -1
  48. package/dist/api/biblio-learning-author-profiles.d.ts +1 -1
  49. package/dist/api/biblio-learning-author-profiles.js.map +1 -1
  50. package/dist/api/biblio-learning-authoring.d.ts +1 -1
  51. package/dist/api/biblio-learning-authoring.js.map +1 -1
  52. package/dist/api/biblio-learning-editorial.d.ts +1 -1
  53. package/dist/api/biblio-learning-editorial.js.map +1 -1
  54. package/dist/api/biblio-learning-feedback.d.ts +1 -1
  55. package/dist/api/biblio-learning-feedback.js.map +1 -1
  56. package/dist/api/biblio-learning-finance.d.ts +1 -1
  57. package/dist/api/biblio-learning-finance.js.map +1 -1
  58. package/dist/api/biblio-learning-integrations.d.ts +1 -1
  59. package/dist/api/biblio-learning-integrations.js.map +1 -1
  60. package/dist/api/biblio-learning-membership.d.ts +1 -1
  61. package/dist/api/biblio-learning-membership.js.map +1 -1
  62. package/dist/api/biblio-learning.d.ts +1 -1
  63. package/dist/api/biblio-learning.js.map +1 -1
  64. package/dist/api/biblio-library.d.ts +7 -1
  65. package/dist/api/biblio-library.js +27 -1
  66. package/dist/api/biblio-library.js.map +1 -1
  67. package/dist/api/biblio-nextory.d.ts +3 -1
  68. package/dist/api/biblio-nextory.js +2 -0
  69. package/dist/api/biblio-nextory.js.map +1 -1
  70. package/dist/api/biblio-press.d.ts +1 -1
  71. package/dist/api/biblio-press.js.map +1 -1
  72. package/dist/api/biblio-search.d.ts +2 -7
  73. package/dist/api/biblio-search.js +1 -6
  74. package/dist/api/biblio-search.js.map +1 -1
  75. package/dist/api/biblio-telemetry.d.ts +1 -1
  76. package/dist/api/biblio-telemetry.js.map +1 -1
  77. package/dist/api/biblio-youscribe.d.ts +3 -4
  78. package/dist/api/biblio-youscribe.js +3 -4
  79. package/dist/api/biblio-youscribe.js.map +1 -1
  80. package/dist/api/consumption.d.ts +1 -1
  81. package/dist/api/consumption.js.map +1 -1
  82. package/dist/api/cvs-app.d.ts +1 -1
  83. package/dist/api/cvs-app.js.map +1 -1
  84. package/dist/api/cvs-documents.d.ts +1 -1
  85. package/dist/api/cvs-documents.js.map +1 -1
  86. package/dist/api/cvs-favorites.d.ts +1 -1
  87. package/dist/api/cvs-favorites.js.map +1 -1
  88. package/dist/api/cvs-ils.d.ts +1 -1
  89. package/dist/api/cvs-ils.js.map +1 -1
  90. package/dist/api/cvs-loans.d.ts +1 -1
  91. package/dist/api/cvs-loans.js.map +1 -1
  92. package/dist/api/cvs-payments.d.ts +1 -1
  93. package/dist/api/cvs-payments.js.map +1 -1
  94. package/dist/api/cvs-streaming.d.ts +1 -1
  95. package/dist/api/cvs-streaming.js.map +1 -1
  96. package/dist/api/index.d.ts +8 -7
  97. package/dist/api/index.js +8 -7
  98. package/dist/api/partner-catalogue.d.ts +1 -1
  99. package/dist/api/partner-catalogue.js.map +1 -1
  100. package/dist/api/partner-reader-nextory.d.ts +1 -1
  101. package/dist/api/partner-reader-nextory.js.map +1 -1
  102. package/dist/api/partner-reader-youscribe.d.ts +11 -5
  103. package/dist/api/partner-reader-youscribe.js +10 -4
  104. package/dist/api/partner-reader-youscribe.js.map +1 -1
  105. package/dist/api/partner-reading.d.ts +35 -0
  106. package/dist/api/partner-reading.js +43 -0
  107. package/dist/api/partner-reading.js.map +1 -0
  108. package/dist/api/profiles.d.ts +1 -1
  109. package/dist/api/profiles.js.map +1 -1
  110. package/dist/api/search.d.ts +8 -13
  111. package/dist/api/search.js +30 -13
  112. package/dist/api/search.js.map +1 -1
  113. package/dist/api/tutoring-catalogue.d.ts +1 -1
  114. package/dist/api/tutoring-catalogue.js.map +1 -1
  115. package/dist/api/tutoring-chat.d.ts +1 -1
  116. package/dist/api/tutoring-chat.js.map +1 -1
  117. package/dist/api/tutoring-dispatch.d.ts +1 -1
  118. package/dist/api/tutoring-dispatch.js.map +1 -1
  119. package/dist/api/tutoring-practitioner.d.ts +1 -1
  120. package/dist/api/tutoring-practitioner.js.map +1 -1
  121. package/dist/api/tutoring-requests.d.ts +1 -1
  122. package/dist/api/tutoring-requests.js.map +1 -1
  123. package/dist/auth.d.ts +1 -1
  124. package/dist/auth.js +8 -0
  125. package/dist/auth.js.map +1 -1
  126. package/dist/chunks/client.js +20 -8
  127. package/dist/chunks/client.js.map +1 -1
  128. package/dist/chunks/client2.d.ts +3 -1
  129. package/dist/chunks/connection.d.ts +1 -1
  130. package/dist/chunks/index.d.ts +2085 -552
  131. package/dist/index.d.ts +3 -3
  132. package/dist/index.js +3 -3
  133. package/dist/index.js.map +1 -1
  134. package/dist/models.d.ts +2 -2
  135. package/dist/models.js +197 -2
  136. package/dist/models.js.map +1 -1
  137. package/dist/react/account.d.ts +134 -1
  138. package/dist/react/account.js +216 -2
  139. package/dist/react/account.js.map +1 -1
  140. package/dist/react/admin-catalogue.d.ts +1 -1
  141. package/dist/react/admin-catalogue.js +1 -1
  142. package/dist/react/admin-catalogue.js.map +1 -1
  143. package/dist/react/admin-consumption.d.ts +1 -1
  144. package/dist/react/admin-consumption.js +1 -1
  145. package/dist/react/admin-consumption.js.map +1 -1
  146. package/dist/react/admin-contracts.d.ts +1 -1
  147. package/dist/react/admin-contracts.js +1 -1
  148. package/dist/react/admin-contracts.js.map +1 -1
  149. package/dist/react/admin-customer.d.ts +794 -15
  150. package/dist/react/admin-customer.js +1390 -80
  151. package/dist/react/admin-customer.js.map +1 -1
  152. package/dist/react/admin-desk.d.ts +1 -1
  153. package/dist/react/admin-desk.js +1 -1
  154. package/dist/react/admin-desk.js.map +1 -1
  155. package/dist/react/admin-licenses.d.ts +39 -9
  156. package/dist/react/admin-licenses.js +49 -10
  157. package/dist/react/admin-licenses.js.map +1 -1
  158. package/dist/react/admin-partner-selections.d.ts +1 -1
  159. package/dist/react/admin-partner-selections.js +1 -1
  160. package/dist/react/admin-partner-selections.js.map +1 -1
  161. package/dist/react/admin-patrons.d.ts +1 -1
  162. package/dist/react/admin-patrons.js +1 -1
  163. package/dist/react/admin-patrons.js.map +1 -1
  164. package/dist/react/admin-reviews.d.ts +1 -1
  165. package/dist/react/admin-reviews.js +1 -1
  166. package/dist/react/admin-reviews.js.map +1 -1
  167. package/dist/react/admin-roles.d.ts +1 -1
  168. package/dist/react/admin-roles.js +1 -1
  169. package/dist/react/admin-roles.js.map +1 -1
  170. package/dist/react/admin-support.d.ts +1 -1
  171. package/dist/react/admin-support.js +1 -1
  172. package/dist/react/admin-support.js.map +1 -1
  173. package/dist/react/admin-tenants.d.ts +230 -1
  174. package/dist/react/admin-tenants.js +470 -2
  175. package/dist/react/admin-tenants.js.map +1 -1
  176. package/dist/react/admin-tutoring.d.ts +1 -1
  177. package/dist/react/admin-tutoring.js +1 -1
  178. package/dist/react/admin-tutoring.js.map +1 -1
  179. package/dist/react/auth-device.d.ts +1 -1
  180. package/dist/react/auth-device.js +1 -1
  181. package/dist/react/auth-device.js.map +1 -1
  182. package/dist/react/auth.d.ts +1 -1
  183. package/dist/react/auth.js +1 -1
  184. package/dist/react/auth.js.map +1 -1
  185. package/dist/react/biblio-billing-webhooks.d.ts +1 -1
  186. package/dist/react/biblio-billing-webhooks.js +1 -1
  187. package/dist/react/biblio-billing-webhooks.js.map +1 -1
  188. package/dist/react/biblio-billing.d.ts +1 -1
  189. package/dist/react/biblio-billing.js +1 -1
  190. package/dist/react/biblio-billing.js.map +1 -1
  191. package/dist/react/biblio-catalogue.d.ts +1 -1
  192. package/dist/react/biblio-catalogue.js +1 -1
  193. package/dist/react/biblio-catalogue.js.map +1 -1
  194. package/dist/react/biblio-home.d.ts +1 -1
  195. package/dist/react/biblio-home.js +1 -1
  196. package/dist/react/biblio-home.js.map +1 -1
  197. package/dist/react/biblio-learning-author-profiles.d.ts +1 -1
  198. package/dist/react/biblio-learning-author-profiles.js +1 -1
  199. package/dist/react/biblio-learning-author-profiles.js.map +1 -1
  200. package/dist/react/biblio-learning-authoring.d.ts +1 -1
  201. package/dist/react/biblio-learning-authoring.js +1 -1
  202. package/dist/react/biblio-learning-authoring.js.map +1 -1
  203. package/dist/react/biblio-learning-editorial.d.ts +1 -1
  204. package/dist/react/biblio-learning-editorial.js +1 -1
  205. package/dist/react/biblio-learning-editorial.js.map +1 -1
  206. package/dist/react/biblio-learning-feedback.d.ts +1 -1
  207. package/dist/react/biblio-learning-feedback.js +1 -1
  208. package/dist/react/biblio-learning-feedback.js.map +1 -1
  209. package/dist/react/biblio-learning-finance.d.ts +1 -1
  210. package/dist/react/biblio-learning-finance.js +1 -1
  211. package/dist/react/biblio-learning-finance.js.map +1 -1
  212. package/dist/react/biblio-learning-integrations.d.ts +1 -1
  213. package/dist/react/biblio-learning-integrations.js +1 -1
  214. package/dist/react/biblio-learning-integrations.js.map +1 -1
  215. package/dist/react/biblio-learning-membership.d.ts +1 -1
  216. package/dist/react/biblio-learning-membership.js +1 -1
  217. package/dist/react/biblio-learning-membership.js.map +1 -1
  218. package/dist/react/biblio-learning.d.ts +1 -1
  219. package/dist/react/biblio-learning.js +1 -1
  220. package/dist/react/biblio-learning.js.map +1 -1
  221. package/dist/react/biblio-library.d.ts +26 -1
  222. package/dist/react/biblio-library.js +56 -2
  223. package/dist/react/biblio-library.js.map +1 -1
  224. package/dist/react/biblio-nextory.d.ts +3 -1
  225. package/dist/react/biblio-nextory.js +3 -1
  226. package/dist/react/biblio-nextory.js.map +1 -1
  227. package/dist/react/biblio-press.d.ts +1 -1
  228. package/dist/react/biblio-press.js +1 -1
  229. package/dist/react/biblio-press.js.map +1 -1
  230. package/dist/react/biblio-search.d.ts +2 -7
  231. package/dist/react/biblio-search.js +2 -7
  232. package/dist/react/biblio-search.js.map +1 -1
  233. package/dist/react/biblio-telemetry.d.ts +1 -1
  234. package/dist/react/biblio-telemetry.js +1 -1
  235. package/dist/react/biblio-telemetry.js.map +1 -1
  236. package/dist/react/biblio-youscribe.d.ts +4 -5
  237. package/dist/react/biblio-youscribe.js +4 -5
  238. package/dist/react/biblio-youscribe.js.map +1 -1
  239. package/dist/react/chat.d.ts +1 -1
  240. package/dist/react/consumption.d.ts +1 -1
  241. package/dist/react/consumption.js +1 -1
  242. package/dist/react/consumption.js.map +1 -1
  243. package/dist/react/cvs-app.d.ts +1 -1
  244. package/dist/react/cvs-app.js +1 -1
  245. package/dist/react/cvs-app.js.map +1 -1
  246. package/dist/react/cvs-documents.d.ts +1 -1
  247. package/dist/react/cvs-documents.js +1 -1
  248. package/dist/react/cvs-documents.js.map +1 -1
  249. package/dist/react/cvs-favorites.d.ts +1 -1
  250. package/dist/react/cvs-favorites.js +1 -1
  251. package/dist/react/cvs-favorites.js.map +1 -1
  252. package/dist/react/cvs-ils.d.ts +1 -1
  253. package/dist/react/cvs-ils.js +1 -1
  254. package/dist/react/cvs-ils.js.map +1 -1
  255. package/dist/react/cvs-loans.d.ts +1 -1
  256. package/dist/react/cvs-loans.js +1 -1
  257. package/dist/react/cvs-loans.js.map +1 -1
  258. package/dist/react/cvs-payments.d.ts +1 -1
  259. package/dist/react/cvs-payments.js +1 -1
  260. package/dist/react/cvs-payments.js.map +1 -1
  261. package/dist/react/cvs-streaming.d.ts +1 -1
  262. package/dist/react/cvs-streaming.js +1 -1
  263. package/dist/react/cvs-streaming.js.map +1 -1
  264. package/dist/react/index.d.ts +8 -7
  265. package/dist/react/index.js +8 -7
  266. package/dist/react/partner-catalogue.d.ts +1 -1
  267. package/dist/react/partner-catalogue.js +1 -1
  268. package/dist/react/partner-catalogue.js.map +1 -1
  269. package/dist/react/partner-reader-nextory.d.ts +1 -1
  270. package/dist/react/partner-reader-nextory.js +1 -1
  271. package/dist/react/partner-reader-nextory.js.map +1 -1
  272. package/dist/react/partner-reader-youscribe.d.ts +11 -5
  273. package/dist/react/partner-reader-youscribe.js +12 -5
  274. package/dist/react/partner-reader-youscribe.js.map +1 -1
  275. package/dist/react/partner-reading.d.ts +56 -0
  276. package/dist/react/partner-reading.js +79 -0
  277. package/dist/react/partner-reading.js.map +1 -0
  278. package/dist/react/profiles.d.ts +1 -1
  279. package/dist/react/profiles.js +1 -1
  280. package/dist/react/profiles.js.map +1 -1
  281. package/dist/react/search.d.ts +35 -13
  282. package/dist/react/search.js +55 -14
  283. package/dist/react/search.js.map +1 -1
  284. package/dist/react/tutoring-catalogue.d.ts +1 -1
  285. package/dist/react/tutoring-catalogue.js +1 -1
  286. package/dist/react/tutoring-catalogue.js.map +1 -1
  287. package/dist/react/tutoring-chat.d.ts +1 -1
  288. package/dist/react/tutoring-chat.js +1 -1
  289. package/dist/react/tutoring-chat.js.map +1 -1
  290. package/dist/react/tutoring-dispatch.d.ts +1 -1
  291. package/dist/react/tutoring-dispatch.js +1 -1
  292. package/dist/react/tutoring-dispatch.js.map +1 -1
  293. package/dist/react/tutoring-practitioner.d.ts +1 -1
  294. package/dist/react/tutoring-practitioner.js +1 -1
  295. package/dist/react/tutoring-practitioner.js.map +1 -1
  296. package/dist/react/tutoring-requests.d.ts +1 -1
  297. package/dist/react/tutoring-requests.js +1 -1
  298. package/dist/react/tutoring-requests.js.map +1 -1
  299. package/package.json +10 -8
package/COURSES.md ADDED
@@ -0,0 +1,66 @@
1
+ # Native courses and Services
2
+
3
+ Course reading uses the authenticated SDK and the same profile/entitlement
4
+ rules as catalogue browsing. A catalogue item alone is not a playable course.
5
+ Use `courseLaunch.mode` (`native` or `unavailable`), or `nativeCourseUrl` with
6
+ an older SDK. Hide/disable the launch action when no reader is available.
7
+ Never substitute a consumption-only request for opening actual media.
8
+
9
+ ```ts
10
+ import {
11
+ learningReadCourse, learningStartSession, learningOpenLesson,
12
+ learningRecordActivity, learningUpdateProgress, learningCloseSession,
13
+ } from '@learnorama/mozaik-sdk/api/biblio-learning';
14
+
15
+ const options = { client: auth.client };
16
+ const course = await learningReadCourse(courseId, options);
17
+ if (!course.hasFullAccess) throw new Error('Full course access is required');
18
+ const lessonId = course.resumeLessonId ?? course.chapters[0]?.lessons[0]?.lessonId;
19
+ if (!lessonId) throw new Error('No available lesson');
20
+ const session = await learningStartSession(courseId, {
21
+ requestKey: crypto.randomUUID(), // retain this key when retrying the same start
22
+ }, options);
23
+ const opened = await learningOpenLesson(lessonId, {
24
+ sessionId: session.sessionId,
25
+ }, options);
26
+ const video = opened.resources.find(resource => resource.kind === 'video');
27
+ // Give video.url to the player. Convert decimal strings with Number(...).
28
+ // Use the saved lesson progress, otherwise video.startSeconds, for initial seek.
29
+ // Supply video.caption (WebVTT) when present; absence is legitimate.
30
+
31
+ // While the selected lesson is actually playing, send bounded activity ticks.
32
+ await learningRecordActivity(session.sessionId, { lessonId, active: true }, options);
33
+ await learningUpdateProgress(lessonId, { positionSeconds: '42.000' }, options);
34
+ // On completion of a resource lesson, report completed:true through the same call.
35
+ // Close the session on departure; retain errors rather than fabricating progress.
36
+ await learningCloseSession(session.sessionId, options);
37
+ ```
38
+
39
+ Use the account's own login. A staging learner and its live verification are
40
+ listed in the backend handoff; course metadata alone is not a completed login test. Current `/learning` mutation routes deliberately
41
+ reject support impersonation; a successful catalogue read in support mode does
42
+ not authorize a course session. Media URLs can expire: reopen the lesson to
43
+ obtain a fresh URL. Do not persist them as catalogue URLs or report downloaded
44
+ bytes as active learning time.
45
+
46
+ `GET /biblio/home-feed?kind=course` may include `popularMonth`. Its `categoryId`
47
+ is null and its `contentsUrl` points to
48
+ `/biblio/contents?kind=course&sort=popular_month`. Ranking uses distinct profiles
49
+ with actual, non-reported, positive-unit VIEW events in the tenant during the
50
+ past 30 days. A course needs at least three such profiles for the home ranking;
51
+ no historical audience is fabricated for newly populated staging data.
52
+
53
+ `categoryLabel` and `lessonCount` are nullable. A duration, remaining page count
54
+ or completion date is also null when its source evidence is missing. Do not
55
+ replace completion dates with the last time the user accessed the title.
56
+
57
+ For Services, `GET /me/capabilities.services` is the opening flag. It uses the
58
+ same current household, tenant, validity window and HTTPS URL filter as
59
+ `GET /me/services`; it does not depend on a `service` catalogue category.
60
+ Service descriptions are plain text. `family`, `accessMode`, `integrationKey`
61
+ and branding fields remain null until configured. Deduplicate by a known
62
+ `integrationKey` such as `profexpress`, never by the displayed title.
63
+
64
+ Pack, partner and service cards share nullable `color`, `tint`, `logoUrl` and
65
+ `wordmarkUrl`. `universePalette` is ordered by display position, not universe
66
+ identity; an empty array selects the frontend's normal palette.
@@ -0,0 +1,131 @@
1
+ # Frontend request follow-up
2
+
3
+ Use a SDK generated from the same release as the backend. These operations are
4
+ in the local patch until the normal release is published; creating test data
5
+ in staging does not publish an API change.
6
+
7
+ ## Search and library
8
+
9
+ `GET /search/suggestions?q=&limit=6` supplies popular queries. An empty `q`
10
+ returns the resting suggestions. `/search` and `/biblio/search` also return
11
+ `suggestions[]`. Queries are successful searches by at least five distinct
12
+ households in the past seven days, not another user's recent-search history.
13
+ Rare query text is never stored in plaintext. Results are checked against live
14
+ catalogue permissions; an index or Redis outage produces an empty suggestion
15
+ list. Prefix suggestions may be omitted when no accessible match is found in
16
+ the bounded probe window. Support impersonation and selected household profiles
17
+ do not add popularity votes.
18
+
19
+ Library/history cards now include known publisher, subtype, category, page count,
20
+ duration, lesson count, position and completion evidence. Unknowns stay null.
21
+ For non-native Biblio content that the profile has already opened, use
22
+ `PUT /biblio/me/progress/{content_id}` with `progress`, and optionally the paired
23
+ `position`/`unit` (`page` or `second`). This does not spend a credit. Native
24
+ courses must use the `/learning` progress operations; their assessment and
25
+ certificate rules cannot be bypassed with a percentage report. Imported 100%
26
+ progress with no completion date remains undated on a repeated 100% report.
27
+
28
+ See [COURSES.md](COURSES.md) for native reading and monthly course rankings.
29
+
30
+ ## Customer administrators
31
+
32
+ The supported roles remain principal, manager and read-only. An optional site
33
+ limits a manager/read-only grant to one library in its organization; it does not
34
+ grant access to other sites. `PATCH /admin/organisation/admins/{user_id}` changes
35
+ role/site; demoting the last active principal returns 409. Invitations accept
36
+ the same site selector. No broad “editor” alias silently grants manager powers.
37
+
38
+ - `PATCH /admin/me/organisation`: customer-facing name/logo URL, principal only.
39
+ The internal tenant name is retained. `POST /admin/me/organisation/logo` uploads
40
+ a bounded PNG/JPEG/WebP to Mozaik storage; re-encoding removes embedded metadata.
41
+ Existing hosted HTTPS SVG logos can be configured by URL.
42
+ - `GET/PATCH /admin/me/organisation/contacts`: principal/billing/delivery contacts.
43
+ A change creates an account-manager ticket notification; no internal customer
44
+ record is silently overwritten.
45
+ - `GET /admin/me/organisation/audit` and `/audit/export`: principal-only actions
46
+ in the recent twelve-month window. The CSV excludes internal details and
47
+ protects text cells from formula interpretation.
48
+
49
+ Beneficiary directory filters are `q`, `status`, `site`, `invitedBefore`, `page`
50
+ and `limit`. Statuses are active, pending, invited, bounced and disabled. Invited
51
+ requires acknowledged delivery; bounced requires delivery evidence. A missing
52
+ login or a legacy integer email flag is insufficient. Overview counters use the
53
+ same status projection. Site selectors only narrow the caller's scope.
54
+
55
+ `PATCH /admin/me/beneficiaries/{id}` changes organisation access, employee ID,
56
+ access end or an allowed elected pack. Suspension keeps the shared identity and
57
+ personal purchases intact. Globally disabled identities require Mozaik staff.
58
+ The response distinguishes `updated` from `review_required`: changing the primary
59
+ site requires identity/SSO reconciliation and creates an account-manager request;
60
+ it does not pretend the person has already moved. Established login emails
61
+ cannot be rewritten by customer administrators.
62
+
63
+ Use `POST .../{id}/approve`, `POST .../invitations`, and
64
+ `POST .../{id}/invitations/resend` for their named actions.
65
+ `DELETE .../{id}/invitations` revokes a pending invitation.
66
+ `POST .../{id}/invitations/correct` with a new email replaces an unused native
67
+ invitation without transferring the old account or private history.
68
+ Invitation acceptance is bound to the broker-verified identity and expires in
69
+ seven days; this is not a household-profile invitation. For Keycloak action
70
+ callbacks without an authorization code, call `auth.resumeRequiredAction(url)`
71
+ before `completeSso` and follow the fresh PKCE authorization URL it returns.
72
+
73
+ `POST .../bulk` accepts at most 100 IDs and approve/disable/reactivate/
74
+ remove_invited/resend. Access changes are atomic; resends are queued and report
75
+ `deliveryQueued=true`. Delivery does not imply that the recipient opened the
76
+ message. Cleanup applies only to invitations unused for more than six months;
77
+ it removes organization access, not the global account.
78
+
79
+ ## Imports, exports and registration codes
80
+
81
+ Preview JSON rows with `POST /admin/me/beneficiaries/imports/preview`, or upload
82
+ UTF-8 CSV/values-only XLSX to `/imports/files` (20 MiB, 100,000 rows maximum).
83
+ Columns: email, firstName, lastName, employeeId, accessEnd, electedPack, site.
84
+ French header equivalents are accepted. Civil access-end dates are interpreted
85
+ as end-of-day in Europe/Paris. Formula-bearing spreadsheets are rejected.
86
+
87
+ The default mode is `upsert`. `replace` additionally records the exact missing
88
+ membership IDs that the preview proposes to disable. It never deletes accounts
89
+ or includes later newcomers in those removals. Inspect counts/errors, then
90
+ `POST /imports/{id}/apply`. Poll `GET /imports/{id}`; the history is `/imports`.
91
+ Jobs apply 100 records per atomic batch and recheck the author's current role.
92
+ A failed batch rolls back and can be retried after reconciliation through
93
+ `POST /imports/{id}/retry`; already committed batches are retained. Imports do
94
+ not send invitations or provision provider accounts. Temporary source payloads
95
+ are cleared after completion or preview expiry; reports retain counts.
96
+
97
+ `GET /admin/me/beneficiaries/export` returns an audited XLSX, at most 100,000
98
+ rows. IDs and text are explicit spreadsheet strings to preserve long identifiers
99
+ and avoid formula execution.
100
+
101
+ Registration codes have their own quota; consumption units are not registration
102
+ stock. Read `/admin/me/activation-code`, rotate with
103
+ `POST /admin/me/activation-code/renew`, and update allowed domains with
104
+ `PUT /admin/me/beneficiaries/allowed-email-domains`. Rotation preserves quota,
105
+ used count and expiry. Only Mozaik staff can configure/increase the quota or
106
+ extend validity. `POST /me/activation-codes/redeem` requires verified own sign-in;
107
+ a person counts once, and a revoked membership cannot self-reactivate.
108
+ Cross-organization identity matches require reconciliation rather than a duplicate.
109
+
110
+ ## Profile, help and service cards
111
+
112
+ `GET /me/security` supplies the Keycloak account link and known password/MFA facts;
113
+ `GET /me/logins` supplies up to ten native logins; `POST /me/password-reset` asks
114
+ Keycloak to send a 15-minute action link. These require an own-account session.
115
+ Password handling remains in Keycloak. Configured MFA is not a claim that every
116
+ login enforces MFA. City stays null without reliable location evidence; raw IPs
117
+ are not sent to a geolocation service. The email-code/trusted-device policy from
118
+ the mock is not implemented and is explicitly reported as such.
119
+
120
+ `GET /admin/me/contacts`, `/admin/help/tutorials`, and `GET/POST /admin/me/requests`
121
+ provide the help page. Requests use the existing ticket ledger and are visible
122
+ to their creator; staff triage uses `/admin/customer-requests`. Internal ticket
123
+ notes never appear. Contact/tutorial data is configured through
124
+ `PUT /admin/tenants/{id}/customer-help`; missing data is not replaced by fictional
125
+ contacts or videos. `accountManager.bookingUrl` is available when configured.
126
+
127
+ Native phone service cards expose `accessUrl` and `canOpen`. POST the access URL
128
+ only when the user chooses the service. Listings never reveal provider customer
129
+ codes; those come from a separately reviewed encrypted binding. An absent binding
130
+ means unavailable access, not permission to reuse another production customer's
131
+ identifier. Merely viewing phone details is not logged as an actual consultation.
package/README.md CHANGED
@@ -126,28 +126,29 @@ articles or trending topics that the upstream catalogue does not contain.
126
126
 
127
127
  ## YouScribe: activate only when the reader is opened
128
128
 
129
- `GET /me/capabilities` reports `partners[].authUrl`, `authMethod: "POST"` and
130
- `provisioningConfigured`. Before first use, `readingAllowed` remains false with
131
- `reason: "license_required"`; a configured activation can be requested when the
132
- eligible adult explicitly opens the reader.
133
-
134
- - `POST /biblio/me/youscribe/license` takes the seat. Call it on the patron's
135
- Read click and nowhere else — not on entering the books section, prefetch,
136
- bootstrap or onboarding: a seat is a paid subscription. It is idempotent and
137
- the only call that allocates one, and it answers `409` with counters when the
138
- household's four are taken. `DELETE` on the same path gives a seat back.
139
- - `GET /partners/youscribe/user/auth` returns `{licenseNumber, token}` for the
140
- native SDK. It requires an existing seat and never creates one. There is no
141
- per-title variant: a YouScribe token is issued per patron, not per title.
142
- - For the hosted (web) reader, read `reader.url` from
143
- `GET /partners/youscribe/media/{mediaId}`. A `null` url carries
144
- `unavailable: "forbidden"` (allowed to browse, not to read) or
145
- `"unreachable"` (our side failed) — they are different answers.
146
-
147
- Call the generated `createYouscribeLicense` function, or invoke its TanStack
148
- **mutation**, from the reader-opening event. `openNativeAuth` and
149
- `openNativeReader` still work as in 0.13.0 but are deprecated. Never invoke
150
- any of them on mount,
129
+ `GET /me/capabilities` reports `partners[].readerModes`, `embeddedReader`, `provisioningConfigured`
130
+ and, deprecated, `authUrl`/`authMethod: "GET"`. Before first use, `readingAllowed`
131
+ is true with `hasLicense: false`: the Read click will take a seat.
132
+
133
+ - `POST /partners/{provider}/media/{mediaId}/reader-access/{mode}`
134
+ (`openUrlTemplate`; `embedded` or `external`, from `readerModes`) takes the seat if
135
+ the profile holds none, opens the title and records the opening. Call it on
136
+ the patron's Read click and nowhere else — not on entering the books section,
137
+ prefetch, bootstrap or onboarding: a seat is a paid subscription. `409` with
138
+ counters means the household's four are taken. It answers `{lease, open}`:
139
+ switch on `open.kind`, never on the partner — `external` is a page to send the
140
+ patron to, `embedded` what the reader named by `open.reader` needs (the SDK's
141
+ credentials for YouScribe). Keep the lease alive with
142
+ `PUT /consumption/{eventId}` and close it with `DELETE`. The media sheet's
143
+ `reader` object carries the right to read, never an address.
144
+ - `GET /partners/youscribe/user/auth` is deprecated: `reader-access/embedded`
145
+ answers the same credentials and records the opening.
146
+
147
+ Call the generated `openReaderAccess` function, or invoke its TanStack
148
+ **mutation**, from the reader-opening event. `createYouscribeLicense` takes a
149
+ seat on its own and is not needed to open a title.
150
+ `openNativeAuth` and `openNativeReader` still work as in 0.13.0 but are
151
+ deprecated. Never invoke any of them on mount,
151
152
  prefetch, login, onboarding, catalogue navigation, or for every household profile.
152
153
  One activated profile keeps the same provider identity across retries and releases;
153
154
  staging and production use different identities. No token should be persisted.
@@ -575,6 +576,8 @@ credentials or backend implementation code.
575
576
 
576
577
  The published package includes [cinema browsing, quotes and playback](CVS-PLAYBACK.md),
577
578
  [press articles, topics and publisher codes](PRESS.md),
578
- [customer administrator sign-in and permissions](CUSTOMER-ADMIN.md), and
579
+ [customer administrator sign-in and permissions](CUSTOMER-ADMIN.md),
580
+ [native courses and Services](COURSES.md),
581
+ [frontend workflow follow-up](FRONTEND-REQUESTS.md), and
579
582
  [TV pairing](TV-LOGIN.md). Use the guide and generated operations from the same
580
583
  published release; an uncommitted local guide does not establish staging availability.
@@ -1,5 +1,5 @@
1
1
 
2
- import { Il as FrontendCapabilitiesRead, Q as ServiceListRead, si as OnboardingRead, x_ as AccountDetailRead, y_ as AccountUpdateWrite } from "../chunks/index.js";
2
+ import { Ai as OnboardingRead, Sh as CustomerActivationRedeemRead, Ui as LoginListRead, ay as AccountUpdateWrite, cy as AccountDetailRead, nt as ServiceListRead, ot as ServiceAccessRead, oy as AccountSecurityRead, ua as ListOwnLoginsParams, vu as FrontendCapabilitiesRead, xh as CustomerActivationRedeemWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/account/account.d.ts
5
5
  export declare const getDeleteAccountUrl: () => string;
@@ -39,6 +39,12 @@ export declare const getUpdateAccountUrl: () => string;
39
39
  * @summary Update Account
40
40
  */
41
41
  export declare const updateAccount: (accountUpdateWrite: AccountUpdateWrite, options?: Parameters<typeof request>[1]) => Promise<AccountDetailRead>;
42
+ export declare const getRedeemCustomerActivationUrl: () => string;
43
+ /**
44
+ * Verified own sign-in plus a valid code. One registration per person; revoked memberships cannot self-reactivate.
45
+ * @summary Redeem Customer Activation
46
+ */
47
+ export declare const redeemCustomerActivation: (customerActivationRedeemWrite: CustomerActivationRedeemWrite, options?: Parameters<typeof request>[1]) => Promise<CustomerActivationRedeemRead>;
42
48
  export declare const getReadCapabilitiesUrl: () => string;
43
49
  /**
44
50
  * Current profile's universes, provider access and navigation paths.
@@ -49,6 +55,12 @@ export declare const getReadCapabilitiesUrl: () => string;
49
55
  * @summary Read Capabilities
50
56
  */
51
57
  export declare const readCapabilities: (options?: Parameters<typeof request>[1]) => Promise<FrontendCapabilitiesRead>;
58
+ export declare const getListOwnLoginsUrl: (params?: ListOwnLoginsParams) => string;
59
+ /**
60
+ * Last native sign-ins of this account. Refreshes, raw IPs and another profile's history are excluded.
61
+ * @summary List Own Logins
62
+ */
63
+ export declare const listOwnLogins: (params?: ListOwnLoginsParams, options?: Parameters<typeof request>[1]) => Promise<LoginListRead>;
52
64
  export declare const getReadOnboardingUrl: () => string;
53
65
  /**
54
66
  * State for optional profile setup, with existing write-resource paths.
@@ -62,6 +74,18 @@ export declare const getReadOnboardingUrl: () => string;
62
74
  * @summary Read Onboarding
63
75
  */
64
76
  export declare const readOnboarding: (options?: Parameters<typeof request>[1]) => Promise<OnboardingRead>;
77
+ export declare const getResetOwnPasswordUrl: () => string;
78
+ /**
79
+ * Ask Keycloak to email a single-use, 15-minute password action for the caller only.
80
+ * @summary Reset Own Password
81
+ */
82
+ export declare const resetOwnPassword: (options?: Parameters<typeof request>[1]) => Promise<void>;
83
+ export declare const getReadAccountSecurityUrl: () => string;
84
+ /**
85
+ * Keycloak security facts on demand. Unknown facts are null; configured MFA does not mean enforced MFA.
86
+ * @summary Read Account Security
87
+ */
88
+ export declare const readAccountSecurity: (options?: Parameters<typeof request>[1]) => Promise<AccountSecurityRead>;
65
89
  export declare const getListServicesUrl: () => string;
66
90
  /**
67
91
  * Third-party services this account's establishment offers (E27).
@@ -78,5 +102,11 @@ export declare const getListServicesUrl: () => string;
78
102
  * @summary List Services
79
103
  */
80
104
  export declare const listServices: (options?: Parameters<typeof request>[1]) => Promise<ServiceListRead>;
105
+ export declare const getOpenServiceUrl: (serviceId: number) => string;
106
+ /**
107
+ * Return service contact/access details after local eligibility checks. This is not evidence of an actual phone consultation and does not manufacture a billable consumption event.
108
+ * @summary Open Service
109
+ */
110
+ export declare const openService: (serviceId: number, options?: Parameters<typeof request>[1]) => Promise<ServiceAccessRead>;
81
111
  //#endregion
82
112
  //# sourceMappingURL=account.d.ts.map
@@ -72,6 +72,32 @@ const updateAccount = async (accountUpdateWrite, options) => {
72
72
  body: JSON.stringify(accountUpdateWrite)
73
73
  });
74
74
  };
75
+ const getRedeemCustomerActivationUrl = () => {
76
+ return `/me/activation-codes/redeem`;
77
+ };
78
+ /**
79
+ * Verified own sign-in plus a valid code. One registration per person; revoked memberships cannot self-reactivate.
80
+ * @summary Redeem Customer Activation
81
+ */
82
+ const redeemCustomerActivation = async (customerActivationRedeemWrite, options) => {
83
+ const getHeaders = (h) => {
84
+ if (!h) return {};
85
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
86
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
87
+ const headers = {};
88
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
89
+ return headers;
90
+ };
91
+ return request(getRedeemCustomerActivationUrl(), {
92
+ ...options,
93
+ method: "POST",
94
+ headers: {
95
+ "Content-Type": "application/json",
96
+ ...getHeaders(options?.headers)
97
+ },
98
+ body: JSON.stringify(customerActivationRedeemWrite)
99
+ });
100
+ };
75
101
  const getReadCapabilitiesUrl = () => {
76
102
  return `/me/capabilities`;
77
103
  };
@@ -89,6 +115,24 @@ const readCapabilities = async (options) => {
89
115
  method: "GET"
90
116
  });
91
117
  };
118
+ const getListOwnLoginsUrl = (params) => {
119
+ const normalizedParams = new URLSearchParams();
120
+ Object.entries(params || {}).forEach(([key, value]) => {
121
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
122
+ });
123
+ const stringifiedParams = normalizedParams.toString();
124
+ return stringifiedParams.length > 0 ? `/me/logins?${stringifiedParams}` : `/me/logins`;
125
+ };
126
+ /**
127
+ * Last native sign-ins of this account. Refreshes, raw IPs and another profile's history are excluded.
128
+ * @summary List Own Logins
129
+ */
130
+ const listOwnLogins = async (params, options) => {
131
+ return request(getListOwnLoginsUrl(params), {
132
+ ...options,
133
+ method: "GET"
134
+ });
135
+ };
92
136
  const getReadOnboardingUrl = () => {
93
137
  return `/me/onboarding`;
94
138
  };
@@ -109,6 +153,32 @@ const readOnboarding = async (options) => {
109
153
  method: "GET"
110
154
  });
111
155
  };
156
+ const getResetOwnPasswordUrl = () => {
157
+ return `/me/password-reset`;
158
+ };
159
+ /**
160
+ * Ask Keycloak to email a single-use, 15-minute password action for the caller only.
161
+ * @summary Reset Own Password
162
+ */
163
+ const resetOwnPassword = async (options) => {
164
+ return request(getResetOwnPasswordUrl(), {
165
+ ...options,
166
+ method: "POST"
167
+ });
168
+ };
169
+ const getReadAccountSecurityUrl = () => {
170
+ return `/me/security`;
171
+ };
172
+ /**
173
+ * Keycloak security facts on demand. Unknown facts are null; configured MFA does not mean enforced MFA.
174
+ * @summary Read Account Security
175
+ */
176
+ const readAccountSecurity = async (options) => {
177
+ return request(getReadAccountSecurityUrl(), {
178
+ ...options,
179
+ method: "GET"
180
+ });
181
+ };
112
182
  const getListServicesUrl = () => {
113
183
  return `/me/services`;
114
184
  };
@@ -132,7 +202,20 @@ const listServices = async (options) => {
132
202
  method: "GET"
133
203
  });
134
204
  };
205
+ const getOpenServiceUrl = (serviceId) => {
206
+ return `/me/services/${serviceId}/access`;
207
+ };
208
+ /**
209
+ * Return service contact/access details after local eligibility checks. This is not evidence of an actual phone consultation and does not manufacture a billable consumption event.
210
+ * @summary Open Service
211
+ */
212
+ const openService = async (serviceId, options) => {
213
+ return request(getOpenServiceUrl(serviceId), {
214
+ ...options,
215
+ method: "POST"
216
+ });
217
+ };
135
218
  //#endregion
136
- export { deleteAccount, getDeleteAccountUrl, getListServicesUrl, getReadAccountUrl, getReadCapabilitiesUrl, getReadOnboardingUrl, getUpdateAccountUrl, listServices, readAccount, readCapabilities, readOnboarding, updateAccount };
219
+ export { deleteAccount, getDeleteAccountUrl, getListOwnLoginsUrl, getListServicesUrl, getOpenServiceUrl, getReadAccountSecurityUrl, getReadAccountUrl, getReadCapabilitiesUrl, getReadOnboardingUrl, getRedeemCustomerActivationUrl, getResetOwnPasswordUrl, getUpdateAccountUrl, listOwnLogins, listServices, openService, readAccount, readAccountSecurity, readCapabilities, readOnboarding, redeemCustomerActivation, resetOwnPassword, updateAccount };
137
220
 
138
221
  //# sourceMappingURL=account.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account.js","names":[],"sources":["../../src/api/account/account.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.15.0\n */\nimport type {\n AccountDetailRead,\n AccountUpdateWrite,\n FrontendCapabilitiesRead,\n OnboardingRead,\n ServiceListRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getDeleteAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * Erase this authenticated identity while retaining its historical rows.\n *\n * Other independently authenticated household members are never erased by\n * this operation. The holder must first remove active/pending memberships;\n * an adult who is a child's final guardian must assign another guardian first.\n * All household writes take the same beneficiary lock, including invitations.\n * @summary Delete Account\n */\nexport const deleteAccount = async ( options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteAccountUrl(),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * The authenticated account (E15).\n *\n * No query, no join: ``CurrentUserDep`` has already resolved the row behind the\n * token. The endpoint the legacy should have had here has been returning ``500``\n * on every request for as long as anyone has looked (defect D1).\n *\n * ``isNameEditable`` exists so a client need not discover the answer by being\n * refused. A member signing in through their establishment cannot change their\n * own name here — the realm rewrites it at every login — and until now the\n * only way to find that out was to type one and receive a ``403``. The field\n * says it before the form is drawn.\n * @summary Read Account\n */\nexport const readAccount = async ( options?: Parameters<typeof request>[1]): Promise<AccountDetailRead> => {\n\n return request<AccountDetailRead>(getReadAccountUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdateAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * Partially update the account (E16).\n *\n * ``exclude_unset`` is what separates PATCH from PUT here: a field the client\n * omitted is left alone, which is not the same as a field it sent as null. The\n * response is built from the persisted row rather than the submitted body.\n * @summary Update Account\n */\nexport const updateAccount = async (accountUpdateWrite: AccountUpdateWrite, options?: Parameters<typeof request>[1]): Promise<AccountDetailRead> => {\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<AccountDetailRead>(getUpdateAccountUrl(),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(accountUpdateWrite)\n }\n);}\n\n\nexport const getReadCapabilitiesUrl = () => {\n\n\n\n\n return `/me/capabilities`\n}\n\n/**\n * Current profile's universes, provider access and navigation paths.\n *\n * Does not allocate a licence or contact a provider. ``readingAllowed`` is a\n * local permission snapshot; configuration and upstream health are separate.\n * The reader always authorizes again when opening a title.\n * @summary Read Capabilities\n */\nexport const readCapabilities = async ( options?: Parameters<typeof request>[1]): Promise<FrontendCapabilitiesRead> => {\n\n return request<FrontendCapabilitiesRead>(getReadCapabilitiesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReadOnboardingUrl = () => {\n\n\n\n\n return `/me/onboarding`\n}\n\n/**\n * State for optional profile setup, with existing write-resource paths.\n *\n * The signed-in adult updates their own fields using PATCH /me. A guardian\n * manages a child through /me/profiles. Category selections use\n * PUT /biblio/me/preferences/categories in the effective profile context.\n * Press-title choices use pressTitlesUrl and pressFavoritesUrl; they are the\n * profile's press_title favourites, not additional catalogue categories.\n * No terms acceptance or mandatory onboarding completion is invented here.\n * @summary Read Onboarding\n */\nexport const readOnboarding = async ( options?: Parameters<typeof request>[1]): Promise<OnboardingRead> => {\n\n return request<OnboardingRead>(getReadOnboardingUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListServicesUrl = () => {\n\n\n\n\n return `/me/services`\n}\n\n/**\n * Third-party services this account's establishment offers (E27).\n *\n * Under ``/me`` rather than ``/biblio/me`` because it is not a catalogue: these\n * are the establishment's own service tiles, and they belong to the tenant\n * whichever catalogue that tenant reads from. It is also the one place the\n * biblio spec describes something the *CVS* schema models, which is why it sat\n * in the wrong module until the prefixes made the mismatch visible.\n *\n * Date-windowed. A service outside its window is absent rather than disabled:\n * the client should not have to know the difference, and a visible dead link is\n * worse than no link.\n * @summary List Services\n */\nexport const listServices = async ( options?: Parameters<typeof request>[1]): Promise<ServiceListRead> => {\n\n return request<ServiceListRead>(getListServicesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAiBA,MAAa,4BAA4B;CAKvC,OAAO;AACT;;;;;;;;;;AAWA,MAAa,gBAAgB,OAAQ,YAA2D;CAE9F,OAAO,QAAc,oBAAoB,GACzC;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,0BAA0B;CAKrC,OAAO;AACT;;;;;;;;;;;;;;;AAgBA,MAAa,cAAc,OAAQ,YAAwE;CAEzG,OAAO,QAA2B,kBAAkB,GACpD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,4BAA4B;CAKvC,OAAO;AACT;;;;;;;;;AAUA,MAAa,gBAAgB,OAAO,oBAAwC,YAAwE;CAEhJ,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,QAA2B,oBAAoB,GACpD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,kBAAkB;CACzC,CACF;AAAE;AAGF,MAAa,+BAA+B;CAK1C,OAAO;AACT;;;;;;;;;AAUA,MAAa,mBAAmB,OAAQ,YAA+E;CAErH,OAAO,QAAkC,uBAAuB,GAChE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,6BAA6B;CAKxC,OAAO;AACT;;;;;;;;;;;;AAaA,MAAa,iBAAiB,OAAQ,YAAqE;CAEzG,OAAO,QAAwB,qBAAqB,GACpD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,2BAA2B;CAKtC,OAAO;AACT;;;;;;;;;;;;;;;AAgBA,MAAa,eAAe,OAAQ,YAAsE;CAExG,OAAO,QAAyB,mBAAmB,GACnD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"account.js","names":[],"sources":["../../src/api/account/account.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.17.0\n */\nimport type {\n AccountDetailRead,\n AccountSecurityRead,\n AccountUpdateWrite,\n CustomerActivationRedeemRead,\n CustomerActivationRedeemWrite,\n FrontendCapabilitiesRead,\n ListOwnLoginsParams,\n LoginListRead,\n OnboardingRead,\n ServiceAccessRead,\n ServiceListRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getDeleteAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * Erase this authenticated identity while retaining its historical rows.\n *\n * Other independently authenticated household members are never erased by\n * this operation. The holder must first remove active/pending memberships;\n * an adult who is a child's final guardian must assign another guardian first.\n * All household writes take the same beneficiary lock, including invitations.\n * @summary Delete Account\n */\nexport const deleteAccount = async ( options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteAccountUrl(),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * The authenticated account (E15).\n *\n * No query, no join: ``CurrentUserDep`` has already resolved the row behind the\n * token. The endpoint the legacy should have had here has been returning ``500``\n * on every request for as long as anyone has looked (defect D1).\n *\n * ``isNameEditable`` exists so a client need not discover the answer by being\n * refused. A member signing in through their establishment cannot change their\n * own name here — the realm rewrites it at every login — and until now the\n * only way to find that out was to type one and receive a ``403``. The field\n * says it before the form is drawn.\n * @summary Read Account\n */\nexport const readAccount = async ( options?: Parameters<typeof request>[1]): Promise<AccountDetailRead> => {\n\n return request<AccountDetailRead>(getReadAccountUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdateAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * Partially update the account (E16).\n *\n * ``exclude_unset`` is what separates PATCH from PUT here: a field the client\n * omitted is left alone, which is not the same as a field it sent as null. The\n * response is built from the persisted row rather than the submitted body.\n * @summary Update Account\n */\nexport const updateAccount = async (accountUpdateWrite: AccountUpdateWrite, options?: Parameters<typeof request>[1]): Promise<AccountDetailRead> => {\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<AccountDetailRead>(getUpdateAccountUrl(),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(accountUpdateWrite)\n }\n);}\n\n\nexport const getRedeemCustomerActivationUrl = () => {\n\n\n\n\n return `/me/activation-codes/redeem`\n}\n\n/**\n * Verified own sign-in plus a valid code. One registration per person; revoked memberships cannot self-reactivate.\n * @summary Redeem Customer Activation\n */\nexport const redeemCustomerActivation = async (customerActivationRedeemWrite: CustomerActivationRedeemWrite, options?: Parameters<typeof request>[1]): Promise<CustomerActivationRedeemRead> => {\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<CustomerActivationRedeemRead>(getRedeemCustomerActivationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(customerActivationRedeemWrite)\n }\n);}\n\n\nexport const getReadCapabilitiesUrl = () => {\n\n\n\n\n return `/me/capabilities`\n}\n\n/**\n * Current profile's universes, provider access and navigation paths.\n *\n * Does not allocate a licence or contact a provider. ``readingAllowed`` is a\n * local permission snapshot; configuration and upstream health are separate.\n * The reader always authorizes again when opening a title.\n * @summary Read Capabilities\n */\nexport const readCapabilities = async ( options?: Parameters<typeof request>[1]): Promise<FrontendCapabilitiesRead> => {\n\n return request<FrontendCapabilitiesRead>(getReadCapabilitiesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListOwnLoginsUrl = (params?: ListOwnLoginsParams,) => {\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 ? `/me/logins?${stringifiedParams}` : `/me/logins`\n}\n\n/**\n * Last native sign-ins of this account. Refreshes, raw IPs and another profile's history are excluded.\n * @summary List Own Logins\n */\nexport const listOwnLogins = async (params?: ListOwnLoginsParams, options?: Parameters<typeof request>[1]): Promise<LoginListRead> => {\n\n return request<LoginListRead>(getListOwnLoginsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReadOnboardingUrl = () => {\n\n\n\n\n return `/me/onboarding`\n}\n\n/**\n * State for optional profile setup, with existing write-resource paths.\n *\n * The signed-in adult updates their own fields using PATCH /me. A guardian\n * manages a child through /me/profiles. Category selections use\n * PUT /biblio/me/preferences/categories in the effective profile context.\n * Press-title choices use pressTitlesUrl and pressFavoritesUrl; they are the\n * profile's press_title favourites, not additional catalogue categories.\n * No terms acceptance or mandatory onboarding completion is invented here.\n * @summary Read Onboarding\n */\nexport const readOnboarding = async ( options?: Parameters<typeof request>[1]): Promise<OnboardingRead> => {\n\n return request<OnboardingRead>(getReadOnboardingUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getResetOwnPasswordUrl = () => {\n\n\n\n\n return `/me/password-reset`\n}\n\n/**\n * Ask Keycloak to email a single-use, 15-minute password action for the caller only.\n * @summary Reset Own Password\n */\nexport const resetOwnPassword = async ( options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getResetOwnPasswordUrl(),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getReadAccountSecurityUrl = () => {\n\n\n\n\n return `/me/security`\n}\n\n/**\n * Keycloak security facts on demand. Unknown facts are null; configured MFA does not mean enforced MFA.\n * @summary Read Account Security\n */\nexport const readAccountSecurity = async ( options?: Parameters<typeof request>[1]): Promise<AccountSecurityRead> => {\n\n return request<AccountSecurityRead>(getReadAccountSecurityUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListServicesUrl = () => {\n\n\n\n\n return `/me/services`\n}\n\n/**\n * Third-party services this account's establishment offers (E27).\n *\n * Under ``/me`` rather than ``/biblio/me`` because it is not a catalogue: these\n * are the establishment's own service tiles, and they belong to the tenant\n * whichever catalogue that tenant reads from. It is also the one place the\n * biblio spec describes something the *CVS* schema models, which is why it sat\n * in the wrong module until the prefixes made the mismatch visible.\n *\n * Date-windowed. A service outside its window is absent rather than disabled:\n * the client should not have to know the difference, and a visible dead link is\n * worse than no link.\n * @summary List Services\n */\nexport const listServices = async ( options?: Parameters<typeof request>[1]): Promise<ServiceListRead> => {\n\n return request<ServiceListRead>(getListServicesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getOpenServiceUrl = (serviceId: number,) => {\n\n\n\n\n return `/me/services/${serviceId}/access`\n}\n\n/**\n * Return service contact/access details after local eligibility checks. This is not evidence of an actual phone consultation and does not manufacture a billable consumption event.\n * @summary Open Service\n */\nexport const openService = async (serviceId: number, options?: Parameters<typeof request>[1]): Promise<ServiceAccessRead> => {\n\n return request<ServiceAccessRead>(getOpenServiceUrl(serviceId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { $n as PressRefreshWrite, A as ThemeWrite, En as PressVoucherOfferWrite, Fn as PressVoucherDisableWrite, In as PressVoucherCodesWrite, Ln as PressVoucherActivationReportWrite, M as ThemeListRead, N as ThemeRead, On as PressVoucherOfferRead, Pn as PressVoucherImportRead, Si as ListThemesParams, Sn as PressVoucherUsageRead, Tn as PressVoucherPoolRead, Zn as PressRegionsWrite, er as PressRefreshRead, gr as PressArticleMetadataWrite, j as ThemeOrderWrite, ji as ListPressArticleRefreshesParams, kl as PressRegionRead, ur as PressDiscoveryJobRead, wn as PressVoucherPoolWrite } from "../chunks/index.js";
2
+ import { $n as PressVoucherActivationReportWrite, Bn as PressVoucherPoolWrite, Er as PressDiscoveryJobRead, Hn as PressVoucherOfferWrite, M as ThemeOrderWrite, Mr as PressArticleMetadataWrite, N as ThemeListRead, P as ThemeRead, Qn as PressVoucherCodesWrite, Rn as PressVoucherUsageRead, Vn as PressVoucherPoolRead, Wn as PressVoucherOfferRead, Xn as PressVoucherImportRead, Yi as ListThemesParams, Zn as PressVoucherDisableWrite, aa as ListPressArticleRefreshesParams, gr as PressRefreshRead, hr as PressRefreshWrite, j as ThemeWrite, pr as PressRegionsWrite, uu as PressRegionRead } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/admin-catalogue/admin-catalogue.d.ts
5
5
  export declare const getListPressArticleRefreshesUrl: (params?: ListPressArticleRefreshesParams) => string;