@learnorama/mozaik-sdk 0.8.3-staging.32.1 → 0.9.1-staging.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.md +107 -0
  2. package/dist/api/account.d.ts +29 -28
  3. package/dist/api/account.js +43 -28
  4. package/dist/api/account.js.map +1 -1
  5. package/dist/api/admin-catalogue.d.ts +1 -1
  6. package/dist/api/admin-catalogue.js.map +1 -1
  7. package/dist/api/admin-consumption.d.ts +1 -1
  8. package/dist/api/admin-consumption.js.map +1 -1
  9. package/dist/api/admin-desk.d.ts +23 -1
  10. package/dist/api/admin-desk.js +59 -1
  11. package/dist/api/admin-desk.js.map +1 -1
  12. package/dist/api/admin-licenses.d.ts +1 -1
  13. package/dist/api/admin-licenses.js.map +1 -1
  14. package/dist/api/admin-patrons.d.ts +1 -1
  15. package/dist/api/admin-patrons.js.map +1 -1
  16. package/dist/api/admin-reviews.d.ts +1 -1
  17. package/dist/api/admin-reviews.js.map +1 -1
  18. package/dist/api/admin-roles.d.ts +1 -1
  19. package/dist/api/admin-roles.js.map +1 -1
  20. package/dist/api/admin-support.d.ts +1 -1
  21. package/dist/api/admin-support.js.map +1 -1
  22. package/dist/api/admin-tenants.d.ts +1 -1
  23. package/dist/api/admin-tenants.js.map +1 -1
  24. package/dist/api/admin-tutoring.d.ts +1 -1
  25. package/dist/api/admin-tutoring.js.map +1 -1
  26. package/dist/api/auth.d.ts +11 -1
  27. package/dist/api/auth.js +31 -1
  28. package/dist/api/auth.js.map +1 -1
  29. package/dist/api/biblio-catalogue.d.ts +11 -1
  30. package/dist/api/biblio-catalogue.js +23 -1
  31. package/dist/api/biblio-catalogue.js.map +1 -1
  32. package/dist/api/biblio-home.d.ts +6 -1
  33. package/dist/api/biblio-home.js +5 -0
  34. package/dist/api/biblio-home.js.map +1 -1
  35. package/dist/api/biblio-library.d.ts +9 -6
  36. package/dist/api/biblio-library.js +22 -9
  37. package/dist/api/biblio-library.js.map +1 -1
  38. package/dist/api/biblio-nextory.d.ts +1 -1
  39. package/dist/api/biblio-nextory.js.map +1 -1
  40. package/dist/api/biblio-press.d.ts +34 -25
  41. package/dist/api/biblio-press.js +73 -32
  42. package/dist/api/biblio-press.js.map +1 -1
  43. package/dist/api/biblio-search.d.ts +1 -1
  44. package/dist/api/biblio-search.js.map +1 -1
  45. package/dist/api/biblio-telemetry.d.ts +1 -1
  46. package/dist/api/biblio-telemetry.js.map +1 -1
  47. package/dist/api/consumption.d.ts +1 -1
  48. package/dist/api/consumption.js.map +1 -1
  49. package/dist/api/cvs-app.d.ts +1 -1
  50. package/dist/api/cvs-app.js.map +1 -1
  51. package/dist/api/cvs-documents.d.ts +1 -1
  52. package/dist/api/cvs-documents.js.map +1 -1
  53. package/dist/api/cvs-favorites.d.ts +1 -1
  54. package/dist/api/cvs-favorites.js.map +1 -1
  55. package/dist/api/cvs-ils.d.ts +1 -1
  56. package/dist/api/cvs-ils.js.map +1 -1
  57. package/dist/api/cvs-loans.d.ts +1 -1
  58. package/dist/api/cvs-loans.js.map +1 -1
  59. package/dist/api/cvs-payments.d.ts +1 -1
  60. package/dist/api/cvs-payments.js.map +1 -1
  61. package/dist/api/cvs-streaming.d.ts +1 -1
  62. package/dist/api/cvs-streaming.js.map +1 -1
  63. package/dist/api/index.d.ts +9 -9
  64. package/dist/api/index.js +9 -9
  65. package/dist/api/partner-catalogue.d.ts +20 -1
  66. package/dist/api/partner-catalogue.js +44 -1
  67. package/dist/api/partner-catalogue.js.map +1 -1
  68. package/dist/api/partner-reader.d.ts +34 -6
  69. package/dist/api/partner-reader.js +48 -6
  70. package/dist/api/partner-reader.js.map +1 -1
  71. package/dist/api/profiles.d.ts +86 -33
  72. package/dist/api/profiles.js +302 -33
  73. package/dist/api/profiles.js.map +1 -1
  74. package/dist/api/search.d.ts +1 -1
  75. package/dist/api/search.js.map +1 -1
  76. package/dist/api/tutoring-catalogue.d.ts +1 -1
  77. package/dist/api/tutoring-catalogue.js.map +1 -1
  78. package/dist/api/tutoring-chat.d.ts +1 -1
  79. package/dist/api/tutoring-chat.js.map +1 -1
  80. package/dist/api/tutoring-dispatch.d.ts +1 -1
  81. package/dist/api/tutoring-dispatch.js.map +1 -1
  82. package/dist/api/tutoring-practitioner.d.ts +1 -1
  83. package/dist/api/tutoring-practitioner.js.map +1 -1
  84. package/dist/api/tutoring-requests.d.ts +1 -1
  85. package/dist/api/tutoring-requests.js.map +1 -1
  86. package/dist/chunks/client2.d.ts +1 -1
  87. package/dist/chunks/connection.d.ts +1 -1
  88. package/dist/chunks/index.d.ts +1220 -372
  89. package/dist/index.d.ts +3 -3
  90. package/dist/index.js +3 -3
  91. package/dist/index.js.map +1 -1
  92. package/dist/models.d.ts +2 -2
  93. package/dist/models.js +91 -1
  94. package/dist/models.js.map +1 -1
  95. package/dist/react/account.d.ts +83 -28
  96. package/dist/react/account.js +92 -29
  97. package/dist/react/account.js.map +1 -1
  98. package/dist/react/admin-catalogue.d.ts +1 -1
  99. package/dist/react/admin-catalogue.js +1 -1
  100. package/dist/react/admin-catalogue.js.map +1 -1
  101. package/dist/react/admin-consumption.d.ts +1 -1
  102. package/dist/react/admin-consumption.js +1 -1
  103. package/dist/react/admin-consumption.js.map +1 -1
  104. package/dist/react/admin-desk.d.ts +104 -1
  105. package/dist/react/admin-desk.js +132 -2
  106. package/dist/react/admin-desk.js.map +1 -1
  107. package/dist/react/admin-licenses.d.ts +1 -1
  108. package/dist/react/admin-licenses.js +1 -1
  109. package/dist/react/admin-licenses.js.map +1 -1
  110. package/dist/react/admin-patrons.d.ts +1 -1
  111. package/dist/react/admin-patrons.js +1 -1
  112. package/dist/react/admin-patrons.js.map +1 -1
  113. package/dist/react/admin-reviews.d.ts +1 -1
  114. package/dist/react/admin-reviews.js +1 -1
  115. package/dist/react/admin-reviews.js.map +1 -1
  116. package/dist/react/admin-roles.d.ts +1 -1
  117. package/dist/react/admin-roles.js +1 -1
  118. package/dist/react/admin-roles.js.map +1 -1
  119. package/dist/react/admin-support.d.ts +1 -1
  120. package/dist/react/admin-support.js +1 -1
  121. package/dist/react/admin-support.js.map +1 -1
  122. package/dist/react/admin-tenants.d.ts +1 -1
  123. package/dist/react/admin-tenants.js +1 -1
  124. package/dist/react/admin-tenants.js.map +1 -1
  125. package/dist/react/admin-tutoring.d.ts +1 -1
  126. package/dist/react/admin-tutoring.js +1 -1
  127. package/dist/react/admin-tutoring.js.map +1 -1
  128. package/dist/react/auth.d.ts +29 -1
  129. package/dist/react/auth.js +60 -2
  130. package/dist/react/auth.js.map +1 -1
  131. package/dist/react/biblio-catalogue.d.ts +38 -1
  132. package/dist/react/biblio-catalogue.js +48 -2
  133. package/dist/react/biblio-catalogue.js.map +1 -1
  134. package/dist/react/biblio-home.d.ts +6 -1
  135. package/dist/react/biblio-home.js +6 -1
  136. package/dist/react/biblio-home.js.map +1 -1
  137. package/dist/react/biblio-library.d.ts +15 -11
  138. package/dist/react/biblio-library.js +32 -19
  139. package/dist/react/biblio-library.js.map +1 -1
  140. package/dist/react/biblio-nextory.d.ts +1 -1
  141. package/dist/react/biblio-nextory.js +1 -1
  142. package/dist/react/biblio-nextory.js.map +1 -1
  143. package/dist/react/biblio-press.d.ts +119 -64
  144. package/dist/react/biblio-press.js +153 -59
  145. package/dist/react/biblio-press.js.map +1 -1
  146. package/dist/react/biblio-search.d.ts +1 -1
  147. package/dist/react/biblio-search.js +1 -1
  148. package/dist/react/biblio-search.js.map +1 -1
  149. package/dist/react/biblio-telemetry.d.ts +1 -1
  150. package/dist/react/biblio-telemetry.js +1 -1
  151. package/dist/react/biblio-telemetry.js.map +1 -1
  152. package/dist/react/chat.d.ts +1 -1
  153. package/dist/react/consumption.d.ts +1 -1
  154. package/dist/react/consumption.js +1 -1
  155. package/dist/react/consumption.js.map +1 -1
  156. package/dist/react/cvs-app.d.ts +1 -1
  157. package/dist/react/cvs-app.js +1 -1
  158. package/dist/react/cvs-app.js.map +1 -1
  159. package/dist/react/cvs-documents.d.ts +1 -1
  160. package/dist/react/cvs-documents.js +1 -1
  161. package/dist/react/cvs-documents.js.map +1 -1
  162. package/dist/react/cvs-favorites.d.ts +1 -1
  163. package/dist/react/cvs-favorites.js +1 -1
  164. package/dist/react/cvs-favorites.js.map +1 -1
  165. package/dist/react/cvs-ils.d.ts +1 -1
  166. package/dist/react/cvs-ils.js +1 -1
  167. package/dist/react/cvs-ils.js.map +1 -1
  168. package/dist/react/cvs-loans.d.ts +1 -1
  169. package/dist/react/cvs-loans.js +1 -1
  170. package/dist/react/cvs-loans.js.map +1 -1
  171. package/dist/react/cvs-payments.d.ts +1 -1
  172. package/dist/react/cvs-payments.js +1 -1
  173. package/dist/react/cvs-payments.js.map +1 -1
  174. package/dist/react/cvs-streaming.d.ts +1 -1
  175. package/dist/react/cvs-streaming.js +1 -1
  176. package/dist/react/cvs-streaming.js.map +1 -1
  177. package/dist/react/index.d.ts +9 -9
  178. package/dist/react/index.js +9 -9
  179. package/dist/react/partner-catalogue.d.ts +74 -1
  180. package/dist/react/partner-catalogue.js +95 -2
  181. package/dist/react/partner-catalogue.js.map +1 -1
  182. package/dist/react/partner-reader.d.ts +79 -6
  183. package/dist/react/partner-reader.js +102 -7
  184. package/dist/react/partner-reader.js.map +1 -1
  185. package/dist/react/profiles.d.ts +406 -33
  186. package/dist/react/profiles.js +760 -59
  187. package/dist/react/profiles.js.map +1 -1
  188. package/dist/react/search.d.ts +1 -1
  189. package/dist/react/search.js +1 -1
  190. package/dist/react/search.js.map +1 -1
  191. package/dist/react/tutoring-catalogue.d.ts +1 -1
  192. package/dist/react/tutoring-catalogue.js +1 -1
  193. package/dist/react/tutoring-catalogue.js.map +1 -1
  194. package/dist/react/tutoring-chat.d.ts +1 -1
  195. package/dist/react/tutoring-chat.js +1 -1
  196. package/dist/react/tutoring-chat.js.map +1 -1
  197. package/dist/react/tutoring-dispatch.d.ts +1 -1
  198. package/dist/react/tutoring-dispatch.js +1 -1
  199. package/dist/react/tutoring-dispatch.js.map +1 -1
  200. package/dist/react/tutoring-practitioner.d.ts +1 -1
  201. package/dist/react/tutoring-practitioner.js +1 -1
  202. package/dist/react/tutoring-practitioner.js.map +1 -1
  203. package/dist/react/tutoring-requests.d.ts +1 -1
  204. package/dist/react/tutoring-requests.js +1 -1
  205. package/dist/react/tutoring-requests.js.map +1 -1
  206. package/package.json +7 -7
