@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.
- package/README.md +107 -0
- package/dist/api/account.d.ts +29 -28
- package/dist/api/account.js +43 -28
- package/dist/api/account.js.map +1 -1
- package/dist/api/admin-catalogue.d.ts +1 -1
- package/dist/api/admin-catalogue.js.map +1 -1
- package/dist/api/admin-consumption.d.ts +1 -1
- package/dist/api/admin-consumption.js.map +1 -1
- package/dist/api/admin-desk.d.ts +23 -1
- package/dist/api/admin-desk.js +59 -1
- package/dist/api/admin-desk.js.map +1 -1
- package/dist/api/admin-licenses.d.ts +1 -1
- package/dist/api/admin-licenses.js.map +1 -1
- package/dist/api/admin-patrons.d.ts +1 -1
- package/dist/api/admin-patrons.js.map +1 -1
- package/dist/api/admin-reviews.d.ts +1 -1
- package/dist/api/admin-reviews.js.map +1 -1
- package/dist/api/admin-roles.d.ts +1 -1
- package/dist/api/admin-roles.js.map +1 -1
- package/dist/api/admin-support.d.ts +1 -1
- package/dist/api/admin-support.js.map +1 -1
- package/dist/api/admin-tenants.d.ts +1 -1
- package/dist/api/admin-tenants.js.map +1 -1
- package/dist/api/admin-tutoring.d.ts +1 -1
- package/dist/api/admin-tutoring.js.map +1 -1
- package/dist/api/auth.d.ts +11 -1
- package/dist/api/auth.js +31 -1
- package/dist/api/auth.js.map +1 -1
- package/dist/api/biblio-catalogue.d.ts +11 -1
- package/dist/api/biblio-catalogue.js +23 -1
- package/dist/api/biblio-catalogue.js.map +1 -1
- package/dist/api/biblio-home.d.ts +6 -1
- package/dist/api/biblio-home.js +5 -0
- package/dist/api/biblio-home.js.map +1 -1
- package/dist/api/biblio-library.d.ts +9 -6
- package/dist/api/biblio-library.js +22 -9
- package/dist/api/biblio-library.js.map +1 -1
- package/dist/api/biblio-nextory.d.ts +1 -1
- package/dist/api/biblio-nextory.js.map +1 -1
- package/dist/api/biblio-press.d.ts +34 -25
- package/dist/api/biblio-press.js +73 -32
- package/dist/api/biblio-press.js.map +1 -1
- package/dist/api/biblio-search.d.ts +1 -1
- package/dist/api/biblio-search.js.map +1 -1
- package/dist/api/biblio-telemetry.d.ts +1 -1
- package/dist/api/biblio-telemetry.js.map +1 -1
- package/dist/api/consumption.d.ts +1 -1
- package/dist/api/consumption.js.map +1 -1
- package/dist/api/cvs-app.d.ts +1 -1
- package/dist/api/cvs-app.js.map +1 -1
- package/dist/api/cvs-documents.d.ts +1 -1
- package/dist/api/cvs-documents.js.map +1 -1
- package/dist/api/cvs-favorites.d.ts +1 -1
- package/dist/api/cvs-favorites.js.map +1 -1
- package/dist/api/cvs-ils.d.ts +1 -1
- package/dist/api/cvs-ils.js.map +1 -1
- package/dist/api/cvs-loans.d.ts +1 -1
- package/dist/api/cvs-loans.js.map +1 -1
- package/dist/api/cvs-payments.d.ts +1 -1
- package/dist/api/cvs-payments.js.map +1 -1
- package/dist/api/cvs-streaming.d.ts +1 -1
- package/dist/api/cvs-streaming.js.map +1 -1
- package/dist/api/index.d.ts +9 -9
- package/dist/api/index.js +9 -9
- package/dist/api/partner-catalogue.d.ts +20 -1
- package/dist/api/partner-catalogue.js +44 -1
- package/dist/api/partner-catalogue.js.map +1 -1
- package/dist/api/partner-reader.d.ts +34 -6
- package/dist/api/partner-reader.js +48 -6
- package/dist/api/partner-reader.js.map +1 -1
- package/dist/api/profiles.d.ts +86 -33
- package/dist/api/profiles.js +302 -33
- package/dist/api/profiles.js.map +1 -1
- package/dist/api/search.d.ts +1 -1
- package/dist/api/search.js.map +1 -1
- package/dist/api/tutoring-catalogue.d.ts +1 -1
- package/dist/api/tutoring-catalogue.js.map +1 -1
- package/dist/api/tutoring-chat.d.ts +1 -1
- package/dist/api/tutoring-chat.js.map +1 -1
- package/dist/api/tutoring-dispatch.d.ts +1 -1
- package/dist/api/tutoring-dispatch.js.map +1 -1
- package/dist/api/tutoring-practitioner.d.ts +1 -1
- package/dist/api/tutoring-practitioner.js.map +1 -1
- package/dist/api/tutoring-requests.d.ts +1 -1
- package/dist/api/tutoring-requests.js.map +1 -1
- package/dist/chunks/client2.d.ts +1 -1
- package/dist/chunks/connection.d.ts +1 -1
- package/dist/chunks/index.d.ts +1220 -372
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +2 -2
- package/dist/models.js +91 -1
- package/dist/models.js.map +1 -1
- package/dist/react/account.d.ts +83 -28
- package/dist/react/account.js +92 -29
- package/dist/react/account.js.map +1 -1
- package/dist/react/admin-catalogue.d.ts +1 -1
- package/dist/react/admin-catalogue.js +1 -1
- package/dist/react/admin-catalogue.js.map +1 -1
- package/dist/react/admin-consumption.d.ts +1 -1
- package/dist/react/admin-consumption.js +1 -1
- package/dist/react/admin-consumption.js.map +1 -1
- package/dist/react/admin-desk.d.ts +104 -1
- package/dist/react/admin-desk.js +132 -2
- package/dist/react/admin-desk.js.map +1 -1
- package/dist/react/admin-licenses.d.ts +1 -1
- package/dist/react/admin-licenses.js +1 -1
- package/dist/react/admin-licenses.js.map +1 -1
- package/dist/react/admin-patrons.d.ts +1 -1
- package/dist/react/admin-patrons.js +1 -1
- package/dist/react/admin-patrons.js.map +1 -1
- package/dist/react/admin-reviews.d.ts +1 -1
- package/dist/react/admin-reviews.js +1 -1
- package/dist/react/admin-reviews.js.map +1 -1
- package/dist/react/admin-roles.d.ts +1 -1
- package/dist/react/admin-roles.js +1 -1
- package/dist/react/admin-roles.js.map +1 -1
- package/dist/react/admin-support.d.ts +1 -1
- package/dist/react/admin-support.js +1 -1
- package/dist/react/admin-support.js.map +1 -1
- package/dist/react/admin-tenants.d.ts +1 -1
- package/dist/react/admin-tenants.js +1 -1
- package/dist/react/admin-tenants.js.map +1 -1
- package/dist/react/admin-tutoring.d.ts +1 -1
- package/dist/react/admin-tutoring.js +1 -1
- package/dist/react/admin-tutoring.js.map +1 -1
- package/dist/react/auth.d.ts +29 -1
- package/dist/react/auth.js +60 -2
- package/dist/react/auth.js.map +1 -1
- package/dist/react/biblio-catalogue.d.ts +38 -1
- package/dist/react/biblio-catalogue.js +48 -2
- package/dist/react/biblio-catalogue.js.map +1 -1
- package/dist/react/biblio-home.d.ts +6 -1
- package/dist/react/biblio-home.js +6 -1
- package/dist/react/biblio-home.js.map +1 -1
- package/dist/react/biblio-library.d.ts +15 -11
- package/dist/react/biblio-library.js +32 -19
- package/dist/react/biblio-library.js.map +1 -1
- package/dist/react/biblio-nextory.d.ts +1 -1
- package/dist/react/biblio-nextory.js +1 -1
- package/dist/react/biblio-nextory.js.map +1 -1
- package/dist/react/biblio-press.d.ts +119 -64
- package/dist/react/biblio-press.js +153 -59
- package/dist/react/biblio-press.js.map +1 -1
- package/dist/react/biblio-search.d.ts +1 -1
- package/dist/react/biblio-search.js +1 -1
- package/dist/react/biblio-search.js.map +1 -1
- package/dist/react/biblio-telemetry.d.ts +1 -1
- package/dist/react/biblio-telemetry.js +1 -1
- package/dist/react/biblio-telemetry.js.map +1 -1
- package/dist/react/chat.d.ts +1 -1
- package/dist/react/consumption.d.ts +1 -1
- package/dist/react/consumption.js +1 -1
- package/dist/react/consumption.js.map +1 -1
- package/dist/react/cvs-app.d.ts +1 -1
- package/dist/react/cvs-app.js +1 -1
- package/dist/react/cvs-app.js.map +1 -1
- package/dist/react/cvs-documents.d.ts +1 -1
- package/dist/react/cvs-documents.js +1 -1
- package/dist/react/cvs-documents.js.map +1 -1
- package/dist/react/cvs-favorites.d.ts +1 -1
- package/dist/react/cvs-favorites.js +1 -1
- package/dist/react/cvs-favorites.js.map +1 -1
- package/dist/react/cvs-ils.d.ts +1 -1
- package/dist/react/cvs-ils.js +1 -1
- package/dist/react/cvs-ils.js.map +1 -1
- package/dist/react/cvs-loans.d.ts +1 -1
- package/dist/react/cvs-loans.js +1 -1
- package/dist/react/cvs-loans.js.map +1 -1
- package/dist/react/cvs-payments.d.ts +1 -1
- package/dist/react/cvs-payments.js +1 -1
- package/dist/react/cvs-payments.js.map +1 -1
- package/dist/react/cvs-streaming.d.ts +1 -1
- package/dist/react/cvs-streaming.js +1 -1
- package/dist/react/cvs-streaming.js.map +1 -1
- package/dist/react/index.d.ts +9 -9
- package/dist/react/index.js +9 -9
- package/dist/react/partner-catalogue.d.ts +74 -1
- package/dist/react/partner-catalogue.js +95 -2
- package/dist/react/partner-catalogue.js.map +1 -1
- package/dist/react/partner-reader.d.ts +79 -6
- package/dist/react/partner-reader.js +102 -7
- package/dist/react/partner-reader.js.map +1 -1
- package/dist/react/profiles.d.ts +406 -33
- package/dist/react/profiles.js +760 -59
- package/dist/react/profiles.js.map +1 -1
- package/dist/react/search.d.ts +1 -1
- package/dist/react/search.js +1 -1
- package/dist/react/search.js.map +1 -1
- package/dist/react/tutoring-catalogue.d.ts +1 -1
- package/dist/react/tutoring-catalogue.js +1 -1
- package/dist/react/tutoring-catalogue.js.map +1 -1
- package/dist/react/tutoring-chat.d.ts +1 -1
- package/dist/react/tutoring-chat.js +1 -1
- package/dist/react/tutoring-chat.js.map +1 -1
- package/dist/react/tutoring-dispatch.d.ts +1 -1
- package/dist/react/tutoring-dispatch.js +1 -1
- package/dist/react/tutoring-dispatch.js.map +1 -1
- package/dist/react/tutoring-practitioner.d.ts +1 -1
- package/dist/react/tutoring-practitioner.js +1 -1
- package/dist/react/tutoring-practitioner.js.map +1 -1
- package/dist/react/tutoring-requests.d.ts +1 -1
- package/dist/react/tutoring-requests.js +1 -1
- package/dist/react/tutoring-requests.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { r as request } from "../chunks/client.js";
|
|
3
|
-
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
4
4
|
//#region src/react/biblio-press/biblio-press.ts
|
|
5
5
|
/**
|
|
6
6
|
* Generated by orval 🍺
|
|
7
7
|
* Do not edit manually.
|
|
8
8
|
* Mozaik backend
|
|
9
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.
|
|
10
|
+
* OpenAPI spec version: 0.9.1
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|
|
@@ -21,35 +21,34 @@ const withQueryKey = (query, queryKey) => {
|
|
|
21
21
|
}
|
|
22
22
|
return result;
|
|
23
23
|
};
|
|
24
|
-
const
|
|
24
|
+
const getReadPressFeedUrl = (params) => {
|
|
25
25
|
const normalizedParams = new URLSearchParams();
|
|
26
26
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
27
27
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
28
28
|
});
|
|
29
29
|
const stringifiedParams = normalizedParams.toString();
|
|
30
|
-
return stringifiedParams.length > 0 ? `/biblio/press-
|
|
30
|
+
return stringifiedParams.length > 0 ? `/biblio/press-feed?${stringifiedParams}` : `/biblio/press-feed`;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Saved accessible publications first, then discovery by theme.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @summary List Press Articles
|
|
35
|
+
* Each section carries its first page, pagination metadata and a titlesUrl
|
|
36
|
+
* using the same filters. Unavailable titles never reappear through favourites.
|
|
37
|
+
* @summary Read Press Feed
|
|
39
38
|
*/
|
|
40
|
-
const
|
|
41
|
-
return request(
|
|
39
|
+
const readPressFeed = async (params, options) => {
|
|
40
|
+
return request(getReadPressFeedUrl(params), {
|
|
42
41
|
...options,
|
|
43
42
|
method: "GET"
|
|
44
43
|
});
|
|
45
44
|
};
|
|
46
|
-
const
|
|
47
|
-
return [`/biblio/press-
|
|
45
|
+
const getReadPressFeedQueryKey = (params) => {
|
|
46
|
+
return [`/biblio/press-feed`, ...params ? [params] : []];
|
|
48
47
|
};
|
|
49
|
-
const
|
|
48
|
+
const getReadPressFeedQueryOptions = (params, options) => {
|
|
50
49
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
51
|
-
const queryKey = queryOptions?.queryKey ??
|
|
52
|
-
const queryFn = ({ signal }) =>
|
|
50
|
+
const queryKey = queryOptions?.queryKey ?? getReadPressFeedQueryKey(params);
|
|
51
|
+
const queryFn = ({ signal }) => readPressFeed(params, {
|
|
53
52
|
signal,
|
|
54
53
|
...requestOptions
|
|
55
54
|
});
|
|
@@ -60,104 +59,199 @@ const getListPressArticlesQueryOptions = (params, options) => {
|
|
|
60
59
|
};
|
|
61
60
|
};
|
|
62
61
|
/**
|
|
63
|
-
* @summary
|
|
62
|
+
* @summary Read Press Feed
|
|
64
63
|
*/
|
|
65
|
-
function
|
|
66
|
-
const queryOptions =
|
|
64
|
+
function useReadPressFeed(params, options, queryClient) {
|
|
65
|
+
const queryOptions = getReadPressFeedQueryOptions(params, options);
|
|
67
66
|
const query = useQuery(queryOptions, queryClient);
|
|
68
67
|
return withQueryKey(query, queryOptions.queryKey);
|
|
69
68
|
}
|
|
70
|
-
const
|
|
71
|
-
|
|
69
|
+
const getListPressTitlesUrl = (params) => {
|
|
70
|
+
const normalizedParams = new URLSearchParams();
|
|
71
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
72
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
73
|
+
});
|
|
74
|
+
const stringifiedParams = normalizedParams.toString();
|
|
75
|
+
return stringifiedParams.length > 0 ? `/biblio/press-titles?${stringifiedParams}` : `/biblio/press-titles`;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* One accessible catalogue entry per publication, with profile selection.
|
|
79
|
+
*
|
|
80
|
+
* contentId is the key for favourites, details and /issues. publicationId is
|
|
81
|
+
* the separate provider identifier. Search is a case-insensitive literal title
|
|
82
|
+
* substring. Ordering is alphabetical with a contentId tie-break.
|
|
83
|
+
* @summary List Press Titles
|
|
84
|
+
*/
|
|
85
|
+
const listPressTitles = async (params, options) => {
|
|
86
|
+
return request(getListPressTitlesUrl(params), {
|
|
87
|
+
...options,
|
|
88
|
+
method: "GET"
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
const getListPressTitlesQueryKey = (params) => {
|
|
92
|
+
return [`/biblio/press-titles`, ...params ? [params] : []];
|
|
93
|
+
};
|
|
94
|
+
const getListPressTitlesQueryOptions = (params, options) => {
|
|
95
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
96
|
+
const queryKey = queryOptions?.queryKey ?? getListPressTitlesQueryKey(params);
|
|
97
|
+
const queryFn = ({ signal }) => listPressTitles(params, {
|
|
98
|
+
signal,
|
|
99
|
+
...requestOptions
|
|
100
|
+
});
|
|
101
|
+
return {
|
|
102
|
+
queryKey,
|
|
103
|
+
queryFn,
|
|
104
|
+
...queryOptions
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* @summary List Press Titles
|
|
109
|
+
*/
|
|
110
|
+
function useListPressTitles(params, options, queryClient) {
|
|
111
|
+
const queryOptions = getListPressTitlesQueryOptions(params, options);
|
|
112
|
+
const query = useQuery(queryOptions, queryClient);
|
|
113
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
114
|
+
}
|
|
115
|
+
const getReadPressTitleUrl = (contentId) => {
|
|
116
|
+
return `/biblio/press-titles/${contentId}`;
|
|
72
117
|
};
|
|
73
118
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @summary Read Press
|
|
119
|
+
* Publication metadata; an unavailable or unknown title returns 404.
|
|
120
|
+
* @summary Read Press Title
|
|
76
121
|
*/
|
|
77
|
-
const
|
|
78
|
-
return request(
|
|
122
|
+
const readPressTitle = async (contentId, options) => {
|
|
123
|
+
return request(getReadPressTitleUrl(contentId), {
|
|
79
124
|
...options,
|
|
80
125
|
method: "GET"
|
|
81
126
|
});
|
|
82
127
|
};
|
|
83
|
-
const
|
|
84
|
-
return [`/biblio/press-
|
|
128
|
+
const getReadPressTitleQueryKey = (contentId) => {
|
|
129
|
+
return [`/biblio/press-titles/${contentId}`];
|
|
85
130
|
};
|
|
86
|
-
const
|
|
131
|
+
const getReadPressTitleQueryOptions = (contentId, options) => {
|
|
87
132
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
88
|
-
const queryKey = queryOptions?.queryKey ??
|
|
89
|
-
const queryFn = ({ signal }) =>
|
|
133
|
+
const queryKey = queryOptions?.queryKey ?? getReadPressTitleQueryKey(contentId);
|
|
134
|
+
const queryFn = ({ signal }) => readPressTitle(contentId, {
|
|
90
135
|
signal,
|
|
91
136
|
...requestOptions
|
|
92
137
|
});
|
|
93
138
|
return {
|
|
94
139
|
queryKey,
|
|
95
140
|
queryFn,
|
|
96
|
-
enabled:
|
|
141
|
+
enabled: contentId !== null && contentId !== void 0,
|
|
97
142
|
...queryOptions
|
|
98
143
|
};
|
|
99
144
|
};
|
|
100
145
|
/**
|
|
101
|
-
* @summary Read Press
|
|
146
|
+
* @summary Read Press Title
|
|
102
147
|
*/
|
|
103
|
-
function
|
|
104
|
-
const queryOptions =
|
|
148
|
+
function useReadPressTitle(contentId, options, queryClient) {
|
|
149
|
+
const queryOptions = getReadPressTitleQueryOptions(contentId, options);
|
|
105
150
|
const query = useQuery(queryOptions, queryClient);
|
|
106
151
|
return withQueryKey(query, queryOptions.queryKey);
|
|
107
152
|
}
|
|
108
|
-
const
|
|
153
|
+
const getReadIssuesUrl = (contentId, params) => {
|
|
109
154
|
const normalizedParams = new URLSearchParams();
|
|
110
155
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
111
156
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
112
157
|
});
|
|
113
158
|
const stringifiedParams = normalizedParams.toString();
|
|
114
|
-
return stringifiedParams.length > 0 ? `/biblio/press-
|
|
159
|
+
return stringifiedParams.length > 0 ? `/biblio/press-titles/${contentId}/issues?${stringifiedParams}` : `/biblio/press-titles/${contentId}/issues`;
|
|
115
160
|
};
|
|
116
161
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* New as an endpoint; the legacy composed it into two pages and never exposed
|
|
120
|
-
* it. There is no curation table, so a section is a theme and its members are
|
|
121
|
-
* that theme's most recent entitled articles — which is what the rendered page
|
|
122
|
-
* amounted to. When a real curation model appears this is the one place that has
|
|
123
|
-
* to change.
|
|
124
|
-
*
|
|
125
|
-
* A theme with nothing the caller may read is omitted rather than returned
|
|
126
|
-
* empty: an empty section is a hole in a page, and the client cannot tell
|
|
127
|
-
* "nothing new" from "not licensed".
|
|
128
|
-
* @summary Read Press Review
|
|
162
|
+
* Entitled publication editions and covers. Never creates reader access.
|
|
163
|
+
* @summary Read Issues
|
|
129
164
|
*/
|
|
130
|
-
const
|
|
131
|
-
return request(
|
|
165
|
+
const readIssues = async (contentId, params, options) => {
|
|
166
|
+
return request(getReadIssuesUrl(contentId, params), {
|
|
132
167
|
...options,
|
|
133
168
|
method: "GET"
|
|
134
169
|
});
|
|
135
170
|
};
|
|
136
|
-
const
|
|
137
|
-
return [`/biblio/press-
|
|
171
|
+
const getReadIssuesQueryKey = (contentId, params) => {
|
|
172
|
+
return [`/biblio/press-titles/${contentId}/issues`, ...params ? [params] : []];
|
|
138
173
|
};
|
|
139
|
-
const
|
|
174
|
+
const getReadIssuesQueryOptions = (contentId, params, options) => {
|
|
140
175
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
141
|
-
const queryKey = queryOptions?.queryKey ??
|
|
142
|
-
const queryFn = ({ signal }) =>
|
|
176
|
+
const queryKey = queryOptions?.queryKey ?? getReadIssuesQueryKey(contentId, params);
|
|
177
|
+
const queryFn = ({ signal }) => readIssues(contentId, params, {
|
|
143
178
|
signal,
|
|
144
179
|
...requestOptions
|
|
145
180
|
});
|
|
146
181
|
return {
|
|
147
182
|
queryKey,
|
|
148
183
|
queryFn,
|
|
184
|
+
enabled: contentId !== null && contentId !== void 0,
|
|
149
185
|
...queryOptions
|
|
150
186
|
};
|
|
151
187
|
};
|
|
152
188
|
/**
|
|
153
|
-
* @summary Read
|
|
189
|
+
* @summary Read Issues
|
|
154
190
|
*/
|
|
155
|
-
function
|
|
156
|
-
const queryOptions =
|
|
191
|
+
function useReadIssues(contentId, params, options, queryClient) {
|
|
192
|
+
const queryOptions = getReadIssuesQueryOptions(contentId, params, options);
|
|
157
193
|
const query = useQuery(queryOptions, queryClient);
|
|
158
194
|
return withQueryKey(query, queryOptions.queryKey);
|
|
159
195
|
}
|
|
196
|
+
const getOpenReaderUrl = (contentId) => {
|
|
197
|
+
return `/biblio/press-titles/${contentId}/reader-access`;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Open a PressReader edition under this profile's current content grant.
|
|
201
|
+
*
|
|
202
|
+
* URL and token authorize gifted access, not the deployment catalogue API.
|
|
203
|
+
* Keep lease.eventId alive with PUT /consumption/{id}; close with DELETE.
|
|
204
|
+
* The date selects an edition; a missing edition is reported by PressReader.
|
|
205
|
+
* @summary Open Reader
|
|
206
|
+
*/
|
|
207
|
+
const openReader = async (contentId, pressReaderAccessWrite, options) => {
|
|
208
|
+
const getHeaders = (h) => {
|
|
209
|
+
if (!h) return {};
|
|
210
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
211
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
212
|
+
const headers = {};
|
|
213
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
214
|
+
return headers;
|
|
215
|
+
};
|
|
216
|
+
return request(getOpenReaderUrl(contentId), {
|
|
217
|
+
...options,
|
|
218
|
+
method: "POST",
|
|
219
|
+
headers: {
|
|
220
|
+
"Content-Type": "application/json",
|
|
221
|
+
...getHeaders(options?.headers)
|
|
222
|
+
},
|
|
223
|
+
body: JSON.stringify(pressReaderAccessWrite)
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
const getOpenReaderMutationKey = () => ["openReader"];
|
|
227
|
+
const getOpenReaderMutationOptions = (options) => {
|
|
228
|
+
const mutationKey = getOpenReaderMutationKey();
|
|
229
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
230
|
+
...options,
|
|
231
|
+
mutation: {
|
|
232
|
+
...options.mutation,
|
|
233
|
+
mutationKey
|
|
234
|
+
}
|
|
235
|
+
} : {
|
|
236
|
+
mutation: { mutationKey },
|
|
237
|
+
request: void 0
|
|
238
|
+
};
|
|
239
|
+
const mutationFn = (props) => {
|
|
240
|
+
const { contentId, data } = props ?? {};
|
|
241
|
+
return openReader(contentId, data, requestOptions);
|
|
242
|
+
};
|
|
243
|
+
return {
|
|
244
|
+
mutationFn,
|
|
245
|
+
...mutationOptions
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* @summary Open Reader
|
|
250
|
+
*/
|
|
251
|
+
const useOpenReader = (options, queryClient) => {
|
|
252
|
+
return useMutation(getOpenReaderMutationOptions(options), queryClient);
|
|
253
|
+
};
|
|
160
254
|
//#endregion
|
|
161
|
-
export {
|
|
255
|
+
export { getListPressTitlesQueryKey, getListPressTitlesQueryOptions, getListPressTitlesUrl, getOpenReaderMutationKey, getOpenReaderMutationOptions, getOpenReaderUrl, getReadIssuesQueryKey, getReadIssuesQueryOptions, getReadIssuesUrl, getReadPressFeedQueryKey, getReadPressFeedQueryOptions, getReadPressFeedUrl, getReadPressTitleQueryKey, getReadPressTitleQueryOptions, getReadPressTitleUrl, listPressTitles, openReader, readIssues, readPressFeed, readPressTitle, useListPressTitles, useOpenReader, useReadIssues, useReadPressFeed, useReadPressTitle };
|
|
162
256
|
|
|
163
257
|
//# sourceMappingURL=biblio-press.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biblio-press.js","names":[],"sources":["../../src/react/biblio-press/biblio-press.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 {\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n ListPressArticlesParams,\n PressArticleListRead,\n PressArticleRead,\n PressReviewRead,\n ReadPressReviewParams,\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 getListPressArticlesUrl = (params?: ListPressArticlesParams,) => {\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/press-articles?${stringifiedParams}` : `/biblio/press-articles`\n}\n\n/**\n * Press articles, filtered (E41).\n *\n * ``theme_id`` unifies the legacy's two separate parameters ``themeId`` and\n * ``themePk``, which named the same thing. ``order`` is resolved against a\n * whitelist; anything else is ``422`` rather than a surprise ordering.\n * @summary List Press Articles\n */\nexport const listPressArticles = async (params?: ListPressArticlesParams, options?: Parameters<typeof request>[1]): Promise<PressArticleListRead> => {\n\n return request<PressArticleListRead>(getListPressArticlesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListPressArticlesQueryKey = (params?: ListPressArticlesParams,) => {\n return [\n `/biblio/press-articles`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListPressArticlesQueryOptions = <TData = Awaited<ReturnType<typeof listPressArticles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListPressArticlesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListPressArticlesQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listPressArticles>>> = ({ signal }) => listPressArticles(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListPressArticlesQueryResult = NonNullable<Awaited<ReturnType<typeof listPressArticles>>>\nexport type ListPressArticlesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListPressArticles<TData = Awaited<ReturnType<typeof listPressArticles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListPressArticlesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listPressArticles>>,\n TError,\n Awaited<ReturnType<typeof listPressArticles>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListPressArticles<TData = Awaited<ReturnType<typeof listPressArticles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListPressArticlesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listPressArticles>>,\n TError,\n Awaited<ReturnType<typeof listPressArticles>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListPressArticles<TData = Awaited<ReturnType<typeof listPressArticles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListPressArticlesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Press Articles\n */\n\nexport function useListPressArticles<TData = Awaited<ReturnType<typeof listPressArticles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListPressArticlesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListPressArticlesQueryOptions(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 getReadPressArticleUrl = (articleId: number,) => {\n\n\n\n\n return `/biblio/press-articles/${articleId}`\n}\n\n/**\n * One press article (E42). ``404`` when unknown *or* not entitled.\n * @summary Read Press Article\n */\nexport const readPressArticle = async (articleId: number, options?: Parameters<typeof request>[1]): Promise<PressArticleRead> => {\n\n return request<PressArticleRead>(getReadPressArticleUrl(articleId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadPressArticleQueryKey = (articleId: number,) => {\n return [\n `/biblio/press-articles/${articleId}`\n ] as const;\n }\n\n\nexport const getReadPressArticleQueryOptions = <TData = Awaited<ReturnType<typeof readPressArticle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(articleId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadPressArticleQueryKey(articleId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readPressArticle>>> = ({ signal }) => readPressArticle(articleId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: articleId !== null && articleId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadPressArticleQueryResult = NonNullable<Awaited<ReturnType<typeof readPressArticle>>>\nexport type ReadPressArticleQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadPressArticle<TData = Awaited<ReturnType<typeof readPressArticle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n articleId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPressArticle>>,\n TError,\n Awaited<ReturnType<typeof readPressArticle>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPressArticle<TData = Awaited<ReturnType<typeof readPressArticle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n articleId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPressArticle>>,\n TError,\n Awaited<ReturnType<typeof readPressArticle>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPressArticle<TData = Awaited<ReturnType<typeof readPressArticle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n articleId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Press Article\n */\n\nexport function useReadPressArticle<TData = Awaited<ReturnType<typeof readPressArticle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n articleId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadPressArticleQueryOptions(articleId,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 getReadPressReviewUrl = (params?: ReadPressReviewParams,) => {\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/press-review?${stringifiedParams}` : `/biblio/press-review`\n}\n\n/**\n * The curated press review (E43). An explicit aggregate (§5.2).\n *\n * New as an endpoint; the legacy composed it into two pages and never exposed\n * it. There is no curation table, so a section is a theme and its members are\n * that theme's most recent entitled articles — which is what the rendered page\n * amounted to. When a real curation model appears this is the one place that has\n * to change.\n *\n * A theme with nothing the caller may read is omitted rather than returned\n * empty: an empty section is a hole in a page, and the client cannot tell\n * \"nothing new\" from \"not licensed\".\n * @summary Read Press Review\n */\nexport const readPressReview = async (params?: ReadPressReviewParams, options?: Parameters<typeof request>[1]): Promise<PressReviewRead> => {\n\n return request<PressReviewRead>(getReadPressReviewUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadPressReviewQueryKey = (params?: ReadPressReviewParams,) => {\n return [\n `/biblio/press-review`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadPressReviewQueryOptions = <TData = Awaited<ReturnType<typeof readPressReview>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadPressReviewParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadPressReviewQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readPressReview>>> = ({ signal }) => readPressReview(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadPressReviewQueryResult = NonNullable<Awaited<ReturnType<typeof readPressReview>>>\nexport type ReadPressReviewQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadPressReview<TData = Awaited<ReturnType<typeof readPressReview>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ReadPressReviewParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPressReview>>,\n TError,\n Awaited<ReturnType<typeof readPressReview>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPressReview<TData = Awaited<ReturnType<typeof readPressReview>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadPressReviewParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPressReview>>,\n TError,\n Awaited<ReturnType<typeof readPressReview>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPressReview<TData = Awaited<ReturnType<typeof readPressReview>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadPressReviewParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Press Review\n */\n\nexport function useReadPressReview<TData = Awaited<ReturnType<typeof readPressReview>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadPressReviewParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadPressReviewQueryOptions(params,options)\n\n const query = useQuery(queryOptions, queryClient)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;CAE1I,OAAO,QAAyB,sBAAsB,MAAM,GAC5D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,8BAA8B,WAAoC;CAC3E,OAAO,CACP,wBAAwB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CACjD;AACA;AAGJ,MAAa,kCAA4J,QAAgC,YACpM;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,2BAA2B,MAAM;CAI3E,MAAM,WAAuE,EAAE,aAAa,gBAAgB,QAAQ;EAAE;EAAQ,GAAG;CAAe,CAAC;CAMlJ,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,mBACf,QAAgC,SAC9B,aACiF;CAElF,MAAM,eAAe,+BAA+B,QAAO,OAAO;CAElE,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD"}
|
|
1
|
+
{"version":3,"file":"biblio-press.js","names":[],"sources":["../../src/react/biblio-press/biblio-press.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 {\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 HTTPExceptionResponse,\n ListPressTitlesParams,\n PressFeedRead,\n PressIssuePage,\n PressReaderAccessRead,\n PressReaderAccessWrite,\n PressTitlePage,\n PressTitleRead,\n ReadIssuesParams,\n ReadPressFeedParams,\n ValidationErrorResponse\n} from '../../models';\n\nimport { request } from '../../client';\nimport type { ErrorType , BodyType } 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 getReadPressFeedUrl = (params?: ReadPressFeedParams,) => {\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/press-feed?${stringifiedParams}` : `/biblio/press-feed`\n}\n\n/**\n * Saved accessible publications first, then discovery by theme.\n *\n * Each section carries its first page, pagination metadata and a titlesUrl\n * using the same filters. Unavailable titles never reappear through favourites.\n * @summary Read Press Feed\n */\nexport const readPressFeed = async (params?: ReadPressFeedParams, options?: Parameters<typeof request>[1]): Promise<PressFeedRead> => {\n\n return request<PressFeedRead>(getReadPressFeedUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadPressFeedQueryKey = (params?: ReadPressFeedParams,) => {\n return [\n `/biblio/press-feed`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadPressFeedQueryOptions = <TData = Awaited<ReturnType<typeof readPressFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadPressFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadPressFeedQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readPressFeed>>> = ({ signal }) => readPressFeed(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadPressFeedQueryResult = NonNullable<Awaited<ReturnType<typeof readPressFeed>>>\nexport type ReadPressFeedQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadPressFeed<TData = Awaited<ReturnType<typeof readPressFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ReadPressFeedParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPressFeed>>,\n TError,\n Awaited<ReturnType<typeof readPressFeed>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPressFeed<TData = Awaited<ReturnType<typeof readPressFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadPressFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPressFeed>>,\n TError,\n Awaited<ReturnType<typeof readPressFeed>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPressFeed<TData = Awaited<ReturnType<typeof readPressFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadPressFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Press Feed\n */\n\nexport function useReadPressFeed<TData = Awaited<ReturnType<typeof readPressFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadPressFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadPressFeedQueryOptions(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 getListPressTitlesUrl = (params?: ListPressTitlesParams,) => {\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/press-titles?${stringifiedParams}` : `/biblio/press-titles`\n}\n\n/**\n * One accessible catalogue entry per publication, with profile selection.\n *\n * contentId is the key for favourites, details and /issues. publicationId is\n * the separate provider identifier. Search is a case-insensitive literal title\n * substring. Ordering is alphabetical with a contentId tie-break.\n * @summary List Press Titles\n */\nexport const listPressTitles = async (params?: ListPressTitlesParams, options?: Parameters<typeof request>[1]): Promise<PressTitlePage> => {\n\n return request<PressTitlePage>(getListPressTitlesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListPressTitlesQueryKey = (params?: ListPressTitlesParams,) => {\n return [\n `/biblio/press-titles`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListPressTitlesQueryOptions = <TData = Awaited<ReturnType<typeof listPressTitles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListPressTitlesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListPressTitlesQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listPressTitles>>> = ({ signal }) => listPressTitles(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListPressTitlesQueryResult = NonNullable<Awaited<ReturnType<typeof listPressTitles>>>\nexport type ListPressTitlesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListPressTitles<TData = Awaited<ReturnType<typeof listPressTitles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListPressTitlesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listPressTitles>>,\n TError,\n Awaited<ReturnType<typeof listPressTitles>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListPressTitles<TData = Awaited<ReturnType<typeof listPressTitles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListPressTitlesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listPressTitles>>,\n TError,\n Awaited<ReturnType<typeof listPressTitles>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListPressTitles<TData = Awaited<ReturnType<typeof listPressTitles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListPressTitlesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Press Titles\n */\n\nexport function useListPressTitles<TData = Awaited<ReturnType<typeof listPressTitles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListPressTitlesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListPressTitlesQueryOptions(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 getReadPressTitleUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/press-titles/${contentId}`\n}\n\n/**\n * Publication metadata; an unavailable or unknown title returns 404.\n * @summary Read Press Title\n */\nexport const readPressTitle = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<PressTitleRead> => {\n\n return request<PressTitleRead>(getReadPressTitleUrl(contentId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadPressTitleQueryKey = (contentId: number,) => {\n return [\n `/biblio/press-titles/${contentId}`\n ] as const;\n }\n\n\nexport const getReadPressTitleQueryOptions = <TData = Awaited<ReturnType<typeof readPressTitle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadPressTitleQueryKey(contentId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readPressTitle>>> = ({ signal }) => readPressTitle(contentId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: contentId !== null && contentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadPressTitleQueryResult = NonNullable<Awaited<ReturnType<typeof readPressTitle>>>\nexport type ReadPressTitleQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadPressTitle<TData = Awaited<ReturnType<typeof readPressTitle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPressTitle>>,\n TError,\n Awaited<ReturnType<typeof readPressTitle>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPressTitle<TData = Awaited<ReturnType<typeof readPressTitle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPressTitle>>,\n TError,\n Awaited<ReturnType<typeof readPressTitle>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPressTitle<TData = Awaited<ReturnType<typeof readPressTitle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Press Title\n */\n\nexport function useReadPressTitle<TData = Awaited<ReturnType<typeof readPressTitle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadPressTitleQueryOptions(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 getReadIssuesUrl = (contentId: number,\n params?: ReadIssuesParams,) => {\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/press-titles/${contentId}/issues?${stringifiedParams}` : `/biblio/press-titles/${contentId}/issues`\n}\n\n/**\n * Entitled publication editions and covers. Never creates reader access.\n * @summary Read Issues\n */\nexport const readIssues = async (contentId: number,\n params?: ReadIssuesParams, options?: Parameters<typeof request>[1]): Promise<PressIssuePage> => {\n\n return request<PressIssuePage>(getReadIssuesUrl(contentId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadIssuesQueryKey = (contentId: number,\n params?: ReadIssuesParams,) => {\n return [\n `/biblio/press-titles/${contentId}/issues`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadIssuesQueryOptions = <TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number,\n params?: ReadIssuesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadIssuesQueryKey(contentId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readIssues>>> = ({ signal }) => readIssues(contentId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: contentId !== null && contentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadIssuesQueryResult = NonNullable<Awaited<ReturnType<typeof readIssues>>>\nexport type ReadIssuesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params: undefined | ReadIssuesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readIssues>>,\n TError,\n Awaited<ReturnType<typeof readIssues>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadIssuesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readIssues>>,\n TError,\n Awaited<ReturnType<typeof readIssues>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadIssuesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Issues\n */\n\nexport function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadIssuesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadIssuesQueryOptions(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 getOpenReaderUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/press-titles/${contentId}/reader-access`\n}\n\n/**\n * Open a PressReader edition under this profile's current content grant.\n *\n * URL and token authorize gifted access, not the deployment catalogue API.\n * Keep lease.eventId alive with PUT /consumption/{id}; close with DELETE.\n * The date selects an edition; a missing edition is reported by PressReader.\n * @summary Open Reader\n */\nexport const openReader = async (contentId: number,\n pressReaderAccessWrite: PressReaderAccessWrite, options?: Parameters<typeof request>[1]): Promise<PressReaderAccessRead> => {\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<PressReaderAccessRead>(getOpenReaderUrl(contentId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressReaderAccessWrite)\n }\n);}\n\n\n\n\n\nexport const getOpenReaderMutationKey = () => ['openReader'] as const;\n\nexport const getOpenReaderMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openReader>>, TError,OpenReaderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof openReader>>, TError,OpenReaderMutationVariables, TContext> => {\n\nconst mutationKey = getOpenReaderMutationKey();\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 openReader>>, OpenReaderMutationVariables> = (props) => {\n const {contentId,data} = props ?? {};\n\n return openReader(contentId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type OpenReaderMutationResult = NonNullable<Awaited<ReturnType<typeof openReader>>>\n export type OpenReaderMutationBody = BodyType<PressReaderAccessWrite>\n export type OpenReaderMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type OpenReaderMutationVariables = {contentId: number;data: BodyType<PressReaderAccessWrite>}\n\n /**\n * @summary Open Reader\n */\nexport const useOpenReader = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openReader>>, TError,OpenReaderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof openReader>>,\n TError,\n OpenReaderMutationVariables,\n TContext\n > => {\n return useMutation(getOpenReaderMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAgDA,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,uBAAuB,WAAkC;CACpE,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,sBAAsB;AACpF;;;;;;;;AASA,MAAa,gBAAgB,OAAO,QAA8B,YAAoE;CAEpI,OAAO,QAAuB,oBAAoB,MAAM,GACxD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,4BAA4B,WAAkC;CACvE,OAAO,CACP,sBAAsB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAC/C;AACA;AAGJ,MAAa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U,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAA+B,iBAAiB,SAAS,GAC9D;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,sBAAsB;CAC7C,CACF;AAAE;AAMF,MAAa,iCAAiC,CAAC,YAAY;AAE3D,MAAa,gCACW,YACuF;CAE/G,MAAM,cAAc,yBAAyB;CAC7C,MAAM,EAAC,UAAU,iBAAiB,SAAS,mBAAkB,UACvD,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cAC1E,UACE;EAAC,GAAG;EAAS,UAAU;GAAC,GAAG,QAAQ;GAAU;EAAW;CAAC,IACzD;EAAC,UAAU,EAAE,YAAa;EAAG,SAAS,KAAA;CAAS;CAKjD,MAAM,cAAqG,UAAU;EACjH,MAAM,EAAC,WAAU,SAAQ,SAAS,CAAC;EAEnC,OAAQ,WAAW,WAAU,MAAK,cAAc;CAClD;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,iBACW,SACrB,gBAKQ;CACL,OAAO,YAAY,6BAA6B,OAAO,GAAG,WAAW;AACvE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { $ as SearchResultsRead, et as SearchParams, r as ValidationErrorResponse, ti as HTTPExceptionResponse } from "../chunks/index.js";
|
|
3
3
|
import { a as ErrorType, c as request } from "../chunks/client.js";
|
|
4
4
|
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
5
5
|
//#region src/react/biblio-search/biblio-search.d.ts
|
|
@@ -7,7 +7,7 @@ import { useQuery } from "@tanstack/react-query";
|
|
|
7
7
|
* Do not edit manually.
|
|
8
8
|
* Mozaik backend
|
|
9
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.
|
|
10
|
+
* OpenAPI spec version: 0.9.1
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biblio-search.js","names":[],"sources":["../../src/react/biblio-search/biblio-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.
|
|
1
|
+
{"version":3,"file":"biblio-search.js","names":[],"sources":["../../src/react/biblio-search/biblio-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 {\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n SearchParams,\n SearchResultsRead,\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 getSearchUrl = (params?: SearchParams,) => {\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/search?${stringifiedParams}` : `/biblio/search`\n}\n\n/**\n * Search the catalogue (E46).\n *\n * An empty ``q`` returns an empty ``data`` with ``200``. It is not an error: a\n * client clearing its search box should get an empty result, not a failure.\n *\n * An unrecognised ``type`` is ``422``, naming the families that exist.\n * @summary Search\n */\nexport const search = async (params?: SearchParams, options?: Parameters<typeof request>[1]): Promise<SearchResultsRead> => {\n\n return request<SearchResultsRead>(getSearchUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getSearchQueryKey = (params?: SearchParams,) => {\n return [\n `/biblio/search`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getSearchQueryOptions = <TData = Awaited<ReturnType<typeof search>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: SearchParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof search>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getSearchQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof search>>> = ({ signal }) => search(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof search>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type SearchQueryResult = NonNullable<Awaited<ReturnType<typeof search>>>\nexport type SearchQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useSearch<TData = Awaited<ReturnType<typeof search>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | SearchParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof search>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof search>>,\n TError,\n Awaited<ReturnType<typeof search>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useSearch<TData = Awaited<ReturnType<typeof search>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: SearchParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof search>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof search>>,\n TError,\n Awaited<ReturnType<typeof search>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useSearch<TData = Awaited<ReturnType<typeof search>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: SearchParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof search>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Search\n */\n\nexport function useSearch<TData = Awaited<ReturnType<typeof search>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: SearchParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof search>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getSearchQueryOptions(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":";;;;;;;;;;;AAqCA,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,gBAAgB,WAA2B;CACtD,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,kBAAkB,sBAAsB;AAChF;;;;;;;;;;AAWA,MAAa,SAAS,OAAO,QAAuB,YAAwE;CAE1H,OAAO,QAA2B,aAAa,MAAM,GACrD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,qBAAqB,WAA2B;CACzD,OAAO,CACP,kBAAkB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAC3C;AACA;AAGJ,MAAa,yBAA0I,QAAuB,YACzK;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,kBAAkB,MAAM;CAIlE,MAAM,WAA8D,EAAE,aAAa,OAAO,QAAQ;EAAE;EAAQ,GAAG;CAAe,CAAC;CAMhI,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,UACf,QAAuB,SACrB,aACiF;CAElF,MAAM,eAAe,sBAAsB,QAAO,OAAO;CAEzD,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { r as ValidationErrorResponse, ti as HTTPExceptionResponse, vt as ReadingSessionWrite, yt as ReadingSessionRead } from "../chunks/index.js";
|
|
3
3
|
import { a as ErrorType, c as request, n as BodyType } from "../chunks/client.js";
|
|
4
4
|
import { QueryClient, UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
5
5
|
//#region src/react/biblio-telemetry/biblio-telemetry.d.ts
|
|
@@ -7,7 +7,7 @@ import { useMutation } from "@tanstack/react-query";
|
|
|
7
7
|
* Do not edit manually.
|
|
8
8
|
* Mozaik backend
|
|
9
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.
|
|
10
|
+
* OpenAPI spec version: 0.9.1
|
|
11
11
|
*/
|
|
12
12
|
const getRecordReadingSessionUrl = (sessionTag) => {
|
|
13
13
|
return `/biblio/reading-sessions/${sessionTag}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biblio-telemetry.js","names":[],"sources":["../../src/react/biblio-telemetry/biblio-telemetry.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
|
+
{"version":3,"file":"biblio-telemetry.js","names":[],"sources":["../../src/react/biblio-telemetry/biblio-telemetry.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 {\n useMutation\n} from '@tanstack/react-query';\nimport type {\n MutationFunction,\n QueryClient,\n UseMutationOptions,\n UseMutationResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n ReadingSessionRead,\n ReadingSessionWrite,\n ValidationErrorResponse\n} from '../../models';\n\nimport { request } from '../../client';\nimport type { ErrorType , BodyType } from '../../client';\n\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n\n\nexport const getRecordReadingSessionUrl = (sessionTag: string,) => {\n\n\n\n\n return `/biblio/reading-sessions/${sessionTag}`\n}\n\n/**\n * Record one content-consumption session (E54). Idempotent on ``session_tag``.\n *\n * **There is no ``user_id`` and no ``client_id`` in the body, and there must\n * never be.** The legacy endpoint was unauthenticated and took both from the\n * request without checking either against a credential, so consumption records\n * — which is to say the billing record — were forgeable for any account\n * (defect D3). Both come from the token here.\n *\n * ``PUT`` because the legacy handler already checked whether the tag existed and\n * returned success rather than duplicating: that is an upsert keyed by a\n * client-supplied identifier, and the verb now says so. The tag becomes\n * ``ConsumptionEvent.request_key``, so a retried request after a timeout costs\n * one unit rather than two — enforced by a partial unique index, not by\n * checking first and hoping.\n *\n * ``201`` on the first write for a tag, ``200`` when it already existed. Never\n * an error for a repeat: that is what idempotent means (§2.6).\n * @summary Record Reading Session\n */\nexport const recordReadingSession = async (sessionTag: string,\n readingSessionWrite: ReadingSessionWrite, options?: Parameters<typeof request>[1]): Promise<ReadingSessionRead> => {\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<ReadingSessionRead>(getRecordReadingSessionUrl(sessionTag),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(readingSessionWrite)\n }\n);}\n\n\n\n\n\nexport const getRecordReadingSessionMutationKey = () => ['recordReadingSession'] as const;\n\nexport const getRecordReadingSessionMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof recordReadingSession>>, TError,RecordReadingSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof recordReadingSession>>, TError,RecordReadingSessionMutationVariables, TContext> => {\n\nconst mutationKey = getRecordReadingSessionMutationKey();\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 recordReadingSession>>, RecordReadingSessionMutationVariables> = (props) => {\n const {sessionTag,data} = props ?? {};\n\n return recordReadingSession(sessionTag,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RecordReadingSessionMutationResult = NonNullable<Awaited<ReturnType<typeof recordReadingSession>>>\n export type RecordReadingSessionMutationBody = BodyType<ReadingSessionWrite>\n export type RecordReadingSessionMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RecordReadingSessionMutationVariables = {sessionTag: string;data: BodyType<ReadingSessionWrite>}\n\n /**\n * @summary Record Reading Session\n */\nexport const useRecordReadingSession = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof recordReadingSession>>, TError,RecordReadingSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof recordReadingSession>>,\n TError,\n RecordReadingSessionMutationVariables,\n TContext\n > => {\n return useMutation(getRecordReadingSessionMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAgCA,MAAa,8BAA8B,eAAwB;CAKjE,OAAO,4BAA4B;AACrC;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,uBAAuB,OAAO,YACvC,qBAA0C,YAAyE;CAEnH,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,QAA4B,2BAA2B,UAAU,GACtE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,mBAAmB;CAC1C,CACF;AAAE;AAMF,MAAa,2CAA2C,CAAC,sBAAsB;AAE/E,MAAa,0CACW,YAC2G;CAEnI,MAAM,cAAc,mCAAmC;CACvD,MAAM,EAAC,UAAU,iBAAiB,SAAS,mBAAkB,UACvD,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cAC1E,UACE;EAAC,GAAG;EAAS,UAAU;GAAC,GAAG,QAAQ;GAAU;EAAW;CAAC,IACzD;EAAC,UAAU,EAAE,YAAa;EAAG,SAAS,KAAA;CAAS;CAKjD,MAAM,cAAyH,UAAU;EACrI,MAAM,EAAC,YAAW,SAAQ,SAAS,CAAC;EAEpC,OAAQ,qBAAqB,YAAW,MAAK,cAAc;CAC7D;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,2BACW,SACrB,gBAKQ;CACL,OAAO,YAAY,uCAAuC,OAAO,GAAG,WAAW;AACjF"}
|
package/dist/react/chat.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Un as MessageRead, Vn as MessageWrite } from "../chunks/index.js";
|
|
3
3
|
import { r as Client } from "../chunks/client.js";
|
|
4
4
|
import { n as ChatConnectionOptions, r as ChatStatus } from "../chunks/connection.js";
|
|
5
5
|
//#region src/chat/react.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Er as LeaseRead, r as ValidationErrorResponse, ti as HTTPExceptionResponse } from "../chunks/index.js";
|
|
3
3
|
import { a as ErrorType, c as request } from "../chunks/client.js";
|
|
4
4
|
import { QueryClient, UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
5
5
|
//#region src/react/consumption/consumption.d.ts
|
|
@@ -7,7 +7,7 @@ import { useMutation } from "@tanstack/react-query";
|
|
|
7
7
|
* Do not edit manually.
|
|
8
8
|
* Mozaik backend
|
|
9
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.
|
|
10
|
+
* OpenAPI spec version: 0.9.1
|
|
11
11
|
*/
|
|
12
12
|
const getCloseLeaseUrl = (eventId) => {
|
|
13
13
|
return `/consumption/${eventId}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumption.js","names":[],"sources":["../../src/react/consumption/consumption.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.
|
|
1
|
+
{"version":3,"file":"consumption.js","names":[],"sources":["../../src/react/consumption/consumption.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.1\n */\nimport {\n useMutation\n} from '@tanstack/react-query';\nimport type {\n MutationFunction,\n QueryClient,\n UseMutationOptions,\n UseMutationResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n LeaseRead,\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\nexport const getCloseLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/consumption/${eventId}`\n}\n\n/**\n * Finish reading. Returns the seat immediately rather than at lapse.\n *\n * ``204`` whether or not the lease was still open: the desired end state is\n * \"closed\", and a client that lost its connection and retried should not get an\n * error for succeeding twice.\n * @summary Close Lease\n */\nexport const closeLease = async (eventId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getCloseLeaseUrl(eventId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getCloseLeaseMutationKey = () => ['closeLease'] as const;\n\nexport const getCloseLeaseMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof closeLease>>, TError,CloseLeaseMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof closeLease>>, TError,CloseLeaseMutationVariables, TContext> => {\n\nconst mutationKey = getCloseLeaseMutationKey();\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 closeLease>>, CloseLeaseMutationVariables> = (props) => {\n const {eventId} = props ?? {};\n\n return closeLease(eventId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CloseLeaseMutationResult = NonNullable<Awaited<ReturnType<typeof closeLease>>>\n\n export type CloseLeaseMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CloseLeaseMutationVariables = {eventId: number}\n\n /**\n * @summary Close Lease\n */\nexport const useCloseLease = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof closeLease>>, TError,CloseLeaseMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof closeLease>>,\n TError,\n CloseLeaseMutationVariables,\n TContext\n > => {\n return useMutation(getCloseLeaseMutationOptions(options), queryClient);\n }\n export const getRenewLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/consumption/${eventId}`\n}\n\n/**\n * Heartbeat. Push the lease out; the client repeats before it lapses.\n *\n * ``404`` when the lease is closed, reaped, or somebody else's — the three are\n * deliberately indistinguishable, because a lease id is a bare integer and\n * guessing one must not reveal whether it exists.\n *\n * This does not write the ledger. A reader refreshing every thirty seconds for\n * an hour would be 120 UPDATEs on the table we bill from, for a value that only\n * matters while it is current; the durable extent is settled once, at close.\n * @summary Renew Lease\n */\nexport const renewLease = async (eventId: number, options?: Parameters<typeof request>[1]): Promise<LeaseRead> => {\n\n return request<LeaseRead>(getRenewLeaseUrl(eventId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\n\n\n\nexport const getRenewLeaseMutationKey = () => ['renewLease'] as const;\n\nexport const getRenewLeaseMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof renewLease>>, TError,RenewLeaseMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof renewLease>>, TError,RenewLeaseMutationVariables, TContext> => {\n\nconst mutationKey = getRenewLeaseMutationKey();\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 renewLease>>, RenewLeaseMutationVariables> = (props) => {\n const {eventId} = props ?? {};\n\n return renewLease(eventId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RenewLeaseMutationResult = NonNullable<Awaited<ReturnType<typeof renewLease>>>\n\n export type RenewLeaseMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RenewLeaseMutationVariables = {eventId: number}\n\n /**\n * @summary Renew Lease\n */\nexport const useRenewLease = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof renewLease>>, TError,RenewLeaseMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof renewLease>>,\n TError,\n RenewLeaseMutationVariables,\n TContext\n > => {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