@learnorama/mozaik-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/README.md +94 -0
  2. package/dist/api/account.d.ts +75 -0
  3. package/dist/api/account.js +117 -0
  4. package/dist/api/account.js.map +1 -0
  5. package/dist/api/admin-catalogue.d.ts +68 -0
  6. package/dist/api/admin-catalogue.js +155 -0
  7. package/dist/api/admin-catalogue.js.map +1 -0
  8. package/dist/api/admin-consumption.d.ts +27 -0
  9. package/dist/api/admin-consumption.js +55 -0
  10. package/dist/api/admin-consumption.js.map +1 -0
  11. package/dist/api/admin-licenses.d.ts +21 -0
  12. package/dist/api/admin-licenses.js +34 -0
  13. package/dist/api/admin-licenses.js.map +1 -0
  14. package/dist/api/admin-patrons.d.ts +36 -0
  15. package/dist/api/admin-patrons.js +76 -0
  16. package/dist/api/admin-patrons.js.map +1 -0
  17. package/dist/api/admin-reviews.d.ts +30 -0
  18. package/dist/api/admin-reviews.js +63 -0
  19. package/dist/api/admin-reviews.js.map +1 -0
  20. package/dist/api/admin-roles.d.ts +34 -0
  21. package/dist/api/admin-roles.js +62 -0
  22. package/dist/api/admin-roles.js.map +1 -0
  23. package/dist/api/admin-support.d.ts +68 -0
  24. package/dist/api/admin-support.js +116 -0
  25. package/dist/api/admin-support.js.map +1 -0
  26. package/dist/api/admin-tenants.d.ts +33 -0
  27. package/dist/api/admin-tenants.js +68 -0
  28. package/dist/api/admin-tenants.js.map +1 -0
  29. package/dist/api/admin-tutoring.d.ts +159 -0
  30. package/dist/api/admin-tutoring.js +455 -0
  31. package/dist/api/admin-tutoring.js.map +1 -0
  32. package/dist/api/auth.d.ts +92 -0
  33. package/dist/api/auth.js +192 -0
  34. package/dist/api/auth.js.map +1 -0
  35. package/dist/api/biblio-catalogue.d.ts +122 -0
  36. package/dist/api/biblio-catalogue.js +223 -0
  37. package/dist/api/biblio-catalogue.js.map +1 -0
  38. package/dist/api/biblio-home.d.ts +18 -0
  39. package/dist/api/biblio-home.js +31 -0
  40. package/dist/api/biblio-home.js.map +1 -0
  41. package/dist/api/biblio-library.d.ts +94 -0
  42. package/dist/api/biblio-library.js +187 -0
  43. package/dist/api/biblio-library.js.map +1 -0
  44. package/dist/api/biblio-nextory.d.ts +43 -0
  45. package/dist/api/biblio-nextory.js +65 -0
  46. package/dist/api/biblio-nextory.js.map +1 -0
  47. package/dist/api/biblio-press.d.ts +38 -0
  48. package/dist/api/biblio-press.js +70 -0
  49. package/dist/api/biblio-press.js.map +1 -0
  50. package/dist/api/biblio-search.d.ts +17 -0
  51. package/dist/api/biblio-search.js +30 -0
  52. package/dist/api/biblio-search.js.map +1 -0
  53. package/dist/api/biblio-telemetry.d.ts +28 -0
  54. package/dist/api/biblio-telemetry.js +49 -0
  55. package/dist/api/biblio-telemetry.js.map +1 -0
  56. package/dist/api/consumption.d.ts +30 -0
  57. package/dist/api/consumption.js +45 -0
  58. package/dist/api/consumption.js.map +1 -0
  59. package/dist/api/cvs-app.d.ts +39 -0
  60. package/dist/api/cvs-app.js +72 -0
  61. package/dist/api/cvs-app.js.map +1 -0
  62. package/dist/api/cvs-documents.d.ts +106 -0
  63. package/dist/api/cvs-documents.js +208 -0
  64. package/dist/api/cvs-documents.js.map +1 -0
  65. package/dist/api/cvs-favorites.d.ts +53 -0
  66. package/dist/api/cvs-favorites.js +82 -0
  67. package/dist/api/cvs-favorites.js.map +1 -0
  68. package/dist/api/cvs-loans.d.ts +59 -0
  69. package/dist/api/cvs-loans.js +106 -0
  70. package/dist/api/cvs-loans.js.map +1 -0
  71. package/dist/api/cvs-streaming.d.ts +40 -0
  72. package/dist/api/cvs-streaming.js +68 -0
  73. package/dist/api/cvs-streaming.js.map +1 -0
  74. package/dist/api/index.d.ts +34 -0
  75. package/dist/api/index.js +34 -0
  76. package/dist/api/partner-catalogue.d.ts +77 -0
  77. package/dist/api/partner-catalogue.js +125 -0
  78. package/dist/api/partner-catalogue.js.map +1 -0
  79. package/dist/api/partner-reader.d.ts +56 -0
  80. package/dist/api/partner-reader.js +103 -0
  81. package/dist/api/partner-reader.js.map +1 -0
  82. package/dist/api/profiles.d.ts +64 -0
  83. package/dist/api/profiles.js +126 -0
  84. package/dist/api/profiles.js.map +1 -0
  85. package/dist/api/tutoring-catalogue.d.ts +32 -0
  86. package/dist/api/tutoring-catalogue.js +59 -0
  87. package/dist/api/tutoring-catalogue.js.map +1 -0
  88. package/dist/api/tutoring-chat.d.ts +31 -0
  89. package/dist/api/tutoring-chat.js +71 -0
  90. package/dist/api/tutoring-chat.js.map +1 -0
  91. package/dist/api/tutoring-dispatch.d.ts +37 -0
  92. package/dist/api/tutoring-dispatch.js +83 -0
  93. package/dist/api/tutoring-dispatch.js.map +1 -0
  94. package/dist/api/tutoring-practitioner.d.ts +55 -0
  95. package/dist/api/tutoring-practitioner.js +110 -0
  96. package/dist/api/tutoring-practitioner.js.map +1 -0
  97. package/dist/api/tutoring-requests.d.ts +86 -0
  98. package/dist/api/tutoring-requests.js +176 -0
  99. package/dist/api/tutoring-requests.js.map +1 -0
  100. package/dist/client-BDwBZYB0.d.ts +28 -0
  101. package/dist/client-D3kMOcIr.js +61 -0
  102. package/dist/client-D3kMOcIr.js.map +1 -0
  103. package/dist/index-wL_20vR8.d.ts +4566 -0
  104. package/dist/index.d.ts +9 -0
  105. package/dist/index.js +10 -0
  106. package/dist/index.js.map +1 -0
  107. package/dist/models.d.ts +3 -0
  108. package/dist/models.js +175 -0
  109. package/dist/models.js.map +1 -0
  110. package/dist/react/account.d.ts +163 -0
  111. package/dist/react/account.js +240 -0
  112. package/dist/react/account.js.map +1 -0
  113. package/dist/react/admin-catalogue.d.ts +196 -0
  114. package/dist/react/admin-catalogue.js +336 -0
  115. package/dist/react/admin-catalogue.js.map +1 -0
  116. package/dist/react/admin-consumption.d.ts +75 -0
  117. package/dist/react/admin-consumption.js +127 -0
  118. package/dist/react/admin-consumption.js.map +1 -0
  119. package/dist/react/admin-licenses.d.ts +50 -0
  120. package/dist/react/admin-licenses.js +78 -0
  121. package/dist/react/admin-licenses.js.map +1 -0
  122. package/dist/react/admin-patrons.d.ts +111 -0
  123. package/dist/react/admin-patrons.js +173 -0
  124. package/dist/react/admin-patrons.js.map +1 -0
  125. package/dist/react/admin-reviews.d.ts +78 -0
  126. package/dist/react/admin-reviews.js +135 -0
  127. package/dist/react/admin-reviews.js.map +1 -0
  128. package/dist/react/admin-roles.d.ts +82 -0
  129. package/dist/react/admin-roles.js +135 -0
  130. package/dist/react/admin-roles.js.map +1 -0
  131. package/dist/react/admin-support.d.ts +123 -0
  132. package/dist/react/admin-support.js +208 -0
  133. package/dist/react/admin-support.js.map +1 -0
  134. package/dist/react/admin-tenants.d.ts +108 -0
  135. package/dist/react/admin-tenants.js +165 -0
  136. package/dist/react/admin-tenants.js.map +1 -0
  137. package/dist/react/admin-tutoring.d.ts +556 -0
  138. package/dist/react/admin-tutoring.js +954 -0
  139. package/dist/react/admin-tutoring.js.map +1 -0
  140. package/dist/react/auth.d.ts +220 -0
  141. package/dist/react/auth.js +372 -0
  142. package/dist/react/auth.js.map +1 -0
  143. package/dist/react/biblio-catalogue.d.ts +374 -0
  144. package/dist/react/biblio-catalogue.js +498 -0
  145. package/dist/react/biblio-catalogue.js.map +1 -0
  146. package/dist/react/biblio-home.d.ts +47 -0
  147. package/dist/react/biblio-home.js +75 -0
  148. package/dist/react/biblio-home.js.map +1 -0
  149. package/dist/react/biblio-library.d.ts +285 -0
  150. package/dist/react/biblio-library.js +411 -0
  151. package/dist/react/biblio-library.js.map +1 -0
  152. package/dist/react/biblio-nextory.d.ts +100 -0
  153. package/dist/react/biblio-nextory.js +163 -0
  154. package/dist/react/biblio-nextory.js.map +1 -0
  155. package/dist/react/biblio-press.d.ts +121 -0
  156. package/dist/react/biblio-press.js +163 -0
  157. package/dist/react/biblio-press.js.map +1 -0
  158. package/dist/react/biblio-search.d.ts +46 -0
  159. package/dist/react/biblio-search.js +74 -0
  160. package/dist/react/biblio-search.js.map +1 -0
  161. package/dist/react/biblio-telemetry.d.ts +49 -0
  162. package/dist/react/biblio-telemetry.js +85 -0
  163. package/dist/react/biblio-telemetry.js.map +1 -0
  164. package/dist/react/consumption.d.ts +66 -0
  165. package/dist/react/consumption.js +109 -0
  166. package/dist/react/consumption.js.map +1 -0
  167. package/dist/react/cvs-app.d.ts +86 -0
  168. package/dist/react/cvs-app.js +144 -0
  169. package/dist/react/cvs-app.js.map +1 -0
  170. package/dist/react/cvs-documents.d.ts +254 -0
  171. package/dist/react/cvs-documents.js +418 -0
  172. package/dist/react/cvs-documents.js.map +1 -0
  173. package/dist/react/cvs-favorites.d.ts +143 -0
  174. package/dist/react/cvs-favorites.js +206 -0
  175. package/dist/react/cvs-favorites.js.map +1 -0
  176. package/dist/react/cvs-loans.d.ts +140 -0
  177. package/dist/react/cvs-loans.js +234 -0
  178. package/dist/react/cvs-loans.js.map +1 -0
  179. package/dist/react/cvs-streaming.d.ts +87 -0
  180. package/dist/react/cvs-streaming.js +141 -0
  181. package/dist/react/cvs-streaming.js.map +1 -0
  182. package/dist/react/index.d.ts +34 -0
  183. package/dist/react/index.js +34 -0
  184. package/dist/react/partner-catalogue.d.ts +223 -0
  185. package/dist/react/partner-catalogue.js +301 -0
  186. package/dist/react/partner-catalogue.js.map +1 -0
  187. package/dist/react/partner-reader.d.ts +159 -0
  188. package/dist/react/partner-reader.js +226 -0
  189. package/dist/react/partner-reader.js.map +1 -0
  190. package/dist/react/profiles.d.ts +174 -0
  191. package/dist/react/profiles.js +279 -0
  192. package/dist/react/profiles.js.map +1 -0
  193. package/dist/react/tutoring-catalogue.d.ts +115 -0
  194. package/dist/react/tutoring-catalogue.js +151 -0
  195. package/dist/react/tutoring-catalogue.js.map +1 -0
  196. package/dist/react/tutoring-chat.d.ts +96 -0
  197. package/dist/react/tutoring-chat.js +172 -0
  198. package/dist/react/tutoring-chat.js.map +1 -0
  199. package/dist/react/tutoring-dispatch.d.ts +102 -0
  200. package/dist/react/tutoring-dispatch.js +183 -0
  201. package/dist/react/tutoring-dispatch.js.map +1 -0
  202. package/dist/react/tutoring-practitioner.d.ts +129 -0
  203. package/dist/react/tutoring-practitioner.js +230 -0
  204. package/dist/react/tutoring-practitioner.js.map +1 -0
  205. package/dist/react/tutoring-requests.d.ts +233 -0
  206. package/dist/react/tutoring-requests.js +385 -0
  207. package/dist/react/tutoring-requests.js.map +1 -0
  208. package/package.json +58 -0