@@ -1,15 +1,138 @@
1
1
 
2
2
  import { r as request } from "../chunks/client.js";
3
3
  //#region src/api/profiles/profiles.ts
4
+ const getSetPinUrl = () => {
5
+ return `/me/guardian-pin`;
6
+ };
7
+ /**
8
+ * @summary Set Pin
9
+ */
10
+ const setPin = async (guardianPinWrite, options) => {
11
+ const getHeaders = (h) => {
12
+ if (!h) return {};
13
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
14
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
15
+ const headers = {};
16
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
17
+ return headers;
18
+ };
19
+ return request(getSetPinUrl(), {
20
+ ...options,
21
+ method: "PUT",
22
+ headers: {
23
+ "Content-Type": "application/json",
24
+ ...getHeaders(options?.headers)
25
+ },
26
+ body: JSON.stringify(guardianPinWrite)
27
+ });
28
+ };
29
+ const getRequestResetUrl = () => {
30
+ return `/me/guardian-pin/reset`;
31
+ };
32
+ /**
33
+ * @summary Request Reset
34
+ */
35
+ const requestReset = async (options) => {
36
+ return request(getRequestResetUrl(), {
37
+ ...options,
38
+ method: "POST"
39
+ });
40
+ };
41
+ const getConfirmResetUrl = () => {
42
+ return `/me/guardian-pin/reset/confirm`;
43
+ };
44
+ /**
45
+ * @summary Confirm Reset
46
+ */
47
+ const confirmReset = async (guardianPinResetWrite, options) => {
48
+ const getHeaders = (h) => {
49
+ if (!h) return {};
50
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
51
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
52
+ const headers = {};
53
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
54
+ return headers;
55
+ };
56
+ return request(getConfirmResetUrl(), {
57
+ ...options,
58
+ method: "POST",
59
+ headers: {
60
+ "Content-Type": "application/json",
61
+ ...getHeaders(options?.headers)
62
+ },
63
+ body: JSON.stringify(guardianPinResetWrite)
64
+ });
65
+ };
66
+ const getProfileSessionUrl = () => {
67
+ return `/me/profile-session`;
68
+ };
69
+ /**
70
+ * @summary Profile Session
71
+ */
72
+ const profileSession = async (options) => {
73
+ return request(getProfileSessionUrl(), {
74
+ ...options,
75
+ method: "GET"
76
+ });
77
+ };
78
+ const getOpenChildUrl = () => {
79
+ return `/me/profile-session/child`;
80
+ };
81
+ /**
82
+ * @summary Open Child
83
+ */
84
+ const openChild = async (openChildProfileWrite, options) => {
85
+ const getHeaders = (h) => {
86
+ if (!h) return {};
87
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
88
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
89
+ const headers = {};
90
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
91
+ return headers;
92
+ };
93
+ return request(getOpenChildUrl(), {
94
+ ...options,
95
+ method: "POST",
96
+ headers: {
97
+ "Content-Type": "application/json",
98
+ ...getHeaders(options?.headers)
99
+ },
100
+ body: JSON.stringify(openChildProfileWrite)
101
+ });
102
+ };
103
+ const getExitChildUrl = () => {
104
+ return `/me/profile-session/exit`;
105
+ };
106
+ /**
107
+ * @summary Exit Child
108
+ */
109
+ const exitChild = async (exitChildProfileWrite, options) => {
110
+ const getHeaders = (h) => {
111
+ if (!h) return {};
112
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
113
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
114
+ const headers = {};
115
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
116
+ return headers;
117
+ };
118
+ return request(getExitChildUrl(), {
119
+ ...options,
120
+ method: "POST",
121
+ headers: {
122
+ "Content-Type": "application/json",
123
+ ...getHeaders(options?.headers)
124
+ },
125
+ body: JSON.stringify(exitChildProfileWrite)
126
+ });
127
+ };
4
128
  const getListProfilesUrl = () => {
5
129
  return `/me/profiles`;
6
130
  };
