@learnorama/mozaik-sdk 0.8.2-staging.31.1 → 0.9.0-staging.35.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/dist/api/account.d.ts +27 -28
- package/dist/api/account.js +41 -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 +1 -1
- package/dist/api/biblio-catalogue.js.map +1 -1
- package/dist/api/biblio-home.d.ts +1 -1
- package/dist/api/biblio-home.js.map +1 -1
- package/dist/api/biblio-library.d.ts +1 -1
- 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 +17 -1
- package/dist/api/biblio-press.js +49 -1
- 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 +8 -8
- package/dist/api/index.js +8 -8
- 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 +1183 -347
- 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 +95 -2
- package/dist/models.js.map +1 -1
- package/dist/react/account.d.ts +81 -28
- package/dist/react/account.js +90 -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 +1 -1
- package/dist/react/biblio-catalogue.js +1 -1
- package/dist/react/biblio-catalogue.js.map +1 -1
- package/dist/react/biblio-home.d.ts +1 -1
- package/dist/react/biblio-home.js +1 -1
- package/dist/react/biblio-home.js.map +1 -1
- package/dist/react/biblio-library.d.ts +1 -1
- package/dist/react/biblio-library.js +1 -1
- 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 +65 -3
- package/dist/react/biblio-press.js +104 -3
- 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 +8 -8
- package/dist/react/index.js +8 -8
- 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
package/dist/react/account.d.ts
CHANGED
|
@@ -1,39 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { $r as HTTPExceptionResponse, In as OnboardingRead, Qc as AccountUpdateWrite, X as ServiceListRead, el as AccountDetailRead, r as ValidationErrorResponse, vi as FrontendCapabilitiesRead } from "../chunks/index.js";
|
|
3
3
|
import { a as ErrorType, c as request, n as BodyType } from "../chunks/client.js";
|
|
4
4
|
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
5
5
|
//#region src/react/account/account.d.ts
|
|
6
6
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
7
7
|
export declare const getDeleteAccountUrl: () => string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Erase this authenticated identity while retaining its historical rows.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* confirmation of any kind and accepted the call from a sub-profile (defect D8).
|
|
16
|
-
*
|
|
17
|
-
* **What survives, and why.** The row stays, with identity cleared and
|
|
18
|
-
* ``is_anonymous`` set. Consumption history, loans and billing records point at
|
|
19
|
-
* this user, and deleting the row would either cascade them away — destroying
|
|
20
|
-
* the library's statutory reporting — or orphan them. Clearing the identifying
|
|
21
|
-
* columns satisfies erasure of personal data while leaving the countable facts
|
|
22
|
-
* countable. The retained set is: which tenant, when they registered, and what
|
|
23
|
-
* they consumed, with no name, login, email, birth date or member number.
|
|
24
|
-
*
|
|
25
|
-
* Sub-profiles go with the holder: they are people on the same membership and
|
|
26
|
-
* cannot outlive it. Their rows are anonymised too, not deleted, for the same
|
|
27
|
-
* reason.
|
|
28
|
-
*
|
|
29
|
-
* **The broker is disabled first, and a failure aborts the whole thing.** The
|
|
30
|
-
* credential lives in Keycloak, so anonymising locally while leaving it enabled
|
|
31
|
-
* would let the same person sign in tomorrow and be provisioned a fresh account
|
|
32
|
-
* — erasure that erases nothing. Disabling before any local write means the
|
|
33
|
-
* failure mode is "nothing happened", which is recoverable, rather than "half
|
|
34
|
-
* happened", which is not.
|
|
35
|
-
*
|
|
36
|
-
* Still missing, and not safe to ship without: no audit record is written.
|
|
11
|
+
* Other independently authenticated household members are never erased by
|
|
12
|
+
* this operation. The holder must first remove active/pending memberships;
|
|
13
|
+
* an adult who is a child's final guardian must assign another guardian first.
|
|
14
|
+
* All household writes take the same beneficiary lock, including invitations.
|
|
37
15
|
* @summary Delete Account
|
|
38
16
|
*/
|
|
39
17
|
export declare const deleteAccount: (options?: Parameters<typeof request>[1]) => Promise<void>;
|
|
@@ -116,6 +94,81 @@ export declare const useUpdateAccount: <TError = ErrorType<HTTPExceptionResponse
|
|
|
116
94
|
mutation?: UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError, UpdateAccountMutationVariables, TContext>;
|
|
117
95
|
request?: SecondParameter<typeof request>;
|
|
118
96
|
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof updateAccount>>, TError, UpdateAccountMutationVariables, TContext>;
|
|
97
|
+
export declare const getReadCapabilitiesUrl: () => string;
|
|
98
|
+
/**
|
|
99
|
+
* Current profile's local book rights, partner seats and navigation paths.
|
|
100
|
+
*
|
|
101
|
+
* Does not allocate a licence or contact a provider. ``readingAllowed`` is a
|
|
102
|
+
* local permission snapshot; configuration and upstream health are separate.
|
|
103
|
+
* The reader always authorizes again when opening a title.
|
|
104
|
+
* @summary Read Capabilities
|
|
105
|
+
*/
|
|
106
|
+
export declare const readCapabilities: (options?: Parameters<typeof request>[1]) => Promise<FrontendCapabilitiesRead>;
|
|
107
|
+
export declare const getReadCapabilitiesQueryKey: () => readonly [`/me/capabilities`];
|
|
108
|
+
export declare const getReadCapabilitiesQueryOptions: <TData = Awaited<ReturnType<typeof readCapabilities>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
109
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData>>;
|
|
110
|
+
request?: SecondParameter<typeof request>;
|
|
111
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData> & {
|
|
112
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
113
|
+
};
|
|
114
|
+
export type ReadCapabilitiesQueryResult = NonNullable<Awaited<ReturnType<typeof readCapabilities>>>;
|
|
115
|
+
export type ReadCapabilitiesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
116
|
+
export declare function useReadCapabilities<TData = Awaited<ReturnType<typeof readCapabilities>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options: {
|
|
117
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, Awaited<ReturnType<typeof readCapabilities>>>, 'initialData'>;
|
|
118
|
+
request?: SecondParameter<typeof request>;
|
|
119
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
120
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
121
|
+
};
|
|
122
|
+
export declare function useReadCapabilities<TData = Awaited<ReturnType<typeof readCapabilities>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
123
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, Awaited<ReturnType<typeof readCapabilities>>>, 'initialData'>;
|
|
124
|
+
request?: SecondParameter<typeof request>;
|
|
125
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
126
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
127
|
+
};
|
|
128
|
+
export declare function useReadCapabilities<TData = Awaited<ReturnType<typeof readCapabilities>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
129
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData>>;
|
|
130
|
+
request?: SecondParameter<typeof request>;
|
|
131
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
132
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
133
|
+
};
|
|
134
|
+
export declare const getReadOnboardingUrl: () => string;
|
|
135
|
+
/**
|
|
136
|
+
* State for optional profile setup, with existing write-resource paths.
|
|
137
|
+
*
|
|
138
|
+
* The signed-in adult updates their own fields using PATCH /me. A guardian
|
|
139
|
+
* manages a child through /me/profiles. Category selections use
|
|
140
|
+
* PUT /biblio/me/preferences/categories in the effective profile context.
|
|
141
|
+
* No terms acceptance or mandatory onboarding completion is invented here.
|
|
142
|
+
* @summary Read Onboarding
|
|
143
|
+
*/
|
|
144
|
+
export declare const readOnboarding: (options?: Parameters<typeof request>[1]) => Promise<OnboardingRead>;
|
|
145
|
+
export declare const getReadOnboardingQueryKey: () => readonly [`/me/onboarding`];
|
|
146
|
+
export declare const getReadOnboardingQueryOptions: <TData = Awaited<ReturnType<typeof readOnboarding>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
147
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData>>;
|
|
148
|
+
request?: SecondParameter<typeof request>;
|
|
149
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData> & {
|
|
150
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
151
|
+
};
|
|
152
|
+
export type ReadOnboardingQueryResult = NonNullable<Awaited<ReturnType<typeof readOnboarding>>>;
|
|
153
|
+
export type ReadOnboardingQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
154
|
+
export declare function useReadOnboarding<TData = Awaited<ReturnType<typeof readOnboarding>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options: {
|
|
155
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, Awaited<ReturnType<typeof readOnboarding>>>, 'initialData'>;
|
|
156
|
+
request?: SecondParameter<typeof request>;
|
|
157
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
158
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
159
|
+
};
|
|
160
|
+
export declare function useReadOnboarding<TData = Awaited<ReturnType<typeof readOnboarding>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
161
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, Awaited<ReturnType<typeof readOnboarding>>>, 'initialData'>;
|
|
162
|
+
request?: SecondParameter<typeof request>;
|
|
163
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
164
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
165
|
+
};
|
|
166
|
+
export declare function useReadOnboarding<TData = Awaited<ReturnType<typeof readOnboarding>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
167
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData>>;
|
|
168
|
+
request?: SecondParameter<typeof request>;
|
|
169
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
170
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
171
|
+
};
|
|
119
172
|
export declare const getListServicesUrl: () => string;
|
|
120
173
|
/**
|
|
121
174
|
* Third-party services this account's establishment offers (E27).
|
package/dist/react/account.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useMutation, 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.0
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|
|
@@ -25,34 +25,12 @@ const getDeleteAccountUrl = () => {
|
|
|
25
25
|
return `/me`;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Erase this authenticated identity while retaining its historical rows.
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* confirmation of any kind and accepted the call from a sub-profile (defect D8).
|
|
35
|
-
*
|
|
36
|
-
* **What survives, and why.** The row stays, with identity cleared and
|
|
37
|
-
* ``is_anonymous`` set. Consumption history, loans and billing records point at
|
|
38
|
-
* this user, and deleting the row would either cascade them away — destroying
|
|
39
|
-
* the library's statutory reporting — or orphan them. Clearing the identifying
|
|
40
|
-
* columns satisfies erasure of personal data while leaving the countable facts
|
|
41
|
-
* countable. The retained set is: which tenant, when they registered, and what
|
|
42
|
-
* they consumed, with no name, login, email, birth date or member number.
|
|
43
|
-
*
|
|
44
|
-
* Sub-profiles go with the holder: they are people on the same membership and
|
|
45
|
-
* cannot outlive it. Their rows are anonymised too, not deleted, for the same
|
|
46
|
-
* reason.
|
|
47
|
-
*
|
|
48
|
-
* **The broker is disabled first, and a failure aborts the whole thing.** The
|
|
49
|
-
* credential lives in Keycloak, so anonymising locally while leaving it enabled
|
|
50
|
-
* would let the same person sign in tomorrow and be provisioned a fresh account
|
|
51
|
-
* — erasure that erases nothing. Disabling before any local write means the
|
|
52
|
-
* failure mode is "nothing happened", which is recoverable, rather than "half
|
|
53
|
-
* happened", which is not.
|
|
54
|
-
*
|
|
55
|
-
* Still missing, and not safe to ship without: no audit record is written.
|
|
30
|
+
* Other independently authenticated household members are never erased by
|
|
31
|
+
* this operation. The holder must first remove active/pending memberships;
|
|
32
|
+
* an adult who is a child's final guardian must assign another guardian first.
|
|
33
|
+
* All household writes take the same beneficiary lock, including invitations.
|
|
56
34
|
* @summary Delete Account
|
|
57
35
|
*/
|
|
58
36
|
const deleteAccount = async (options) => {
|
|
@@ -187,6 +165,89 @@ const getUpdateAccountMutationOptions = (options) => {
|
|
|
187
165
|
const useUpdateAccount = (options, queryClient) => {
|
|
188
166
|
return useMutation(getUpdateAccountMutationOptions(options), queryClient);
|
|
189
167
|
};
|
|
168
|
+
const getReadCapabilitiesUrl = () => {
|
|
169
|
+
return `/me/capabilities`;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Current profile's local book rights, partner seats and navigation paths.
|
|
173
|
+
*
|
|
174
|
+
* Does not allocate a licence or contact a provider. ``readingAllowed`` is a
|
|
175
|
+
* local permission snapshot; configuration and upstream health are separate.
|
|
176
|
+
* The reader always authorizes again when opening a title.
|
|
177
|
+
* @summary Read Capabilities
|
|
178
|
+
*/
|
|
179
|
+
const readCapabilities = async (options) => {
|
|
180
|
+
return request(getReadCapabilitiesUrl(), {
|
|
181
|
+
...options,
|
|
182
|
+
method: "GET"
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
const getReadCapabilitiesQueryKey = () => {
|
|
186
|
+
return [`/me/capabilities`];
|
|
187
|
+
};
|
|
188
|
+
const getReadCapabilitiesQueryOptions = (options) => {
|
|
189
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
190
|
+
const queryKey = queryOptions?.queryKey ?? getReadCapabilitiesQueryKey();
|
|
191
|
+
const queryFn = ({ signal }) => readCapabilities({
|
|
192
|
+
signal,
|
|
193
|
+
...requestOptions
|
|
194
|
+
});
|
|
195
|
+
return {
|
|
196
|
+
queryKey,
|
|
197
|
+
queryFn,
|
|
198
|
+
...queryOptions
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* @summary Read Capabilities
|
|
203
|
+
*/
|
|
204
|
+
function useReadCapabilities(options, queryClient) {
|
|
205
|
+
const queryOptions = getReadCapabilitiesQueryOptions(options);
|
|
206
|
+
const query = useQuery(queryOptions, queryClient);
|
|
207
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
208
|
+
}
|
|
209
|
+
const getReadOnboardingUrl = () => {
|
|
210
|
+
return `/me/onboarding`;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* State for optional profile setup, with existing write-resource paths.
|
|
214
|
+
*
|
|
215
|
+
* The signed-in adult updates their own fields using PATCH /me. A guardian
|
|
216
|
+
* manages a child through /me/profiles. Category selections use
|
|
217
|
+
* PUT /biblio/me/preferences/categories in the effective profile context.
|
|
218
|
+
* No terms acceptance or mandatory onboarding completion is invented here.
|
|
219
|
+
* @summary Read Onboarding
|
|
220
|
+
*/
|
|
221
|
+
const readOnboarding = async (options) => {
|
|
222
|
+
return request(getReadOnboardingUrl(), {
|
|
223
|
+
...options,
|
|
224
|
+
method: "GET"
|
|
225
|
+
});
|
|
226
|
+
};
|
|
227
|
+
const getReadOnboardingQueryKey = () => {
|
|
228
|
+
return [`/me/onboarding`];
|
|
229
|
+
};
|
|
230
|
+
const getReadOnboardingQueryOptions = (options) => {
|
|
231
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
232
|
+
const queryKey = queryOptions?.queryKey ?? getReadOnboardingQueryKey();
|
|
233
|
+
const queryFn = ({ signal }) => readOnboarding({
|
|
234
|
+
signal,
|
|
235
|
+
...requestOptions
|
|
236
|
+
});
|
|
237
|
+
return {
|
|
238
|
+
queryKey,
|
|
239
|
+
queryFn,
|
|
240
|
+
...queryOptions
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* @summary Read Onboarding
|
|
245
|
+
*/
|
|
246
|
+
function useReadOnboarding(options, queryClient) {
|
|
247
|
+
const queryOptions = getReadOnboardingQueryOptions(options);
|
|
248
|
+
const query = useQuery(queryOptions, queryClient);
|
|
249
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
250
|
+
}
|
|
190
251
|
const getListServicesUrl = () => {
|
|
191
252
|
return `/me/services`;
|
|
192
253
|
};
|
|
@@ -235,6 +296,6 @@ function useListServices(options, queryClient) {
|
|
|
235
296
|
return withQueryKey(query, queryOptions.queryKey);
|
|
236
297
|
}
|
|
237
298
|
//#endregion
|
|
238
|
-
export { deleteAccount, getDeleteAccountMutationKey, getDeleteAccountMutationOptions, getDeleteAccountUrl, getListServicesQueryKey, getListServicesQueryOptions, getListServicesUrl, getReadAccountQueryKey, getReadAccountQueryOptions, getReadAccountUrl, getUpdateAccountMutationKey, getUpdateAccountMutationOptions, getUpdateAccountUrl, listServices, readAccount, updateAccount, useDeleteAccount, useListServices, useReadAccount, useUpdateAccount };
|
|
299
|
+
export { deleteAccount, getDeleteAccountMutationKey, getDeleteAccountMutationOptions, getDeleteAccountUrl, getListServicesQueryKey, getListServicesQueryOptions, getListServicesUrl, getReadAccountQueryKey, getReadAccountQueryOptions, getReadAccountUrl, getReadCapabilitiesQueryKey, getReadCapabilitiesQueryOptions, getReadCapabilitiesUrl, getReadOnboardingQueryKey, getReadOnboardingQueryOptions, getReadOnboardingUrl, getUpdateAccountMutationKey, getUpdateAccountMutationOptions, getUpdateAccountUrl, listServices, readAccount, readCapabilities, readOnboarding, updateAccount, useDeleteAccount, useListServices, useReadAccount, useReadCapabilities, useReadOnboarding, useUpdateAccount };
|
|
239
300
|
|
|
240
301
|
//# sourceMappingURL=account.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","names":[],"sources":["../../src/react/account/account.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.2\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 AccountDetailRead,\n AccountUpdateWrite,\n HTTPExceptionResponse,\n ServiceListRead,\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 getDeleteAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * Close the account (E17). Anonymises; does not erase.\n *\n * The spec asked for the password to be re-submitted. We do not hold one, and\n * assurance is the better guard anyway: a password check would have passed for a\n * session that arrived through a partner handing over a static key in a URL,\n * and ``RequireHighAssurance`` refuses exactly that. The legacy required no\n * confirmation of any kind and accepted the call from a sub-profile (defect D8).\n *\n * **What survives, and why.** The row stays, with identity cleared and\n * ``is_anonymous`` set. Consumption history, loans and billing records point at\n * this user, and deleting the row would either cascade them away — destroying\n * the library's statutory reporting — or orphan them. Clearing the identifying\n * columns satisfies erasure of personal data while leaving the countable facts\n * countable. The retained set is: which tenant, when they registered, and what\n * they consumed, with no name, login, email, birth date or member number.\n *\n * Sub-profiles go with the holder: they are people on the same membership and\n * cannot outlive it. Their rows are anonymised too, not deleted, for the same\n * reason.\n *\n * **The broker is disabled first, and a failure aborts the whole thing.** The\n * credential lives in Keycloak, so anonymising locally while leaving it enabled\n * would let the same person sign in tomorrow and be provisioned a fresh account\n * — erasure that erases nothing. Disabling before any local write means the\n * failure mode is \"nothing happened\", which is recoverable, rather than \"half\n * happened\", which is not.\n *\n * Still missing, and not safe to ship without: no audit record is written.\n * @summary Delete Account\n */\nexport const deleteAccount = async ( options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteAccountUrl(),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getDeleteAccountMutationKey = () => ['deleteAccount'] as const;\n\nexport const getDeleteAccountMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAccount>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteAccount>>, TError,void, TContext> => {\n\nconst mutationKey = getDeleteAccountMutationKey();\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 deleteAccount>>, void> = () => {\n\n\n return deleteAccount(requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteAccountMutationResult = NonNullable<Awaited<ReturnType<typeof deleteAccount>>>\n\n export type DeleteAccountMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\n /**\n * @summary Delete Account\n */\nexport const useDeleteAccount = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAccount>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof deleteAccount>>,\n TError,\n void,\n TContext\n > => {\n return useMutation(getDeleteAccountMutationOptions(options), queryClient);\n }\n export const getReadAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * The authenticated account (E15).\n *\n * No query, no join: ``CurrentUserDep`` has already resolved the row behind the\n * token. The endpoint the legacy should have had here has been returning ``500``\n * on every request for as long as anyone has looked (defect D1).\n * @summary Read Account\n */\nexport const readAccount = async ( options?: Parameters<typeof request>[1]): Promise<AccountDetailRead> => {\n\n return request<AccountDetailRead>(getReadAccountUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadAccountQueryKey = () => {\n return [\n `/me`\n ] as const;\n }\n\n\nexport const getReadAccountQueryOptions = <TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadAccountQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readAccount>>> = ({ signal }) => readAccount({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadAccountQueryResult = NonNullable<Awaited<ReturnType<typeof readAccount>>>\nexport type ReadAccountQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadAccount<TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readAccount>>,\n TError,\n Awaited<ReturnType<typeof readAccount>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadAccount<TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readAccount>>,\n TError,\n Awaited<ReturnType<typeof readAccount>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadAccount<TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Account\n */\n\nexport function useReadAccount<TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadAccountQueryOptions(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 getUpdateAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * Partially update the account (E16).\n *\n * ``exclude_unset`` is what separates PATCH from PUT here: a field the client\n * omitted is left alone, which is not the same as a field it sent as null. The\n * response is built from the persisted row rather than the submitted body.\n * @summary Update Account\n */\nexport const updateAccount = async (accountUpdateWrite: AccountUpdateWrite, options?: Parameters<typeof request>[1]): Promise<AccountDetailRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<AccountDetailRead>(getUpdateAccountUrl(),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(accountUpdateWrite)\n }\n);}\n\n\n\n\n\nexport const getUpdateAccountMutationKey = () => ['updateAccount'] as const;\n\nexport const getUpdateAccountMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError,UpdateAccountMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError,UpdateAccountMutationVariables, TContext> => {\n\nconst mutationKey = getUpdateAccountMutationKey();\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 updateAccount>>, UpdateAccountMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return updateAccount(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type UpdateAccountMutationResult = NonNullable<Awaited<ReturnType<typeof updateAccount>>>\n export type UpdateAccountMutationBody = BodyType<AccountUpdateWrite>\n export type UpdateAccountMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type UpdateAccountMutationVariables = {data: BodyType<AccountUpdateWrite>}\n\n /**\n * @summary Update Account\n */\nexport const useUpdateAccount = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError,UpdateAccountMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof updateAccount>>,\n TError,\n UpdateAccountMutationVariables,\n TContext\n > => {\n return useMutation(getUpdateAccountMutationOptions(options), queryClient);\n }\n export const getListServicesUrl = () => {\n\n\n\n\n return `/me/services`\n}\n\n/**\n * Third-party services this account's establishment offers (E27).\n *\n * Under ``/me`` rather than ``/biblio/me`` because it is not a catalogue: these\n * are the establishment's own service tiles, and they belong to the tenant\n * whichever catalogue that tenant reads from. It is also the one place the\n * biblio spec describes something the *CVS* schema models, which is why it sat\n * in the wrong module until the prefixes made the mismatch visible.\n *\n * Date-windowed. A service outside its window is absent rather than disabled:\n * the client should not have to know the difference, and a visible dead link is\n * worse than no link.\n * @summary List Services\n */\nexport const listServices = async ( options?: Parameters<typeof request>[1]): Promise<ServiceListRead> => {\n\n return request<ServiceListRead>(getListServicesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListServicesQueryKey = () => {\n return [\n `/me/services`\n ] as const;\n }\n\n\nexport const getListServicesQueryOptions = <TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListServicesQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listServices>>> = ({ signal }) => listServices({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListServicesQueryResult = NonNullable<Awaited<ReturnType<typeof listServices>>>\nexport type ListServicesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListServices<TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listServices>>,\n TError,\n Awaited<ReturnType<typeof listServices>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListServices<TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listServices>>,\n TError,\n Awaited<ReturnType<typeof listServices>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListServices<TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Services\n */\n\nexport function useListServices<TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListServicesQueryOptions(options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: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GAAG;EAAS,UAAU;GAAC,GAAG,QAAQ;GAAU;EAAW;CAAC,IACzD;EAAC,UAAU,EAAE,YAAa;EAAG,SAAS,KAAA;CAAS;CAKjD,MAAM,cAA2G,UAAU;EACvH,MAAM,EAAC,SAAQ,SAAS,CAAC;EAEzB,OAAQ,cAAc,MAAK,cAAc;CAC3C;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,oBACW,SACrB,gBAKQ;CACL,OAAO,YAAY,gCAAgC,OAAO,GAAG,WAAW;AAC1E;AACA,MAAa,2BAA2B;CAK1C,OAAO;AACT;;;;;;;;;;;;;;;AAgBA,MAAa,eAAe,OAAQ,YAAsE;CAExG,OAAO,QAAyB,mBAAmB,GACnD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,gCAAgC;CACzC,OAAO,CACP,cACA;AACA;AAGJ,MAAa,+BAAuJ,YAC/J;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,wBAAwB;CAIlE,MAAM,WAAoE,EAAE,aAAa,aAAa;EAAE;EAAQ,GAAG;CAAe,CAAC;CAMpI,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,gBACd,SACC,aACiF;CAElF,MAAM,eAAe,4BAA4B,OAAO;CAExD,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD"}
|
|
1
|
+
{"version":3,"file":"account.js","names":[],"sources":["../../src/react/account/account.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.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 AccountDetailRead,\n AccountUpdateWrite,\n FrontendCapabilitiesRead,\n HTTPExceptionResponse,\n OnboardingRead,\n ServiceListRead,\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 getDeleteAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * Erase this authenticated identity while retaining its historical rows.\n *\n * Other independently authenticated household members are never erased by\n * this operation. The holder must first remove active/pending memberships;\n * an adult who is a child's final guardian must assign another guardian first.\n * All household writes take the same beneficiary lock, including invitations.\n * @summary Delete Account\n */\nexport const deleteAccount = async ( options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteAccountUrl(),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getDeleteAccountMutationKey = () => ['deleteAccount'] as const;\n\nexport const getDeleteAccountMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAccount>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteAccount>>, TError,void, TContext> => {\n\nconst mutationKey = getDeleteAccountMutationKey();\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 deleteAccount>>, void> = () => {\n\n\n return deleteAccount(requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteAccountMutationResult = NonNullable<Awaited<ReturnType<typeof deleteAccount>>>\n\n export type DeleteAccountMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\n /**\n * @summary Delete Account\n */\nexport const useDeleteAccount = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAccount>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof deleteAccount>>,\n TError,\n void,\n TContext\n > => {\n return useMutation(getDeleteAccountMutationOptions(options), queryClient);\n }\n export const getReadAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * The authenticated account (E15).\n *\n * No query, no join: ``CurrentUserDep`` has already resolved the row behind the\n * token. The endpoint the legacy should have had here has been returning ``500``\n * on every request for as long as anyone has looked (defect D1).\n * @summary Read Account\n */\nexport const readAccount = async ( options?: Parameters<typeof request>[1]): Promise<AccountDetailRead> => {\n\n return request<AccountDetailRead>(getReadAccountUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadAccountQueryKey = () => {\n return [\n `/me`\n ] as const;\n }\n\n\nexport const getReadAccountQueryOptions = <TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadAccountQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readAccount>>> = ({ signal }) => readAccount({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadAccountQueryResult = NonNullable<Awaited<ReturnType<typeof readAccount>>>\nexport type ReadAccountQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadAccount<TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readAccount>>,\n TError,\n Awaited<ReturnType<typeof readAccount>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadAccount<TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readAccount>>,\n TError,\n Awaited<ReturnType<typeof readAccount>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadAccount<TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Account\n */\n\nexport function useReadAccount<TData = Awaited<ReturnType<typeof readAccount>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readAccount>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadAccountQueryOptions(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 getUpdateAccountUrl = () => {\n\n\n\n\n return `/me`\n}\n\n/**\n * Partially update the account (E16).\n *\n * ``exclude_unset`` is what separates PATCH from PUT here: a field the client\n * omitted is left alone, which is not the same as a field it sent as null. The\n * response is built from the persisted row rather than the submitted body.\n * @summary Update Account\n */\nexport const updateAccount = async (accountUpdateWrite: AccountUpdateWrite, options?: Parameters<typeof request>[1]): Promise<AccountDetailRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<AccountDetailRead>(getUpdateAccountUrl(),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(accountUpdateWrite)\n }\n);}\n\n\n\n\n\nexport const getUpdateAccountMutationKey = () => ['updateAccount'] as const;\n\nexport const getUpdateAccountMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError,UpdateAccountMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError,UpdateAccountMutationVariables, TContext> => {\n\nconst mutationKey = getUpdateAccountMutationKey();\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 updateAccount>>, UpdateAccountMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return updateAccount(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type UpdateAccountMutationResult = NonNullable<Awaited<ReturnType<typeof updateAccount>>>\n export type UpdateAccountMutationBody = BodyType<AccountUpdateWrite>\n export type UpdateAccountMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type UpdateAccountMutationVariables = {data: BodyType<AccountUpdateWrite>}\n\n /**\n * @summary Update Account\n */\nexport const useUpdateAccount = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError,UpdateAccountMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof updateAccount>>,\n TError,\n UpdateAccountMutationVariables,\n TContext\n > => {\n return useMutation(getUpdateAccountMutationOptions(options), queryClient);\n }\n export const getReadCapabilitiesUrl = () => {\n\n\n\n\n return `/me/capabilities`\n}\n\n/**\n * Current profile's local book rights, partner seats and navigation paths.\n *\n * Does not allocate a licence or contact a provider. ``readingAllowed`` is a\n * local permission snapshot; configuration and upstream health are separate.\n * The reader always authorizes again when opening a title.\n * @summary Read Capabilities\n */\nexport const readCapabilities = async ( options?: Parameters<typeof request>[1]): Promise<FrontendCapabilitiesRead> => {\n\n return request<FrontendCapabilitiesRead>(getReadCapabilitiesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadCapabilitiesQueryKey = () => {\n return [\n `/me/capabilities`\n ] as const;\n }\n\n\nexport const getReadCapabilitiesQueryOptions = <TData = Awaited<ReturnType<typeof readCapabilities>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadCapabilitiesQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readCapabilities>>> = ({ signal }) => readCapabilities({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadCapabilitiesQueryResult = NonNullable<Awaited<ReturnType<typeof readCapabilities>>>\nexport type ReadCapabilitiesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadCapabilities<TData = Awaited<ReturnType<typeof readCapabilities>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCapabilities>>,\n TError,\n Awaited<ReturnType<typeof readCapabilities>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCapabilities<TData = Awaited<ReturnType<typeof readCapabilities>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCapabilities>>,\n TError,\n Awaited<ReturnType<typeof readCapabilities>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCapabilities<TData = Awaited<ReturnType<typeof readCapabilities>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Capabilities\n */\n\nexport function useReadCapabilities<TData = Awaited<ReturnType<typeof readCapabilities>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCapabilities>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadCapabilitiesQueryOptions(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 getReadOnboardingUrl = () => {\n\n\n\n\n return `/me/onboarding`\n}\n\n/**\n * State for optional profile setup, with existing write-resource paths.\n *\n * The signed-in adult updates their own fields using PATCH /me. A guardian\n * manages a child through /me/profiles. Category selections use\n * PUT /biblio/me/preferences/categories in the effective profile context.\n * No terms acceptance or mandatory onboarding completion is invented here.\n * @summary Read Onboarding\n */\nexport const readOnboarding = async ( options?: Parameters<typeof request>[1]): Promise<OnboardingRead> => {\n\n return request<OnboardingRead>(getReadOnboardingUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadOnboardingQueryKey = () => {\n return [\n `/me/onboarding`\n ] as const;\n }\n\n\nexport const getReadOnboardingQueryOptions = <TData = Awaited<ReturnType<typeof readOnboarding>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadOnboardingQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readOnboarding>>> = ({ signal }) => readOnboarding({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadOnboardingQueryResult = NonNullable<Awaited<ReturnType<typeof readOnboarding>>>\nexport type ReadOnboardingQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadOnboarding<TData = Awaited<ReturnType<typeof readOnboarding>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readOnboarding>>,\n TError,\n Awaited<ReturnType<typeof readOnboarding>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadOnboarding<TData = Awaited<ReturnType<typeof readOnboarding>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readOnboarding>>,\n TError,\n Awaited<ReturnType<typeof readOnboarding>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadOnboarding<TData = Awaited<ReturnType<typeof readOnboarding>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Onboarding\n */\n\nexport function useReadOnboarding<TData = Awaited<ReturnType<typeof readOnboarding>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readOnboarding>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadOnboardingQueryOptions(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 getListServicesUrl = () => {\n\n\n\n\n return `/me/services`\n}\n\n/**\n * Third-party services this account's establishment offers (E27).\n *\n * Under ``/me`` rather than ``/biblio/me`` because it is not a catalogue: these\n * are the establishment's own service tiles, and they belong to the tenant\n * whichever catalogue that tenant reads from. It is also the one place the\n * biblio spec describes something the *CVS* schema models, which is why it sat\n * in the wrong module until the prefixes made the mismatch visible.\n *\n * Date-windowed. A service outside its window is absent rather than disabled:\n * the client should not have to know the difference, and a visible dead link is\n * worse than no link.\n * @summary List Services\n */\nexport const listServices = async ( options?: Parameters<typeof request>[1]): Promise<ServiceListRead> => {\n\n return request<ServiceListRead>(getListServicesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListServicesQueryKey = () => {\n return [\n `/me/services`\n ] as const;\n }\n\n\nexport const getListServicesQueryOptions = <TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListServicesQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listServices>>> = ({ signal }) => listServices({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListServicesQueryResult = NonNullable<Awaited<ReturnType<typeof listServices>>>\nexport type ListServicesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListServices<TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listServices>>,\n TError,\n Awaited<ReturnType<typeof listServices>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListServices<TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listServices>>,\n TError,\n Awaited<ReturnType<typeof listServices>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListServices<TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Services\n */\n\nexport function useListServices<TData = Awaited<ReturnType<typeof listServices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listServices>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListServicesQueryOptions(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":";;;;;;;;;;;AA4CA,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,4BAA4B;CAKvC,OAAO;AACT;;;;;;;;;;AAWA,MAAa,gBAAgB,OAAQ,YAA2D;CAE9F,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Q;CAGV,CACF;AAAE;AAMF,MAAa,gCAAgC;CACzC,OAAO,CACP,cACA;AACA;AAGJ,MAAa,+BAAuJ,YAC/J;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,wBAAwB;CAIlE,MAAM,WAAoE,EAAE,aAAa,aAAa;EAAE;EAAQ,GAAG;CAAe,CAAC;CAMpI,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,gBACd,SACC,aACiF;CAElF,MAAM,eAAe,4BAA4B,OAAO;CAExD,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { $r as HTTPExceptionResponse, A as ThemeListRead, O as ThemeWrite, Qn as ListThemesParams, j as ThemeRead, k as ThemeOrderWrite, r as ValidationErrorResponse } from "../chunks/index.js";
|
|
3
3
|
import { a as ErrorType, c as request, n as BodyType } from "../chunks/client.js";
|
|
4
4
|
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
5
5
|
//#region src/react/admin-catalogue/admin-catalogue.d.ts
|
|
@@ -7,7 +7,7 @@ import { useMutation, 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.0
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-catalogue.js","names":[],"sources":["../../src/react/admin-catalogue/admin-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.2\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 ListThemesParams,\n ThemeListRead,\n ThemeOrderWrite,\n ThemeRead,\n ThemeWrite,\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 getListThemesUrl = (params?: ListThemesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/admin/themes?${stringifiedParams}` : `/admin/themes`\n}\n\n/**\n * Every theme, or one pillar's, in display order.\n *\n * Not paginated. There are 27 of them, and a client that has to page through\n * a list it is about to reorder cannot reorder it.\n * @summary List Themes\n */\nexport const listThemes = async (params?: ListThemesParams, options?: Parameters<typeof request>[1]): Promise<ThemeListRead> => {\n\n return request<ThemeListRead>(getListThemesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListThemesQueryKey = (params?: ListThemesParams,) => {\n return [\n `/admin/themes`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListThemesQueryOptions = <TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListThemesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListThemesQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listThemes>>> = ({ signal }) => listThemes(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListThemesQueryResult = NonNullable<Awaited<ReturnType<typeof listThemes>>>\nexport type ListThemesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListThemes<TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListThemesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listThemes>>,\n TError,\n Awaited<ReturnType<typeof listThemes>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListThemes<TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListThemesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listThemes>>,\n TError,\n Awaited<ReturnType<typeof listThemes>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListThemes<TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListThemesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Themes\n */\n\nexport function useListThemes<TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListThemesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListThemesQueryOptions(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 getCreateThemeUrl = () => {\n\n\n\n\n return `/admin/themes`\n}\n\n/**\n * Add a theme.\n *\n * ``409`` on a duplicate ``(pillar, title)``: that pair is unique in the\n * schema, and two themes with the same name in the same pillar are\n * indistinguishable to everyone downstream.\n *\n * With no ``sortOrder`` it goes last, which is what the legacy's form does by\n * defaulting the field to the current maximum plus one.\n * @summary Create Theme\n */\nexport const createTheme = async (themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ThemeRead>(getCreateThemeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateThemeMutationKey = () => ['createTheme'] as const;\n\nexport const getCreateThemeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createTheme>>, TError,CreateThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createTheme>>, TError,CreateThemeMutationVariables, TContext> => {\n\nconst mutationKey = getCreateThemeMutationKey();\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 createTheme>>, CreateThemeMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return createTheme(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateThemeMutationResult = NonNullable<Awaited<ReturnType<typeof createTheme>>>\n export type CreateThemeMutationBody = BodyType<ThemeWrite>\n export type CreateThemeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateThemeMutationVariables = {data: BodyType<ThemeWrite>}\n\n /**\n * @summary Create Theme\n */\nexport const useCreateTheme = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createTheme>>, TError,CreateThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createTheme>>,\n TError,\n CreateThemeMutationVariables,\n TContext\n > => {\n return useMutation(getCreateThemeMutationOptions(options), queryClient);\n }\n export const getReorderThemesUrl = () => {\n\n\n\n\n return `/admin/themes/order`\n}\n\n/**\n * Set the display order for a set of themes, in one transaction.\n *\n * The legacy renumbers one theme per request, so dragging an item in a list of\n * thirty was thirty requests — and closing the tab halfway left the order\n * half-applied, with two themes claiming the same position and the listing\n * silently choosing between them.\n *\n * Ids not named keep their relative order after the ones that are, so a client\n * may send only what moved. An unknown id is ``404`` and nothing is written:\n * a partially applied reorder is the failure this endpoint exists to prevent.\n * @summary Reorder Themes\n */\nexport const reorderThemes = async (themeOrderWrite: ThemeOrderWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getReorderThemesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeOrderWrite)\n }\n);}\n\n\n\n\n\nexport const getReorderThemesMutationKey = () => ['reorderThemes'] as const;\n\nexport const getReorderThemesMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof reorderThemes>>, TError,ReorderThemesMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof reorderThemes>>, TError,ReorderThemesMutationVariables, TContext> => {\n\nconst mutationKey = getReorderThemesMutationKey();\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 reorderThemes>>, ReorderThemesMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return reorderThemes(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type ReorderThemesMutationResult = NonNullable<Awaited<ReturnType<typeof reorderThemes>>>\n export type ReorderThemesMutationBody = BodyType<ThemeOrderWrite>\n export type ReorderThemesMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type ReorderThemesMutationVariables = {data: BodyType<ThemeOrderWrite>}\n\n /**\n * @summary Reorder Themes\n */\nexport const useReorderThemes = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof reorderThemes>>, TError,ReorderThemesMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof reorderThemes>>,\n TError,\n ReorderThemesMutationVariables,\n TContext\n > => {\n return useMutation(getReorderThemesMutationOptions(options), queryClient);\n }\n export const getDeleteThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Remove a theme.\n *\n * ``409`` when works still carry it. The legacy deletes and leaves the\n * references dangling, which is how a catalogue ends up with items filed under\n * a theme that no longer exists and no screen that can find them.\n *\n * Idempotent otherwise: deleting something already gone is ``204``, because\n * the caller wanted it gone and it is gone.\n * @summary Delete Theme\n */\nexport const deleteTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteThemeUrl(themeId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getDeleteThemeMutationKey = () => ['deleteTheme'] as const;\n\nexport const getDeleteThemeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTheme>>, TError,DeleteThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteTheme>>, TError,DeleteThemeMutationVariables, TContext> => {\n\nconst mutationKey = getDeleteThemeMutationKey();\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 deleteTheme>>, DeleteThemeMutationVariables> = (props) => {\n const {themeId} = props ?? {};\n\n return deleteTheme(themeId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteThemeMutationResult = NonNullable<Awaited<ReturnType<typeof deleteTheme>>>\n\n export type DeleteThemeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type DeleteThemeMutationVariables = {themeId: number}\n\n /**\n * @summary Delete Theme\n */\nexport const useDeleteTheme = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTheme>>, TError,DeleteThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof deleteTheme>>,\n TError,\n DeleteThemeMutationVariables,\n TContext\n > => {\n return useMutation(getDeleteThemeMutationOptions(options), queryClient);\n }\n export const getReadThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * One theme.\n * @summary Read Theme\n */\nexport const readTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n return request<ThemeRead>(getReadThemeUrl(themeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadThemeQueryKey = (themeId: number,) => {\n return [\n `/admin/themes/${themeId}`\n ] as const;\n }\n\n\nexport const getReadThemeQueryOptions = <TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(themeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadThemeQueryKey(themeId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readTheme>>> = ({ signal }) => readTheme(themeId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: themeId !== null && themeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadThemeQueryResult = NonNullable<Awaited<ReturnType<typeof readTheme>>>\nexport type ReadThemeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadTheme<TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n themeId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readTheme>>,\n TError,\n Awaited<ReturnType<typeof readTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadTheme<TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n themeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readTheme>>,\n TError,\n Awaited<ReturnType<typeof readTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadTheme<TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n themeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Theme\n */\n\nexport function useReadTheme<TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n themeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadThemeQueryOptions(themeId,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 getAmendThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Amend a theme. Same uniqueness rule as creating one.\n * @summary Amend Theme\n */\nexport const amendTheme = async (themeId: number,\n themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ThemeRead>(getAmendThemeUrl(themeId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\n\n\n\nexport const getAmendThemeMutationKey = () => ['amendTheme'] as const;\n\nexport const getAmendThemeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof amendTheme>>, TError,AmendThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof amendTheme>>, TError,AmendThemeMutationVariables, TContext> => {\n\nconst mutationKey = getAmendThemeMutationKey();\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 amendTheme>>, AmendThemeMutationVariables> = (props) => {\n const {themeId,data} = props ?? {};\n\n return amendTheme(themeId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AmendThemeMutationResult = NonNullable<Awaited<ReturnType<typeof amendTheme>>>\n export type AmendThemeMutationBody = BodyType<ThemeWrite>\n export type AmendThemeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type AmendThemeMutationVariables = {themeId: number;data: BodyType<ThemeWrite>}\n\n /**\n * @summary Amend Theme\n */\nexport const useAmendTheme = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof amendTheme>>, TError,AmendThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof amendTheme>>,\n TError,\n AmendThemeMutationVariables,\n TContext\n > => {\n return useMutation(getAmendThemeMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AA4CA,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,oBAAoB,WAA+B;CAC9D,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,iBAAiB,sBAAsB;AAC/E;;;;;;;;AASA,MAAa,aAAa,OAAO,QAA2B,YAAoE;CAE9H,OAAO,QAAuB,iBAAiB,MAAM,GACrD;EACE,GAAG;EACH,QAAQ;CAGV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,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,UAAU;CACjC,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,SAAQ,SAAQ,SAAS,CAAC;EAEjC,OAAQ,WAAW,SAAQ,MAAK,cAAc;CAChD;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,iBACW,SACrB,gBAKQ;CACL,OAAO,YAAY,6BAA6B,OAAO,GAAG,WAAW;AACvE"}
|
|
1
|
+
{"version":3,"file":"admin-catalogue.js","names":[],"sources":["../../src/react/admin-catalogue/admin-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.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 HTTPExceptionResponse,\n ListThemesParams,\n ThemeListRead,\n ThemeOrderWrite,\n ThemeRead,\n ThemeWrite,\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 getListThemesUrl = (params?: ListThemesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/admin/themes?${stringifiedParams}` : `/admin/themes`\n}\n\n/**\n * Every theme, or one pillar's, in display order.\n *\n * Not paginated. There are 27 of them, and a client that has to page through\n * a list it is about to reorder cannot reorder it.\n * @summary List Themes\n */\nexport const listThemes = async (params?: ListThemesParams, options?: Parameters<typeof request>[1]): Promise<ThemeListRead> => {\n\n return request<ThemeListRead>(getListThemesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListThemesQueryKey = (params?: ListThemesParams,) => {\n return [\n `/admin/themes`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListThemesQueryOptions = <TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListThemesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListThemesQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listThemes>>> = ({ signal }) => listThemes(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListThemesQueryResult = NonNullable<Awaited<ReturnType<typeof listThemes>>>\nexport type ListThemesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListThemes<TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListThemesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listThemes>>,\n TError,\n Awaited<ReturnType<typeof listThemes>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListThemes<TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListThemesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listThemes>>,\n TError,\n Awaited<ReturnType<typeof listThemes>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListThemes<TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListThemesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Themes\n */\n\nexport function useListThemes<TData = Awaited<ReturnType<typeof listThemes>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListThemesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listThemes>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListThemesQueryOptions(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 getCreateThemeUrl = () => {\n\n\n\n\n return `/admin/themes`\n}\n\n/**\n * Add a theme.\n *\n * ``409`` on a duplicate ``(pillar, title)``: that pair is unique in the\n * schema, and two themes with the same name in the same pillar are\n * indistinguishable to everyone downstream.\n *\n * With no ``sortOrder`` it goes last, which is what the legacy's form does by\n * defaulting the field to the current maximum plus one.\n * @summary Create Theme\n */\nexport const createTheme = async (themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ThemeRead>(getCreateThemeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateThemeMutationKey = () => ['createTheme'] as const;\n\nexport const getCreateThemeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createTheme>>, TError,CreateThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createTheme>>, TError,CreateThemeMutationVariables, TContext> => {\n\nconst mutationKey = getCreateThemeMutationKey();\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 createTheme>>, CreateThemeMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return createTheme(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateThemeMutationResult = NonNullable<Awaited<ReturnType<typeof createTheme>>>\n export type CreateThemeMutationBody = BodyType<ThemeWrite>\n export type CreateThemeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateThemeMutationVariables = {data: BodyType<ThemeWrite>}\n\n /**\n * @summary Create Theme\n */\nexport const useCreateTheme = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createTheme>>, TError,CreateThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createTheme>>,\n TError,\n CreateThemeMutationVariables,\n TContext\n > => {\n return useMutation(getCreateThemeMutationOptions(options), queryClient);\n }\n export const getReorderThemesUrl = () => {\n\n\n\n\n return `/admin/themes/order`\n}\n\n/**\n * Set the display order for a set of themes, in one transaction.\n *\n * The legacy renumbers one theme per request, so dragging an item in a list of\n * thirty was thirty requests — and closing the tab halfway left the order\n * half-applied, with two themes claiming the same position and the listing\n * silently choosing between them.\n *\n * Ids not named keep their relative order after the ones that are, so a client\n * may send only what moved. An unknown id is ``404`` and nothing is written:\n * a partially applied reorder is the failure this endpoint exists to prevent.\n * @summary Reorder Themes\n */\nexport const reorderThemes = async (themeOrderWrite: ThemeOrderWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getReorderThemesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeOrderWrite)\n }\n);}\n\n\n\n\n\nexport const getReorderThemesMutationKey = () => ['reorderThemes'] as const;\n\nexport const getReorderThemesMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof reorderThemes>>, TError,ReorderThemesMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof reorderThemes>>, TError,ReorderThemesMutationVariables, TContext> => {\n\nconst mutationKey = getReorderThemesMutationKey();\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 reorderThemes>>, ReorderThemesMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return reorderThemes(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type ReorderThemesMutationResult = NonNullable<Awaited<ReturnType<typeof reorderThemes>>>\n export type ReorderThemesMutationBody = BodyType<ThemeOrderWrite>\n export type ReorderThemesMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type ReorderThemesMutationVariables = {data: BodyType<ThemeOrderWrite>}\n\n /**\n * @summary Reorder Themes\n */\nexport const useReorderThemes = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof reorderThemes>>, TError,ReorderThemesMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof reorderThemes>>,\n TError,\n ReorderThemesMutationVariables,\n TContext\n > => {\n return useMutation(getReorderThemesMutationOptions(options), queryClient);\n }\n export const getDeleteThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Remove a theme.\n *\n * ``409`` when works still carry it. The legacy deletes and leaves the\n * references dangling, which is how a catalogue ends up with items filed under\n * a theme that no longer exists and no screen that can find them.\n *\n * Idempotent otherwise: deleting something already gone is ``204``, because\n * the caller wanted it gone and it is gone.\n * @summary Delete Theme\n */\nexport const deleteTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteThemeUrl(themeId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getDeleteThemeMutationKey = () => ['deleteTheme'] as const;\n\nexport const getDeleteThemeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTheme>>, TError,DeleteThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteTheme>>, TError,DeleteThemeMutationVariables, TContext> => {\n\nconst mutationKey = getDeleteThemeMutationKey();\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 deleteTheme>>, DeleteThemeMutationVariables> = (props) => {\n const {themeId} = props ?? {};\n\n return deleteTheme(themeId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteThemeMutationResult = NonNullable<Awaited<ReturnType<typeof deleteTheme>>>\n\n export type DeleteThemeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type DeleteThemeMutationVariables = {themeId: number}\n\n /**\n * @summary Delete Theme\n */\nexport const useDeleteTheme = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTheme>>, TError,DeleteThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof deleteTheme>>,\n TError,\n DeleteThemeMutationVariables,\n TContext\n > => {\n return useMutation(getDeleteThemeMutationOptions(options), queryClient);\n }\n export const getReadThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * One theme.\n * @summary Read Theme\n */\nexport const readTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n return request<ThemeRead>(getReadThemeUrl(themeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadThemeQueryKey = (themeId: number,) => {\n return [\n `/admin/themes/${themeId}`\n ] as const;\n }\n\n\nexport const getReadThemeQueryOptions = <TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(themeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadThemeQueryKey(themeId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readTheme>>> = ({ signal }) => readTheme(themeId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: themeId !== null && themeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadThemeQueryResult = NonNullable<Awaited<ReturnType<typeof readTheme>>>\nexport type ReadThemeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadTheme<TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n themeId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readTheme>>,\n TError,\n Awaited<ReturnType<typeof readTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadTheme<TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n themeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readTheme>>,\n TError,\n Awaited<ReturnType<typeof readTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadTheme<TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n themeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Theme\n */\n\nexport function useReadTheme<TData = Awaited<ReturnType<typeof readTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n themeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadThemeQueryOptions(themeId,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 getAmendThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Amend a theme. Same uniqueness rule as creating one.\n * @summary Amend Theme\n */\nexport const amendTheme = async (themeId: number,\n themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ThemeRead>(getAmendThemeUrl(themeId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\n\n\n\nexport const getAmendThemeMutationKey = () => ['amendTheme'] as const;\n\nexport const getAmendThemeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof amendTheme>>, TError,AmendThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof amendTheme>>, TError,AmendThemeMutationVariables, TContext> => {\n\nconst mutationKey = getAmendThemeMutationKey();\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 amendTheme>>, AmendThemeMutationVariables> = (props) => {\n const {themeId,data} = props ?? {};\n\n return amendTheme(themeId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AmendThemeMutationResult = NonNullable<Awaited<ReturnType<typeof amendTheme>>>\n export type AmendThemeMutationBody = BodyType<ThemeWrite>\n export type AmendThemeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type AmendThemeMutationVariables = {themeId: number;data: BodyType<ThemeWrite>}\n\n /**\n * @summary Amend Theme\n */\nexport const useAmendTheme = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof amendTheme>>, TError,AmendThemeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof amendTheme>>,\n TError,\n AmendThemeMutationVariables,\n TContext\n > => {\n return useMutation(getAmendThemeMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AA4CA,MAAM,gBAAqC,OAAU,aAAqC;CACxF,MAAM,SAAS,EAAE,SAAS;CAC1B,KAAK,MAAM,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G,WAAW;AACvE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { $r as HTTPExceptionResponse, Tr as LeaseCloseWrite, Xn as LiveLeaseListRead, r as ValidationErrorResponse } from "../chunks/index.js";
|
|
3
3
|
import { a as ErrorType, c as request, n as BodyType } from "../chunks/client.js";
|
|
4
4
|
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
5
5
|
//#region src/react/admin-consumption/admin-consumption.d.ts
|
|
@@ -7,7 +7,7 @@ import { useMutation, 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.0
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|