@learnorama/mozaik-sdk 0.1.0-staging.11.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.
- package/README.md +94 -0
- package/dist/api/account.d.ts +75 -0
- package/dist/api/account.js +117 -0
- package/dist/api/account.js.map +1 -0
- package/dist/api/admin-catalogue.d.ts +68 -0
- package/dist/api/admin-catalogue.js +155 -0
- package/dist/api/admin-catalogue.js.map +1 -0
- package/dist/api/admin-consumption.d.ts +27 -0
- package/dist/api/admin-consumption.js +55 -0
- package/dist/api/admin-consumption.js.map +1 -0
- package/dist/api/admin-licenses.d.ts +21 -0
- package/dist/api/admin-licenses.js +34 -0
- package/dist/api/admin-licenses.js.map +1 -0
- package/dist/api/admin-patrons.d.ts +36 -0
- package/dist/api/admin-patrons.js +76 -0
- package/dist/api/admin-patrons.js.map +1 -0
- package/dist/api/admin-reviews.d.ts +30 -0
- package/dist/api/admin-reviews.js +63 -0
- package/dist/api/admin-reviews.js.map +1 -0
- package/dist/api/admin-roles.d.ts +34 -0
- package/dist/api/admin-roles.js +62 -0
- package/dist/api/admin-roles.js.map +1 -0
- package/dist/api/admin-support.d.ts +68 -0
- package/dist/api/admin-support.js +116 -0
- package/dist/api/admin-support.js.map +1 -0
- package/dist/api/admin-tenants.d.ts +33 -0
- package/dist/api/admin-tenants.js +68 -0
- package/dist/api/admin-tenants.js.map +1 -0
- package/dist/api/admin-tutoring.d.ts +159 -0
- package/dist/api/admin-tutoring.js +455 -0
- package/dist/api/admin-tutoring.js.map +1 -0
- package/dist/api/auth.d.ts +92 -0
- package/dist/api/auth.js +192 -0
- package/dist/api/auth.js.map +1 -0
- package/dist/api/biblio-catalogue.d.ts +122 -0
- package/dist/api/biblio-catalogue.js +223 -0
- package/dist/api/biblio-catalogue.js.map +1 -0
- package/dist/api/biblio-home.d.ts +18 -0
- package/dist/api/biblio-home.js +31 -0
- package/dist/api/biblio-home.js.map +1 -0
- package/dist/api/biblio-library.d.ts +94 -0
- package/dist/api/biblio-library.js +187 -0
- package/dist/api/biblio-library.js.map +1 -0
- package/dist/api/biblio-nextory.d.ts +43 -0
- package/dist/api/biblio-nextory.js +65 -0
- package/dist/api/biblio-nextory.js.map +1 -0
- package/dist/api/biblio-press.d.ts +38 -0
- package/dist/api/biblio-press.js +70 -0
- package/dist/api/biblio-press.js.map +1 -0
- package/dist/api/biblio-search.d.ts +17 -0
- package/dist/api/biblio-search.js +30 -0
- package/dist/api/biblio-search.js.map +1 -0
- package/dist/api/biblio-telemetry.d.ts +28 -0
- package/dist/api/biblio-telemetry.js +49 -0
- package/dist/api/biblio-telemetry.js.map +1 -0
- package/dist/api/consumption.d.ts +30 -0
- package/dist/api/consumption.js +45 -0
- package/dist/api/consumption.js.map +1 -0
- package/dist/api/cvs-app.d.ts +39 -0
- package/dist/api/cvs-app.js +72 -0
- package/dist/api/cvs-app.js.map +1 -0
- package/dist/api/cvs-documents.d.ts +106 -0
- package/dist/api/cvs-documents.js +208 -0
- package/dist/api/cvs-documents.js.map +1 -0
- package/dist/api/cvs-favorites.d.ts +53 -0
- package/dist/api/cvs-favorites.js +82 -0
- package/dist/api/cvs-favorites.js.map +1 -0
- package/dist/api/cvs-loans.d.ts +59 -0
- package/dist/api/cvs-loans.js +106 -0
- package/dist/api/cvs-loans.js.map +1 -0
- package/dist/api/cvs-streaming.d.ts +40 -0
- package/dist/api/cvs-streaming.js +68 -0
- package/dist/api/cvs-streaming.js.map +1 -0
- package/dist/api/index.d.ts +34 -0
- package/dist/api/index.js +34 -0
- package/dist/api/partner-catalogue.d.ts +77 -0
- package/dist/api/partner-catalogue.js +125 -0
- package/dist/api/partner-catalogue.js.map +1 -0
- package/dist/api/partner-reader.d.ts +56 -0
- package/dist/api/partner-reader.js +103 -0
- package/dist/api/partner-reader.js.map +1 -0
- package/dist/api/profiles.d.ts +64 -0
- package/dist/api/profiles.js +126 -0
- package/dist/api/profiles.js.map +1 -0
- package/dist/api/tutoring-catalogue.d.ts +32 -0
- package/dist/api/tutoring-catalogue.js +59 -0
- package/dist/api/tutoring-catalogue.js.map +1 -0
- package/dist/api/tutoring-chat.d.ts +31 -0
- package/dist/api/tutoring-chat.js +71 -0
- package/dist/api/tutoring-chat.js.map +1 -0
- package/dist/api/tutoring-dispatch.d.ts +37 -0
- package/dist/api/tutoring-dispatch.js +83 -0
- package/dist/api/tutoring-dispatch.js.map +1 -0
- package/dist/api/tutoring-practitioner.d.ts +55 -0
- package/dist/api/tutoring-practitioner.js +110 -0
- package/dist/api/tutoring-practitioner.js.map +1 -0
- package/dist/api/tutoring-requests.d.ts +86 -0
- package/dist/api/tutoring-requests.js +176 -0
- package/dist/api/tutoring-requests.js.map +1 -0
- package/dist/chunks/client.d.ts +28 -0
- package/dist/chunks/client.js +61 -0
- package/dist/chunks/client.js.map +1 -0
- package/dist/chunks/index.d.ts +4566 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/models.d.ts +3 -0
- package/dist/models.js +175 -0
- package/dist/models.js.map +1 -0
- package/dist/react/account.d.ts +163 -0
- package/dist/react/account.js +240 -0
- package/dist/react/account.js.map +1 -0
- package/dist/react/admin-catalogue.d.ts +196 -0
- package/dist/react/admin-catalogue.js +336 -0
- package/dist/react/admin-catalogue.js.map +1 -0
- package/dist/react/admin-consumption.d.ts +75 -0
- package/dist/react/admin-consumption.js +127 -0
- package/dist/react/admin-consumption.js.map +1 -0
- package/dist/react/admin-licenses.d.ts +50 -0
- package/dist/react/admin-licenses.js +78 -0
- package/dist/react/admin-licenses.js.map +1 -0
- package/dist/react/admin-patrons.d.ts +111 -0
- package/dist/react/admin-patrons.js +173 -0
- package/dist/react/admin-patrons.js.map +1 -0
- package/dist/react/admin-reviews.d.ts +78 -0
- package/dist/react/admin-reviews.js +135 -0
- package/dist/react/admin-reviews.js.map +1 -0
- package/dist/react/admin-roles.d.ts +82 -0
- package/dist/react/admin-roles.js +135 -0
- package/dist/react/admin-roles.js.map +1 -0
- package/dist/react/admin-support.d.ts +123 -0
- package/dist/react/admin-support.js +208 -0
- package/dist/react/admin-support.js.map +1 -0
- package/dist/react/admin-tenants.d.ts +108 -0
- package/dist/react/admin-tenants.js +165 -0
- package/dist/react/admin-tenants.js.map +1 -0
- package/dist/react/admin-tutoring.d.ts +556 -0
- package/dist/react/admin-tutoring.js +954 -0
- package/dist/react/admin-tutoring.js.map +1 -0
- package/dist/react/auth.d.ts +220 -0
- package/dist/react/auth.js +372 -0
- package/dist/react/auth.js.map +1 -0
- package/dist/react/biblio-catalogue.d.ts +374 -0
- package/dist/react/biblio-catalogue.js +498 -0
- package/dist/react/biblio-catalogue.js.map +1 -0
- package/dist/react/biblio-home.d.ts +47 -0
- package/dist/react/biblio-home.js +75 -0
- package/dist/react/biblio-home.js.map +1 -0
- package/dist/react/biblio-library.d.ts +285 -0
- package/dist/react/biblio-library.js +411 -0
- package/dist/react/biblio-library.js.map +1 -0
- package/dist/react/biblio-nextory.d.ts +100 -0
- package/dist/react/biblio-nextory.js +163 -0
- package/dist/react/biblio-nextory.js.map +1 -0
- package/dist/react/biblio-press.d.ts +121 -0
- package/dist/react/biblio-press.js +163 -0
- package/dist/react/biblio-press.js.map +1 -0
- package/dist/react/biblio-search.d.ts +46 -0
- package/dist/react/biblio-search.js +74 -0
- package/dist/react/biblio-search.js.map +1 -0
- package/dist/react/biblio-telemetry.d.ts +49 -0
- package/dist/react/biblio-telemetry.js +85 -0
- package/dist/react/biblio-telemetry.js.map +1 -0
- package/dist/react/consumption.d.ts +66 -0
- package/dist/react/consumption.js +109 -0
- package/dist/react/consumption.js.map +1 -0
- package/dist/react/cvs-app.d.ts +86 -0
- package/dist/react/cvs-app.js +144 -0
- package/dist/react/cvs-app.js.map +1 -0
- package/dist/react/cvs-documents.d.ts +254 -0
- package/dist/react/cvs-documents.js +418 -0
- package/dist/react/cvs-documents.js.map +1 -0
- package/dist/react/cvs-favorites.d.ts +143 -0
- package/dist/react/cvs-favorites.js +206 -0
- package/dist/react/cvs-favorites.js.map +1 -0
- package/dist/react/cvs-loans.d.ts +140 -0
- package/dist/react/cvs-loans.js +234 -0
- package/dist/react/cvs-loans.js.map +1 -0
- package/dist/react/cvs-streaming.d.ts +87 -0
- package/dist/react/cvs-streaming.js +141 -0
- package/dist/react/cvs-streaming.js.map +1 -0
- package/dist/react/index.d.ts +34 -0
- package/dist/react/index.js +34 -0
- package/dist/react/partner-catalogue.d.ts +223 -0
- package/dist/react/partner-catalogue.js +301 -0
- package/dist/react/partner-catalogue.js.map +1 -0
- package/dist/react/partner-reader.d.ts +159 -0
- package/dist/react/partner-reader.js +226 -0
- package/dist/react/partner-reader.js.map +1 -0
- package/dist/react/profiles.d.ts +174 -0
- package/dist/react/profiles.js +279 -0
- package/dist/react/profiles.js.map +1 -0
- package/dist/react/tutoring-catalogue.d.ts +115 -0
- package/dist/react/tutoring-catalogue.js +151 -0
- package/dist/react/tutoring-catalogue.js.map +1 -0
- package/dist/react/tutoring-chat.d.ts +96 -0
- package/dist/react/tutoring-chat.js +172 -0
- package/dist/react/tutoring-chat.js.map +1 -0
- package/dist/react/tutoring-dispatch.d.ts +102 -0
- package/dist/react/tutoring-dispatch.js +183 -0
- package/dist/react/tutoring-dispatch.js.map +1 -0
- package/dist/react/tutoring-practitioner.d.ts +129 -0
- package/dist/react/tutoring-practitioner.js +230 -0
- package/dist/react/tutoring-practitioner.js.map +1 -0
- package/dist/react/tutoring-requests.d.ts +233 -0
- package/dist/react/tutoring-requests.js +385 -0
- package/dist/react/tutoring-requests.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { r as request } from "../chunks/client.js";
|
|
3
|
+
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
4
|
+
//#region src/react/biblio-catalogue/biblio-catalogue.ts
|
|
5
|
+
/**
|
|
6
|
+
* Generated by orval 🍺
|
|
7
|
+
* Do not edit manually.
|
|
8
|
+
* Mozaik backend
|
|
9
|
+
* 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.
|
|
10
|
+
* OpenAPI spec version: 0.1.0
|
|
11
|
+
*/
|
|
12
|
+
const withQueryKey = (query, queryKey) => {
|
|
13
|
+
const result = { queryKey };
|
|
14
|
+
for (const key of Object.keys(query)) {
|
|
15
|
+
if (key === "queryKey") continue;
|
|
16
|
+
Object.defineProperty(result, key, {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
get: () => query[key]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
const getReadContentUrl = (contentId) => {
|
|
25
|
+
return `/biblio/contents/${contentId}`;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* One content item, with this caller's own state on it (E34).
|
|
29
|
+
*
|
|
30
|
+
* ``liked`` and ``favorited`` are why this is not just the summary shape: they
|
|
31
|
+
* are per-caller and therefore uncacheable across users, which is worth knowing
|
|
32
|
+
* before anyone puts a shared cache in front of it.
|
|
33
|
+
* @summary Read Content
|
|
34
|
+
*/
|
|
35
|
+
const readContent = async (contentId, options) => {
|
|
36
|
+
return request(getReadContentUrl(contentId), {
|
|
37
|
+
...options,
|
|
38
|
+
method: "GET"
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const getReadContentQueryKey = (contentId) => {
|
|
42
|
+
return [`/biblio/contents/${contentId}`];
|
|
43
|
+
};
|
|
44
|
+
const getReadContentQueryOptions = (contentId, options) => {
|
|
45
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
46
|
+
const queryKey = queryOptions?.queryKey ?? getReadContentQueryKey(contentId);
|
|
47
|
+
const queryFn = ({ signal }) => readContent(contentId, {
|
|
48
|
+
signal,
|
|
49
|
+
...requestOptions
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
queryKey,
|
|
53
|
+
queryFn,
|
|
54
|
+
enabled: contentId !== null && contentId !== void 0,
|
|
55
|
+
...queryOptions
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* @summary Read Content
|
|
60
|
+
*/
|
|
61
|
+
function useReadContent(contentId, options, queryClient) {
|
|
62
|
+
const queryOptions = getReadContentQueryOptions(contentId, options);
|
|
63
|
+
const query = useQuery(queryOptions, queryClient);
|
|
64
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
65
|
+
}
|
|
66
|
+
const getUnlikeContentUrl = (contentId) => {
|
|
67
|
+
return `/biblio/contents/${contentId}/like`;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Withdraw a like (E37). Idempotent — not liked is already the desired state.
|
|
71
|
+
* @summary Unlike Content
|
|
72
|
+
*/
|
|
73
|
+
const unlikeContent = async (contentId, options) => {
|
|
74
|
+
return request(getUnlikeContentUrl(contentId), {
|
|
75
|
+
...options,
|
|
76
|
+
method: "DELETE"
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const getUnlikeContentMutationKey = () => ["unlikeContent"];
|
|
80
|
+
const getUnlikeContentMutationOptions = (options) => {
|
|
81
|
+
const mutationKey = getUnlikeContentMutationKey();
|
|
82
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
83
|
+
...options,
|
|
84
|
+
mutation: {
|
|
85
|
+
...options.mutation,
|
|
86
|
+
mutationKey
|
|
87
|
+
}
|
|
88
|
+
} : {
|
|
89
|
+
mutation: { mutationKey },
|
|
90
|
+
request: void 0
|
|
91
|
+
};
|
|
92
|
+
const mutationFn = (props) => {
|
|
93
|
+
const { contentId } = props ?? {};
|
|
94
|
+
return unlikeContent(contentId, requestOptions);
|
|
95
|
+
};
|
|
96
|
+
return {
|
|
97
|
+
mutationFn,
|
|
98
|
+
...mutationOptions
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* @summary Unlike Content
|
|
103
|
+
*/
|
|
104
|
+
const useUnlikeContent = (options, queryClient) => {
|
|
105
|
+
return useMutation(getUnlikeContentMutationOptions(options), queryClient);
|
|
106
|
+
};
|
|
107
|
+
const getLikeContentUrl = (contentId) => {
|
|
108
|
+
return `/biblio/contents/${contentId}/like`;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Record a like (E36). Idempotent.
|
|
112
|
+
*
|
|
113
|
+
* This and :func:`unlike_content` replace one non-idempotent
|
|
114
|
+
* ``POST /content/{id}/toggle-like``. A retried toggle reverses the user's
|
|
115
|
+
* intent; a repeated ``PUT`` cannot (§4, consequence 3).
|
|
116
|
+
*
|
|
117
|
+
* ``like_count`` is recomputed from ``content_rating`` rather than incremented,
|
|
118
|
+
* because an increment beside an upsert double-counts the second time the same
|
|
119
|
+
* person likes the same thing.
|
|
120
|
+
* @summary Like Content
|
|
121
|
+
*/
|
|
122
|
+
const likeContent = async (contentId, options) => {
|
|
123
|
+
return request(getLikeContentUrl(contentId), {
|
|
124
|
+
...options,
|
|
125
|
+
method: "PUT"
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
const getLikeContentMutationKey = () => ["likeContent"];
|
|
129
|
+
const getLikeContentMutationOptions = (options) => {
|
|
130
|
+
const mutationKey = getLikeContentMutationKey();
|
|
131
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
132
|
+
...options,
|
|
133
|
+
mutation: {
|
|
134
|
+
...options.mutation,
|
|
135
|
+
mutationKey
|
|
136
|
+
}
|
|
137
|
+
} : {
|
|
138
|
+
mutation: { mutationKey },
|
|
139
|
+
request: void 0
|
|
140
|
+
};
|
|
141
|
+
const mutationFn = (props) => {
|
|
142
|
+
const { contentId } = props ?? {};
|
|
143
|
+
return likeContent(contentId, requestOptions);
|
|
144
|
+
};
|
|
145
|
+
return {
|
|
146
|
+
mutationFn,
|
|
147
|
+
...mutationOptions
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* @summary Like Content
|
|
152
|
+
*/
|
|
153
|
+
const useLikeContent = (options, queryClient) => {
|
|
154
|
+
return useMutation(getLikeContentMutationOptions(options), queryClient);
|
|
155
|
+
};
|
|
156
|
+
const getReadRecommendationsUrl = (contentId, params) => {
|
|
157
|
+
const normalizedParams = new URLSearchParams();
|
|
158
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
159
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
160
|
+
});
|
|
161
|
+
const stringifiedParams = normalizedParams.toString();
|
|
162
|
+
return stringifiedParams.length > 0 ? `/biblio/contents/${contentId}/recommendations?${stringifiedParams}` : `/biblio/contents/${contentId}/recommendations`;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Related content the caller can also reach (E35).
|
|
166
|
+
*
|
|
167
|
+
* Recommending something the account cannot open is worse than recommending
|
|
168
|
+
* nothing, so the candidate set is entitlement-filtered before ranking rather
|
|
169
|
+
* than after — filtering afterwards silently shortens the list instead.
|
|
170
|
+
*
|
|
171
|
+
* Keyword overlap for now, over the GIN index on ``content.keywords``.
|
|
172
|
+
* @summary Read Recommendations
|
|
173
|
+
*/
|
|
174
|
+
const readRecommendations = async (contentId, params, options) => {
|
|
175
|
+
return request(getReadRecommendationsUrl(contentId, params), {
|
|
176
|
+
...options,
|
|
177
|
+
method: "GET"
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
const getReadRecommendationsQueryKey = (contentId, params) => {
|
|
181
|
+
return [`/biblio/contents/${contentId}/recommendations`, ...params ? [params] : []];
|
|
182
|
+
};
|
|
183
|
+
const getReadRecommendationsQueryOptions = (contentId, params, options) => {
|
|
184
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
185
|
+
const queryKey = queryOptions?.queryKey ?? getReadRecommendationsQueryKey(contentId, params);
|
|
186
|
+
const queryFn = ({ signal }) => readRecommendations(contentId, params, {
|
|
187
|
+
signal,
|
|
188
|
+
...requestOptions
|
|
189
|
+
});
|
|
190
|
+
return {
|
|
191
|
+
queryKey,
|
|
192
|
+
queryFn,
|
|
193
|
+
enabled: contentId !== null && contentId !== void 0,
|
|
194
|
+
...queryOptions
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* @summary Read Recommendations
|
|
199
|
+
*/
|
|
200
|
+
function useReadRecommendations(contentId, params, options, queryClient) {
|
|
201
|
+
const queryOptions = getReadRecommendationsQueryOptions(contentId, params, options);
|
|
202
|
+
const query = useQuery(queryOptions, queryClient);
|
|
203
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
204
|
+
}
|
|
205
|
+
const getListEditorsUrl = (params) => {
|
|
206
|
+
const normalizedParams = new URLSearchParams();
|
|
207
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
208
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
209
|
+
});
|
|
210
|
+
const stringifiedParams = normalizedParams.toString();
|
|
211
|
+
return stringifiedParams.length > 0 ? `/biblio/editors?${stringifiedParams}` : `/biblio/editors`;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Active editors (E44).
|
|
215
|
+
*
|
|
216
|
+
* ``order`` and ``sort`` are resolved against a whitelist and never
|
|
217
|
+
* interpolated. The legacy passed both straight to the query layer (defect
|
|
218
|
+
* D17); an unrecognised value is ``422`` rather than a surprise ordering.
|
|
219
|
+
*
|
|
220
|
+
* The collection is not wrapped in a single-element array. The legacy
|
|
221
|
+
* ``GET /api/v1/editors/`` was (§2.1).
|
|
222
|
+
*
|
|
223
|
+
* Authenticated even though the answer does not depend on who is asking. Which
|
|
224
|
+
* publishers a platform carries is commercial information, and an endpoint that
|
|
225
|
+
* enumerates them for anyone is a competitor's first request. The sibling
|
|
226
|
+
* ``/editors/{id}`` was already authenticated; this one was not, which is how
|
|
227
|
+
* the inconsistency was found.
|
|
228
|
+
* @summary List Editors
|
|
229
|
+
*/
|
|
230
|
+
const listEditors = async (params, options) => {
|
|
231
|
+
return request(getListEditorsUrl(params), {
|
|
232
|
+
...options,
|
|
233
|
+
method: "GET"
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
const getListEditorsQueryKey = (params) => {
|
|
237
|
+
return [`/biblio/editors`, ...params ? [params] : []];
|
|
238
|
+
};
|
|
239
|
+
const getListEditorsQueryOptions = (params, options) => {
|
|
240
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
241
|
+
const queryKey = queryOptions?.queryKey ?? getListEditorsQueryKey(params);
|
|
242
|
+
const queryFn = ({ signal }) => listEditors(params, {
|
|
243
|
+
signal,
|
|
244
|
+
...requestOptions
|
|
245
|
+
});
|
|
246
|
+
return {
|
|
247
|
+
queryKey,
|
|
248
|
+
queryFn,
|
|
249
|
+
...queryOptions
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* @summary List Editors
|
|
254
|
+
*/
|
|
255
|
+
function useListEditors(params, options, queryClient) {
|
|
256
|
+
const queryOptions = getListEditorsQueryOptions(params, options);
|
|
257
|
+
const query = useQuery(queryOptions, queryClient);
|
|
258
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
259
|
+
}
|
|
260
|
+
const getReadEditorUrl = (editorId, params) => {
|
|
261
|
+
const normalizedParams = new URLSearchParams();
|
|
262
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
263
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
264
|
+
});
|
|
265
|
+
const stringifiedParams = normalizedParams.toString();
|
|
266
|
+
return stringifiedParams.length > 0 ? `/biblio/editors/${editorId}?${stringifiedParams}` : `/biblio/editors/${editorId}`;
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* One editor and the content of theirs this caller can reach (E45).
|
|
270
|
+
*
|
|
271
|
+
* One endpoint replaces two — a page and a JSON route that used ``pageSize``
|
|
272
|
+
* instead of ``limit`` and wrapped the object in an array. Same entity, two
|
|
273
|
+
* conventions, one codebase (§4, consequence 5).
|
|
274
|
+
* @summary Read Editor
|
|
275
|
+
*/
|
|
276
|
+
const readEditor = async (editorId, params, options) => {
|
|
277
|
+
return request(getReadEditorUrl(editorId, params), {
|
|
278
|
+
...options,
|
|
279
|
+
method: "GET"
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
const getReadEditorQueryKey = (editorId, params) => {
|
|
283
|
+
return [`/biblio/editors/${editorId}`, ...params ? [params] : []];
|
|
284
|
+
};
|
|
285
|
+
const getReadEditorQueryOptions = (editorId, params, options) => {
|
|
286
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
287
|
+
const queryKey = queryOptions?.queryKey ?? getReadEditorQueryKey(editorId, params);
|
|
288
|
+
const queryFn = ({ signal }) => readEditor(editorId, params, {
|
|
289
|
+
signal,
|
|
290
|
+
...requestOptions
|
|
291
|
+
});
|
|
292
|
+
return {
|
|
293
|
+
queryKey,
|
|
294
|
+
queryFn,
|
|
295
|
+
enabled: editorId !== null && editorId !== void 0,
|
|
296
|
+
...queryOptions
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* @summary Read Editor
|
|
301
|
+
*/
|
|
302
|
+
function useReadEditor(editorId, params, options, queryClient) {
|
|
303
|
+
const queryOptions = getReadEditorQueryOptions(editorId, params, options);
|
|
304
|
+
const query = useQuery(queryOptions, queryClient);
|
|
305
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
306
|
+
}
|
|
307
|
+
const getReadLearningPathUrl = (learningPathId) => {
|
|
308
|
+
return `/biblio/learning-paths/${learningPathId}`;
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* A ``parcours`` and the content it walks through, in order.
|
|
312
|
+
*
|
|
313
|
+
* The other end of the ``parcours`` array on a pack, which named paths a client
|
|
314
|
+
* then had no way to open.
|
|
315
|
+
*
|
|
316
|
+
* Steps the caller is not entitled to are **dropped, not hidden behind a
|
|
317
|
+
* padlock**: the same category test every listing uses decides what appears, so
|
|
318
|
+
* a path cannot become a way to learn that an item exists. That does mean a
|
|
319
|
+
* path can come back with fewer steps than the library curated, and with gaps
|
|
320
|
+
* in ``stepOrder`` — which is why the order is a field rather than the array
|
|
321
|
+
* index.
|
|
322
|
+
*
|
|
323
|
+
* An inactive path is ``404`` rather than an empty one: it was withdrawn, and
|
|
324
|
+
* an empty sequence would read as "we have nothing for you" instead.
|
|
325
|
+
* @summary Read Learning Path
|
|
326
|
+
*/
|
|
327
|
+
const readLearningPath = async (learningPathId, options) => {
|
|
328
|
+
return request(getReadLearningPathUrl(learningPathId), {
|
|
329
|
+
...options,
|
|
330
|
+
method: "GET"
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
const getReadLearningPathQueryKey = (learningPathId) => {
|
|
334
|
+
return [`/biblio/learning-paths/${learningPathId}`];
|
|
335
|
+
};
|
|
336
|
+
const getReadLearningPathQueryOptions = (learningPathId, options) => {
|
|
337
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
338
|
+
const queryKey = queryOptions?.queryKey ?? getReadLearningPathQueryKey(learningPathId);
|
|
339
|
+
const queryFn = ({ signal }) => readLearningPath(learningPathId, {
|
|
340
|
+
signal,
|
|
341
|
+
...requestOptions
|
|
342
|
+
});
|
|
343
|
+
return {
|
|
344
|
+
queryKey,
|
|
345
|
+
queryFn,
|
|
346
|
+
enabled: learningPathId !== null && learningPathId !== void 0,
|
|
347
|
+
...queryOptions
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* @summary Read Learning Path
|
|
352
|
+
*/
|
|
353
|
+
function useReadLearningPath(learningPathId, options, queryClient) {
|
|
354
|
+
const queryOptions = getReadLearningPathQueryOptions(learningPathId, options);
|
|
355
|
+
const query = useQuery(queryOptions, queryClient);
|
|
356
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
357
|
+
}
|
|
358
|
+
const getReadPackUrl = (packId, params) => {
|
|
359
|
+
const normalizedParams = new URLSearchParams();
|
|
360
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
361
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
362
|
+
});
|
|
363
|
+
const stringifiedParams = normalizedParams.toString();
|
|
364
|
+
return stringifiedParams.length > 0 ? `/biblio/packs/${packId}?${stringifiedParams}` : `/biblio/packs/${packId}`;
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* A pack with its catalogs, latest additions and learning paths (E38).
|
|
368
|
+
*
|
|
369
|
+
* ``canonical`` is how the redirect dies. When a pack resolves to a single
|
|
370
|
+
* catalog the legacy answered ``302``; here the response is ``200`` and
|
|
371
|
+
* ``canonical`` names the resolved catalog, leaving the client to decide whether
|
|
372
|
+
* to follow it (§5.1).
|
|
373
|
+
*
|
|
374
|
+
* A pack the caller has no entitlement to is ``404``. The legacy dereferenced
|
|
375
|
+
* ``null`` and returned ``500`` (defect D12).
|
|
376
|
+
* @summary Read Pack
|
|
377
|
+
*/
|
|
378
|
+
const readPack = async (packId, params, options) => {
|
|
379
|
+
return request(getReadPackUrl(packId, params), {
|
|
380
|
+
...options,
|
|
381
|
+
method: "GET"
|
|
382
|
+
});
|
|
383
|
+
};
|
|
384
|
+
const getReadPackQueryKey = (packId, params) => {
|
|
385
|
+
return [`/biblio/packs/${packId}`, ...params ? [params] : []];
|
|
386
|
+
};
|
|
387
|
+
const getReadPackQueryOptions = (packId, params, options) => {
|
|
388
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
389
|
+
const queryKey = queryOptions?.queryKey ?? getReadPackQueryKey(packId, params);
|
|
390
|
+
const queryFn = ({ signal }) => readPack(packId, params, {
|
|
391
|
+
signal,
|
|
392
|
+
...requestOptions
|
|
393
|
+
});
|
|
394
|
+
return {
|
|
395
|
+
queryKey,
|
|
396
|
+
queryFn,
|
|
397
|
+
enabled: packId !== null && packId !== void 0,
|
|
398
|
+
...queryOptions
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
/**
|
|
402
|
+
* @summary Read Pack
|
|
403
|
+
*/
|
|
404
|
+
function useReadPack(packId, params, options, queryClient) {
|
|
405
|
+
const queryOptions = getReadPackQueryOptions(packId, params, options);
|
|
406
|
+
const query = useQuery(queryOptions, queryClient);
|
|
407
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
408
|
+
}
|
|
409
|
+
const getReadCatalogUrl = (packId, catalogId, params) => {
|
|
410
|
+
const normalizedParams = new URLSearchParams();
|
|
411
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
412
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
413
|
+
});
|
|
414
|
+
const stringifiedParams = normalizedParams.toString();
|
|
415
|
+
return stringifiedParams.length > 0 ? `/biblio/packs/${packId}/catalogs/${catalogId}?${stringifiedParams}` : `/biblio/packs/${packId}/catalogs/${catalogId}`;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* One catalog inside a pack (E39).
|
|
419
|
+
* @summary Read Catalog
|
|
420
|
+
*/
|
|
421
|
+
const readCatalog = async (packId, catalogId, params, options) => {
|
|
422
|
+
return request(getReadCatalogUrl(packId, catalogId, params), {
|
|
423
|
+
...options,
|
|
424
|
+
method: "GET"
|
|
425
|
+
});
|
|
426
|
+
};
|
|
427
|
+
const getReadCatalogQueryKey = (packId, catalogId, params) => {
|
|
428
|
+
return [`/biblio/packs/${packId}/catalogs/${catalogId}`, ...params ? [params] : []];
|
|
429
|
+
};
|
|
430
|
+
const getReadCatalogQueryOptions = (packId, catalogId, params, options) => {
|
|
431
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
432
|
+
const queryKey = queryOptions?.queryKey ?? getReadCatalogQueryKey(packId, catalogId, params);
|
|
433
|
+
const queryFn = ({ signal }) => readCatalog(packId, catalogId, params, {
|
|
434
|
+
signal,
|
|
435
|
+
...requestOptions
|
|
436
|
+
});
|
|
437
|
+
return {
|
|
438
|
+
queryKey,
|
|
439
|
+
queryFn,
|
|
440
|
+
enabled: packId !== null && packId !== void 0 && catalogId !== null && catalogId !== void 0,
|
|
441
|
+
...queryOptions
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
/**
|
|
445
|
+
* @summary Read Catalog
|
|
446
|
+
*/
|
|
447
|
+
function useReadCatalog(packId, catalogId, params, options, queryClient) {
|
|
448
|
+
const queryOptions = getReadCatalogQueryOptions(packId, catalogId, params, options);
|
|
449
|
+
const query = useQuery(queryOptions, queryClient);
|
|
450
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
451
|
+
}
|
|
452
|
+
const getReadCatalogThemeUrl = (packId, catalogId, themeId, params) => {
|
|
453
|
+
const normalizedParams = new URLSearchParams();
|
|
454
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
455
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
456
|
+
});
|
|
457
|
+
const stringifiedParams = normalizedParams.toString();
|
|
458
|
+
return stringifiedParams.length > 0 ? `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}?${stringifiedParams}` : `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}`;
|
|
459
|
+
};
|
|
460
|
+
/**
|
|
461
|
+
* The same catalog, narrowed to one theme (E40).
|
|
462
|
+
* @summary Read Catalog Theme
|
|
463
|
+
*/
|
|
464
|
+
const readCatalogTheme = async (packId, catalogId, themeId, params, options) => {
|
|
465
|
+
return request(getReadCatalogThemeUrl(packId, catalogId, themeId, params), {
|
|
466
|
+
...options,
|
|
467
|
+
method: "GET"
|
|
468
|
+
});
|
|
469
|
+
};
|
|
470
|
+
const getReadCatalogThemeQueryKey = (packId, catalogId, themeId, params) => {
|
|
471
|
+
return [`/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}`, ...params ? [params] : []];
|
|
472
|
+
};
|
|
473
|
+
const getReadCatalogThemeQueryOptions = (packId, catalogId, themeId, params, options) => {
|
|
474
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
475
|
+
const queryKey = queryOptions?.queryKey ?? getReadCatalogThemeQueryKey(packId, catalogId, themeId, params);
|
|
476
|
+
const queryFn = ({ signal }) => readCatalogTheme(packId, catalogId, themeId, params, {
|
|
477
|
+
signal,
|
|
478
|
+
...requestOptions
|
|
479
|
+
});
|
|
480
|
+
return {
|
|
481
|
+
queryKey,
|
|
482
|
+
queryFn,
|
|
483
|
+
enabled: packId !== null && packId !== void 0 && catalogId !== null && catalogId !== void 0 && themeId !== null && themeId !== void 0,
|
|
484
|
+
...queryOptions
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* @summary Read Catalog Theme
|
|
489
|
+
*/
|
|
490
|
+
function useReadCatalogTheme(packId, catalogId, themeId, params, options, queryClient) {
|
|
491
|
+
const queryOptions = getReadCatalogThemeQueryOptions(packId, catalogId, themeId, params, options);
|
|
492
|
+
const query = useQuery(queryOptions, queryClient);
|
|
493
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
494
|
+
}
|
|
495
|
+
//#endregion
|
|
496
|
+
export { getLikeContentMutationKey, getLikeContentMutationOptions, getLikeContentUrl, getListEditorsQueryKey, getListEditorsQueryOptions, getListEditorsUrl, getReadCatalogQueryKey, getReadCatalogQueryOptions, getReadCatalogThemeQueryKey, getReadCatalogThemeQueryOptions, getReadCatalogThemeUrl, getReadCatalogUrl, getReadContentQueryKey, getReadContentQueryOptions, getReadContentUrl, getReadEditorQueryKey, getReadEditorQueryOptions, getReadEditorUrl, getReadLearningPathQueryKey, getReadLearningPathQueryOptions, getReadLearningPathUrl, getReadPackQueryKey, getReadPackQueryOptions, getReadPackUrl, getReadRecommendationsQueryKey, getReadRecommendationsQueryOptions, getReadRecommendationsUrl, getUnlikeContentMutationKey, getUnlikeContentMutationOptions, getUnlikeContentUrl, likeContent, listEditors, readCatalog, readCatalogTheme, readContent, readEditor, readLearningPath, readPack, readRecommendations, unlikeContent, useLikeContent, useListEditors, useReadCatalog, useReadCatalogTheme, useReadContent, useReadEditor, useReadLearningPath, useReadPack, useReadRecommendations, useUnlikeContent };
|
|
497
|
+
|
|
498
|
+
//# sourceMappingURL=biblio-catalogue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biblio-catalogue.js","names":[],"sources":["../../src/react/biblio-catalogue/biblio-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.1.0\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n CatalogRead,\n ContentRead,\n EditorDetailRead,\n EditorListRead,\n HTTPExceptionResponse,\n LearningPathDetailRead,\n LikeRead,\n ListEditorsParams,\n PackDetailRead,\n ReadCatalogParams,\n ReadCatalogThemeParams,\n ReadEditorParams,\n ReadPackParams,\n ReadRecommendationsParams,\n RecommendationsRead,\n ValidationErrorResponse\n} from '../../models';\n\nimport { request } from '../../client';\nimport type { ErrorType } from '../../client';\n\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n\n\nconst withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {\n const result = { queryKey } as T & { queryKey: K };\n for (const key of Object.keys(query)) {\n // The explicit queryKey always wins, matching the previous\n // `{ ...query, queryKey }` spread where it was set last.\n if (key === 'queryKey') continue;\n Object.defineProperty(result, key, {\n enumerable: true,\n configurable: true,\n get: () => (query as Record<string, unknown>)[key],\n });\n }\n return result;\n};\n\nexport const getReadContentUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/contents/${contentId}`\n}\n\n/**\n * One content item, with this caller's own state on it (E34).\n *\n * ``liked`` and ``favorited`` are why this is not just the summary shape: they\n * are per-caller and therefore uncacheable across users, which is worth knowing\n * before anyone puts a shared cache in front of it.\n * @summary Read Content\n */\nexport const readContent = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<ContentRead> => {\n\n return request<ContentRead>(getReadContentUrl(contentId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadContentQueryKey = (contentId: number,) => {\n return [\n `/biblio/contents/${contentId}`\n ] as const;\n }\n\n\nexport const getReadContentQueryOptions = <TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadContentQueryKey(contentId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readContent>>> = ({ signal }) => readContent(contentId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: contentId !== null && contentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadContentQueryResult = NonNullable<Awaited<ReturnType<typeof readContent>>>\nexport type ReadContentQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readContent>>,\n TError,\n Awaited<ReturnType<typeof readContent>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readContent>>,\n TError,\n Awaited<ReturnType<typeof readContent>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Content\n */\n\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadContentQueryOptions(contentId,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getUnlikeContentUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/contents/${contentId}/like`\n}\n\n/**\n * Withdraw a like (E37). Idempotent — not liked is already the desired state.\n * @summary Unlike Content\n */\nexport const unlikeContent = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<LikeRead> => {\n\n return request<LikeRead>(getUnlikeContentUrl(contentId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getUnlikeContentMutationKey = () => ['unlikeContent'] as const;\n\nexport const getUnlikeContentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof unlikeContent>>, TError,UnlikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof unlikeContent>>, TError,UnlikeContentMutationVariables, TContext> => {\n\nconst mutationKey = getUnlikeContentMutationKey();\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n\n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof unlikeContent>>, UnlikeContentMutationVariables> = (props) => {\n const {contentId} = props ?? {};\n\n return unlikeContent(contentId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type UnlikeContentMutationResult = NonNullable<Awaited<ReturnType<typeof unlikeContent>>>\n\n export type UnlikeContentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type UnlikeContentMutationVariables = {contentId: number}\n\n /**\n * @summary Unlike Content\n */\nexport const useUnlikeContent = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof unlikeContent>>, TError,UnlikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof unlikeContent>>,\n TError,\n UnlikeContentMutationVariables,\n TContext\n > => {\n return useMutation(getUnlikeContentMutationOptions(options), queryClient);\n }\n export const getLikeContentUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/contents/${contentId}/like`\n}\n\n/**\n * Record a like (E36). Idempotent.\n *\n * This and :func:`unlike_content` replace one non-idempotent\n * ``POST /content/{id}/toggle-like``. A retried toggle reverses the user's\n * intent; a repeated ``PUT`` cannot (§4, consequence 3).\n *\n * ``like_count`` is recomputed from ``content_rating`` rather than incremented,\n * because an increment beside an upsert double-counts the second time the same\n * person likes the same thing.\n * @summary Like Content\n */\nexport const likeContent = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<LikeRead> => {\n\n return request<LikeRead>(getLikeContentUrl(contentId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\n\n\n\nexport const getLikeContentMutationKey = () => ['likeContent'] as const;\n\nexport const getLikeContentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof likeContent>>, TError,LikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof likeContent>>, TError,LikeContentMutationVariables, TContext> => {\n\nconst mutationKey = getLikeContentMutationKey();\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n\n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof likeContent>>, LikeContentMutationVariables> = (props) => {\n const {contentId} = props ?? {};\n\n return likeContent(contentId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LikeContentMutationResult = NonNullable<Awaited<ReturnType<typeof likeContent>>>\n\n export type LikeContentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LikeContentMutationVariables = {contentId: number}\n\n /**\n * @summary Like Content\n */\nexport const useLikeContent = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof likeContent>>, TError,LikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof likeContent>>,\n TError,\n LikeContentMutationVariables,\n TContext\n > => {\n return useMutation(getLikeContentMutationOptions(options), queryClient);\n }\n export const getReadRecommendationsUrl = (contentId: number,\n params?: ReadRecommendationsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/contents/${contentId}/recommendations?${stringifiedParams}` : `/biblio/contents/${contentId}/recommendations`\n}\n\n/**\n * Related content the caller can also reach (E35).\n *\n * Recommending something the account cannot open is worse than recommending\n * nothing, so the candidate set is entitlement-filtered before ranking rather\n * than after — filtering afterwards silently shortens the list instead.\n *\n * Keyword overlap for now, over the GIN index on ``content.keywords``.\n * @summary Read Recommendations\n */\nexport const readRecommendations = async (contentId: number,\n params?: ReadRecommendationsParams, options?: Parameters<typeof request>[1]): Promise<RecommendationsRead> => {\n\n return request<RecommendationsRead>(getReadRecommendationsUrl(contentId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadRecommendationsQueryKey = (contentId: number,\n params?: ReadRecommendationsParams,) => {\n return [\n `/biblio/contents/${contentId}/recommendations`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadRecommendationsQueryOptions = <TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadRecommendationsQueryKey(contentId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readRecommendations>>> = ({ signal }) => readRecommendations(contentId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: contentId !== null && contentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadRecommendationsQueryResult = NonNullable<Awaited<ReturnType<typeof readRecommendations>>>\nexport type ReadRecommendationsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params: undefined | ReadRecommendationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readRecommendations>>,\n TError,\n Awaited<ReturnType<typeof readRecommendations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readRecommendations>>,\n TError,\n Awaited<ReturnType<typeof readRecommendations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Recommendations\n */\n\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadRecommendationsQueryOptions(contentId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getListEditorsUrl = (params?: ListEditorsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/editors?${stringifiedParams}` : `/biblio/editors`\n}\n\n/**\n * Active editors (E44).\n *\n * ``order`` and ``sort`` are resolved against a whitelist and never\n * interpolated. The legacy passed both straight to the query layer (defect\n * D17); an unrecognised value is ``422`` rather than a surprise ordering.\n *\n * The collection is not wrapped in a single-element array. The legacy\n * ``GET /api/v1/editors/`` was (§2.1).\n *\n * Authenticated even though the answer does not depend on who is asking. Which\n * publishers a platform carries is commercial information, and an endpoint that\n * enumerates them for anyone is a competitor's first request. The sibling\n * ``/editors/{id}`` was already authenticated; this one was not, which is how\n * the inconsistency was found.\n * @summary List Editors\n */\nexport const listEditors = async (params?: ListEditorsParams, options?: Parameters<typeof request>[1]): Promise<EditorListRead> => {\n\n return request<EditorListRead>(getListEditorsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListEditorsQueryKey = (params?: ListEditorsParams,) => {\n return [\n `/biblio/editors`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListEditorsQueryOptions = <TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListEditorsQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listEditors>>> = ({ signal }) => listEditors(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListEditorsQueryResult = NonNullable<Awaited<ReturnType<typeof listEditors>>>\nexport type ListEditorsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListEditorsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listEditors>>,\n TError,\n Awaited<ReturnType<typeof listEditors>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listEditors>>,\n TError,\n Awaited<ReturnType<typeof listEditors>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Editors\n */\n\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListEditorsQueryOptions(params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadEditorUrl = (editorId: number,\n params?: ReadEditorParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/editors/${editorId}?${stringifiedParams}` : `/biblio/editors/${editorId}`\n}\n\n/**\n * One editor and the content of theirs this caller can reach (E45).\n *\n * One endpoint replaces two — a page and a JSON route that used ``pageSize``\n * instead of ``limit`` and wrapped the object in an array. Same entity, two\n * conventions, one codebase (§4, consequence 5).\n * @summary Read Editor\n */\nexport const readEditor = async (editorId: number,\n params?: ReadEditorParams, options?: Parameters<typeof request>[1]): Promise<EditorDetailRead> => {\n\n return request<EditorDetailRead>(getReadEditorUrl(editorId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadEditorQueryKey = (editorId: number,\n params?: ReadEditorParams,) => {\n return [\n `/biblio/editors/${editorId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadEditorQueryOptions = <TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadEditorQueryKey(editorId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readEditor>>> = ({ signal }) => readEditor(editorId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: editorId !== null && editorId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadEditorQueryResult = NonNullable<Awaited<ReturnType<typeof readEditor>>>\nexport type ReadEditorQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params: undefined | ReadEditorParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readEditor>>,\n TError,\n Awaited<ReturnType<typeof readEditor>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readEditor>>,\n TError,\n Awaited<ReturnType<typeof readEditor>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Editor\n */\n\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadEditorQueryOptions(editorId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadLearningPathUrl = (learningPathId: number,) => {\n\n\n\n\n return `/biblio/learning-paths/${learningPathId}`\n}\n\n/**\n * A ``parcours`` and the content it walks through, in order.\n *\n * The other end of the ``parcours`` array on a pack, which named paths a client\n * then had no way to open.\n *\n * Steps the caller is not entitled to are **dropped, not hidden behind a\n * padlock**: the same category test every listing uses decides what appears, so\n * a path cannot become a way to learn that an item exists. That does mean a\n * path can come back with fewer steps than the library curated, and with gaps\n * in ``stepOrder`` — which is why the order is a field rather than the array\n * index.\n *\n * An inactive path is ``404`` rather than an empty one: it was withdrawn, and\n * an empty sequence would read as \"we have nothing for you\" instead.\n * @summary Read Learning Path\n */\nexport const readLearningPath = async (learningPathId: number, options?: Parameters<typeof request>[1]): Promise<LearningPathDetailRead> => {\n\n return request<LearningPathDetailRead>(getReadLearningPathUrl(learningPathId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadLearningPathQueryKey = (learningPathId: number,) => {\n return [\n `/biblio/learning-paths/${learningPathId}`\n ] as const;\n }\n\n\nexport const getReadLearningPathQueryOptions = <TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadLearningPathQueryKey(learningPathId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readLearningPath>>> = ({ signal }) => readLearningPath(learningPathId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: learningPathId !== null && learningPathId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadLearningPathQueryResult = NonNullable<Awaited<ReturnType<typeof readLearningPath>>>\nexport type ReadLearningPathQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLearningPath>>,\n TError,\n Awaited<ReturnType<typeof readLearningPath>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLearningPath>>,\n TError,\n Awaited<ReturnType<typeof readLearningPath>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Learning Path\n */\n\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadLearningPathQueryOptions(learningPathId,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadPackUrl = (packId: number,\n params?: ReadPackParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/packs/${packId}?${stringifiedParams}` : `/biblio/packs/${packId}`\n}\n\n/**\n * A pack with its catalogs, latest additions and learning paths (E38).\n *\n * ``canonical`` is how the redirect dies. When a pack resolves to a single\n * catalog the legacy answered ``302``; here the response is ``200`` and\n * ``canonical`` names the resolved catalog, leaving the client to decide whether\n * to follow it (§5.1).\n *\n * A pack the caller has no entitlement to is ``404``. The legacy dereferenced\n * ``null`` and returned ``500`` (defect D12).\n * @summary Read Pack\n */\nexport const readPack = async (packId: number,\n params?: ReadPackParams, options?: Parameters<typeof request>[1]): Promise<PackDetailRead> => {\n\n return request<PackDetailRead>(getReadPackUrl(packId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadPackQueryKey = (packId: number,\n params?: ReadPackParams,) => {\n return [\n `/biblio/packs/${packId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadPackQueryOptions = <TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadPackQueryKey(packId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readPack>>> = ({ signal }) => readPack(packId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: packId !== null && packId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadPackQueryResult = NonNullable<Awaited<ReturnType<typeof readPack>>>\nexport type ReadPackQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params: undefined | ReadPackParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPack>>,\n TError,\n Awaited<ReturnType<typeof readPack>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPack>>,\n TError,\n Awaited<ReturnType<typeof readPack>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Pack\n */\n\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadPackQueryOptions(packId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadCatalogUrl = (packId: number,\n catalogId: number,\n params?: ReadCatalogParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/packs/${packId}/catalogs/${catalogId}?${stringifiedParams}` : `/biblio/packs/${packId}/catalogs/${catalogId}`\n}\n\n/**\n * One catalog inside a pack (E39).\n * @summary Read Catalog\n */\nexport const readCatalog = async (packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: Parameters<typeof request>[1]): Promise<CatalogRead> => {\n\n return request<CatalogRead>(getReadCatalogUrl(packId,catalogId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadCatalogQueryKey = (packId: number,\n catalogId: number,\n params?: ReadCatalogParams,) => {\n return [\n `/biblio/packs/${packId}/catalogs/${catalogId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadCatalogQueryOptions = <TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadCatalogQueryKey(packId,catalogId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readCatalog>>> = ({ signal }) => readCatalog(packId,catalogId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: packId !== null && packId !== undefined && catalogId !== null && catalogId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadCatalogQueryResult = NonNullable<Awaited<ReturnType<typeof readCatalog>>>\nexport type ReadCatalogQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params: undefined | ReadCatalogParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalog>>,\n TError,\n Awaited<ReturnType<typeof readCatalog>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalog>>,\n TError,\n Awaited<ReturnType<typeof readCatalog>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Catalog\n */\n\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadCatalogQueryOptions(packId,catalogId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadCatalogThemeUrl = (packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}?${stringifiedParams}` : `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}`\n}\n\n/**\n * The same catalog, narrowed to one theme (E40).\n * @summary Read Catalog Theme\n */\nexport const readCatalogTheme = async (packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: Parameters<typeof request>[1]): Promise<CatalogRead> => {\n\n return request<CatalogRead>(getReadCatalogThemeUrl(packId,catalogId,themeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadCatalogThemeQueryKey = (packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams,) => {\n return [\n `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadCatalogThemeQueryOptions = <TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadCatalogThemeQueryKey(packId,catalogId,themeId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readCatalogTheme>>> = ({ signal }) => readCatalogTheme(packId,catalogId,themeId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: packId !== null && packId !== undefined && catalogId !== null && catalogId !== undefined && themeId !== null && themeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadCatalogThemeQueryResult = NonNullable<Awaited<ReturnType<typeof readCatalogTheme>>>\nexport type ReadCatalogThemeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params: undefined | ReadCatalogThemeParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalogTheme>>,\n TError,\n Awaited<ReturnType<typeof readCatalogTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalogTheme>>,\n TError,\n Awaited<ReturnType<typeof readCatalogTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Catalog Theme\n */\n\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadCatalogThemeQueryOptions(packId,catalogId,themeId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\n"],"mappings":";;;;;;;;;;;AAqDA,MAAM,gBAAqC,OAAU,aAAqC;CACxF,MAAM,SAAS,EAAE,SAAS;CAC1B,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG;EAGpC,IAAI,QAAQ,YAAY;EACxB,OAAO,eAAe,QAAQ,KAAK;GACjC,YAAY;GACZ,cAAc;GACd,WAAY,MAAkC;EAChD,CAAC;CACH;CACA,OAAO;AACT;AAEA,MAAa,qBAAqB,cAAuB;CAKvD,OAAO,oBAAoB;AAC7B;;;;;;;;;AAUA,MAAa,cAAc,OAAO,WAAmB,YAAkE;CAErH,OAAO,QAAqB,kBAAkB,SAAS,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,0BAA0B,cAAuB;CAC1D,OAAO,CACP,oBAAoB,WACpB;AACA;AAGJ,MAAa,8BAAoJ,WAAmB,YAC/K;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,uBAAuB,SAAS;CAI1E,MAAM,WAAmE,EAAE,aAAa,YAAY,WAAW;EAAE;EAAQ,GAAG;CAAe,CAAC;CAM7I,OAAQ;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