@learnorama/mozaik-sdk 0.17.1-staging.57.1 → 0.17.2-staging.58.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 (289) hide show
  1. package/CVS-PLAYBACK.md +84 -124
  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 +1 -1
  13. package/dist/api/admin-desk.js.map +1 -1
  14. package/dist/api/admin-licenses.d.ts +1 -1
  15. package/dist/api/admin-licenses.js.map +1 -1
  16. package/dist/api/admin-partner-selections.d.ts +1 -1
  17. package/dist/api/admin-partner-selections.js.map +1 -1
  18. package/dist/api/admin-patrons.d.ts +1 -1
  19. package/dist/api/admin-patrons.js.map +1 -1
  20. package/dist/api/admin-reviews.d.ts +1 -1
  21. package/dist/api/admin-reviews.js.map +1 -1
  22. package/dist/api/admin-roles.d.ts +1 -1
  23. package/dist/api/admin-roles.js.map +1 -1
  24. package/dist/api/admin-support.d.ts +1 -1
  25. package/dist/api/admin-support.js.map +1 -1
  26. package/dist/api/admin-tenants.d.ts +1 -1
  27. package/dist/api/admin-tenants.js.map +1 -1
  28. package/dist/api/admin-tutoring.d.ts +1 -1
  29. package/dist/api/admin-tutoring.js.map +1 -1
  30. package/dist/api/admin-vod.d.ts +86 -0
  31. package/dist/api/admin-vod.js +194 -0
  32. package/dist/api/admin-vod.js.map +1 -0
  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 +36 -1
  85. package/dist/api/cvs-payments.js +43 -1
  86. package/dist/api/cvs-payments.js.map +1 -1
  87. package/dist/api/cvs-streaming.d.ts +23 -32
  88. package/dist/api/cvs-streaming.js +43 -32
  89. package/dist/api/cvs-streaming.js.map +1 -1
  90. package/dist/api/index.d.ts +4 -3
  91. package/dist/api/index.js +4 -3
  92. package/dist/api/partner-catalogue.d.ts +1 -1
  93. package/dist/api/partner-catalogue.js.map +1 -1
  94. package/dist/api/partner-reader-nextory.d.ts +1 -1
  95. package/dist/api/partner-reader-nextory.js.map +1 -1
  96. package/dist/api/partner-reader-youscribe.d.ts +1 -1
  97. package/dist/api/partner-reader-youscribe.js.map +1 -1
  98. package/dist/api/partner-reading.d.ts +1 -1
  99. package/dist/api/partner-reading.js.map +1 -1
  100. package/dist/api/profiles.d.ts +1 -1
  101. package/dist/api/profiles.js.map +1 -1
  102. package/dist/api/search.d.ts +1 -1
  103. package/dist/api/search.js.map +1 -1
  104. package/dist/api/tutoring-catalogue.d.ts +1 -1
  105. package/dist/api/tutoring-catalogue.js.map +1 -1
  106. package/dist/api/tutoring-chat.d.ts +1 -1
  107. package/dist/api/tutoring-chat.js.map +1 -1
  108. package/dist/api/tutoring-dispatch.d.ts +1 -1
  109. package/dist/api/tutoring-dispatch.js.map +1 -1
  110. package/dist/api/tutoring-practitioner.d.ts +1 -1
  111. package/dist/api/tutoring-practitioner.js.map +1 -1
  112. package/dist/api/tutoring-requests.d.ts +1 -1
  113. package/dist/api/tutoring-requests.js.map +1 -1
  114. package/dist/auth.d.ts +1 -1
  115. package/dist/chunks/client2.d.ts +1 -1
  116. package/dist/chunks/connection.d.ts +1 -1
  117. package/dist/chunks/index.d.ts +908 -574
  118. package/dist/index.d.ts +3 -3
  119. package/dist/index.js +3 -3
  120. package/dist/index.js.map +1 -1
  121. package/dist/models.d.ts +2 -2
  122. package/dist/models.js +34 -2
  123. package/dist/models.js.map +1 -1
  124. package/dist/react/account.d.ts +1 -1
  125. package/dist/react/account.js +1 -1
  126. package/dist/react/account.js.map +1 -1
  127. package/dist/react/admin-catalogue.d.ts +1 -1
  128. package/dist/react/admin-catalogue.js +1 -1
  129. package/dist/react/admin-catalogue.js.map +1 -1
  130. package/dist/react/admin-consumption.d.ts +1 -1
  131. package/dist/react/admin-consumption.js +1 -1
  132. package/dist/react/admin-consumption.js.map +1 -1
  133. package/dist/react/admin-contracts.d.ts +1 -1
  134. package/dist/react/admin-contracts.js +1 -1
  135. package/dist/react/admin-contracts.js.map +1 -1
  136. package/dist/react/admin-customer.d.ts +1 -1
  137. package/dist/react/admin-customer.js +1 -1
  138. package/dist/react/admin-customer.js.map +1 -1
  139. package/dist/react/admin-desk.d.ts +1 -1
  140. package/dist/react/admin-desk.js +1 -1
  141. package/dist/react/admin-desk.js.map +1 -1
  142. package/dist/react/admin-licenses.d.ts +1 -1
  143. package/dist/react/admin-licenses.js +1 -1
  144. package/dist/react/admin-licenses.js.map +1 -1
  145. package/dist/react/admin-partner-selections.d.ts +1 -1
  146. package/dist/react/admin-partner-selections.js +1 -1
  147. package/dist/react/admin-partner-selections.js.map +1 -1
  148. package/dist/react/admin-patrons.d.ts +1 -1
  149. package/dist/react/admin-patrons.js +1 -1
  150. package/dist/react/admin-patrons.js.map +1 -1
  151. package/dist/react/admin-reviews.d.ts +1 -1
  152. package/dist/react/admin-reviews.js +1 -1
  153. package/dist/react/admin-reviews.js.map +1 -1
  154. package/dist/react/admin-roles.d.ts +1 -1
  155. package/dist/react/admin-roles.js +1 -1
  156. package/dist/react/admin-roles.js.map +1 -1
  157. package/dist/react/admin-support.d.ts +1 -1
  158. package/dist/react/admin-support.js +1 -1
  159. package/dist/react/admin-support.js.map +1 -1
  160. package/dist/react/admin-tenants.d.ts +1 -1
  161. package/dist/react/admin-tenants.js +1 -1
  162. package/dist/react/admin-tenants.js.map +1 -1
  163. package/dist/react/admin-tutoring.d.ts +1 -1
  164. package/dist/react/admin-tutoring.js +1 -1
  165. package/dist/react/admin-tutoring.js.map +1 -1
  166. package/dist/react/admin-vod.d.ts +285 -0
  167. package/dist/react/admin-vod.js +453 -0
  168. package/dist/react/admin-vod.js.map +1 -0
  169. package/dist/react/auth-device.d.ts +1 -1
  170. package/dist/react/auth-device.js +1 -1
  171. package/dist/react/auth-device.js.map +1 -1
  172. package/dist/react/auth.d.ts +1 -1
  173. package/dist/react/auth.js +1 -1
  174. package/dist/react/auth.js.map +1 -1
  175. package/dist/react/biblio-billing-webhooks.d.ts +1 -1
  176. package/dist/react/biblio-billing-webhooks.js +1 -1
  177. package/dist/react/biblio-billing-webhooks.js.map +1 -1
  178. package/dist/react/biblio-billing.d.ts +1 -1
  179. package/dist/react/biblio-billing.js +1 -1
  180. package/dist/react/biblio-billing.js.map +1 -1
  181. package/dist/react/biblio-catalogue.d.ts +1 -1
  182. package/dist/react/biblio-catalogue.js +1 -1
  183. package/dist/react/biblio-catalogue.js.map +1 -1
  184. package/dist/react/biblio-home.d.ts +1 -1
  185. package/dist/react/biblio-home.js +1 -1
  186. package/dist/react/biblio-home.js.map +1 -1
  187. package/dist/react/biblio-learning-author-profiles.d.ts +1 -1
  188. package/dist/react/biblio-learning-author-profiles.js +1 -1
  189. package/dist/react/biblio-learning-author-profiles.js.map +1 -1
  190. package/dist/react/biblio-learning-authoring.d.ts +1 -1
  191. package/dist/react/biblio-learning-authoring.js +1 -1
  192. package/dist/react/biblio-learning-authoring.js.map +1 -1
  193. package/dist/react/biblio-learning-editorial.d.ts +1 -1
  194. package/dist/react/biblio-learning-editorial.js +1 -1
  195. package/dist/react/biblio-learning-editorial.js.map +1 -1
  196. package/dist/react/biblio-learning-feedback.d.ts +1 -1
  197. package/dist/react/biblio-learning-feedback.js +1 -1
  198. package/dist/react/biblio-learning-feedback.js.map +1 -1
  199. package/dist/react/biblio-learning-finance.d.ts +1 -1
  200. package/dist/react/biblio-learning-finance.js +1 -1
  201. package/dist/react/biblio-learning-finance.js.map +1 -1
  202. package/dist/react/biblio-learning-integrations.d.ts +1 -1
  203. package/dist/react/biblio-learning-integrations.js +1 -1
  204. package/dist/react/biblio-learning-integrations.js.map +1 -1
  205. package/dist/react/biblio-learning-membership.d.ts +1 -1
  206. package/dist/react/biblio-learning-membership.js +1 -1
  207. package/dist/react/biblio-learning-membership.js.map +1 -1
  208. package/dist/react/biblio-learning.d.ts +1 -1
  209. package/dist/react/biblio-learning.js +1 -1
  210. package/dist/react/biblio-learning.js.map +1 -1
  211. package/dist/react/biblio-library.d.ts +1 -1
  212. package/dist/react/biblio-library.js +1 -1
  213. package/dist/react/biblio-library.js.map +1 -1
  214. package/dist/react/biblio-nextory.d.ts +1 -1
  215. package/dist/react/biblio-nextory.js +1 -1
  216. package/dist/react/biblio-nextory.js.map +1 -1
  217. package/dist/react/biblio-press.d.ts +1 -1
  218. package/dist/react/biblio-press.js +1 -1
  219. package/dist/react/biblio-press.js.map +1 -1
  220. package/dist/react/biblio-search.d.ts +1 -1
  221. package/dist/react/biblio-search.js +1 -1
  222. package/dist/react/biblio-search.js.map +1 -1
  223. package/dist/react/biblio-telemetry.d.ts +1 -1
  224. package/dist/react/biblio-telemetry.js +1 -1
  225. package/dist/react/biblio-telemetry.js.map +1 -1
  226. package/dist/react/biblio-youscribe.d.ts +1 -1
  227. package/dist/react/biblio-youscribe.js +1 -1
  228. package/dist/react/biblio-youscribe.js.map +1 -1
  229. package/dist/react/chat.d.ts +1 -1
  230. package/dist/react/consumption.d.ts +1 -1
  231. package/dist/react/consumption.js +1 -1
  232. package/dist/react/consumption.js.map +1 -1
  233. package/dist/react/cvs-app.d.ts +1 -1
  234. package/dist/react/cvs-app.js +1 -1
  235. package/dist/react/cvs-app.js.map +1 -1
  236. package/dist/react/cvs-documents.d.ts +1 -1
  237. package/dist/react/cvs-documents.js +1 -1
  238. package/dist/react/cvs-documents.js.map +1 -1
  239. package/dist/react/cvs-favorites.d.ts +1 -1
  240. package/dist/react/cvs-favorites.js +1 -1
  241. package/dist/react/cvs-favorites.js.map +1 -1
  242. package/dist/react/cvs-ils.d.ts +1 -1
  243. package/dist/react/cvs-ils.js +1 -1
  244. package/dist/react/cvs-ils.js.map +1 -1
  245. package/dist/react/cvs-loans.d.ts +1 -1
  246. package/dist/react/cvs-loans.js +1 -1
  247. package/dist/react/cvs-loans.js.map +1 -1
  248. package/dist/react/cvs-payments.d.ts +50 -1
  249. package/dist/react/cvs-payments.js +71 -2
  250. package/dist/react/cvs-payments.js.map +1 -1
  251. package/dist/react/cvs-streaming.d.ts +43 -32
  252. package/dist/react/cvs-streaming.js +72 -33
  253. package/dist/react/cvs-streaming.js.map +1 -1
  254. package/dist/react/index.d.ts +4 -3
  255. package/dist/react/index.js +4 -3
  256. package/dist/react/partner-catalogue.d.ts +1 -1
  257. package/dist/react/partner-catalogue.js +1 -1
  258. package/dist/react/partner-catalogue.js.map +1 -1
  259. package/dist/react/partner-reader-nextory.d.ts +1 -1
  260. package/dist/react/partner-reader-nextory.js +1 -1
  261. package/dist/react/partner-reader-nextory.js.map +1 -1
  262. package/dist/react/partner-reader-youscribe.d.ts +1 -1
  263. package/dist/react/partner-reader-youscribe.js +1 -1
  264. package/dist/react/partner-reader-youscribe.js.map +1 -1
  265. package/dist/react/partner-reading.d.ts +1 -1
  266. package/dist/react/partner-reading.js +1 -1
  267. package/dist/react/partner-reading.js.map +1 -1
  268. package/dist/react/profiles.d.ts +1 -1
  269. package/dist/react/profiles.js +1 -1
  270. package/dist/react/profiles.js.map +1 -1
  271. package/dist/react/search.d.ts +1 -1
  272. package/dist/react/search.js +1 -1
  273. package/dist/react/search.js.map +1 -1
  274. package/dist/react/tutoring-catalogue.d.ts +1 -1
  275. package/dist/react/tutoring-catalogue.js +1 -1
  276. package/dist/react/tutoring-catalogue.js.map +1 -1
  277. package/dist/react/tutoring-chat.d.ts +1 -1
  278. package/dist/react/tutoring-chat.js +1 -1
  279. package/dist/react/tutoring-chat.js.map +1 -1
  280. package/dist/react/tutoring-dispatch.d.ts +1 -1
  281. package/dist/react/tutoring-dispatch.js +1 -1
  282. package/dist/react/tutoring-dispatch.js.map +1 -1
  283. package/dist/react/tutoring-practitioner.d.ts +1 -1
  284. package/dist/react/tutoring-practitioner.js +1 -1
  285. package/dist/react/tutoring-practitioner.js.map +1 -1
  286. package/dist/react/tutoring-requests.d.ts +1 -1
  287. package/dist/react/tutoring-requests.js +1 -1
  288. package/dist/react/tutoring-requests.js.map +1 -1
  289. package/package.json +7 -7