@@ -0,0 +1,4566 @@
1
+
2
+ //#region src/models/product.d.ts
3
+ /**
4
+ * Generated by orval 🍺
5
+ * Do not edit manually.
6
+ * Mozaik backend
7
+ * 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.
8
+ * OpenAPI spec version: 0.1.0
9
+ */
10
+ /**
11
+ * Which of the three platforms a functional grant applies to.
12
+ *
13
+ * One API serves three products, and a tenant can offer more than one of them
14
+ * — a library with a Prof Express contract is one organisation whose patrons
15
+ * borrow books *and* whose pupils ask questions (the legacy says so itself
16
+ * with ``students.library`` and ``inquiries.for_librarian``). So the product is
17
+ * its own axis rather than something ``tenant_id`` implies.
18
+ *
19
+ * Not :class:`LegacySource`, which looks similar and means something else:
20
+ * that records where a migrated row *came from* and is null for anything
21
+ * created since. This says what a grant is *for*.
22
+ */
23
+ type Product = typeof Product[keyof typeof Product];
24
+ declare const Product: {
25
+ readonly biblio: 'biblio';
26
+ readonly mediatheques: 'mediatheques';
27
+ readonly prof_express: 'prof_express';
28
+ };
29
+ //#endregion
30
+ //#region src/models/productRole.d.ts
31
+ /**
32
+ * Generated by orval 🍺
33
+ * Do not edit manually.
34
+ * Mozaik backend
35
+ * 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.
36
+ * OpenAPI spec version: 0.1.0
37
+ */
38
+ /**
39
+ * What kind of participant somebody is, in one product at one tenant.
40
+ *
41
+ * The vocabulary is **per product**, which is the point: Prof Express has
42
+ * pupils and teachers, and biblio has no such thing. A product that needs no
43
+ * functional roles simply has no rows — nothing forces a shared vocabulary,
44
+ * and adding a role to one product is an ``INSERT`` rather than a Keycloak
45
+ * change or a migration.
46
+ *
47
+ * Deliberately *not* Keycloak realm roles. The broker knows whether somebody
48
+ * is an end user or internal staff (:class:`RoleKind`); it does not know that
49
+ * user 42 teaches at works-council 3. Keeping these out of the realm keeps
50
+ * Keycloak off the write path for grants, and avoids the realm-and-enum
51
+ * lockstep that has already broken once.
52
+ *
53
+ * Valid pairings are declared in :data:`PRODUCT_ROLES` rather than as a CHECK
54
+ * constraint: the set will change as the products do, and a migration per
55
+ * product decision is a tax with no payer.
56
+ *
57
+ * Pupil and parent are explicit rather than derived from ``User.parent_id``.
58
+ * Deriving them is too clever — a parent who has not added a child yet is
59
+ * indistinguishable from a pupil — and the legacy makes the same distinction
60
+ * with its ``role:student`` / ``role:parent`` middleware.
61
+ */
62
+ type ProductRole = typeof ProductRole[keyof typeof ProductRole];
63
+ declare const ProductRole: {
64
+ readonly student: 'student';
65
+ readonly parent: 'parent';
66
+ readonly teacher: 'teacher';
67
+ readonly dispatcher: 'dispatcher';
68
+ readonly coach: 'coach';
69
+ readonly librarian: 'librarian';
70
+ readonly support: 'support';
71
+ };
72
+ //#endregion
73
+ //#region src/models/productRoleRead.d.ts
74
+ /**
75
+ * One functional grant: what this account is, where, in which product.
76
+ *
77
+ * The frontend's answer to "am I a pupil, a parent or a teacher" — which is
78
+ * not in the token and deliberately so, because a Keycloak realm role says
79
+ * nothing about which tenant or which product it applies to. See
80
+ * :class:`app.models.enums.ProductRole`.
81
+ */
82
+ interface ProductRoleRead {
83
+ product: Product;
84
+ role: ProductRole;
85
+ tenantId: number;
86
+ }
87
+ //#endregion
88
+ //#region src/models/accountDetailRead.d.ts
89
+ /**
90
+ * The authenticated account in full (E15, ``GET /me``).
91
+ *
92
+ * Distinct from :class:`app.datamodels.auth.AccountRead`, which is the short
93
+ * summary embedded in a login response. This is the account *resource*.
94
+ *
95
+ * The shape follows ``app.models.identity.User`` rather than the spec's field
96
+ * list, because the spec was describing the legacy wire format and three of its
97
+ * fields have no column behind them any more:
98
+ *
99
+ * ``clientId`` is ``tenant_id`` here — the tenant *is* the customer company, and
100
+ * calling the same thing two names across one API is how the legacy ended up
101
+ * with ``/profile/{id}`` beside ``/profiles``.
102
+ *
103
+ * ``contactPrefs`` was an integer bitmask; the model carries two explicit
104
+ * booleans instead, which is what the code actually branched on.
105
+ *
106
+ * ``productRoles`` is new rather than ported: it is how a client knows which
107
+ * interface to render. The legacy asks Keycloak — its mobile API gates on
108
+ * ``role:student`` and ``role:parent`` middleware reading realm roles — which
109
+ * cannot express "a teacher at this council and a patron at that library".
110
+ *
111
+ * ``isCE`` is not here. It asked whether the account belongs to a works
112
+ * council, which is a property of the *tenant*, not the user — read it from the
113
+ * tenant rather than denormalising it onto every account response.
114
+ *
115
+ * ``avatar`` is a string, matching the column. See
116
+ * :class:`app.datamodels.biblio.profiles.ProfileRead` for the same call.
117
+ */
118
+ interface AccountDetailRead {
119
+ acceptsContact?: boolean | null;
120
+ acceptsPartnerContact?: boolean | null;
121
+ avatar?: string | null;
122
+ birthDate?: string | null;
123
+ email?: string | null;
124
+ firstName: string;
125
+ isAccountHolder: boolean;
126
+ isActive: boolean;
127
+ isGeneric: boolean;
128
+ isGuest: boolean;
129
+ isPendingActivation: boolean;
130
+ lastLoginAt?: string | null;
131
+ lastName?: string | null;
132
+ login: string;
133
+ memberNumber?: string | null;
134
+ parentId?: number | null;
135
+ productRoles?: ProductRoleRead[];
136
+ tenantId: number;
137
+ userId: number;
138
+ }
139
+ //#endregion
140
+ //#region src/models/accountRead.d.ts
141
+ /**
142
+ * Generated by orval 🍺
143
+ * Do not edit manually.
144
+ * Mozaik backend
145
+ * 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.
146
+ * OpenAPI spec version: 0.1.0
147
+ */
148
+ /**
149
+ * The local ``app_user`` row the session resolved to.
150
+ *
151
+ * Distinct from ``biblio.account.AccountRead``, which is the full patron profile
152
+ * the product API returns. This is the identity-layer summary: enough to render
153
+ * a name and to confirm the link happened, and nothing that would make it worth
154
+ * caching.
155
+ */
156
+ interface AccountRead {
157
+ email?: string | null;
158
+ firstName: string;
159
+ id: number;
160
+ isActive: boolean;
161
+ lastLoginAt?: string | null;
162
+ lastName?: string | null;
163
+ login: string;
164
+ tenantId: number;
165
+ }
166
+ //#endregion
167
+ //#region src/models/accountUpdateWrite.d.ts
168
+ /**
169
+ * Generated by orval 🍺
170
+ * Do not edit manually.
171
+ * Mozaik backend
172
+ * 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.
173
+ * OpenAPI spec version: 0.1.0
174
+ */
175
+ /**
176
+ * Partial update of the authenticated account (E16, ``PATCH /me``).
177
+ *
178
+ * Every field optional — that is the point of the verb. The legacy
179
+ * ``POST /account/edit`` required ``firstName`` and ``email`` on every call with
180
+ * no presence check, so omitting one produced a PHP warning rather than a
181
+ * ``400``.
182
+ *
183
+ * **``email`` is deliberately absent.** It arrives from the identity provider and
184
+ * is re-synced on every federated login, so a local edit would be silently
185
+ * reverted the next time the member signs in — and email is an identity key, not
186
+ * a preference. Changing it is a change at the provider.
187
+ *
188
+ * The response is a full :class:`AccountDetailRead` built from the *persisted*
189
+ * row. Do not echo the submitted values: the legacy did, and silently dropped
190
+ * the contact fields from what it echoed.
191
+ */
192
+ interface AccountUpdateWrite {
193
+ acceptsContact?: boolean | null;
194
+ acceptsPartnerContact?: boolean | null;
195
+ avatar?: string | null;
196
+ birthDate?: string | null;
197
+ firstName?: string | null;
198
+ lastName?: string | null;
199
+ }
200
+ //#endregion
201
+ //#region src/models/aiDraftRead.d.ts
202
+ /**
203
+ * Generated by orval 🍺
204
+ * Do not edit manually.
205
+ * Mozaik backend
206
+ * 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.
207
+ * OpenAPI spec version: 0.1.0
208
+ */
209
+ /**
210
+ * A model's first pass, as the reviewing practitioner sees it.
211
+ *
212
+ * ``answer`` is shown beside the pupil's statement, not in place of it. The
213
+ * draft is a starting point a person edits; the schema's ``vote`` and
214
+ * ``escalatedAt`` exist because nothing here is sendable as it stands.
215
+ *
216
+ * ``model`` and ``promptRef`` are on the wire deliberately. A reviewer who can
217
+ * see that two bad drafts came from the same prompt version can say so, and
218
+ * the pair is also what makes one generation accountable afterwards.
219
+ */
220
+ interface AiDraftRead {
221
+ answer: string;
222
+ createdAt: string;
223
+ escalatedAt?: string | null;
224
+ id: number;
225
+ model: string;
226
+ promptRef?: string | null;
227
+ requestId: number;
228
+ reviewedById?: number | null;
229
+ vote?: number | null;
230
+ }
231
+ //#endregion
232
+ //#region src/models/aiDraftReviewWrite.d.ts
233
+ /**
234
+ * Generated by orval 🍺
235
+ * Do not edit manually.
236
+ * Mozaik backend
237
+ * 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.
238
+ * OpenAPI spec version: 0.1.0
239
+ */
240
+ /**
241
+ * A practitioner's verdict on a draft.
242
+ *
243
+ * ``escalate`` is not derived from a low ``vote``. A reviewer may rate a draft
244
+ * poorly and still keep it as a starting point, or rate it well and hand the
245
+ * request to a person anyway because the pupil needs a conversation. Making
246
+ * one imply the other would record a decision nobody made.
247
+ */
248
+ interface AiDraftReviewWrite {
249
+ escalate?: boolean;
250
+ /**
251
+ * @minimum 1
252
+ * @maximum 5
253
+ */
254
+ vote: number;
255
+ }
256
+ //#endregion
257
+ //#region src/models/attachmentRole.d.ts
258
+ /**
259
+ * Generated by orval 🍺
260
+ * Do not edit manually.
261
+ * Mozaik backend
262
+ * 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.
263
+ * OpenAPI spec version: 0.1.0
264
+ */
265
+ /**
266
+ * Which side of the exchange a file belongs to.
267
+ *
268
+ * The legacy carries three ``text NOT NULL`` columns — ``documents``,
269
+ * ``drawings``, ``answer_documents`` — each holding a serialised list of paths,
270
+ * so a file has no size, no type, no uploader and no timestamp, and an empty
271
+ * list is the string ``''``. One row per file, with a role, replaces all three.
272
+ */
273
+ type AttachmentRole = typeof AttachmentRole[keyof typeof AttachmentRole];
274
+ declare const AttachmentRole: {
275
+ readonly question: 'question';
276
+ readonly sketch: 'sketch';
277
+ readonly answer: 'answer';
278
+ };
279
+ //#endregion
280
+ //#region src/models/authorizationParams.d.ts
281
+ /**
282
+ * Generated by orval 🍺
283
+ * Do not edit manually.
284
+ * Mozaik backend
285
+ * 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.
286
+ * OpenAPI spec version: 0.1.0
287
+ */
288
+ type AuthorizationParams = {
289
+ /**
290
+ * @maxLength 2048
291
+ */
292
+ redirect_uri: string;
293
+ /**
294
+ * @minLength 43
295
+ * @maxLength 128
296
+ */
297
+ code_challenge: string;
298
+ /**
299
+ * @minLength 8
300
+ * @maxLength 512
301
+ */
302
+ state: string;
303
+ nonce?: string | null;
304
+ provider?: string | null;
305
+ prompt?: string | null;
306
+ };
307
+ //#endregion
308
+ //#region src/models/authorizationRead.d.ts
309
+ /**
310
+ * Generated by orval 🍺
311
+ * Do not edit manually.
312
+ * Mozaik backend
313
+ * 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.
314
+ * OpenAPI spec version: 0.1.0
315
+ */
316
+ /**
317
+ * Where to send the browser to start a login.
318
+ *
319
+ * The URL is assembled server-side because choosing the identity provider is a
320
+ * *data* decision — host to tenant to partner — and the client has no business
321
+ * knowing the partner list. The client still owns PKCE: it generated the
322
+ * verifier, it keeps the verifier, and it sends only the challenge.
323
+ *
324
+ * ``provider`` echoes the alias that was resolved so a client can log or
325
+ * display it; when it is null, Keycloak will authenticate the user itself with
326
+ * a local credential.
327
+ */
328
+ interface AuthorizationRead {
329
+ authorizationUrl: string;
330
+ provider?: string | null;
331
+ }
332
+ //#endregion
333
+ //#region src/models/bodyUploadAttachment.d.ts
334
+ /**
335
+ * Generated by orval 🍺
336
+ * Do not edit manually.
337
+ * Mozaik backend
338
+ * 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.
339
+ * OpenAPI spec version: 0.1.0
340
+ */
341
+ interface BodyUploadAttachment {
342
+ file: Blob;
343
+ }
344
+ //#endregion
345
+ //#region src/models/entitlementAct.d.ts
346
+ /**
347
+ * Generated by orval 🍺
348
+ * Do not edit manually.
349
+ * Mozaik backend
350
+ * 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.
351
+ * OpenAPI spec version: 0.1.0
352
+ */
353
+ /**
354
+ * What a grant permits somebody to *do* with a work.
355
+ *
356
+ * Recovered from ``mediadb.exemp``, which flattens a 4x7 matrix into 48
357
+ * columns: four acts — ``is_streaming``, ``is_download``, ``is_pret_streaming``,
358
+ * ``is_pret_download`` — each repeating the same seven limits (allowed, units
359
+ * granted, units left, max duration, duration unit, device cap, concurrent-user
360
+ * cap), plus ``is_extend`` / ``nb_extend`` on the side.
361
+ *
362
+ * That matrix is the whole reason this enum exists. Four acts x seven limits as
363
+ * columns means a fifth act costs a migration and seven more columns; as rows it
364
+ * costs an INSERT. ``jetons.consulterpret`` draws the same consult/loan line at
365
+ * the patron tier, which is corroboration rather than a second vocabulary.
366
+ *
367
+ * Biblio has no equivalent: its grant is boolean and maps to ``VIEW`` alone.
368
+ */
369
+ type EntitlementAct = typeof EntitlementAct[keyof typeof EntitlementAct];
370
+ declare const EntitlementAct: {
371
+ readonly view: 'view';
372
+ readonly download: 'download';
373
+ readonly loan_view: 'loan_view';
374
+ readonly loan_download: 'loan_download';
375
+ readonly extend: 'extend';
376
+ readonly tutor: 'tutor';
377
+ };
378
+ //#endregion
379
+ //#region src/models/borrowWrite.d.ts
380
+ /**
381
+ * Take a loan out.
382
+ *
383
+ * ``act`` chooses between borrowing to consume in place and borrowing with a
384
+ * copy taken away — the legacy's ``pret_streaming`` and ``pret_download``. They
385
+ * are separate acts with separate quotas on the grant, so the client has to say
386
+ * which.
387
+ *
388
+ * ``request_key`` makes the borrow idempotent. A client that retries after a
389
+ * timeout must not end up holding two copies of the same title.
390
+ */
391
+ interface BorrowWrite {
392
+ act?: EntitlementAct;
393
+ deviceId?: string | null;
394
+ requestKey?: string | null;
395
+ /** @minimum 1 */
396
+ workId: number;
397
+ }
398
+ //#endregion
399
+ //#region src/models/contentType.d.ts
400
+ /**
401
+ * Generated by orval 🍺
402
+ * Do not edit manually.
403
+ * Mozaik backend
404
+ * 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.
405
+ * OpenAPI spec version: 0.1.0
406
+ */
407
+ /**
408
+ * Denormalised onto ``content`` from the kind of its categories.
409
+ *
410
+ * MUSIC is not in the source spec but is required for the derivation to be
411
+ * total — CategoryKind has it, so a content row can reach it.
412
+ */
413
+ type ContentType = typeof ContentType[keyof typeof ContentType];
414
+ declare const ContentType: {
415
+ readonly course: 'course';
416
+ readonly press_issue: 'press_issue';
417
+ readonly book: 'book';
418
+ readonly music: 'music';
419
+ readonly service: 'service';
420
+ };
421
+ //#endregion
422
+ //#region src/models/contentSummaryRead.d.ts
423
+ /**
424
+ * The ``<content summary>`` the spec references from seven endpoints.
425
+ *
426
+ * PROVISIONAL. ``contentId``, ``title`` and ``type`` are certain — they are
427
+ * named in E34, which is the same entity in full. The rest are drawn from
428
+ * ``app.models.biblio.catalogue.Content`` and are the fields a card needs to
429
+ * render. Pin this against a real client before treating it as closed: it is
430
+ * the most reused shape in the API, so widening it later is cheap and narrowing
431
+ * it is not.
432
+ */
433
+ interface ContentSummaryRead {
434
+ contentId: number;
435
+ durationLabel?: string | null;
436
+ level?: string | null;
437
+ publishedAt?: string | null;
438
+ ratingAverage?: string | null;
439
+ teaser?: string | null;
440
+ title: string;
441
+ type: ContentType;
442
+ }
443
+ //#endregion
444
+ //#region src/models/pageMeta.d.ts
445
+ /**
446
+ * Generated by orval 🍺
447
+ * Do not edit manually.
448
+ * Mozaik backend
449
+ * 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.
450
+ * OpenAPI spec version: 0.1.0
451
+ */
452
+ /**
453
+ * The ``meta`` block on a paginated collection (spec §2.1).
454
+ *
455
+ * Present only on paginated collections. A collection that is inherently
456
+ * bounded — the caller's own profiles, their services, a pack's catalogs —
457
+ * returns a bare ``{"data": [...]}`` with no ``meta`` at all.
458
+ */
459
+ interface PageMeta {
460
+ limit: number;
461
+ page: number;
462
+ total: number;
463
+ totalPages: number;
464
+ }
465
+ //#endregion
466
+ //#region src/models/themeRefRead.d.ts
467
+ /**
468
+ * Generated by orval 🍺
469
+ * Do not edit manually.
470
+ * Mozaik backend
471
+ * 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.
472
+ * OpenAPI spec version: 0.1.0
473
+ */
474
+ /**
475
+ * A theme inside a catalog, as listed by E39. PROVISIONAL.
476
+ */
477
+ interface ThemeRefRead {
478
+ themeId: number;
479
+ title: string;
480
+ }
481
+ //#endregion
482
+ //#region src/models/catalogRead.d.ts
483
+ /**
484
+ * A pack catalog, or one theme within it (E39, E40).
485
+ *
486
+ * E40 returns this same shape scoped to a theme.
487
+ */
488
+ interface CatalogRead {
489
+ catalogId: number;
490
+ data?: ContentSummaryRead[];
491
+ meta: PageMeta;
492
+ themes?: ThemeRefRead[];
493
+ title: string;
494
+ }
495
+ //#endregion
496
+ //#region src/models/catalogRefRead.d.ts
497
+ /**
498
+ * Generated by orval 🍺
499
+ * Do not edit manually.
500
+ * Mozaik backend
501
+ * 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.
502
+ * OpenAPI spec version: 0.1.0
503
+ */
504
+ /**
505
+ * A catalog inside a pack, as listed by E38.
506
+ */
507
+ interface CatalogRefRead {
508
+ catalogId: number;
509
+ itemCount: number;
510
+ title: string;
511
+ }
512
+ //#endregion
513
+ //#region src/models/categoryRead.d.ts
514
+ /**
515
+ * Generated by orval 🍺
516
+ * Do not edit manually.
517
+ * Mozaik backend
518
+ * 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.
519
+ * OpenAPI spec version: 0.1.0
520
+ */
521
+ /**
522
+ * A favourite category (E26 item). PROVISIONAL, as :class:`PackRead`.
523
+ */
524
+ interface CategoryRead {
525
+ categoryId: number;
526
+ title: string;
527
+ }
528
+ //#endregion
529
+ //#region src/models/categoryListRead.d.ts
530
+ /**
531
+ * The caller's favourite categories (E26). Unpaginated.
532
+ */
533
+ interface CategoryListRead {
534
+ data: CategoryRead[];
535
+ }
536
+ //#endregion
537
+ //#region src/models/categoryPreferencesWrite.d.ts
538
+ /**
539
+ * Generated by orval 🍺
540
+ * Do not edit manually.
541
+ * Mozaik backend
542
+ * 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.
543
+ * OpenAPI spec version: 0.1.0
544
+ */
545
+ /**
546
+ * Replace the favourite-category set wholesale (E29).
547
+ *
548
+ * ``PUT``, not ``POST``, because the legacy handler already replaced the whole
549
+ * set rather than merging — the verb now says so. An empty array clears the
550
+ * set and is valid input, not a validation failure.
551
+ *
552
+ * Unknown or non-entitled category ids are ``422`` with the offending ids in
553
+ * ``details``. In the legacy this path was uncaught and returned ``500``.
554
+ */
555
+ interface CategoryPreferencesWrite {
556
+ /** @maxItems 500 */
557
+ categories: number[];
558
+ }
559
+ //#endregion
560
+ //#region src/models/chatTicketRead.d.ts
561
+ /**
562
+ * Generated by orval 🍺
563
+ * Do not edit manually.
564
+ * Mozaik backend
565
+ * 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.
566
+ * OpenAPI spec version: 0.1.0
567
+ */
568
+ /**
569
+ * A single-use credential for opening one socket.
570
+ *
571
+ * Spend it immediately: it is valid for ``expiresIn`` seconds and works once.
572
+ *
573
+ * .. code-block:: js
574
+ *
575
+ * const { ticket } = await (await fetch(base + "/chat/ticket",
576
+ * { method: "POST", headers: { Authorization: "Bearer " + token } })).json();
577
+ * const ws = new WebSocket(`${wsBase}/chat?ticket=${ticket}`);
578
+ */
579
+ interface ChatTicketRead {
580
+ expiresIn: number;
581
+ ticket: string;
582
+ }
583
+ //#endregion
584
+ //#region src/models/chromecastRead.d.ts
585
+ /**
586
+ * Generated by orval 🍺
587
+ * Do not edit manually.
588
+ * Mozaik backend
589
+ * 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.
590
+ * OpenAPI spec version: 0.1.0
591
+ */
592
+ /**
593
+ * Cast-target playback parameters — ``Entity/Chromecast.php``.
594
+ *
595
+ * Overlaps :class:`DrmRead` on ``mode``, ``token``, ``licenses``, ``kid`` and
596
+ * ``widevine``; the difference is that this one carries a resolvable ``url`` and
597
+ * a ``duration``, because the receiver plays it directly.
598
+ */
599
+ interface ChromecastRead {
600
+ duration?: number | null;
601
+ kid?: string | null;
602
+ licenses?: string[];
603
+ mode?: string | null;
604
+ subtitles?: string[];
605
+ token?: string | null;
606
+ tracks?: string[];
607
+ url?: string | null;
608
+ widevine?: string | null;
609
+ }
610
+ //#endregion
611
+ //#region src/models/codeExchangeWrite.d.ts
612
+ /**
613
+ * Generated by orval 🍺
614
+ * Do not edit manually.
615
+ * Mozaik backend
616
+ * 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.
617
+ * OpenAPI spec version: 0.1.0
618
+ */
619
+ /**
620
+ * Complete a login started at :class:`AuthorizationRead`.
621
+ *
622
+ * ``redirect_uri`` must match the one the authorization request carried, and is
623
+ * validated against ``AUTH_ALLOWED_REDIRECT_ORIGINS`` as well as by Keycloak.
624
+ * Two gates rather than one because an open redirect on the login callback is
625
+ * how a stolen code leaves the building — the legacy carried an unvalidated
626
+ * ``RelayState`` for exactly this shape of bug.
627
+ *
628
+ * ``state`` is the client's to generate and the client's to check. It is
629
+ * accepted here only so that it can be echoed back; this endpoint cannot verify
630
+ * it, and pretending otherwise would be worse than not asking.
631
+ */
632
+ interface CodeExchangeWrite {
633
+ /**
634
+ * @minLength 1
635
+ * @maxLength 4096
636
+ */
637
+ code: string;
638
+ /**
639
+ * @minLength 43
640
+ * @maxLength 128
641
+ */
642
+ codeVerifier: string;
643
+ /**
644
+ * @minLength 1
645
+ * @maxLength 2048
646
+ */
647
+ redirectUri: string;
648
+ state?: string | null;
649
+ }
650
+ //#endregion
651
+ //#region src/models/consumptionCloseReason.d.ts
652
+ /**
653
+ * Generated by orval 🍺
654
+ * Do not edit manually.
655
+ * Mozaik backend
656
+ * 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.
657
+ * OpenAPI spec version: 0.1.0
658
+ */
659
+ /**
660
+ * Why a consumption lease stopped. Legacy ``sessions.cloture``.
661
+ *
662
+ * The legacy's single letters, decoded from the procedures that write them:
663
+ * ``u`` is ``ouvreSessionCours2`` closing the previous session because the
664
+ * reader opened something else, ``a`` is ``FermeSessionAdherent`` — staff
665
+ * force-closing from the CE admin — and ``s`` is ``reset_sessions`` reaping a
666
+ * lease left open more than 180 minutes.
667
+ *
668
+ * ``n`` is not here: it means *open*, which this column expresses by being
669
+ * NULL. A closed-reason enum with an "isn't closed" member is how you get code
670
+ * that checks the wrong one of two things.
671
+ */
672
+ type ConsumptionCloseReason = typeof ConsumptionCloseReason[keyof typeof ConsumptionCloseReason];
673
+ declare const ConsumptionCloseReason: {
674
+ readonly completed: 'completed';
675
+ readonly superseded: 'superseded';
676
+ readonly staff: 'staff';
677
+ readonly expired: 'expired';
678
+ readonly failed: 'failed';
679
+ };
680
+ //#endregion
681
+ //#region src/models/contentPage.d.ts
682
+ /**
683
+ * A paginated run of content summaries.
684
+ *
685
+ * Used wherever a collection of content is returned with pagination — E39, E40
686
+ * and the ``content`` block of E45.
687
+ */
688
+ interface ContentPage {
689
+ data: ContentSummaryRead[];
690
+ meta: PageMeta;
691
+ }
692
+ //#endregion
693
+ //#region src/models/contentRead.d.ts
694
+ /**
695
+ * One content item with the caller's own state on it (E34).
696
+ *
697
+ * PROVISIONAL beyond the named fields. ``liked``, ``like_count`` and
698
+ * ``favorited`` are the per-caller state the spec requires and are the reason
699
+ * this is not simply :class:`ContentSummaryRead` — they cannot be cached across
700
+ * users.
701
+ */
702
+ interface ContentRead {
703
+ contentId: number;
704
+ description?: string | null;
705
+ durationLabel?: string | null;
706
+ favorited: boolean;
707
+ learningOutcomes?: string | null;
708
+ level?: string | null;
709
+ likeCount: number;
710
+ liked: boolean;
711
+ prerequisites?: string | null;
712
+ publishedAt?: string | null;
713
+ ratingAverage?: string | null;
714
+ summary?: string | null;
715
+ teaser?: string | null;
716
+ title: string;
717
+ type: ContentType;
718
+ }
719
+ //#endregion
720
+ //#region src/models/credentialsWrite.d.ts
721
+ /**
722
+ * Generated by orval 🍺
723
+ * Do not edit manually.
724
+ * Mozaik backend
725
+ * 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.
726
+ * OpenAPI spec version: 0.1.0
727
+ */
728
+ /**
729
+ * Username and password, for the direct grant.
730
+ *
731
+ * Present because native clients in the field send it, not because it is the
732
+ * intended path — it bypasses MFA, brokering and account linking, and the
733
+ * password crosses this process. Refused unless
734
+ * ``AUTH_ALLOW_PASSWORD_GRANT`` is on.
735
+ */
736
+ interface CredentialsWrite {
737
+ /**
738
+ * @minLength 1
739
+ * @maxLength 1024
740
+ */
741
+ password: string;
742
+ /**
743
+ * @minLength 1
744
+ * @maxLength 255
745
+ */
746
+ username: string;
747
+ }
748
+ //#endregion
749
+ //#region src/models/currentReadingRead.d.ts
750
+ /**
751
+ * Generated by orval 🍺
752
+ * Do not edit manually.
753
+ * Mozaik backend
754
+ * 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.
755
+ * OpenAPI spec version: 0.1.0
756
+ */
757
+ /**
758
+ * One entry of the partner's own "continue reading" list.
759
+ *
760
+ * Joined back to :class:`~app.models.partner.catalogue.PartnerMedia` on the
761
+ * partner's product id, so the client gets our media id and can link to our
762
+ * detail route. An entry the partner knows and our catalogue does not is
763
+ * dropped — the import runs nightly and the partner's list is live, so a title
764
+ * added today is genuinely not browsable here yet.
765
+ */
766
+ interface CurrentReadingRead {
767
+ coverImage?: string | null;
768
+ mediaId: number;
769
+ percentage?: number | null;
770
+ slug: string;
771
+ title: string;
772
+ }
773
+ //#endregion
774
+ //#region src/models/currentReadingListRead.d.ts
775
+ /**
776
+ * The partner's ongoing list for this reader.
777
+ */
778
+ interface CurrentReadingListRead {
779
+ data: CurrentReadingRead[];
780
+ }
781
+ //#endregion
782
+ //#region src/models/demoUserRead.d.ts
783
+ /**
784
+ * Generated by orval 🍺
785
+ * Do not edit manually.
786
+ * Mozaik backend
787
+ * 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.
788
+ * OpenAPI spec version: 0.1.0
789
+ */
790
+ /**
791
+ * The demonstration account (E57). ``201`` when created, ``200`` when it existed.
792
+ *
793
+ * The account must not be directly loginable with a guessable secret. The legacy
794
+ * derived its password from the establishment id alone (``Etab{id padded to 3}$``)
795
+ * with a predictable address (``etab_{id}@ta.com``), then redirected into the
796
+ * impersonation route (defect D15). Either generate a random password that is
797
+ * never returned and reach the account only through E56, or flag these accounts
798
+ * as demo-only and non-loginable.
799
+ *
800
+ * Note what is absent: no password field. Whatever the answer, it is not
801
+ * "return the credential".
802
+ */
803
+ interface DemoUserRead {
804
+ email: string;
805
+ userId: number;
806
+ }
807
+ //#endregion
808
+ //#region src/models/demoUserWrite.d.ts
809
+ /**
810
+ * Generated by orval 🍺
811
+ * Do not edit manually.
812
+ * Mozaik backend
813
+ * 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.
814
+ * OpenAPI spec version: 0.1.0
815
+ */
816
+ /**
817
+ * Create or fetch a demonstration account for an establishment (E57).
818
+ */
819
+ interface DemoUserWrite {
820
+ /** @minimum 1 */
821
+ establishmentId: number;
822
+ }
823
+ //#endregion
824
+ //#region src/models/documentInformationRead.d.ts
825
+ /**
826
+ * Generated by orval 🍺
827
+ * Do not edit manually.
828
+ * Mozaik backend
829
+ * 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.
830
+ * OpenAPI spec version: 0.1.0
831
+ */
832
+ /**
833
+ * A labelled metadata row shown on the document sheet.
834
+ *
835
+ * Legacy ``Entity/DocumentInformation.php``. Note the mismatch it carries:
836
+ * ``lineBreak``, ``html`` and ``avis`` are documented ``@var boolean`` but
837
+ * annotated ``@Serializer\Type("integer")``, so they cross the wire as
838
+ * integers. Kept as integers — the annotation is what the clients actually
839
+ * parse.
840
+ */
841
+ interface DocumentInformationRead {
842
+ html?: number | null;
843
+ key: string;
844
+ lineBreak?: number | null;
845
+ order?: number | null;
846
+ review?: number | null;
847
+ value?: string | null;
848
+ }
849
+ //#endregion
850
+ //#region src/models/documentLinkRead.d.ts
851
+ /**
852
+ * Generated by orval 🍺
853
+ * Do not edit manually.
854
+ * Mozaik backend
855
+ * 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.
856
+ * OpenAPI spec version: 0.1.0
857
+ */
858
+ /**
859
+ * An action the client may invoke on a document — ``Entity/DocumentLink.php``.
860
+ *
861
+ * The legacy uses this to tell the app which calls are available for this
862
+ * document and how to make them (``service`` + ``method`` + ``action``), which
863
+ * is a crude form of hypermedia. Worth keeping: it is what lets the server turn
864
+ * a capability off without an app release.
865
+ */
866
+ interface DocumentLinkRead {
867
+ action?: string | null;
868
+ didDelete?: boolean | null;
869
+ label?: string | null;
870
+ method?: string | null;
871
+ service?: string | null;
872
+ }
873
+ //#endregion
874
+ //#region src/models/pillar.d.ts
875
+ /**
876
+ * Generated by orval 🍺
877
+ * Do not edit manually.
878
+ * Mozaik backend
879
+ * 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.
880
+ * OpenAPI spec version: 0.1.0
881
+ */
882
+ /**
883
+ * A content vertical. The single most load-bearing decoder in the schema.
884
+ *
885
+ * Recovered from ``Services/V3/MenuService.php:1055`` and corroborated by
886
+ * ``v1/config.inc.php:651``::
887
+ *
888
+ * 1 => musique 2 => cinema 3 => savoirs
889
+ * 4 => livres 5 => presse 6 => jeux 7 => inclusion
890
+ *
891
+ * It decodes every numbered ``droit*`` (tenant offers this pillar),
892
+ * ``docsforfait*`` / ``nbdocs_forfait*`` (per-pillar document quota), and every
893
+ * ``pilier`` column on works, themes and the consumption log.
894
+ *
895
+ * Note the asymmetry, which is real and worth preserving: the numbered columns
896
+ * stop at 6, but ``pilier`` reaches 7 — inclusion was added to the product after
897
+ * the numbered-column pattern was already set in the schema.
898
+ */
899
+ type Pillar = typeof Pillar[keyof typeof Pillar];
900
+ declare const Pillar: {
901
+ readonly music: 'music';
902
+ readonly film: 'film';
903
+ readonly learning: 'learning';
904
+ readonly books: 'books';
905
+ readonly press: 'press';
906
+ readonly games: 'games';
907
+ readonly inclusion: 'inclusion';
908
+ };
909
+ //#endregion
910
+ //#region src/models/documentSummaryRead.d.ts
911
+ /**
912
+ * A document as it appears in a list, carousel or search result.
913
+ *
914
+ * The legacy has no summary shape — every listing serialises the full
915
+ * :class:`DocumentRead` with a JMS group filter. This is that projection made
916
+ * explicit, so a catalogue page stops shipping licence and extension state for
917
+ * every tile.
918
+ */
919
+ interface DocumentSummaryRead {
920
+ artist?: string | null;
921
+ id: number;
922
+ parentalControl?: boolean;
923
+ photoHd?: string | null;
924
+ photoSd?: string | null;
925
+ pillar?: Pillar | null;
926
+ rating?: number | null;
927
+ subTitle?: string | null;
928
+ title: string;
929
+ year?: number | null;
930
+ }
931
+ //#endregion
932
+ //#region src/models/documentPage.d.ts
933
+ /**
934
+ * A paginated run of documents.
935
+ *
936
+ * The legacy paginates with a ``page`` parameter and a per-menu
937
+ * ``maxNumberPerPage``, and returns no total anywhere. ``meta`` supplies what
938
+ * the apps currently have to guess.
939
+ */
940
+ interface DocumentPage {
941
+ data: DocumentSummaryRead[];
942
+ meta: PageMeta;
943
+ }
944
+ //#endregion
945
+ //#region src/models/layerRead.d.ts
946
+ /**
947
+ * Generated by orval 🍺
948
+ * Do not edit manually.
949
+ * Mozaik backend
950
+ * 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.
951
+ * OpenAPI spec version: 0.1.0
952
+ */
953
+ /**
954
+ * A visual overlay on a document's artwork — ``Entity/Layer.php``.
955
+ *
956
+ * ``background`` is declared ``boolean`` in the legacy DTO while sitting between
957
+ * two image/position fields; carried as declared.
958
+ */
959
+ interface LayerRead {
960
+ background?: boolean | null;
961
+ color?: string | null;
962
+ description?: string | null;
963
+ gradient?: boolean | null;
964
+ image?: string | null;
965
+ opacity?: number | null;
966
+ positionX?: string | null;
967
+ positionY?: string | null;
968
+ type?: string | null;
969
+ }
970
+ //#endregion
971
+ //#region src/models/trackRead.d.ts
972
+ /**
973
+ * Generated by orval 🍺
974
+ * Do not edit manually.
975
+ * Mozaik backend
976
+ * 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.
977
+ * OpenAPI spec version: 0.1.0
978
+ */
979
+ /**
980
+ * One track of a multi-part document — ``Entity/Track.php``.
981
+ */
982
+ interface TrackRead {
983
+ artists?: string[];
984
+ duration?: number | null;
985
+ id: number;
986
+ title?: string | null;
987
+ url?: string | null;
988
+ }
989
+ //#endregion
990
+ //#region src/models/documentRead.d.ts
991
+ /**
992
+ * A catalogue work with this library's licence state on it.
993
+ *
994
+ * ``pillar`` is the recovered decoder, not a raw integer: the legacy column is
995
+ * ``1..7`` and its meaning was reconstructed in
996
+ * ``app.models.enums.Pillar`` — 1 music, 2 film, 3 learning, 4 books, 5 press,
997
+ * 6 games, 7 inclusion. The enum's string values cross the wire; the integer
998
+ * stays in the migration.
999
+ *
1000
+ * PROVISIONAL fields, carried with their legacy names because nothing in the
1001
+ * source explains them: ``tds`` / ``tds_doc_id`` (a paired flag and reference,
1002
+ * meaning undocumented), ``max_time_int`` (a duration cap in unstated units),
1003
+ * ``display_type`` and ``platform``. Resolve them before a client relies on
1004
+ * any.
1005
+ *
1006
+ * The four rating fields are all present in the legacy DTO and all distinct:
1007
+ * the work's own rating, this patron's, this library's, and the cross-library
1008
+ * aggregate.
1009
+ */
1010
+ interface DocumentRead {
1011
+ artist?: string | null;
1012
+ deletable?: boolean;
1013
+ displayType?: number | null;
1014
+ downloading?: boolean;
1015
+ extendCount?: number | null;
1016
+ extendList?: string[];
1017
+ extendNewDate?: string | null;
1018
+ extendNumberMax?: number | null;
1019
+ extract1?: string | null;
1020
+ extract2?: string | null;
1021
+ id: number;
1022
+ imageTitle?: string | null;
1023
+ informations?: DocumentInformationRead[];
1024
+ isPromo?: number | null;
1025
+ lastPosition?: number | null;
1026
+ layers?: LayerRead[];
1027
+ licenceId?: number | null;
1028
+ links?: DocumentLinkRead[];
1029
+ maxTimeInt?: number | null;
1030
+ pageCount?: number | null;
1031
+ parentalControl?: boolean;
1032
+ photoHd?: string | null;
1033
+ photoSd?: string | null;
1034
+ pictos?: string[];
1035
+ pillar?: Pillar | null;
1036
+ platform?: number | null;
1037
+ price?: number | null;
1038
+ rating?: number | null;
1039
+ ratingAll?: number | null;
1040
+ ratingLibrary?: number | null;
1041
+ ratingUser?: number | null;
1042
+ screenshots?: string[];
1043
+ sizeBytes?: number | null;
1044
+ streaming?: boolean;
1045
+ subSectionId?: number | null;
1046
+ subTitle?: string | null;
1047
+ supplierId?: number | null;
1048
+ support?: number | null;
1049
+ tds?: boolean | null;
1050
+ tdsDocId?: number | null;
1051
+ title: string;
1052
+ tracks?: TrackRead[];
1053
+ unitCount?: number | null;
1054
+ url?: string | null;
1055
+ year?: number | null;
1056
+ }
1057
+ //#endregion
1058
+ //#region src/models/documentSearchWrite.d.ts
1059
+ /**
1060
+ * Generated by orval 🍺
1061
+ * Do not edit manually.
1062
+ * Mozaik backend
1063
+ * 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.
1064
+ * OpenAPI spec version: 0.1.0
1065
+ */
1066
+ /**
1067
+ * Full-text search over the catalogue (``POST /document/search``).
1068
+ *
1069
+ * A search is a read. The legacy declares it ``POST`` because the query arrives
1070
+ * in the body; if this becomes ``GET`` at rebuild time, ``words`` becomes ``q``
1071
+ * to match biblio E46 and the two catalogues stop disagreeing about the name of
1072
+ * a search term.
1073
+ */
1074
+ interface DocumentSearchWrite {
1075
+ /** @minimum 1 */
1076
+ page?: number;
1077
+ /**
1078
+ * @minLength 1
1079
+ * @maxLength 100
1080
+ */
1081
+ words: string;
1082
+ }
1083
+ //#endregion
1084
+ //#region src/models/drmRead.d.ts
1085
+ /**
1086
+ * Generated by orval 🍺
1087
+ * Do not edit manually.
1088
+ * Mozaik backend
1089
+ * 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.
1090
+ * OpenAPI spec version: 0.1.0
1091
+ */
1092
+ /**
1093
+ * DRM playback parameters — ``Entity/DRM.php``.
1094
+ *
1095
+ * ``token``, ``licenses`` and ``certificate`` are credentials for the DRM
1096
+ * system. Short-lived, per-playback, never logged.
1097
+ *
1098
+ * ``bandwidth``, ``width`` and ``height`` are declared ``@var integer`` while
1099
+ * being initialised to ``""`` in the legacy DTO. Typed as integers here.
1100
+ */
1101
+ interface DrmRead {
1102
+ bandwidth?: number | null;
1103
+ certificate?: string;
1104
+ contentId?: string;
1105
+ dash?: string;
1106
+ fairplay?: string;
1107
+ height?: number | null;
1108
+ hls?: string;
1109
+ kid?: string;
1110
+ licenses?: string[];
1111
+ mode?: string;
1112
+ token?: string;
1113
+ widevine?: string;
1114
+ width?: number | null;
1115
+ }
1116
+ //#endregion
1117
+ //#region src/models/editorDetailRead.d.ts
1118
+ /**
1119
+ * One editor and its content (E45).
1120
+ *
1121
+ * One endpoint replaces two — ``GET /editor/{id}`` rendered a page and
1122
+ * ``GET /api/v1/editors/{id}`` returned JSON with ``pageSize`` instead of
1123
+ * ``limit`` and the object wrapped in an array. Same entity, two conventions,
1124
+ * one codebase (§4, consequence 5).
1125
+ */
1126
+ interface EditorDetailRead {
1127
+ content: ContentPage;
1128
+ editorId: number;
1129
+ name: string;
1130
+ }
1131
+ //#endregion
1132
+ //#region src/models/editorialSlideRead.d.ts
1133
+ /**
1134
+ * Generated by orval 🍺
1135
+ * Do not edit manually.
1136
+ * Mozaik backend
1137
+ * 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.
1138
+ * OpenAPI spec version: 0.1.0
1139
+ */
1140
+ /**
1141
+ * A merchandising slide in the home feed's ``editos`` (E48). PROVISIONAL.
1142
+ *
1143
+ * Fields from ``app.models.biblio.catalogue.EditorialSlide``.
1144
+ */
1145
+ interface EditorialSlideRead {
1146
+ image?: string | null;
1147
+ label?: string | null;
1148
+ link?: string | null;
1149
+ slideId: number;
1150
+ teaser?: string | null;
1151
+ title: string;
1152
+ }
1153
+ //#endregion
1154
+ //#region src/models/editorRead.d.ts
1155
+ /**
1156
+ * Generated by orval 🍺
1157
+ * Do not edit manually.
1158
+ * Mozaik backend
1159
+ * 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.
1160
+ * OpenAPI spec version: 0.1.0
1161
+ */
1162
+ /**
1163
+ * An editor as listed (E44 item). PROVISIONAL.
1164
+ */
1165
+ interface EditorRead {
1166
+ editorId: number;
1167
+ logo?: string | null;
1168
+ name: string;
1169
+ }
1170
+ //#endregion
1171
+ //#region src/models/editorListRead.d.ts
1172
+ /**
1173
+ * The editor list (E44).
1174
+ *
1175
+ * The legacy ``GET /api/v1/editors/`` wrapped this collection in a
1176
+ * single-element array. It does not here — §2.1: never wrap a single object in
1177
+ * an array.
1178
+ */
1179
+ interface EditorListRead {
1180
+ data: EditorRead[];
1181
+ }
1182
+ //#endregion
1183
+ //#region src/models/educationalGoalRead.d.ts
1184
+ /**
1185
+ * Generated by orval 🍺
1186
+ * Do not edit manually.
1187
+ * Mozaik backend
1188
+ * 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.
1189
+ * OpenAPI spec version: 0.1.0
1190
+ */
1191
+ /**
1192
+ * Why the pupil is asking, as an option they pick.
1193
+ */
1194
+ interface EducationalGoalRead {
1195
+ appliesTo?: string[];
1196
+ id: number;
1197
+ name: string;
1198
+ shortName?: string | null;
1199
+ }
1200
+ //#endregion
1201
+ //#region src/models/educationalGoalListRead.d.ts
1202
+ /**
1203
+ * Every goal on offer.
1204
+ */
1205
+ interface EducationalGoalListRead {
1206
+ data: EducationalGoalRead[];
1207
+ }
1208
+ //#endregion
1209
+ //#region src/models/educationalGoalWrite.d.ts
1210
+ /**
1211
+ * Generated by orval 🍺
1212
+ * Do not edit manually.
1213
+ * Mozaik backend
1214
+ * 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.
1215
+ * OpenAPI spec version: 0.1.0
1216
+ */
1217
+ /**
1218
+ * Create or amend a goal.
1219
+ */
1220
+ interface EducationalGoalWrite {
1221
+ /** @maxItems 20 */
1222
+ appliesTo?: string[];
1223
+ /**
1224
+ * @minimum 0
1225
+ * @maximum 999
1226
+ */
1227
+ displayOrder?: number;
1228
+ isActive?: boolean;
1229
+ /**
1230
+ * @minLength 1
1231
+ * @maxLength 200
1232
+ */
1233
+ name: string;
1234
+ shortName?: string | null;
1235
+ }
1236
+ //#endregion
1237
+ //#region src/models/favoriteKind.d.ts
1238
+ /**
1239
+ * Generated by orval 🍺
1240
+ * Do not edit manually.
1241
+ * Mozaik backend
1242
+ * 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.
1243
+ * OpenAPI spec version: 0.1.0
1244
+ */
1245
+ /**
1246
+ * ``favorites.mode``: 'C' / 'P'. The one enum the legacy code validates.
1247
+ */
1248
+ type FavoriteKind = typeof FavoriteKind[keyof typeof FavoriteKind];
1249
+ declare const FavoriteKind: {
1250
+ readonly content: 'content';
1251
+ readonly press_title: 'press_title';
1252
+ };
1253
+ //#endregion
1254
+ //#region src/models/favoriteAddWrite.d.ts
1255
+ /**
1256
+ * Body for ``PUT /me/favorites/{contentId}`` (E31).
1257
+ *
1258
+ * Idempotent: adding a favourite that is already set is ``204``, not a conflict.
1259
+ *
1260
+ * This and E32 (``DELETE``) replace a single ``POST /favorites`` that carried an
1261
+ * ``enabled`` boolean — the verb encoded as data. A retry after a timeout
1262
+ * silently reversed the user's intent; a repeated ``PUT`` cannot (§4,
1263
+ * consequence 3). The legacy also left validation failures uncaught, returning
1264
+ * ``500``.
1265
+ */
1266
+ interface FavoriteAddWrite {
1267
+ mode?: FavoriteKind | null;
1268
+ }
1269
+ //#endregion
1270
+ //#region src/models/selectionRead.d.ts
1271
+ /**
1272
+ * Generated by orval 🍺
1273
+ * Do not edit manually.
1274
+ * Mozaik backend
1275
+ * 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.
1276
+ * OpenAPI spec version: 0.1.0
1277
+ */
1278
+ /**
1279
+ * A named list a patron files favourites into.
1280
+ *
1281
+ * The legacy exposes ``selectionId`` on the write path but has no DTO for the
1282
+ * selection itself, so this shape is inferred from the identifier's use. Confirm
1283
+ * it against the ``selection`` tables before relying on the name.
1284
+ */
1285
+ interface SelectionRead {
1286
+ id: number;
1287
+ label?: string | null;
1288
+ }
1289
+ //#endregion
1290
+ //#region src/models/favoriteEntryRead.d.ts
1291
+ /**
1292
+ * One favourited document, with the selection it belongs to.
1293
+ */
1294
+ interface FavoriteEntryRead {
1295
+ createdAt?: string | null;
1296
+ document: DocumentSummaryRead;
1297
+ selection?: SelectionRead | null;
1298
+ }
1299
+ //#endregion
1300
+ //#region src/models/favoriteListRead.d.ts
1301
+ /**
1302
+ * The caller's favourites (``GET /my-favorites/list``).
1303
+ *
1304
+ * Unpaginated in the legacy. If a patron can accumulate an unbounded number of
1305
+ * these — and nothing stops them — it needs a ``meta`` block and a page
1306
+ * parameter before the first power user finds out.
1307
+ */
1308
+ interface FavoriteListRead {
1309
+ data: FavoriteEntryRead[];
1310
+ }
1311
+ //#endregion
1312
+ //#region src/models/favoriteRead.d.ts
1313
+ /**
1314
+ * A favourited item (E30 item). PROVISIONAL beyond the three named fields.
1315
+ *
1316
+ * ``kind`` is the content family. It serialises as ``mode`` to match the spec's
1317
+ * wire name, and its *values* are the new vocabulary from
1318
+ * :class:`~app.models.enums.FavoriteKind` (``content`` / ``press_title``) rather
1319
+ * than the legacy single letters ``C`` / ``P``. The mapping belongs in the
1320
+ * migration and the mapper; nothing on the wire should carry the letters.
1321
+ */
1322
+ interface FavoriteRead {
1323
+ contentId: number;
1324
+ mode: FavoriteKind;
1325
+ title: string;
1326
+ }
1327
+ //#endregion
1328
+ //#region src/models/favoritePage.d.ts
1329
+ /**
1330
+ * Paginated favourites (E30).
1331
+ */
1332
+ interface FavoritePage {
1333
+ data: FavoriteRead[];
1334
+ meta: PageMeta;
1335
+ }
1336
+ //#endregion
1337
+ //#region src/models/historyEntryRead.d.ts
1338
+ /**
1339
+ * Generated by orval 🍺
1340
+ * Do not edit manually.
1341
+ * Mozaik backend
1342
+ * 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.
1343
+ * OpenAPI spec version: 0.1.0
1344
+ */
1345
+ /**
1346
+ * One consumption-history entry (E33 item). PROVISIONAL beyond the named fields.
1347
+ *
1348
+ * ``progress`` is a ``Decimal`` rather than a float, matching
1349
+ * ``app.models.biblio.activity.ContentProgress.progress`` — it is displayed, and
1350
+ * float rounding shows.
1351
+ */
1352
+ interface HistoryEntryRead {
1353
+ contentId: number;
1354
+ lastAccessAt: string;
1355
+ progress?: string | null;
1356
+ title: string;
1357
+ }
1358
+ //#endregion
1359
+ //#region src/models/historyPage.d.ts
1360
+ /**
1361
+ * Paginated history (E33). Also embedded in the home feed, E48.
1362
+ */
1363
+ interface HistoryPage {
1364
+ data: HistoryEntryRead[];
1365
+ meta: PageMeta;
1366
+ }
1367
+ //#endregion
1368
+ //#region src/models/homeFeedSectionRead.d.ts
1369
+ /**
1370
+ * One carousel of the home feed (E48).
1371
+ *
1372
+ * ``key`` identifies the section to the client; ``sections`` carries its own
1373
+ * order. The legacy hardcoded the ordering by splicing arrays at fixed offsets,
1374
+ * so adding a carousel meant editing index arithmetic.
1375
+ */
1376
+ interface HomeFeedSectionRead {
1377
+ items: ContentSummaryRead[];
1378
+ key: string;
1379
+ title: string;
1380
+ }
1381
+ //#endregion
1382
+ //#region src/models/pressArticleSummaryRead.d.ts
1383
+ /**
1384
+ * Generated by orval 🍺
1385
+ * Do not edit manually.
1386
+ * Mozaik backend
1387
+ * 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.
1388
+ * OpenAPI spec version: 0.1.0
1389
+ */
1390
+ /**
1391
+ * A press article as listed (E41 item, E43 item). PROVISIONAL.
1392
+ */
1393
+ interface PressArticleSummaryRead {
1394
+ articleId: number;
1395
+ publishedAt?: string | null;
1396
+ themeId?: number | null;
1397
+ title: string;
1398
+ }
1399
+ //#endregion
1400
+ //#region src/models/pressReviewSectionRead.d.ts
1401
+ /**
1402
+ * One curated section of the press review (E43).
1403
+ */
1404
+ interface PressReviewSectionRead {
1405
+ articles: PressArticleSummaryRead[];
1406
+ title: string;
1407
+ }
1408
+ //#endregion
1409
+ //#region src/models/pressReviewRead.d.ts
1410
+ /**
1411
+ * The curated press review (E43). An explicit aggregate (§5.2).
1412
+ *
1413
+ * New as an endpoint; the legacy composed it into the home and press pages.
1414
+ */
1415
+ interface PressReviewRead {
1416
+ sections: PressReviewSectionRead[];
1417
+ }
1418
+ //#endregion
1419
+ //#region src/models/homeFeedRead.d.ts
1420
+ /**
1421
+ * The composed home screen (E48). An explicit aggregate (§5.2).
1422
+ *
1423
+ * Provided because assembling it client-side would cost eight round trips.
1424
+ *
1425
+ * Partial failure is not total failure: if a section's source fails, omit that
1426
+ * section and still return ``200``. Never fail the whole screen for one
1427
+ * carousel.
1428
+ */
1429
+ interface HomeFeedRead {
1430
+ editors?: EditorRead[];
1431
+ editos?: EditorialSlideRead[];
1432
+ history?: HistoryPage | null;
1433
+ pressReview?: PressReviewRead | null;
1434
+ sections?: HomeFeedSectionRead[];
1435
+ }
1436
+ //#endregion
1437
+ //#region src/models/hTTPExceptionResponse.d.ts
1438
+ /**
1439
+ * Generated by orval 🍺
1440
+ * Do not edit manually.
1441
+ * Mozaik backend
1442
+ * 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.
1443
+ * OpenAPI spec version: 0.1.0
1444
+ */
1445
+ /**
1446
+ * Body of a raised ``HTTPException``. Declared so it lands in the spec.
1447
+ *
1448
+ * Wired into the app-wide ``responses`` map in ``app/main.py`` — that is what
1449
+ * lets a generated client type 401/403/404/429/503 bodies instead of
1450
+ * ``unknown``. Not 422: see :class:`ValidationErrorResponse`.
1451
+ */
1452
+ interface HTTPExceptionResponse {
1453
+ detail: string;
1454
+ }
1455
+ //#endregion
1456
+ //#region src/models/impersonationWrite.d.ts
1457
+ /**
1458
+ * Open a support session acting as another account (E56).
1459
+ *
1460
+ * ``reason`` is mandatory and exists to be logged. A support action without a
1461
+ * stated reason is indistinguishable from an abuse of the same endpoint.
1462
+ *
1463
+ * ``POST``, not the legacy ``GET /imitation-user/{id}`` — a state-changing GET,
1464
+ * therefore outside the CSRF layer by construction, gated only by a forgeable
1465
+ * cookie.
1466
+ */
1467
+ interface ImpersonationWrite {
1468
+ product: Product;
1469
+ /**
1470
+ * @minLength 8
1471
+ * @maxLength 2000
1472
+ */
1473
+ reason: string;
1474
+ /** @minimum 1 */
1475
+ userId: number;
1476
+ }
1477
+ //#endregion
1478
+ //#region src/models/lastPositionWrite.d.ts
1479
+ /**
1480
+ * Generated by orval 🍺
1481
+ * Do not edit manually.
1482
+ * Mozaik backend
1483
+ * 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.
1484
+ * OpenAPI spec version: 0.1.0
1485
+ */
1486
+ /**
1487
+ * Report the patron's playback or reading position (``/document/last-position/{docId}``).
1488
+ *
1489
+ * A write. The legacy declares it ``GET`` with the position in the query string,
1490
+ * which makes resuming a book a cacheable idempotent read that mutates state.
1491
+ */
1492
+ interface LastPositionWrite {
1493
+ /** @minimum 0 */
1494
+ position: number;
1495
+ }
1496
+ //#endregion
1497
+ //#region src/models/learningPathStepRead.d.ts
1498
+ /**
1499
+ * One step of a ``parcours``: where it sits, and what it is.
1500
+ *
1501
+ * ``stepOrder`` is carried rather than left implicit in the array order,
1502
+ * because a step the caller is not entitled to is dropped rather than
1503
+ * renumbered — so positions can have gaps, and a client showing "3 / 8" needs
1504
+ * the real number.
1505
+ */
1506
+ interface LearningPathStepRead {
1507
+ content: ContentSummaryRead;
1508
+ stepOrder: number;
1509
+ }
1510
+ //#endregion
1511
+ //#region src/models/learningPathDetailRead.d.ts
1512
+ /**
1513
+ * A ``parcours`` opened up: its own fields, plus its ordered steps.
1514
+ *
1515
+ * Closes a dead end. A pack lists its ``parcours`` as
1516
+ * :class:`LearningPathRefRead` — an id, a title, a teaser — and until now
1517
+ * there was nothing to call with that id, so the sequence a library had
1518
+ * curated could be named but never followed.
1519
+ *
1520
+ * ``stepCount`` counts what the caller can actually reach, not what the path
1521
+ * contains. The two differ whenever entitlement excludes a step, and reporting
1522
+ * the larger number would promise content that never arrives.
1523
+ */
1524
+ interface LearningPathDetailRead {
1525
+ categoryId?: number | null;
1526
+ durationLabel?: string | null;
1527
+ learningPathId: number;
1528
+ stepCount: number;
1529
+ steps?: LearningPathStepRead[];
1530
+ teaser?: string | null;
1531
+ title: string;
1532
+ }
1533
+ //#endregion
1534
+ //#region src/models/learningPathRefRead.d.ts
1535
+ /**
1536
+ * Generated by orval 🍺
1537
+ * Do not edit manually.
1538
+ * Mozaik backend
1539
+ * 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.
1540
+ * OpenAPI spec version: 0.1.0
1541
+ */
1542
+ /**
1543
+ * A ``parcours`` — an ordered sequence of content — as listed by E38.
1544
+ *
1545
+ * PROVISIONAL: the spec writes ``"parcours": [ … ]`` and names no field. These
1546
+ * come from ``app.models.biblio.catalogue.LearningPath``.
1547
+ */
1548
+ interface LearningPathRefRead {
1549
+ durationLabel?: string | null;
1550
+ learningPathId: number;
1551
+ teaser?: string | null;
1552
+ title: string;
1553
+ }
1554
+ //#endregion
1555
+ //#region src/models/leaseCloseWrite.d.ts
1556
+ /**
1557
+ * Why staff are closing somebody else's lease.
1558
+ *
1559
+ * ``reason`` is fixed rather than free text — the legacy recorded a single
1560
+ * letter and nothing else, so "who closed this and why" was unanswerable. The
1561
+ * narrative goes in the audit row.
1562
+ */
1563
+ interface LeaseCloseWrite {
1564
+ note?: string | null;
1565
+ reason: ConsumptionCloseReason;
1566
+ }
1567
+ //#endregion
1568
+ //#region src/models/leaseRead.d.ts
1569
+ /**
1570
+ * Generated by orval 🍺
1571
+ * Do not edit manually.
1572
+ * Mozaik backend
1573
+ * 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.
1574
+ * OpenAPI spec version: 0.1.0
1575
+ */
1576
+ /**
1577
+ * An open consumption, and when it lapses if nobody renews it.
1578
+ *
1579
+ * The client's contract is simple: renew before ``expiresAt`` or the lease is
1580
+ * reaped and the seat returns to the establishment's pool. That is what the
1581
+ * legacy's 30-second refresh against a 60-second lease was doing.
1582
+ */
1583
+ interface LeaseRead {
1584
+ eventId: number;
1585
+ expiresAt: string;
1586
+ }
1587
+ //#endregion
1588
+ //#region src/models/schoolCycle.d.ts
1589
+ /**
1590
+ * Generated by orval 🍺
1591
+ * Do not edit manually.
1592
+ * Mozaik backend
1593
+ * 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.
1594
+ * OpenAPI spec version: 0.1.0
1595
+ */
1596
+ /**
1597
+ * The French school cycle a level belongs to.
1598
+ *
1599
+ * Not in the legacy schema, which stores levels as a flat list with a display
1600
+ * order and reconstructs the grouping in views. It is here because every
1601
+ * dispatch rule and every teacher competency is expressed per cycle in
1602
+ * practice — a *professeur des écoles* does not answer a *terminale* question.
1603
+ */
1604
+ type SchoolCycle = typeof SchoolCycle[keyof typeof SchoolCycle];
1605
+ declare const SchoolCycle: {
1606
+ readonly kindergarten: 'kindergarten';
1607
+ readonly primary: 'primary';
1608
+ readonly middle: 'middle';
1609
+ readonly high: 'high';
1610
+ readonly higher: 'higher';
1611
+ };
1612
+ //#endregion
1613
+ //#region src/models/levelRead.d.ts
1614
+ /**
1615
+ * A school year.
1616
+ */
1617
+ interface LevelRead {
1618
+ cycle: SchoolCycle;
1619
+ id: number;
1620
+ name: string;
1621
+ nominalAge?: number | null;
1622
+ slug: string;
1623
+ }
1624
+ //#endregion
1625
+ //#region src/models/levelListRead.d.ts
1626
+ /**
1627
+ * Every level, in teaching order.
1628
+ */
1629
+ interface LevelListRead {
1630
+ data: LevelRead[];
1631
+ }
1632
+ //#endregion
1633
+ //#region src/models/levelWrite.d.ts
1634
+ /**
1635
+ * Create or amend a school level.
1636
+ */
1637
+ interface LevelWrite {
1638
+ cycle: SchoolCycle;
1639
+ /**
1640
+ * @minimum 0
1641
+ * @maximum 999
1642
+ */
1643
+ displayOrder?: number;
1644
+ isActive?: boolean;
1645
+ /**
1646
+ * @minLength 1
1647
+ * @maxLength 200
1648
+ */
1649
+ name: string;
1650
+ nominalAge?: number | null;
1651
+ /**
1652
+ * @minLength 1
1653
+ * @maxLength 200
1654
+ * @pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$
1655
+ */
1656
+ slug: string;
1657
+ }
1658
+ //#endregion
1659
+ //#region src/models/partnerProvider.d.ts
1660
+ /**
1661
+ * Generated by orval 🍺
1662
+ * Do not edit manually.
1663
+ * Mozaik backend
1664
+ * 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.
1665
+ * OpenAPI spec version: 0.1.0
1666
+ */
1667
+ /**
1668
+ * A partner whose catalogue and reader we host directly.
1669
+ *
1670
+ * Names both halves of the integration: the seat pool
1671
+ * (:class:`~app.models.biblio.license.PartnerLicense`) and the ingested
1672
+ * catalogue (``app.models.partner.catalogue``). One enum rather than two
1673
+ * because a provider is a provider — a licence for Nextory and a Nextory media
1674
+ * row are the same partner seen from two sides.
1675
+ *
1676
+ * Distinct from :class:`BookSource`, which says which feed produced a *biblio*
1677
+ * ``book`` row. The two vocabularies overlap on ``nextory`` and will keep
1678
+ * overlapping: the partner catalogue is deliberately a separate subsystem from
1679
+ * ``book``/``book_content_link``, bridged rather than merged.
1680
+ */
1681
+ type PartnerProvider = typeof PartnerProvider[keyof typeof PartnerProvider];
1682
+ declare const PartnerProvider: {
1683
+ readonly nextory: 'nextory';
1684
+ readonly youscribe: 'youscribe';
1685
+ };
1686
+ //#endregion
1687
+ //#region src/models/licenseRead.d.ts
1688
+ /**
1689
+ * An external reading licence — one seat at the partner (E49 read, E50 write).
1690
+ *
1691
+ * E49 is the safe read and returns ``404`` when the caller holds none; E50 is
1692
+ * the explicit write that allocates or reactivates one. The legacy did both
1693
+ * from a single ``GET``, so listing your services provisioned a subscription.
1694
+ *
1695
+ * ``seats_used`` / ``seats_limit`` are here because the failure the legacy hid
1696
+ * is the one people actually hit: a household at its cap got ``null``, which
1697
+ * the page rendered identically to "not a subscriber". Showing the count makes
1698
+ * the fix — release a seat — visible.
1699
+ */
1700
+ interface LicenseRead {
1701
+ assignedAt?: string | null;
1702
+ licenseNumber: string;
1703
+ provider: PartnerProvider;
1704
+ /** @minimum 0 */
1705
+ seatsLimit: number;
1706
+ /** @minimum 0 */
1707
+ seatsUsed: number;
1708
+ }
1709
+ //#endregion
1710
+ //#region src/models/licenseUserRead.d.ts
1711
+ /**
1712
+ * Generated by orval 🍺
1713
+ * Do not edit manually.
1714
+ * Mozaik backend
1715
+ * 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.
1716
+ * OpenAPI spec version: 0.1.0
1717
+ */
1718
+ /**
1719
+ * The account a staff licence diagnostic refers to (E51).
1720
+ *
1721
+ * Trimmed to identifying fields on purpose. The legacy diagnostic echoed the
1722
+ * full subscription and session objects for an arbitrary account in its ``500``
1723
+ * body.
1724
+ */
1725
+ interface LicenseUserRead {
1726
+ email: string;
1727
+ userId: number;
1728
+ }
1729
+ //#endregion
1730
+ //#region src/models/likeRead.d.ts
1731
+ /**
1732
+ * Generated by orval 🍺
1733
+ * Do not edit manually.
1734
+ * Mozaik backend
1735
+ * 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.
1736
+ * OpenAPI spec version: 0.1.0
1737
+ */
1738
+ /**
1739
+ * The result of liking or unliking (E36, E37).
1740
+ *
1741
+ * Both are idempotent and both return the resulting state plus the new count,
1742
+ * so a client never has to re-read the content to update its UI. They replace
1743
+ * one non-idempotent ``POST /content/{id}/toggle-like``.
1744
+ */
1745
+ interface LikeRead {
1746
+ count: number;
1747
+ liked: boolean;
1748
+ }
1749
+ //#endregion
1750
+ //#region src/models/tutoringChannel.d.ts
1751
+ /**
1752
+ * Generated by orval 🍺
1753
+ * Do not edit manually.
1754
+ * Mozaik backend
1755
+ * 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.
1756
+ * OpenAPI spec version: 0.1.0
1757
+ */
1758
+ /**
1759
+ * How the answer reaches the pupil.
1760
+ *
1761
+ * Orthogonal to :class:`TutoringKind`: any kind can be delivered by any
1762
+ * channel the tenant has enabled, and a request legitimately changes channel
1763
+ * mid-flight — the legacy's ``differed_to_live`` and ``ai_to_live`` are both
1764
+ * that transition, recorded as booleans because the schema had nowhere to put
1765
+ * a channel.
1766
+ */
1767
+ type TutoringChannel = typeof TutoringChannel[keyof typeof TutoringChannel];
1768
+ declare const TutoringChannel: {
1769
+ readonly chat: 'chat';
1770
+ readonly classroom: 'classroom';
1771
+ readonly phone: 'phone';
1772
+ readonly written: 'written';
1773
+ readonly ai: 'ai';
1774
+ };
1775
+ //#endregion
1776
+ //#region src/models/tutoringKind.d.ts
1777
+ /**
1778
+ * Generated by orval 🍺
1779
+ * Do not edit manually.
1780
+ * Mozaik backend
1781
+ * 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.
1782
+ * OpenAPI spec version: 0.1.0
1783
+ */
1784
+ /**
1785
+ * What is being asked for.
1786
+ *
1787
+ * Replaces six independent booleans on ``inquiries`` — ``for_librarian``,
1788
+ * ``for_grand_oral``, ``for_ai``, ``for_coach``, ``parents_web_advice`` and
1789
+ * (in the archives) ``for_school_counselor`` / ``for_psychologist``. Six flags
1790
+ * describe 64 states, of which a handful are meaningful and none is documented;
1791
+ * one enum describes exactly the states that exist.
1792
+ *
1793
+ * Two of those flags are **not** kinds and are modelled elsewhere: ``for_ai``
1794
+ * is a delivery channel (:class:`TutoringChannel`), and ``differed_to_live`` is
1795
+ * a transition between channels rather than a state.
1796
+ *
1797
+ * Provisional in one respect: whether the legacy flags are mutually exclusive
1798
+ * in the data is answered by section F of ``tools/profexpress_probe.sql``,
1799
+ * which groups the live combinations. If a real row carries two at once, that
1800
+ * combination needs a value here rather than a second column.
1801
+ */
1802
+ type TutoringKind = typeof TutoringKind[keyof typeof TutoringKind];
1803
+ declare const TutoringKind: {
1804
+ readonly homework: 'homework';
1805
+ readonly grand_oral: 'grand_oral';
1806
+ readonly coaching: 'coaching';
1807
+ readonly orientation: 'orientation';
1808
+ readonly librarian: 'librarian';
1809
+ readonly parent_advice: 'parent_advice';
1810
+ };
1811
+ //#endregion
1812
+ //#region src/models/tutoringStatus.d.ts
1813
+ /**
1814
+ * Generated by orval 🍺
1815
+ * Do not edit manually.
1816
+ * Mozaik backend
1817
+ * 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.
1818
+ * OpenAPI spec version: 0.1.0
1819
+ */
1820
+ /**
1821
+ * Where a request has got to.
1822
+ *
1823
+ * The legacy vocabulary is now known rather than guessed. ``InquiryStatus``
1824
+ * holds no fixture, but ``InquiryStatus::getHrList()`` names ids 1-13 and
1825
+ * ``AdminInquiriesController::applyStatusFilter`` maps each id to its initials,
1826
+ * which together give the complete set — twelve initials, not the four that
1827
+ * appear in ``whereInitials(...)`` calls:
1828
+ *
1829
+ * ==== ============================ ========= ========= =======================
1830
+ * id name initials type_id maps to
1831
+ * ==== ============================ ========= ========= =======================
1832
+ * 1 En édition ``E`` -- :attr:`DRAFT`
1833
+ * 2 Différées enregistrées ``R`` 2 :attr:`SUBMITTED` + WRITTEN
1834
+ * 3 Live en chat ``CHA`` 1 :attr:`SUBMITTED` + CHAT
1835
+ * 4 Différées validées ``V`` 2 :attr:`DISPATCHED` + WRITTEN
1836
+ * 5 Live validées ``V`` 1 :attr:`DISPATCHED` + CHAT
1837
+ * 6 Succès ``S`` -- :attr:`SUCCEEDED`
1838
+ * 7 Echec ``F`` -- :attr:`FAILED`
1839
+ * 8 Annulation du RDV ``CAN`` -- :attr:`CANCELLED`
1840
+ * 9 Non-présentation au RDV ``ABS`` -- FAILED + ``no_show``
1841
+ * 10 Problème compte ``NI`` -- FAILED + ``account_problem``
1842
+ * 11 Problème compte traité ``FIX`` -- back to DISPATCHED
1843
+ * 12 Problème mot de passe ``MDP`` -- FAILED + ``password_problem``
1844
+ * 13 Autre *(none)* -- anything not above
1845
+ * -- Abandon ``A`` -- :attr:`EXPIRED`
1846
+ * ==== ============================ ========= ========= =======================
1847
+ *
1848
+ * **The important find: ``V`` is ambiguous on its own.** Ids 4 and 5 share it
1849
+ * and are told apart by ``type_id`` — 1 is live, 2 is *différé*. So a legacy
1850
+ * status is the pair ``(initials, type_id)``, which is exactly why this enum
1851
+ * carries no channel: state and delivery are two axes, and the legacy conflated
1852
+ * them into one lookup table with duplicate initials.
1853
+ *
1854
+ * Three of the twelve are not states at all. ``ABS``, ``NI`` and ``MDP``
1855
+ * describe *why* a request stopped, so they are
1856
+ * :class:`TutoringCloseReason` values on a FAILED request; and ``FIX`` is a
1857
+ * transition back into the queue rather than a resting place. Modelling them as
1858
+ * statuses is what forces the legacy to ask "is this status final?" with a
1859
+ * hard-coded list of names (``InquiryStatus::final``).
1860
+ *
1861
+ * :attr:`TRIAGED`, :attr:`CLAIMED` and :attr:`ANSWERED` have no legacy status
1862
+ * at all — the legacy records those moments only as timestamps, which is why
1863
+ * "how long did triage take" is a question its own reporting code has to
1864
+ * subtract to answer.
1865
+ */
1866
+ type TutoringStatus = typeof TutoringStatus[keyof typeof TutoringStatus];
1867
+ declare const TutoringStatus: {
1868
+ readonly draft: 'draft';
1869
+ readonly submitted: 'submitted';
1870
+ readonly triaged: 'triaged';
1871
+ readonly dispatched: 'dispatched';
1872
+ readonly claimed: 'claimed';
1873
+ readonly answered: 'answered';
1874
+ readonly succeeded: 'succeeded';
1875
+ readonly failed: 'failed';
1876
+ readonly cancelled: 'cancelled';
1877
+ readonly expired: 'expired';
1878
+ };
1879
+ //#endregion
1880
+ //#region src/models/listAllRequestsParams.d.ts
1881
+ type ListAllRequestsParams = {
1882
+ /**
1883
+ * @minimum 1
1884
+ */
1885
+ page?: number;
1886
+ /**
1887
+ * @minimum 1
1888
+ * @maximum 100
1889
+ */
1890
+ limit?: number;
1891
+ status?: TutoringStatus[] | null;
1892
+ kind?: TutoringKind | null;
1893
+ channel?: TutoringChannel | null;
1894
+ subjectId?: number | null;
1895
+ levelId?: number | null;
1896
+ submittedFrom?: string | null;
1897
+ submittedUntil?: string | null;
1898
+ };
1899
+ //#endregion
1900
+ //#region src/models/listBiblioFavoritesParams.d.ts
1901
+ type ListBiblioFavoritesParams = {
1902
+ /**
1903
+ * @minimum 1
1904
+ */
1905
+ page?: number;
1906
+ /**
1907
+ * @minimum 1
1908
+ * @maximum 100
1909
+ */
1910
+ limit?: number;
1911
+ mode?: FavoriteKind | null;
1912
+ };
1913
+ //#endregion
1914
+ //#region src/models/listEditorsParams.d.ts
1915
+ /**
1916
+ * Generated by orval 🍺
1917
+ * Do not edit manually.
1918
+ * Mozaik backend
1919
+ * 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.
1920
+ * OpenAPI spec version: 0.1.0
1921
+ */
1922
+ type ListEditorsParams = {
1923
+ /**
1924
+ * @minimum 1
1925
+ * @maximum 100
1926
+ */
1927
+ limit?: number;
1928
+ /**
1929
+ * @maxLength 32
1930
+ */
1931
+ order?: string;
1932
+ /**
1933
+ * @maxLength 4
1934
+ */
1935
+ sort?: string;
1936
+ };
1937
+ //#endregion
1938
+ //#region src/models/listExpiringDocumentsParams.d.ts
1939
+ /**
1940
+ * Generated by orval 🍺
1941
+ * Do not edit manually.
1942
+ * Mozaik backend
1943
+ * 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.
1944
+ * OpenAPI spec version: 0.1.0
1945
+ */
1946
+ type ListExpiringDocumentsParams = {
1947
+ /**
1948
+ * @minimum 0
1949
+ * @maximum 365
1950
+ */
1951
+ within_days?: number;
1952
+ };
1953
+ //#endregion
1954
+ //#region src/models/listFeedbackParams.d.ts
1955
+ /**
1956
+ * Generated by orval 🍺
1957
+ * Do not edit manually.
1958
+ * Mozaik backend
1959
+ * 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.
1960
+ * OpenAPI spec version: 0.1.0
1961
+ */
1962
+ type ListFeedbackParams = {
1963
+ /**
1964
+ * @minimum 1
1965
+ */
1966
+ page?: number;
1967
+ /**
1968
+ * @minimum 1
1969
+ * @maximum 100
1970
+ */
1971
+ limit?: number;
1972
+ publishable?: boolean | null;
1973
+ };
1974
+ //#endregion
1975
+ //#region src/models/listGoalsParams.d.ts
1976
+ type ListGoalsParams = {
1977
+ kind?: TutoringKind | null;
1978
+ };
1979
+ //#endregion
1980
+ //#region src/models/listHistoryParams.d.ts
1981
+ /**
1982
+ * Generated by orval 🍺
1983
+ * Do not edit manually.
1984
+ * Mozaik backend
1985
+ * 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.
1986
+ * OpenAPI spec version: 0.1.0
1987
+ */
1988
+ type ListHistoryParams = {
1989
+ /**
1990
+ * @minimum 1
1991
+ */
1992
+ page?: number;
1993
+ /**
1994
+ * @minimum 1
1995
+ * @maximum 100
1996
+ */
1997
+ limit?: number;
1998
+ groupType?: string | null;
1999
+ compatibility?: number | null;
2000
+ };
2001
+ //#endregion
2002
+ //#region src/models/listLoansParams.d.ts
2003
+ /**
2004
+ * Generated by orval 🍺
2005
+ * Do not edit manually.
2006
+ * Mozaik backend
2007
+ * 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.
2008
+ * OpenAPI spec version: 0.1.0
2009
+ */
2010
+ type ListLoansParams = {
2011
+ include_returned?: boolean;
2012
+ };
2013
+ //#endregion
2014
+ //#region src/models/partnerMediaType.d.ts
2015
+ /**
2016
+ * Generated by orval 🍺
2017
+ * Do not edit manually.
2018
+ * Mozaik backend
2019
+ * 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.
2020
+ * OpenAPI spec version: 0.1.0
2021
+ */
2022
+ /**
2023
+ * How the partner catalogue shelves one media.
2024
+ *
2025
+ * Recovered from ``NextoryMediaTransformer::mediaType()``, which is not the
2026
+ * obvious mapping from ``content_type`` and must not be simplified into one:
2027
+ *
2028
+ * * category 249 ("BDs et humour") + ``audiobook`` → ``livres-audio``
2029
+ * * category 249 + a real comics subcategory (250–261) → ``bd``
2030
+ * * category 249 with only 262–264 (Humour / Satires / Citations), or with no
2031
+ * subcategory at all → ``livres``
2032
+ * * category 314 → ``podcasts``
2033
+ * * otherwise ``ebook`` → ``livres``, ``audiobook`` → ``livres-audio``
2034
+ *
2035
+ * The 262–264 carve-out is load-bearing. Those subcategories sit under 249, but
2036
+ * the ``livres`` menu excludes 249 entirely, so anything classified there was
2037
+ * unreachable from every page — which is why the legacy grew a synthetic
2038
+ * category 10001 to rehome them.
2039
+ *
2040
+ * Values are the feed's own strings; the importer writes them verbatim.
2041
+ *
2042
+ * **The derivation above is Nextory's.** YouScribe's is a plain one-to-one map
2043
+ * from :attr:`~app.models.partner.catalogue.PartnerMedia.kind`, measured over
2044
+ * all 173,742 of its rows on 2026-09-11 with no crossover at all::
2045
+ *
2046
+ * partition → partitions 119,534 68.8%
2047
+ * ebook → livres 43,420 25.0%
2048
+ * audiobook → livres-audio 8,273 4.8%
2049
+ * bd → bd 2,495 1.4%
2050
+ * podcast → podcasts 20 0.0%
2051
+ *
2052
+ * So one column is not derived the same way for both partners, and an importer
2053
+ * that assumes Nextory's category arithmetic would mis-shelve every YouScribe
2054
+ * title.
2055
+ */
2056
+ type PartnerMediaType = typeof PartnerMediaType[keyof typeof PartnerMediaType];
2057
+ declare const PartnerMediaType: {
2058
+ readonly livres: 'livres';
2059
+ readonly bd: 'bd';
2060
+ readonly 'livres-audio': 'livres-audio';
2061
+ readonly podcasts: 'podcasts';
2062
+ readonly partitions: 'partitions';
2063
+ };
2064
+ //#endregion
2065
+ //#region src/models/listMediaParams.d.ts
2066
+ type ListMediaParams = {
2067
+ /**
2068
+ * @minimum 1
2069
+ */
2070
+ page?: number;
2071
+ /**
2072
+ * @minimum 1
2073
+ * @maximum 100
2074
+ */
2075
+ limit?: number;
2076
+ mediaType?: PartnerMediaType | null;
2077
+ categoryId?: number | null;
2078
+ language?: string | null;
2079
+ q?: string | null;
2080
+ order?: string;
2081
+ };
2082
+ //#endregion
2083
+ //#region src/models/listMessagesParams.d.ts
2084
+ /**
2085
+ * Generated by orval 🍺
2086
+ * Do not edit manually.
2087
+ * Mozaik backend
2088
+ * 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.
2089
+ * OpenAPI spec version: 0.1.0
2090
+ */
2091
+ type ListMessagesParams = {
2092
+ before?: number | null;
2093
+ /**
2094
+ * @minimum 1
2095
+ * @maximum 200
2096
+ */
2097
+ limit?: number;
2098
+ };
2099
+ //#endregion
2100
+ //#region src/models/listMyRequestsParams.d.ts
2101
+ type ListMyRequestsParams = {
2102
+ /**
2103
+ * @minimum 1
2104
+ */
2105
+ page?: number;
2106
+ /**
2107
+ * @minimum 1
2108
+ * @maximum 100
2109
+ */
2110
+ limit?: number;
2111
+ status?: TutoringStatus[] | null;
2112
+ kind?: TutoringKind | null;
2113
+ channel?: TutoringChannel | null;
2114
+ subjectId?: number | null;
2115
+ levelId?: number | null;
2116
+ submittedFrom?: string | null;
2117
+ submittedUntil?: string | null;
2118
+ };
2119
+ //#endregion
2120
+ //#region src/models/listNotificationsParams.d.ts
2121
+ /**
2122
+ * Generated by orval 🍺
2123
+ * Do not edit manually.
2124
+ * Mozaik backend
2125
+ * 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.
2126
+ * OpenAPI spec version: 0.1.0
2127
+ */
2128
+ type ListNotificationsParams = {
2129
+ /**
2130
+ * @minimum 1
2131
+ * @maximum 100
2132
+ */
2133
+ limit?: number;
2134
+ };
2135
+ //#endregion
2136
+ //#region src/models/listPatronsParams.d.ts
2137
+ /**
2138
+ * Generated by orval 🍺
2139
+ * Do not edit manually.
2140
+ * Mozaik backend
2141
+ * 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.
2142
+ * OpenAPI spec version: 0.1.0
2143
+ */
2144
+ type ListPatronsParams = {
2145
+ /**
2146
+ * @minimum 1
2147
+ */
2148
+ page?: number;
2149
+ /**
2150
+ * @minimum 1
2151
+ * @maximum 100
2152
+ */
2153
+ limit?: number;
2154
+ q?: string | null;
2155
+ isActive?: boolean | null;
2156
+ pendingOnly?: boolean;
2157
+ };
2158
+ //#endregion
2159
+ //#region src/models/listPractitionersParams.d.ts
2160
+ /**
2161
+ * Generated by orval 🍺
2162
+ * Do not edit manually.
2163
+ * Mozaik backend
2164
+ * 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.
2165
+ * OpenAPI spec version: 0.1.0
2166
+ */
2167
+ type ListPractitionersParams = {
2168
+ /**
2169
+ * @minimum 1
2170
+ */
2171
+ page?: number;
2172
+ /**
2173
+ * @minimum 1
2174
+ * @maximum 100
2175
+ */
2176
+ limit?: number;
2177
+ role?: string | null;
2178
+ capability?: string | null;
2179
+ subjectId?: number | null;
2180
+ levelId?: number | null;
2181
+ isAvailable?: boolean | null;
2182
+ lapsedDocuments?: boolean | null;
2183
+ };
2184
+ //#endregion
2185
+ //#region src/models/listPressArticlesParams.d.ts
2186
+ /**
2187
+ * Generated by orval 🍺
2188
+ * Do not edit manually.
2189
+ * Mozaik backend
2190
+ * 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.
2191
+ * OpenAPI spec version: 0.1.0
2192
+ */
2193
+ type ListPressArticlesParams = {
2194
+ /**
2195
+ * @minimum 1
2196
+ */
2197
+ page?: number;
2198
+ /**
2199
+ * @minimum 1
2200
+ * @maximum 100
2201
+ */
2202
+ limit?: number;
2203
+ themeId?: number | null;
2204
+ lang?: string | null;
2205
+ countries?: string | null;
2206
+ subthemes?: string | null;
2207
+ order?: string | null;
2208
+ };
2209
+ //#endregion
2210
+ //#region src/models/listQueueParams.d.ts
2211
+ type ListQueueParams = {
2212
+ /**
2213
+ * @minimum 1
2214
+ */
2215
+ page?: number;
2216
+ /**
2217
+ * @minimum 1
2218
+ * @maximum 100
2219
+ */
2220
+ limit?: number;
2221
+ status?: TutoringStatus[] | null;
2222
+ kind?: TutoringKind | null;
2223
+ channel?: TutoringChannel | null;
2224
+ subjectId?: number | null;
2225
+ levelId?: number | null;
2226
+ submittedFrom?: string | null;
2227
+ submittedUntil?: string | null;
2228
+ };
2229
+ //#endregion
2230
+ //#region src/models/reviewState.d.ts
2231
+ /**
2232
+ * Generated by orval 🍺
2233
+ * Do not edit manually.
2234
+ * Mozaik backend
2235
+ * 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.
2236
+ * OpenAPI spec version: 0.1.0
2237
+ */
2238
+ /**
2239
+ * ``avis.state``. Values recovered from the moderation screens.
2240
+ *
2241
+ * Unconstrained in the schema — the column is a ``tinyint`` with no decoder —
2242
+ * so this names what the API accepts, not what the column is known to hold.
2243
+ */
2244
+ type ReviewState = typeof ReviewState[keyof typeof ReviewState];
2245
+ declare const ReviewState: {
2246
+ readonly pending: 'pending';
2247
+ readonly published: 'published';
2248
+ readonly rejected: 'rejected';
2249
+ };
2250
+ //#endregion
2251
+ //#region src/models/listReviewsParams.d.ts
2252
+ type ListReviewsParams = {
2253
+ /**
2254
+ * @minimum 1
2255
+ */
2256
+ page?: number;
2257
+ /**
2258
+ * @minimum 1
2259
+ * @maximum 100
2260
+ */
2261
+ limit?: number;
2262
+ state?: ReviewState;
2263
+ };
2264
+ //#endregion
2265
+ //#region src/models/listThemesParams.d.ts
2266
+ /**
2267
+ * Generated by orval 🍺
2268
+ * Do not edit manually.
2269
+ * Mozaik backend
2270
+ * 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.
2271
+ * OpenAPI spec version: 0.1.0
2272
+ */
2273
+ type ListThemesParams = {
2274
+ pillar?: number | null;
2275
+ };
2276
+ //#endregion
2277
+ //#region src/models/subjectKind.d.ts
2278
+ /**
2279
+ * Generated by orval 🍺
2280
+ * Do not edit manually.
2281
+ * Mozaik backend
2282
+ * 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.
2283
+ * OpenAPI spec version: 0.1.0
2284
+ */
2285
+ /**
2286
+ * Which catalogue a consumed item belongs to. The ledger's polymorphic key.
2287
+ *
2288
+ * Replaces the three nullable FKs the ledger used to carry (``work_id`` /
2289
+ * ``content_id`` / ``partner_media_id``) with one ``(kind, id)`` pair, so a new
2290
+ * platform costs **an enum value, not a migration** — the same trade every
2291
+ * other enum here makes. The id has no database foreign key: the ledger is a
2292
+ * billing and history record, and a consumed item being deleted from its
2293
+ * catalogue must not erase the record of it having been consumed.
2294
+ *
2295
+ * Grant *resolution* stays keyed by the concrete catalogue FK (grants are
2296
+ * defined per work, per content, per category); only the *ledger* subject is
2297
+ * polymorphic. :class:`app.services.consumption.Subject` bridges the two.
2298
+ */
2299
+ type SubjectKind = typeof SubjectKind[keyof typeof SubjectKind];
2300
+ declare const SubjectKind: {
2301
+ readonly content: 'content';
2302
+ readonly work: 'work';
2303
+ readonly partner_media: 'partner_media';
2304
+ readonly tutoring_request: 'tutoring_request';
2305
+ };
2306
+ //#endregion
2307
+ //#region src/models/liveLeaseRead.d.ts
2308
+ /**
2309
+ * One live lease, as staff see it. The legacy's "sessions en cours".
2310
+ *
2311
+ * ``ip_address`` is shown because it is what the establishment's own limit is
2312
+ * counted on for remote-simultaneous access, so a support agent looking at an
2313
+ * over-limit tenant needs it to make sense of the number.
2314
+ */
2315
+ interface LiveLeaseRead {
2316
+ act: EntitlementAct;
2317
+ eventId: number;
2318
+ expiresAt?: string | null;
2319
+ ipAddress?: string | null;
2320
+ startedAt: string;
2321
+ subjectId?: number | null;
2322
+ subjectKind?: SubjectKind | null;
2323
+ userId: number;
2324
+ }
2325
+ //#endregion
2326
+ //#region src/models/liveLeaseListRead.d.ts
2327
+ /**
2328
+ * Everything open for one tenant right now.
2329
+ */
2330
+ interface LiveLeaseListRead {
2331
+ data: LiveLeaseRead[];
2332
+ /** @minimum 0 */
2333
+ total: number;
2334
+ }
2335
+ //#endregion
2336
+ //#region src/models/loanRead.d.ts
2337
+ /**
2338
+ * Generated by orval 🍺
2339
+ * Do not edit manually.
2340
+ * Mozaik backend
2341
+ * 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.
2342
+ * OpenAPI spec version: 0.1.0
2343
+ */
2344
+ /**
2345
+ * One loan, as the new ledger sees it.
2346
+ *
2347
+ * Distinct from :class:`DownloadRead`, which is the legacy ``Download`` row with
2348
+ * its eleven timestamps and its provider fields. A loan here is a
2349
+ * ``consumption_event``: who borrowed what, when it expires, whether it came
2350
+ * back, and how many extensions are left.
2351
+ *
2352
+ * ``extensions_remaining`` is ``None`` when the grant sets no cap. It is
2353
+ * computed rather than stored, because a stored remainder is the same lost
2354
+ * update the legacy's ``leftnbunit*`` columns are.
2355
+ */
2356
+ interface LoanRead {
2357
+ act: string;
2358
+ borrowedAt: string;
2359
+ expiresAt?: string | null;
2360
+ extensionCount?: number;
2361
+ extensionsRemaining?: number | null;
2362
+ id: number;
2363
+ isActive: boolean;
2364
+ returnedAt?: string | null;
2365
+ workId?: number | null;
2366
+ }
2367
+ //#endregion
2368
+ //#region src/models/loanPage.d.ts
2369
+ /**
2370
+ * The caller's loans.
2371
+ */
2372
+ interface LoanPage {
2373
+ data: LoanRead[];
2374
+ }
2375
+ //#endregion
2376
+ //#region src/models/logoutWrite.d.ts
2377
+ /**
2378
+ * Generated by orval 🍺
2379
+ * Do not edit manually.
2380
+ * Mozaik backend
2381
+ * 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.
2382
+ * OpenAPI spec version: 0.1.0
2383
+ */
2384
+ /**
2385
+ * End the session at the broker.
2386
+ *
2387
+ * Sending the refresh token is what makes this more than a client-side
2388
+ * forget: it revokes the Keycloak session, so a copy of the refresh token
2389
+ * elsewhere stops working. The access token remains valid until it expires,
2390
+ * which is inherent to stateless verification and why realm access-token
2391
+ * lifetimes are short.
2392
+ */
2393
+ interface LogoutWrite {
2394
+ /**
2395
+ * @minLength 1
2396
+ * @maxLength 8192
2397
+ */
2398
+ refresh_token: string;
2399
+ }
2400
+ //#endregion
2401
+ //#region src/models/principalRead.d.ts
2402
+ /**
2403
+ * Generated by orval 🍺
2404
+ * Do not edit manually.
2405
+ * Mozaik backend
2406
+ * 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.
2407
+ * OpenAPI spec version: 0.1.0
2408
+ */
2409
+ /**
2410
+ * What the platform believes about the current session.
2411
+ *
2412
+ * Deliberately thin. It answers "who am I, how did I get here, and what is this
2413
+ * session trusted for" — the three things a client legitimately needs in order
2414
+ * to hide a control it is about to be refused. It is *not* the account: that is
2415
+ * :class:`AccountRead`.
2416
+ *
2417
+ * ``assurance`` is the clamped value, never the raw claim. A client that wants
2418
+ * to know why an operation is unavailable should read this rather than
2419
+ * re-deriving trust from ``provider``.
2420
+ */
2421
+ interface PrincipalRead {
2422
+ assurance: number;
2423
+ assuranceLabel: string;
2424
+ expiresAt?: string | null;
2425
+ mayChangeCredentials: boolean;
2426
+ mayChangeEntitlement: boolean;
2427
+ mayEditProfile: boolean;
2428
+ partnerName?: string | null;
2429
+ provider?: string | null;
2430
+ roles?: string[];
2431
+ subject: string;
2432
+ tenantId?: number | null;
2433
+ }
2434
+ //#endregion
2435
+ //#region src/models/meRead.d.ts
2436
+ /**
2437
+ * The current session, without reissuing anything.
2438
+ *
2439
+ * Separate from :class:`SessionRead` rather than that class with the token
2440
+ * fields blanked: a response shape that *can* hold a credential eventually
2441
+ * holds one, and this one never should.
2442
+ */
2443
+ interface MeRead {
2444
+ account: AccountRead;
2445
+ principal: PrincipalRead;
2446
+ }
2447
+ //#endregion
2448
+ //#region src/models/messageKind.d.ts
2449
+ /**
2450
+ * Generated by orval 🍺
2451
+ * Do not edit manually.
2452
+ * Mozaik backend
2453
+ * 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.
2454
+ * OpenAPI spec version: 0.1.0
2455
+ */
2456
+ /**
2457
+ * What a chat line is.
2458
+ *
2459
+ * Prof Express has no equivalent, because it has no message table at all — the
2460
+ * conversation lives in SendBird and the platform holds only a channel URL. So
2461
+ * "what did the teacher tell this pupil last term" is a question for a third
2462
+ * party's retention policy, and a chat that breaks needs a
2463
+ * ``/requete/reparer-probleme-chat/{id}`` route to repair it.
2464
+ */
2465
+ type MessageKind = typeof MessageKind[keyof typeof MessageKind];
2466
+ declare const MessageKind: {
2467
+ readonly text: 'text';
2468
+ readonly system: 'system';
2469
+ };
2470
+ //#endregion
2471
+ //#region src/models/messageRead.d.ts
2472
+ /**
2473
+ * One line in the thread.
2474
+ *
2475
+ * ``senderId`` rather than a name: the client already knows the participants
2476
+ * from the request, and a message stream is the wrong place to be resolving
2477
+ * display names row by row. ``null`` means the platform said it.
2478
+ *
2479
+ * ``body`` is nullable because erasure empties it and leaves the row, so a
2480
+ * client must render "message removed" rather than assume a gap in the thread
2481
+ * means nothing was ever said.
2482
+ */
2483
+ interface MessageRead {
2484
+ body?: string | null;
2485
+ createdAt: string;
2486
+ id: number;
2487
+ kind: MessageKind;
2488
+ requestId: number;
2489
+ senderId?: number | null;
2490
+ }
2491
+ //#endregion
2492
+ //#region src/models/messagePage.d.ts
2493
+ /**
2494
+ * A page of history, newest first.
2495
+ *
2496
+ * Walk backwards by passing the last ``nextBefore`` you were given. ``null``
2497
+ * means you have reached the beginning of the conversation.
2498
+ */
2499
+ interface MessagePage {
2500
+ data: MessageRead[];
2501
+ hasMore?: boolean;
2502
+ nextBefore?: number | null;
2503
+ }
2504
+ //#endregion
2505
+ //#region src/models/messageWrite.d.ts
2506
+ /**
2507
+ * Generated by orval 🍺
2508
+ * Do not edit manually.
2509
+ * Mozaik backend
2510
+ * 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.
2511
+ * OpenAPI spec version: 0.1.0
2512
+ */
2513
+ /**
2514
+ * Something to say.
2515
+ *
2516
+ * ``clientKey`` is how a send survives a lost acknowledgement: the same key
2517
+ * twice returns the original message rather than saying it twice. A chat on a
2518
+ * phone connection needs this, and the legacy has no equivalent because
2519
+ * SendBird owns the send.
2520
+ */
2521
+ interface MessageWrite {
2522
+ /**
2523
+ * @minLength 1
2524
+ * @maxLength 4000
2525
+ */
2526
+ body: string;
2527
+ clientKey?: string | null;
2528
+ }
2529
+ //#endregion
2530
+ //#region src/models/moderationWrite.d.ts
2531
+ /**
2532
+ * Publish or reject a review.
2533
+ *
2534
+ * ``reason`` is optional when publishing and required when rejecting: somebody
2535
+ * whose review disappears is owed an explanation, and the person who rejected it
2536
+ * is the only one who can give it.
2537
+ */
2538
+ interface ModerationWrite {
2539
+ reason?: string | null;
2540
+ state: ReviewState;
2541
+ }
2542
+ //#endregion
2543
+ //#region src/models/notificationRead.d.ts
2544
+ /**
2545
+ * Generated by orval 🍺
2546
+ * Do not edit manually.
2547
+ * Mozaik backend
2548
+ * 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.
2549
+ * OpenAPI spec version: 0.1.0
2550
+ */
2551
+ /**
2552
+ * One notification addressed to a patron.
2553
+ *
2554
+ * PROVISIONAL: the legacy has no DTO class for this — the handler assembles an
2555
+ * array inline. Fields are taken from the ``/application/notif`` query
2556
+ * parameters and from what the app is known to render. Confirm against
2557
+ * ``app_notification`` before relying on it.
2558
+ */
2559
+ interface NotificationRead {
2560
+ body?: string | null;
2561
+ createdAt?: string | null;
2562
+ documentId?: number | null;
2563
+ id: string;
2564
+ readAt?: string | null;
2565
+ title?: string | null;
2566
+ type?: number | null;
2567
+ }
2568
+ //#endregion
2569
+ //#region src/models/notificationListRead.d.ts
2570
+ /**
2571
+ * A patron's notifications.
2572
+ */
2573
+ interface NotificationListRead {
2574
+ data: NotificationRead[];
2575
+ unreadCount?: number;
2576
+ }
2577
+ //#endregion
2578
+ //#region src/models/packDetailReadFilters.d.ts
2579
+ /**
2580
+ * Generated by orval 🍺
2581
+ * Do not edit manually.
2582
+ * Mozaik backend
2583
+ * 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.
2584
+ * OpenAPI spec version: 0.1.0
2585
+ */
2586
+ type PackDetailReadFilters = {
2587
+ [key: string]: unknown;
2588
+ };
2589
+ //#endregion
2590
+ //#region src/models/packDetailRead.d.ts
2591
+ /**
2592
+ * A pack with its catalogs, filters, latest additions and learning paths (E38).
2593
+ *
2594
+ * ``canonical`` is how the redirect dies. When a pack resolves to a single
2595
+ * catalog the legacy answered ``302 → /pack/{id}/catalog/{groupId}``; here the
2596
+ * response is ``200`` and ``canonical`` names the resolved catalog path, leaving
2597
+ * the client to decide whether to follow it (§5.1). It is ``None`` when the pack
2598
+ * has more than one catalog.
2599
+ *
2600
+ * ``filters`` is the one shape in this package that is genuinely unspecified.
2601
+ * The spec writes ``"filters": {…}`` and nothing else; the legacy assembled it
2602
+ * per pack from whatever facets the catalogue exposed. It stays an open mapping
2603
+ * rather than an invented class — pin it from a real pack response before any
2604
+ * client depends on its interior.
2605
+ */
2606
+ interface PackDetailRead {
2607
+ canonical?: string | null;
2608
+ catalogs: CatalogRefRead[];
2609
+ filters?: PackDetailReadFilters;
2610
+ latest?: ContentSummaryRead[];
2611
+ packId: number;
2612
+ parcours?: LearningPathRefRead[];
2613
+ title: string;
2614
+ }
2615
+ //#endregion
2616
+ //#region src/models/packRead.d.ts
2617
+ /**
2618
+ * Generated by orval 🍺
2619
+ * Do not edit manually.
2620
+ * Mozaik backend
2621
+ * 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.
2622
+ * OpenAPI spec version: 0.1.0
2623
+ */
2624
+ /**
2625
+ * A content pack the caller is entitled to (E25 item).
2626
+ *
2627
+ * PROVISIONAL — the spec names ``packId``, ``title`` and ``type`` then elides
2628
+ * the rest with "the metadata needed for navigation". The pack's full shape,
2629
+ * with its catalogs, is E38 (:class:`~app.datamodels.biblio.content.PackDetailRead`).
2630
+ */
2631
+ interface PackRead {
2632
+ packId: number;
2633
+ title: string;
2634
+ type: string;
2635
+ }
2636
+ //#endregion
2637
+ //#region src/models/packListRead.d.ts
2638
+ /**
2639
+ * The caller's packs (E25). Unpaginated.
2640
+ */
2641
+ interface PackListRead {
2642
+ data: PackRead[];
2643
+ }
2644
+ //#endregion
2645
+ //#region src/models/partnerCategoryRead.d.ts
2646
+ /**
2647
+ * Generated by orval 🍺
2648
+ * Do not edit manually.
2649
+ * Mozaik backend
2650
+ * 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.
2651
+ * OpenAPI spec version: 0.1.0
2652
+ */
2653
+ /**
2654
+ * One node of a provider's taxonomy.
2655
+ *
2656
+ * ``total`` is the precomputed count for the *caller's* filter combination,
2657
+ * read from ``partner_category_total`` — not the size of the whole branch. A
2658
+ * menu that shows a count nobody can reach is how the legacy ended up with
2659
+ * categories that opened onto an empty page.
2660
+ */
2661
+ interface PartnerCategoryRead {
2662
+ categoryId: number;
2663
+ level: number;
2664
+ parentId?: number | null;
2665
+ slug: string;
2666
+ title: string;
2667
+ /** @minimum 0 */
2668
+ total?: number;
2669
+ }
2670
+ //#endregion
2671
+ //#region src/models/partnerCategoryListRead.d.ts
2672
+ /**
2673
+ * A provider's taxonomy, flat, with parent links.
2674
+ *
2675
+ * Flat rather than nested on purpose: the tree is three levels deep and the
2676
+ * menu renders two of them, so a client that wants nesting can build it from
2677
+ * ``parent_id`` — and one that wants a breadcrumb does not have to walk a
2678
+ * structure to find a node.
2679
+ */
2680
+ interface PartnerCategoryListRead {
2681
+ data: PartnerCategoryRead[];
2682
+ }
2683
+ //#endregion
2684
+ //#region src/models/partnerMediaSummaryRead.d.ts
2685
+ /**
2686
+ * A media as it appears in a listing or a slider.
2687
+ */
2688
+ interface PartnerMediaSummaryRead {
2689
+ author?: string | null;
2690
+ averageRating?: number | null;
2691
+ coverImage?: string | null;
2692
+ isFavorite?: boolean;
2693
+ mediaId: number;
2694
+ mediaType: PartnerMediaType;
2695
+ slug: string;
2696
+ title: string;
2697
+ }
2698
+ //#endregion
2699
+ //#region src/models/partnerFavoriteListRead.d.ts
2700
+ /**
2701
+ * This reader's bookmarks on one provider's catalogue.
2702
+ *
2703
+ * Unpaginated, like biblio's own service list: the legacy's favourites page had
2704
+ * no pagination either, and a bookmark list that needs it is a different
2705
+ * problem from the one this endpoint solves.
2706
+ */
2707
+ interface PartnerFavoriteListRead {
2708
+ data: PartnerMediaSummaryRead[];
2709
+ }
2710
+ //#endregion
2711
+ //#region src/models/partnerMediaPage.d.ts
2712
+ /**
2713
+ * A page of partner media.
2714
+ */
2715
+ interface PartnerMediaPage {
2716
+ data: PartnerMediaSummaryRead[];
2717
+ meta: PageMeta;
2718
+ }
2719
+ //#endregion
2720
+ //#region src/models/partnerMediaRead.d.ts
2721
+ /**
2722
+ * The detail page.
2723
+ *
2724
+ * ``biblio_content_id`` is exposed because it is the bridge a client needs to
2725
+ * cross-link a partner title to the biblio catalogue — the one thing the two
2726
+ * permanently-separate subsystems share.
2727
+ */
2728
+ interface PartnerMediaRead {
2729
+ author?: string | null;
2730
+ averageRating?: number | null;
2731
+ biblioContentId?: number | null;
2732
+ categories?: PartnerCategoryRead[];
2733
+ contributor?: string | null;
2734
+ coverImage?: string | null;
2735
+ description?: string | null;
2736
+ isFavorite?: boolean;
2737
+ isbn?: string | null;
2738
+ language?: string | null;
2739
+ mediaId: number;
2740
+ mediaType: PartnerMediaType;
2741
+ pageCount?: number | null;
2742
+ publicationDate?: string | null;
2743
+ publisherName?: string | null;
2744
+ seriesName?: string | null;
2745
+ slug: string;
2746
+ title: string;
2747
+ }
2748
+ //#endregion
2749
+ //#region src/models/patronDetailRead.d.ts
2750
+ /**
2751
+ * Generated by orval 🍺
2752
+ * Do not edit manually.
2753
+ * Mozaik backend
2754
+ * 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.
2755
+ * OpenAPI spec version: 0.1.0
2756
+ */
2757
+ /**
2758
+ * One patron in full.
2759
+ *
2760
+ * Still not everything: ``password_hash`` and ``parental_code_hash`` are absent
2761
+ * by construction rather than by filtering, because a response model that *can*
2762
+ * hold a credential eventually does.
2763
+ */
2764
+ interface PatronDetailRead {
2765
+ accessLevel: number;
2766
+ birthDate?: string | null;
2767
+ email?: string | null;
2768
+ firstName: string;
2769
+ isActive: boolean;
2770
+ isAnonymous: boolean;
2771
+ isGuest: boolean;
2772
+ isPendingActivation: boolean;
2773
+ lastLoginAt?: string | null;
2774
+ lastName?: string | null;
2775
+ login: string;
2776
+ memberNumber?: string | null;
2777
+ parentId?: number | null;
2778
+ registeredAt: string;
2779
+ subscriptionEndsAt?: string | null;
2780
+ tenantId: number;
2781
+ userId: number;
2782
+ }
2783
+ //#endregion
2784
+ //#region src/models/patronSummaryRead.d.ts
2785
+ /**
2786
+ * Generated by orval 🍺
2787
+ * Do not edit manually.
2788
+ * Mozaik backend
2789
+ * 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.
2790
+ * OpenAPI spec version: 0.1.0
2791
+ */
2792
+ /**
2793
+ * A patron as a row in a list.
2794
+ *
2795
+ * No email. A staff listing is the most-viewed screen in the back office and
2796
+ * the easiest to export; the address is on the detail view, one deliberate click
2797
+ * away, where the access is worth auditing.
2798
+ */
2799
+ interface PatronSummaryRead {
2800
+ firstName: string;
2801
+ isActive: boolean;
2802
+ isPendingActivation: boolean;
2803
+ lastLoginAt?: string | null;
2804
+ lastName?: string | null;
2805
+ login: string;
2806
+ registeredAt: string;
2807
+ tenantId: number;
2808
+ userId: number;
2809
+ }
2810
+ //#endregion
2811
+ //#region src/models/patronPage.d.ts
2812
+ interface PatronPage {
2813
+ data: PatronSummaryRead[];
2814
+ meta: PageMeta;
2815
+ }
2816
+ //#endregion
2817
+ //#region src/models/patronUpdateWrite.d.ts
2818
+ /**
2819
+ * Generated by orval 🍺
2820
+ * Do not edit manually.
2821
+ * Mozaik backend
2822
+ * 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.
2823
+ * OpenAPI spec version: 0.1.0
2824
+ */
2825
+ /**
2826
+ * What a staff member may change about a patron.
2827
+ *
2828
+ * A short list on purpose. Identity comes from the identity provider and is
2829
+ * re-synced on every login, so a name edited here is reverted at the next
2830
+ * sign-in; and nothing here can move a patron between tenants, which would be a
2831
+ * way to walk an account out of one library and into another.
2832
+ */
2833
+ interface PatronUpdateWrite {
2834
+ accessLevel?: number | null;
2835
+ isActive?: boolean | null;
2836
+ memberNumber?: string | null;
2837
+ subscriptionEndsAt?: string | null;
2838
+ }
2839
+ //#endregion
2840
+ //#region src/models/playbackReportRead.d.ts
2841
+ /**
2842
+ * Generated by orval 🍺
2843
+ * Do not edit manually.
2844
+ * Mozaik backend
2845
+ * 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.
2846
+ * OpenAPI spec version: 0.1.0
2847
+ */
2848
+ /**
2849
+ * An accepted incident report — ``Entity/Report.php``.
2850
+ */
2851
+ interface PlaybackReportRead {
2852
+ createdAt?: string | null;
2853
+ date?: string | null;
2854
+ description?: string | null;
2855
+ email?: string | null;
2856
+ id: number;
2857
+ operatingSystem?: number | null;
2858
+ patronId?: number | null;
2859
+ tenantId?: number | null;
2860
+ title?: string | null;
2861
+ type?: number | null;
2862
+ updatedAt?: string | null;
2863
+ version?: string | null;
2864
+ }
2865
+ //#endregion
2866
+ //#region src/models/playbackReportWrite.d.ts
2867
+ /**
2868
+ * Generated by orval 🍺
2869
+ * Do not edit manually.
2870
+ * Mozaik backend
2871
+ * 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.
2872
+ * OpenAPI spec version: 0.1.0
2873
+ */
2874
+ /**
2875
+ * Report a playback problem (``/streaming/report``, ``/application/report``).
2876
+ *
2877
+ * Maps to ``Entity/Report.php``.
2878
+ *
2879
+ * ``patron_id``, ``tenant_id`` and ``local_branch_id`` are **legacy transition
2880
+ * fields**. They exist because the current clients send them and the current
2881
+ * server trusts them. The rebuild must take all three from the credential and
2882
+ * ignore whatever arrives here; delete the fields once no deployed client sends
2883
+ * them.
2884
+ *
2885
+ * ``email`` is free text sent onward in a message. Validate it and rate-limit
2886
+ * the endpoint: unauthenticated, it is a spam relay with the library's return
2887
+ * address on it.
2888
+ */
2889
+ interface PlaybackReportWrite {
2890
+ date: string;
2891
+ /**
2892
+ * @minLength 1
2893
+ * @maxLength 20000
2894
+ */
2895
+ description: string;
2896
+ docId?: number | null;
2897
+ /**
2898
+ * @minLength 3
2899
+ * @maxLength 200
2900
+ */
2901
+ email: string;
2902
+ localBranchId?: number | null;
2903
+ patronId?: number | null;
2904
+ tenantId?: number | null;
2905
+ /**
2906
+ * @minLength 1
2907
+ * @maxLength 200
2908
+ */
2909
+ title: string;
2910
+ /**
2911
+ * @minimum 0
2912
+ * @maximum 100
2913
+ */
2914
+ type: number;
2915
+ }
2916
+ //#endregion
2917
+ //#region src/models/practitionerDocumentKind.d.ts
2918
+ /**
2919
+ * Generated by orval 🍺
2920
+ * Do not edit manually.
2921
+ * Mozaik backend
2922
+ * 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.
2923
+ * OpenAPI spec version: 0.1.0
2924
+ */
2925
+ /**
2926
+ * A compliance document a contracted practitioner must hold.
2927
+ *
2928
+ * French self-employment paperwork, which the legacy keeps as four bare
2929
+ * ``text`` columns on both ``teachers`` and ``switchmen``
2930
+ * (``kbis_siret_document``, ``ursaff_document``, ``ursaff_date``,
2931
+ * ``contrat_documents``) — so a document has no expiry anyone can query, and
2932
+ * ``ursaff_date`` is ``NOT NULL`` with no default, meaning "not supplied" is
2933
+ * stored as a real date.
2934
+ *
2935
+ * Modelling expiry is the point: an URSSAF attestation is valid for six months
2936
+ * and a lapsed one is a compliance problem that should be answerable by a
2937
+ * query rather than by opening a filing cabinet.
2938
+ */
2939
+ type PractitionerDocumentKind = typeof PractitionerDocumentKind[keyof typeof PractitionerDocumentKind];
2940
+ declare const PractitionerDocumentKind: {
2941
+ readonly siret: 'siret';
2942
+ readonly urssaf: 'urssaf';
2943
+ readonly contract: 'contract';
2944
+ readonly insurance: 'insurance';
2945
+ readonly diploma: 'diploma';
2946
+ };
2947
+ //#endregion
2948
+ //#region src/models/practitionerDocumentRead.d.ts
2949
+ /**
2950
+ * One compliance document. Metadata only — never the file itself here.
2951
+ */
2952
+ interface PractitionerDocumentRead {
2953
+ expiresAt?: string | null;
2954
+ filename?: string | null;
2955
+ id: number;
2956
+ isLapsed?: boolean;
2957
+ issuedAt?: string | null;
2958
+ kind: PractitionerDocumentKind;
2959
+ userId: number;
2960
+ }
2961
+ //#endregion
2962
+ //#region src/models/practitionerDocumentListRead.d.ts
2963
+ /**
2964
+ * A practitioner's documents, or everything lapsing.
2965
+ */
2966
+ interface PractitionerDocumentListRead {
2967
+ data: PractitionerDocumentRead[];
2968
+ }
2969
+ //#endregion
2970
+ //#region src/models/practitionerRead.d.ts
2971
+ /**
2972
+ * Generated by orval 🍺
2973
+ * Do not edit manually.
2974
+ * Mozaik backend
2975
+ * 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.
2976
+ * OpenAPI spec version: 0.1.0
2977
+ */
2978
+ /**
2979
+ * A teacher, dispatcher or coach as the back office sees them.
2980
+ *
2981
+ * No IBAN and no document contents. Those are the most sensitive non-health
2982
+ * data in the schema and they belong to contractors rather than customers, so
2983
+ * they are not in a list model — see the GDPR note in
2984
+ * ``app.models.tutoring.workforce``.
2985
+ */
2986
+ interface PractitionerRead {
2987
+ capabilities?: string[];
2988
+ displayName: string;
2989
+ email?: string | null;
2990
+ engagedAt?: string | null;
2991
+ hasLapsedDocument?: boolean;
2992
+ isAvailable?: boolean;
2993
+ isTestOnly?: boolean;
2994
+ levelIds?: number[];
2995
+ mainSubjectId?: number | null;
2996
+ roles?: string[];
2997
+ subjectIds?: number[];
2998
+ userId: number;
2999
+ }
3000
+ //#endregion
3001
+ //#region src/models/practitionerPage.d.ts
3002
+ /**
3003
+ * A page of practitioners.
3004
+ */
3005
+ interface PractitionerPage {
3006
+ data: PractitionerRead[];
3007
+ meta: PageMeta;
3008
+ }
3009
+ //#endregion
3010
+ //#region src/models/practitionerWrite.d.ts
3011
+ /**
3012
+ * Generated by orval 🍺
3013
+ * Do not edit manually.
3014
+ * Mozaik backend
3015
+ * 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.
3016
+ * OpenAPI spec version: 0.1.0
3017
+ */
3018
+ /**
3019
+ * What the back office may change about a practitioner.
3020
+ *
3021
+ * Competencies are a wholesale replace rather than add/remove endpoints: the
3022
+ * screen shows a checklist and submits it, and two lists are cheaper to reason
3023
+ * about than a diff protocol. Absent means unchanged; an empty list means none.
3024
+ *
3025
+ * **Roles are not here.** They were, briefly, and it was the wrong place: this
3026
+ * endpoint can only reach somebody who already has a ``practitioner_profile``
3027
+ * row, so ``student``, ``parent``, ``librarian`` and ``support`` could not be
3028
+ * granted at all — and it only ever wrote Prof Express, at the caller's own
3029
+ * tenant. Granting is ``PUT /admin/users/{id}/product-roles``, which is
3030
+ * cross-product, takes an explicit organisation, and is audited.
3031
+ */
3032
+ interface PractitionerWrite {
3033
+ capabilities?: string[] | null;
3034
+ isAvailable?: boolean | null;
3035
+ isTestOnly?: boolean | null;
3036
+ levelIds?: number[] | null;
3037
+ mainSubjectId?: number | null;
3038
+ subjectIds?: number[] | null;
3039
+ }
3040
+ //#endregion
3041
+ //#region src/models/preferencesRead.d.ts
3042
+ /**
3043
+ * Generated by orval 🍺
3044
+ * Do not edit manually.
3045
+ * Mozaik backend
3046
+ * 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.
3047
+ * OpenAPI spec version: 0.1.0
3048
+ */
3049
+ /**
3050
+ * The caller's preferences (E28).
3051
+ *
3052
+ * One key today. It stays an object rather than a bare array so that a second
3053
+ * preference can be added without a breaking change.
3054
+ */
3055
+ interface PreferencesRead {
3056
+ categories: number[];
3057
+ }
3058
+ //#endregion
3059
+ //#region src/models/pressArticleListReadFilters.d.ts
3060
+ /**
3061
+ * Generated by orval 🍺
3062
+ * Do not edit manually.
3063
+ * Mozaik backend
3064
+ * 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.
3065
+ * OpenAPI spec version: 0.1.0
3066
+ */
3067
+ type PressArticleListReadFilters = {
3068
+ [key: string]: unknown;
3069
+ };
3070
+ //#endregion
3071
+ //#region src/models/pressArticleListRead.d.ts
3072
+ /**
3073
+ * The press list with its own navigation aids (E41).
3074
+ *
3075
+ * The legacy page also carried four carousels — ``latest``, ``lastRead``,
3076
+ * ``favorites`` and ``favoritesByTheme`` — which are **commented out and
3077
+ * hardcoded to empty** in the source. They are absent here on purpose. Adding
3078
+ * them is a product decision; inheriting four empty arrays is not.
3079
+ */
3080
+ interface PressArticleListRead {
3081
+ data: PressArticleSummaryRead[];
3082
+ filters?: PressArticleListReadFilters;
3083
+ meta: PageMeta;
3084
+ themes?: ThemeRefRead[];
3085
+ }
3086
+ //#endregion
3087
+ //#region src/models/pressArticleRead.d.ts
3088
+ /**
3089
+ * Generated by orval 🍺
3090
+ * Do not edit manually.
3091
+ * Mozaik backend
3092
+ * 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.
3093
+ * OpenAPI spec version: 0.1.0
3094
+ */
3095
+ /**
3096
+ * One press article (E42). PROVISIONAL beyond the named fields.
3097
+ *
3098
+ * The legacy ``GET /press/{id}`` dereferences the article unguarded, so an
3099
+ * unknown or non-entitled id returns ``500`` (defect D12). It is ``404`` here.
3100
+ */
3101
+ interface PressArticleRead {
3102
+ articleId: number;
3103
+ body?: string | null;
3104
+ favorited: boolean;
3105
+ publishedAt?: string | null;
3106
+ themeId?: number | null;
3107
+ title: string;
3108
+ }
3109
+ //#endregion
3110
+ //#region src/models/productGrantRead.d.ts
3111
+ /**
3112
+ * One grant: what somebody is, where, in which product.
3113
+ */
3114
+ interface ProductGrantRead {
3115
+ grantedAt: string;
3116
+ product: Product;
3117
+ role: ProductRole;
3118
+ tenantId: number;
3119
+ }
3120
+ //#endregion
3121
+ //#region src/models/productGrantListRead.d.ts
3122
+ /**
3123
+ * Every grant this account holds, across products and organisations.
3124
+ */
3125
+ interface ProductGrantListRead {
3126
+ data: ProductGrantRead[];
3127
+ }
3128
+ //#endregion
3129
+ //#region src/models/productGrantWrite.d.ts
3130
+ /**
3131
+ * Replace this account's roles for one product at one organisation.
3132
+ *
3133
+ * Wholesale rather than add/remove: a checklist is what the screen shows, and
3134
+ * two sets are cheaper to reason about than a diff protocol. An empty
3135
+ * ``roles`` revokes everything for that pairing, which is a real instruction
3136
+ * and the way to take a remit away.
3137
+ *
3138
+ * Scoped to **one** ``(tenant, product)`` pair, so setting somebody's Prof
3139
+ * Express roles at one library cannot silently drop the librarian grant that
3140
+ * makes them staff at another, or the support remit they hold for biblio.
3141
+ *
3142
+ * ``tenantId`` is explicit rather than taken from the caller's token: a vendor
3143
+ * operator administers grants at the libraries beneath them, and defaulting to
3144
+ * their own tenant would make that impossible while looking like it worked.
3145
+ */
3146
+ interface ProductGrantWrite {
3147
+ product: Product;
3148
+ reason?: string | null;
3149
+ /** @maxItems 8 */
3150
+ roles?: ProductRole[];
3151
+ /** @minimum 1 */
3152
+ tenantId: number;
3153
+ }
3154
+ //#endregion
3155
+ //#region src/models/profileCreateWrite.d.ts
3156
+ /**
3157
+ * Generated by orval 🍺
3158
+ * Do not edit manually.
3159
+ * Mozaik backend
3160
+ * 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.
3161
+ * OpenAPI spec version: 0.1.0
3162
+ */
3163
+ /**
3164
+ * Add a profile to the caller's account (E21).
3165
+ *
3166
+ * The ten-profile cap is enforced *here*. In the legacy it was enforced only on
3167
+ * the form route ``GET /createprofile`` and never on the write, so it is
3168
+ * bypassable today by anyone posting directly. Exceeding it is
3169
+ * ``409 PROFILE_LIMIT_REACHED``; validation failure is ``422``, not the ``200``
3170
+ * with an error message the legacy returned.
3171
+ */
3172
+ interface ProfileCreateWrite {
3173
+ avatar?: string | null;
3174
+ birthDate?: string | null;
3175
+ /**
3176
+ * @minLength 1
3177
+ * @maxLength 200
3178
+ */
3179
+ firstName: string;
3180
+ lastName?: string | null;
3181
+ }
3182
+ //#endregion
3183
+ //#region src/models/profileRead.d.ts
3184
+ /**
3185
+ * Generated by orval 🍺
3186
+ * Do not edit manually.
3187
+ * Mozaik backend
3188
+ * 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.
3189
+ * OpenAPI spec version: 0.1.0
3190
+ */
3191
+ /**
3192
+ * One profile under the caller's account (E20 item shape, E22 whole body).
3193
+ *
3194
+ * ``avatar`` is a string, not the integer the spec writes. The spec was
3195
+ * describing the legacy wire format; ``app.models.identity.User.avatar`` is
3196
+ * ``TEXT``, and inventing an integer here would mean a lossy parse in the mapper
3197
+ * for no gain now that the clients are being rebuilt anyway. Same reasoning for
3198
+ * ``last_name``, which is nullable on the model.
3199
+ */
3200
+ interface ProfileRead {
3201
+ avatar?: string | null;
3202
+ firstName: string;
3203
+ isAccountHolder: boolean;
3204
+ lastName?: string | null;
3205
+ /** @minimum 1 */
3206
+ profileId: number;
3207
+ }
3208
+ //#endregion
3209
+ //#region src/models/profileListRead.d.ts
3210
+ /**
3211
+ * The caller's profiles (E20).
3212
+ *
3213
+ * Unpaginated: the account holds at most ten (see
3214
+ * :class:`ProfileCreateWrite`), so there is no ``meta`` block.
3215
+ *
3216
+ * One endpoint replaces two legacy routes — ``GET /profiles`` and
3217
+ * ``GET /profile/manage`` rendered the same collection two different ways. The
3218
+ * difference was presentation, which is now the client's problem.
3219
+ */
3220
+ interface ProfileListRead {
3221
+ data: ProfileRead[];
3222
+ }
3223
+ //#endregion
3224
+ //#region src/models/profileUpdateWrite.d.ts
3225
+ /**
3226
+ * Generated by orval 🍺
3227
+ * Do not edit manually.
3228
+ * Mozaik backend
3229
+ * 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.
3230
+ * OpenAPI spec version: 0.1.0
3231
+ */
3232
+ /**
3233
+ * Partially update one of the caller's profiles (E23).
3234
+ *
3235
+ * Keep the one good habit the legacy had here: after confirming ownership, it
3236
+ * overwrites the identity fields in the payload from the trusted server-side
3237
+ * record, so body tampering cannot retarget the write. That is why no
3238
+ * ``profile_id`` field exists on this model — the target comes from the path.
3239
+ */
3240
+ interface ProfileUpdateWrite {
3241
+ avatar?: string | null;
3242
+ birthDate?: string | null;
3243
+ firstName?: string | null;
3244
+ lastName?: string | null;
3245
+ }
3246
+ //#endregion
3247
+ //#region src/models/ratingUpdateWrite.d.ts
3248
+ /**
3249
+ * Generated by orval 🍺
3250
+ * Do not edit manually.
3251
+ * Mozaik backend
3252
+ * 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.
3253
+ * OpenAPI spec version: 0.1.0
3254
+ */
3255
+ /**
3256
+ * Rate a document (``POST /document/rating/update``).
3257
+ *
3258
+ * Legacy ``docid`` moves to the path; only the value stays in the body.
3259
+ */
3260
+ interface RatingUpdateWrite {
3261
+ /**
3262
+ * @minimum 0
3263
+ * @maximum 5
3264
+ */
3265
+ note: number;
3266
+ }
3267
+ //#endregion
3268
+ //#region src/models/readCatalogParams.d.ts
3269
+ /**
3270
+ * Generated by orval 🍺
3271
+ * Do not edit manually.
3272
+ * Mozaik backend
3273
+ * 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.
3274
+ * OpenAPI spec version: 0.1.0
3275
+ */
3276
+ type ReadCatalogParams = {
3277
+ /**
3278
+ * @minimum 1
3279
+ */
3280
+ page?: number;
3281
+ /**
3282
+ * @minimum 1
3283
+ * @maximum 100
3284
+ */
3285
+ limit?: number;
3286
+ };
3287
+ //#endregion
3288
+ //#region src/models/readCatalogThemeParams.d.ts
3289
+ /**
3290
+ * Generated by orval 🍺
3291
+ * Do not edit manually.
3292
+ * Mozaik backend
3293
+ * 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.
3294
+ * OpenAPI spec version: 0.1.0
3295
+ */
3296
+ type ReadCatalogThemeParams = {
3297
+ /**
3298
+ * @minimum 1
3299
+ */
3300
+ page?: number;
3301
+ /**
3302
+ * @minimum 1
3303
+ * @maximum 100
3304
+ */
3305
+ limit?: number;
3306
+ };
3307
+ //#endregion
3308
+ //#region src/models/readEditorParams.d.ts
3309
+ /**
3310
+ * Generated by orval 🍺
3311
+ * Do not edit manually.
3312
+ * Mozaik backend
3313
+ * 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.
3314
+ * OpenAPI spec version: 0.1.0
3315
+ */
3316
+ type ReadEditorParams = {
3317
+ /**
3318
+ * @minimum 1
3319
+ */
3320
+ page?: number;
3321
+ /**
3322
+ * @minimum 1
3323
+ * @maximum 100
3324
+ */
3325
+ limit?: number;
3326
+ };
3327
+ //#endregion
3328
+ //#region src/models/readerPackageRead.d.ts
3329
+ /**
3330
+ * Where the reader front-end fetches the content itself.
3331
+ *
3332
+ * ``url`` is a short-lived, DRM-wrapped location issued by the partner. It is a
3333
+ * credential: it should not be logged, cached by a shared proxy, or stored.
3334
+ *
3335
+ * Two expiries here, and they are not the same thing. ``expiresAt`` is the
3336
+ * partner's deadline on that URL. ``lease.expiresAt`` is ours, on the seat the
3337
+ * read occupies.
3338
+ */
3339
+ interface ReaderPackageRead {
3340
+ expiresAt?: string | null;
3341
+ format: string;
3342
+ lease: LeaseRead;
3343
+ url: string;
3344
+ }
3345
+ //#endregion
3346
+ //#region src/models/readHomeFeedParams.d.ts
3347
+ /**
3348
+ * Generated by orval 🍺
3349
+ * Do not edit manually.
3350
+ * Mozaik backend
3351
+ * 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.
3352
+ * OpenAPI spec version: 0.1.0
3353
+ */
3354
+ type ReadHomeFeedParams = {
3355
+ /**
3356
+ * @minimum 1
3357
+ * @maximum 50
3358
+ */
3359
+ limit?: number;
3360
+ };
3361
+ //#endregion
3362
+ //#region src/models/readingPositionRead.d.ts
3363
+ /**
3364
+ * Generated by orval 🍺
3365
+ * Do not edit manually.
3366
+ * Mozaik backend
3367
+ * 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.
3368
+ * OpenAPI spec version: 0.1.0
3369
+ */
3370
+ /**
3371
+ * Where this reader last was.
3372
+ *
3373
+ * Both shapes the partner uses share ``reached_at`` and ``percentage``; the
3374
+ * rest is format-specific and nullable rather than split into two models,
3375
+ * because a client renders a progress bar from ``percentage`` without caring
3376
+ * which it got.
3377
+ */
3378
+ interface ReadingPositionRead {
3379
+ elapsedTime?: number | null;
3380
+ idref?: string | null;
3381
+ path?: string | null;
3382
+ /**
3383
+ * @minimum 0
3384
+ * @maximum 1
3385
+ */
3386
+ percentage: number;
3387
+ reachedAt: string;
3388
+ }
3389
+ //#endregion
3390
+ //#region src/models/readingPositionWriteUsageBlocks.d.ts
3391
+ /**
3392
+ * Generated by orval 🍺
3393
+ * Do not edit manually.
3394
+ * Mozaik backend
3395
+ * 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.
3396
+ * OpenAPI spec version: 0.1.0
3397
+ */
3398
+ type ReadingPositionWriteUsageBlocks = {
3399
+ [key: string]: unknown;
3400
+ }[] | null;
3401
+ //#endregion
3402
+ //#region src/models/readingPositionWrite.d.ts
3403
+ /**
3404
+ * Report progress.
3405
+ *
3406
+ * ``reached_at`` is required and must carry a timezone. The legacy took epoch
3407
+ * milliseconds and divided; an instant with an offset is the same information
3408
+ * without a conversion that can silently be wrong by hours.
3409
+ *
3410
+ * A caller sends the pair for its format: ``path``/``idref`` for EPUB,
3411
+ * ``elapsed_time`` for audio. Sending neither still records ``percentage``,
3412
+ * which is what a progress bar needs.
3413
+ */
3414
+ interface ReadingPositionWrite {
3415
+ elapsedTime?: number | null;
3416
+ idref?: string | null;
3417
+ path?: string | null;
3418
+ /**
3419
+ * @minimum 0
3420
+ * @maximum 1
3421
+ */
3422
+ percentage: number;
3423
+ reachedAt: string;
3424
+ usageBlocks?: ReadingPositionWriteUsageBlocks;
3425
+ }
3426
+ //#endregion
3427
+ //#region src/models/readingSessionRead.d.ts
3428
+ /**
3429
+ * Generated by orval 🍺
3430
+ * Do not edit manually.
3431
+ * Mozaik backend
3432
+ * 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.
3433
+ * OpenAPI spec version: 0.1.0
3434
+ */
3435
+ /**
3436
+ * The stored session's id (E54).
3437
+ *
3438
+ * ``201`` with a ``Location`` header on first write for a tag, ``200`` when the
3439
+ * tag already existed. Never an error for a repeat — that is what idempotent
3440
+ * means (§2.6).
3441
+ */
3442
+ interface ReadingSessionRead {
3443
+ id: number;
3444
+ }
3445
+ //#endregion
3446
+ //#region src/models/readingSessionWrite.d.ts
3447
+ /**
3448
+ * Generated by orval 🍺
3449
+ * Do not edit manually.
3450
+ * Mozaik backend
3451
+ * 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.
3452
+ * OpenAPI spec version: 0.1.0
3453
+ */
3454
+ /**
3455
+ * Record one content-consumption session (E54).
3456
+ *
3457
+ * ``PUT /reading-sessions/{sessionTag}`` — idempotent on a client-generated
3458
+ * tag carried in the path. The legacy handler already checked whether the tag
3459
+ * existed and returned success rather than duplicating, which is exactly an
3460
+ * upsert keyed by a client-supplied identifier; the verb now says so.
3461
+ *
3462
+ * **There is no ``user_id`` and no ``client_id``, and there must never be.**
3463
+ * The legacy ``POST /api/v1/sessions`` was unauthenticated and took both from
3464
+ * the body without checking either against any credential, so consumption
3465
+ * records were forgeable for any account (defect D3). Both are derived from the
3466
+ * credential (§3.3).
3467
+ *
3468
+ * ``end_time`` before ``start_time`` is ``422``, as is an unparseable timestamp
3469
+ * — the legacy returned ``500`` for malformed JSON here.
3470
+ */
3471
+ interface ReadingSessionWrite {
3472
+ /** @minimum 1 */
3473
+ contentId: number;
3474
+ endTime: string;
3475
+ startTime: string;
3476
+ }
3477
+ //#endregion
3478
+ //#region src/models/readPackageParams.d.ts
3479
+ /**
3480
+ * Generated by orval 🍺
3481
+ * Do not edit manually.
3482
+ * Mozaik backend
3483
+ * 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.
3484
+ * OpenAPI spec version: 0.1.0
3485
+ */
3486
+ type ReadPackageParams = {
3487
+ /**
3488
+ * @pattern ^(epub|audio)$
3489
+ */
3490
+ format?: string;
3491
+ };
3492
+ //#endregion
3493
+ //#region src/models/readPackParams.d.ts
3494
+ /**
3495
+ * Generated by orval 🍺
3496
+ * Do not edit manually.
3497
+ * Mozaik backend
3498
+ * 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.
3499
+ * OpenAPI spec version: 0.1.0
3500
+ */
3501
+ type ReadPackParams = {
3502
+ /**
3503
+ * @minimum 1
3504
+ */
3505
+ page?: number;
3506
+ /**
3507
+ * @minimum 1
3508
+ * @maximum 100
3509
+ */
3510
+ limit?: number;
3511
+ };
3512
+ //#endregion
3513
+ //#region src/models/readPatronLicenseParams.d.ts
3514
+ /**
3515
+ * Generated by orval 🍺
3516
+ * Do not edit manually.
3517
+ * Mozaik backend
3518
+ * 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.
3519
+ * OpenAPI spec version: 0.1.0
3520
+ */
3521
+ type ReadPatronLicenseParams = {
3522
+ /**
3523
+ * @minLength 3
3524
+ * @maxLength 200
3525
+ */
3526
+ email: string;
3527
+ };
3528
+ //#endregion
3529
+ //#region src/models/readPressReviewParams.d.ts
3530
+ /**
3531
+ * Generated by orval 🍺
3532
+ * Do not edit manually.
3533
+ * Mozaik backend
3534
+ * 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.
3535
+ * OpenAPI spec version: 0.1.0
3536
+ */
3537
+ type ReadPressReviewParams = {
3538
+ theme_id?: number | null;
3539
+ /**
3540
+ * @minimum 1
3541
+ * @maximum 50
3542
+ */
3543
+ limit?: number;
3544
+ };
3545
+ //#endregion
3546
+ //#region src/models/readRecommendationsParams.d.ts
3547
+ /**
3548
+ * Generated by orval 🍺
3549
+ * Do not edit manually.
3550
+ * Mozaik backend
3551
+ * 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.
3552
+ * OpenAPI spec version: 0.1.0
3553
+ */
3554
+ type ReadRecommendationsParams = {
3555
+ /**
3556
+ * @minimum 1
3557
+ * @maximum 50
3558
+ */
3559
+ limit?: number;
3560
+ };
3561
+ //#endregion
3562
+ //#region src/models/recommendationsRead.d.ts
3563
+ /**
3564
+ * Recommendations for a content item (E35). Unpaginated, capped by ``limit``.
3565
+ *
3566
+ * New as an endpoint; the legacy embedded this in the content page.
3567
+ */
3568
+ interface RecommendationsRead {
3569
+ data: ContentSummaryRead[];
3570
+ }
3571
+ //#endregion
3572
+ //#region src/models/refreshWrite.d.ts
3573
+ /**
3574
+ * Generated by orval 🍺
3575
+ * Do not edit manually.
3576
+ * Mozaik backend
3577
+ * 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.
3578
+ * OpenAPI spec version: 0.1.0
3579
+ */
3580
+ /**
3581
+ * Exchange a refresh token for a new pair.
3582
+ *
3583
+ * The refresh token is itself the credential, so the endpoint takes no bearer.
3584
+ * Rotation is enforced at the broker: the presented token is invalidated as the
3585
+ * new pair is issued.
3586
+ *
3587
+ * Field name is snake_case on the wire for the same RFC 6749 reason as
3588
+ * :class:`TokenPairRead`.
3589
+ */
3590
+ interface RefreshWrite {
3591
+ /**
3592
+ * @minLength 1
3593
+ * @maxLength 8192
3594
+ */
3595
+ refresh_token: string;
3596
+ }
3597
+ //#endregion
3598
+ //#region src/models/reviewModerationRead.d.ts
3599
+ /**
3600
+ * One review awaiting a decision.
3601
+ */
3602
+ interface ReviewModerationRead {
3603
+ documentId?: number | null;
3604
+ id: number;
3605
+ rating?: number | null;
3606
+ state: ReviewState;
3607
+ submittedAt?: string | null;
3608
+ tenantId?: number | null;
3609
+ text?: string | null;
3610
+ userId?: number | null;
3611
+ }
3612
+ //#endregion
3613
+ //#region src/models/reviewPage.d.ts
3614
+ interface ReviewPage {
3615
+ data: ReviewModerationRead[];
3616
+ meta: PageMeta;
3617
+ }
3618
+ //#endregion
3619
+ //#region src/models/reviewRead.d.ts
3620
+ /**
3621
+ * Generated by orval 🍺
3622
+ * Do not edit manually.
3623
+ * Mozaik backend
3624
+ * 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.
3625
+ * OpenAPI spec version: 0.1.0
3626
+ */
3627
+ /**
3628
+ * A patron's written review — ``Entity/Review.php``.
3629
+ */
3630
+ interface ReviewRead {
3631
+ documentId: number;
3632
+ id: number;
3633
+ rating?: number;
3634
+ text?: string | null;
3635
+ }
3636
+ //#endregion
3637
+ //#region src/models/reviewUpdateWrite.d.ts
3638
+ /**
3639
+ * Generated by orval 🍺
3640
+ * Do not edit manually.
3641
+ * Mozaik backend
3642
+ * 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.
3643
+ * OpenAPI spec version: 0.1.0
3644
+ */
3645
+ /**
3646
+ * Write or amend a review (``POST /document/review/update/{docId}[/{avisId}]``).
3647
+ *
3648
+ * Both identifiers stay in the path, as the legacy already has them there.
3649
+ */
3650
+ interface ReviewUpdateWrite {
3651
+ /**
3652
+ * @minimum 0
3653
+ * @maximum 5
3654
+ */
3655
+ note: number;
3656
+ /**
3657
+ * @minLength 1
3658
+ * @maxLength 20000
3659
+ */
3660
+ text: string;
3661
+ }
3662
+ //#endregion
3663
+ //#region src/models/searchNavigationRead.d.ts
3664
+ /**
3665
+ * Generated by orval 🍺
3666
+ * Do not edit manually.
3667
+ * Mozaik backend
3668
+ * 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.
3669
+ * OpenAPI spec version: 0.1.0
3670
+ */
3671
+ /**
3672
+ * One tab of the search result navigation (E46).
3673
+ *
3674
+ * This is what replaces the legacy redirect: rather than bouncing the client to
3675
+ * a corrected URL, the response describes which families are valid, how many
3676
+ * hits each holds, and which one is active.
3677
+ */
3678
+ interface SearchNavigationRead {
3679
+ active: boolean;
3680
+ label: string;
3681
+ total: number;
3682
+ type: string;
3683
+ }
3684
+ //#endregion
3685
+ //#region src/models/searchParams.d.ts
3686
+ /**
3687
+ * Generated by orval 🍺
3688
+ * Do not edit manually.
3689
+ * Mozaik backend
3690
+ * 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.
3691
+ * OpenAPI spec version: 0.1.0
3692
+ */
3693
+ type SearchParams = {
3694
+ /**
3695
+ * @minimum 1
3696
+ */
3697
+ page?: number;
3698
+ /**
3699
+ * @minimum 1
3700
+ * @maximum 100
3701
+ */
3702
+ limit?: number;
3703
+ /**
3704
+ * @maxLength 100
3705
+ */
3706
+ q?: string;
3707
+ type?: string | null;
3708
+ filter?: string | null;
3709
+ };
3710
+ //#endregion
3711
+ //#region src/models/searchResultsRead.d.ts
3712
+ /**
3713
+ * Search results plus the family navigation (E46).
3714
+ */
3715
+ interface SearchResultsRead {
3716
+ data: ContentSummaryRead[];
3717
+ meta: PageMeta;
3718
+ navigation?: SearchNavigationRead[];
3719
+ }
3720
+ //#endregion
3721
+ //#region src/models/serviceRead.d.ts
3722
+ /**
3723
+ * Generated by orval 🍺
3724
+ * Do not edit manually.
3725
+ * Mozaik backend
3726
+ * 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.
3727
+ * OpenAPI spec version: 0.1.0
3728
+ */
3729
+ /**
3730
+ * A third-party service the caller's establishment entitles them to (E27).
3731
+ *
3732
+ * PROVISIONAL. ``url`` is the handoff into the supplier's own platform.
3733
+ */
3734
+ interface ServiceRead {
3735
+ serviceId: number;
3736
+ title: string;
3737
+ url: string;
3738
+ }
3739
+ //#endregion
3740
+ //#region src/models/serviceListRead.d.ts
3741
+ /**
3742
+ * The caller's services (E27). Unpaginated.
3743
+ */
3744
+ interface ServiceListRead {
3745
+ data: ServiceRead[];
3746
+ }
3747
+ //#endregion
3748
+ //#region src/models/sessionRead.d.ts
3749
+ /**
3750
+ * A token pair plus who it belongs to.
3751
+ *
3752
+ * Returned by the code exchange, the refresh and the direct grant. One shape
3753
+ * for all three, so a client has one branch rather than three.
3754
+ */
3755
+ interface SessionRead {
3756
+ access_token: string;
3757
+ account: AccountRead;
3758
+ expires_in: number;
3759
+ principal: PrincipalRead;
3760
+ refresh_expires_in?: number | null;
3761
+ refresh_token?: string | null;
3762
+ }
3763
+ //#endregion
3764
+ //#region src/models/staffLicenseRead.d.ts
3765
+ /**
3766
+ * Staff diagnostic for one account's licence state (E51).
3767
+ *
3768
+ * **Diagnostics must not provision.** When the account has no licence, report
3769
+ * ``license_number: None`` — do not create one. The legacy route did, which is
3770
+ * why a support lookup could silently consume a seat from the establishment's
3771
+ * pool (defect D18).
3772
+ *
3773
+ * The upstream payload does not appear here. An earlier draft passed
3774
+ * ``subscription`` and ``session`` through as open mappings with a note that
3775
+ * they must be filtered first; concrete fields are the same information without
3776
+ * a filter anybody can forget. ``partner_active`` is ``None`` when the partner
3777
+ * could not be asked — distinct from ``False``, which means it answered.
3778
+ */
3779
+ interface StaffLicenseRead {
3780
+ assignedAt?: string | null;
3781
+ isActive: boolean;
3782
+ licenseNumber?: string | null;
3783
+ partnerActive?: boolean | null;
3784
+ provider: PartnerProvider;
3785
+ revokedAt?: string | null;
3786
+ /** @minimum 0 */
3787
+ seatsLimit: number;
3788
+ /** @minimum 0 */
3789
+ seatsUsed: number;
3790
+ user: LicenseUserRead;
3791
+ }
3792
+ //#endregion
3793
+ //#region src/models/streamingSessionRead.d.ts
3794
+ /**
3795
+ * A started streaming session: what to play, and how.
3796
+ *
3797
+ * ``document`` is the full sheet because the player renders from it directly;
3798
+ * a list context should use
3799
+ * ``app.datamodels.cvs.documents.DocumentSummaryRead`` instead.
3800
+ */
3801
+ interface StreamingSessionRead {
3802
+ chromecast?: ChromecastRead | null;
3803
+ document?: DocumentRead | null;
3804
+ drm?: DrmRead | null;
3805
+ expiresAt?: string | null;
3806
+ streamUrl?: string | null;
3807
+ }
3808
+ //#endregion
3809
+ //#region src/models/streamingStartQuery.d.ts
3810
+ /**
3811
+ * Generated by orval 🍺
3812
+ * Do not edit manually.
3813
+ * Mozaik backend
3814
+ * 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.
3815
+ * OpenAPI spec version: 0.1.0
3816
+ */
3817
+ /**
3818
+ * Begin a streaming session (``/streaming/post-execute``, ``/from-app-execute``).
3819
+ *
3820
+ * ``parental_code`` and ``token`` are secrets in a query string in the legacy;
3821
+ * both belong in a header or the body.
3822
+ */
3823
+ interface StreamingStartQuery {
3824
+ /** @minimum 1 */
3825
+ docId: number;
3826
+ hideQuotaMessage?: boolean | null;
3827
+ parentalCode?: string | null;
3828
+ token?: string | null;
3829
+ }
3830
+ //#endregion
3831
+ //#region src/models/subjectRead.d.ts
3832
+ /**
3833
+ * Generated by orval 🍺
3834
+ * Do not edit manually.
3835
+ * Mozaik backend
3836
+ * 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.
3837
+ * OpenAPI spec version: 0.1.0
3838
+ */
3839
+ /**
3840
+ * A school subject, as the request form offers it.
3841
+ *
3842
+ * ``enabledSurfaces`` is deliberately exposed rather than filtered server-side:
3843
+ * one client renders the request form and the chatbot picker from the same
3844
+ * payload, and filtering per call would mean two requests for one list.
3845
+ */
3846
+ interface SubjectRead {
3847
+ colour?: string | null;
3848
+ enabledSurfaces?: string[];
3849
+ id: number;
3850
+ isBacSpecialty?: boolean;
3851
+ isBrevetSpecialty?: boolean;
3852
+ languageCode?: string | null;
3853
+ name: string;
3854
+ slug: string;
3855
+ }
3856
+ //#endregion
3857
+ //#region src/models/subjectListRead.d.ts
3858
+ /**
3859
+ * Every subject a pupil may ask about.
3860
+ */
3861
+ interface SubjectListRead {
3862
+ data: SubjectRead[];
3863
+ }
3864
+ //#endregion
3865
+ //#region src/models/subjectWrite.d.ts
3866
+ /**
3867
+ * Generated by orval 🍺
3868
+ * Do not edit manually.
3869
+ * Mozaik backend
3870
+ * 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.
3871
+ * OpenAPI spec version: 0.1.0
3872
+ */
3873
+ /**
3874
+ * Create or amend a subject. Reference data somebody has to maintain.
3875
+ */
3876
+ interface SubjectWrite {
3877
+ colour?: string | null;
3878
+ /**
3879
+ * @minimum 0
3880
+ * @maximum 999
3881
+ */
3882
+ displayOrder?: number;
3883
+ /** @maxItems 20 */
3884
+ enabledSurfaces?: string[];
3885
+ isActive?: boolean;
3886
+ isBacSpecialty?: boolean;
3887
+ isBrevetSpecialty?: boolean;
3888
+ languageCode?: string | null;
3889
+ /**
3890
+ * @minLength 1
3891
+ * @maxLength 200
3892
+ */
3893
+ name: string;
3894
+ /**
3895
+ * @minLength 1
3896
+ * @maxLength 200
3897
+ * @pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$
3898
+ */
3899
+ slug: string;
3900
+ }
3901
+ //#endregion
3902
+ //#region src/models/supplierGrantRead.d.ts
3903
+ /**
3904
+ * Generated by orval 🍺
3905
+ * Do not edit manually.
3906
+ * Mozaik backend
3907
+ * 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.
3908
+ * OpenAPI spec version: 0.1.0
3909
+ */
3910
+ /**
3911
+ * Authorisation to open one title at the supplier that hosts it.
3912
+ *
3913
+ * Replaces the legacy's ``wstoken``, whose response shape depended on which of
3914
+ * 57 ``switch`` arms produced it — sometimes a ``redirect``, sometimes a
3915
+ * ``paramsapp`` object the mobile client assembled a URL from, sometimes both.
3916
+ * One shape here, for all of them.
3917
+ *
3918
+ * **This is not an access token for us.** It is a signed assertion *to a third
3919
+ * party*: the supplier verifies ``token`` against a secret we share with them,
3920
+ * and it says that this patron, from this library, may open this item until
3921
+ * ``expiresAt``. Nothing in it authenticates anyone to this API.
3922
+ *
3923
+ * ``itemRef`` is the supplier's own reference, taken verbatim from the
3924
+ * catalogue. Its shape is the supplier's business and varies by platform — a
3925
+ * product id for Youscribe, a URL for Cerimes, a JSON document for PNB. A
3926
+ * client that knows the platform knows what to do with it; one that does not
3927
+ * should treat it as opaque.
3928
+ */
3929
+ interface SupplierGrantRead {
3930
+ eventId: number;
3931
+ expiresAt: string;
3932
+ itemRef: string;
3933
+ platform: number;
3934
+ publisher?: string | null;
3935
+ token: string;
3936
+ }
3937
+ //#endregion
3938
+ //#region src/models/supportSessionRead.d.ts
3939
+ /**
3940
+ * An open support session (E56).
3941
+ *
3942
+ * **No tokens.** The previous shape returned an access/refresh pair from
3943
+ * Keycloak's token exchange, and that could not be made safe: the exchanged
3944
+ * token carried no actor claim, so every request made with it read as the
3945
+ * patron's own, and it carried no assurance claim either — which
3946
+ * ``clamp_assurance`` treats as *unconstrained*, so the operator resolved to
3947
+ * HIGH and could close the account. The one thing the design promised to
3948
+ * prevent.
3949
+ *
3950
+ * So the operator keeps their own token and sends ``X-Acting-As: <id>`` with
3951
+ * it. Three properties follow, all of which the legacy session lacked and the
3952
+ * exchanged token could not provide:
3953
+ *
3954
+ * * **short-lived** — this row owns the deadline, not the realm;
3955
+ * * **distinguishable** — the authenticated subject stays the operator, so logs
3956
+ * and audit rows name both parties;
3957
+ * * **incapable of privileged operations** — the session is clamped to the
3958
+ * lowest assurance, so changing a password (E14) or closing the account (E17)
3959
+ * is refused by the guard that already exists.
3960
+ */
3961
+ interface SupportSessionRead {
3962
+ actingAsUserId: number;
3963
+ expiresAt: string;
3964
+ id: number;
3965
+ product: Product;
3966
+ }
3967
+ //#endregion
3968
+ //#region src/models/tenantSettingsReadSettings.d.ts
3969
+ /**
3970
+ * Generated by orval 🍺
3971
+ * Do not edit manually.
3972
+ * Mozaik backend
3973
+ * 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.
3974
+ * OpenAPI spec version: 0.1.0
3975
+ */
3976
+ type TenantSettingsReadSettings = {
3977
+ [key: string]: unknown;
3978
+ };
3979
+ //#endregion
3980
+ //#region src/models/tenantSettingsRead.d.ts
3981
+ /**
3982
+ * A tenant's configuration, as the back office sees it.
3983
+ *
3984
+ * ``settings`` is the JSONB blob the 115-column ``bm`` table collapses into.
3985
+ * Anything filtered or joined on across tenants is a promoted column instead and
3986
+ * appears beside it here, which is why this shape is a handful of named fields
3987
+ * plus one bag rather than one bag.
3988
+ */
3989
+ interface TenantSettingsRead {
3990
+ blocksIndividualAccounts: boolean;
3991
+ forcesIndividualAccounts: boolean;
3992
+ isActive: boolean;
3993
+ isInMaintenance: boolean;
3994
+ kind: string;
3995
+ name: string;
3996
+ parentId?: number | null;
3997
+ settings?: TenantSettingsReadSettings;
3998
+ tenantId: number;
3999
+ }
4000
+ //#endregion
4001
+ //#region src/models/tenantSettingsUpdateWriteSettings.d.ts
4002
+ /**
4003
+ * Generated by orval 🍺
4004
+ * Do not edit manually.
4005
+ * Mozaik backend
4006
+ * 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.
4007
+ * OpenAPI spec version: 0.1.0
4008
+ */
4009
+ type TenantSettingsUpdateWriteSettings = {
4010
+ [key: string]: unknown;
4011
+ } | null;
4012
+ //#endregion
4013
+ //#region src/models/tenantSettingsUpdateWrite.d.ts
4014
+ /**
4015
+ * What an operator may change.
4016
+ *
4017
+ * ``settings`` replaces the whole blob when present. That is blunt, and it is
4018
+ * the honest shape for a client that read the object, edited a field and is
4019
+ * sending it back — a merge would silently drop a key the client meant to
4020
+ * remove, and there is no way to tell the two apart in JSON.
4021
+ *
4022
+ * ``kind`` and ``parent_id`` are absent: moving a tenant in the tree changes who
4023
+ * can administer it, which is not a settings edit.
4024
+ */
4025
+ interface TenantSettingsUpdateWrite {
4026
+ blocksIndividualAccounts?: boolean | null;
4027
+ forcesIndividualAccounts?: boolean | null;
4028
+ isActive?: boolean | null;
4029
+ isInMaintenance?: boolean | null;
4030
+ name?: string | null;
4031
+ settings?: TenantSettingsUpdateWriteSettings;
4032
+ }
4033
+ //#endregion
4034
+ //#region src/models/themeRead.d.ts
4035
+ /**
4036
+ * Generated by orval 🍺
4037
+ * Do not edit manually.
4038
+ * Mozaik backend
4039
+ * 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.
4040
+ * OpenAPI spec version: 0.1.0
4041
+ */
4042
+ /**
4043
+ * One catalogue theme. Legacy ``themes`` / ``ThemeController``.
4044
+ *
4045
+ * ``pillar`` is the médiathèque's top-level division (video, music, press…).
4046
+ * It is part of the natural key — ``(pillar, title)`` is unique — so two
4047
+ * pillars may each have a "Documentaires" and they are different themes.
4048
+ */
4049
+ interface ThemeRead {
4050
+ id: number;
4051
+ isDewey?: boolean;
4052
+ physicalCode?: string | null;
4053
+ pillar: number;
4054
+ sortOrder: number;
4055
+ title: string;
4056
+ updatedAt?: string | null;
4057
+ workCount?: number;
4058
+ }
4059
+ //#endregion
4060
+ //#region src/models/themeListRead.d.ts
4061
+ /**
4062
+ * Every theme in one pillar, in display order.
4063
+ */
4064
+ interface ThemeListRead {
4065
+ data?: ThemeRead[];
4066
+ total: number;
4067
+ }
4068
+ //#endregion
4069
+ //#region src/models/themeOrderWrite.d.ts
4070
+ /**
4071
+ * Generated by orval 🍺
4072
+ * Do not edit manually.
4073
+ * Mozaik backend
4074
+ * 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.
4075
+ * OpenAPI spec version: 0.1.0
4076
+ */
4077
+ /**
4078
+ * Reorder a pillar's themes in one call.
4079
+ *
4080
+ * The legacy has a ``renumber`` route per theme, so moving one item was one
4081
+ * request per item and a half-applied order was reachable by closing the tab.
4082
+ * Here the whole pillar's order is one body and one transaction.
4083
+ *
4084
+ * Ids not named keep their relative order after the ones that are, so a client
4085
+ * may send only what moved.
4086
+ */
4087
+ interface ThemeOrderWrite {
4088
+ /**
4089
+ * @minItems 1
4090
+ * @maxItems 500
4091
+ */
4092
+ orderedIds: number[];
4093
+ }
4094
+ //#endregion
4095
+ //#region src/models/themeWrite.d.ts
4096
+ /**
4097
+ * Generated by orval 🍺
4098
+ * Do not edit manually.
4099
+ * Mozaik backend
4100
+ * 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.
4101
+ * OpenAPI spec version: 0.1.0
4102
+ */
4103
+ /**
4104
+ * Create or amend a theme.
4105
+ *
4106
+ * ``sortOrder`` is optional on create: a theme with no stated position goes
4107
+ * last, which is what the legacy's form does by defaulting the field to the
4108
+ * current maximum plus one.
4109
+ */
4110
+ interface ThemeWrite {
4111
+ isDewey?: boolean;
4112
+ physicalCode?: string | null;
4113
+ /**
4114
+ * @minimum 0
4115
+ * @maximum 32767
4116
+ */
4117
+ pillar: number;
4118
+ sortOrder?: number | null;
4119
+ /**
4120
+ * @minLength 1
4121
+ * @maxLength 248
4122
+ */
4123
+ title: string;
4124
+ }
4125
+ //#endregion
4126
+ //#region src/models/tutoringAnswerWrite.d.ts
4127
+ /**
4128
+ * Generated by orval 🍺
4129
+ * Do not edit manually.
4130
+ * Mozaik backend
4131
+ * 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.
4132
+ * OpenAPI spec version: 0.1.0
4133
+ */
4134
+ /**
4135
+ * A practitioner delivering an answer.
4136
+ *
4137
+ * ``attachmentIds`` names files already uploaded against this request, rather
4138
+ * than carrying bytes: an answer with a 20 MB PDF should not be one request
4139
+ * that either succeeds or has to be retyped.
4140
+ */
4141
+ interface TutoringAnswerWrite {
4142
+ /** @maxItems 20 */
4143
+ attachmentIds?: number[];
4144
+ /**
4145
+ * @minLength 1
4146
+ * @maxLength 20000
4147
+ */
4148
+ body: string;
4149
+ }
4150
+ //#endregion
4151
+ //#region src/models/tutoringAttachmentRead.d.ts
4152
+ /**
4153
+ * One file on a request.
4154
+ *
4155
+ * ``url`` is a short-lived signed link, minted per response. There is no
4156
+ * endpoint that takes a storage key from a client: the legacy stores paths in a
4157
+ * serialised list and serves them by path, which is a traversal waiting to
4158
+ * happen.
4159
+ */
4160
+ interface TutoringAttachmentRead {
4161
+ byteSize?: number | null;
4162
+ filename?: string | null;
4163
+ id: number;
4164
+ mimeType?: string | null;
4165
+ role: AttachmentRole;
4166
+ url?: string | null;
4167
+ }
4168
+ //#endregion
4169
+ //#region src/models/tutoringCloseReason.d.ts
4170
+ /**
4171
+ * Generated by orval 🍺
4172
+ * Do not edit manually.
4173
+ * Mozaik backend
4174
+ * 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.
4175
+ * OpenAPI spec version: 0.1.0
4176
+ */
4177
+ /**
4178
+ * Why a request closed without succeeding.
4179
+ *
4180
+ * Collapses ``inquiry_status_reasons`` and ``inquiry_status_fail_reasons`` —
4181
+ * two tables, four columns between them, joined through two more nullable
4182
+ * sentinel-zero columns on every inquiry. The values here are the ones the
4183
+ * rebuilt flow can actually produce; the legacy tables' contents come back
4184
+ * from the probe and any distinct reason with volume earns a member.
4185
+ */
4186
+ type TutoringCloseReason = typeof TutoringCloseReason[keyof typeof TutoringCloseReason];
4187
+ declare const TutoringCloseReason: {
4188
+ readonly no_teacher_available: 'no_teacher_available';
4189
+ readonly out_of_hours: 'out_of_hours';
4190
+ readonly pupil_unreachable: 'pupil_unreachable';
4191
+ readonly out_of_scope: 'out_of_scope';
4192
+ readonly duplicate: 'duplicate';
4193
+ readonly withdrawn: 'withdrawn';
4194
+ readonly technical: 'technical';
4195
+ readonly no_show: 'no_show';
4196
+ readonly account_problem: 'account_problem';
4197
+ readonly password_problem: 'password_problem';
4198
+ };
4199
+ //#endregion
4200
+ //#region src/models/tutoringCloseWrite.d.ts
4201
+ /**
4202
+ * Closing a request without an answer.
4203
+ *
4204
+ * The reason is fixed rather than free text, for the same reason the lease's
4205
+ * is: the legacy stored a sentinel-zero id into one of two reason tables, so
4206
+ * "why did this fail" was answerable only by joining two tables that might
4207
+ * both say nothing.
4208
+ */
4209
+ interface TutoringCloseWrite {
4210
+ note?: string | null;
4211
+ reason: TutoringCloseReason;
4212
+ }
4213
+ //#endregion
4214
+ //#region src/models/tutoringDeliveryRead.d.ts
4215
+ /**
4216
+ * One attempt to deliver an answer.
4217
+ *
4218
+ * ``joinUrl`` is the pupil's link and is the only one of the supplier's two
4219
+ * URLs a pupil may see — ``hostUrl`` admits its holder as the session's host.
4220
+ */
4221
+ interface TutoringDeliveryRead {
4222
+ channel: TutoringChannel;
4223
+ endedAt?: string | null;
4224
+ id: number;
4225
+ joinUrl?: string | null;
4226
+ provider?: string | null;
4227
+ startedAt?: string | null;
4228
+ }
4229
+ //#endregion
4230
+ //#region src/models/tutoringDispatchWrite.d.ts
4231
+ /**
4232
+ * A dispatcher routing a request.
4233
+ *
4234
+ * Either to a named practitioner, or to the open pool by leaving
4235
+ * ``practitionerId`` null — which is what the legacy's "diff" queue is. The
4236
+ * dispatcher may also correct the channel, because pupils choose one and then
4237
+ * turn out not to have a working microphone.
4238
+ */
4239
+ interface TutoringDispatchWrite {
4240
+ channel?: TutoringChannel | null;
4241
+ note?: string | null;
4242
+ practitionerId?: number | null;
4243
+ }
4244
+ //#endregion
4245
+ //#region src/models/tutoringFeedbackModerationWrite.d.ts
4246
+ /**
4247
+ * Generated by orval 🍺
4248
+ * Do not edit manually.
4249
+ * Mozaik backend
4250
+ * 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.
4251
+ * OpenAPI spec version: 0.1.0
4252
+ */
4253
+ /**
4254
+ * Clear a rating for the public showcase, or withhold it.
4255
+ */
4256
+ interface TutoringFeedbackModerationWrite {
4257
+ isPublishable: boolean;
4258
+ }
4259
+ //#endregion
4260
+ //#region src/models/tutoringFeedbackRead.d.ts
4261
+ /**
4262
+ * Generated by orval 🍺
4263
+ * Do not edit manually.
4264
+ * Mozaik backend
4265
+ * 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.
4266
+ * OpenAPI spec version: 0.1.0
4267
+ */
4268
+ /**
4269
+ * A rating, as the back office reviews it.
4270
+ *
4271
+ * Mirrors ``/admin/reviews``: the same moderation shape for the same reason —
4272
+ * a free-text comment written by a child, considered before it is shown.
4273
+ */
4274
+ interface TutoringFeedbackRead {
4275
+ comment?: string | null;
4276
+ createdAt: string;
4277
+ id: number;
4278
+ isPublishable?: boolean;
4279
+ rating: number;
4280
+ requestId: number;
4281
+ }
4282
+ //#endregion
4283
+ //#region src/models/tutoringFeedbackPage.d.ts
4284
+ /**
4285
+ * A page of ratings awaiting or past moderation.
4286
+ */
4287
+ interface TutoringFeedbackPage {
4288
+ data: TutoringFeedbackRead[];
4289
+ meta: PageMeta;
4290
+ }
4291
+ //#endregion
4292
+ //#region src/models/tutoringFeedbackWrite.d.ts
4293
+ /**
4294
+ * Generated by orval 🍺
4295
+ * Do not edit manually.
4296
+ * Mozaik backend
4297
+ * 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.
4298
+ * OpenAPI spec version: 0.1.0
4299
+ */
4300
+ /**
4301
+ * What the pupil thought of the answer.
4302
+ */
4303
+ interface TutoringFeedbackWrite {
4304
+ comment?: string | null;
4305
+ /**
4306
+ * @minimum 1
4307
+ * @maximum 5
4308
+ */
4309
+ rating: number;
4310
+ }
4311
+ //#endregion
4312
+ //#region src/models/tutoringQueueItemRead.d.ts
4313
+ /**
4314
+ * One waiting request, as a dispatcher sees the queue.
4315
+ *
4316
+ * Carries what routing needs and nothing more. No attachments, no contact
4317
+ * numbers, and ``statementExcerpt`` rather than the full text: a dispatcher
4318
+ * triaging forty requests a minute needs the gist, and the full statement is
4319
+ * one click away on the detail route.
4320
+ */
4321
+ interface TutoringQueueItemRead {
4322
+ /** @minimum 0 */
4323
+ attachmentCount: number;
4324
+ channel: TutoringChannel;
4325
+ id: number;
4326
+ kind: TutoringKind;
4327
+ levelId: number;
4328
+ practitionerId?: number | null;
4329
+ statementExcerpt: string;
4330
+ status: TutoringStatus;
4331
+ subjectId: number;
4332
+ submittedAt: string;
4333
+ /** @minimum 0 */
4334
+ waitingSeconds: number;
4335
+ }
4336
+ //#endregion
4337
+ //#region src/models/tutoringQueuePage.d.ts
4338
+ /**
4339
+ * A page of the dispatch queue, oldest first.
4340
+ */
4341
+ interface TutoringQueuePage {
4342
+ data: TutoringQueueItemRead[];
4343
+ meta: PageMeta;
4344
+ }
4345
+ //#endregion
4346
+ //#region src/models/tutoringRequestAdminCloseWrite.d.ts
4347
+ /**
4348
+ * Closing a request from the back office, with a reason.
4349
+ */
4350
+ interface TutoringRequestAdminCloseWrite {
4351
+ note?: string | null;
4352
+ reason: TutoringCloseReason;
4353
+ }
4354
+ //#endregion
4355
+ //#region src/models/tutoringRequestAdminWrite.d.ts
4356
+ /**
4357
+ * Generated by orval 🍺
4358
+ * Do not edit manually.
4359
+ * Mozaik backend
4360
+ * 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.
4361
+ * OpenAPI spec version: 0.1.0
4362
+ */
4363
+ /**
4364
+ * Staff corrections to a request in flight.
4365
+ *
4366
+ * Reassignment and a note in one call, because that is how the work actually
4367
+ * happens: an operator moves a stalled request and says why in the same
4368
+ * breath. The legacy needs two screens and two routes.
4369
+ *
4370
+ * Every field is optional and only what is present is applied — a partial
4371
+ * update, so a client that knows about one field cannot blank the others.
4372
+ */
4373
+ interface TutoringRequestAdminWrite {
4374
+ dispatcherId?: number | null;
4375
+ practitionerId?: number | null;
4376
+ staffNote?: string | null;
4377
+ }
4378
+ //#endregion
4379
+ //#region src/models/tutoringRequestRead.d.ts
4380
+ /**
4381
+ * A request as the pupil who asked it sees it.
4382
+ */
4383
+ interface TutoringRequestRead {
4384
+ answeredAt?: string | null;
4385
+ attachments?: TutoringAttachmentRead[];
4386
+ channel: TutoringChannel;
4387
+ chapter?: string | null;
4388
+ closeReason?: TutoringCloseReason | null;
4389
+ closedAt?: string | null;
4390
+ deliveries?: TutoringDeliveryRead[];
4391
+ goalId?: number | null;
4392
+ hasFeedback?: boolean;
4393
+ id: number;
4394
+ kind: TutoringKind;
4395
+ levelId: number;
4396
+ practitionerName?: string | null;
4397
+ scheduledAt?: string | null;
4398
+ statement: string;
4399
+ status: TutoringStatus;
4400
+ subjectId: number;
4401
+ submittedAt: string;
4402
+ }
4403
+ //#endregion
4404
+ //#region src/models/tutoringRequestPage.d.ts
4405
+ /**
4406
+ * A page of requests.
4407
+ */
4408
+ interface TutoringRequestPage {
4409
+ data: TutoringRequestRead[];
4410
+ meta: PageMeta;
4411
+ }
4412
+ //#endregion
4413
+ //#region src/models/tutoringRequestStaffRead.d.ts
4414
+ /**
4415
+ * The admin and support view: everything, plus where it came from.
4416
+ *
4417
+ * Extends the pupil's shape rather than redeclaring it, so a field added for
4418
+ * pupils cannot be silently missing for staff.
4419
+ */
4420
+ interface TutoringRequestStaffRead {
4421
+ answeredAt?: string | null;
4422
+ attachments?: TutoringAttachmentRead[];
4423
+ channel: TutoringChannel;
4424
+ chapter?: string | null;
4425
+ claimedAt?: string | null;
4426
+ closeReason?: TutoringCloseReason | null;
4427
+ closedAt?: string | null;
4428
+ consumptionEventId?: number | null;
4429
+ deliveries?: TutoringDeliveryRead[];
4430
+ dispatchedAt?: string | null;
4431
+ dispatcherId?: number | null;
4432
+ goalId?: number | null;
4433
+ hasFeedback?: boolean;
4434
+ id: number;
4435
+ isFirstRequest?: boolean;
4436
+ kind: TutoringKind;
4437
+ legacyPartition?: string | null;
4438
+ levelId: number;
4439
+ practitionerId?: number | null;
4440
+ practitionerName?: string | null;
4441
+ requestedById?: number | null;
4442
+ scheduledAt?: string | null;
4443
+ staffNote?: string | null;
4444
+ statement: string;
4445
+ status: TutoringStatus;
4446
+ studentId: number;
4447
+ subjectId: number;
4448
+ submittedAt: string;
4449
+ tenantId: number;
4450
+ triagedAt?: string | null;
4451
+ }
4452
+ //#endregion
4453
+ //#region src/models/tutoringRequestWrite.d.ts
4454
+ /**
4455
+ * A pupil (or their parent) asking for help.
4456
+ *
4457
+ * ``channel`` is a request, not a decision: a tenant that has not enabled
4458
+ * classroom delivery gets ``409``, and a dispatcher may move it anyway. The
4459
+ * client sends what the pupil chose and the server decides what is possible.
4460
+ *
4461
+ * Notably absent: ``studentId``. The pupil is the authenticated caller, or a
4462
+ * profile of theirs named by ``onBehalfOfId``. The legacy accepts a
4463
+ * ``user_id`` on writes, and accepting one here would be an authorisation bug
4464
+ * with a request body.
4465
+ */
4466
+ interface TutoringRequestWrite {
4467
+ channel: TutoringChannel;
4468
+ chapter?: string | null;
4469
+ contactMobile?: string | null;
4470
+ goalId?: number | null;
4471
+ kind: TutoringKind;
4472
+ /** @minimum 1 */
4473
+ levelId: number;
4474
+ onBehalfOfId?: number | null;
4475
+ preferredCallEnd?: string | null;
4476
+ preferredCallStart?: string | null;
4477
+ scheduledAt?: string | null;
4478
+ /**
4479
+ * @minLength 1
4480
+ * @maxLength 20000
4481
+ */
4482
+ statement: string;
4483
+ /** @minimum 1 */
4484
+ subjectId: number;
4485
+ }
4486
+ //#endregion
4487
+ //#region src/models/tutoringRoomRead.d.ts
4488
+ /**
4489
+ * The room a practitioner just opened, as they see it.
4490
+ *
4491
+ * Carries ``hostUrl``, which :class:`TutoringDeliveryRead` deliberately does
4492
+ * not: whoever holds it is admitted as the session's host. Returned only to the
4493
+ * practitioner the request is assigned to.
4494
+ *
4495
+ * With Meet the two URLs are the same string — it issues one link and decides
4496
+ * what you get from who you are, admitting the owner and holding everybody else
4497
+ * in the lobby. Vedamo issued two genuinely different links, so both fields
4498
+ * stay, and a provider that distinguishes them again needs no change here.
4499
+ */
4500
+ interface TutoringRoomRead {
4501
+ channel: TutoringChannel;
4502
+ hostUrl?: string | null;
4503
+ id: number;
4504
+ joinUrl?: string | null;
4505
+ provider?: string | null;
4506
+ startedAt?: string | null;
4507
+ }
4508
+ //#endregion
4509
+ //#region src/models/validationErrorDetailCtx.d.ts
4510
+ /**
4511
+ * Generated by orval 🍺
4512
+ * Do not edit manually.
4513
+ * Mozaik backend
4514
+ * 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.
4515
+ * OpenAPI spec version: 0.1.0
4516
+ */
4517
+ type ValidationErrorDetailCtx = {
4518
+ [key: string]: unknown;
4519
+ } | null;
4520
+ //#endregion
4521
+ //#region src/models/validationErrorDetail.d.ts
4522
+ /**
4523
+ * One rejected field, as Pydantic reports it.
4524
+ *
4525
+ * ``loc`` is the path to the offending value — ``["query", "limit"]``,
4526
+ * ``["body", "profiles", 0, "birth_date"]`` — which is what lets a client point
4527
+ * at the field that failed instead of showing the whole message somewhere
4528
+ * generic. ``type`` is the machine-readable reason (``string_too_long``,
4529
+ * ``less_than_equal``), stable enough to branch on where a message is not.
4530
+ *
4531
+ * ``input`` and ``ctx`` are echoed back by Pydantic and genuinely sent, so they
4532
+ * are declared: a field a client can see but the schema denies is the same
4533
+ * class of bug this module exists to fix. ``input`` carries whatever the caller
4534
+ * submitted, so it is typed loosely on purpose.
4535
+ */
4536
+ interface ValidationErrorDetail {
4537
+ ctx?: ValidationErrorDetailCtx;
4538
+ input?: unknown | null;
4539
+ loc: (string | number)[];
4540
+ msg: string;
4541
+ type: string;
4542
+ }
4543
+ //#endregion
4544
+ //#region src/models/validationErrorResponse.d.ts
4545
+ /**
4546
+ * Body of a 422, either way it was produced.
4547
+ *
4548
+ * ``detail`` is a **list** when Pydantic rejected the request — the ordinary
4549
+ * case, and the useful one. It is a plain string when a handler raised
4550
+ * ``HTTPException(422, ...)`` for something structurally valid but semantically
4551
+ * refused: a sort key outside its whitelist, a category the account cannot
4552
+ * reach.
4553
+ *
4554
+ * The union is a description of what this API sends today, not an endorsement.
4555
+ * One status carrying two shapes forces every client to type-test ``detail``
4556
+ * before reading it. The tidier contract is 422 for Pydantic's shape alone with
4557
+ * semantic refusals moved to 400, which is a change to the responses those
4558
+ * handlers send — worth doing deliberately, not as a side effect of correcting
4559
+ * the schema.
4560
+ */
4561
+ interface ValidationErrorResponse {
4562
+ detail: ValidationErrorDetail[] | string;
4563
+ }
4564
+ //#endregion
4565
+ export { ReadPatronLicenseParams as $, FavoritePage as $n, AccountDetailRead as $r, MeRead as $t, TenantSettingsReadSettings as A, LikeRead as An, ConsumptionCloseReason as Ar, PlaybackReportWrite as At, ServiceListRead as B, LearningPathRefRead as Bn, PageMeta as Br, PartnerCategoryListRead as Bt, ThemeWrite as C, ListExpiringDocumentsParams as Cn, DemoUserWrite as Cr, PreferencesRead as Ct, TenantSettingsUpdateWrite as D, TutoringStatus as Dn, CredentialsWrite as Dr, PractitionerDocumentListRead as Dt, ThemeRead as E, ListAllRequestsParams as En, CurrentReadingRead as Er, PractitionerRead as Et, SubjectRead as F, LevelListRead as Fn, CategoryListRead as Fr, PatronDetailRead as Ft, ReviewUpdateWrite as G, HTTPExceptionResponse as Gn, BodyUploadAttachment as Gr, PackDetailReadFilters as Gt, SearchResultsRead as H, LearningPathStepRead as Hn, ContentType as Hr, PackListRead as Ht, StreamingStartQuery as I, LevelRead as In, CategoryRead as Ir, PartnerMediaRead as It, ReviewModerationRead as J, PressReviewSectionRead as Jn, AttachmentRole as Jr, ModerationWrite as Jt, ReviewRead as K, HomeFeedRead as Kn, AuthorizationRead as Kr, NotificationListRead as Kt, StreamingSessionRead as L, SchoolCycle as Ln, CatalogRefRead as Lr, PartnerMediaPage as Lt, SupplierGrantRead as M, LicenseRead as Mn, ChromecastRead as Mr, PatronUpdateWrite as Mt, SubjectWrite as N, PartnerProvider as Nn, ChatTicketRead as Nr, PatronPage as Nt, TenantSettingsUpdateWriteSettings as O, TutoringKind as On, ContentRead as Or, PractitionerDocumentRead as Ot, SubjectListRead as P, LevelWrite as Pn, CategoryPreferencesWrite as Pr, PatronSummaryRead as Pt, ReadPressReviewParams as Q, HistoryEntryRead as Qn, AccountRead as Qr, MessageKind as Qt, StaffLicenseRead as R, LeaseRead as Rn, CatalogRead as Rr, PartnerFavoriteListRead as Rt, TutoringAnswerWrite as S, ListFeedbackParams as Sn, DocumentInformationRead as Sr, PressArticleListReadFilters as St, ThemeListRead as T, ListBiblioFavoritesParams as Tn, CurrentReadingListRead as Tr, PractitionerPage as Tt, SearchParams as U, LastPositionWrite as Un, BorrowWrite as Ur, PackRead as Ut, ServiceRead as V, LearningPathDetailRead as Vn, ContentSummaryRead as Vr, PartnerCategoryRead as Vt, SearchNavigationRead as W, ImpersonationWrite as Wn, EntitlementAct as Wr, PackDetailRead as Wt, RecommendationsRead as X, HomeFeedSectionRead as Xn, AiDraftRead as Xr, MessagePage as Xt, RefreshWrite as Y, PressArticleSummaryRead as Yn, AiDraftReviewWrite as Yr, MessageWrite as Yt, ReadRecommendationsParams as Z, HistoryPage as Zn, AccountUpdateWrite as Zr, MessageRead as Zt, TutoringDispatchWrite as _, ListMediaParams as _n, LayerRead as _r, ProductGrantWrite as _t, TutoringRequestWrite as a, LiveLeaseRead as an, FavoriteKind as ar, ReadingPositionWriteUsageBlocks as at, TutoringCloseReason as b, ListHistoryParams as bn, Pillar as br, PressArticleRead as bt, TutoringRequestRead as c, ListReviewsParams as cn, EducationalGoalRead as cr, ReaderPackageRead as ct, TutoringQueuePage as d, ListPressArticlesParams as dn, EditorialSlideRead as dr, ReadCatalogParams as dt, ProductRoleRead as ei, PrincipalRead as en, FavoriteRead as er, ReadPackParams as et, TutoringQueueItemRead as f, ListPractitionersParams as fn, EditorDetailRead as fr, RatingUpdateWrite as ft, TutoringFeedbackModerationWrite as g, ListMessagesParams as gn, TrackRead as gr, ProfileCreateWrite as gt, TutoringFeedbackRead as h, ListMyRequestsParams as hn, DocumentRead as hr, ProfileRead as ht, TutoringRoomRead as i, LiveLeaseListRead as in, FavoriteAddWrite as ir, ReadingPositionWrite as it, SupportSessionRead as j, LicenseUserRead as jn, CodeExchangeWrite as jr, PlaybackReportRead as jt, TenantSettingsRead as k, TutoringChannel as kn, ContentPage as kr, PractitionerDocumentKind as kt, TutoringRequestAdminWrite as l, ReviewState as ln, EditorListRead as lr, ReadEditorParams as lt, TutoringFeedbackPage as m, ListNotificationsParams as mn, DocumentSearchWrite as mr, ProfileListRead as mt, ValidationErrorDetail as n, Product as ni, LoanPage as nn, FavoriteEntryRead as nr, ReadingSessionWrite as nt, TutoringRequestStaffRead as o, SubjectKind as on, EducationalGoalWrite as or, ReadingPositionRead as ot, TutoringFeedbackWrite as p, ListPatronsParams as pn, DrmRead as pr, ProfileUpdateWrite as pt, ReviewPage as q, PressReviewRead as qn, AuthorizationParams as qr, NotificationRead as qt, ValidationErrorDetailCtx as r, LoanRead as rn, SelectionRead as rr, ReadingSessionRead as rt, TutoringRequestPage as s, ListThemesParams as sn, EducationalGoalListRead as sr, ReadHomeFeedParams as st, ValidationErrorResponse as t, ProductRole as ti, LogoutWrite as tn, FavoriteListRead as tr, ReadPackageParams as tt, TutoringRequestAdminCloseWrite as u, ListQueueParams as un, EditorRead as ur, ReadCatalogThemeParams as ut, TutoringDeliveryRead as v, PartnerMediaType as vn, DocumentPage as vr, ProductGrantListRead as vt, ThemeOrderWrite as w, ListEditorsParams as wn, DemoUserRead as wr, PractitionerWrite as wt, TutoringAttachmentRead as x, ListGoalsParams as xn, DocumentLinkRead as xr, PressArticleListRead as xt, TutoringCloseWrite as y, ListLoansParams as yn, DocumentSummaryRead as yr, ProductGrantRead as yt, SessionRead as z, LeaseCloseWrite as zn, ThemeRefRead as zr, PartnerMediaSummaryRead as zt };
4566
+ //# sourceMappingURL=index-wL_20vR8.d.ts.map