7
131
  /**
8
- * Every profile on this account, the holder included (E20).
132
+ * Holder sees household cards; another adult sees self and supervised children.
9
133
  *
10
- * Unpaginated: the cap is :data:`PROFILE_LIMIT`, so there is no page to turn.
11
- * One endpoint replaces two legacy routes that rendered the same collection
12
- * differently — the difference was presentation, which is the client's problem.
134
+ * Cards never grant the right to open another adult's profile. Expired pending
135
+ * invitations remain manageable but no longer reserve capacity.
13
136
  * @summary List Profiles
14
137
  */
15
138
  const listProfiles = async (options) => {
@@ -22,15 +145,6 @@ const getCreateProfileUrl = () => {
22
145
  return `/me/profiles`;
23
146
  };
24
147
  /**
25
- * Add a profile to this account (E21).
26
- *
27
- * The new row inherits ``tenant_id`` from the holder rather than accepting one:
28
- * a profile belongs to the same company as the account it hangs off, and
29
- * letting that be supplied would be a way into another tenant.
30
- *
31
- * A profile has no credential of its own. It has no ``login``, no ``email`` and
32
- * no password — it is reached by switching within an authenticated session, so
33
- * there is nothing for it to authenticate *with*.
34
148
  * @summary Create Profile
35
149
  */
36
150
  const createProfile = async (profileCreateWrite, options) => {
@@ -52,18 +166,110 @@ const createProfile = async (profileCreateWrite, options) => {
52
166
  body: JSON.stringify(profileCreateWrite)
53
167
  });
54
168
  };
169
+ const getGuardianCandidatesUrl = () => {
170
+ return `/me/profiles/guardian-candidates`;
171
+ };
172
+ /**
173
+ * @summary Guardian Candidates
174
+ */
175
+ const guardianCandidates = async (options) => {
176
+ return request(getGuardianCandidatesUrl(), {
177
+ ...options,
178
+ method: "GET"
179
+ });
180
+ };
181
+ const getListInvitationsUrl = () => {
182
+ return `/me/profiles/invitations`;
183
+ };
184
+ /**
185
+ * @summary List Invitations
186
+ */
187
+ const listInvitations = async (options) => {
188
+ return request(getListInvitationsUrl(), {
189
+ ...options,
190
+ method: "GET"
191
+ });
192
+ };
193
+ const getInviteAdultUrl = () => {
194
+ return `/me/profiles/invitations`;
195
+ };
196
+ /**
197
+ * @summary Invite Adult
198
+ */
199
+ const inviteAdult = async (householdInvitationWrite, options) => {
200
+ const getHeaders = (h) => {
201
+ if (!h) return {};
202
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
203
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
204
+ const headers = {};
205
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
206
+ return headers;
207
+ };
208
+ return request(getInviteAdultUrl(), {
209
+ ...options,
210
+ method: "POST",
211
+ headers: {
212
+ "Content-Type": "application/json",
213
+ ...getHeaders(options?.headers)
214
+ },
215
+ body: JSON.stringify(householdInvitationWrite)
216
+ });
217
+ };
218
+ const getAcceptInvitationUrl = () => {
219
+ return `/me/profiles/invitations/accept`;
220
+ };
221
+ /**
222
+ * Requires a verified login email; never creates an unrelated root account.
223
+ * @summary Accept Invitation
224
+ */
225
+ const acceptInvitation = async (householdInvitationAcceptWrite, options) => {
226
+ const getHeaders = (h) => {
227
+ if (!h) return {};
228
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
229
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
230
+ const headers = {};
231
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
232
+ return headers;
233
+ };
234
+ return request(getAcceptInvitationUrl(), {
235
+ ...options,
236
+ method: "POST",
237
+ headers: {
238
+ "Content-Type": "application/json",
239
+ ...getHeaders(options?.headers)
240
+ },
241
+ body: JSON.stringify(householdInvitationAcceptWrite)
242
+ });
243
+ };
244
+ const getRevokeInvitationUrl = (invitationId) => {
245
+ return `/me/profiles/invitations/${invitationId}`;
246
+ };
247
+ /**
248
+ * @summary Revoke Invitation
249
+ */
250
+ const revokeInvitation = async (invitationId, options) => {
251
+ return request(getRevokeInvitationUrl(invitationId), {
252
+ ...options,
253
+ method: "DELETE"
254
+ });
255
+ };
256
+ const getResendInvitationUrl = (invitationId) => {
257
+ return `/me/profiles/invitations/${invitationId}/resend`;
258
+ };
259
+ /**
260
+ * @summary Resend Invitation
261
+ */
262
+ const resendInvitation = async (invitationId, options) => {
263
+ return request(getResendInvitationUrl(invitationId), {
264
+ ...options,
265
+ method: "POST"
266
+ });
267
+ };
55
268
  const getDeleteProfileUrl = (profileId) => {
56
269
  return `/me/profiles/${profileId}`;
57
270
  };
58
271
  /**
59
- * Remove a profile (E24). Idempotent.
60
- *
61
- * Deleting a profile that is already gone is ``204``, not ``404``: the caller
62
- * asked for it to be absent and it is absent. A retried delete after a timeout
63
- * must not read as a failure.
64
- *
65
- * The account holder cannot be deleted this way — that is E17, which anonymises
66
- * the whole account and is a different decision with different consequences.
272
+ * Deactivate membership without discarding profile history or its ancestry.
67
273
  * @summary Delete Profile
68
274
  */
