@learnorama/mozaik-sdk 0.1.0-staging.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -0
- package/dist/api/account.d.ts +75 -0
- package/dist/api/account.js +117 -0
- package/dist/api/account.js.map +1 -0
- package/dist/api/admin-catalogue.d.ts +68 -0
- package/dist/api/admin-catalogue.js +155 -0
- package/dist/api/admin-catalogue.js.map +1 -0
- package/dist/api/admin-consumption.d.ts +27 -0
- package/dist/api/admin-consumption.js +55 -0
- package/dist/api/admin-consumption.js.map +1 -0
- package/dist/api/admin-licenses.d.ts +21 -0
- package/dist/api/admin-licenses.js +34 -0
- package/dist/api/admin-licenses.js.map +1 -0
- package/dist/api/admin-patrons.d.ts +36 -0
- package/dist/api/admin-patrons.js +76 -0
- package/dist/api/admin-patrons.js.map +1 -0
- package/dist/api/admin-reviews.d.ts +30 -0
- package/dist/api/admin-reviews.js +63 -0
- package/dist/api/admin-reviews.js.map +1 -0
- package/dist/api/admin-roles.d.ts +34 -0
- package/dist/api/admin-roles.js +62 -0
- package/dist/api/admin-roles.js.map +1 -0
- package/dist/api/admin-support.d.ts +68 -0
- package/dist/api/admin-support.js +116 -0
- package/dist/api/admin-support.js.map +1 -0
- package/dist/api/admin-tenants.d.ts +33 -0
- package/dist/api/admin-tenants.js +68 -0
- package/dist/api/admin-tenants.js.map +1 -0
- package/dist/api/admin-tutoring.d.ts +159 -0
- package/dist/api/admin-tutoring.js +455 -0
- package/dist/api/admin-tutoring.js.map +1 -0
- package/dist/api/auth.d.ts +92 -0
- package/dist/api/auth.js +192 -0
- package/dist/api/auth.js.map +1 -0
- package/dist/api/biblio-catalogue.d.ts +122 -0
- package/dist/api/biblio-catalogue.js +223 -0
- package/dist/api/biblio-catalogue.js.map +1 -0
- package/dist/api/biblio-home.d.ts +18 -0
- package/dist/api/biblio-home.js +31 -0
- package/dist/api/biblio-home.js.map +1 -0
- package/dist/api/biblio-library.d.ts +94 -0
- package/dist/api/biblio-library.js +187 -0
- package/dist/api/biblio-library.js.map +1 -0
- package/dist/api/biblio-nextory.d.ts +43 -0
- package/dist/api/biblio-nextory.js +65 -0
- package/dist/api/biblio-nextory.js.map +1 -0
- package/dist/api/biblio-press.d.ts +38 -0
- package/dist/api/biblio-press.js +70 -0
- package/dist/api/biblio-press.js.map +1 -0
- package/dist/api/biblio-search.d.ts +17 -0
- package/dist/api/biblio-search.js +30 -0
- package/dist/api/biblio-search.js.map +1 -0
- package/dist/api/biblio-telemetry.d.ts +28 -0
- package/dist/api/biblio-telemetry.js +49 -0
- package/dist/api/biblio-telemetry.js.map +1 -0
- package/dist/api/consumption.d.ts +30 -0
- package/dist/api/consumption.js +45 -0
- package/dist/api/consumption.js.map +1 -0
- package/dist/api/cvs-app.d.ts +39 -0
- package/dist/api/cvs-app.js +72 -0
- package/dist/api/cvs-app.js.map +1 -0
- package/dist/api/cvs-documents.d.ts +106 -0
- package/dist/api/cvs-documents.js +208 -0
- package/dist/api/cvs-documents.js.map +1 -0
- package/dist/api/cvs-favorites.d.ts +53 -0
- package/dist/api/cvs-favorites.js +82 -0
- package/dist/api/cvs-favorites.js.map +1 -0
- package/dist/api/cvs-loans.d.ts +59 -0
- package/dist/api/cvs-loans.js +106 -0
- package/dist/api/cvs-loans.js.map +1 -0
- package/dist/api/cvs-streaming.d.ts +40 -0
- package/dist/api/cvs-streaming.js +68 -0
- package/dist/api/cvs-streaming.js.map +1 -0
- package/dist/api/index.d.ts +34 -0
- package/dist/api/index.js +34 -0
- package/dist/api/partner-catalogue.d.ts +77 -0
- package/dist/api/partner-catalogue.js +125 -0
- package/dist/api/partner-catalogue.js.map +1 -0
- package/dist/api/partner-reader.d.ts +56 -0
- package/dist/api/partner-reader.js +103 -0
- package/dist/api/partner-reader.js.map +1 -0
- package/dist/api/profiles.d.ts +64 -0
- package/dist/api/profiles.js +126 -0
- package/dist/api/profiles.js.map +1 -0
- package/dist/api/tutoring-catalogue.d.ts +32 -0
- package/dist/api/tutoring-catalogue.js +59 -0
- package/dist/api/tutoring-catalogue.js.map +1 -0
- package/dist/api/tutoring-chat.d.ts +31 -0
- package/dist/api/tutoring-chat.js +71 -0
- package/dist/api/tutoring-chat.js.map +1 -0
- package/dist/api/tutoring-dispatch.d.ts +37 -0
- package/dist/api/tutoring-dispatch.js +83 -0
- package/dist/api/tutoring-dispatch.js.map +1 -0
- package/dist/api/tutoring-practitioner.d.ts +55 -0
- package/dist/api/tutoring-practitioner.js +110 -0
- package/dist/api/tutoring-practitioner.js.map +1 -0
- package/dist/api/tutoring-requests.d.ts +86 -0
- package/dist/api/tutoring-requests.js +176 -0
- package/dist/api/tutoring-requests.js.map +1 -0
- package/dist/chunks/client.d.ts +28 -0
- package/dist/chunks/client.js +61 -0
- package/dist/chunks/client.js.map +1 -0
- package/dist/chunks/index.d.ts +4566 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/models.d.ts +3 -0
- package/dist/models.js +175 -0
- package/dist/models.js.map +1 -0
- package/dist/react/account.d.ts +163 -0
- package/dist/react/account.js +240 -0
- package/dist/react/account.js.map +1 -0
- package/dist/react/admin-catalogue.d.ts +196 -0
- package/dist/react/admin-catalogue.js +336 -0
- package/dist/react/admin-catalogue.js.map +1 -0
- package/dist/react/admin-consumption.d.ts +75 -0
- package/dist/react/admin-consumption.js +127 -0
- package/dist/react/admin-consumption.js.map +1 -0
- package/dist/react/admin-licenses.d.ts +50 -0
- package/dist/react/admin-licenses.js +78 -0
- package/dist/react/admin-licenses.js.map +1 -0
- package/dist/react/admin-patrons.d.ts +111 -0
- package/dist/react/admin-patrons.js +173 -0
- package/dist/react/admin-patrons.js.map +1 -0
- package/dist/react/admin-reviews.d.ts +78 -0
- package/dist/react/admin-reviews.js +135 -0
- package/dist/react/admin-reviews.js.map +1 -0
- package/dist/react/admin-roles.d.ts +82 -0
- package/dist/react/admin-roles.js +135 -0
- package/dist/react/admin-roles.js.map +1 -0
- package/dist/react/admin-support.d.ts +123 -0
- package/dist/react/admin-support.js +208 -0
- package/dist/react/admin-support.js.map +1 -0
- package/dist/react/admin-tenants.d.ts +108 -0
- package/dist/react/admin-tenants.js +165 -0
- package/dist/react/admin-tenants.js.map +1 -0
- package/dist/react/admin-tutoring.d.ts +556 -0
- package/dist/react/admin-tutoring.js +954 -0
- package/dist/react/admin-tutoring.js.map +1 -0
- package/dist/react/auth.d.ts +220 -0
- package/dist/react/auth.js +372 -0
- package/dist/react/auth.js.map +1 -0
- package/dist/react/biblio-catalogue.d.ts +374 -0
- package/dist/react/biblio-catalogue.js +498 -0
- package/dist/react/biblio-catalogue.js.map +1 -0
- package/dist/react/biblio-home.d.ts +47 -0
- package/dist/react/biblio-home.js +75 -0
- package/dist/react/biblio-home.js.map +1 -0
- package/dist/react/biblio-library.d.ts +285 -0
- package/dist/react/biblio-library.js +411 -0
- package/dist/react/biblio-library.js.map +1 -0
- package/dist/react/biblio-nextory.d.ts +100 -0
- package/dist/react/biblio-nextory.js +163 -0
- package/dist/react/biblio-nextory.js.map +1 -0
- package/dist/react/biblio-press.d.ts +121 -0
- package/dist/react/biblio-press.js +163 -0
- package/dist/react/biblio-press.js.map +1 -0
- package/dist/react/biblio-search.d.ts +46 -0
- package/dist/react/biblio-search.js +74 -0
- package/dist/react/biblio-search.js.map +1 -0
- package/dist/react/biblio-telemetry.d.ts +49 -0
- package/dist/react/biblio-telemetry.js +85 -0
- package/dist/react/biblio-telemetry.js.map +1 -0
- package/dist/react/consumption.d.ts +66 -0
- package/dist/react/consumption.js +109 -0
- package/dist/react/consumption.js.map +1 -0
- package/dist/react/cvs-app.d.ts +86 -0
- package/dist/react/cvs-app.js +144 -0
- package/dist/react/cvs-app.js.map +1 -0
- package/dist/react/cvs-documents.d.ts +254 -0
- package/dist/react/cvs-documents.js +418 -0
- package/dist/react/cvs-documents.js.map +1 -0
- package/dist/react/cvs-favorites.d.ts +143 -0
- package/dist/react/cvs-favorites.js +206 -0
- package/dist/react/cvs-favorites.js.map +1 -0
- package/dist/react/cvs-loans.d.ts +140 -0
- package/dist/react/cvs-loans.js +234 -0
- package/dist/react/cvs-loans.js.map +1 -0
- package/dist/react/cvs-streaming.d.ts +87 -0
- package/dist/react/cvs-streaming.js +141 -0
- package/dist/react/cvs-streaming.js.map +1 -0
- package/dist/react/index.d.ts +34 -0
- package/dist/react/index.js +34 -0
- package/dist/react/partner-catalogue.d.ts +223 -0
- package/dist/react/partner-catalogue.js +301 -0
- package/dist/react/partner-catalogue.js.map +1 -0
- package/dist/react/partner-reader.d.ts +159 -0
- package/dist/react/partner-reader.js +226 -0
- package/dist/react/partner-reader.js.map +1 -0
- package/dist/react/profiles.d.ts +174 -0
- package/dist/react/profiles.js +279 -0
- package/dist/react/profiles.js.map +1 -0
- package/dist/react/tutoring-catalogue.d.ts +115 -0
- package/dist/react/tutoring-catalogue.js +151 -0
- package/dist/react/tutoring-catalogue.js.map +1 -0
- package/dist/react/tutoring-chat.d.ts +96 -0
- package/dist/react/tutoring-chat.js +172 -0
- package/dist/react/tutoring-chat.js.map +1 -0
- package/dist/react/tutoring-dispatch.d.ts +102 -0
- package/dist/react/tutoring-dispatch.js +183 -0
- package/dist/react/tutoring-dispatch.js.map +1 -0
- package/dist/react/tutoring-practitioner.d.ts +129 -0
- package/dist/react/tutoring-practitioner.js +230 -0
- package/dist/react/tutoring-practitioner.js.map +1 -0
- package/dist/react/tutoring-requests.d.ts +233 -0
- package/dist/react/tutoring-requests.js +385 -0
- package/dist/react/tutoring-requests.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
import { Gn as HTTPExceptionResponse, Kn as HomeFeedRead, st as ReadHomeFeedParams, t as ValidationErrorResponse } from "../chunks/index.js";
|
|
3
|
+
import { a as ErrorType, c as request } from "../chunks/client.js";
|
|
4
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
5
|
+
//#region src/react/biblio-home/biblio-home.d.ts
|
|
6
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
7
|
+
export declare const getReadHomeFeedUrl: (params?: ReadHomeFeedParams) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Everything the home screen needs, in one call (E48).
|
|
10
|
+
*
|
|
11
|
+
* Each block is built independently and a block that raises is dropped. The
|
|
12
|
+
* caller can tell the difference — an absent key means the section could not be
|
|
13
|
+
* built, an empty list means there was nothing in it — which is more than the
|
|
14
|
+
* legacy offered, where four carousels were hardcoded to empty and looked
|
|
15
|
+
* identical to "nothing new".
|
|
16
|
+
* @summary Read Home Feed
|
|
17
|
+
*/
|
|
18
|
+
export declare const readHomeFeed: (params?: ReadHomeFeedParams, options?: Parameters<typeof request>[1]) => Promise<HomeFeedRead>;
|
|
19
|
+
export declare const getReadHomeFeedQueryKey: (params?: ReadHomeFeedParams) => readonly ["/biblio/home-feed", ...ReadHomeFeedParams[]];
|
|
20
|
+
export declare const getReadHomeFeedQueryOptions: <TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadHomeFeedParams, options?: {
|
|
21
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>;
|
|
22
|
+
request?: SecondParameter<typeof request>;
|
|
23
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData> & {
|
|
24
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
25
|
+
};
|
|
26
|
+
export type ReadHomeFeedQueryResult = NonNullable<Awaited<ReturnType<typeof readHomeFeed>>>;
|
|
27
|
+
export type ReadHomeFeedQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
28
|
+
export declare function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ReadHomeFeedParams, options: {
|
|
29
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, Awaited<ReturnType<typeof readHomeFeed>>>, 'initialData'>;
|
|
30
|
+
request?: SecondParameter<typeof request>;
|
|
31
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
32
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
33
|
+
};
|
|
34
|
+
export declare function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadHomeFeedParams, options?: {
|
|
35
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, Awaited<ReturnType<typeof readHomeFeed>>>, 'initialData'>;
|
|
36
|
+
request?: SecondParameter<typeof request>;
|
|
37
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
38
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
39
|
+
};
|
|
40
|
+
export declare function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadHomeFeedParams, options?: {
|
|
41
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>;
|
|
42
|
+
request?: SecondParameter<typeof request>;
|
|
43
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
44
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
//# sourceMappingURL=biblio-home.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { r as request } from "../chunks/client.js";
|
|
3
|
+
import { useQuery } from "@tanstack/react-query";
|
|
4
|
+
//#region src/react/biblio-home/biblio-home.ts
|
|
5
|
+
/**
|
|
6
|
+
* Generated by orval 🍺
|
|
7
|
+
* Do not edit manually.
|
|
8
|
+
* Mozaik backend
|
|
9
|
+
* Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.
|
|
10
|
+
* OpenAPI spec version: 0.1.0
|
|
11
|
+
*/
|
|
12
|
+
const withQueryKey = (query, queryKey) => {
|
|
13
|
+
const result = { queryKey };
|
|
14
|
+
for (const key of Object.keys(query)) {
|
|
15
|
+
if (key === "queryKey") continue;
|
|
16
|
+
Object.defineProperty(result, key, {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
get: () => query[key]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
const getReadHomeFeedUrl = (params) => {
|
|
25
|
+
const normalizedParams = new URLSearchParams();
|
|
26
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
27
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
28
|
+
});
|
|
29
|
+
const stringifiedParams = normalizedParams.toString();
|
|
30
|
+
return stringifiedParams.length > 0 ? `/biblio/home-feed?${stringifiedParams}` : `/biblio/home-feed`;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Everything the home screen needs, in one call (E48).
|
|
34
|
+
*
|
|
35
|
+
* Each block is built independently and a block that raises is dropped. The
|
|
36
|
+
* caller can tell the difference — an absent key means the section could not be
|
|
37
|
+
* built, an empty list means there was nothing in it — which is more than the
|
|
38
|
+
* legacy offered, where four carousels were hardcoded to empty and looked
|
|
39
|
+
* identical to "nothing new".
|
|
40
|
+
* @summary Read Home Feed
|
|
41
|
+
*/
|
|
42
|
+
const readHomeFeed = async (params, options) => {
|
|
43
|
+
return request(getReadHomeFeedUrl(params), {
|
|
44
|
+
...options,
|
|
45
|
+
method: "GET"
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const getReadHomeFeedQueryKey = (params) => {
|
|
49
|
+
return [`/biblio/home-feed`, ...params ? [params] : []];
|
|
50
|
+
};
|
|
51
|
+
const getReadHomeFeedQueryOptions = (params, options) => {
|
|
52
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
53
|
+
const queryKey = queryOptions?.queryKey ?? getReadHomeFeedQueryKey(params);
|
|
54
|
+
const queryFn = ({ signal }) => readHomeFeed(params, {
|
|
55
|
+
signal,
|
|
56
|
+
...requestOptions
|
|
57
|
+
});
|
|
58
|
+
return {
|
|
59
|
+
queryKey,
|
|
60
|
+
queryFn,
|
|
61
|
+
...queryOptions
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @summary Read Home Feed
|
|
66
|
+
*/
|
|
67
|
+
function useReadHomeFeed(params, options, queryClient) {
|
|
68
|
+
const queryOptions = getReadHomeFeedQueryOptions(params, options);
|
|
69
|
+
const query = useQuery(queryOptions, queryClient);
|
|
70
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { getReadHomeFeedQueryKey, getReadHomeFeedQueryOptions, getReadHomeFeedUrl, readHomeFeed, useReadHomeFeed };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=biblio-home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biblio-home.js","names":[],"sources":["../../src/react/biblio-home/biblio-home.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.1.0\n */\nimport {\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n HomeFeedRead,\n ReadHomeFeedParams,\n ValidationErrorResponse\n} from '../../models';\n\nimport { request } from '../../client';\nimport type { ErrorType } from '../../client';\n\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n\n\nconst withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {\n const result = { queryKey } as T & { queryKey: K };\n for (const key of Object.keys(query)) {\n // The explicit queryKey always wins, matching the previous\n // `{ ...query, queryKey }` spread where it was set last.\n if (key === 'queryKey') continue;\n Object.defineProperty(result, key, {\n enumerable: true,\n configurable: true,\n get: () => (query as Record<string, unknown>)[key],\n });\n }\n return result;\n};\n\nexport const getReadHomeFeedUrl = (params?: ReadHomeFeedParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/home-feed?${stringifiedParams}` : `/biblio/home-feed`\n}\n\n/**\n * Everything the home screen needs, in one call (E48).\n *\n * Each block is built independently and a block that raises is dropped. The\n * caller can tell the difference — an absent key means the section could not be\n * built, an empty list means there was nothing in it — which is more than the\n * legacy offered, where four carousels were hardcoded to empty and looked\n * identical to \"nothing new\".\n * @summary Read Home Feed\n */\nexport const readHomeFeed = async (params?: ReadHomeFeedParams, options?: Parameters<typeof request>[1]): Promise<HomeFeedRead> => {\n\n return request<HomeFeedRead>(getReadHomeFeedUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadHomeFeedQueryKey = (params?: ReadHomeFeedParams,) => {\n return [\n `/biblio/home-feed`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadHomeFeedQueryOptions = <TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadHomeFeedQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readHomeFeed>>> = ({ signal }) => readHomeFeed(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadHomeFeedQueryResult = NonNullable<Awaited<ReturnType<typeof readHomeFeed>>>\nexport type ReadHomeFeedQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ReadHomeFeedParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHomeFeed>>,\n TError,\n Awaited<ReturnType<typeof readHomeFeed>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHomeFeed>>,\n TError,\n Awaited<ReturnType<typeof readHomeFeed>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Home Feed\n */\n\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadHomeFeedQueryOptions(params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\n"],"mappings":";;;;;;;;;;;AAqCA,MAAM,gBAAqC,OAAU,aAAqC;CACxF,MAAM,SAAS,EAAE,SAAS;CAC1B,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG;EAGpC,IAAI,QAAQ,YAAY;EACxB,OAAO,eAAe,QAAQ,KAAK;GACjC,YAAY;GACZ,cAAc;GACd,WAAY,MAAkC;EAChD,CAAC;CACH;CACA,OAAO;AACT;AAEA,MAAa,sBAAsB,WAAiC;CAClE,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,qBAAqB,sBAAsB;AACnF;;;;;;;;;;;AAYA,MAAa,eAAe,OAAO,QAA6B,YAAmE;CAEjI,OAAO,QAAsB,mBAAmB,MAAM,GACtD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,2BAA2B,WAAiC;CACrE,OAAO,CACP,qBAAqB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAC9C;AACA;AAGJ,MAAa,+BAAsJ,QAA6B,YAC3L;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,wBAAwB,MAAM;CAIxE,MAAM,WAAoE,EAAE,aAAa,aAAa,QAAQ;EAAE;EAAQ,GAAG;CAAe,CAAC;CAM5I,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,gBACf,QAA6B,SAC3B,aACiF;CAElF,MAAM,eAAe,4BAA4B,QAAO,OAAO;CAE/D,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD"}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
|
|
2
|
+
import { $n as FavoritePage, Ct as PreferencesRead, Fr as CategoryListRead, Gn as HTTPExceptionResponse, Ht as PackListRead, Pr as CategoryPreferencesWrite, Tn as ListBiblioFavoritesParams, Zn as HistoryPage, bn as ListHistoryParams, ir as FavoriteAddWrite, t as ValidationErrorResponse } from "../chunks/index.js";
|
|
3
|
+
import { a as ErrorType, c as request, n as BodyType } from "../chunks/client.js";
|
|
4
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
5
|
+
//#region src/react/biblio-library/biblio-library.d.ts
|
|
6
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
7
|
+
export declare const getListBiblioCategoriesUrl: () => string;
|
|
8
|
+
/**
|
|
9
|
+
* The categories this account can reach (E26).
|
|
10
|
+
*
|
|
11
|
+
* Two independent gates, and both have to pass. Entitlement answers "did the
|
|
12
|
+
* company buy this"; ``access_level`` answers "is this person allowed it" — an
|
|
13
|
+
* ordinal on the account compared against one on the category, which is how a
|
|
14
|
+
* child profile is kept out of the adult catalogue. Neither substitutes for the
|
|
15
|
+
* other.
|
|
16
|
+
* @summary List Biblio Categories
|
|
17
|
+
*/
|
|
18
|
+
export declare const listBiblioCategories: (options?: Parameters<typeof request>[1]) => Promise<CategoryListRead>;
|
|
19
|
+
export declare const getListBiblioCategoriesQueryKey: () => readonly [`/biblio/me/categories`];
|
|
20
|
+
export declare const getListBiblioCategoriesQueryOptions: <TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
21
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>>;
|
|
22
|
+
request?: SecondParameter<typeof request>;
|
|
23
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData> & {
|
|
24
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
25
|
+
};
|
|
26
|
+
export type ListBiblioCategoriesQueryResult = NonNullable<Awaited<ReturnType<typeof listBiblioCategories>>>;
|
|
27
|
+
export type ListBiblioCategoriesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
28
|
+
export declare function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options: {
|
|
29
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, Awaited<ReturnType<typeof listBiblioCategories>>>, 'initialData'>;
|
|
30
|
+
request?: SecondParameter<typeof request>;
|
|
31
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
32
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
33
|
+
};
|
|
34
|
+
export declare function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
35
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, Awaited<ReturnType<typeof listBiblioCategories>>>, 'initialData'>;
|
|
36
|
+
request?: SecondParameter<typeof request>;
|
|
37
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
38
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
39
|
+
};
|
|
40
|
+
export declare function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
41
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>>;
|
|
42
|
+
request?: SecondParameter<typeof request>;
|
|
43
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
44
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
45
|
+
};
|
|
46
|
+
export declare const getListBiblioFavoritesUrl: (params?: ListBiblioFavoritesParams) => string;
|
|
47
|
+
/**
|
|
48
|
+
* The caller's favourites (E30), newest first.
|
|
49
|
+
* @summary List Biblio Favorites
|
|
50
|
+
*/
|
|
51
|
+
export declare const listBiblioFavorites: (params?: ListBiblioFavoritesParams, options?: Parameters<typeof request>[1]) => Promise<FavoritePage>;
|
|
52
|
+
export declare const getListBiblioFavoritesQueryKey: (params?: ListBiblioFavoritesParams) => readonly ["/biblio/me/favorites", ...ListBiblioFavoritesParams[]];
|
|
53
|
+
export declare const getListBiblioFavoritesQueryOptions: <TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListBiblioFavoritesParams, options?: {
|
|
54
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>>;
|
|
55
|
+
request?: SecondParameter<typeof request>;
|
|
56
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData> & {
|
|
57
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
58
|
+
};
|
|
59
|
+
export type ListBiblioFavoritesQueryResult = NonNullable<Awaited<ReturnType<typeof listBiblioFavorites>>>;
|
|
60
|
+
export type ListBiblioFavoritesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
61
|
+
export declare function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ListBiblioFavoritesParams, options: {
|
|
62
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, Awaited<ReturnType<typeof listBiblioFavorites>>>, 'initialData'>;
|
|
63
|
+
request?: SecondParameter<typeof request>;
|
|
64
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
65
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
66
|
+
};
|
|
67
|
+
export declare function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListBiblioFavoritesParams, options?: {
|
|
68
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, Awaited<ReturnType<typeof listBiblioFavorites>>>, 'initialData'>;
|
|
69
|
+
request?: SecondParameter<typeof request>;
|
|
70
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
71
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
72
|
+
};
|
|
73
|
+
export declare function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListBiblioFavoritesParams, options?: {
|
|
74
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>>;
|
|
75
|
+
request?: SecondParameter<typeof request>;
|
|
76
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
77
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
78
|
+
};
|
|
79
|
+
export declare const getRemoveBiblioFavoriteUrl: (contentId: number) => string;
|
|
80
|
+
/**
|
|
81
|
+
* Remove a favourite (E32). Idempotent — absent is already the desired state.
|
|
82
|
+
* @summary Remove Biblio Favorite
|
|
83
|
+
*/
|
|
84
|
+
export declare const removeBiblioFavorite: (contentId: number, options?: Parameters<typeof request>[1]) => Promise<void>;
|
|
85
|
+
export declare const getRemoveBiblioFavoriteMutationKey: () => readonly ['removeBiblioFavorite'];
|
|
86
|
+
export declare const getRemoveBiblioFavoriteMutationOptions: <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>, TContext = unknown>(options?: {
|
|
87
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError, RemoveBiblioFavoriteMutationVariables, TContext>;
|
|
88
|
+
request?: SecondParameter<typeof request>;
|
|
89
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError, RemoveBiblioFavoriteMutationVariables, TContext>;
|
|
90
|
+
export type RemoveBiblioFavoriteMutationResult = NonNullable<Awaited<ReturnType<typeof removeBiblioFavorite>>>;
|
|
91
|
+
export type RemoveBiblioFavoriteMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
92
|
+
export type RemoveBiblioFavoriteMutationVariables = {
|
|
93
|
+
contentId: number;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* @summary Remove Biblio Favorite
|
|
97
|
+
*/
|
|
98
|
+
export declare const useRemoveBiblioFavorite: <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>, TContext = unknown>(options?: {
|
|
99
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError, RemoveBiblioFavoriteMutationVariables, TContext>;
|
|
100
|
+
request?: SecondParameter<typeof request>;
|
|
101
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError, RemoveBiblioFavoriteMutationVariables, TContext>;
|
|
102
|
+
export declare const getAddBiblioFavoriteUrl: (contentId: number) => string;
|
|
103
|
+
/**
|
|
104
|
+
* Mark content as a favourite (E31). Idempotent.
|
|
105
|
+
*
|
|
106
|
+
* ``PUT`` and :func:`remove_favorite`'s ``DELETE`` replace one
|
|
107
|
+
* ``POST /favorites`` carrying an ``enabled`` boolean — the verb encoded as
|
|
108
|
+
* data. A retry after a timeout reversed the user's intent; a repeated ``PUT``
|
|
109
|
+
* cannot (§4, consequence 3).
|
|
110
|
+
*
|
|
111
|
+
* Favouriting is not consumption, so it is not entitlement-gated: a member may
|
|
112
|
+
* bookmark something their library has not licensed *yet*. Reaching the content
|
|
113
|
+
* is gated, at the point of reaching it.
|
|
114
|
+
* @summary Add Biblio Favorite
|
|
115
|
+
*/
|
|
116
|
+
export declare const addBiblioFavorite: (contentId: number, favoriteAddWrite: FavoriteAddWrite, options?: Parameters<typeof request>[1]) => Promise<void>;
|
|
117
|
+
export declare const getAddBiblioFavoriteMutationKey: () => readonly ['addBiblioFavorite'];
|
|
118
|
+
export declare const getAddBiblioFavoriteMutationOptions: <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>, TContext = unknown>(options?: {
|
|
119
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addBiblioFavorite>>, TError, AddBiblioFavoriteMutationVariables, TContext>;
|
|
120
|
+
request?: SecondParameter<typeof request>;
|
|
121
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof addBiblioFavorite>>, TError, AddBiblioFavoriteMutationVariables, TContext>;
|
|
122
|
+
export type AddBiblioFavoriteMutationResult = NonNullable<Awaited<ReturnType<typeof addBiblioFavorite>>>;
|
|
123
|
+
export type AddBiblioFavoriteMutationBody = BodyType<FavoriteAddWrite>;
|
|
124
|
+
export type AddBiblioFavoriteMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
125
|
+
export type AddBiblioFavoriteMutationVariables = {
|
|
126
|
+
contentId: number;
|
|
127
|
+
data: BodyType<FavoriteAddWrite>;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* @summary Add Biblio Favorite
|
|
131
|
+
*/
|
|
132
|
+
export declare const useAddBiblioFavorite: <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>, TContext = unknown>(options?: {
|
|
133
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addBiblioFavorite>>, TError, AddBiblioFavoriteMutationVariables, TContext>;
|
|
134
|
+
request?: SecondParameter<typeof request>;
|
|
135
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof addBiblioFavorite>>, TError, AddBiblioFavoriteMutationVariables, TContext>;
|
|
136
|
+
export declare const getListHistoryUrl: (params?: ListHistoryParams) => string;
|
|
137
|
+
/**
|
|
138
|
+
* What this account has consumed, most recent first (E33).
|
|
139
|
+
*
|
|
140
|
+
* One row per content item, not one per view: the caller wants "what have I
|
|
141
|
+
* been reading", and ``consumption_event`` is append-only with a row per act.
|
|
142
|
+
* The last access is therefore a MAX, and progress comes from
|
|
143
|
+
* ``content_progress``, which is LEFT JOINed because an absent row means "not
|
|
144
|
+
* started" rather than zero.
|
|
145
|
+
* @summary List History
|
|
146
|
+
*/
|
|
147
|
+
export declare const listHistory: (params?: ListHistoryParams, options?: Parameters<typeof request>[1]) => Promise<HistoryPage>;
|
|
148
|
+
export declare const getListHistoryQueryKey: (params?: ListHistoryParams) => readonly ["/biblio/me/history", ...ListHistoryParams[]];
|
|
149
|
+
export declare const getListHistoryQueryOptions: <TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListHistoryParams, options?: {
|
|
150
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>>;
|
|
151
|
+
request?: SecondParameter<typeof request>;
|
|
152
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData> & {
|
|
153
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
154
|
+
};
|
|
155
|
+
export type ListHistoryQueryResult = NonNullable<Awaited<ReturnType<typeof listHistory>>>;
|
|
156
|
+
export type ListHistoryQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
157
|
+
export declare function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ListHistoryParams, options: {
|
|
158
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listHistory>>, TError, Awaited<ReturnType<typeof listHistory>>>, 'initialData'>;
|
|
159
|
+
request?: SecondParameter<typeof request>;
|
|
160
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
161
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
162
|
+
};
|
|
163
|
+
export declare function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListHistoryParams, options?: {
|
|
164
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listHistory>>, TError, Awaited<ReturnType<typeof listHistory>>>, 'initialData'>;
|
|
165
|
+
request?: SecondParameter<typeof request>;
|
|
166
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
167
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
168
|
+
};
|
|
169
|
+
export declare function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListHistoryParams, options?: {
|
|
170
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>>;
|
|
171
|
+
request?: SecondParameter<typeof request>;
|
|
172
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
173
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
174
|
+
};
|
|
175
|
+
export declare const getListPacksUrl: () => string;
|
|
176
|
+
/**
|
|
177
|
+
* The content packs this account can navigate (E25).
|
|
178
|
+
*
|
|
179
|
+
* A pack is a :class:`~app.models.biblio.catalogue.CatalogSection`, and one is
|
|
180
|
+
* reachable when the contract reaches at least one category inside it. Deriving
|
|
181
|
+
* it that way rather than granting packs directly means a pack cannot advertise
|
|
182
|
+
* itself while every category under it is out of contract.
|
|
183
|
+
*
|
|
184
|
+
* Empty is a correct answer, not a broken one: an account whose contract has
|
|
185
|
+
* lapsed reaches nothing.
|
|
186
|
+
* @summary List Packs
|
|
187
|
+
*/
|
|
188
|
+
export declare const listPacks: (options?: Parameters<typeof request>[1]) => Promise<PackListRead>;
|
|
189
|
+
export declare const getListPacksQueryKey: () => readonly [`/biblio/me/packs`];
|
|
190
|
+
export declare const getListPacksQueryOptions: <TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
191
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>>;
|
|
192
|
+
request?: SecondParameter<typeof request>;
|
|
193
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData> & {
|
|
194
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
195
|
+
};
|
|
196
|
+
export type ListPacksQueryResult = NonNullable<Awaited<ReturnType<typeof listPacks>>>;
|
|
197
|
+
export type ListPacksQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
198
|
+
export declare function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options: {
|
|
199
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listPacks>>, TError, Awaited<ReturnType<typeof listPacks>>>, 'initialData'>;
|
|
200
|
+
request?: SecondParameter<typeof request>;
|
|
201
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
202
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
203
|
+
};
|
|
204
|
+
export declare function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
205
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listPacks>>, TError, Awaited<ReturnType<typeof listPacks>>>, 'initialData'>;
|
|
206
|
+
request?: SecondParameter<typeof request>;
|
|
207
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
208
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
209
|
+
};
|
|
210
|
+
export declare function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
211
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>>;
|
|
212
|
+
request?: SecondParameter<typeof request>;
|
|
213
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
214
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
215
|
+
};
|
|
216
|
+
export declare const getReadPreferencesUrl: () => string;
|
|
217
|
+
/**
|
|
218
|
+
* The caller's own preferences (E28).
|
|
219
|
+
*
|
|
220
|
+
* An object with one key rather than a bare array, so a second preference can
|
|
221
|
+
* be added later without breaking every client.
|
|
222
|
+
* @summary Read Preferences
|
|
223
|
+
*/
|
|
224
|
+
export declare const readPreferences: (options?: Parameters<typeof request>[1]) => Promise<PreferencesRead>;
|
|
225
|
+
export declare const getReadPreferencesQueryKey: () => readonly [`/biblio/me/preferences`];
|
|
226
|
+
export declare const getReadPreferencesQueryOptions: <TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
227
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>>;
|
|
228
|
+
request?: SecondParameter<typeof request>;
|
|
229
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData> & {
|
|
230
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
231
|
+
};
|
|
232
|
+
export type ReadPreferencesQueryResult = NonNullable<Awaited<ReturnType<typeof readPreferences>>>;
|
|
233
|
+
export type ReadPreferencesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
234
|
+
export declare function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options: {
|
|
235
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readPreferences>>, TError, Awaited<ReturnType<typeof readPreferences>>>, 'initialData'>;
|
|
236
|
+
request?: SecondParameter<typeof request>;
|
|
237
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
238
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
239
|
+
};
|
|
240
|
+
export declare function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
241
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readPreferences>>, TError, Awaited<ReturnType<typeof readPreferences>>>, 'initialData'>;
|
|
242
|
+
request?: SecondParameter<typeof request>;
|
|
243
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
244
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
245
|
+
};
|
|
246
|
+
export declare function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
247
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>>;
|
|
248
|
+
request?: SecondParameter<typeof request>;
|
|
249
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
250
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
251
|
+
};
|
|
252
|
+
export declare const getReplaceCategoryPreferencesUrl: () => string;
|
|
253
|
+
/**
|
|
254
|
+
* Replace the favourite-category set wholesale (E29).
|
|
255
|
+
*
|
|
256
|
+
* ``PUT`` because the legacy handler already replaced the whole set; the verb
|
|
257
|
+
* now says so. An empty array clears the set and is valid input — the legacy
|
|
258
|
+
* left that path uncaught and returned ``500``.
|
|
259
|
+
*
|
|
260
|
+
* A category the account cannot reach is ``422``, listing the offending ids.
|
|
261
|
+
* Silently dropping them would leave the client believing it had saved
|
|
262
|
+
* something it had not.
|
|
263
|
+
* @summary Replace Category Preferences
|
|
264
|
+
*/
|
|
265
|
+
export declare const replaceCategoryPreferences: (categoryPreferencesWrite: CategoryPreferencesWrite, options?: Parameters<typeof request>[1]) => Promise<void>;
|
|
266
|
+
export declare const getReplaceCategoryPreferencesMutationKey: () => readonly ['replaceCategoryPreferences'];
|
|
267
|
+
export declare const getReplaceCategoryPreferencesMutationOptions: <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>, TContext = unknown>(options?: {
|
|
268
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError, ReplaceCategoryPreferencesMutationVariables, TContext>;
|
|
269
|
+
request?: SecondParameter<typeof request>;
|
|
270
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError, ReplaceCategoryPreferencesMutationVariables, TContext>;
|
|
271
|
+
export type ReplaceCategoryPreferencesMutationResult = NonNullable<Awaited<ReturnType<typeof replaceCategoryPreferences>>>;
|
|
272
|
+
export type ReplaceCategoryPreferencesMutationBody = BodyType<CategoryPreferencesWrite>;
|
|
273
|
+
export type ReplaceCategoryPreferencesMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
274
|
+
export type ReplaceCategoryPreferencesMutationVariables = {
|
|
275
|
+
data: BodyType<CategoryPreferencesWrite>;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* @summary Replace Category Preferences
|
|
279
|
+
*/
|
|
280
|
+
export declare const useReplaceCategoryPreferences: <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>, TContext = unknown>(options?: {
|
|
281
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError, ReplaceCategoryPreferencesMutationVariables, TContext>;
|
|
282
|
+
request?: SecondParameter<typeof request>;
|
|
283
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError, ReplaceCategoryPreferencesMutationVariables, TContext>;
|
|
284
|
+
//#endregion
|
|
285
|
+
//# sourceMappingURL=biblio-library.d.ts.map
|