package/CVS-PLAYBACK.md CHANGED
@@ -1,135 +1,95 @@
1
- # Cinema integration with the SDK
1
+ # CVS cinema playback
2
2
 
3
- This guide targets the frontend-request update prepared on 27 October 2026.
4
- Use the SDK from the release containing these operations; this document does
5
- not mean the pending backend changes have already reached staging.
3
+ The API returns media URLs, supported DRM schemes and licence-proxy URLs.
4
+ Authentication, catalogue visibility, credits, loans and playback leases remain
5
+ in the unified API. Media preparation can come from a SaaS encoder or our tool;
6
+ clients consume the same published playback contract.
6
7
 
7
- ## Browse and quote
8
+ ## Catalogue and credit balance
8
9
 
9
- Reuse the authenticated SDK client and active profile headers. Show Cinema
10
- when `readCapabilities().cinema.catalogueAllowed` is true. Its `homeUrl`,
11
- `catalogueUrl` and `accessUrl` correspond to these typed operations:
10
+ Use `GET /cvs/films` or `/cvs/home` for browsing and `GET /me/cinema?docId=…`
11
+ for the real credit balance, contract act and film cost. Catalogue cards do not
12
+ promise that a media package is available. Missing required playback media is a
13
+ server error; there is no simulated balance or alternate-provider fallback.
12
14
 
13
- ```ts
14
- import {
15
- readCinemaHome, listCinemaFilms, readCinemaAccess,
16
- } from '@learnorama/mozaik-sdk/api/cvs-documents';
17
-
18
- const home = await readCinemaHome({ limit: 8 }, { client });
19
- const films = await listCinemaFilms({ page: 1, limit: 24, sort: 'newest' }, { client });
20
- const film = films.data[0];
21
- const quote = film && await readCinemaAccess({ docId: film.id }, { client });
22
- ```
15
+ `GET /streaming/{doc_id}/details` provides metadata without spending a credit.
16
+ Licence URLs are available after opening the actual playback session.
23
17
 