69
275
  const deleteProfile = async (profileId, options) => {
@@ -76,7 +282,6 @@ const getReadProfileUrl = (profileId) => {
76
282
  return `/me/profiles/${profileId}`;
77
283
  };
78
284
  /**
79
- * One profile (E22). Returns the resource; the legacy rendered an edit form.
80
285
  * @summary Read Profile
81
286
  */
82
287
  const readProfile = async (profileId, options) => {
@@ -89,16 +294,6 @@ const getUpdateProfileUrl = (profileId) => {
89
294
  return `/me/profiles/${profileId}`;
90
295
  };
91
296
  /**
92
- * Partially update a profile (E23).
93
- *
94
- * The target comes from the path and the row is re-read from the database
95
- * before anything is written, so nothing in the body can retarget the write.
96
- * That is the one habit worth keeping from the legacy handler, which overwrote
97
- * the identity fields from the trusted record for exactly this reason.
98
- *
99
- * ``exclude_unset`` is what makes this a PATCH rather than a PUT wearing the
100
- * wrong verb: a field the client did not send is untouched, which is not the
101
- * same as a field it sent as null.
102
297
  * @summary Update Profile
103
298
  */
104
299
  const updateProfile = async (profileId, profileUpdateWrite, options) => {
@@ -120,7 +315,81 @@ const updateProfile = async (profileId, profileUpdateWrite, options) => {
120
315
  body: JSON.stringify(profileUpdateWrite)
121
316
  });
122
317
  };
318
+ const getListGuardiansUrl = (profileId) => {
319
+ return `/me/profiles/${profileId}/guardians`;
320
+ };
321
+ /**
322
+ * @summary List Guardians
323
+ */
324
+ const listGuardians = async (profileId, options) => {
325
+ return request(getListGuardiansUrl(profileId), {
326
+ ...options,
327
+ method: "GET"
328
+ });
329
+ };
330
+ const getAddGuardianUrl = (profileId) => {
331
+ return `/me/profiles/${profileId}/guardians`;
332
+ };
333
+ /**
334
+ * @summary Add Guardian
335
+ */
336
+ const addGuardian = async (profileId, householdGuardianWrite, options) => {
337
+ const getHeaders = (h) => {
338
+ if (!h) return {};
339
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
340
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
341
+ const headers = {};
342
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
343
+ return headers;
344
+ };
345
+ return request(getAddGuardianUrl(profileId), {
346
+ ...options,
347
+ method: "POST",
348
+ headers: {
349
+ "Content-Type": "application/json",
350
+ ...getHeaders(options?.headers)
351
+ },
352
+ body: JSON.stringify(householdGuardianWrite)
353
+ });
354
+ };
355
+ const getRemoveGuardianUrl = (profileId, adultId) => {
356
+ return `/me/profiles/${profileId}/guardians/${adultId}`;
357
+ };
358
+ /**
359
+ * @summary Remove Guardian
360
+ */
361
+ const removeGuardian = async (profileId, adultId, options) => {
362
+ return request(getRemoveGuardianUrl(profileId, adultId), {
363
+ ...options,
364
+ method: "DELETE"
365
+ });
366
+ };
367
+ const getInviteIndependentMinorUrl = (profileId) => {
368
+ return `/me/profiles/${profileId}/independent-invitation`;
369
+ };
370
+ /**
371
+ * @summary Invite Independent Minor
372
+ */
373
+ const inviteIndependentMinor = async (profileId, independentInvitationWrite, options) => {
374
+ const getHeaders = (h) => {
375
+ if (!h) return {};
376
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
377
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
378
+ const headers = {};
379
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
380
+ return headers;
381
+ };
382
+ return request(getInviteIndependentMinorUrl(profileId), {
383
+ ...options,
384
+ method: "POST",
385
+ headers: {
386
+ "Content-Type": "application/json",
387
+ ...getHeaders(options?.headers)
388
+ },
389
+ body: JSON.stringify(independentInvitationWrite)
390
+ });
391
+ };
123
392
  //#endregion
124
- export { createProfile, deleteProfile, getCreateProfileUrl, getDeleteProfileUrl, getListProfilesUrl, getReadProfileUrl, getUpdateProfileUrl, listProfiles, readProfile, updateProfile };
393
+ export { acceptInvitation, addGuardian, confirmReset, createProfile, deleteProfile, exitChild, getAcceptInvitationUrl, getAddGuardianUrl, getConfirmResetUrl, getCreateProfileUrl, getDeleteProfileUrl, getExitChildUrl, getGuardianCandidatesUrl, getInviteAdultUrl, getInviteIndependentMinorUrl, getListGuardiansUrl, getListInvitationsUrl, getListProfilesUrl, getOpenChildUrl, getProfileSessionUrl, getReadProfileUrl, getRemoveGuardianUrl, getRequestResetUrl, getResendInvitationUrl, getRevokeInvitationUrl, getSetPinUrl, getUpdateProfileUrl, guardianCandidates, inviteAdult, inviteIndependentMinor, listGuardians, listInvitations, listProfiles, openChild, profileSession, readProfile, removeGuardian, requestReset, resendInvitation, revokeInvitation, setPin, updateProfile };
125
394
 
126
395
  //# sourceMappingURL=profiles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.js","names":[],"sources":["../../src/api/profiles/profiles.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.3\n */\nimport type {\n ProfileCreateWrite,\n ProfileListRead,\n ProfileRead,\n ProfileUpdateWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListProfilesUrl = () => {\n\n\n\n\n return `/me/profiles`\n}\n\n/**\n * Every profile on this account, the holder included (E20).\n *\n * Unpaginated: the cap is :data:`PROFILE_LIMIT`, so there is no page to turn.\n * One endpoint replaces two legacy routes that rendered the same collection\n * differently — the difference was presentation, which is the client's problem.\n * @summary List Profiles\n */\nexport const listProfiles = async ( options?: Parameters<typeof request>[1]): Promise<ProfileListRead> => {\n\n return request<ProfileListRead>(getListProfilesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreateProfileUrl = () => {\n\n\n\n\n return `/me/profiles`\n}\n\n/**\n * Add a profile to this account (E21).\n *\n * The new row inherits ``tenant_id`` from the holder rather than accepting one:\n * a profile belongs to the same company as the account it hangs off, and\n * letting that be supplied would be a way into another tenant.\n *\n * A profile has no credential of its own. It has no ``login``, no ``email`` and\n * no password — it is reached by switching within an authenticated session, so\n * there is nothing for it to authenticate *with*.\n * @summary Create Profile\n */\nexport const createProfile = async (profileCreateWrite: ProfileCreateWrite, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ProfileRead>(getCreateProfileUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(profileCreateWrite)\n }\n);}\n\n\nexport const getDeleteProfileUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}`\n}\n\n/**\n * Remove a profile (E24). Idempotent.\n *\n * Deleting a profile that is already gone is ``204``, not ``404``: the caller\n * asked for it to be absent and it is absent. A retried delete after a timeout\n * must not read as a failure.\n *\n * The account holder cannot be deleted this way — that is E17, which anonymises\n * the whole account and is a different decision with different consequences.\n * @summary Delete Profile\n */\nexport const deleteProfile = async (profileId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteProfileUrl(profileId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadProfileUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}`\n}\n\n/**\n * One profile (E22). Returns the resource; the legacy rendered an edit form.\n * @summary Read Profile\n */\nexport const readProfile = async (profileId: number, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\n\n return request<ProfileRead>(getReadProfileUrl(profileId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdateProfileUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}`\n}\n\n/**\n * Partially update a profile (E23).\n *\n * The target comes from the path and the row is re-read from the database\n * before anything is written, so nothing in the body can retarget the write.\n * That is the one habit worth keeping from the legacy handler, which overwrote\n * the identity fields from the trusted record for exactly this reason.\n *\n * ``exclude_unset`` is what makes this a PATCH rather than a PUT wearing the\n * wrong verb: a field the client did not send is untouched, which is not the\n * same as a field it sent as null.\n * @summary Update Profile\n */\nexport const updateProfile = async (profileId: number,\n profileUpdateWrite: ProfileUpdateWrite, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ProfileRead>(getUpdateProfileUrl(profileId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(profileUpdateWrite)\n }\n);}\n\n\n"],"mappings":";;;AAgBA,MAAa,2BAA2B;CAKtC,OAAO;AACT;;;;;;;;;AAUA,MAAa,eAAe,OAAQ,YAAsE;CAExG,OAAO,QAAyB,mBAAmB,GACnD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,4BAA4B;CAKvC,OAAO;AACT;;;;;;;;;;;;;AAcA,MAAa,gBAAgB,OAAO,oBAAwC,YAAkE;CAE1I,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAqB,oBAAoB,GAC9C;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,kBAAkB;CACzC,CACF;AAAE;AAGF,MAAa,uBAAuB,cAAuB;CAKzD,OAAO,gBAAgB;AACzB;;;;;;;;;;;;AAaA,MAAa,gBAAgB,OAAO,WAAmB,YAA2D;CAEhH,OAAO,QAAc,oBAAoB,SAAS,GAClD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,qBAAqB,cAAuB;CAKvD,OAAO,gBAAgB;AACzB;;;;;AAMA,MAAa,cAAc,OAAO,WAAmB,YAAkE;CAErH,OAAO,QAAqB,kBAAkB,SAAS,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,uBAAuB,cAAuB;CAKzD,OAAO,gBAAgB;AACzB;;;;;;;;;;;;;;AAeA,MAAa,gBAAgB,OAAO,WAChC,oBAAwC,YAAkE;CAE1G,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAqB,oBAAoB,SAAS,GACvD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,kBAAkB;CACzC,CACF;AAAE"}
1
+ {"version":3,"file":"profiles.js","names":[],"sources":["../../src/api/profiles/profiles.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.1\n */\nimport type {\n ExitChildProfileWrite,\n GuardianPinResetRead,\n GuardianPinResetWrite,\n GuardianPinWrite,\n HouseholdGuardianListRead,\n HouseholdGuardianWrite,\n HouseholdInvitationAcceptWrite,\n HouseholdInvitationListRead,\n HouseholdInvitationRead,\n HouseholdInvitationWrite,\n IndependentInvitationWrite,\n OpenChildProfileWrite,\n ProfileCreateWrite,\n ProfileListRead,\n ProfileRead,\n ProfileSessionRead,\n ProfileUpdateWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getSetPinUrl = () => {\n\n\n\n\n return `/me/guardian-pin`\n}\n\n/**\n * @summary Set Pin\n */\nexport const setPin = async (guardianPinWrite: GuardianPinWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getSetPinUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(guardianPinWrite)\n }\n);}\n\n\nexport const getRequestResetUrl = () => {\n\n\n\n\n return `/me/guardian-pin/reset`\n}\n\n/**\n * @summary Request Reset\n */\nexport const requestReset = async ( options?: Parameters<typeof request>[1]): Promise<GuardianPinResetRead> => {\n\n return request<GuardianPinResetRead>(getRequestResetUrl(),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getConfirmResetUrl = () => {\n\n\n\n\n return `/me/guardian-pin/reset/confirm`\n}\n\n/**\n * @summary Confirm Reset\n */\nexport const confirmReset = async (guardianPinResetWrite: GuardianPinResetWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getConfirmResetUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(guardianPinResetWrite)\n }\n);}\n\n\nexport const getProfileSessionUrl = () => {\n\n\n\n\n return `/me/profile-session`\n}\n\n/**\n * @summary Profile Session\n */\nexport const profileSession = async ( options?: Parameters<typeof request>[1]): Promise<ProfileSessionRead> => {\n\n return request<ProfileSessionRead>(getProfileSessionUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getOpenChildUrl = () => {\n\n\n\n\n return `/me/profile-session/child`\n}\n\n/**\n * @summary Open Child\n */\nexport const openChild = async (openChildProfileWrite: OpenChildProfileWrite, options?: Parameters<typeof request>[1]): Promise<ProfileSessionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ProfileSessionRead>(getOpenChildUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(openChildProfileWrite)\n }\n);}\n\n\nexport const getExitChildUrl = () => {\n\n\n\n\n return `/me/profile-session/exit`\n}\n\n/**\n * @summary Exit Child\n */\nexport const exitChild = async (exitChildProfileWrite: ExitChildProfileWrite, options?: Parameters<typeof request>[1]): Promise<ProfileSessionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ProfileSessionRead>(getExitChildUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(exitChildProfileWrite)\n }\n);}\n\n\nexport const getListProfilesUrl = () => {\n\n\n\n\n return `/me/profiles`\n}\n\n/**\n * Holder sees household cards; another adult sees self and supervised children.\n *\n * Cards never grant the right to open another adult's profile. Expired pending\n * invitations remain manageable but no longer reserve capacity.\n * @summary List Profiles\n */\nexport const listProfiles = async ( options?: Parameters<typeof request>[1]): Promise<ProfileListRead> => {\n\n return request<ProfileListRead>(getListProfilesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreateProfileUrl = () => {\n\n\n\n\n return `/me/profiles`\n}\n\n/**\n * @summary Create Profile\n */\nexport const createProfile = async (profileCreateWrite: ProfileCreateWrite, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ProfileRead>(getCreateProfileUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(profileCreateWrite)\n }\n);}\n\n\nexport const getGuardianCandidatesUrl = () => {\n\n\n\n\n return `/me/profiles/guardian-candidates`\n}\n\n/**\n * @summary Guardian Candidates\n */\nexport const guardianCandidates = async ( options?: Parameters<typeof request>[1]): Promise<HouseholdGuardianListRead> => {\n\n return request<HouseholdGuardianListRead>(getGuardianCandidatesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListInvitationsUrl = () => {\n\n\n\n\n return `/me/profiles/invitations`\n}\n\n/**\n * @summary List Invitations\n */\nexport const listInvitations = async ( options?: Parameters<typeof request>[1]): Promise<HouseholdInvitationListRead> => {\n\n return request<HouseholdInvitationListRead>(getListInvitationsUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getInviteAdultUrl = () => {\n\n\n\n\n return `/me/profiles/invitations`\n}\n\n/**\n * @summary Invite Adult\n */\nexport const inviteAdult = async (householdInvitationWrite: HouseholdInvitationWrite, options?: Parameters<typeof request>[1]): Promise<HouseholdInvitationRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<HouseholdInvitationRead>(getInviteAdultUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(householdInvitationWrite)\n }\n);}\n\n\nexport const getAcceptInvitationUrl = () => {\n\n\n\n\n return `/me/profiles/invitations/accept`\n}\n\n/**\n * Requires a verified login email; never creates an unrelated root account.\n * @summary Accept Invitation\n */\nexport const acceptInvitation = async (householdInvitationAcceptWrite: HouseholdInvitationAcceptWrite, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ProfileRead>(getAcceptInvitationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(householdInvitationAcceptWrite)\n }\n);}\n\n\nexport const getRevokeInvitationUrl = (invitationId: number,) => {\n\n\n\n\n return `/me/profiles/invitations/${invitationId}`\n}\n\n/**\n * @summary Revoke Invitation\n */\nexport const revokeInvitation = async (invitationId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRevokeInvitationUrl(invitationId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getResendInvitationUrl = (invitationId: number,) => {\n\n\n\n\n return `/me/profiles/invitations/${invitationId}/resend`\n}\n\n/**\n * @summary Resend Invitation\n */\nexport const resendInvitation = async (invitationId: number, options?: Parameters<typeof request>[1]): Promise<HouseholdInvitationRead> => {\n\n return request<HouseholdInvitationRead>(getResendInvitationUrl(invitationId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getDeleteProfileUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}`\n}\n\n/**\n * Deactivate membership without discarding profile history or its ancestry.\n * @summary Delete Profile\n */\nexport const deleteProfile = async (profileId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteProfileUrl(profileId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadProfileUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}`\n}\n\n/**\n * @summary Read Profile\n */\nexport const readProfile = async (profileId: number, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\n\n return request<ProfileRead>(getReadProfileUrl(profileId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdateProfileUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}`\n}\n\n/**\n * @summary Update Profile\n */\nexport const updateProfile = async (profileId: number,\n profileUpdateWrite: ProfileUpdateWrite, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ProfileRead>(getUpdateProfileUrl(profileId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(profileUpdateWrite)\n }\n);}\n\n\nexport const getListGuardiansUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}/guardians`\n}\n\n/**\n * @summary List Guardians\n */\nexport const listGuardians = async (profileId: number, options?: Parameters<typeof request>[1]): Promise<HouseholdGuardianListRead> => {\n\n return request<HouseholdGuardianListRead>(getListGuardiansUrl(profileId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getAddGuardianUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}/guardians`\n}\n\n/**\n * @summary Add Guardian\n */\nexport const addGuardian = async (profileId: number,\n householdGuardianWrite: HouseholdGuardianWrite, options?: Parameters<typeof request>[1]): Promise<HouseholdGuardianListRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<HouseholdGuardianListRead>(getAddGuardianUrl(profileId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(householdGuardianWrite)\n }\n);}\n\n\nexport const getRemoveGuardianUrl = (profileId: number,\n adultId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}/guardians/${adultId}`\n}\n\n/**\n * @summary Remove Guardian\n */\nexport const removeGuardian = async (profileId: number,\n adultId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveGuardianUrl(profileId,adultId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getInviteIndependentMinorUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}/independent-invitation`\n}\n\n/**\n * @summary Invite Independent Minor\n */\nexport const inviteIndependentMinor = async (profileId: number,\n independentInvitationWrite: IndependentInvitationWrite, options?: Parameters<typeof request>[1]): Promise<HouseholdInvitationRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<HouseholdInvitationRead>(getInviteIndependentMinorUrl(profileId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(independentInvitationWrite)\n }\n);}\n\n\n"],"mappings":";;;AA6BA,MAAa,qBAAqB;CAKhC,OAAO;AACT;;;;AAKA,MAAa,SAAS,OAAO,kBAAoC,YAA2D;CAExH,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,aAAa,GAChC;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,gBAAgB;CACvC,CACF;AAAE;AAGF,MAAa,2BAA2B;CAKtC,OAAO;AACT;;;;AAKA,MAAa,eAAe,OAAQ,YAA2E;CAE7G,OAAO,QAA8B,mBAAmB,GACxD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,2BAA2B;CAKtC,OAAO;AACT;;;;AAKA,MAAa,eAAe,OAAO,uBAA8C,YAA2D;CAExI,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC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EverythingParams } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/search/search.d.ts
5
5
  export declare const getSearchEverythingUrl: (params?: SearchEverythingParams) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","names":[],"sources":["../../src/api/search/search.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.3\n */\nimport type {\n CatalogueSearchRead,\n SearchEverythingParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getSearchEverythingUrl = (params?: SearchEverythingParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"source\",\"kind\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/search?${stringifiedParams}` : `/search`\n}\n\n/**\n * Search every catalogue the caller can reach.\n *\n * Results are one blended list ordered by relevance, with ``popularity`` as\n * the tie-break. ``sources`` and ``kinds`` carry the same result set counted by\n * family, so a client can render tabs instead of a blend without asking twice.\n *\n * A query shorter than two characters returns an empty page with ``200``.\n * @summary Search Everything\n */\nexport const searchEverything = async (params?: SearchEverythingParams, options?: Parameters<typeof request>[1]): Promise<CatalogueSearchRead> => {\n\n return request<CatalogueSearchRead>(getSearchEverythingUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,0BAA0B,WAAqC;CAC1E,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAGrD,IAAI,MAAM,QAAQ,KAAK,KAAK,CAFD,UAAS,MAEQ,CAAC,CAAC,SAAS,GAAG,GAAG;GAC3D,MAAM,SAAS,MAAM;IACnB,iBAAiB,OAAO,KAAK,MAAM,OAAO,SAAS,OAAO,CAAC,CAAC;GAC9D,CAAC;GACD;EACF;EAEA,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,WAAW,sBAAsB;AACzE;;;;;;;;;;;AAYA,MAAa,mBAAmB,OAAO,QAAiC,YAA0E;CAEhJ,OAAO,QAA6B,uBAAuB,MAAM,GACjE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"search.js","names":[],"sources":["../../src/api/search/search.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.1\n */\nimport type {\n CatalogueSearchRead,\n SearchEverythingParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getSearchEverythingUrl = (params?: SearchEverythingParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"source\",\"kind\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/search?${stringifiedParams}` : `/search`\n}\n\n/**\n * Search every catalogue the caller can reach.\n *\n * Results are one blended list ordered by relevance, with ``popularity`` as\n * the tie-break. ``sources`` and ``kinds`` carry the same result set counted by\n * family, so a client can render tabs instead of a blend without asking twice.\n *\n * A query shorter than two characters returns an empty page with ``200``.\n * @summary Search Everything\n */\nexport const searchEverything = async (params?: SearchEverythingParams, options?: Parameters<typeof request>[1]): Promise<CatalogueSearchRead> => {\n\n return request<CatalogueSearchRead>(getSearchEverythingUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,0BAA0B,WAAqC;CAC1E,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAGrD,IAAI,MAAM,QAAQ,KAAK,KAAK,CAFD,UAAS,MAEQ,CAAC,CAAC,SAAS,GAAG,GAAG;GAC3D,MAAM,SAAS,MAAM;IACnB,iBAAiB,OAAO,KAAK,MAAM,OAAO,SAAS,OAAO,CAAC,CAAC;GAC9D,CAAC;GACD;EACF;EAEA,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,WAAW,sBAAsB;AACzE;;;;;;;;;;;AAYA,MAAa,mBAAmB,OAAO,QAAiC,YAA0E;CAEhJ,OAAO,QAA6B,uBAAuB,MAAM,GACjE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { $n as LevelListRead, H as SubjectListRead, Un as ListGoalsParams, Wr as EducationalGoalListRead } from "../chunks/index.js";
2
+ import { Cr as LevelListRead, Ni as EducationalGoalListRead, W as SubjectListRead, dr as ListGoalsParams } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/tutoring-catalogue/tutoring-catalogue.d.ts
5
5
  export declare const getListGoalsUrl: (params?: ListGoalsParams) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"tutoring-catalogue.js","names":[],"sources":["../../src/api/tutoring-catalogue/tutoring-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.3\n */\nimport type {\n EducationalGoalListRead,\n LevelListRead,\n ListGoalsParams,\n SubjectListRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListGoalsUrl = (params?: ListGoalsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/tutoring/goals?${stringifiedParams}` : `/tutoring/goals`\n}\n\n/**\n * Goals on offer, optionally narrowed to one request kind.\n *\n * The filter is a containment test against ``applies_to``, which is what the\n * GIN index on that column is for. The legacy asks the same question with four\n * boolean columns and a different ``WHERE`` per surface.\n * @summary List Goals\n */\nexport const listGoals = async (params?: ListGoalsParams, options?: Parameters<typeof request>[1]): Promise<EducationalGoalListRead> => {\n\n return request<EducationalGoalListRead>(getListGoalsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListLevelsUrl = () => {\n\n\n\n\n return `/tutoring/levels`\n}\n\n/**\n * Every school level, in teaching order rather than alphabetical.\n * @summary List Levels\n */\nexport const listLevels = async ( options?: Parameters<typeof request>[1]): Promise<LevelListRead> => {\n\n return request<LevelListRead>(getListLevelsUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListSubjectsUrl = () => {\n\n\n\n\n return `/tutoring/subjects`\n}\n\n/**\n * Every subject a pupil may ask about, in display order.\n *\n * Authenticated, though the data is not secret: the list differs by nothing\n * today, and leaving it open would make it the one tutoring endpoint that does\n * not establish a tenant. Cheap to relax later, expensive to tighten.\n * @summary List Subjects\n */\nexport const listSubjects = async ( options?: Parameters<typeof request>[1]): Promise<SubjectListRead> => {\n\n return request<SubjectListRead>(getListSubjectsUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAgBA,MAAa,mBAAmB,WAA8B;CAC5D,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,mBAAmB,sBAAsB;AACjF;;;;;;;;;AAUA,MAAa,YAAY,OAAO,QAA0B,YAA8E;CAEtI,OAAO,QAAiC,gBAAgB,MAAM,GAC9D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB;CAKpC,OAAO;AACT;;;;;AAMA,MAAa,aAAa,OAAQ,YAAoE;CAEpG,OAAO,QAAuB,iBAAiB,GAC/C;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,2BAA2B;CAKtC,OAAO;AACT;;;;;;;;;AAUA,MAAa,eAAe,OAAQ,YAAsE;CAExG,OAAO,QAAyB,mBAAmB,GACnD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"tutoring-catalogue.js","names":[],"sources":["../../src/api/tutoring-catalogue/tutoring-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.1\n */\nimport type {\n EducationalGoalListRead,\n LevelListRead,\n ListGoalsParams,\n SubjectListRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListGoalsUrl = (params?: ListGoalsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/tutoring/goals?${stringifiedParams}` : `/tutoring/goals`\n}\n\n/**\n * Goals on offer, optionally narrowed to one request kind.\n *\n * The filter is a containment test against ``applies_to``, which is what the\n * GIN index on that column is for. The legacy asks the same question with four\n * boolean columns and a different ``WHERE`` per surface.\n * @summary List Goals\n */\nexport const listGoals = async (params?: ListGoalsParams, options?: Parameters<typeof request>[1]): Promise<EducationalGoalListRead> => {\n\n return request<EducationalGoalListRead>(getListGoalsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListLevelsUrl = () => {\n\n\n\n\n return `/tutoring/levels`\n}\n\n/**\n * Every school level, in teaching order rather than alphabetical.\n * @summary List Levels\n */\nexport const listLevels = async ( options?: Parameters<typeof request>[1]): Promise<LevelListRead> => {\n\n return request<LevelListRead>(getListLevelsUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListSubjectsUrl = () => {\n\n\n\n\n return `/tutoring/subjects`\n}\n\n/**\n * Every subject a pupil may ask about, in display order.\n *\n * Authenticated, though the data is not secret: the list differs by nothing\n * today, and leaving it open would make it the one tutoring endpoint that does\n * not establish a tenant. Cheap to relax later, expensive to tighten.\n * @summary List Subjects\n */\nexport const listSubjects = async ( options?: Parameters<typeof request>[1]): Promise<SubjectListRead> => {\n\n return request<SubjectListRead>(getListSubjectsUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAgBA,MAAa,mBAAmB,WAA8B;CAC5D,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,mBAAmB,sBAAsB;AACjF;;;;;;;;;AAUA,MAAa,YAAY,OAAO,QAA0B,YAA8E;CAEtI,OAAO,QAAiC,gBAAgB,MAAM,GAC9D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB;CAKpC,OAAO;AACT;;;;;AAMA,MAAa,aAAa,OAAQ,YAAoE;CAEpG,OAAO,QAAuB,iBAAiB,GAC/C;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,2BAA2B;CAKtC,OAAO;AACT;;;;;;;;;AAUA,MAAa,eAAe,OAAQ,YAAsE;CAExG,OAAO,QAAyB,mBAAmB,GACnD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Ln as ListMessagesParams, bn as MessageRead, vn as MessageWrite, vs as ChatTicketRead, yn as MessagePage } from "../chunks/index.js";
2
+ import { Hn as MessagePage, Un as MessageRead, Vn as MessageWrite, or as ListMessagesParams, wc as ChatTicketRead } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/tutoring-chat/tutoring-chat.d.ts
5
5
  export declare const getMintChatTicketUrl: (requestId: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"tutoring-chat.js","names":[],"sources":["../../src/api/tutoring-chat/tutoring-chat.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.3\n */\nimport type {\n ChatTicketRead,\n ListMessagesParams,\n MessagePage,\n MessageRead,\n MessageWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getMintChatTicketUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/chat/ticket`\n}\n\n/**\n * A single-use credential for opening the socket from a browser.\n *\n * Authenticated the ordinary way, with the ordinary bearer token, because this\n * is an ordinary HTTP request. What it returns is what goes in the socket URL.\n * @summary Mint Chat Ticket\n */\nexport const mintChatTicket = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<ChatTicketRead> => {\n\n return request<ChatTicketRead>(getMintChatTicketUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getListMessagesUrl = (requestId: number,\n params?: ListMessagesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/tutoring/requests/${requestId}/messages?${stringifiedParams}` : `/tutoring/requests/${requestId}/messages`\n}\n\n/**\n * The conversation so far, newest first.\n *\n * One extra row is fetched to answer ``hasMore`` without a second count. A\n * ``COUNT(*)`` over a thread on every scroll is a table scan for a number no\n * interface displays.\n * @summary List Messages\n */\nexport const listMessages = async (requestId: number,\n params?: ListMessagesParams, options?: Parameters<typeof request>[1]): Promise<MessagePage> => {\n\n return request<MessagePage>(getListMessagesUrl(requestId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getSendMessageUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/messages`\n}\n\n/**\n * Say something, without holding a socket open.\n * @summary Send Message\n */\nexport const sendMessage = async (requestId: number,\n messageWrite: MessageWrite, options?: Parameters<typeof request>[1]): Promise<MessageRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<MessageRead>(getSendMessageUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(messageWrite)\n }\n);}\n\n\n"],"mappings":";;;AAiBA,MAAa,wBAAwB,cAAuB;CAK1D,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;AASA,MAAa,iBAAiB,OAAO,WAAmB,YAAqE;CAE3H,OAAO,QAAwB,qBAAqB,SAAS,GAC7D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,sBAAsB,WAC/B,WAAiC;CACnC,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,sBAAsB,UAAU,YAAY,sBAAsB,sBAAsB,UAAU;AAC1I;;;;;;;;;AAUA,MAAa,eAAe,OAAO,WAC/B,QAA6B,YAAkE;CAEjG,OAAO,QAAqB,mBAAmB,WAAU,MAAM,GAC/D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,qBAAqB,cAAuB;CAKvD,OAAO,sBAAsB,UAAU;AACzC;;;;;AAMA,MAAa,cAAc,OAAO,WAC9B,cAA4B,YAAkE;CAE9F,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAqB,kBAAkB,SAAS,GACrD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,YAAY;CACnC,CACF;AAAE"}
1
+ {"version":3,"file":"tutoring-chat.js","names":[],"sources":["../../src/api/tutoring-chat/tutoring-chat.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.1\n */\nimport type {\n ChatTicketRead,\n ListMessagesParams,\n MessagePage,\n MessageRead,\n MessageWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getMintChatTicketUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/chat/ticket`\n}\n\n/**\n * A single-use credential for opening the socket from a browser.\n *\n * Authenticated the ordinary way, with the ordinary bearer token, because this\n * is an ordinary HTTP request. What it returns is what goes in the socket URL.\n * @summary Mint Chat Ticket\n */\nexport const mintChatTicket = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<ChatTicketRead> => {\n\n return request<ChatTicketRead>(getMintChatTicketUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getListMessagesUrl = (requestId: number,\n params?: ListMessagesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/tutoring/requests/${requestId}/messages?${stringifiedParams}` : `/tutoring/requests/${requestId}/messages`\n}\n\n/**\n * The conversation so far, newest first.\n *\n * One extra row is fetched to answer ``hasMore`` without a second count. A\n * ``COUNT(*)`` over a thread on every scroll is a table scan for a number no\n * interface displays.\n * @summary List Messages\n */\nexport const listMessages = async (requestId: number,\n params?: ListMessagesParams, options?: Parameters<typeof request>[1]): Promise<MessagePage> => {\n\n return request<MessagePage>(getListMessagesUrl(requestId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getSendMessageUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/messages`\n}\n\n/**\n * Say something, without holding a socket open.\n * @summary Send Message\n */\nexport const sendMessage = async (requestId: number,\n messageWrite: MessageWrite, options?: Parameters<typeof request>[1]): Promise<MessageRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<MessageRead>(getSendMessageUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(messageWrite)\n }\n);}\n\n\n"],"mappings":";;;AAiBA,MAAa,wBAAwB,cAAuB;CAK1D,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;AASA,MAAa,iBAAiB,OAAO,WAAmB,YAAqE;CAE3H,OAAO,QAAwB,qBAAqB,SAAS,GAC7D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,sBAAsB,WAC/B,WAAiC;CACnC,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,sBAAsB,UAAU,YAAY,sBAAsB,sBAAsB,UAAU;AAC1I;;;;;;;;;AAUA,MAAa,eAAe,OAAO,WAC/B,QAA6B,YAAkE;CAEjG,OAAO,QAAqB,mBAAmB,WAAU,MAAM,GAC/D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,qBAAqB,cAAuB;CAKvD,OAAO,sBAAsB,UAAU;AACzC;;;;;AAMA,MAAa,cAAc,OAAO,WAC9B,cAA4B,YAAkE;CAE9F,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAqB,kBAAkB,SAAS,GACrD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,YAAY;CACnC,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { f as TutoringQueuePage, jn as ListQueueParams, y as TutoringDispatchWrite } from "../chunks/index.js";
2
+ import { er as ListQueueParams, m as TutoringQueuePage, x as TutoringDispatchWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/tutoring-dispatch/tutoring-dispatch.d.ts
5
5
  export declare const getListQueueUrl: (params?: ListQueueParams) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"tutoring-dispatch.js","names":[],"sources":["../../src/api/tutoring-dispatch/tutoring-dispatch.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.3\n */\nimport type {\n ListQueueParams,\n TutoringDispatchWrite,\n TutoringQueuePage\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListQueueUrl = (params?: ListQueueParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"status\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/tutoring/queue?${stringifiedParams}` : `/tutoring/queue`\n}\n\n/**\n * What is waiting, oldest first.\n *\n * Scoped to the dispatcher's tenant and its descendants. Defaults to the four open statuses, which\n * is what the partial index on the table is built for — pass ``?status=`` to\n * look at something else and the query stops using it, which is the honest\n * trade rather than a hidden one.\n * @summary List Queue\n */\nexport const listQueue = async (params?: ListQueueParams, options?: Parameters<typeof request>[1]): Promise<TutoringQueuePage> => {\n\n return request<TutoringQueuePage>(getListQueueUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getDispatchRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/dispatch`\n}\n\n/**\n * Route it — to somebody named, or to the open pool.\n *\n * Changing the channel here is deliberate and common: pupils pick a classroom\n * and turn out to have no microphone, and the dispatcher is the person who\n * finds that out.\n * @summary Dispatch Request\n */\nexport const dispatchRequest = async (requestId: number,\n tutoringDispatchWrite: TutoringDispatchWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getDispatchRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringDispatchWrite)\n }\n);}\n\n\nexport const getTriageRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/triage`\n}\n\n/**\n * Take a request off the queue to look at it.\n *\n * Separate from dispatching because the legacy's own timestamps separate them —\n * ``picked_by_switchman_at`` then ``validated_at`` — and the gap between the\n * two is the figure that tells you whether the queue is staffed.\n * @summary Triage Request\n */\nexport const triageRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getTriageRequestUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAeA,MAAa,mBAAmB,WAA8B;CAC5D,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAGrD,IAAI,MAAM,QAAQ,KAAK,KAAK,CAFD,QAEiB,CAAC,CAAC,SAAS,GAAG,GAAG;GAC3D,MAAM,SAAS,MAAM;IACnB,iBAAiB,OAAO,KAAK,MAAM,OAAO,SAAS,OAAO,CAAC,CAAC;GAC9D,CAAC;GACD;EACF;EAEA,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,mBAAmB,sBAAsB;AACjF;;;;;;;;;;AAWA,MAAa,YAAY,OAAO,QAA0B,YAAwE;CAEhI,OAAO,QAA2B,gBAAgB,MAAM,GACxD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB,cAAuB;CAK3D,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;AAUA,MAAa,kBAAkB,OAAO,WAClC,uBAA8C,YAA2D;CAEzG,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,sBAAsB,SAAS,GAClD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,qBAAqB;CAC5C,CACF;AAAE;AAGF,MAAa,uBAAuB,cAAuB;CAKzD,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;AAUA,MAAa,gBAAgB,OAAO,WAAmB,YAA2D;CAEhH,OAAO,QAAc,oBAAoB,SAAS,GAClD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"tutoring-dispatch.js","names":[],"sources":["../../src/api/tutoring-dispatch/tutoring-dispatch.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.1\n */\nimport type {\n ListQueueParams,\n TutoringDispatchWrite,\n TutoringQueuePage\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListQueueUrl = (params?: ListQueueParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"status\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/tutoring/queue?${stringifiedParams}` : `/tutoring/queue`\n}\n\n/**\n * What is waiting, oldest first.\n *\n * Scoped to the dispatcher's tenant and its descendants. Defaults to the four open statuses, which\n * is what the partial index on the table is built for — pass ``?status=`` to\n * look at something else and the query stops using it, which is the honest\n * trade rather than a hidden one.\n * @summary List Queue\n */\nexport const listQueue = async (params?: ListQueueParams, options?: Parameters<typeof request>[1]): Promise<TutoringQueuePage> => {\n\n return request<TutoringQueuePage>(getListQueueUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getDispatchRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/dispatch`\n}\n\n/**\n * Route it — to somebody named, or to the open pool.\n *\n * Changing the channel here is deliberate and common: pupils pick a classroom\n * and turn out to have no microphone, and the dispatcher is the person who\n * finds that out.\n * @summary Dispatch Request\n */\nexport const dispatchRequest = async (requestId: number,\n tutoringDispatchWrite: TutoringDispatchWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getDispatchRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringDispatchWrite)\n }\n);}\n\n\nexport const getTriageRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/triage`\n}\n\n/**\n * Take a request off the queue to look at it.\n *\n * Separate from dispatching because the legacy's own timestamps separate them —\n * ``picked_by_switchman_at`` then ``validated_at`` — and the gap between the\n * two is the figure that tells you whether the queue is staffed.\n * @summary Triage Request\n */\nexport const triageRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getTri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BAAsB,SAAS,GAClD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,qBAAqB;CAC5C,CACF;AAAE;AAGF,MAAa,uBAAuB,cAAuB;CAKzD,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;AAUA,MAAa,gBAAgB,OAAO,WAAmB,YAA2D;CAEhH,OAAO,QAAc,oBAAoB,SAAS,GAClD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { a as TutoringRoomRead, w as TutoringAnswerWrite, x as TutoringCloseWrite } from "../chunks/index.js";
2
+ import { C as TutoringCloseWrite, E as TutoringAnswerWrite, s as TutoringRoomRead } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/tutoring-practitioner/tutoring-practitioner.d.ts
5
5
  export declare const getAnswerRequestUrl: (requestId: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"tutoring-practitioner.js","names":[],"sources":["../../src/api/tutoring-practitioner/tutoring-practitioner.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.3\n */\nimport type {\n TutoringAnswerWrite,\n TutoringCloseWrite,\n TutoringRoomRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getAnswerRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/answer`\n}\n\n/**\n * Deliver the answer.\n *\n * The body is stored as the answer and any named attachments are re-roled to\n * ``answer`` — they were uploaded against this request, so no id from another\n * request can be attached here.\n * @summary Answer Request\n */\nexport const answerRequest = async (requestId: number,\n tutoringAnswerWrite: TutoringAnswerWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getAnswerRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringAnswerWrite)\n }\n);}\n\n\nexport const getClaimRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/claim`\n}\n\n/**\n * Take a dispatched request.\n *\n * ``409`` if somebody else already holds it. The check and the write are one\n * statement so that two practitioners hitting claim in the same instant cannot\n * both win — the legacy reads then writes, so both do.\n * @summary Claim Request\n */\nexport const claimRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getClaimRequestUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getCloseRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/close`\n}\n\n/**\n * Close a request that will not be answered, with a reason.\n *\n * A dispatcher's job rather than a practitioner's: giving up on a request is a\n * decision about the queue, and the person who could not answer it is not the\n * person who should decide nobody will.\n * @summary Close Request\n */\nexport const closeRequest = async (requestId: number,\n tutoringCloseWrite: TutoringCloseWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getCloseRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringCloseWrite)\n }\n);}\n\n\nexport const getOpenRoomUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/room`\n}\n\n/**\n * Open the room for a live request. The practitioner decides when.\n *\n * Deliberately an explicit action rather than a side effect of claiming, which\n * is what Prof Express does: the teacher presses a button in their own queue,\n * and ``createTeacherVedamoClasssroom`` refuses unless a teacher is assigned.\n * A room provisioned at dispatch is a room the pupil joins alone.\n *\n * Only the assigned practitioner may open it, and only once — a second call\n * returns the room that is already open rather than provisioning another. The\n * legacy has no such check, so pressing its button twice orphans a room the\n * pupil may already hold a link to.\n *\n * ``409`` for a channel with nothing to join, and for a request nobody has\n * claimed.\n * @summary Open Room\n */\nexport const openRoom = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<TutoringRoomRead> => {\n\n return request<TutoringRoomRead>(getOpenRoomUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAeA,MAAa,uBAAuB,cAAuB;CAKzD,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;AAUA,MAAa,gBAAgB,OAAO,WAChC,qBAA0C,YAA2D;CAErG,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CA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AAO,WAAmB,YAAuE;CAEvH,OAAO,QAA0B,eAAe,SAAS,GACzD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"tutoring-practitioner.js","names":[],"sources":["../../src/api/tutoring-practitioner/tutoring-practitioner.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.1\n */\nimport type {\n TutoringAnswerWrite,\n TutoringCloseWrite,\n TutoringRoomRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getAnswerRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/answer`\n}\n\n/**\n * Deliver the answer.\n *\n * The body is stored as the answer and any named attachments are re-roled to\n * ``answer`` — they were uploaded against this request, so no id from another\n * request can be attached here.\n * @summary Answer Request\n */\nexport const answerRequest = async (requestId: number,\n tutoringAnswerWrite: TutoringAnswerWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getAnswerRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringAnswerWrite)\n }\n);}\n\n\nexport const getClaimRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/claim`\n}\n\n/**\n * Take a dispatched request.\n *\n * ``409`` if somebody else already holds it. The check and the write are one\n * statement so that two practitioners hitting claim in the same instant cannot\n * both win — the legacy reads then writes, so both do.\n * @summary Claim Request\n */\nexport const claimRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getClaimRequestUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getCloseRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/close`\n}\n\n/**\n * Close a request that will not be answered, with a reason.\n *\n * A dispatcher's job rather than a practitioner's: giving up on a request is a\n * decision about the queue, and the person who could not answer it is not the\n * person who should decide nobody will.\n * @summary Close Request\n */\nexport const closeRequest = async (requestId: number,\n tutoringCloseWrite: TutoringCloseWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getCloseRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringCloseWrite)\n }\n);}\n\n\nexport const getOpenRoomUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/room`\n}\n\n/**\n * Open the room for a live request. The practitioner decides when.\n *\n * Deliberately an explicit action rather than a side effect of claiming, which\n * is what Prof Express does: the teacher presses a button in their own queue,\n * and ``createTeacherVedamoClasssroom`` refuses unless a teacher is assigned.\n * A room provisioned at dispatch is a room the pupil joins alone.\n *\n * Only the assigned practitioner may open it, and only once — a second call\n * returns the room that is already open rather than provisioning another. The\n * legacy has no such check, so pressing its button twice orphans a room the\n * pupil may already hold a link to.\n *\n * ``409`` for a channel with nothing to join, and for a request nobody has\n * claimed.\n * @summary Open Room\n */\nexport const openRoom = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<TutoringRoomRead> => {\n\n return request<TutoringRoomRead>(getOpenRoomUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAeA,MAAa,uBAAuB,cAAuB;CAKzD,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;AAUA,MAAa,gBAAgB,OAAO,WAChC,qBAA0C,YAA2D;CAErG,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,oBAAoB,SAAS,GAChD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,mBAAmB;CAC1C,CACF;AAAE;AAGF,MAAa,sBAAsB,cAAuB;CAKxD,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;AAUA,MAAa,eAAe,OAAO,WAAmB,YAA2D;CAE/G,OAAO,QAAc,mBAAmB,SAAS,GACjD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,sBAAsB,cAAuB;CAKxD,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;AAUA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