24
- Cards include `genres`, `durationSeconds`, `directors`, and `coverUrl` when known.
25
- Null metadata is unknown. Follow each home row's `documentsUrl` for subsequent
26
- pages; keep its filters. `listCvsSelectionDocuments` retrieves an owned CVS
27
- list in recorded order. Search remains available separately; do not fetch the
28
- whole inventory to classify it on the frontend.
29
-
30
- `readCinemaAccess()` without `docId` is an overview. Several allowances must
31
- **not be added together**: they can apply to different films. An overview with
32
- more than 100 allowances sets `balancesComplete=false`. A film-specific quote
33
- resolves the actual act, cost and allowance:
34
-
35
- - `credits.left`, `total`, `until`, `grantedBy`, `contractId`, `contractReference`
36
- describe the selected grant. `unlimited=true` has null amounts, not zero.
37
- - `scope` says whether the allowance belongs to a profile, household or tenant.
38
- - `allowed` and `reason` describe the current decision; this is not a reservation.
39
- - `unitCost` is the actual consumption policy, currently one unit for a new act,
40
- zero when starting playback under an existing valid loan. It is not the
41
- document's catalogue price or legacy `unitCount`.
42
- - `act`, `loanHours`, `validUntil`, and `actionUrl` distinguish direct viewing
43
- from borrowing and from an already-held loan.
44
-
45
- After borrowing or starting playback, invalidate/refetch `/me/cinema` for the
46
- film and the overview. Never decrement a simulated balance. The mutation checks
47
- rights and quota again, so a concurrent household spend may still return 409.
48
-
49
- ## Explicit Play action
18
+ ## Start
50
19
 
51
- ```ts
52
- import { borrow } from '@learnorama/mozaik-sdk/api/cvs-loans';
53
- import { startSession, readDashManifest } from '@learnorama/mozaik-sdk/api/cvs-streaming';
54
- import { renewLease, closeLease } from '@learnorama/mozaik-sdk/api/consumption';
55
-
56
- // Run only after the user presses Play, with a fresh quote for this docId.
57
- if (!quote?.allowed) throw new Error('This film is not currently available');
58
- if (quote.actionUrl === '/cvs/loans') {
59
- if (quote.act !== 'loan_view' && quote.act !== 'loan_download') {
60
- throw new Error('Unexpected loan contract');
61
- }
62
- await borrow({ workId: film.id, act: quote.act, requestKey: crypto.randomUUID() }, { client });
63
- }
64
- const playback = await startSession({ docId: film.id }, {
65
- client,
66
- headers: {
67
- 'Idempotency-Key': crypto.randomUUID(),
68
- 'X-Client-Platform': 'web',
69
- },
70
- });
71
- await readCinemaAccess({ docId: film.id }, { client });
72
- ```
20
+ Call `POST /streaming/sessions` with `{"docId": film.id}` using the normal SDK
21
+ authentication/profile headers and a stable `X-Device-Id`. Use an
22
+ `Idempotency-Key` to retry an uncertain start without spending a second unit.
23
+ `X-Client-Platform` accepts `web`, `ios` and `android`; Android TV uses `android`,
24
+ tvOS uses `ios`, and Tizen/webOS uses `web`.
25
+
26
+ The response includes:
27
+
28
+ - `lease.eventId` and `lease.expiresAt` for heartbeat/close operations.
29
+ - `drm.supportedSchemes`.
30
+ - `drm.hls` / `drm.dash`, normally under `https://vod-par.mozaik.co`.
31
+ - `drm.widevine`, `drm.fairplay`, `drm.playready`: enabled schemes' relative
32
+ authenticated Mozaik API paths, bound to this playback lease.
33
+ - `drm.certificate`: the configured public FairPlay application certificate URL.
34
+ - `drm.licenceRequiresAuthentication = true` and `drm.contentId` as the work ID.
35
+
36
+ Starting a session does not make a KMS or DRM provider request. The player's CDM
37
+ challenge triggers licence issuance afterward. Existing loans are not charged
38
+ again for playback. Missing media/configuration returns 503 before opening a lease
39
+ or charging a credit. No clear stream or other provider is substituted.
40
+
41
+ ## Player licence adapter
73
42
 
74
- Retain each request key for an intentional retry of that same action. Borrow
75
- and playback need different keys. Do not prefetch these mutations or blindly
76
- retry them: opening DRM is an external operation. `streamingDetails(docId)` is
77
- a read-only readiness check and returns no licence or lease.
78
-
79
- Use `web` for Tizen/webOS, `android` for Android TV, `ios` for tvOS. These are
80
- DRM/OS families; there is no fourth DRM family named `tv`.
81
-
82
- ## Player and DRM
83
-
84
- | Response field | Meaning |
85
- | --- | --- |
86
- | `streamUrl` / `drm.hls` | HLS manifest |
87
- | `drm.dash` | Direct CDN MPEG-DASH manifest |
88
- | `drm.normalizedDashUrl` | Optional authenticated backend MPD normalization route |
89
- | `drm.widevine`, `drm.fairplay` | Licence acquisition URLs |
90
- | `drm.certificate` | URL of public DER FairPlay application-certificate bytes |
91
- | `drm.token` | Provider licence token; not the Mozaik bearer |
92
- | `drm.kid` | Content key identifier; not a raw decryption key |
93
- | `drm.contentId` | Provider media identity; not the CVS document ID |
94
- | `lease.eventId`, `lease.expiresAt` | Playback heartbeat handle and deadline |
95
-
96
- The SDK does not implement a player/CDM. Configure the player with its supported
97
- provider protocol; its licence challenge returns the protected key material.
98
- Fetch the public FairPlay certificate as bytes, not as a JSON or base64 field.
99
- The configured legacy certificate is reachable but actual Safari/iOS playback
100
- still needs device validation. Its embedded X.509 expiration alone was not used
101
- to claim successful or failed FairPlay decryption.
102
-
103
- For a DASH player affected by self-referencing `dependencyId`, fetch the
104
- normalized MPD with the SDK, then pass a Blob URL to the player:
43
+ The player must post each raw CDM challenge to the returned API path with the
44
+ same bearer/profile and `X-Device-Id` headers used for the playback session.
45
+ The generated SDK operation accepts and returns binary `Blob` values:
105
46
 
106
47
  ```ts
107
- const xml = await readDashManifest(film.id, { client });
108
- const manifestUrl = URL.createObjectURL(new Blob([xml], { type: 'application/dash+xml' }));
109
- // await player.load(manifestUrl);
110
- // Revoke after player unload: URL.revokeObjectURL(manifestUrl);
48
+ import { ownedVodLicence } from '@learnorama/mozaik-sdk/api/cvs-streaming';
49
+
50
+ const licence = await ownedVodLicence(
51
+ playback.lease.eventId,
52
+ 'widevine', // fairplay/playready when listed in supportedSchemes
53
+ new Blob([challenge], { type: 'application/octet-stream' }),
54
+ { client, headers: { 'X-Device-Id': deviceId } },
55
+ );
56
+ const licenceBytes = new Uint8Array(await licence.arrayBuffer());
111
57
  ```
112
58
 
113
- The backend removes only a representation's dependency on itself. Other
114
- dependencies remain; segment BaseURL resolves to the original CDN. The endpoint
115
- is bounded and read-only, and does not grant playback rights by itself. Do not
116
- send API bearer/profile headers to CDN, certificate or licence hosts.
117
-
118
- ## Heartbeat and stop
119
-
120
- Call `renewLease(playback.lease.eventId, { client })` while playing, typically
121
- every 30 seconds. Honor its returned deadline; a 404 means the lease is gone.
122
- Call `closeLease` on stop/unmount/player failure. JSON carries the handle; no
123
- `Location` header is needed. The durable database expiry survives Redis loss
124
- and is the same deadline used by the reaper.
125
-
126
- Playback has its own event, linked to a fixed-term loan where applicable.
127
- Closing playback does not return the loan; renewing playback cannot extend the
128
- loan's contractual deadline. Returning a loan releases a seat without refunding
129
- spent units. Never substitute a loan ID, docId, or key ID for the playback event.
130
-
131
- Handle 401 through SSO, 403 as a profile restriction, 404 as unavailable/unready,
132
- 409 as exhausted quota or no seat, 429 using Retry-After, and 503 as provider
133
- unavailability. Verify video **and audio**, licence challenge, several heartbeats,
134
- and stop on each target platform after release. Provider-stubbed tests prove the
135
- backend contract, not device/CDM interoperability.
59
+ Resolve relative licence paths against the API base URL. Do not send API bearer
60
+ or profile credentials to the CDN, certificate URL or directly to a DRM provider. The
61
+ backend never returns a plaintext media key or its provider API credentials.
62
+
63
+ Widevine's service-certificate challenge uses the same licence endpoint. FairPlay
64
+ uses the organization's configured certificate and the package's recorded IV.
65
+ Shaka/Safari or a native player's normal SPC/CKC handling still applies; the
66
+ binary adapter does not invent another licence format.
67
+
68
+ HLS and DASH may reference single-file fragmented MP4 using byte ranges. Support
69
+ HTTP 206 responses for seeking and quality switching. Widevine/FairPlay/PlayReady
70
+ can share the same encrypted tracks on compatible devices; use only the schemes
71
+ returned by the API.
72
+
73
+ ## Heartbeats and errors
74
+
75
+ Renew `/consumption/{event_id}` periodically while playing (typically every
76
+ 30 seconds), honoring the returned deadline. Close that lease on stop, unmount
77
+ or player failure. The JSON `lease.eventId` is sufficient; reading the Location
78
+ header is not required. A playback lease is distinct from any underlying loan.
79
+ Closing playback does not return the loan or refund its spent units.
80
+
81
+ Handle 401 through SSO, 403 as a licence/profile refusal, 404 as unknown or
82
+ unauthorized resources/expired leases, 409 as quota/seat exhaustion, 429 using
83
+ Retry-After, and 503 as unavailable playback media/configuration/provider.
84
+ Terminal provider failures close the playback lease. Do not blindly retry licence
85
+ issuance, which is a paid provider operation. Issued licences remain governed by
86
+ the configured DRM lifetime.
87
+
88
+ `GET /streaming/{doc_id}/manifest.mpd` is an authenticated, normalized DASH read
89
+ from the registered CDN. It preserves encryption metadata and absolute media
90
+ references, and spends no credit. Fetch it through the SDK's `readDashManifest`
91
+ operation if your player uses that path.
92
+
93
+ Validate video, audio, seeking, quality switching, several heartbeats and stop
94
+ on the supported device matrix after deployment. Backend tests with stubbed
95
+ providers do not establish real CDM/device interoperability.
@@ -1,5 +1,5 @@
1
1
 
2
- import { Ah as CustomerActivationRedeemRead, Ai as OnboardingRead, Eu as FrontendCapabilitiesRead, Zi as LoginListRead, _y as AccountSecurityRead, gy as AccountUpdateWrite, kh as CustomerActivationRedeemWrite, nt as ServiceListRead, ot as ServiceAccessRead, va as ListOwnLoginsParams, yy as AccountDetailRead } from "../chunks/index.js";
2
+ import { Bu as FrontendCapabilitiesRead, Gh as CustomerActivationRedeemRead, Ma as ListOwnLoginsParams, My as AccountSecurityRead, Py as AccountDetailRead, Ui as OnboardingRead, Wh as CustomerActivationRedeemWrite, ht as ServiceListRead, jy as AccountUpdateWrite, ua as LoginListRead, yt as ServiceAccessRead } 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;
@@ -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.17.1\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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A+B;CAK1C,OAAO;AACT;;;;;AAMA,MAAa,mBAAmB,OAAQ,YAA2D;CAEjG,OAAO,QAAc,uBAAuB,GAC5C;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,kCAAkC;CAK7C,OAAO;AACT;;;;;AAMA,MAAa,sBAAsB,OAAQ,YAA0E;CAEnH,OAAO,QAA6B,0BAA0B,GAC9D;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;AAGF,MAAa,qBAAqB,cAAuB;CAKvD,OAAO,gBAAgB,UAAU;AACnC;;;;;AAMA,MAAa,cAAc,OAAO,WAAmB,YAAwE;CAE3H,OAAO,QAA2B,kBAAkB,SAAS,GAC7D;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.2\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":";;;AAuBA,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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B,UAAU;AACnC;;;;;AAMA,MAAa,cAAc,OAAO,WAAmB,YAAwE;CAE3H,OAAO,QAA2B,kBAAkB,SAAS,GAC7D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
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, Zn as PressVoucherDisableWrite, gr as PressRefreshRead, hr as PressRefreshWrite, j as ThemeWrite, pa as ListPressArticleRefreshesParams, pr as PressRegionsWrite, ra as ListThemesParams, vu as PressRegionRead } from "../chunks/index.js";
2
+ import { $n as PressVoucherPoolWrite, Da as ListPressArticleRefreshesParams, Er as PressRegionsWrite, G as ThemeOrderWrite, Gr as PressArticleMetadataWrite, K as ThemeListRead, Mu as PressRegionRead, Or as PressRefreshWrite, W as ThemeWrite, Zn as PressVoucherUsageRead, _a as ListThemesParams, dr as PressVoucherCodesWrite, er as PressVoucherPoolRead, fr as PressVoucherActivationReportWrite, kr as PressRefreshRead, lr as PressVoucherImportRead, q as ThemeRead, rr as PressVoucherOfferRead, tr as PressVoucherOfferWrite, ur as PressVoucherDisableWrite, zr as PressDiscoveryJobRead } 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;
@@ -1 +1 @@
1
- {"version":3,"file":"admin-catalogue.js","names":[],"sources":["../../src/api/admin-catalogue/admin-catalogue.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.1\n */\nimport type {\n ListPressArticleRefreshesParams,\n ListThemesParams,\n PressArticleMetadataWrite,\n PressDiscoveryJobRead,\n PressRefreshRead,\n PressRefreshWrite,\n PressRegionRead,\n PressRegionsWrite,\n PressVoucherActivationReportWrite,\n PressVoucherCodesWrite,\n PressVoucherDisableWrite,\n PressVoucherImportRead,\n PressVoucherOfferRead,\n PressVoucherOfferWrite,\n PressVoucherPoolRead,\n PressVoucherPoolWrite,\n PressVoucherUsageRead,\n ThemeListRead,\n ThemeOrderWrite,\n ThemeRead,\n ThemeWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListPressArticleRefreshesUrl = (params?: ListPressArticleRefreshesParams,) => {\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 ? `/admin/press/article-refreshes?${stringifiedParams}` : `/admin/press/article-refreshes`\n}\n\n/**\n * Recent refresh progress and safe error codes; no provider credentials or response dumps.\n * @summary List Press Article Refreshes\n */\nexport const listPressArticleRefreshes = async (params?: ListPressArticleRefreshesParams, options?: Parameters<typeof request>[1]): Promise<PressDiscoveryJobRead[]> => {\n\n return request<PressDiscoveryJobRead[]>(getListPressArticleRefreshesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getRequestPressArticleRefreshUrl = () => {\n\n\n\n\n return `/admin/press/article-refreshes`\n}\n\n/**\n * Queue a bounded, idempotent metadata refresh; workers fetch one page per task.\n * @summary Request Press Article Refresh\n */\nexport const requestPressArticleRefresh = async (pressRefreshWrite: PressRefreshWrite, options?: Parameters<typeof request>[1]): Promise<PressRefreshRead> => {\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<PressRefreshRead>(getRequestPressArticleRefreshUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressRefreshWrite)\n }\n);}\n\n\nexport const getUpdatePressArticleMetadataUrl = (articleId: number,) => {\n\n\n\n\n return `/admin/press/articles/${articleId}/metadata`\n}\n\n/**\n * Record verified article metadata. Summary length is never a full article word count.\n * @summary Update Press Article Metadata\n */\nexport const updatePressArticleMetadata = async (articleId: number,\n pressArticleMetadataWrite: PressArticleMetadataWrite, 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>(getUpdatePressArticleMetadataUrl(articleId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressArticleMetadataWrite)\n }\n);}\n\n\nexport const getConfigurePressRegionsUrl = (publicationId: string,) => {\n\n\n\n\n return `/admin/press/publications/${publicationId}/regions`\n}\n\n/**\n * Replace verified editorial geographic mappings; never infer them from a country.\n * @summary Configure Press Regions\n */\nexport const configurePressRegions = async (publicationId: string,\n pressRegionsWrite: PressRegionsWrite, options?: Parameters<typeof request>[1]): Promise<PressRegionRead[]> => {\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<PressRegionRead[]>(getConfigurePressRegionsUrl(publicationId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressRegionsWrite)\n }\n);}\n\n\nexport const getListPressVoucherOffersUrl = () => {\n\n\n\n\n return `/admin/press/voucher-offers`\n}\n\n/**\n * Global code-offer configuration; no code values are returned.\n * @summary List Press Voucher Offers\n */\nexport const listPressVoucherOffers = async ( options?: Parameters<typeof request>[1]): Promise<PressVoucherOfferRead[]> => {\n\n return request<PressVoucherOfferRead[]>(getListPressVoucherOffersUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getConfigurePressVoucherOfferUrl = () => {\n\n\n\n\n return `/admin/press/voucher-offers`\n}\n\n/**\n * Configure a known newspaper offer and explicit native publication bindings.\n * @summary Configure Press Voucher Offer\n */\nexport const configurePressVoucherOffer = async (pressVoucherOfferWrite: PressVoucherOfferWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherOfferRead> => {\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<PressVoucherOfferRead>(getConfigurePressVoucherOfferUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherOfferWrite)\n }\n);}\n\n\nexport const getListPressVoucherPoolsUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/pools`\n}\n\n/**\n * Stock, allocations and confirmed activations. No private codes are listed.\n * @summary List Press Voucher Pools\n */\nexport const listPressVoucherPools = async (offerId: number, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead[]> => {\n\n return request<PressVoucherPoolRead[]>(getListPressVoucherPoolsUrl(offerId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreatePressVoucherPoolUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/pools`\n}\n\n/**\n * Create a bank with explicit availability and calendar-based benefit/renewal rules.\n * @summary Create Press Voucher Pool\n */\nexport const createPressVoucherPool = async (offerId: number,\n pressVoucherPoolWrite: PressVoucherPoolWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead> => {\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<PressVoucherPoolRead>(getCreatePressVoucherPoolUrl(offerId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherPoolWrite)\n }\n);}\n\n\nexport const getReadPressVoucherUsageUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/usage`\n}\n\n/**\n * Allocation and confirmed-activation counts, with legacy reported evidence separate.\n *\n * No per-reader sessions or durations are fabricated from legacy averages.\n * @summary Read Press Voucher Usage\n */\nexport const readPressVoucherUsage = async (offerId: number, options?: Parameters<typeof request>[1]): Promise<PressVoucherUsageRead> => {\n\n return request<PressVoucherUsageRead>(getReadPressVoucherUsageUrl(offerId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdatePressVoucherPoolUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}`\n}\n\n/**\n * Enable/close stock; an allocated bank's benefit policy cannot change retroactively.\n * @summary Update Press Voucher Pool\n */\nexport const updatePressVoucherPool = async (poolId: number,\n pressVoucherPoolWrite: PressVoucherPoolWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead> => {\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<PressVoucherPoolRead>(getUpdatePressVoucherPoolUrl(poolId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherPoolWrite)\n }\n);}\n\n\nexport const getImportPressVoucherActivationsUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/activations`\n}\n\n/**\n * Apply publisher-confirmed dates; never infer activation from allocation.\n *\n * Matching repeats are harmless. Unknown codes, conflicting confirmations and\n * future activation dates are refused atomically. An already-used unallocated\n * code is quarantined so it cannot be handed to another household.\n * @summary Import Press Voucher Activations\n */\nexport const importPressVoucherActivations = async (poolId: number,\n pressVoucherActivationReportWrite: PressVoucherActivationReportWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\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<PressVoucherImportRead>(getImportPressVoucherActivationsUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherActivationReportWrite)\n }\n);}\n\n\nexport const getImportPressVoucherCodesUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/codes`\n}\n\n/**\n * Import at most 500 private codes atomically. Same-bank repeats are idempotent.\n *\n * A code already in another bank is refused; existing owners are never changed.\n * Values are encrypted at rest and omitted from responses and audit details.\n * @summary Import Press Voucher Codes\n */\nexport const importPressVoucherCodes = async (poolId: number,\n pressVoucherCodesWrite: PressVoucherCodesWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\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<PressVoucherImportRead>(getImportPressVoucherCodesUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherCodesWrite)\n }\n);}\n\n\nexport const getDisablePressVoucherCodesUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/codes/disable`\n}\n\n/**\n * Disable local issuance/retrieval without clearing ownership or cancelling publisher accounts.\n * @summary Disable Press Voucher Codes\n */\nexport const disablePressVoucherCodes = async (poolId: number,\n pressVoucherDisableWrite: PressVoucherDisableWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\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<PressVoucherImportRead>(getDisablePressVoucherCodesUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherDisableWrite)\n }\n);}\n\n\nexport const getListThemesUrl = (params?: ListThemesParams,) => {\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 ? `/admin/themes?${stringifiedParams}` : `/admin/themes`\n}\n\n/**\n * Every theme, or one pillar's, in display order.\n *\n * Not paginated. There are 27 of them, and a client that has to page through\n * a list it is about to reorder cannot reorder it.\n * @summary List Themes\n */\nexport const listThemes = async (params?: ListThemesParams, options?: Parameters<typeof request>[1]): Promise<ThemeListRead> => {\n\n return request<ThemeListRead>(getListThemesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreateThemeUrl = () => {\n\n\n\n\n return `/admin/themes`\n}\n\n/**\n * Add a theme.\n *\n * ``409`` on a duplicate ``(pillar, title)``: that pair is unique in the\n * schema, and two themes with the same name in the same pillar are\n * indistinguishable to everyone downstream.\n *\n * With no ``sortOrder`` it goes last, which is what the legacy's form does by\n * defaulting the field to the current maximum plus one.\n * @summary Create Theme\n */\nexport const createTheme = async (themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\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<ThemeRead>(getCreateThemeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\nexport const getReorderThemesUrl = () => {\n\n\n\n\n return `/admin/themes/order`\n}\n\n/**\n * Set the display order for a set of themes, in one transaction.\n *\n * The legacy renumbers one theme per request, so dragging an item in a list of\n * thirty was thirty requests — and closing the tab halfway left the order\n * half-applied, with two themes claiming the same position and the listing\n * silently choosing between them.\n *\n * Ids not named keep their relative order after the ones that are, so a client\n * may send only what moved. An unknown id is ``404`` and nothing is written:\n * a partially applied reorder is the failure this endpoint exists to prevent.\n * @summary Reorder Themes\n */\nexport const reorderThemes = async (themeOrderWrite: ThemeOrderWrite, 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>(getReorderThemesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeOrderWrite)\n }\n);}\n\n\nexport const getDeleteThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Remove a theme.\n *\n * ``409`` when works still carry it. The legacy deletes and leaves the\n * references dangling, which is how a catalogue ends up with items filed under\n * a theme that no longer exists and no screen that can find them.\n *\n * Idempotent otherwise: deleting something already gone is ``204``, because\n * the caller wanted it gone and it is gone.\n * @summary Delete Theme\n */\nexport const deleteTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteThemeUrl(themeId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * One theme.\n * @summary Read Theme\n */\nexport const readTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n return request<ThemeRead>(getReadThemeUrl(themeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getAmendThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Amend a theme. Same uniqueness rule as creating one.\n * @summary Amend Theme\n */\nexport const amendTheme = async (themeId: number,\n themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\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<ThemeRead>(getAmendThemeUrl(themeId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\n"],"mappings":";;;AAiCA,MAAa,mCAAmC,WAA8C;CAC5F,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,kCAAkC,sBAAsB;AAChG;;;;;AAMA,MAAa,4BAA4B,OAAO,QAA0C,YAA8E;CAEtK,OAAO,QAAiC,gCAAgC,MAAM,GAC9E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yCAAyC;CAKpD,OAAO;AACT;;;;;AAMA,MAAa,6BAA6B,OAAO,mBAAsC,YAAuE;CAE1J,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YA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AAK,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,QAAmB,iBAAiB,OAAO,GAChD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,UAAU;CACjC,CACF;AAAE"}
1
+ {"version":3,"file":"admin-catalogue.js","names":[],"sources":["../../src/api/admin-catalogue/admin-catalogue.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.2\n */\nimport type {\n ListPressArticleRefreshesParams,\n ListThemesParams,\n PressArticleMetadataWrite,\n PressDiscoveryJobRead,\n PressRefreshRead,\n PressRefreshWrite,\n PressRegionRead,\n PressRegionsWrite,\n PressVoucherActivationReportWrite,\n PressVoucherCodesWrite,\n PressVoucherDisableWrite,\n PressVoucherImportRead,\n PressVoucherOfferRead,\n PressVoucherOfferWrite,\n PressVoucherPoolRead,\n PressVoucherPoolWrite,\n PressVoucherUsageRead,\n ThemeListRead,\n ThemeOrderWrite,\n ThemeRead,\n ThemeWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListPressArticleRefreshesUrl = (params?: ListPressArticleRefreshesParams,) => {\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 ? `/admin/press/article-refreshes?${stringifiedParams}` : `/admin/press/article-refreshes`\n}\n\n/**\n * Recent refresh progress and safe error codes; no provider credentials or response dumps.\n * @summary List Press Article Refreshes\n */\nexport const listPressArticleRefreshes = async (params?: ListPressArticleRefreshesParams, options?: Parameters<typeof request>[1]): Promise<PressDiscoveryJobRead[]> => {\n\n return request<PressDiscoveryJobRead[]>(getListPressArticleRefreshesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getRequestPressArticleRefreshUrl = () => {\n\n\n\n\n return `/admin/press/article-refreshes`\n}\n\n/**\n * Queue a bounded, idempotent metadata refresh; workers fetch one page per task.\n * @summary Request Press Article Refresh\n */\nexport const requestPressArticleRefresh = async (pressRefreshWrite: PressRefreshWrite, options?: Parameters<typeof request>[1]): Promise<PressRefreshRead> => {\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<PressRefreshRead>(getRequestPressArticleRefreshUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressRefreshWrite)\n }\n);}\n\n\nexport const getUpdatePressArticleMetadataUrl = (articleId: number,) => {\n\n\n\n\n return `/admin/press/articles/${articleId}/metadata`\n}\n\n/**\n * Record verified article metadata. Summary length is never a full article word count.\n * @summary Update Press Article Metadata\n */\nexport const updatePressArticleMetadata = async (articleId: number,\n pressArticleMetadataWrite: PressArticleMetadataWrite, 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>(getUpdatePressArticleMetadataUrl(articleId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressArticleMetadataWrite)\n }\n);}\n\n\nexport const getConfigurePressRegionsUrl = (publicationId: string,) => {\n\n\n\n\n return `/admin/press/publications/${publicationId}/regions`\n}\n\n/**\n * Replace verified editorial geographic mappings; never infer them from a country.\n * @summary Configure Press Regions\n */\nexport const configurePressRegions = async (publicationId: string,\n pressRegionsWrite: PressRegionsWrite, options?: Parameters<typeof request>[1]): Promise<PressRegionRead[]> => {\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<PressRegionRead[]>(getConfigurePressRegionsUrl(publicationId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressRegionsWrite)\n }\n);}\n\n\nexport const getListPressVoucherOffersUrl = () => {\n\n\n\n\n return `/admin/press/voucher-offers`\n}\n\n/**\n * Global code-offer configuration; no code values are returned.\n * @summary List Press Voucher Offers\n */\nexport const listPressVoucherOffers = async ( options?: Parameters<typeof request>[1]): Promise<PressVoucherOfferRead[]> => {\n\n return request<PressVoucherOfferRead[]>(getListPressVoucherOffersUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getConfigurePressVoucherOfferUrl = () => {\n\n\n\n\n return `/admin/press/voucher-offers`\n}\n\n/**\n * Configure a known newspaper offer and explicit native publication bindings.\n * @summary Configure Press Voucher Offer\n */\nexport const configurePressVoucherOffer = async (pressVoucherOfferWrite: PressVoucherOfferWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherOfferRead> => {\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<PressVoucherOfferRead>(getConfigurePressVoucherOfferUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherOfferWrite)\n }\n);}\n\n\nexport const getListPressVoucherPoolsUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/pools`\n}\n\n/**\n * Stock, allocations and confirmed activations. No private codes are listed.\n * @summary List Press Voucher Pools\n */\nexport const listPressVoucherPools = async (offerId: number, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead[]> => {\n\n return request<PressVoucherPoolRead[]>(getListPressVoucherPoolsUrl(offerId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreatePressVoucherPoolUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/pools`\n}\n\n/**\n * Create a bank with explicit availability and calendar-based benefit/renewal rules.\n * @summary Create Press Voucher Pool\n */\nexport const createPressVoucherPool = async (offerId: number,\n pressVoucherPoolWrite: PressVoucherPoolWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead> => {\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<PressVoucherPoolRead>(getCreatePressVoucherPoolUrl(offerId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherPoolWrite)\n }\n);}\n\n\nexport const getReadPressVoucherUsageUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/usage`\n}\n\n/**\n * Allocation and confirmed-activation counts, with legacy reported evidence separate.\n *\n * No per-reader sessions or durations are fabricated from legacy averages.\n * @summary Read Press Voucher Usage\n */\nexport const readPressVoucherUsage = async (offerId: number, options?: Parameters<typeof request>[1]): Promise<PressVoucherUsageRead> => {\n\n return request<PressVoucherUsageRead>(getReadPressVoucherUsageUrl(offerId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdatePressVoucherPoolUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}`\n}\n\n/**\n * Enable/close stock; an allocated bank's benefit policy cannot change retroactively.\n * @summary Update Press Voucher Pool\n */\nexport const updatePressVoucherPool = async (poolId: number,\n pressVoucherPoolWrite: PressVoucherPoolWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead> => {\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<PressVoucherPoolRead>(getUpdatePressVoucherPoolUrl(poolId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherPoolWrite)\n }\n);}\n\n\nexport const getImportPressVoucherActivationsUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/activations`\n}\n\n/**\n * Apply publisher-confirmed dates; never infer activation from allocation.\n *\n * Matching repeats are harmless. Unknown codes, conflicting confirmations and\n * future activation dates are refused atomically. An already-used unallocated\n * code is quarantined so it cannot be handed to another household.\n * @summary Import Press Voucher Activations\n */\nexport const importPressVoucherActivations = async (poolId: number,\n pressVoucherActivationReportWrite: PressVoucherActivationReportWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\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<PressVoucherImportRead>(getImportPressVoucherActivationsUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherActivationReportWrite)\n }\n);}\n\n\nexport const getImportPressVoucherCodesUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/codes`\n}\n\n/**\n * Import at most 500 private codes atomically. Same-bank repeats are idempotent.\n *\n * A code already in another bank is refused; existing owners are never changed.\n * Values are encrypted at rest and omitted from responses and audit details.\n * @summary Import Press Voucher Codes\n */\nexport const importPressVoucherCodes = async (poolId: number,\n pressVoucherCodesWrite: PressVoucherCodesWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\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<PressVoucherImportRead>(getImportPressVoucherCodesUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherCodesWrite)\n }\n);}\n\n\nexport const getDisablePressVoucherCodesUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/codes/disable`\n}\n\n/**\n * Disable local issuance/retrieval without clearing ownership or cancelling publisher accounts.\n * @summary Disable Press Voucher Codes\n */\nexport const disablePressVoucherCodes = async (poolId: number,\n pressVoucherDisableWrite: PressVoucherDisableWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\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<PressVoucherImportRead>(getDisablePressVoucherCodesUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherDisableWrite)\n }\n);}\n\n\nexport const getListThemesUrl = (params?: ListThemesParams,) => {\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 ? `/admin/themes?${stringifiedParams}` : `/admin/themes`\n}\n\n/**\n * Every theme, or one pillar's, in display order.\n *\n * Not paginated. There are 27 of them, and a client that has to page through\n * a list it is about to reorder cannot reorder it.\n * @summary List Themes\n */\nexport const listThemes = async (params?: ListThemesParams, options?: Parameters<typeof request>[1]): Promise<ThemeListRead> => {\n\n return request<ThemeListRead>(getListThemesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreateThemeUrl = () => {\n\n\n\n\n return `/admin/themes`\n}\n\n/**\n * Add a theme.\n *\n * ``409`` on a duplicate ``(pillar, title)``: that pair is unique in the\n * schema, and two themes with the same name in the same pillar are\n * indistinguishable to everyone downstream.\n *\n * With no ``sortOrder`` it goes last, which is what the legacy's form does by\n * defaulting the field to the current maximum plus one.\n * @summary Create Theme\n */\nexport const createTheme = async (themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\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<ThemeRead>(getCreateThemeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\nexport const getReorderThemesUrl = () => {\n\n\n\n\n return `/admin/themes/order`\n}\n\n/**\n * Set the display order for a set of themes, in one transaction.\n *\n * The legacy renumbers one theme per request, so dragging an item in a list of\n * thirty was thirty requests — and closing the tab halfway left the order\n * half-applied, with two themes claiming the same position and the listing\n * silently choosing between them.\n *\n * Ids not named keep their relative order after the ones that are, so a client\n * may send only what moved. An unknown id is ``404`` and nothing is written:\n * a partially applied reorder is the failure this endpoint exists to prevent.\n * @summary Reorder Themes\n */\nexport const reorderThemes = async (themeOrderWrite: ThemeOrderWrite, 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>(getReorderThemesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeOrderWrite)\n }\n);}\n\n\nexport const getDeleteThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Remove a theme.\n *\n * ``409`` when works still carry it. The legacy deletes and leaves the\n * references dangling, which is how a catalogue ends up with items filed under\n * a theme that no longer exists and no screen that can find them.\n *\n * Idempotent otherwise: deleting something already gone is ``204``, because\n * the caller wanted it gone and it is gone.\n * @summary Delete Theme\n */\nexport const deleteTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteThemeUrl(themeId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * One theme.\n * @summary Read Theme\n */\nexport const readTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n return request<ThemeRead>(getReadThemeUrl(themeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getAmendThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Amend a theme. Same uniqueness rule as creating one.\n * @summary Amend Theme\n */\nexport const amendTheme = async (themeId: number,\n themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\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<ThemeRead>(getAmendThemeUrl(themeId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\n"],"mappings":";;;AAiCA,MAAa,mCAAmC,WAA8C;CAC5F,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UA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AAc,kBAAkB,OAAO,GAC9C;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,mBAAmB,YAAqB;CAKnD,OAAO,iBAAiB;AAC1B;;;;;AAMA,MAAa,YAAY,OAAO,SAAiB,YAAgE;CAE/G,OAAO,QAAmB,gBAAgB,OAAO,GACjD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,oBAAoB,YAAqB;CAKpD,OAAO,iBAAiB;AAC1B;;;;;AAMA,MAAa,aAAa,OAAO,SAC7B,YAAwB,YAAgE;CAExF,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,QAAmB,iBAAiB,OAAO,GAChD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,UAAU;CACjC,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { $a as LeaseCloseWrite, ta as LiveLeaseListRead } from "../chunks/index.js";
2
+ import { ma as LiveLeaseListRead, po as LeaseCloseWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/admin-consumption/admin-consumption.d.ts
5
5
  export declare const getListLiveLeasesUrl: () => string;
@@ -1 +1 @@
1
- {"version":3,"file":"admin-consumption.js","names":[],"sources":["../../src/api/admin-consumption/admin-consumption.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.1\n */\nimport type {\n LeaseCloseWrite,\n LiveLeaseListRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListLiveLeasesUrl = () => {\n\n\n\n\n return `/admin/consumption/live`\n}\n\n/**\n * What is open right now, within the caller's tenant scope.\n *\n * Read from the ledger rather than the Redis live set: this is a diagnostic and\n * must show the truth even when the cache is cold, and it runs once when\n * somebody opens a screen rather than on every read.\n *\n * Shares :func:`~app.services.entitlement.is_live` with the two seat counts.\n * An earlier version of this route filtered on ``returned_at`` alone and so\n * listed every lapsed-but-unreaped lease as live — which made the screen look\n * exactly like a stuck reaper even when the reaper was fine.\n * @summary List Live Leases\n */\nexport const listLiveLeases = async ( options?: Parameters<typeof request>[1]): Promise<LiveLeaseListRead> => {\n\n return request<LiveLeaseListRead>(getListLiveLeasesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getForceCloseLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/admin/consumption/${eventId}`\n}\n\n/**\n * Force-close somebody else's lease. The legacy's ``FermeSessionAdherent``.\n *\n * Audited, which the legacy's was not: a button that ends a stranger's reading\n * session and leaves no trace is indistinguishable from abuse of the same\n * button. Tenant-scoped like every staff action, so a lease outside the\n * caller's scope is ``404`` rather than ``403``.\n * @summary Force Close Lease\n */\nexport const forceCloseLease = async (eventId: number,\n leaseCloseWrite: LeaseCloseWrite, 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>(getForceCloseLeaseUrl(eventId),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(leaseCloseWrite)\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,6BAA6B;CAKxC,OAAO;AACT;;;;;;;;;;;;;;AAeA,MAAa,iBAAiB,OAAQ,YAAwE;CAE5G,OAAO,QAA2B,qBAAqB,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB,YAAqB;CAKzD,OAAO,sBAAsB;AAC/B;;;;;;;;;;AAWA,MAAa,kBAAkB,OAAO,SAClC,iBAAkC,YAA2D;CAE7F,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,sBAAsB,OAAO,GAChD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,eAAe;CACtC,CACF;AAAE"}
1
+ {"version":3,"file":"admin-consumption.js","names":[],"sources":["../../src/api/admin-consumption/admin-consumption.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.2\n */\nimport type {\n LeaseCloseWrite,\n LiveLeaseListRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListLiveLeasesUrl = () => {\n\n\n\n\n return `/admin/consumption/live`\n}\n\n/**\n * What is open right now, within the caller's tenant scope.\n *\n * Read from the ledger rather than the Redis live set: this is a diagnostic and\n * must show the truth even when the cache is cold, and it runs once when\n * somebody opens a screen rather than on every read.\n *\n * Shares :func:`~app.services.entitlement.is_live` with the two seat counts.\n * An earlier version of this route filtered on ``returned_at`` alone and so\n * listed every lapsed-but-unreaped lease as live — which made the screen look\n * exactly like a stuck reaper even when the reaper was fine.\n * @summary List Live Leases\n */\nexport const listLiveLeases = async ( options?: Parameters<typeof request>[1]): Promise<LiveLeaseListRead> => {\n\n return request<LiveLeaseListRead>(getListLiveLeasesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getForceCloseLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/admin/consumption/${eventId}`\n}\n\n/**\n * Force-close somebody else's lease. The legacy's ``FermeSessionAdherent``.\n *\n * Audited, which the legacy's was not: a button that ends a stranger's reading\n * session and leaves no trace is indistinguishable from abuse of the same\n * button. Tenant-scoped like every staff action, so a lease outside the\n * caller's scope is ``404`` rather than ``403``.\n * @summary Force Close Lease\n */\nexport const forceCloseLease = async (eventId: number,\n leaseCloseWrite: LeaseCloseWrite, 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>(getForceCloseLeaseUrl(eventId),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(leaseCloseWrite)\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,6BAA6B;CAKxC,OAAO;AACT;;;;;;;;;;;;;;AAeA,MAAa,iBAAiB,OAAQ,YAAwE;CAE5G,OAAO,QAA2B,qBAAqB,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB,YAAqB;CAKzD,OAAO,sBAAsB;AAC/B;;;;;;;;;;AAWA,MAAa,kBAAkB,OAAO,SAClC,iBAAkC,YAA2D;CAE7F,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,sBAAsB,OAAO,GAChD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,eAAe;CACtC,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Ig as ContractCategoryGrantWrite, Lg as ContractCategoryGrantRead, Pg as ContractProviderWrite, __ as CategoryExclusionRead, g_ as CategoryExclusionWrite } from "../chunks/index.js";
2
+ import { M_ as CategoryExclusionRead, Qg as ContractCategoryGrantRead, Yg as ContractProviderWrite, Zg as ContractCategoryGrantWrite, j_ as CategoryExclusionWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/admin-contracts/admin-contracts.d.ts
5
5
  export declare const getCreateContractCategoryGrantUrl: (contractId: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"admin-contracts.js","names":[],"sources":["../../src/api/admin-contracts/admin-contracts.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.1\n */\nimport type {\n CategoryExclusionRead,\n CategoryExclusionWrite,\n ContractCategoryGrantRead,\n ContractCategoryGrantWrite,\n ContractProviderWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getCreateContractCategoryGrantUrl = (contractId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants`\n}\n\n/**\n * Grant VIEW on one category and optional provider; null is explicitly unrestricted.\n *\n * This changes permission only. No paid licence or external account is created.\n * Existing contract/beneficiary windows and provider seat checks still apply.\n * @summary Create Contract Category Grant\n */\nexport const createContractCategoryGrant = async (contractId: number,\n contractCategoryGrantWrite: ContractCategoryGrantWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\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<ContractCategoryGrantRead>(getCreateContractCategoryGrantUrl(contractId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractCategoryGrantWrite)\n }\n);}\n\n\nexport const getRevokeContractCategoryGrantUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}`\n}\n\n/**\n * Deactivate a line without deleting its consumption/audit references.\n * @summary Revoke Contract Category Grant\n */\nexport const revokeContractCategoryGrant = async (contractId: number,\n grantId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRevokeContractCategoryGrantUrl(contractId,grantId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getSetContractGrantProviderUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}/provider`\n}\n\n/**\n * Restrict this existing line, retaining its ID, acts, history and dates.\n *\n * Other unrestricted/overlapping lines can still permit a provider. Inspect\n * the contract's complete grant list before claiming it is YouScribe-only.\n * @summary Set Contract Grant Provider\n */\nexport const setContractGrantProvider = async (contractId: number,\n grantId: number,\n contractProviderWrite: ContractProviderWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\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<ContractCategoryGrantRead>(getSetContractGrantProviderUrl(contractId,grantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractProviderWrite)\n }\n);}\n\n\nexport const getCreateCategoryProviderExclusionUrl = (tenantId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions`\n}\n\n/**\n * Deny a category/provider pair; userId narrows the deny to that profile.\n *\n * The exclusion applies across the customer's contracts and can only reduce\n * access. Other profiles, including other household members, are unaffected\n * when userId is set. Null provider explicitly covers every applicable provider.\n * @summary Create Category Provider Exclusion\n */\nexport const createCategoryProviderExclusion = async (tenantId: number,\n categoryExclusionWrite: CategoryExclusionWrite, options?: Parameters<typeof request>[1]): Promise<CategoryExclusionRead> => {\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<CategoryExclusionRead>(getCreateCategoryProviderExclusionUrl(tenantId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryExclusionWrite)\n }\n);}\n\n\nexport const getRemoveCategoryProviderExclusionUrl = (tenantId: number,\n exclusionId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions/${exclusionId}`\n}\n\n/**\n * Remove this restriction; a valid contract grant is still required.\n * @summary Remove Category Provider Exclusion\n */\nexport const removeCategoryProviderExclusion = async (tenantId: number,\n exclusionId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveCategoryProviderExclusionUrl(tenantId,exclusionId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAiBA,MAAa,qCAAqC,eAAwB;CAKxE,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contracts.js","names":[],"sources":["../../src/api/admin-contracts/admin-contracts.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.2\n */\nimport type {\n CategoryExclusionRead,\n CategoryExclusionWrite,\n ContractCategoryGrantRead,\n ContractCategoryGrantWrite,\n ContractProviderWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getCreateContractCategoryGrantUrl = (contractId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants`\n}\n\n/**\n * Grant VIEW on one category and optional provider; null is explicitly unrestricted.\n *\n * This changes permission only. No paid licence or external account is created.\n * Existing contract/beneficiary windows and provider seat checks still apply.\n * @summary Create Contract Category Grant\n */\nexport const createContractCategoryGrant = async (contractId: number,\n contractCategoryGrantWrite: ContractCategoryGrantWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\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<ContractCategoryGrantRead>(getCreateContractCategoryGrantUrl(contractId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractCategoryGrantWrite)\n }\n);}\n\n\nexport const getRevokeContractCategoryGrantUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}`\n}\n\n/**\n * Deactivate a line without deleting its consumption/audit references.\n * @summary Revoke Contract Category Grant\n */\nexport const revokeContractCategoryGrant = async (contractId: number,\n grantId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRevokeContractCategoryGrantUrl(contractId,grantId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getSetContractGrantProviderUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}/provider`\n}\n\n/**\n * Restrict this existing line, retaining its ID, acts, history and dates.\n *\n * Other unrestricted/overlapping lines can still permit a provider. Inspect\n * the contract's complete grant list before claiming it is YouScribe-only.\n * @summary Set Contract Grant Provider\n */\nexport const setContractGrantProvider = async (contractId: number,\n grantId: number,\n contractProviderWrite: ContractProviderWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\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<ContractCategoryGrantRead>(getSetContractGrantProviderUrl(contractId,grantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractProviderWrite)\n }\n);}\n\n\nexport const getCreateCategoryProviderExclusionUrl = (tenantId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions`\n}\n\n/**\n * Deny a category/provider pair; userId narrows the deny to that profile.\n *\n * The exclusion applies across the customer's contracts and can only reduce\n * access. Other profiles, including other household members, are unaffected\n * when userId is set. Null provider explicitly covers every applicable provider.\n * @summary Create Category Provider Exclusion\n */\nexport const createCategoryProviderExclusion = async (tenantId: number,\n categoryExclusionWrite: CategoryExclusionWrite, options?: Parameters<typeof request>[1]): Promise<CategoryExclusionRead> => {\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<CategoryExclusionRead>(getCreateCategoryProviderExclusionUrl(tenantId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryExclusionWrite)\n }\n);}\n\n\nexport const getRemoveCategoryProviderExclusionUrl = (tenantId: number,\n exclusionId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions/${exclusionId}`\n}\n\n/**\n * Remove this restriction; a valid contract grant is still required.\n * @summary Remove Category Provider Exclusion\n */\nexport const removeCategoryProviderExclusion = async (tenantId: number,\n exclusionId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveCategoryProviderExclusionUrl(tenantId,exclusionId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAiBA,MAAa,qCAAqC,eAAwB;CAKxE,OAAO,oBAAoB,WAAW;AACxC;;;;;;;;AASA,MAAa,8BAA8B,OAAO,YAC9C,4BAAwD,YAAgF;CAExI,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,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,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,qBAAqB;CAC5C,CACF;AAAE;AAGF,MAAa,yCAAyC,aAAsB;CAK1E,OAAO,kBAAkB,SAAS;AACpC;;;;;;;;;AAUA,MAAa,kCAAkC,OAAO,UAClD,wBAAgD,YAA4E;CAE5H,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,QAA+B,sCAAsC,QAAQ,GAClF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,sBAAsB;CAC7C,CACF;AAAE;AAGF,MAAa,yCAAyC,UAClD,gBAAyB;CAK3B,OAAO,kBAAkB,SAAS,0BAA0B;AAC9D;;;;;AAMA,MAAa,kCAAkC,OAAO,UAClD,aAAqB,YAA2D;CAElF,OAAO,QAAc,sCAAsC,UAAS,WAAW,GAC/E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Ch as CustomerAdministratorRead, Eh as CustomerAdminInviteWrite, Gv as BeneficiaryInviteWrite, H_ as BodyUploadOrganizationLogo, Ha as ListBeneficiaryImportsParams, Ia as ListCustomerAuditParams, Im as CustomerTutorialListRead, In as PreviewBeneficiaryFileParams, Jt as ReadCustomerDashboardParams, Jv as BeneficiaryImportRead, Ma as ListCustomerRequestsParams, Na as ListCustomerContractsParams, Pa as ListCustomerBeneficiariesParams, Qm as CustomerOrganizationRead, Qv as BeneficiaryBulkRead, Rm as CustomerSettingsWrite, Rv as BeneficiaryUpdateWrite, Sh as CustomerAdministratorListRead, Ti as OrganizationContactsRead, Um as CustomerRequestPage, Uu as ExportBeneficiariesParams, Uv as BeneficiaryInvitationCorrectionWrite, Vv as BeneficiaryInvitationRead, W_ as BodyPreviewBeneficiaryFile, Wm as CustomerRequestRead, Wv as BeneficiaryImportPreviewWrite, Xm as CustomerOverviewRead, Xv as BeneficiaryBulkWrite, Yt as ReadCustomerContractUsageParams, Zm as CustomerOrganizationUpdateWrite, fh as CustomerContractPage, gh as CustomerContactListRead, jh as CustomerActivationRead, oh as CustomerDomainsWrite, qm as CustomerPatronPage, qt as ReadCustomerOrganizationOverviewParams, qv as BeneficiaryImportPage, sh as CustomerDashboardRead, uh as CustomerContractUsageRead, wi as OrganizationContactsWrite, xh as CustomerAdminUpdateWrite, yh as CustomerAuditPage, zm as CustomerRequestWrite, zv as BeneficiaryUpdateRead } from "../chunks/index.js";
2
+ import { $m as CustomerSettingsWrite, $v as BeneficiaryUpdateWrite, Dh as CustomerContractPage, Ih as CustomerAdminUpdateWrite, Ja as ListCustomerBeneficiariesParams, Ka as ListCustomerRequestsParams, Kh as CustomerActivationRead, Lh as CustomerAdministratorListRead, Li as OrganizationContactsWrite, Ph as CustomerAuditPage, Rh as CustomerAdministratorRead, Ri as OrganizationContactsRead, Sh as CustomerDashboardRead, Th as CustomerContractUsageRead, Vh as CustomerAdminInviteWrite, Xa as ListCustomerAuditParams, Yn as PreviewBeneficiaryFileParams, Zm as CustomerTutorialListRead, ah as CustomerRequestRead, av as BodyPreviewBeneficiaryFile, ay as BeneficiaryImportPreviewWrite, ch as CustomerPatronPage, cn as ReadCustomerContractUsageParams, cy as BeneficiaryImportPage, dh as CustomerOverviewRead, dy as BeneficiaryBulkWrite, eh as CustomerRequestWrite, ey as BeneficiaryUpdateRead, fh as CustomerOrganizationUpdateWrite, ih as CustomerRequestPage, iy as BeneficiaryInvitationCorrectionWrite, jh as CustomerContactListRead, ly as BeneficiaryImportRead, no as ListBeneficiaryImportsParams, ny as BeneficiaryInvitationRead, on as ReadCustomerOrganizationOverviewParams, oy as BeneficiaryInviteWrite, ph as CustomerOrganizationRead, py as BeneficiaryBulkRead, qa as ListCustomerContractsParams, rd as ExportBeneficiariesParams, rv as BodyUploadOrganizationLogo, sn as ReadCustomerDashboardParams, xh as CustomerDomainsWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/admin-customer/admin-customer.d.ts
5
5
  export declare const getListCustomerTutorialsUrl: () => string;